<?php include_once('inc/config.php'); $db = new array_db($ADD_DB_IMG); $img_del_code = removeSymbols(input($_GET['d'])); $img_del_id = $db->fetch_value('deleteid',$img_del_code,'id'); // Remove Image $Suc .= "Your image has successfully been removed.<br/>"; // Remove small thumb // Remove thumb // Remove link from array if ($db->remove_row('id',$img_del_id)){ if(!$db -> save_db_now()) $Err .= 'A problem occurred during saving of the database!<br/>'; }else $Err .= 'A problem occurred removing image from the database!<br/>'; }else $Err .= "No Image by that name was found!<br/>"; } function notfound(){ } if ($db->item_exists('id',$img_id)){ not_max_bandwidth($img_id); $img_address = get_image_address($img_id,''); if(hotlink()) countSave($img_id,1); }else notfound(); } if ($db->item_exists('id',$img_id)){ not_max_bandwidth($img_id); $img_address = get_thumb_address($img_id); if(hotlink())countSave($img_id,3); }else notfound(); } if ($db->item_exists('id',$img_id)){ not_max_bandwidth($img_id); $img_address = get_thumb_mid_address($img_id); if(hotlink())countSave($img_id,2); }else notfound(); } //see if image exists 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)){ countSave($img_id,4); // Page output $thumb_link = get_thumb_address($img_id,"pt"); $thumb_url = get_thumb_address($img_id,"dt"); $thumb_mid_link = get_thumb_mid_address($img_id,"pm"); $thumb_mid_url = get_thumb_mid_address($img_id,"dm"); $imgurl = get_image_address($img_id,'di'); $alt = $db->fetch_value('id',$img_id,'alt'); $shorturl = $db->fetch_value('id',$img_id,'shorturl'); $bookmarking = bookmarking(($shorturl ==null?$thumb_mid_link:$shorturl),$alt); $open_panel = ($settings['SET_PANEL_OPEN'] ? ' open':''); $img_posted = ' <div class="img_box"><a href="'.$imgurl.'" title="'.$alt.'" ><img src="'.$thumb_show.'" alt="Uploaded Picture" /><br/>'.$alt.'</a></div> <div class="flip">Show/Hide Links</div> <div class="panel'.$open_panel.'"> <div class="code_box"><label id="toplabel">Social Networks:</label>'.$bookmarking.'</div>'; $img_posted .= ' <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>'; } $img_posted .= ' <h3>Small Thumbnail link</h3> <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> <div class="code_box"><label for="codehtml"><a href="'.$thumb_link.'" title="'.$alt.'" >HTML Code</a> (Myspace):</label> <input type="text" id="codehtml" value=\'<a href="'.$thumb_link.'" title="'.$alt.'" ><img src="'.$thumb_url.'" alt="'.$alt.'" /></a>\' onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div> <h3>Thumbnail link</h3> <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> <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=\'<a href="'.$thumb_mid_link.'" title="'.$alt.'" ><img src="'.$thumb_mid_url.'" alt="'.$alt.'" /></a>\' onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div> <h3>Direct link</h3> <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> <div class="code_box"><label for="codedirect">Direct Link (email & IM):</label> <input type="text" id="codedirect" value="'.$imgurl.'" onclick="java script:this.focus();this.select();" readonly="true" class="text_input long" /></div> </div>'; }else $Err = 'No Image by that name was found!'; } $menu=''; include_once('header.php'); success_note($Suc); error_note($Err); }else{ $Inactive_Files =''; if($settings['SET_AUTO_DELETED']){ $Inactive_Files = '<b>Inactive Files</b> are automatically deleted from the servers after '.$settings['SET_AUTO_DELETED_TIME'].' days. <br />'; } $Hot_Linking_limit = ''; if($settings['SET_MAX_BANDWIDTH'] !=0){ $Hot_Linking_limit = '<b>Hot Linking limit:</b> '.(format_size(1048576*$settings['SET_MAX_BANDWIDTH'])).' of bandwidth per Image/'.($settings['SET_AUTO_DELETED_JUMP'] == 'm' ? 'month':'week').' <br />'; } $Max_Upload = ''; if($settings['SET_MAX_UPLOAD'] !=0){ $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>'; } $Hide_Tos = ''; if(!$settings['SET_HIDE_TOS']){ $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>'; } $private_img=''; if($settings['SET_PRIVATE_IMG_ON']){ $private_img ='<input name="private" value="1" type="checkbox"> Private images..<br/>'; } $short_url=''; if($settings['SET_SHORT_URL_ON']){ $short_url ='<input name="shorturl" value="1" type="checkbox"> Create short URLs using B54.in<br/>'; } ?> <div class="contentBox"> <p class="teaser">Upload your images/photos to our free image hosting servers and share them with your friends, family,and collegues.</p> <?if($settings['SET_DIS_UPLOAD']||checklogin()){?> <p class="teaser"> <?=$Inactive_Files;?> <?=$Hot_Linking_limit;?> <b>Supported Image Formats:</b> <?=$types;?><br /> <b>Maximum Filesize:</b> <?=format_size($settings['SET_MAXSIZE']);?> </p> <form enctype="multipart/form-data" action="upload.php" method="post" class="upform" id="upload" name="upload"> <div class="loading"> <label>Uploading Image...</label> <img src="img/loading.gif" alt="Uploading Image" /> </div> <div class="input file"> <div class="upload_form"> <div class="file_upload"> <label for="file">Image to upload: </label> <div class="file_input_div"><input type="text" id="fileName[]" class="text_input long" readonly="readonly"> <input type="button" value="Browse" name="Search files" class="file_input_button" /> <input type="file" name="file[]" id="file[]" class="file_input_hidden" onchange="java script: fileName()"/> </div> </div> </div> <label for="alt" class="des">Description: (optional) </label> <input type="text" name="alt[]" id="alt[]" class="text_input long_des" /><br/><br/> </div> <?=$Max_Upload;?> <?=$private_img;?> <?=$short_url;?> <br/> <input name="submit" type="submit" value="Upload" class="button" onclick='return fileExt()' /> <br/><br/> <?=$Hide_Tos?> </form> <?}else{//dis upload?> <p class="teaser"><b>Upload has been Disable</b></p> <?}?> </div> <? } //end include_once('footer.php'); ?>
Czemu błędem jest ?>
