1
neda_barna
mime_content_type
  • 2008/4/12 4:49

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


please tell me my problem
$upload_path REF_UPLOAD_DIR2;
        
//$magic_mime_path = '/usr/share/file/magic';
        
$mime_types_allowed = array( 'application/msword' );

if (!
function_exists('mime_content_type ')) {
    function 
mime_content_type($filename) {
    
        
$finfo    finfo_open(FILEINFO_MIME);
        
$mimetype finfo_file($finfo$filename);
        
finfo_close($finfo);
        return 
$mimetype;
    }

 if (@
$_FILES['fulltext']['name']) {
    
$mimetype mime_content_type($_FILES['fulltext']['tmp_name']);
    echo 
$mimetype;
    if (!(
in_array($mimetype$mime_types_allowed))) {
        
redirect_header REFER_URL."/track-accept.php?sid=".$sid4_REF_INVALID_FILETYPE );
    }

}


my error is :
Cannot redeclare mime_content_type()



2
neda_barna
read data from html file with php file
  • 2008/4/2 7:23

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


hi
how can i raed data from html file with php file and save it into database?????????!!!!!!!!1



3
neda_barna
Re: change to xml
  • 2008/3/2 11:45

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


please see this code why it is work but i use it to XOOPS it dosent work
it is into php
<?php
$connection 
mysql_connect("localhost""root""") or die("Could not connect.");
$table_name 'xoops_papers';
$db mysql_select_db("aero2008");
$query "select * from " $table_name;
$result mysql_query($query$connection) or die("Could not complete database query");
$num mysql_num_rows($result);

if (
$num != 0) {

 
$filefopen("results.xml""w");
 
 
$_xml ="<?xml version="1.0" encoding="UTF-8" ?>rn";

 
$_xml .="<site>rn";

 while (
$row mysql_fetch_array($result)) {
 
$ss=$row["sid"];

 if (
$row["sid"]) {

 
$_xml .="t<page title="" . $row["sid"] . "">rn";

 
$_xml .="tt<title>" $row["title"] . "</title>rn";
$_xml .="t</page>rn";
 } else {

 
$_xml .="t<page title="Nothing Returned">rn";
$_xml .="tt<title>none</title>rn";

 
$_xml .="t</page>rn";
 } }

 
$_xml .="</site>";

 
fwrite($file$_xml);

 
fclose($file);

 echo 
"XML has been written.  <a href="results.xml">View the XML.</a>";

 } else {

 echo 
"No Records found";

 }



?>



and it is into xoops
if ( is_http_var'sid' ) ) {
    
$sid get_http_var'sid' ) ;
    
$paper = new RefereePaper$sid );
}  



$title $paper->getVar'title' );
$filefopen("results.xml""w");

 
$_xml ="<?xml version="1.0" encoding="UTF-8" ?>rn";

 
$_xml .="<site>rn";



 if (
$sid) {

 
$_xml .="t<records="" . $sid . "">rn";

 
$_xml .="tt<title>" $title "</title>rn";
$_xml .="t</page>rn";
 } else {

 
$_xml .="t<records="Nothing Returned">rn";
$_xml .="tt<title>none</title>rn";

 
$_xml .="t</records>rn";
 } 

 
$_xml .="</site>";

 
fwrite($file$_xml);
echo 
$file;
 
fclose($file);


 echo 
"XML has been written.  <a href="results.xml">View the XML.</a>";



4
neda_barna
Re: change to xml
  • 2008/3/1 10:39

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


who can help me???????????????



5
neda_barna
change to xml
  • 2008/2/27 12:47

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


