Esempio n. 1
0
            $sql = "UPDATE " . $dbTable['application'][$cateid] . " SET status='2' , isSpeedMatch='1' , speedmatchTime=NOW() WHERE id={$aid} ";
            // 	$sql = "UPDATE ".$dbTable['application'][$cateid]." SET isSpeedMatch='1' , speedmatchTime=NOW() WHERE id=$aid ";
            $msql->query($sql);
            $ps = " WHERE isSpeedMatch='1' AND speedmatchTime!='' AND id=" . $aid;
            $row = loaddata_row($dbTable['application'][$cateid], $ps);
            if ($row) {
                echo "OK";
                //已完成快速服務設定
            } else {
                echo "NOT";
                //快速服務設定失敗
            }
            exit;
        } elseif ($act == "getLastDesc") {
            $ps = " WHERE id={$aid} ";
            $row = loaddata_row($dbTable['application'][$cateid], $ps);
        } elseif ($act == "setSession") {
            if (!$_SESSION[$name]) {
                $_SESSION[$name] = $val;
            }
            echo "OK";
            exit;
        }
    }
}
/*
function send_confirm_mail($email,$confirmCodeReg,$do_sendmail=true){
	global $dbname,$firstname,$lastname,$sex;
	//====== 寄確認email給使用者 ======//
	$do_sendmail = true;
	if($do_sendmail){
Esempio n. 2
0
<?php

if (!isset($_SESSION)) {
    session_start();
}
//--- 讀入基本設定
include "function/function.php";
require 'libs/Smarty.class.php';
include "base_config.php";
$msql = new phpMysql_h();
$tool = new tools_h();
//--- 所屬功能
if ($id) {
    $sqlWhere = " WHERE id=" . $id;
    $row = loaddata_row("article", $sqlWhere);
    if ($row) {
        $sql = "UPDATE `article` SET views=views+1 WHERE id=" . $row['id'];
        $msql->init();
        $msql->query($sql);
    } else {
        // echo "<script>alert('請指定菜單');</script>";
        $tool->showmessage('無此文章!');
        $tool->goBack();
        exit;
    }
} else {
    // echo "<script>alert('請指定菜單');</script>";
    $tool->showmessage('無此文章!');
    $tool->goBack();
    exit;
}