public function addfollowup($lead_id, $followup_date, $feedback)
 {
     $sql = "INSERT INTO `followup`(`lead_id`, `followup_date`,`feedback`) VALUES ({$lead_id},'{$followup_date}','{$feedback}')";
     $query = $this->db->prepare($sql);
     $temp = $query->execute();
     //        print_r(countFollowups($lead_id));
     if (intval(countFollowups($lead_id)->total) >= 8) {
         changeStatus($lead_id, 'expired');
     }
     return $temp;
 }
    }
    $rebid = isset($_REQUEST['rid']) && intval($_REQUEST['rid']) > 0 ? intval($_REQUEST['rid']) : 0;
    if (empty($rebid)) {
        sys_msg('非法操作', 1);
    }
    if (($rebate = rebateHave($rebid)) === false) {
        sys_msg('该返佣记录不存在!');
    }
    //获取所有可以结算的订单
    $sql = "update " . $GLOBALS['ecs']->table('order_info') . " set store_rebate_ispay=2 where store_rebate_id=" . $rebid . " and order_sn in(" . $_REQUEST['order_id'] . ")";
    $links[] = array('href' => 'supplier_store_rebate.php?act=list', 'text' => '查看本期佣金列表');
    if ($GLOBALS['db']->query($sql)) {
        //结算订单佣金日志记录
        $rebate_order = array('rebateid' => $rebid, 'username' => '平台方:' . $_SESSION['user_name'], 'type' => REBATE_LOG_ORDER, 'typedec' => '结算分销商(仓库)佣金', 'contents' => '订单id' . $_REQUEST['order_id'] . "佣金结算", 'addtime' => gmtime());
        $db->autoExecute($ecs->table('store_rebate_log'), $rebate_order, 'INSERT');
        if (changeStatus($rebid)) {
            //记录用户资金日志
            //修改佣金状态
            $db->query("update " . $ecs->table('store_rebate') . " set status=1 where rebate_id=" . $rebid);
            //修改佣金信息状态记录
            $rebate_list = array('rebateid' => $rebid, 'username' => '平台方:' . $_SESSION['user_name'], 'type' => REBATE_LOG_LIST, 'typedec' => '结算分销商(仓库)佣金', 'contents' => '佣金状态由冻结变可结算', 'addtime' => gmtime());
            $db->autoExecute($ecs->table('store_rebate_log'), $rebate_list, 'INSERT');
        }
        sys_msg($_LANG['act_ok'], 0, $links);
    } else {
        sys_msg('操作失败', 1, $links);
    }
} elseif ($_REQUEST['act'] == 'operate2') {
    $rebid = isset($_REQUEST['rid']) && intval($_REQUEST['rid']) > 0 ? intval($_REQUEST['rid']) : 0;
    if (empty($rebid)) {
        sys_msg('非法操作', 1);
Esempio n. 3
0
</a></td>
                            <td class="sorting_1"><a href="<?php 
        ITQ_BASE_URL;
        ?>
backend/product/editnew/<?php 
        echo $value['id'] . '/' . changeStatus($value['new']);
        ?>
"><?php 
        echo $value['new'] == 1 ? '<i class="glyphicon glyphicon-ok"></i>' : '<i class="glyphicon glyphicon-remove" style="color:red;"></i>';
        ?>
</a></td>
                            <td class="sorting_1"><a id="editpublish"  href="#" alt="<?php 
        ITQ_BASE_URL;
        ?>
backend/product/editpublish/<?php 
        echo $value['id'] . '/' . changeStatus($value['publish']);
        ?>
"><?php 
        my_string::getIcon($value['publish']);
        ?>
</a></td>
                            <td class="sorting_1"><?php 
        echo $value['view'];
        ?>
</td>
                            <td class="sorting_1"><?php 
        echo $value['fullname-created'];
        ?>
 </td>
                            <td class="sorting_1"><?php 
        echo $value['creattime'];
Esempio n. 4
0
function batchUpdate($list, $newstat)
{
    global $conn;
    global $var_staffid;
    $arr = split(",", $list);
    for ($i = 0; $i < count($arr); $i++) {
        changeStatus($arr[$i], $newstat);
    }
}
Esempio n. 5
0
 *  @author    eMagicOne <*****@*****.**>
 *  @copyright 2014-2015 eMagicOne
 *  @license   http://www.gnu.org/licenses   GNU General Public License
 */
require_once '../../../config/config.inc.php';
include_once 'functions.php';
$key = Tools::getValue('key');
$function = Tools::getValue('call_function');
$push_ids = Tools::getValue('push_ids');
$value = Tools::getValue('value');
if (!isAuthenticated($key)) {
    die(Tools::jsonEncode('Authentication error'));
}
if ($function && function_exists($function)) {
    if ($function == 'changeStatus') {
        echo changeStatus($push_ids, $value);
    } elseif ($function == 'deleteDevice') {
        echo deleteDevice($push_ids);
    } else {
        echo call_user_func($function);
    }
} else {
    die(Tools::jsonEncode('error'));
}
function isAuthenticated($key)
{
    $login_data = unserialize(Configuration::get('MOBASSISTANTCONNECTOR'));
    if (hash('sha256', $login_data['login'] . $login_data['password'] . _COOKIE_KEY_) == $key) {
        return true;
    }
    return false;
Esempio n. 6
0
function cron_change_status()
{
    global $javconfig;
    $total_vote_spam = $javconfig['systems'] ? $javconfig['systems']->get('total_vote_spam', 0) : 0;
    if ($total_vote_spam) {
        $model_items = JModel::getInstance('items', 'javoiceModel');
        $model_status = JModel::getInstance('voicetypesstatus', 'javoiceModel');
        $model_actionslog = JModel::getInstance('actionslog', 'javoiceModel');
        $where = " AND (i.number_spam + i.number_duplicate + i.number_inapproprivate) >= {$total_vote_spam} ";
        $items = $model_items->getItems($where, ' i.id', 0, 1000);
        $count = count($items);
        if ($count > 0) {
            for ($i = 0; $i < $count; $i++) {
                $item = $items[$i];
                $status_old = $model_status->getItem($item->voice_type_status_id);
                $status_id = $javconfig['systems'] ? $javconfig['systems']->get('status_spam_' . $item->voice_types_id, 0) : 0;
                $status = changeStatus($item, $status_id, $model_status);
                if ($status) {
                    changeLog($item->voice_types_id, $item->id, $model_items);
                    $details = JText::_("CHANGE_THE_STATUS_OF_VOICES");
                    if ($status_old) {
                        $details .= " " . JText::_("FROM") . " " . $status_old->title;
                    }
                    $details .= " " . JText::_("TO") . " " . $status->title;
                    $model_actionslog->makeLog(-1, 'Report spam', $details, $item->id, time());
                }
            }
        }
    }
}
Esempio n. 7
0
//var_dump($input);
//$user_id = $_SESSION['user_id'];
//$employeeType = $_SESSION['employee_type'];
$employeeType = 'cem';
$user_id = 6;
$SR_id = intval($route['2']);
if ($route[2] == 'picked' || $route[2] == 'match' || $route[2] == 'meeting' || $route[2] == 'demo' || $route[2] == 'done' || $route[2] == 'open' || $route[2] == '24hours') {
    $status = $route['2'];
    serviceRequestView($status, $user_id, $db_handle);
} elseif (is_int($SR_id)) {
    if ($route['3'] == 'pick') {
        pickServiceRequest($SR_id, $user_id, $db_handle);
    } elseif ($route['3'] == 'add_note') {
        addNote($input, $SR_id, $user_id, $db_handle, $employeeType);
    } elseif ($route['3'] == 'change_status') {
        changeStatus($input, $SR_id, $user_id, $db_handle);
    } elseif ($route['3'] == 'add_meeting') {
        addMeeting($input, $SR_id, $user_id, $db_handle);
    } elseif ($route['3'] == 'add_worker') {
        $workerFName = $input->root->first_name;
        $workerAge = $input->root->age;
        $workerPhone = $input->root->phone;
        $sql = "SELECT id, first_name, last_name, phone FROM bluenethack_v0.workers WHERE age='{$workerAge}' AND phone = '{$workerPhone}' AND first_name = '{$workerFName}' ;";
        $worker = mysqli_query($db_handle, $sql);
        $workerRow = mysqli_fetch_array($worker);
        if (mysqli_num_rows($workerRow) == 0) {
            //echo getcwd(); die();
            include_once "/var/www/html/api_bluenet/apis/inc_workers/add_worker_function.php";
            $new_worker_id = addNewWorker($input, $user_id, $db_handle);
            if ($route['4'] == '1') {
                $sql = "UPDATE bluenethack_v0.service_request SET match_id = '{$new_worker_id}', last_updated = CURRENT_TIMESTAMP WHERE id='{$SR_id}';";
Esempio n. 8
0
        echo number_format($value['totalmoney']);
        ?>
</td>
                        <td><?php 
        echo $value['time'];
        ?>
</td>
                        <td><?php 
        echo $value['ip'];
        ?>
</td>
                        <td><a href="<?php 
        ITQ_BASE_URL;
        ?>
backend/cart/editstatus/<?php 
        echo $value['id'] . '/' . changeStatus($value['status']);
        ?>
"><?php 
        echo $value['status'] == 1 ? '<i class="glyphicon glyphicon-ok"></i>' : '<i class="glyphicon glyphicon-remove" style="color:red;"></i>';
        ?>
</a></td>
                        <td><a href="backend/cart/del/<?php 
        echo $value['id'];
        ?>
" onclick="confirm('Xóa yêu giỏ hàng')">Xóa</a></td>
                    </tr>
                <?php 
    }
}
?>
<?php

$var_staffid = $_SESSION["sess_staffid"];
if ($_POST["postback"] == "CS") {
    changeStatus($_POST["id"], $_POST["newstat"]);
    $var_message = MESSAGE_STATUS_CHANGED;
} elseif ($_POST["postback"] == "CA") {
    $var_list = "";
    for ($i = 0; $i < count($_POST["chk"]); $i++) {
        $var_list .= "'" . mysql_real_escape_string($_POST["chk"][$i]) . "',";
    }
    $var_list = substr($var_list, 0, -1);
    batchUpdate($var_list, $_POST["changeto"]);
    $var_message = MESSAGE_STATUS_CHANGED;
}
if ($_GET["mt"] == "y") {
    $var_numBegin = $_GET["numBegin"];
    $var_start = $_GET["start"];
    $var_begin = $_GET["begin"];
    $var_num = $_GET["num"];
    $var_styleminus = $_GET["styleminus"];
    $var_stylename = $_GET["stylename"];
    $var_styleplus = $_GET["styleplus"];
} elseif ($_POST["mt"] == "y") {
    $var_numBegin = $_POST["numBegin"];
    $var_start = $_POST["start"];
    $var_begin = $_POST["begin"];
    $var_num = $_POST["num"];
    $var_styleminus = $_POST["styleminus"];
    $var_stylename = $_POST["stylename"];
    $var_styleplus = $_POST["styleplus"];
<?php

session_start();
require '../model/db.php';
$order = $_POST['order'];
$total = $_POST['total'];
if (isset($_POST['approve'])) {
    changeStatus($order, 25000.0, 2);
    echo '<script language="javascript">
                    alert("Status Changed to Approve !!");
                    window.location="' . SERVER . '/admin";
                  </script>';
} elseif (isset($_POST['unapprove'])) {
    changeStatus($order, 0.0, 4);
    echo '<script language="javascript">
                    alert("Status Changed to Unapprove !!");
                    window.location="' . SERVER . '/admin";
                  </script>';
} elseif (isset($_POST['complete'])) {
    changeStatus($order, $total, 3);
    echo '<script language="javascript">
                    alert("Status Changed to Complete !!");
                    window.location="' . SERVER . '/admin";
                  </script>';
}
Esempio n. 11
0
$type = $_POST['type'];
$data = $_POST['data'];
if ($type == "saveTeam") {
    saveTeam($data);
}
if ($type == "getCompletedChallenges") {
    getCompletedChallenges($data);
}
if ($type == "loadRounds") {
    loadRounds();
}
if ($type == "changeChallangesNumber") {
    changeChallangesNumber($data);
}
if ($type == "changeStatus") {
    changeStatus($data);
}
if ($type == "loadTeams") {
    loadTeams($data);
}
if ($type == "loadPlayers") {
    loadPlayers($data);
}
if ($type == "loadUsers") {
    loadUsers();
}
if ($type == "addPlayer") {
    addPlayer($data);
}
if ($type == "loadChalleneges") {
    loadChalleneges();
Esempio n. 12
0
<?php

include_once '../include/headers.php';
include_once '../include/dbutils.php';
include_once '../include/main.php';
include_once 'domain/orders.php';
db_connect();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $request_payload = file_get_contents('php://input');
    //var_dump($request_payload);
    $json = json_decode($request_payload);
    if (isset($_GET['update'])) {
        $value = updateInfo($json);
    } else {
        if (isset($_GET['validate'])) {
            $value = validate($json);
        } else {
            if (isset($_GET['updateProductAmount'])) {
                $value = updateProductAmount($json);
            } else {
                $value = changeStatus($json);
            }
        }
    }
    //return JSON array
    exit(json_encode($value));
}
Esempio n. 13
0
</td>
                                </tr>
                                <tr>
                                    <td class="col-lg-3">IP đặt hàng</td>
                                    <td><?php 
echo $cartdata['ip'];
?>
</td>
                                </tr>
                                <tr>
                                    <td class="col-lg-3">trạng thái</td>
                                    <td><a href="<?php 
ITQ_BASE_URL;
?>
backend/cart/editstatus/<?php 
echo $cartdata['id'] . '/' . changeStatus($cartdata['status']);
?>
"><?php 
echo $cartdata['status'] == 1 ? '<i class="glyphicon glyphicon-ok"></i>' : '<i class="glyphicon glyphicon-remove" style="color:red;"></i>';
?>
</a></td>
                                </tr>
                                <?php 
foreach ($dataproduct as $key => $value) {
    ?>
                                <tr>
                                    <td class="col-lg-3">Tên sản phẩm :<?php 
    $title = $this->Mitq_product->get_Title_Byid($value->id);
    echo $title['title'];
    ?>
</td>
Esempio n. 14
0
    $pid = $_POST['pid'];
    $approve = $_POST['puzzApprove'];
    setPuzzApprove($uid, $pid, $approve);
    header("Location: " . URL . "/puzzle.php?pid={$pid}");
    exit(0);
}
if (isset($_POST['setPuzzPriority'])) {
    $pid = $_POST['pid'];
    $priority = $_POST['puzzPriority'];
    setPuzzPriority($uid, $pid, $priority);
    header("Location: " . URL . "/puzzle.php?pid={$pid}");
    exit(0);
}
if (isset($_POST['killPuzzle'])) {
    $pid = $_POST['pid'];
    changeStatus($uid, $pid, getDeadStatusId());
    header("Location: " . URL . "/puzzle.php?pid={$pid}");
    exit(0);
}
if (isset($_POST['setflag'])) {
    $pid = $_POST['pid'];
    $flag = $_POST['flag'];
    if ($flag) {
        setFlag($uid, $pid, 1);
    } else {
        setFlag($uid, $pid, 0);
    }
    header("Location: " . URL . "/puzzle.php?pid={$pid}");
    exit(0);
}
if (isset($_POST['markunseen'])) {
Esempio n. 15
0
$list->addData(load_grid());
$list->addSearch($name);
$table_grid = new Canvas();
$table_grid->setClass("tableTableDetailMain");
$id = new InputNumeric();
$name = new InputText();
$name->setClass("inputTitle");
/*
$status   = new InputBoolean();
$status->setLabelCaption("Status");
$status->setLabelPosition("Left");
*/
$statusLabel = new Label();
$statusLabel->setCaption("Done");
$statusLabel->setClass("inputcommon");
$statusLabel->onTap(changeStatus());
/*
$statusButton = new ButtonBar();
$statusButton -> setCaption("change");
//$statusButton -> setImage("img/ico_thumb.png");
$statusButton -> setClass("buttonform");
$statusButton -> onTap(changeViewType());
*/
$table_list = new Table();
$table_list->addControl($name, 1, 1, 1, 4, "Left", "Middle");
$table_list->addControl($statusLabel, 1, 2, 1, 1, "Right", "Middle");
//$table_list -> addControl($status,1,3,1,1,"Right","Middle");
//$table_list -> addControl($statusButton,1,4,1,1,"Right","Middle");
$table_grid->addPosition($table_list, "0%", "100%", "0", "50dip", "0%", "100%");
$table_grid->onTap(detail());
$table_grid->onLongTap(delete());