Ejemplo n.º 1
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $category_id = $_POST['id'];
    $category = $_POST['category'];
}
//updating the selected values
if (isset($category)) {
    $result = $manageData->updateValueWhere("coupon_category", "category", $category, "id", $category_id);
}
header("Location: ../../couponCategoryList.php");
Ejemplo n.º 2
0
    //photo_name variable saves the image location
    $photo_name2 = "img/" . $result_upload_2nd;
} else {
    $photo_name2 = "";
}
if (!empty($photo3)) {
    //3rd other image upload
    $result_upload_3rd = $uploadFile->upload_file('slider_3rd', 'photo3', '../../../img/');
    //photo_name variable saves the image location
    $photo_name3 = "img/" . $result_upload_3rd;
} else {
    $photo_name3 = "";
}
//updating the selected values
if (isset($heading1)) {
    $result = $manageData->updateValueWhere("slider_content", "heading", $heading1, "id", 1);
}
if (isset($link1)) {
    $result = $manageData->updateValueWhere("slider_content", "link", $link1, "id", 1);
}
if (isset($description1)) {
    $result = $manageData->updateValueWhere("slider_content", "description", $description1, "id", 1);
}
if (isset($photo_name1) && !empty($photo_name1)) {
    $result = $manageData->updateValueWhere("slider_content", "image", $photo_name1, "id", 1);
}
if (isset($heading2)) {
    $result = $manageData->updateValueWhere("slider_content", "heading", $heading2, "id", 2);
}
if (isset($link2)) {
    $result = $manageData->updateValueWhere("slider_content", "link", $link2, "id", 2);
Ejemplo n.º 3
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from url
$order_id = $_GET['o_id'];
if (!empty($order_id)) {
    //calling method for undo payment confirmation
    $result = $manageData->updateValueWhere("purchase_log", "delivery_status", 1, "order_id", $order_id);
}
header("Location: ../../orderDetails.php?o_id={$order_id}");
Ejemplo n.º 4
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from get value
$value = $_GET['value'];
$id = $_GET['id'];
//getting current date
$getdate = getdate();
$date = $getdate['year'] . "-" . $getdate['mon'] . "-" . $getdate['mday'];
//updating the selected values
if (isset($id)) {
    if ($value == 1) {
        $result = $manageData->updateValueWhere("product_table", "expiration_date", $date, "id", $id);
    } else {
        $result = $manageData->updateValueWhere("product_table", "expiration_date", "0000-00-00", "id", $id);
    }
}
header("Location: ../../listProducts.php");
Ejemplo n.º 5
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//include class mail
include '../library/class.mail.php';
$mail = new Mail();
//taking the values from url
$order_id = $_GET['o_id'];
if (!empty($order_id)) {
    //setting payment request value
    $value = "Progressing";
    //calling method for money distribution
    $result = $manageData->updateValueWhere("purchase_info", "payment_request", $value, "order_id", $order_id);
}
//getting current date
$getdate = getdate();
$date = $getdate['year'] . "-" . $getdate['mon'] . "-" . $getdate['mday'];
//change date format
$change_date = explode("-", $date);
$curdate = $change_date[2] . "-" . $change_date[1] . "-" . $change_date[0];
$year = $getdate['year'];
//getting invoice no
$invoice = $manageData->getLastValue("purchase_log", "*", "invoice_no");
//separating year from invoice no and increase the value by 1
$new_no = sprintf("%05s", substr($invoice[0]['invoice_no'], 5) + 1);
$new_invoice_no = $year . "-" . $new_no;
//update invoice no and date
$updateinvoice = $manageData->updateValueWhere("purchase_log", "invoice_no", $new_invoice_no, "order_id", $order_id);
Ejemplo n.º 6
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $id = $_POST['id'];
    $name = $_POST['name'];
    $link = $_POST['link'];
}
//updating the selected values
if (isset($name) && !empty($name)) {
    $result = $manageData->updateValueWhere("footer_content", "name", $name, "id", $id);
}
if (isset($link)) {
    $result = $manageData->updateValueWhere("footer_content", "link", $link, "id", $id);
}
header("Location: ../../listFooterLinks.php");
Ejemplo n.º 7
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from get value
$id = $_GET['id'];
//updating the selected values
if (isset($id)) {
    $result = $manageData->updateValueWhere("product_table", "status", 0, "id", $id);
}
header("Location: ../../listProducts.php");
Ejemplo n.º 8
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $old_password = $_POST['old_password'];
    $new_password = $_POST['new_password'];
    $confirm_new_password = $_POST['confirm_new_password'];
}
//checking the values with database values
if ($new_password == $confirm_new_password) {
    $database_pass = $manageData->getValueWhere("admin_info", "*", "id", 1);
    if ($old_password == $database_pass[0]['password']) {
        //update password field
        $update = $manageData->updateValueWhere("admin_info", "password", $new_password, "id", 1);
        $_SESSION['p_msg'] = 'Password Changes Successfully';
        header("Location: ../../changePwd.php");
    } else {
        $_SESSION['p_msg'] = 'old password does not match';
        header("Location: ../../changePwd.php");
    }
} else {
    $_SESSION['p_msg'] = 'password and confirm password field do not match';
    header("Location: ../../changePwd.php");
}
Ejemplo n.º 9
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
$membership_id = $_GET['m_id'];
$validiation_value = $_GET['validiation'];
//terminate membership validiation
$result = $manageData->updateValueWhere("member_table", "membership_activation", $validiation_value, "membership_id", $membership_id);
header("Location:../../upgradeMembershipValidiation.php?membership_id=" . $membership_id);
Ejemplo n.º 10
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
$id = $_GET['id'];
$action = $_GET['action'];
//action for enable or disable
$result = $manageData->updateValueWhere("footer_content", "status", $action, "id", $id);
header("Location:../../listFooterLinks.php");
Ejemplo n.º 11
0
$expiration_date = date('Y-m-d', strtotime('+1 years'));
//make membership_id as username of the user
$username = $email_id;
//inserting values in member_table
$result = $managedata->insertMember($name, $email_id, $dob, $gender, $contact_no, $address, $city, $postal_code, $state, $country, $username, $password, $membership_id, $date, $expiration_date);
//inserting membership id in mlm_table
$result_mlm = $manageData->insertMembershipId($membership_id, $date);
//checking for valid senior membership id
if (isset($Senior_id) && !empty($Senior_id) && $result_mlm == 1) {
    //finding id value of memberdhip_id
    $member_id = $manageData->getValueWhere("mlm_info", "id", "membership_id", $membership_id);
    //getting child ids of senior id
    $child_id = $manageData->getValueWhere("mlm_info", "*", "membership_id", $Senior_id);
    //update parent id value of new member
    if (!empty($child_id[0]['id'])) {
        $update_parent_id = $manageData->updateValueWhere("mlm_info", "parent_id", $child_id[0]['id'], "membership_id", $membership_id);
    }
    //adding child id value
    if ($child_id[0]['child_id'] != "") {
        $new_child_id = $child_id[0]['child_id'] . "," . $member_id[0]['id'];
    } else {
        $new_child_id = $member_id[0]['id'];
    }
    //update child_id value of senior member
    $update_child_id = $manageData->updateValueWhere("mlm_info", "child_id", $new_child_id, "membership_id", $Senior_id);
}
$_SESSION['memberId'] = $membership_id;
$mail->getDataForRegistration($email_id, $membership_id);
//update membership activation field
//$update_field = $manageData->updateValueWhere("member_table","membership_activation",1,"membership_id",$membership_id);
header("Location: ../../addFreeMember.php");
Ejemplo n.º 12
0
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $product_id = $_POST['product_id'];
    $product_name = $_POST['product_name'];
    $description = $_POST['description'];
    $price = $_POST['price'];
    $discount = $_POST['discount'];
    $stock = $_POST['stock'];
}
//fetching the id value of database
$table_id = $manageData->getValueWhere("membership_product", "id", "product_id", $product_id);
$id = $table_id[0]['id'];
//updating the selected values
if (isset($product_name)) {
    $result = $manageData->updateValueWhere("membership_product", "product_name", $product_name, "id", $id);
}
if (isset($description)) {
    $result = $manageData->updateValueWhere("membership_product", "product_description", $description, "id", $id);
}
if (isset($price)) {
    $result = $manageData->updateValueWhere("membership_product", "price", $price, "id", $id);
}
if (isset($discount)) {
    $result = $manageData->updateValueWhere("membership_product", "discount", $discount, "id", $id);
}
if (isset($stock)) {
    $result = $manageData->updateValueWhere("membership_product", "stock", $stock, "id", $id);
    if ($stock > 5) {
        $result = $manageData->updateValueWhere("membership_product", "status", 1, "id", $id);
    } else {
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $description1 = $_POST['description1'];
    $description2 = $_POST['description2'];
}
if (isset($description1)) {
    $result = $manageData->updateValueWhere("invalid_member_content", "description", $description1, "id", 1);
}
if (isset($description2)) {
    $result = $manageData->updateValueWhere("invalid_member_content", "description", $description2, "id", 2);
}
header("Location: ../../editInvalidMemberContent.php");
Ejemplo n.º 14
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//include class mail
include '../library/class.mail.php';
$mail = new Mail();
//taking the values from form
if (isset($GLOBALS['_POST'])) {
    $id = $_POST['id'];
    $amount = $_POST['amount'];
}
//getting member details
$member_id = $manageData->getValueWhere("addmoney_info", "*", "id", $id);
$member_details = $manageData->getValueWhere("member_table", "*", "membership_id", $member_id[0]['membership_id']);
//updating the selected values
$result = $manageData->updateValueWhere("addmoney_info", "amount", $amount, "id", $id);
$result1 = $manageData->updateValueWhere("addmoney_info", "status", 1, "id", $id);
//sending mail to the member
$mailsent = $mail->confirmationOfAddMoney($member_details[0]['email_id'], $member_id[0]['money_id'], $amount);
header("Location: ../../pending_add_money.php");
Ejemplo n.º 15
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from get value
$id = $_GET['id'];
//updating the selected values
if (isset($id)) {
    $result = $manageData->updateValueWhere("coupon_table", "status", 0, "id", $id);
}
header("Location: ../../listCoupon.php");
Ejemplo n.º 16
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $category_id = $_POST['id'];
    $category = $_POST['category'];
}
//updating the selected values
if (isset($category)) {
    $result = $manageData->updateValueWhere("product_category", "category", $category, "id", $category_id);
}
header("Location: ../../categoryList.php");
Ejemplo n.º 17
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $id = $_POST['id'];
    $text = $_POST['bottom_text'];
}
//updating the selected values
if (isset($text)) {
    $result = $manageData->updateValueWhere("footer_content", "bottom_text", $text, "id", $id);
}
header("Location: ../../editFooterBottomText.php");
Ejemplo n.º 18
0
        foreach ($category as $cate) {
            $category_string = $category_string . "," . $cate;
        }
    }
    /*
    - remove the first word from the $category_string sa it
    - it contains a comma
    */
    $category_string = substr($category_string, 1);
}
//fetching the id value of database
$table_id = $manageData->getValueWhere("product_table", "id", "product_id", $product_id);
$id = $table_id[0]['id'];
//updating the selected values
if (isset($product_name)) {
    $result = $manageData->updateValueWhere("product_table", "product_name", $product_name, "id", $id);
}
if (isset($category_string) && !empty($category_string)) {
    $result = $manageData->updateValueWhere("product_table", "category", $category_string, "id", $id);
}
if (isset($description)) {
    $result = $manageData->updateValueWhere("product_table", "product_description", $description, "id", $id);
}
if (isset($references)) {
    $result = $manageData->updateValueWhere("product_table", "references", $references, "id", $id);
}
if (isset($price_guest)) {
    $result = $manageData->updateValueWhere("product_table", "price_guest", $price_guest, "id", $id);
}
if (isset($old_price)) {
    $result = $manageData->updateValueWhere("product_table", "old_price", $old_price, "id", $id);
Ejemplo n.º 19
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from url
$withdraw_order_id = $_GET['w_id'];
//approve the withdrawal request
$result = $manageData->updateValueWhere("withdraw_log", "status", 1, "withdraw_order_id", $withdraw_order_id);
header("Location: ../../pendingWithdrawal.php");
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from url
$order_id = $_GET['o_id'];
if (!empty($order_id)) {
    //calling method for undo payment confirmation
    $result = $manageData->updateValueWhere("purchase_info", "payment_request", "Undo", "order_id", $order_id);
    $delilvery_status = $manageData->updateValueWhere("purchase_log", "delivery_status", 0, "order_id", $order_id);
}
header("Location: ../../finalConfirmationByPaypal.php");
Ejemplo n.º 21
0
<?php

session_start();
//include the DAL library for the method to insert the details
include '../library/library.DAL.php';
$manageData = new manageContent_DAL();
//taking the values from form
if (isset($GLOBALS['_GET'])) {
    $id = $_GET['id'];
    $action = $_GET['action'];
}
//updating the selected values
$result = $manageData->updateValueWhere("mypage", "status", $action, "id", $id);
header("Location: ../../listmypage.php");