<?php defined("USERC") || define("USERC", true); require_once "../common/users_common.php"; defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; // simple link: //http://www.shek.ir/portal/login/retrieval.php?dfgiouadsdfghhdsaedsrftdyfuriysg=R9WOdnX9GnWH3Yg3KaOuY0uRCr9DaG7PCO0Jnc1P2RUKEab5T2ZXjwe6OMzTUwpoxvqF if (get_user_from_cookie()) { header("Location: ../dashboard"); exit; } $argLength = strlen($_GET['dfgiouadsdfghhdsaedsrftdyfuriysg']); if ($_SERVER['REQUEST_METHOD'] !== "GET" || !isset($_GET['dfgiouadsdfghhdsaedsrftdyfuriysg']) || $argLength < 68) { header("Location:" . NOT_FOUND_URL); } $id = ""; for ($index = 38; $index < strlen($_GET['dfgiouadsdfghhdsaedsrftdyfuriysg']); $index += 38) { $id .= substr($_GET['dfgiouadsdfghhdsaedsrftdyfuriysg'], $index, 1); } if (!($meta = portal_get_user_meta(intval($id), "forget-email"))) { header("Location:" . NOT_FOUND_URL); exit; } $meta = explode("|", $meta); $date_create = date_create($meta[count($meta) - 1]); $date = date_format($date_create, "Y/m/d H:i:s"); if ($date < date("Y/m/d H:i:s", strtotime("-1 day"))) { echo "اعتبار درخواست بازیابی رمز عبور شما گذشته است."; exit; }
<?php defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; defined("FUNCTIONSOFADMIN") || define("FUNCTIONSOFADMIN", true); require_once "admin_funcs.php"; defined("FUNCTIONSOFUSERS") || define("FUNCTIONSOFUSERS", true); require_once "user_funcs.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; if (!($user = get_user_from_cookie())) { header("Location: " . NOT_FOUND_URL); exit; } if (get_user_level($user->ID) == 10) { if (!isset($_GET["ticketType"])) { $tickets = get_all_tickets(); } elseif (isset($_GET["user_id"])) { switch ($_GET["ticketType"]) { case "pending": $tickets = get_user_pending_tickets(get_id($_GET["user_id"])); break; case "answered": $tickets = get_user_answered_tickets(get_id($_GET["user_id"])); break; case "closed": $tickets = get_user_closed_tickets(get_id($_GET["user_id"])); break; default: header("Location:" . NOT_FOUND_URL); exit;
require_once "../common/get_user.php"; defined("FUNCTIONSOFADMIN") || define("FUNCTIONSOFADMIN", true); require_once "admin_funcs.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; defined("ORDERCLASS") || define("ORDERCLASS", true); require_once "../__Classes/class.order.php"; defined("FUNCTIONSOFUSERS") || define("FUNCTIONSOFUSERS", true); require_once "user_funcs.php"; if ($_SERVER["REQUEST_METHOD"] != "GET" || !isset($_GET["ioi"])) { header("Location: " . NOT_FOUND_URL); exit; } elseif (!($order = Order::get_order_by_id(get_id($_GET["ioi"])))) { header("Location: " . NOT_FOUND_URL); exit; } elseif (!($user = get_user_from_cookie()) || get_user_level($user->ID) != 10 && $user->ID != $order->get_related_user_id()) { header("Location: " . NOT_FOUND_URL); exit; } $departments = array(0 => "فروش", 1 => "پشتیبانی فنی", 2 => "بررسی سفارشات"); //TODO replace these with a function $tickets = get_order_tickets($id = get_id($order->get_fake_id())); $invoices = get_order_invoices(intval($id)); var_dump($id); $persian_numbers = array(1 => "اول", 2 => "دوم", 3 => "سوم", 4 => "چهارم", 5 => "پنجم", 6 => "ششم", 7 => "هفتم", 8 => "هشتم", 9 => "نهم"); ?> <html> <head> <title>مدیریت · مشاهده پروژه</title>
defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; defined("COMMONC") || define("COMMONC", true); require_once "../common/users_common.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; defined("FUNCTIONSOFUSERS") || define("FUNCTIONSOFUSERS", true); require_once "user_funcs.php"; if ($_SERVER["REQUEST_METHOD"] !== "GET") { header("Location: " . NOT_FOUND_URL); exit; } // id of this profile if (isset($_POST["ipi"])) { $page_id = get_id($_GET["ipi"]); } elseif ($user = get_user_from_cookie()) { $page_id = $user->ID; } else { header("Location: " . NOT_FOUND_URL); exit; } // If viewer is not an user member; $public_viewer = false; // If viewer is an admin member; $admin_viewer = false; if (!$user) { $public_viewer = true; } elseif (get_user_level($user->ID) == 10) { $admin_viewer = true; } //If profile id is not a valid id for a user, redirect to Not found page;
<?php defined("COMMONC") || define("COMMONC", true); require_once "../common/users_common.php"; defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; // TODO merge uploader with icon-upload file; if (!($viewer = get_user_from_cookie())) { header("Location: " . NOT_FOUND_URL); exit; } if (!isset($_POST["user"]) || !($user = get_user_with_id(get_id($_POST["user"])))) { header("Location: " . NOT_FOUND_URL); exit; } if ($_SERVER["REQUEST_METHOD"] != "POST") { header("Location: " . NOT_FOUND_URL); exit; } if ($meta = portal_get_user_meta($user->ID, "ticket-upload")) { $meta_array = explode("|", $meta); $date_obj = date_create($meta_array[count($meta_array) - 2]); $date = date_format($date_obj, "Y/m/d H:i:s"); if ($date < date("Y/m/d H:i:s", strtotime("-1 day"))) { $meta_array = array(); portal_update_user_meta($user->ID, "ticket-upload", ""); } // In one day each user can upload files less than 11 times; if ($meta_length = count($meta_array) >= 110) {
<?php defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; defined("FUNCTIONSOFADMIN") || define("FUNCTIONSOFADMIN", true); require_once "admin_funcs.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; defined("TICKETCLASS") || define("TICKETCLASS", true); require_once "../__Classes/class.Ticket.php"; defined("DISFUNCS") || define("DISFUNCS", true); require_once "../management/discounts_funcs.php"; if (!($user = get_user_from_cookie()) || get_user_level($user->ID) != 10) { header("Location: " . NOT_FOUND_URL); exit; } $user_names = get_users_username_and_id(); if (isset($_GET["rti"]) && ($ticket = Ticket::get_ticket_by_id(get_id($_GET["rti"])))) { $discount = get_discount_percent($ticket->get_order_value("discount")); } else { $discount = false; } ?> <html> <head> <title>مدیریت · ایجاد پروژه</title> <meta charset="UTF-8"> <?php
defined("DVALIDATIOR") || define("DVALIDATIOR", true); require_once "../common/data_validators.php"; defined("MYSQLCLASS") || define("MYSQLCLASS", true); require_once "../__Classes/class.MySQL.php"; defined("COMMONC") || define("COMMONC", true); require_once "../common/users_common.php"; defined("FAKE") || define("FAKE", true); require_once "../common/fake_handler.php"; require_once "../management/validator.php"; defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; if (!($user = get_user_with_id(get_id($_POST["user"]))) && !($user = get_user_from_cookie())) { exit; } if (!($changer = get_user_from_cookie()) && (get_user_level($changer->ID) != 10 || $changer->ID != $user->ID)) { exit; } // TODO alert and deny inputs with bad chars; if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["requestType"])) { switch ($_POST["requestType"]) { case "userChangePro": if (!isset($_POST["user"])) { $user_id = $user->ID; } else { $user_id = get_id($_POST["user"]); var_dump($user_id); } if (isset($_POST["firstName"])) { $first_name = string_corrector($_POST["firstName"]); if (!$first_name) {
<?php defined("CONF") || define("CONF", true); require_once "../config.php"; defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; defined("PVALID") || define("PVALID", true); require_once "../payment/validator.php"; defined("ORDERCLASS") || define("ORDERCLASS", true); require_once "../__Classes/class.order.php"; defined("TICKETCLASS") || define("TICKETCLASS", true); require_once "../__Classes/class.Ticket.php"; defined("DISFUNCS") || define("DISFUNCS", true); require_once "../management/discounts_funcs.php"; if (!($user = get_user_from_cookie()) || $_SERVER["REQUEST_METHOD"] != "POST") { header("Location: " . NOT_FOUND_URL); exit; } elseif ($request_type = $_POST['requestType']) { if ($request_type == "addOrder") { $owner = get_user_with_id(get_id($_POST['userName'])); if (!$owner) { echo "-2"; exit; } $creator_array = array("owner_id" => $owner->ID, "status" => 1, "price" => $_POST['price'], "installments" => $_POST['installs'], "discount" => $_POST['discount'], "expire_date" => $_POST['expire_date'], "title" => $_POST['title'], "description" => $_POST['description'], "conditions" => $_POST["steps"]); $order = new Order($creator_array); if ($create_result = $order->create() === true) { echo "1"; exit; } elseif ($create_result === false) { echo "0";
<?php defined("USERGETTER") || define("USERGETTER", true); require_once "../common/get_user.php"; if ($_SERVER["REQUEST_METHOD" != "POST"] || !isset($_POST["status"]) || !($user = get_user_from_cookie())) { header("Location:" . NOT_FOUND_URL); exit; } switch ($_POST["status"]) { case "failed": echo "پرداخت ناموفق بود"; echo "<br>"; echo "<a title='دشبورد' href='../dashboard'>بازگشت به ناحیه ی کاربری</a>"; break; case "unSuccessful": echo "عملیات ناموفق" . "<br>"; echo $_POST["mes"]; echo "<br>"; echo "<a title='دشبورد' href='../dashboard'>بازگشت به ناحیه ی کاربری</a>"; break; case "dissuasion": echo "شما پرداخت را کنسل کردید"; echo "<br>"; echo "<a title='دشبورد' href='../dashboard'>بازگشت به ناحیه ی کاربری</a>"; break; }