Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Parse error: syntax error, unexpected $end in C:\xampp\htdocs\hosting\index.php on line 212
Forum PHP.pl > Forum > Przedszkole
hhuubbeerrtt00
  1. <?php
  2.  
  3.  
  4. include_once('inc/config.php');
  5.  
  6. $db = new array_db($ADD_DB_IMG);
  7.  
  8.  
  9.  
  10. if (isset($_GET['d'])){
  11. $img_del_code = removeSymbols(input($_GET['d']));
  12. $img_del_id = $db->fetch_value('deleteid',$img_del_code,'id');
  13. if (!empty($img_del_id)){
  14. // Remove Image
  15. if(@unlink(get_image_address($img_del_id,'')))
  16. $Suc .= "Your image has successfully been removed.<br/>";
  17. // Remove small thumb
  18. @unlink(get_thumb_address($img_del_id));
  19. // Remove thumb
  20. @unlink(get_thumb_mid_address($img_del_id));
  21. // Remove link from array
  22. if ($db->remove_row('id',$img_del_id)){
  23. if(!$db -> save_db_now()) $Err .= 'A problem occurred during saving of the database!<br/>';
  24. }else
  25. $Err .= 'A problem occurred removing image from the database!<br/>';
  26. }else
  27. $Err .= "No Image by that name was found!<br/>";
  28. }
  29.  
  30. function notfound(){
  31. header('Content-type: image/png');
  32. readfile('img/notfound.png');
  33. exit();
  34. }
  35.  
  36. if (isset($_GET['di'])){
  37. $img_id = removeSymbols(end(explode('/',input($_GET['di']))));
  38. if ($db->item_exists('id',$img_id)){
  39. not_max_bandwidth($img_id);
  40. $img_address = get_image_address($img_id,'');
  41. $pathinfo = pathinfo($img_address);
  42. header('Content-type: image/'.strtolower($pathinfo['extension']));
  43. readfile($img_address);
  44. if(hotlink()) countSave($img_id,1);
  45. exit();
  46. }else
  47. notfound();
  48. }
  49.  
  50.  
  51.  
  52. if (isset($_GET['dt'])){
  53. $img_id = removeSymbols(end(explode('/',input($_GET['dt']))));
  54. if ($db->item_exists('id',$img_id)){
  55. not_max_bandwidth($img_id);
  56. $img_address = get_thumb_address($img_id);
  57. header('Content-type: image/'.$THUMB_SAVE_EXT);
  58. readfile($img_address);
  59. if(hotlink())countSave($img_id,3);
  60. exit();
  61. }else
  62. notfound();
  63. }
  64.  
  65. if (isset($_GET['dm'])){
  66. $img_id = removeSymbols(end(explode('/',input($_GET['dm']))));
  67. if ($db->item_exists('id',$img_id)){
  68. not_max_bandwidth($img_id);
  69. $img_address = get_thumb_mid_address($img_id);
  70. header('Content-type: image/'.$THUMB_MID_SAVE_EXT);
  71. readfile($img_address);
  72. if(hotlink())countSave($img_id,2);
  73. exit();
  74. }else
  75. notfound();
  76. }
  77.  
  78.  
  79.  
  80. if (isset($_GET['pt'])||isset($_GET['pm'])){
  81. $img_id = removeSymbols(end(explode('/',input(isset($_GET['pt'])? $_GET['pt']:$_GET['pm']))));
  82. //see if image exists
  83. if ($db->item_exists('id',$img_id)){//(get_thumb_address($IMG_ID) && get_thumb_mid_address($IMG_ID) && get_image_address($IMG_ID,'',$db_img)){
  84. countSave($img_id,4);
  85. // Page output
  86. $thumb_link = get_thumb_address($img_id,"pt");
  87. $thumb_url = get_thumb_address($img_id,"dt");
  88. $thumb_mid_link = get_thumb_mid_address($img_id,"pm");
  89. $thumb_mid_url = get_thumb_mid_address($img_id,"dm");
  90. $imgurl = get_image_address($img_id,'di');
  91. $alt = $db->fetch_value('id',$img_id,'alt');
  92. $shorturl = $db->fetch_value('id',$img_id,'shorturl');
  93. $bookmarking = bookmarking(($shorturl ==null?$thumb_mid_link:$shorturl),$alt);
  94. $thumb_show = isset($_GET['pt'])? $thumb_url:$thumb_mid_url;
  95. $open_panel = ($settings['SET_PANEL_OPEN'] ? ' open':'');
  96.  
  97. $img_posted = '
  98. <div class="img_box"><a href="'.$imgurl.'" title="'.$alt.'" ><img src="'.$thumb_show.'" alt="Uploaded Picture" /><br/>'.$alt.'</a></div>
  99. <div class="flip">Show/Hide Links</div>
  100. <div class="panel'.$open_panel.'">
  101. <div class="code_box"><label id="toplabel">Social Networks:</label>'.$bookmarking.'</div>';
  102. if ($shorturl != null && !empty($shorturl)){
  103. $img_posted .= '
  104. <div class="code_box"><label for="shorturl">Short URL</a> (Twitter):</label> <input type="text" id="codehtml" value="'.$shorturl.'" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>';
  105. }
  106. $img_posted .= '
  107. <h3>Small Thumbnail link</h3>
  108. <div class="code_box"><label for="codelbb">BBCode (Forums):</label> <input type="text" id="codelbb" value="[IMG1]'.$thumb_url.'[/IMG]" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  109. <div class="code_box"><label for="codehtml"><a href="'.$thumb_link.'" title="'.$alt.'" >HTML Code</a> (Myspace):</label> <input type="text" id="codehtml" value=\'&lt;a href="'.$thumb_link.'" title="'.$alt.'" &gt;&lt;img src="'.$thumb_url.'" alt="'.$alt.'" /&gt;&lt/a&gt;\' onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  110. <h3>Thumbnail link</h3>
  111. <div class="code_box"><label for="codelbb">BBCode (Forums):</label> <input type="text" id="codelbb" value="[IMG1]'.$thumb_mid_url.'[/IMG1]" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  112. <div class="code_box"><label for="codehtml"><a href="'.$thumb_mid_link.'" title="'.$alt.'" >HTML Code</a> (Myspace):</label> <input type="text" id="codehtml" value=\'&lt;a href="'.$thumb_mid_link.'" title="'.$alt.'" &gt;&lt;img src="'.$thumb_mid_url.'" alt="'.$alt.'" /&gt;&lt/a&gt;\' onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  113. <h3>Direct link</h3>
  114. <div class="code_box"><label for="codebb">BBCode (Forums):</label> <input type="text" id="codebb" value="[IMG1]'.$imgurl.'[/IMG]" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  115. <div class="code_box"><label for="codedirect">Direct Link (email &amp; IM):</label> <input type="text" id="codedirect" value="'.$imgurl.'" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div>
  116. </div>';
  117. }else
  118. $Err = 'No Image by that name was found!';
  119. }
  120.  
  121.  
  122. $menu='';
  123. $page_title = isset($img_posted) ? ' - '.$alt:' - '.$settings['SET_SLOGAN'];
  124. include_once('header.php');
  125. success_note($Suc);
  126. error_note($Err);
  127.  
  128. if (isset($img_posted)){
  129.  
  130.  
  131. echo $img_posted;
  132.  
  133.  
  134.  
  135. }else{
  136.  
  137.  
  138. $Inactive_Files ='';
  139. if($settings['SET_AUTO_DELETED']){
  140. $Inactive_Files = '<b>Inactive Files</b> are automatically deleted from the servers after '.$settings['SET_AUTO_DELETED_TIME'].' days. <br />';
  141. }
  142.  
  143. $Hot_Linking_limit = '';
  144. if($settings['SET_MAX_BANDWIDTH'] !=0){
  145. $Hot_Linking_limit = '<b>Hot Linking limit:</b> '.(format_size(1048576*$settings['SET_MAX_BANDWIDTH'])).'
  146. of bandwidth per Image/'.($settings['SET_AUTO_DELETED_JUMP'] == 'm' ? 'month':'week').'
  147. <br />';
  148. }
  149.  
  150. $Max_Upload = '';
  151. if($settings['SET_MAX_UPLOAD'] !=0){
  152. $Max_Upload = '<span class="Upload_Multiple">Upload Multiple Images <a href="#" class="add_another_file_input"><img src="./img/add.png" alt="upload more images" /></a><small>(Max '.$settings['SET_MAX_UPLOAD'].')</small><br/><br/></span>';
  153. }
  154.  
  155. $Hide_Tos = '';
  156. if(!$settings['SET_HIDE_TOS']){
  157. $Hide_Tos = '<p>Please note that uploading adult content is not allowed!<br/>Any such content will be deleted. Check our <a href="tos.php" title="Terms of Service" >Terms of Service</a> for upload rules.</p>';
  158. }
  159.  
  160. $private_img='';
  161. if($settings['SET_PRIVATE_IMG_ON']){
  162. $private_img ='<input name="private" value="1" type="checkbox"> Private images..<br/>';
  163. }
  164.  
  165. $short_url='';
  166. if($settings['SET_SHORT_URL_ON']){
  167. $short_url ='<input name="shorturl" value="1" type="checkbox"> Create short URLs using B54.in<br/>';
  168. }
  169. ?>
  170. <div class="contentBox">
  171. <p class="teaser">Upload your images/photos to our free image hosting servers and share them with your friends, family,and collegues.</p>
  172. <?if($settings['SET_DIS_UPLOAD']||checklogin()){?>
  173. <p class="teaser">
  174. <?=$Inactive_Files;?>
  175. <?=$Hot_Linking_limit;?>
  176. <b>Supported Image Formats:</b> <?=$types;?><br />
  177. <b>Maximum Filesize:</b> <?=format_size($settings['SET_MAXSIZE']);?>
  178. </p>
  179. <form enctype="multipart/form-data" action="upload.php" method="post" class="upform" id="upload" name="upload">
  180. <div class="loading">
  181. <label>Uploading Image...</label>
  182. <img src="img/loading.gif" alt="Uploading Image" />
  183. </div>
  184. <div class="input file">
  185. <div class="upload_form">
  186. <div class="file_upload">
  187. <label for="file">Image to upload: </label>
  188. <div class="file_input_div"><input type="text" id="fileName[]" class="text_input long" readonly="readonly">
  189. <input type="button" value="Browse" name="Search files" class="file_input_button" />
  190. <input type="file" name="file[]" id="file[]" class="file_input_hidden" onchange="java script: fileName()"/>
  191. </div>
  192. </div>
  193. </div>
  194. <label for="alt" class="des">Description: (optional) </label>
  195. <input type="text" name="alt[]" id="alt[]" class="text_input long_des" /><br/><br/>
  196. </div>
  197. <?=$Max_Upload;?>
  198. <?=$private_img;?>
  199. <?=$short_url;?>
  200. <br/>
  201. <input name="submit" type="submit" value="Upload" class="button" onclick='return fileExt()' />
  202. <br/><br/>
  203. <?=$Hide_Tos?>
  204. </form>
  205. <?}else{//dis upload?>
  206. <p class="teaser"><b>Upload has been Disable</b></p>
  207. <?}?>
  208. </div>
  209. <?
  210. } //end
  211. include_once('footer.php');
  212. ?>

Czemu błędem jest ?> questionmark.gif
lukasz91
Gdzieś nie domknąłeś klamry. Następnym razem czytaj co wypluwa parser ...
toaspzoo
Ja pierdziele, człowieku, naucz się czytać ! FORUM TO NIE PARSER !

Przed "?>" daj "}"
Daiquiri
Zamykam.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.