public function getValAction()
 {
     //        $op_id = isset($_GET["op_id"])                 ? $_GET["op_id"] : "";
     $op_id = $this->getRequest("op_id", "");
     // 1. parameter is not right
     if ($op_id === "") {
         $res = InfoDescUtil::getErrorMsg(InfoDescUtil::ERR_BAD_ARGS);
         QconfMgrLog::err(__FILE__, __LINE__, "parameter 'op_id' is null!");
         echo json_encode($res);
         return;
     }
     $data = OpServ::getMsgById($op_id);
     if ($data === FALSE) {
         $res = InfoDescUtil::getErrorMsg(InfoDescUtil::ERR_NODE_NOT_EXIST);
         QconfMgrLog::err(__FILE__, __LINE__, "parameter 'Node not exist'!");
         echo json_encode($res);
         return;
     }
     $res = array("errno" => "0", "errmsg" => "", "data" => $data);
     $json = json_encode($res);
     echo $json;
 }
Example #2
0
<?php

/*
echo OpServ::insert("1", "/dba/mdb", "bjdt,shht,lyct,zwt", "0", 60, 61, NULL, NULL) 
   . PHP_EOL;
*/
$b = OpServ::getMsgById("aefd7f5ef029282e703181abd479179e");
var_dump($b);
$b = OpServ::getMsgById("aefd7f5ef029282e703181abd479179f");
var_dump($b);
$b = OpServ::getMsgById("81546e565d6dfec7dc9bb22146dc43c6");
var_dump($b);
$b = OpServ::getMsgById("88c8d8ff1dbe5b271b494f6d168a4cd9");
var_dump($b);
/*
$b = OpServ::getMsgById("aabbcc");
var_dump($b);

$b = OpServ::listByCondition(NULL, "zhong'chao'", "", NULL, NULL);
var_dump($b);

$b = OpServ::listByCondition("/dba", NULL, NULL, NULL, NULL);
var_dump($b);

$b = OpServ::listByCondition(NULL, "zhong", NULL, NULL, NULL);
var_dump($b);

$b = OpServ::listByCondition(NULL, NULL, "zw", NULL, NULL);
var_dump($b);

$b = OpServ::listByCondition(NULL, NULL, NULL, 60, NULL);