include "config/config.php"; include "include/function.php"; include "include/logincheck.php"; if (isset($_POST['submit'])) { $id = $_GET['id']; $user_arr = get_the_user($_GET['id']); $error = ""; if (!update_valid_mail($user_arr['email'], $_POST['email'])) { $error .= "<b>{$_POST['email']}</b>Email is already registered<br>"; } if (!update_valid_username($user_arr['username'], $_POST['username'])) { $error .= "<b>{$_POST['username']}</b> Username is already registered<br>"; } if ($error == "") { $form_data = array('username' => $_POST['username'], 'email' => $_POST['email'], 'fname' => $_POST['fname'], 'lname' => $_POST['lname'], 'phone' => $_POST['phone'], 'password' => $_POST['password'], 'updated' => date("Y-m-d H:i:s")); UpdateData(USER, $form_data, "WHERE slno = " . $id . ""); log_edit_user($id); header("location:edit-user.php?id={$id}&editsuccess"); } } ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <!-- Mirrored from www.keenthemes.com/preview/metronic_admin/form_controls.html by HTTrack Website Copier/3.x [XR&CO'2013], Thu, 20 Mar 2014 07:01:10 GMT -->
} $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'sort_order' => '0', 'label' => $label, 'image' => "null.jpg"); InsertData(MENU, $form_data); add_log_admin("Menu {$_POST['name']}{{" . $id . "}} is added"); header("location:menu.php?addsuccess"); } if (isset($_POST['submitupdate'])) { if ($_POST['parent'] == "0") { $label = '0'; } else { $cat_arr = get_the_menu($_POST['parent']); $label = intval($cat_arr['label']) + 1; } $id = $_GET['edit']; $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'label' => $label); UpdateData(MENU, $form_data, "WHERE slno = " . $id . ""); add_log_admin("Post Category {$_POST['name']}{{" . $id . "}} is updated"); header("location:menu.php?editsuccess"); } ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD -->
if (isset($_POST['submit'])) { $name = $_POST['name']; $parmalink = $_POST['parmalink']; $desc = stripcslashes(mysql_real_escape_string($_POST['desc'])); $shortdesc = $_POST['shortdesc']; $category = $_POST['category']; $tags = $_POST['tags']; $status = $_POST['status']; //Adding General information $form_data = array('name' => mysql_real_escape_string($name), 'parmalink' => mysql_real_escape_string($parmalink), 'description' => mysql_real_escape_string($desc), 'short_description' => mysql_real_escape_string($shortdesc), 'tags' => mysql_real_escape_string($tags), 'last_update' => date("Y-m-d H:i:s"), 'status' => $status); UpdateData(POST, $form_data, "WHERE slno = " . $id . ""); //Adding Featured Image if ($_FILES["postimage"]["name"] != "") { $newname = image_upload($_FILES["postimage"]["tmp_name"], $_FILES["postimage"]["name"], uniqid(), "../images/featured_image/"); $form_data = array('image' => $newname); UpdateData(POST, $form_data, "WHERE slno = " . $id . ""); } //Adding Category $array1 = $category; $array2 = get_cat_arr_id($id); $result = array_intersect($array1, $array2); if (count($array1) == count($array2) && count($array1) == count($result)) { $flag = FALSE; } else { $flag = TRUE; } if ($flag) { mysql_query("DELETE FROM `" . POST_CATEGORY . "` WHERE `post_id`='{$id}'"); foreach ($category as $cat) { mysql_query("INSERT INTO `" . POST_CATEGORY . "`(`post_id`, `category_id`) VALUES ('{$id}','{$cat}')"); }
foreach ($tagarr as $eachtag) { add_tag($eachtag); } header("location:user_post.php?updatesuccess&edit={$id}"); } //Link Post if (isset($_POST['edit_post_link'])) { $id = $_GET["edit"]; $name = $_POST['name']; $category = $_POST['category']; $shortdesc = trim($_POST["shortdesc"]) != "" ? $_POST['shortdesc'] : string_sorter($_POST['desc'], 500); $tags = $_POST['tags']; $status = isset($_POST["edit_submit_link"]) ? "publish" : "draft"; //Adding General information $form_data = array('name' => mysql_real_escape_string(stripcslashes($name)), 'short_description' => mysql_real_escape_string(stripcslashes($shortdesc)), 'tags' => mysql_real_escape_string(stripcslashes($tags)), 'last_update' => date("Y-m-d H:i:s"), 'status' => $status); UpdateData(POST, $form_data, "WHERE slno = '{$id}'"); //Updating Category $categories = get_cat_arr_id($id); $catforremove = array_diff($categories, $category); $catforadd = array_diff($category, $categories); foreach ($catforremove as $cat) { mysql_query("DELETE FROM `" . POST_CATEGORY . "` WHERE `post_id`='{$id}' AND `category_id`='{$cat}'"); } foreach ($catforadd as $cat) { mysql_query("INSERT INTO `" . POST_CATEGORY . "`(`post_id`, `category_id`) VALUES ('{$id}','{$cat}')"); } //Updating meta update_post_meta($id, "meta_title", mysql_real_escape_string($name)); update_post_meta($id, "meta_description", mysql_real_escape_string($shortdesc)); //Updating Tags To database $tagarr = explode(",", $tags);
<?php include "config/config.php"; include "include/function.php"; include "include/logincheck.php"; if (isset($_POST['submit'])) { $id = $_GET['id']; $permalink = str_replace(" ", "-", trim(strtolower($_POST['title']))); $form_data = array('title' => mysql_real_escape_string($_POST['title']), 'category' => mysql_real_escape_string($_POST['category']), 'permalink' => mysql_real_escape_string($permalink), 'desctiption' => stripcslashes(mysql_real_escape_string($_POST['description'])), 'image' => "", 'meta_title' => mysql_real_escape_string($_POST['mata_title']), 'meta_tag' => mysql_real_escape_string($_POST['mata_keywords']), 'meta_desc' => mysql_real_escape_string($_POST['mata_description']), 'status' => $_POST['publish'], 'last_modified' => date("Y-m-d H:i:s")); UpdateData(FAQ, $form_data, "WHERE slno = " . $id . ""); header("location:edit-faq.php?id={$id}&updatesuccess"); } ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <meta charset="utf-8"/> <title><?php echo the_option("website_title"); ?> | Edit Faq</title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
function hideBlogComment($id) { $id = intval($id); if (!is_int($id)) { return false; } UpdateData('blog_comment', array('is_show' => 'n'), array('blog_comment_id' => $id)); return true; }
if ($_POST['mode'] == 'config') { $api_key = $_SESSION['evegate'][0]; $condition = " key_id = '{$api_key['key_id']}' "; $data = array(); $data['forward_mail'] = mysql_real_escape_string($_POST['email']); $filters['fromsent'] = $_POST['fromsent']; $filters['fromcorp'] = $_POST['fromcorp']; $filters['fromally'] = $_POST['fromally']; foreach ($_POST as $pk => $pw) { if (substr($pk, 0, 4) == 'sub_') { $lid = substr($pk, 4); $filters[$lid] = 1; } } $data['filters'] = serialize($filters); UpdateData($data, 'api_keys', $condition); $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$api_key['key_id']}' AND v_code = '{$api_key['v_code']}' "); $_SESSION['evegate'][0] = $api_key; $_SESSION['evegate']['loggedin'] = 1; } if ($_POST['mode'] == 'login') { $_POST['vcode'] = mysql_real_escape_string($_POST['vcode']); $_POST['keyid'] = mysql_real_escape_string($_POST['keyid']); $api_key = GetRow("SELECT * FROM api_keys WHERE key_id = '{$_POST['keyid']}' AND v_code = '{$_POST['vcode']}' "); //if not in db, try to register if (!$api_key['key_id']) { $url = 'https://api.eveonline.com/account/APIKeyInfo.xml.aspx?keyID=' . $_POST['keyid'] . '&vCode=' . $_POST['vcode']; $xml_object = simplexml_load_string(file_get_contents($url)); $xml_array = object2array($xml_object); $characterID = $xml_array["result"]["key"]["rowset"]["row"]["@attributes"]["characterID"]; $characterNAME = getUserNameByID($characterID);
<?php include "config/config.php"; include "include/function.php"; include "include/logincheck.php"; if (isset($_POST['submit'])) { if ($_POST['parent'] == "0") { $label = '0'; } else { $cat_arr = get_the_category($_POST['parent']); $label = intval($cat_arr['label']) + 1; } $id = $_GET['id']; $form_data = array('name' => $_POST['name'], 'desc' => mysql_real_escape_string(stripslashes($_POST['desc'])), 'parent' => $_POST['parent'], 'label' => $label); UpdateData(CATEGORY, $form_data, "WHERE slno = " . $id . ""); if ($_FILES["pic"]["name"] != "") { $s = image_upload($_FILES["pic"]["tmp_name"], $_FILES["pic"]["name"], 'logo_' . $id, '../images/category_image/'); mysql_query("UPDATE `" . CATEGORY . "` SET `image`='{$s}' WHERE `slno`='{$id}'"); } add_log_admin("Post Category {$_POST['name']}{{" . $id . "}} is updated"); header("location:edit-post-category.php?id={$id}&editsuccess"); } ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->