コード例 #1
0
 public function editfile()
 {
     //$now = date('Y-m-d H:i:s');
     $data = DealersFiles::getOneFile($_GET['id']);
     $dealer = DealersMain::getOne($data['dealer']);
     View::plugin('files/edit', array('data' => $data, 'dealer' => $dealer, 'formpath' => 'acteditfile'));
 }
コード例 #2
0
 public static function files_new($dealer, $filename)
 {
     $dealer = DealersMain::getOne($dealer);
     self::send($dealer['emailreport'], 'Новый файл сайте www.' . self::site(), View::getPluginEmpty('email/files_new', array('dealer' => $dealer, 'file' => $filename)));
 }
コード例 #3
0
    public static function addOrder($dealerId, $status = 1)
    {
        DB::escapePost();
        $sql = 'INSERT INTO {{dealers_orders}}
			SET
				status=\'' . $status . '\',
				delivery=\'' . $_POST['delivery'] . '\',
				cons=\'' . $_POST['cons'] . '\',
				delivery_price=\'' . $_POST['delivery_price'] . '\',
				tracking=\'' . $_POST['tracking'] . '\',
				add_sale=\'' . $_POST['add_sale'] . '\',
				add_sale_text=\'' . $_POST['add_sale_text'] . '\',
				comment=\'' . $_POST['comment'] . '\',
				dealer=\'' . $dealerId . '\',
				cdate=NOW()
		';
        DB::exec($sql);
        $orderId = self::getLastOrderId($dealerId);
        $dealer = DealersMain::getOne($dealerId);
        self::addItemsToOrder($_POST['items'], $orderId);
        self::addHistory($orderId, $_POST['old_status'], $status);
    }