syntax error, unexpected T_STRING in line 36

Hier könnt Ihr fragen zu Problemen mit Sql (MySql) in Verbindung mit PHP stellen. Es können fragen zu SQL Anweisungen und/oder PHP Mysql Funktionen gestellt werden.

syntax error, unexpected T_STRING in line 36

Beitragvon bogi24 am So, 16:11:07 6.12.09

Hallo Zusammen.

könnt ihr mir helfen?
Hab in der Zeile 36 foglendes Problem!

  1. Parse error: syntax error, unexpected T_STRING in /www/htdocs/w009ffc1/fotoshop_hauptordner/fotoshop/components/com_chronocontact/chronocontact.html.php(180) : eval()'d code on line 36


Hier mein Code:
  1. <h1>Warenkorb</h1>
  2.  
  3. <?php
  4. /* ############ Preise und Aufschläge für Fotos hier eintragen ########################## */
  5. $photo_use_addition=50; //in %
  6. $photo_price=1.95; // in Euro
  7. $photo_price_large=3.45; // in Euro
  8. $photo_price_addition=($photo_price*$photo_use_addition/100)+$photo_price; // in Euro
  9. $photo_price_large_addition=($photo_price_large*$photo_use_addition/100)+$photo_price_large; //in Euro
  10. /* ############ Ende Preise und Aufschläge für Fotos hier eintragen ##################### */
  11. /* ############ Fotogröße ########################## */
  12. $imgsize_1="Bilddownload";
  13. $imgsize_2="Bilderabzug 13 mal 19";
  14. /* ############ Ende Fotogröße ##################### */
  15. /* ############ Nutzungsrecht ###################### */
  16. $covenant_yes="ja";
  17. $covenant_no="nein";
  18. /* ############ Anzahl der Bilder die insgesamt bestellt werden können #########*/
  19. $no_of_fields="20";
  20. /* ############ Ende Anzahl der Bilder die insgesamt bestellt werden können ###*/
  21.  
  22. $piclist = $mainframe->getUserState('joom.favourites.pictures');
  23. $piclist_array = explode(',',$piclist);
  24. $database = & JFactory::getDBO();
  25. if(sizeof($piclist_array)>0)
  26. {
  27.  
  28. echo("<script type=\"text/javascript\">");
  29. //Funktion Preis
  30. echo ("var a = document.ChronoContact_Bildbestellung;");
  31. for ($a = 0; $a < sizeof($piclist_array); ++$a)
  32. {
  33. echo("function rechne_preis_".$a."() {");
  34. echo("var feld_groesse_".$a." = a.Groesse_".$a.".options[a.Groesse_".$a.".selectedIndex].value;");
  35. echo("var feld_nutzung_".$a." = a.Nutzungsrecht_".$a.".options[a.Nutzungsrecht_".$a.".selectedIndex].value;");
  36. echo("if (feld_groesse_".$a." ==\"".$imgsize_1."\" && feld_nutzung_".$a." ==\"".$Repeated Use_no."\"){a.Preis_".$a.".value=".$photo_price.";}");
  37. echo("if (feld_groesse_".$a." ==\"".$imgsize_1."\" && feld_nutzung_".$a." ==\"".$Repeated Use_yes."\"){a.Preis_".$a.".value=".$Photo_price_addition.";}");
  38. echo("if (feld_groesse_".$a." ==\"".$imgsize_2."\" && feld_nutzung_".$a." ==\"".$covenant_no."\"){a.Preis_".$a.".value=".$photo_price_large.";}");
  39. echo("if (feld_groesse_".$a." ==\"".$imgsize_2."\" && feld_nutzung_".$a." ==\"".$covenant_yes."\"){a.Preis_".$a.".value=".$photo_price_large_addition.";}");
  40. echo("}");
  41. }
  42. // Addition der Preisfelder mit JavaScript
  43. echo("function preissumme () {");
  44. echo("var summe = 0");
  45. for ($b = 0; $b < sizeof($piclist_array); ++$b)
  46. {
  47. echo(" + Number(a.Preis_".$b.".value)");
  48. }
  49. echo("; a.Gesamtsumme.value=summe;");
  50. echo("}");
  51.  
  52. echo("</script>");
  53.  
  54. ?>
  55. <noscript>
  56. Ihr Browser unterstützt kein JavaScript, daher kann der Preis für Ihre Bestellung nicht berechnet werden.<br>
  57. </noscript>
  58. <p>Pro Bestellung können bis zu <? echo($no_of_fields);?> Fotos bestellt werden. Möchten Sie mehr als 20 Fotos bestellen, bitte kontaktieren Sie uns.</p>
  59. <table width="100%"  border="0" cellspacing="0" cellpadding="0" class="table_form">
  60.       <tr>
  61.         <th>Bild</th>
  62.         <th>ID</th>
  63.         <th>Titel</th>
  64.         <th>Druckgröße</th>
  65.         <th>Gewerbliche Nutzung</th>
  66.         <th>Preis in &euro;</th>
  67. <th>Löschen</th>
  68.   </tr>
  69.       <?php
  70. for ($x = 0; $x < sizeof($piclist_array); ++$x)
  71. {
  72. $sql = "SELECT  * FROM #__joomgallery
  73. WHERE id='".current($piclist_array)."'";
  74. $database->setQuery( $sql );
  75. $output_img=$database->loadObject();
  76. if($output_img){
  77. $sql_cat = "SELECT  * FROM #__joomgallery_catg
  78. WHERE cid='".$output_img->catid."'";
  79. $database->setQuery( $sql_cat );
  80. $output_cat=$database->loadObject();
  81. if($output_cat){
  82. ?>
  83.       <tr>
  84.         <td><div class="mod_ji_img"><a href="<?php echo JRoute::_('index.php?option=com_joomgallery&amp;func=detail&amp;id='.$output_img->id._JOOM_ITEMID); ?>"><img src="<?php echo 'components/com_joomgallery/img_thumbnails/'.$output_cat->catpath.'/'.$output_img->imgthumbname;?>" alt="<?php echo $output_img->imgtitle; ?>" border="0"></a></div></td>
  85.         <td><?php echo $output_img->imgauthor; ?>
  86.             <input id="hidden_<?php echo $x;?>_1" name="BildID_<?php echo $x;?>" type="hidden" readonly="readonly"  value="<?php echo $output_img->imgauthor; ?>"></td>
  87.         <td><?php echo $output_img->imgtitle; ?>
  88.             <input id="hidden_<?php echo $x;?>_2" name="Bildtitel_<?php echo $x;?>" type="hidden" readonly="readonly"  value="<?php echo $output_img->imgtitle; ?>"></td>
  89.         <td><select name="Groesse_<?php echo $x;?>" onchange="rechne_preis_<?php echo $x;?>(); preissumme ()">
  90.             <option value="<?php echo $imgsize_1;?>"><?php echo $imgsize_1;?></option>
  91.             <option value="<?php echo $imgsize_2;?>"><?php echo $imgsize_2;?></option>
  92.           </select>
  93.         </td>
  94.         <td><select name="Nutzungsrecht_<?php echo $x;?>" onchange="rechne_preis_<?php echo $x;?>(); preissumme ()">
  95.             <option value="<? echo($covenant_no);?>">nein</option>
  96.             <option value="<? echo($covenant_yes);?>">ja</option>
  97.           </select>
  98.         </td>
  99.         <td><input name="Preis_<?php echo $x;?>" type="text" readonly="readonly" class="show_photo_price" value="<?php echo $photo_price;?>"></td>
  100. <td>
  101. <a href="<?php echo JRoute::_('index.php?option=com_joomgallery&func=removepicture&id='.$output_img->id); ?>">
  102.                 <img src="components/com_joomgallery/assets/images/basket_remove.png" alt="Bild l&ouml;schen / delete image"/>
  103.       </a>
  104. </td>
  105.       </tr>
  106.       <? }
  107. }
  108.   next($piclist_array);
  109. }
  110. ?>
  111. <tr>
  112.         <td colspan="5"><div align="right"><strong>Summe:</strong><br />
  113.           <em>Unseren Rechnungen sind gem&auml;&szlig; der Kleinunternehmer-Regelung (&sect;19 Abs. 1 UStG) keine Umsatzsteuer enthalten und ausgewiesen</em>. </div></td>
  114.         <td><input name="Gesamtsumme" type="text" readonly="readonly" class="show_photo_price"  value="<? echo($photo_price*sizeof($piclist_array));?>"></td>
  115. <td>&nbsp;</td>
  116. </tr>
  117.       <tr>
  118.         <td colspan="7"><?php
  119. if(sizeof($piclist_array)<$no_of_fields)
  120. {
  121. for ($i = sizeof($piclist_array); $i <= $no_of_fields; ++$i)
  122. {
  123. ?>
  124.             <input id="hidden_<?php echo $i;?>_1" name="BildID_<?php echo $i;?>" type="hidden" readonly="readonly"  value="">
  125.             <input id="hidden_<?php echo $i;?>_2" name="Bildtitel_<?php echo $i;?>" type="hidden" readonly="readonly"  value="">
  126.             <input id="hidden_<?php echo $i;?>_3" name="Groesse_<?php echo $i;?>" type="hidden" readonly="readonly"  value="">
  127.             <input id="hidden_<?php echo $i;?>_4" name="Nutzungsrecht_<?php echo $i;?>" type="hidden" readonly="readonly"  value="">
  128. <input id="hidden_<?php echo $i;?>_5" name="Preis_<?php echo $i;?>" type="hidden" readonly="readonly"  value="">
  129.             <?php
  130. }
  131. }
  132. ?>
  133.         </td>
  134.       </tr>
  135.       <tr>
  136.       <tr><th colspan="5"><b>Ihre Daten</b></th></tr>
  137. <tr>
  138. <td colspan="3"><label class="cf_label">Vorname</label></td>
  139. <td colspan="2"><label class="cf_label" style="width: 150px;"></label>
  140.     <input class="cf_inputbox required" maxlength="150" size="30" title="Bitte geben Sie ihren Vornamen an" id="text_1" name="vorname" type="text" /></td>
  141. </tr>
  142. <td colspan="3"><label class="cf_label">Nachname</label></td>
  143. <td colspan="2"><label class="cf_label" style="width: 150px;"></label>
  144.     <input class="cf_inputbox required" maxlength="150" size="30" title="Bitte geben Sie ihren Nachnamen an" id="text_1" name="nachname" type="text" /></td>
  145. </tr>
  146. <tr>
  147. <td colspan="3"><label class="cf_label">Strasse und Hausnr.</label></td>
  148. <td colspan="2"><input  id="text_1" name="strasse" type="text" /></td>
  149. </tr>
  150. <tr>
  151. <td colspan="3"><label class="cf_label">PLZ</label></td>
  152. <td colspan="2"><input  id="text_3" name="plz" type="text" /></td>
  153.   </tr>
  154. <tr>
  155. <td colspan="3"><label class="cf_label">Ort</label></td>
  156. <td colspan="2"><input  id="text_4" name="ort" type="text" /></td>
  157.   </tr>
  158. <tr>
  159. <td colspan="3"><label class="cf_label">E-Mail</label></td>
  160. <td colspan="2"><label class="cf_label" style="width: 150px;"></label>
  161.     <input class="cf_inputbox required validate-email" maxlength="150" size="30" title="Bitte geben Sie ihre Emailadresse an" id="text_2" name="email" type="text" />
  162. </td>
  163. </tr>
  164. <tr>
  165. <td colspan="3"><label class="cf_label">Bemerkungen</label></td>
  166. <td colspan="2"><textarea class="cf_inputbox" rows="3" id="text_5" cols="30" name="bemerkungen"></textarea></td>
  167. </tr>
  168. <tr>
  169. <td colspan="3">
  170. <label class="cf_label">Spamschutz<br>Bitte tragen Sie den angezeigten Code in das Feld ein!<br>Insert this code, please!</label></td>
  171. <td colspan="2"><span>{imageverification}</span>
  172.  
  173.   </td>
  174. </tr>
  175. <tr>
  176. <td colspan="5"><div class="formbutton" align="center"><input value="Bestellung senden" type="submit" /></div></td>
  177. </tr>
  178. </table>
  179. <?php }
  180. else
  181. {
  182. echo " Bitte wählen Sie zunächst Fotos aus.<br>Please choose any Photos.";
  183. } ?>
  184.  



Vielen vielen Dank!
bogi24
Newbi
 
Beiträge: 1
Registriert: So, 16:07:53 6.12.09

Zurück zu PHP mit Sql



cron