Ejemplo n.º 1
0
 function ajax_update_f()
 {
     $this->auto_cartid();
     $id = $this->trans_lib->int("id");
     if (!$id) {
         sys_html2js($this->lang["cart_error_not_id"]);
     }
     $amount = $this->trans_lib->int("amount");
     $this->cart_m->update($id, $amount);
     sys_html2js('ok');
 }
Ejemplo n.º 2
0
<?php

/***********************************************************
	Filename: js/php/logout.php
	Note	: 退出会员操作
	Version : 3.0
	Author  : qinggan
	Update  : 2010-01-08
***********************************************************/
session_destroy();
sys_html2js('ok');
Ejemplo n.º 3
0
if ($ext_list && is_array($ext_list) && count($ext_list) > 0) {
    $optlist = array();
    $this->load_lib("phpok_input");
    $extlist_must = $extlist_need = array();
    foreach ($ext_list as $key => $value) {
        if (!$value["if_post"] && !$value["if_guest"]) {
            continue;
        }
        $_field_name = $value["identifier"];
        $value["default_val"] = $rs[$_field_name] ? $rs[$_field_name] : $value["default_val"];
        $extlist = $this->phpok_input_lib->get_html($value);
        $extlist_must[] = $extlist;
        if ($value["input"] == "opt") {
            $optlist[] = $value;
        }
        $ext_list[$key] = $value;
    }
    $this->tpl->assign("extlist_must", $extlist_must);
    $this->tpl->assign("optlist", $optlist);
    $this->tpl->assign("extlist", $ext_list);
}
$tplfile = "js_tpl/post_" . $m_rs["identifier"];
$chk_tplfile = ROOT . $this->tpl->tpldir . "/" . $tplfile . "." . $this->tpl->ext;
if (file_exists($chk_tplfile)) {
    $msg = $this->tpl->fetch($tplfile . "." . $this->tpl->ext);
    //$this->tpl->display($tplfile.".".$this->tpl->ext);
} else {
    $msg = $this->tpl->fetch("js_tpl/post_set." . $this->tpl->ext);
}
sys_html2js($msg);
Ejemplo n.º 4
0
 function datalink_f()
 {
     $mid = $this->trans_lib->int("mid");
     if (!$mid) {
         exit("false");
     }
     $rs = $this->module_m->get_one($mid);
     if (!$rs["link_id"] || !$rs["search_id"]) {
         sys_html2js("false");
     }
     $this->load_model("datalink");
     $rslist = $this->datalink_m->get_list($rs["link_id"]);
     if (!$rslist) {
         sys_html2js("false");
     }
     $t_rs = array();
     $t_rs["input"] = $rs["search_id"];
     foreach ($rslist as $key => $value) {
         if (!$value["pid"]) {
             $t_rs["parent"][] = $value;
         } else {
             $t_rs["son"][] = $value;
         }
     }
     sys_html2js($this->json_lib->encode($t_rs));
 }