<?php /************************************************************************************************************* #Coder : Kapil Verma #Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($name, 'req', 'Please Enter Page Title'); $obj->add_fields($desc, 'req', 'Please Enter Description'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>"; } else { if (trim($slug)) { $slug = makeAlias($slug); } else { $slug = makeAlias($name); } if (trim($metatitle)) { $metatitle = $metatitle; } else { $metatitle = $name; } $_SESSION['success_msg'] = 'New page has been saved successfully.';
{ $page=1; } else { $page = $_GET['page']; }*/ $perpage = 10; require_once "pagination.php"; if ($_SESSION["admin_user"] == "" || $_SESSION["admin_role"] == 1) { redirect(SITE_ADM . "login.php"); } if (isset($_POST['action'])) { extract($_POST); $obj = new validation(); $obj->add_fields($project_title, 'req', 'Please enter Project Title'); $obj->add_fields($project_title, 'min=4', 'Project Title should be atleast 4 characters long'); $obj->add_fields($project_title, 'max=25', 'Project Title should not be more than 25 characters long'); $obj->add_fields($short_blurb, 'req', 'Name should not be more than 25 characters long'); $obj->add_fields($short_blurb, 'min=4', 'Short Blurb should be atleast 4 characters long'); $obj->add_fields($short_blurb, 'max=50', 'Short Blurb should not be more than 25 characters long'); $obj->add_fields($project_location, 'req', 'Please enter Location'); $obj->add_fields($project_description, 'req', 'Please Enter Project Description'); $obj->add_fields($project_description, 'min=4', 'Project Description should be atleast 4 characters long'); $obj->add_fields($project_description, 'max=250', 'Project Description should not be more than 25 characters long'); $error = $obj->validate(); } if (isset($_POST['action']) && $_POST['action'] == 'edit') { extract($_POST); if ($description == '') { redirect(SITE_ADM . "project_update.php?msg=EDITEMPTY");
#Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); $path = LIST_ROOT . '/images/home/banner/'; #Code to Fetch page category data #END $publish = 1; /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($tabtitle, 'req', 'Please Enter Tab Title'); if ($id == "") { $obj->add_fields($tabtitle, 'uniquevalue', 'Please Enter Unique Tab Title', array('content_page', "tab_title='" . mysql_real_escape_string($tabtitle) . "' and page_name= 'Logistique'")); } else { $obj->add_fields($tabtitle, 'uniquevalue', 'Please Enter Unique Tab Title', array('content_page', "tab_title='" . mysql_real_escape_string($tabtitle) . "' and page_name= 'Logistique' and id!=" . $id)); } $obj->add_fields($content, 'req', 'Please Enter Content'); if (!isset($_GET['id'])) { $obj->add_fields($_FILES['file']['name'], 'req', 'Please Upload Banner Image'); } $obj->add_fields($_FILES['file'], 'ftype=jpg,gif,png', 'Please Upload Valid Banner Image'); if ($_FILES['file']['name'] != "") { $obj->add_fields($_FILES['file'], "imgwh=251,207", "Please Upload Valid Banner Image(251pxX207px)"); } $error = $obj->validate(); if ($error) {
<?php /************************************************************************************************************* #Coder : Kapil Verma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($name, 'req', 'Please Enter Name'); $obj->add_fields($position, 'req', 'Please Enter Status Number'); $obj->add_fields($short, 'req', 'Please Enter Short Description'); $obj->add_fields($desc, 'req', 'Please Enter Description'); $error = $obj->validate(); $devicesInfo = $objCommon->read('status', "name='{$name}' and id != '{$id}'"); if (mysql_num_rows($devicesInfo)) { $error .= "Name already exists"; } $devicesInfo = $objCommon->read('status', "position='{$position}' and id != '{$id}'"); if (mysql_num_rows($devicesInfo)) { $error .= "<br/>Status Number already defined"; } if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $dataArr = array('name' => ucfirst($name), 'active' => $active, 'short_description' => $short, 'long_description' => $desc, 'position' => $position); $update_Article = $objCommon->update("status", $dataArr, "id = '{$id}'"); unset($objCommon);
$target_file = "standardlimit"; if (!isset($_GET) || !isset($_GET['page']) || $_GET['page'] < 1) { $_GET['page'] = 1; } require_once "pagination.php"; if ($_SESSION["admin_user"] == "") { header('location: login.php'); } if ($_SESSION["admin_role"] == 1) { header('location: home.php'); } if (isset($_POST['action'])) { extract($_POST); $obj = new validation(); //$obj->add_fields($standardaffiliated, 'req', 'This field is required.'); $obj->add_fields($standardcommission, 'req', 'This field is required.'); //$obj->add_fields($standardwithdrawl, 'req', 'This field is required.'); //$obj->add_fields($standardaffiliated, 'num,max=6', 'Please Enter only number'); $obj->add_fields($standardcommission, 'num,max=6', 'Please Enter only number'); //$obj->add_fields($standardwithdrawl, 'num,max=6', 'Please Enter only number'); //$obj->add_fields($wlimit, 'lte=1', 'Please Enter valid number'); $error = $obj->validate(); } if (isset($_GET) && isset($_GET['action']) && $_GET['action'] == 'edit') { $std_edit_qry = mysql_fetch_assoc($con->recordselect("SELECT * FROM smallprojectamount")); } // Form Post code start if (isset($_POST['action']) && ($_POST['action'] == 'add' || $_POST['action'] == 'edit')) { extract($_POST); //$standardaffiliated = addslashes($standardaffiliated); $standardcommission = addslashes($standardcommission);
#Coder : Kapil Verma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_product = new common(); $obj = new validation(); $obj_handle = new Handle(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; //$obj->add_fields($name, 'req', 'Please Enter Product-Name'); if ($name == '') { $obj->add_fields($name, 'req', 'Please Enter Sub Category Name'); } else { $result = $obj_product->numberOfRows(TBL_MEMBER, 'name = "' . $name . '" AND cat_id=' . $cat_id . ' AND sub_cat_id =' . $sub_cat_id); } $obj->add_fields($cat_id, 'req', 'Please Select Product Category'); $obj->add_fields($sub_cat_id, 'req', 'Please Select Product Sub Category'); $error = $obj->validate(); if ($error || $result > 0) { if ($result > 0) { $error .= "Product already Exist in selected Category."; } $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { if ($_FILES['logo']['name']) { $logo = $currentTimestamp . '_' . $_FILES['logo']['name']; move_uploaded_file($_FILES['logo']['tmp_name'], LIST_ROOT_ADMIN . "/products_manager/upload/" . $logo);
<?php require_once "../../includes/config.php"; $title = "Reset Password"; $meta = array("description" => "Reset Password", "keywords" => "Reset Password"); if ($_GET["email"] && $_GET["actCode"] != "") { if (isset($_POST["submitResetpass"])) { extract($_POST); $obj = new validation(); $obj->add_fields($newpass, 'req', ER_PSW); $obj->add_fields($newpass, 'min=6', 'Enter Password atleast 6. characters long'); $obj->add_fields($newpass, 'max=25', 'Password should not be more than 25 characters long'); $obj->add_fields($newpass, 'alphanumUD', "Passord" . ER_ALPHANUM); $obj->add_fields($cnewpass, 'req', ER_CPSW); $obj->add_fields($cnewpass, 'alphanumUD', "Confirmed passord" . ER_ALPHANUM); $error = $obj->validate(); $passwd = ''; /*if( preg_match('`[A-Z]`',$passwd) // at least one upper case && preg_match('`[a-z]`',$passwd) // at least one lower case && preg_match('`[0-9]`',$passwd) // at least one digit ) { echo "hi"; } else { $_SESSION['msgType'] = array('from'=>'user', 'type'=>'error', 'var'=>"multiple",'val'=>"The password must contain a minimum of one lower case character. one upper case character, one digit."); } */ if ($newpass != $cnewpass) { $_SESSION['msgType'] = array('from' => 'user', 'type' => 'error', 'var' => "multiple", 'val' => ER_SAMEPSW);
#Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); $path = LIST_ROOT . '/images/home/banner/'; #Code to Fetch page category data #END $publish = 1; /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($category_id, 'req', 'Please Select Category'); $obj->add_fields($title, 'req', 'Please Enter Title Name'); $obj->add_fields($content, 'req', 'Please Enter Content'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { /*save category*/ $slug = str_replace(' ', '_', strtolower($title)); $dataArr = array('category_id' => $category_id, 'title' => $title, 'content' => $content, 'slug' => $slug); if ($id == "") { $categoryInsert = $obj_setting->save('news_articles', $dataArr); } else { $categoryInsert = $obj_setting->update('news_articles', $dataArr, "id=" . $id); } $_SESSION['success_msg'] = 'Successfully Saved';
$obj = new validation(); $currentTimestamp = getCurrentTimestamp(); #Code to Fetch seleted ID's data $fetchSetting = $obj_setting->read('template', ' id = 1'); $getSetting = $db->fetchNextObject($fetchSetting); $email = $getSetting->email; $subject = $getSetting->subject; $template = $getSetting->template; $next_date = $getSetting->next_date; extract($_POST); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); #saving data in database after validation if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($email, 'req', 'Please Enter Email'); $obj->add_fields($email, 'email', 'Please Enter A Valid Email'); $obj->add_fields($subject, 'req', 'Please Enter Subject'); $obj->add_fields($template, 'req', 'Please Enter Template'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $_SESSION['success_msg'] = 'Template has been edited successfully.'; $dataArr = array('email' => $email, 'subject' => $subject, 'template' => $template, 'next_date' => $next_date, 'mail_date' => $currentTimestamp); $update_site = $obj_setting->update('template', $dataArr, ' id=1'); echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/template/reminder/index.php' . $addToUrl . '";</script>'; exit; } } unset($obj_setting);
<?php /************************************************************************************************************* #Coder : Kapil Verma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($car_name, 'req', 'Please Enter Car Name'); $obj->add_fields($_FILES['image']['name'], 'req', "Please upload file."); if ($_FILES['image']['name']) { $obj->add_fields($_FILES['image'], 'ftype=png,jpg,gif', "Please upload png,jpg,gif file."); $obj->add_fields($_FILES['image'], 'imgwh=667,327', "Please upload Image with dimension 667px X 327px."); $obj->add_fields($_FILES['image'], 'fsize=1048576', 'Please Upload Image of size less than 1mb '); } $error = $obj->validate(); $devicesInfo = $objCommon->read('car_gallery', "car_name='{$car_name}'"); if (mysql_num_rows($devicesInfo)) { $error .= "Car Name already exists"; } if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $filename = time() . $_FILES['image']['name']; $dataArr = array('car_name' => ucfirst($car_name), 'status' => $status, 'image_name' => $filename); set_time_limit(0); $docDestination = LIST_ROOT . '/gallery/' . $filename;
} // Delete Image code start if (isset($_GET['action']) && $_GET['action'] == 'delete') { /*$qry="UPDATE image SET status=0 WHERE id='".$_GET['id']."'"; $con->update($qry); redirectPage(SITE_ADM."image.php?msg=DEL"); */ } // Delete Image code end // Form Post code start if (isset($_POST['action'])) { print_r($_POST); exit; extract($_POST); $obj = new validation(); if ($action == 'add') { $obj->add_fields($con_key, 'req', ER_KEY); } $obj->add_fields($con_value, 'req', ER_VALUE); $error = $obj->validate(); if ($error == '') { if ($action == 'add') { $insert = "INSERT INTO image (con_key,con_value,status,created) VALUES('" . $con_key . "','" . $con_value . "','" . $status . "','" . date("Y-m-d H:i:s") . "')"; $con->insert($insert); $msg = 'ADD'; } else { if ($action == 'edit') { $update = "UPDATE image SET con_value='" . $con_value . "', status='" . $status . "' WHERE id='" . $id . "'"; $con->update($update); $msg = 'EDIT'; } }
<?php /************************************************************************************************************* #Coder : Kapil Verma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); $stats = $objCommon->read('status', '', 'position ASC'); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($title, 'req', 'Please Enter Title'); $obj->add_fields($fees, 'req', 'Please Enter Amount'); $obj->add_fields($fees, 'currency', 'Please Enter a valid Amount'); $obj->add_fields($status_id, 'req', 'Please Select Associated Status'); $obj->add_fields($desc, 'req', 'Please Enter Description'); $error = $obj->validate(); $devicesInfo = $objCommon->read('upsell', "title='{$title}' and id != '{$id}' "); if (mysql_num_rows($devicesInfo)) { $error .= "Title already exists"; } if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $dataArr = array('title' => ucfirst($title), 'status' => $status, 'fees' => number_format($fees, 2), 'status_id' => $status_id, 'desc' => $desc); $update_Article = $objCommon->update("upsell", $dataArr, "id = {$id}"); unset($objCommon); $_SESSION['msg'] = 'Successfully Updated'; echo '<script>location.href="' . DEFAULT_URL . '/admin/upsell/index.php";</script>';
<?php require_once "../includes/config.php"; $pagetitle = "Small Project Amount"; require_once DIR_FUN . 'validation.class.php'; if ($_SESSION["admin_user"] == "") { header('location: login.php'); } if ($_SESSION["admin_role"] == 1) { header('location: home.php'); } if (isset($_POST['action'])) { extract($_POST); $obj = new validation(); $obj->add_fields($amount, 'req', 'Please Enter Small Project Amount'); $obj->add_fields($amount, 'num,max=6', 'Please Enter only number'); $error = $obj->validate(); } // Form Post code start if (isset($_POST['action']) && $_POST['action'] == 'edit') { extract($_POST); $amount = is_numeric($amount) ? $amount : 0; if ($_POST['action'] == 'edit' && $error == '') { $con->update("UPDATE smallprojectamount SET amount='{$amount}' WHERE id=1"); header('location: small_project.php?msg=RECSUC'); } } // Form Post code end //select query code start $sel_small_project_amount = mysql_fetch_array($con->recordselect("SELECT * FROM smallprojectamount WHERE id=1")); //select query code end
<?php /************************************************************************************************************* #Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $commonFunction = new commonFunction(); $obj = new validation(); #Code to Fetch page category data if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($category_name, 'req', 'Please Enter Category Name'); if ($id == "") { $obj->add_fields($category_name, 'uniquevalue', 'Please Enter Unique Category Name', array('news_category', "category_name='" . mysql_real_escape_string($category_name) . "'")); } else { $obj->add_fields($category_name, 'uniquevalue', 'Please Enter Unique Category Name', array('news_category', "category_name='" . mysql_real_escape_string($category_name) . "' and id!=" . $id)); } $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { /*save category*/ $slug = $commonFunction->url_slug(strtolower($category_name)); $dataArr = array('category_name' => htmlentities($category_name), 'slug' => $slug); if ($id == "") { $categoryInsert = $obj_setting->save('news_category', $dataArr); } else { $categoryInsert = $obj_setting->update('news_category', $dataArr, "id=" . $id);
#Coder : Kapil Verma #Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); #Code to Fetch page category data #END $publish = 1; /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($_FILES['topbanner'], 'ftype=jpg,gif,png', 'Please Upload Valid Top Banner'); $obj->add_fields($_FILES['topbanner'], "imgwh=1250,300", "Please Upload Valid Top Banner(1250pxX00px)"); $obj->add_fields($_FILES['sidebanner'], 'ftype=jpg,gif,png', 'Please Upload Valid Side Banner'); $obj->add_fields($_FILES['sidebanner'], "imgwh=145,350", "Please Upload Valid Side Banner(145pxX350px)"); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>{$error}</font>"; } else { /*save real facts section content*/ if ($_FILES['topbanner']['name'] != "") { $image_name = time() . $_FILES['topbanner']['name']; $path = LIST_ROOT . '/images/presentation/'; move_uploaded_file($_FILES["topbanner"]["tmp_name"], $path . $image_name); } else { $image_name = $oldtopimage; }
/************************************************************************************************************* #Coder : Keshav Sharma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_block = new common(); $obj = new validation(); $obj_handle = new Handle(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($title, 'req', 'Please Enter Title'); $error = $obj->validate(); $image = ''; //--------------------------------------------// if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { if ($_FILES["logo"]["name"]) { $type = explode(".", $_FILES["logo"]["name"]); if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") { $image = getCurrentTimestamp() . '-' . $_FILES["logo"]["name"]; //chmod(DEFAULT_ADMIN_URL."/images/brands",0777); move_uploaded_file($_FILES["logo"]["tmp_name"], LIST_ROOT_ADMIN . "/images/brands/" . $image); } } $dataArr = array('title' => $title, 'logo' => $image, 'publish' => $publish, 'creation_date' => $currentTimestamp);
<?php extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($email, 'req', 'Please email address'); $obj->add_fields($email, 'email', 'Please valid email address'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>' .{$error}. '</font>"; } else { if (exists($email)) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>Email Address already added.</font>"; } else { $_SESSION['success_msg'] = 'New Email address has been saved successfully.'; $dataArr = array('email' => $email); $update_site = $obj_setting->save('notification_emails', $dataArr); echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/email_noti/view.php";</script>'; exit; } } } function exists($email) { $rsObj = mysql_query("SELECT id FROM `notification_emails` WHERE `email` = '" . $email . "'"); if (mysql_num_rows($rsObj) > 0) {
<?php extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($ip_address, 'req', 'Please Enter Page Title'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>"; } else { if (!filter_var($ip_address, FILTER_VALIDATE_IP)) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>Please enter a valid IP Address.</font>"; } else { if (ip_exists($ip_address)) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>IP address already exists.</font>"; } else { $_SESSION['success_msg'] = 'New IP address has been saved successfully.'; $dataArr = array('ip_address' => $ip_address); $update_site = $obj_setting->save(TBL_IP, $dataArr); echo '<script>location.href="' . DEFAULT_ADMIN_URL . '/ip/view.php";</script>'; exit; } } } } function ip_exists($ip_address)
<?php /************************************************************************************************************* #Coder : Kapil Verma #Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($content, 'req', 'Please Enter Content'); $obj->add_fields($_FILES['topbanner'], 'ftype=jpg,gif,png', 'Please Upload Valid Banner'); $obj->add_fields($_FILES['topbanner'], "imgwh=1250,300", "Please Upload Valid Banner(1250pxX00px)"); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>{$error}</font>"; } else { /*save media content*/ if ($_FILES['topbanner']['name'] != "") { $image_name = time() . $_FILES['topbanner']['name']; $path = LIST_ROOT . '/images/pages/media/'; move_uploaded_file($_FILES["topbanner"]["tmp_name"], $path . $image_name); } else { $image_name = $oldtopimage; } $dataArr = array('page_name' => 'media', 'content' => $content, 'banner_image' => $image_name); $aboutus_insert = $obj_setting->update('content_page', $dataArr, "id=16"); $_SESSION['success_msg'] = 'Successfully Saved';
$tbl_nm = "admin"; $target_file = "admin.php"; if (!isset($_GET) || !isset($_GET['page']) || $_GET['page'] < 1) { $_GET['page'] = 1; } require_once "pagination.php"; if (!isset($_SESSION['admin_user']) || $_SESSION["admin_user"] == "") { redirect(SITE_ADM . "login.php"); } if (isset($_SESSION['admin_role']) && ($_SESSION["admin_role"] == 1 || $_SESSION["admin_role"] == -1)) { redirect(SITE_ADM . "home.php?msg=ACCDENIED"); } if (isset($_POST) && isset($_POST['action'])) { extract($_POST); $obj = new validation(); $obj->add_fields($adminname, 'req', 'Please enter Name'); $obj->add_fields($adminname, 'username', 'Please enter valid Name'); $obj->add_fields($adminname, 'min=4', 'Name should be atleast 4 characters long'); $obj->add_fields($adminname, 'max=25', 'Name should not be more than 25 characters long'); $obj->add_fields($adminname, 'alphanumUD', "username" . ER_ALPHANUM); $obj->add_fields($adminemail, 'req', 'Please enter Email'); $obj->add_fields($adminemail, 'email', 'Enter valid Email Address'); $obj->add_fields($password, 'req', ER_PSW); $obj->add_fields($password, 'min=6', 'Enter Password atleast 6. characters long'); $obj->add_fields($password, 'max=25', 'Password should not be more than 25 characters long'); $obj->add_fields($cpassword, 'req', ER_CPSW); $error = $obj->validate(); $adminname = addslashes($adminname); $adminemail = addslashes($adminemail); $admin_name_old = mysql_fetch_array($con->recordselect("SELECT `username`,`email` FROM `admin` WHERE id = '" . $_GET['id'] . "'")); $old = $admin_name_old['username'];
<?php /************************************************************************************************************* #Coder : Kapil Verma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($title, 'req', 'Please Enter Title'); $obj->add_fields($fees, 'req', 'Please Enter Amount'); $obj->add_fields($fees, 'currency', 'Please Enter a valid Amount'); // $obj->add_fields($desc, 'req', 'Please Enter Description'); $error = $obj->validate(); $devicesInfo = $objCommon->read('fees', "title='{$title}' and id != '{$id}' "); if (mysql_num_rows($devicesInfo)) { $error .= "Title already exists"; } if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $dataArr = array('title' => ucfirst($title), 'status' => $status, 'fees' => number_format($fees, 2)); $update_Article = $objCommon->update("fees", $dataArr, "id = {$id}"); unset($objCommon); $_SESSION['msg'] = 'Successfully Updated'; echo '<script>location.href="' . DEFAULT_URL . '/admin/fees/index.php";</script>'; exit; }
$obj->add_fields($drivetrain, 'req', 'Please Select Drivetrain%%drivetrain'); if ($drivetrain == "other") { $obj->add_fields($drivetrain_other, 'req', 'Please Enter Drivetrainr%%drivetrain_other'); } $obj->add_fields($doors, 'req', 'Please Select Doors%%doors'); if ($doors == "other") { $obj->add_fields($doors_other, 'req', 'Please Enter Doors%%doors_other'); } $obj->add_fields($wheelbase, 'req', 'Please Select Wheelbase%%wheelbase'); if ($wheelbase == "other") { $obj->add_fields($wheelbase_other, 'req', 'Please Enter Wheelbase%%wheelbase_other'); } $error_tab3 = $obj->validate(); unset($obj); $obj = new validation(); $obj->add_fields($features, 'req', 'Please Enter Features%%features'); $obj->add_fields($std_equip, 'req', 'Please Enter Standard Equipment%%std_equip'); $error_tab4 = $obj->validate(); unset($obj); if ($error_tab1 != '') { $errorMsges .= $error_tab1; } if ($error_tab2 != '') { $errorMsges .= $error_tab2; } if ($error_tab3 != '') { $errorMsges .= $error_tab3; } if ($error_tab4 != '') { $errorMsges .= $error_tab4; }
#Coder : Manoj Pandit *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_block = new common(); $obj = new validation(); $obj_handle = new Handle(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); /* Get list of all brands */ if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($brand_name, 'req', 'Please Enter Brand Name'); $obj->add_fields($year, 'req', 'Please Enter Year'); $obj->add_fields($year, 'num', 'Please Enter vaild Year'); $obj->add_fields($prix, 'req', 'Please Enter Prix'); $obj->add_fields($_FILES["image"]["name"], 'req', 'Please Upload Product Image'); if (!empty($_FILES["image"]["name"])) { $file_type = strtolower(end(explode(".", $_FILES["image"]["name"]))); if ($file_type == "png" || $file_type == "jpeg" || $file_type == "jpg" || $file_type == "gif") { $valid_file_type = 'yeap'; } else { $valid_file_type = ''; } $obj->add_fields($valid_file_type, 'req', 'Please upload image file only.'); } $error = $obj->validate(); //--------------------------------------------//
<?php extract($_POST); extract($_GET); $common = new common(); $emailQuery = mysql_query("select * from admins where id = 1"); $toemail = mysql_fetch_object($emailQuery); if ($submit_form != '' && $submit_form == "submitted" && $website == "") { $obj = new validation(); $error = ''; $obj->add_fields($fname, 'req', 'S\'il vous plaît Entrez le Nom'); $obj->add_fields($email, 'req', "S'il vous plaît Entrez l'adresse e-mail"); $obj->add_fields($email, 'email', "S'il vous plaît Entrez l'adresse e-mail valide"); $obj->add_fields($phone, 'req', "S'il vous plaît Entrez numéro de téléphone"); $obj->add_fields($phone, 'phone,us', "S'il vous plaît Entrez votre numéro de téléphone valide"); /*if($phone != ''){ $obj->add_fields($phone, 'phone,us', "S'il vous plaît Entrez votre numéro de téléphone valide"); }*/ $obj->add_fields($massage, 'req', "S'il vous plaît Entrez votre message"); $obj->add_fields($massage, 'min=2', "Message doit être d'au moins 2 caractères"); // $obj->add_fields($_POST['6_letters_code'], 'req', 'Please Enter Captcha Code'); //$obj->add_fields($message, 'max=100', 'Message should not be more than 100 characters long'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; $_SESSION['msg'] = $errorMsg; } else { $massage = htmlspecialchars_decode(htmlspecialchars($massage, ENT_NOQUOTES, "UTF-8")); $massage = str_replace("\\'", "'", $massage); $heading = $subject = "Contactez-nous reuest"; //send my mail
#Coder : Keshav Sharma *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_block = new common(); $obj = new validation(); $obj_handle = new Handle(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); /* Get list of all brands */ $brand_list = $obj_block->getbrand(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($model_name, 'req', 'Please Enter Model'); $obj->add_fields($brand_id, 'req', 'Please Select Brand'); $obj->add_fields($year, 'req', 'Please Enter Year'); $obj->add_fields($year, 'num', 'Please Enter vaild Year'); $obj->add_fields($prix, 'req', 'Please Enter Prix'); $error = $obj->validate(); //--------------------------------------------// if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $image = ''; if ($_FILES["image"]["name"]) { $type = explode(".", $_FILES["image"]["name"]); if (end($type) == "png" || end($type) == "jpeg" || end($type) == "jpg" || end($type) == "gif") { $image = getCurrentTimestamp() . '-' . $_FILES["image"]["name"]; //chmod(DEFAULT_ADMIN_URL."/images/used_car/image",0777);
#Coder : Kapil Verma #Description : This Code is used to update a particular product. *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); $obj_product = new common(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); $obj_handle = new Handle(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($name, 'req', 'Please Enter Group-Head Name'); $obj->add_fields($address, 'req', 'Please Enter Address'); $obj->add_fields($phone, 'req', 'Please Enter Phone No'); $obj->add_fields($phone, 'num', 'Please Enter Valid Phone No'); $obj->add_fields($phone, 'min=6', 'Please Enter Valid Phone No'); $obj->add_fields($phone, 'max=12', 'Please Enter Valid Phone No'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>" . $error . "</font>"; } else { $dataArr = array('name' => $name, 'address' => $address, 'phone' => $phone, 'status' => $publish, 'creation_date' => $currentTimestamp); $update_product = $obj_product->update(TBL_GHEAD, $dataArr, 'id=' . $prod_id); $_SESSION['msg'] = RECORD_UPDATE; redirectUrl(DEFAULT_ADMIN_URL . '/group_head/index.php'); //echo '<script>location.href="'.DEFAULT_ADMIN_URL.'/group_head/index.php";</script>'; exit;
#Coder : Kapil Verma #Description : This Code is used to Manage Pages *************************************************************************************************************/ extract($_GET); extract($_POST); $obj_setting = new common(); $obj = new validation(); #Code to Fetch page category data #END $publish = 1; /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; /*validate required fields*/ $obj->add_fields($content, 'req', 'Please Enter Content'); $error = $obj->validate(); if ($error) { $errorMsg = "<font color='#FF0000' family='verdana' size=2>Please fill all required fields.</font>"; } else { /*save welcome section content*/ $dataArr = array('content' => $content); $banner_insert = $obj_setting->update('editor_rows', $dataArr, "id=1"); $_SESSION['success_msg'] = 'Successfully Saved'; echo '<script>location.href="' . DEFAULT_URL . '/superadmin/home/welcome.php";</script>'; exit; } } /*Fetch welcome section content*/ $fetchSetting = $obj_setting->read('editor_rows', 'id = 1'); $getSetting = $db->fetchNextObject($fetchSetting);
extract($_POST); if (!isset($username)) { $username = ''; } if (!isset($emailid)) { $emailid = ''; } if (!isset($passwd)) { $passwd = ''; } if (!isset($cpasswd)) { $cpasswd = ''; } $err = false; $obj = new validation(); $obj->add_fields($username, 'req', ER_USER); $obj->add_fields($username, 'name', 'Please enter valid Name'); $obj->add_fields($username, 'min=4', 'Name should be atleast 4 characters long'); $obj->add_fields($username, 'max=25', 'Name should not be more than 25 characters long'); //$obj->add_fields($username, 'alphanumUD', "username".ER_ALPHANUM); $obj->add_fields($emailid, 'req', 'Enter Email Address'); $obj->add_fields($emailid, 'email', 'Enter valid Email Address'); $obj->add_fields($passwd, 'req', ER_PSW); $obj->add_fields($passwd, 'min=6', 'Enter Password atleast 6 characters long'); $obj->add_fields($passwd, 'max=25', 'Password should not be more than 25 characters long'); $obj->add_fields($cpasswd, 'req', ER_CPSW); //$obj->add_fields($txtTerms, 'req', 'Term & Condition Check required'); $error = $obj->validate(); if (isset($txtTerms) && $txtTerms != 1) { $txtTerms = 0; } else {
$headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html\r\n"; $headers .= FROMEMAILADDRESS; @mail(base64_decode($sel_project_backer_user['emailAddress']), $subject, $mailbody, $headers); } } $_SESSION['msgType'] = array('from' => 'user', 'type' => 'error', 'var' => "multiple", 'val' => "Update Added Successfully"); redirect(SITE_URL . "browseproject/" . $_GET['projectId'] . "/" . Slug($sel_project_name['projectTitle']) . "/&update=" . $num_of_rows . "#b"); } } if (isset($_POST['submitUpdate']) && isset($_GET['projectId']) && $_GET['projectId'] != '' && isset($_POST['operation']) && $_POST['operation'] != '') { //echo $_GET['projectId'];exit; //echo 'edit';exit; extract($_POST); $obj = new validation(); $obj->add_fields($updateTitle, 'req', 'Please Enter Title Of Update'); $error = $obj->validate(); if ($_POST['content'] == '') { $error .= "Please Enter Content" . '<br>'; } if ($_POST['content'] != '') { $sel_projectupdateno = mysql_fetch_assoc($con->recordselect("SELECT count(*) as total FROM projectupdate WHERE projectId='" . $_GET['projectId'] . "'")); $num_of_rows = $sel_projectupdateno['total'] + 1; $currentTime = time(); $textcontent = unsanitize_string($content); //$textcontent= trim(strip_tags($content)); //echo 'abc'.$updateTitle;exit; //echo 'aaaa'.$updateTitle;exit; //echo "UPDATE projectupdate SET updateTitle='".sanitize_string($updateTitle)."' AND updateDescription='".$textcontent."' WHERE projectupdateId='".$_GET['projectId']."'";exit; $con->update("UPDATE projectupdate SET updateDescription='' WHERE projectupdateId='" . $_GET['projectId'] . "'"); $con->update("UPDATE projectupdate SET updateDescription='" . addslashes($content) . "' WHERE projectupdateId='" . $_GET['projectId'] . "'");
#Description : This Code is used to update a particular product. *************************************************************************************************************/ extract($_GET); extract($_POST); $obj = new validation(); $obj_block = new common(); /* Get Current Date Time Stamp */ $currentTimestamp = getCurrentTimestamp(); $obj_handle = new Handle(); $brand_list = $obj_block->getbrand(); if (isset($submit) && $submit != "" && $_SERVER['REQUEST_METHOD'] == 'POST') { $error = ''; $obj->add_fields($title, 'req', 'Please Enter Brand Name'); $obj->add_fields($details_url, 'req', 'Please Enter Url'); // $obj->add_fields($details_url, 'url', 'Please Enter Valid Url'); if (empty($_FILES["image"]["name"]) && $old_image == '') { $obj->add_fields($_FILES["image"]["name"], 'req', 'Please Upload Product Image'); } $obj->add_fields($price, 'req', 'Please Enter Price'); $obj->add_fields($price, 'num', 'Please Enter Numeric value'); if (!empty($_FILES["image"]["name"])) { $file_type = strtolower(end(explode(".", $_FILES["image"]["name"]))); if ($file_type == "png" || $file_type == "jpeg" || $file_type == "jpg" || $file_type == "gif") { $valid_file_type = 'yeap'; } else { $valid_file_type = ''; } $obj->add_fields($valid_file_type, 'req', 'Please upload image file only.');