function save_tags_edit($tags_str, $id, $alt = '') { global $pixelpost_db_prefix; del_tags_edit($id, $alt); save_tags_new($tags_str, $id, $alt); }
$category = $val; $query_val[] = "(NULL,'{$val}','{$getid}')"; } $query_st = "INSERT INTO " . $pixelpost_db_prefix . "catassoc (id,cat_id,image_id) VALUES " . implode(",", $query_val) . ";"; $result = mysql_query($query_st) || die("Error: " . mysql_error()); } $query = "update " . $pixelpost_db_prefix . "pixelpost set datetime='{$newdatetime}', headline='{$headline}', body='{$body}', category='{$category}', alt_headline='{$alt_headline}', alt_body='{$alt_body}', comments='{$comments_settings}' where id='{$getid}'"; $result = mysql_query($query) || "Error: " . mysql_error() . $admin_lang_imgedit_db_error; echo "<div class='jcaption'>{$admin_lang_imgedit_update}</div>\n <div class='content confirm'>{$admin_lang_done} {$admin_lang_imgedit_updated} #" . $getid . ". " . $file_reupload_str . "</div><p />"; } echo "<div id='caption'><b>{$admin_lang_images}</b></div>"; // x=delete if (isset($_GET['x']) and $_GET['x'] == "delete") { eval_addon_admin_workspace_menu('image_deleted'); $getid = intval($_GET['imageid']); del_tags_edit($getid); $imagerow = sql_array("SELECT image FROM " . $pixelpost_db_prefix . "pixelpost where id='{$getid}'"); $image = $imagerow['image']; $file_to_del = "{$upload_dir}" . $imagerow['image']; echo "<div class='jcaption'>{$admin_lang_imgedit_deleted}\t</div>\n\t\t<div class='content confirm'>"; $query = sql_query("delete from " . $pixelpost_db_prefix . "pixelpost where id='{$getid}'"); $query = "delete from " . $pixelpost_db_prefix . "catassoc where image_id='{$getid}'"; $result = mysql_query($query) || "Error: " . mysql_error(); // added by ramin to delete the comments too!! $query = "delete from " . $pixelpost_db_prefix . "comments where parent_id='{$getid}'"; $result = mysql_query($query) || "Error: " . mysql_error(); $query = "delete from " . $pixelpost_db_prefix . "tags where img_id='{$getid}'"; $result = mysql_query($query) || "Error: " . mysql_error(); echo " {$admin_lang_imgedit_deleted1} "; if (unlink($file_to_del)) { $image_message = " {$admin_lang_imgedit_deleted2} ";