hi i want get data from database and change it to xml
for example properties of one paper
i want get name,lastname,title,....
and change it to xml like this
what must i do??????????/
<?xml version="1.0" encoding="UTF-8"?>
<records>
  <record>
    <language>eng</language>
    <publisher>Popular Chemistry</publisher>
    <journalTitle>Botanical Magazine</journalTitle>
    <issn>17497221</issn>
    <publicationDate>2002-09-04</publicationDate>
    <volume>98</volume>
    <issue>2</issue>
    <startPage>1234</startPage>
    <endPage>1235</endPage>
    <doi>1234567</doi>
    <publisherRecordId>12345</publisherRecordId>
    <documentType>article</documentType>
    <title language="eng">Roses and Lilies</title>
    <title language="ger">Roses und Lilies</title>
    <authors>
      <author>
        <name>Fritz Haber </name>
        <email>fritz.haber@some.university.org</email>
        <affiliationId>1</affiliationId>
        <affiliationId>2</affiliationId>
        <affiliationId>3</affiliationId>
      </author>
    </authors>
    <affiliationsList>
      <affiliationName affiliationId="1">
        University of A     
      </affiliationName>
      <affiliationName affiliationId="2">
        Universitaty of B
      </affiliationName> 
      <affiliationName affiliationId="3">
        University of C
      </affiliationName>
    </affiliationsList>

    




 <= The language tag content must conform to the
    iso 639-2b standard.

 <= Here is the issn number of the journal in which
    the article has been published. If you have an eissn
    number instead then this line should be replaced by
    <eissn>17497221</eissn>. If you have both issn
    and eissn numbers then the eissn tag should occur
    after the issn tag. 



 <= If the title occurs in more than one language
    then you may list the titles here. The title tag
    has got the attribute language that must be set
    according to the ISO638.2 standard.



 <= Note that the affilitationId numbers denote the
    affilitations in the affiliationslist below. 

    <abstract language="eng">
      The catalytic formation of ammonia from hydrogen
      and atmospheric nitrogen under conditions of high
      temperature and high pressure.
    </abstract>
    <fullTextUrl format="pdf">
      http://www.science.org/articles/HaberBosch.pdf
    </fullTextUrl>
    <keywords language="eng">    
      <keyword>garden</keyword>
      <keyword>rose</keyword>
    </keywords>
  </record>

  <record>
   ...
  </record>
   ...

</records>



6
neda_barna
Re: my album module
  • 2008/2/25 7:34

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


my problem solved
Before:

res_x int(11) NOT NULL default '',
res_y int(11) NOT NULL default '',



After:

res_x int(11) NOT NULL default '0',
res_y int(11) NOT NULL default '0',



7
neda_barna
my album module
  • 2008/2/25 7:13

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


hi all
when i want install my album module it have error
this error is :
Invalid default value for 'res_x'

Unable to install myalbum. Error(s):

what is this error
what must i do
please help me
thanks



8
neda_barna
Re: send email with attach file
  • 2008/1/29 5:05

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


no one cant help me



9
neda_barna
Re: send email with attach file
  • 2008/1/29 5:03

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


no one cant help me



10
neda_barna
send email with attach file
  • 2008/1/28 12:28

  • neda_barna

  • Just popping in

  • Posts: 63

  • Since: 2007/9/5 4


hi
i want send email with attach file
please see my code and said me my problem
this code send email with attach file
but when i check my email
said to me this file didnt scan
and when i save a file i cant open that
$to $email;
              
$from "John-Smith <n@yahoo.com>";
              
$subject "Here is your attachment";
  
  
$fileatt "/home5/modules/referee/upload/ABSTRACT-2007-08-27-824925.PDF";
              
$fileatttype "application/pdf";
              
$fileattname "newpaper.pdf";

              
$headers 'From: 4hncce <kjhncce@ut.ac.ir>' 

              
$file fopen$fileattname'rb' );
 
              
$data fread$filefilesize$fileatt ) );
  
              
fclose$file );
  
              
$semi_rand md5time() );
 
              
$mime_boundary "==Multipart_Boundary_x{$semi_rand}x";

              
$headers .= "nMIME-Version: 1.0n" .
 
                          
"Content-Type: multipart/mixed;n" .
                          
" boundary="{$mime_boundary}"";
 
                          
$message ="hi all it is for you";

              
$message .= "This is a multi-part message in MIME format.nn" .

                      
"--{$mime_boundary}n" .
 .
                      
"Content-Type: text/plain;  charset="iso-8859-1"n" .
                      
"Content-Transfer-Encoding: 7bitnn" 
                      
$message "nn";
  
              
$data chunk_splitbase64_encode$data ) );
  
              
$message .= "--{$mime_boundary}n" .
  
                       
"Content-Type: {$fileatttype};n" .
 
                       
" name="{$fileattname}"n" .
  
                       
"Content-Disposition: attachment;n" .
  
                       
" filename="{$fileattname}"n" .
                   
"Content-Transfer-Encoding: base64nn" .
  
                       
$data "nn" .
                     
"--{$mime_boundary}--n";
  
                      
                       if( 
mail$to$subject$message$headers ) ) {
  
                  echo 
"<p>The email was sent.</p>";
 
              }
 
              else {
  
                  echo 
"<p>There was an error sending the mail.</p>";
  
              }




TopTop
(1) 2 3 4 ... 7 »



Login

Who's Online

240 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 240


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits