Example #1
0
 /**
  * @descrpition 修改
  */
 public function edit()
 {
     if (Request::getRequest('dosubmit', 'str')) {
         $jumpUrl = '/admin.php/menu/edit/id-' . $this->param['id'];
         $fields = array();
         $fields['name'] = Request::getRequest('name', 'str');
         $fields['pid'] = Request::getRequest('pid', 'str');
         $fields['in_out'] = Request::getRequest('in_out', 'str');
         $fields['seo_title'] = Request::getRequest('seo_title', 'str');
         $fields['seo_description'] = Request::getRequest('seo_description', 'str');
         $fields['seo_keywords'] = Request::getRequest('seo_keywords', 'str');
         $fields['url'] = Request::getRequest('url', 'str');
         $fields['item'] = Request::getRequest('url', 'item');
         if (empty($fields['name'])) {
             View::showAdminErrorMessage($jumpUrl, '未填写完成');
         }
         $result = MenuBusiness::editMenu($this->param['id'], $fields);
         if ($result) {
             View::showAdminMessage('/admin.php/menu/lists', '添加成功');
         } else {
             View::showAdminErrorMessage($jumpUrl, '添加失败');
         }
     }
     $menuList = MenuBusiness::getMenuList();
     $menuList = Func::arrayKey($menuList);
     $blogMenuList = Func::categoryTree($menuList);
     $blogMenu = MenuBusiness::getMenu($this->param['id']);
     View::assign('blogMenu', $blogMenu);
     View::assign('blogMenuList', $blogMenuList);
     View::showAdminTpl('menu_edit');
 }
Example #2
0
 /**
  * @descrpition 修改
  */
 public function edit()
 {
     if (Request::getRequest('dosubmit', 'str')) {
         $jumpUrl = '/admin.php/itemdocmenu/edit/id-' . $this->param['id'];
         $fields = array();
         $fields['name'] = Request::getRequest('name', 'str');
         $fields['pid'] = Request::getRequest('pid', 'str');
         $fields['in_out'] = Request::getRequest('in_out', 'str');
         $fields['url'] = Request::getRequest('url', 'str');
         $fields['item'] = strtolower(Request::getRequest('item', 'item'));
         if (empty($fields['name']) || empty($fields['item'])) {
             View::showAdminErrorMessage($jumpUrl, '未填写完成');
         }
         $result = ItemDocMenuBusiness::editMenu($this->param['id'], $fields);
         if ($result) {
             View::showAdminMessage('/admin.php/itemdocmenu/lists', '修改成功');
         } else {
             View::showAdminErrorMessage($jumpUrl, '修改失败');
         }
     }
     $menuList = ItemDocMenuBusiness::getMenuList();
     $menuList = Func::arrayKey($menuList);
     $blogMenuList = Func::categoryTree($menuList);
     $blogMenu = ItemDocMenuBusiness::getMenu($this->param['id']);
     View::assign('blogMenu', $blogMenu);
     View::assign('blogMenuList', $blogMenuList);
     View::showAdminTpl('item_doc_menu_edit');
 }
 public static function receiveData()
 {
     /*{{{*/
     $r = new self();
     $params = array_keys(get_class_vars(__CLASS__));
     $request = new Request();
     foreach ($params as $param) {
         $r->{$param} = $request->getRequest($param, '');
     }
     $r->PASSWORD = LaKaLaConnector::MER_PASSWD;
     return $r;
 }
Example #4
0
 /**
  * @descrpition 检测队列权限
  * @return array|bool
  */
 public static function checkQueueAuth()
 {
     $key = urldecode(Request::getRequest('key', 'str'));
     $kid = Request::getRequest('kid', 'str');
     $logtime = Request::getRequest('logtime', 'str');
     $params = urldecode(Request::getRequest('params', 'str'));
     if (empty($kid) || empty($key) || $key != Func::madeQueueKey($kid, $logtime, $params)) {
         return false;
     }
     $params = json_decode(base64_decode($params), true);
     return array('kid' => $kid, 'params' => $params);
 }
 public function validateRequest(array $requiredParams)
 {
     $objUtilResponse = new Response();
     $objUtilRequest = new Request();
     if ($objUtilRequest->isPost()) {
         $accessKeyId = $objUtilRequest->getPost('access_key', false);
         $signature = trim($objUtilRequest->getPost('signature', false));
         $timestamp = $objUtilRequest->getPost('timestamp', false);
         // Required to generate variable signature
         $parameters = array('timestamp' => $timestamp);
         $allParamsPresent = true;
         foreach ($requiredParams as $paramName) {
             $paramValue = $objUtilRequest->getPost($paramName, false);
             if ($paramName) {
                 $parameters[$paramName] = $paramValue;
             } else {
                 $allParamsPresent = false;
                 break;
             }
         }
         if ($accessKeyId && $signature && $timestamp) {
             // Okay we have all required parameters
             // Let's identify user
             $requestParams = $objUtilRequest->getRequest();
             $objServerHelper = new ServerInfo();
             $url = $objServerHelper->serverUrl(true);
             $userSyncRestMdl = new \api\Server($parameters, $accessKeyId, null, $url);
             $isValidTimestamp = $userSyncRestMdl->isValidTimestamp($timestamp);
             if (!$isValidTimestamp) {
                 $objUtilResponse->renderJson(array('status' => 403, 'message' => 'Invalid Timestamp'), 403);
             }
             $userProductMdl = new \models\ApiProducts();
             $apiProductDetails = $userProductMdl->isValidAccessKey($accessKeyId);
             if ($apiProductDetails) {
                 // Valid access key
                 $userSyncRestMdl->setSecretKey($apiProductDetails->secret_key);
                 $isValidSignature = $userSyncRestMdl->isValidSignature($signature);
                 if ($isValidSignature === true) {
                     return $apiProductDetails;
                 } else {
                     $objUtilResponse->renderJson(array('status' => 403, 'message' => 'Invalid Signature'), 403);
                 }
             } else {
                 $objUtilResponse->renderJson(array('status' => 403, 'message' => 'Invalid access key.'), 403);
             }
         } else {
             $objUtilResponse->renderJson(array('status' => 403, 'message' => 'Required parameters are missing.'), 403);
         }
     } else {
         $objUtilResponse->renderJson(array('status' => 403, 'message' => 'Only post requests are accepted'), 403);
     }
 }
 public function validate()
 {
     $inputData = Request::getRequest();
     $formName = $inputData[FORM_NAME];
     $form = FormHelper::getModel($inputData[MODULE_PARAM], $formName);
     $validationRulesName = (string) $form->rulesClass;
     if (!$validationRulesName) {
         $validationRulesName = DEFAULT_FRAMEWORK_VALIDATION_RULES;
     }
     $validValidationFiles = array(APPLICATION_LIB_RULES_DIR . $validationRulesName . '.php', BASE_FORM_VALIDATION_RULES);
     // scan for the target validation rules file
     foreach ($validValidationFiles as $rulesFile) {
         if (is_file($rulesFile)) {
             break;
         }
     }
     require_once $rulesFile;
     $formData = $form->elements;
     if ($formData) {
         $formElements = $formData->element;
         $validation = new $validationRulesName();
         // iterator each attribute of a model and evaluation its validation rules
         foreach ($formElements as $formElement => $fieldElements) {
             // get validation rules
             $rules = $fieldElements->validation_rules;
             //print_r($rules);
             foreach ($rules as $ruleGroup) {
                 foreach ($ruleGroup as $rule) {
                     // cast the simple xml object to a string
                     $method = (string) $rule->method;
                     // validate this form element
                     $args = array($fieldElements, $rule, $inputData);
                     call_user_func_array(array($validation, $method), $args);
                 }
             }
         }
         $method = self::GET_ERRORS_METHOD;
         $errors = call_user_func_array(array($validationRulesName, $method), array());
         return $errors;
     }
 }
Example #7
0
 /**
  * @descrpition 修改
  */
 public function edit()
 {
     if (Request::getRequest('dosubmit', 'str')) {
         $jumpUrl = '/admin.php/friendlink/edit/id-' . $this->param['id'];
         $fields = array();
         $fields['name'] = Request::getRequest('name', 'str');
         $fields['url'] = Request::getRequest('url', 'str');
         $fields['nofollow'] = Request::getRequest('nofollow', 'int');
         if (empty($fields['name'])) {
             View::showAdminErrorMessage($jumpUrl, '未填写完成');
         }
         $result = FriendLinkBusiness::editFriendLink($this->param['id'], $fields);
         if ($result) {
             View::showAdminMessage('/admin.php/friendlink/lists', '添加成功');
         } else {
             View::showAdminErrorMessage($jumpUrl, '添加失败');
         }
     }
     $friendLink = FriendLinkBusiness::getFriendLink($this->param['id']);
     View::assign('friendLink', $friendLink);
     View::showAdminTpl('friend_link_edit');
 }
Example #8
0
 /**
  * Creates a new Bot.
  * @param string $url
  * @param Request|\stdClass $req
  */
 public function __construct($url, $req = null)
 {
     $this->url = $url;
     $this->req = $req instanceof Request ? $req : (isset($req) ? Request::map($req) : Request::getRequest());
     global $processors;
     foreach ($processors as $processor) {
         self::register($processor);
     }
     processors\Command::register($this, "help", (new \registerables\Command(function ($req, $args = null) {
         if (empty($args)) {
             $text = "*All commands are listed below:*\n";
             foreach ($this->command as $name => $value) {
                 $text .= "/" . $name . (!empty($value->syntax) ? ' `' . $value->syntax . '`' : '') . (!empty($value->description) ? ' ' . $value->description : '') . "\n";
             }
         } else {
             $name = strtolower(trim($args));
             $cmd = $this->command[$name];
             $text = '/' . $name . (!empty($cmd->syntax) ? ' `' . $cmd->syntax . '`' : '') . "\n" . (!empty($cmd->description) ? '*' . $cmd->description . '*' : '') . "\n" . (!empty($cmd->help) ? "" . $cmd->help : '');
         }
         return (new responses\Message($text, $req))->parse_mode("Markdown");
     }))->description("Prints the help message")->syntax("[command]")->help("Oh, hey! You found me! Here, have a cookie: " . json_decode('"\\ud83c\\udf6a"') . "\n" . "Used to send help for a specific command or list all commands."));
 }
Example #9
0
 /**
  * @descrpition 修改
  */
 public function edit()
 {
     if (Request::getRequest('dosubmit', 'str')) {
         $jumpUrl = '/admin.php/adminmenu/edit/id-' . $this->param['id'];
         $fields = array();
         $fields['name'] = Request::getRequest('name', 'str');
         $fields['pid'] = Request::getRequest('pid', 'str');
         $fields['in_out'] = Request::getRequest('in_out', 'str');
         $fields['class'] = Request::getRequest('class', 'str');
         $fields['action'] = Request::getRequest('action', 'str');
         $fields['url'] = Request::getRequest('url', 'str');
         if (empty($fields['name'])) {
             View::showAdminErrorMessage($jumpUrl, '未填写完成');
         }
         $result = $this->adminMenuObi->edit($this->param['id'], $fields);
         if ($result) {
             View::showAdminMessage('/admin.php/adminmenu/lists', '修改成功');
         } else {
             View::showAdminErrorMessage($jumpUrl, '修改失败');
         }
     }
     View::assign('editMenu', $this->menuList[$this->param['id']]);
     View::showAdminTpl('admin_menu_edit');
 }
Example #10
0
<?php
header('cache-control:no-cache');
require_once dirname(__FILE__).'/../init.php';
$request = new Request();

$enDoctorId = $request->getRequest('id');
$doctorId = Codec::getInstance()->decodeId($enDoctorId);
if ($doctorId) {
	$doctor = DAL::get()->find('doctor', $doctorId);
}

$from    = $request->from;
$txt     = $request->txt;
$laiyuan = $request->laiyuan;
$confirm = $request->confirm;
$ref     = $request->ref;
$user = UserClient::getInstance()->getCurrentUser();

if (!$laiyuan) $laiyuan = (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) ? " $_SERVER[HTTP_REFERER] " : "";
$refer = (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) ? " $_SERVER[HTTP_REFERER] " : "";

$fname  = $request->fname;
$tel    = $request->tel;
$mobtel = $request->mobtel;
$qq     = $request->qq;
$msn    = $request->msn;
$email  = $request->email;
$result = 0;
$source = 'http://www.'.URL_PREFIX.'haodf.com/senderr';

if ((strpos($refer, $source) !== false) && ($confirm == 1) && ($txt != ""))
Example #11
0
    /**
     * @param $html
     */
    public function appendRendarDebug(&$html)
    {
        $tmp = <<<'EOM'
{strip}
<style type="text/css">
    .pmp_debug{
        padding:60px 0 0 ;
    }
    .pmp_debug_area{
        font-size:12px;
        line-height:140%;
        position: fixed;
        left: 0;
        bottom:0;
        width: 100%;
        padding:0 0 0 60px;
        color:#fff;
        background: #555;
        border-top: solid 1px #333;
        z-index:10000;
    }
    .pmp_debug_menu{
        float: left;
        white-space: nowrap;
        border-right:solid 1px #888;
        position: relative;
    }
    .pmp_debug_menu .pmp_menu{
        padding: 12px 20px;
        display: block;
        cursor:pointer;
    }
    .pmp_debug_menu .pmp_menu_value{
        position: absolute;
        display: none;
        left: 0;
        bottom: 42px;
        background: #FFF;
        border:solid 1px #666;
        padding:20px;
        margin:0;
        z-index:10;
        list-style: none;
        min-width:500px;
        max-height:400px;
        overflow:auto;
        color:#333;
    }
    .pmp_debug_menu .pmp_menu_value li{
        padding:3px 0px;
        margin:0;
        border-top:solid 1px #CCC;
        list-style: none;
    }
    .pmp_debug_menu .pmp_menu_value li:first-child{
        border-top:none;
    }
    .pmp_debug_menu:hover .pmp_menu_value{
        display: block;
    }
</style>
<div class="pmp_debug">
<div class="pmp_debug_area">
    <div class="pmp_debug_menu">
        <div class="pmp_menu">Server</div>
        <ul class="pmp_menu_value">
        {foreach $SERVER as $key => $val}
        <li>{$key} : {if(is_array($val))}{dump($val)}{else}{$val}{/if}</li>
        {/foreach}
        </ul>
    </div>
    <div class="pmp_debug_menu">
        <div class="pmp_menu">Request</div>
        <ul class="pmp_menu_value">
        {foreach $REQUEST as $key => $val}
        <li>{$key} : {if(is_array($val))}{dump($val)}{else}{$val}{/if}</li>
        {/foreach}
        </ul>
    </div>
    <div class="pmp_debug_menu">
        <div class="pmp_menu">Get</div>
        <ul class="pmp_menu_value">
        {foreach $GET as $key => $val}
        <li>{$key} : {if(is_array($val))}{dump($val)}{else}{$val}{/if}</li>
        {/foreach}
        </ul>
    </div>
    <div class="pmp_debug_menu">
        <div class="pmp_menu">Session</div>
        <div class="pmp_menu_value">
        <pre>{dump($SESSION)}</pre>
        </div>
    </div>
</div>
</div>
{/strip}
EOM;
        $tp = new Template();
        // template value
        $tp->assign("SERVER", Request::getServer()->getVars());
        $tp->assign("REQUEST", Request::getRequest()->getVars());
        $tp->assign("GET", Request::getQuery()->getVars());
        $tp->assign("SESSION", $_SESSION);
        // template set
        $tp->setTemplateStr($tmp);
        $html = preg_replace("/(<\\/body>)/", $tp->get_display_template(true) . "\$1", $html);
    }
Example #12
0
            o.style.background='#FF0000';
	        o.onblur=function(){this.style.background='#FF0000'};
            o.select();
        }
    }
    if ('' != msg)
        alert(msg);
}

<?php
    $base = dirname(__FILE__);
    require($base.'/../assembly.php');
    DAL::get()->setUp('usercenter');

    $tmpRequest = new Request();
	$name = $tmpRequest->getRequest("username",'');
	$name = strtolower($name);
	$mobile = $tmpRequest->getRequest("mobile", '');
	
    if ($name)
    {
    	$user = UserClient::getInstance()->getByUserName($name);
        if ($user->isNull() == false) {
            print("checkresult('该用户已经存在, 请选择其他名字', 'username');");	
        } elseif (User::isUserNameValid($name) == false) {
            print("checkresult('该用户名不允许注册', 'username');");	
        } else {
            print("checkresult('', 'username');");	
        }
    }
    else if ($mobile)
<?php
require_once dirname(__FILE__).'/../init.php';
$request = new Request();
$request->getRequest('from');

$doctorId = Codec::getInstance()->decodeId($request->id);
if( empty($doctorId) ){
	MsgHtml::msg('网址错误,请从站内信内打开链接!');
}

$doctor = DAL::get()->find('doctor', $doctorId);
if( $doctor instanceof NullEntity ){
	MsgHtml::msg('网址错误,请从站内信内打开链接!');
}

$confirm = $request->confirm;

if($confirm == 1)
{
	$adviceContent = $request->adviceContent;
	
	if(empty($adviceContent)) {
		MsgHtml::msg('请填写变更信息', '', array('button'=>'back'));
	}
	
	$content = $doctor->hospitalfaculty->hospital->name.' '.$doctor->hospitalfaculty->name.' 人员变更信息'.chr(13).chr(10);
	$content .= $request->adviceContent;
	
	$result = UserClient::getInstance()->addUserAdvice('意见建议', $content, $doctorId);
	if( $result )
	{
Example #14
0
<?php

/*	Client script used by members_area.php.
*----------------------------------------------------------------------------
*	Original Author: Joshua Thompson
*	Creation Date: 11/16/2015
*
*	Modification Author: Joshua Thompson
*	Modification Date: 11/30/2015
*----------------------------------------------------------------------------
*/
// Required for the internal classes we use to retrieve data.
require_once 'scripts/classes.php';
// Determine if we're trying to submit a new request to the database.
if ((isset($_POST['request']) || isset($_GET['request'])) && isset($_POST['submit'])) {
    // Try to create the request, returning the approval code.
    if (!($app_code = Request::create($_SESSION['id'], $_POST['workType'], $_POST['experience'], $_POST['education'], $_POST['salary'], $_POST['zip'], $_POST['distance'], $_POST['candidates']))) {
        $message = "Error processing request. Please try again.";
    } else {
        $message = "The request has been submitted.<br />A contract manager will verify the request within 24 hours.<div id='approval_code' name='approval_code'>Confirmation Code: " . $app_code . "</div>";
    }
} elseif (isset($_POST['approval_code']) && isset($_POST['search'])) {
    if (!($request = Request::getRequest($_POST['approval_code'], $_SESSION['access']))) {
        $message = "No search results found.";
    }
}
Example #15
0
<?php
require_once dirname(__FILE__).'/../init.php';

$request = new Request();
$id= $request->getRequest('id', 0);
$f = new Chaos();
header('Content-Type: text/css');
if (strlen($id)<20) {
	echo $f->getCssContent($id);
} else {
	echo $f->getCssContent_old($id);
}
Example #16
0
<?php 
session_start();
require_once dirname(__FILE__).'/../init.php';
$request = new Request();
$confirm = $request->getRequest('confirm');

$name = $request->getRequest('name');
$age = $request->getRequest('age');
$area = $request->getRequest('area');
$pathology = $request->getRequest('pathology');
$metastasy  = $request->getRequest('metastasy');
$metastasy_position = $request->getRequest('metastasy_position');
$suolafeini = $request->getRequest('suolafeini');
$description = $request->getRequest('description');
$user = UserClient::getInstance()->getCurrentUser();
$result = 0;

$tab_left = "suggestion";
$result = 0;
if($confirm == 1){
	$recipients = "kefu@haodf.com";
	$title = "患者招募(".date("y-m-d H:i").")";
	$content = "";
	$content .= "来自".$_SERVER['REMOTE_ADDR']." 用户发送了病情介绍 , 内容如下:\n";
	$content .= "----------------------------------------------------------------------------\n";
	
    $content .= "项目:索拉菲尼耐药患者临床实验招募\n";
	$content .= "姓名:$name\n";
	$content .= "年龄:$age\n";
	$content .= "地区:$area\n";
	$content .= "病理检查是否是肝细胞癌:$pathology\n";
Example #17
0
<?php
require_once dirname(__FILE__).'/../init.php';

$request = new Request();
$doctorId = $request->getRequest('doctor_id', 4);

$doctor = DAL::get()->find('Doctor', $doctorId);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="http://i1.hdfimg.com/css/css.css?1303386395" rel="stylesheet" type="text/css" />
<link href="http://i1.hdfimg.com/css/frame.css?20131224" rel="stylesheet" type="text/css" />
<link href="http://i1.hdfimg.com/css/inside.css" rel="stylesheet" type="text/css" />
<title>给<?=$doctor->name?>大夫的感谢信</title>
<style type="text/css">
<!--
body {
	font-size: 12px;
	margin: 0px;
	padding: 0px;
	line-height: 20px;
}
a {
	color: black;
	text-decoration: none;
}
a.underline {
	text-decoration: underline;
}
Example #18
0
} else {
    //-----------------------------------------------------------------
    // INSTANCIAR UN OBJETO DE LA CLASE REQUEST PARA TENER DISPONIBLES
    // TODOS LOS VALORES QUE CONSTITUYEN LA PETICION E IDENTIFICAR
    // SI LA PETICION ES 'GET' O 'POST', ASI COMO EL CONTROLADOR Y
    // ACCION SOLICITADA.
    //-----------------------------------------------------------------
    switch ($rq->getMethod()) {
        case 'GET':
            $request = $rq->getParameters($app['path']);
            $request['METHOD'] = "GET";
            $controller = ucfirst($request[0]);
            $action = isset($request[1]) ? $request[1] : "";
            break;
        case 'POST':
            $request = $rq->getRequest();
            $request['METHOD'] = "POST";
            $controller = ucfirst($request['controller']);
            $action = $request['action'];
            break;
    }
    if (!$_SESSION['usuarioPortal']['Id']) {
        // No está logeado
        $controller = "Index";
        $action = "Login";
    }
}
// Validar que el controlador requerido exista.
// En caso contrario fuerzo el controlador Index
$fileController = "modules/" . $controller . "/" . $controller . "Controller.class.php";
if (!file_exists($fileController)) {
Example #19
0
 public static function create($id, $workType, $experience, $education, $salary, $zip, $distance, $potential_candidates)
 {
     $random_hash = md5(uniqid(rand(), true));
     $app_num = strtoupper(substr($random_hash, strlen($random_hash) % 2, 10));
     //connect to db server; select database
     require 'scripts/database_admin.php';
     $status = "VALID";
     $date = date('Y-m-d');
     $query = "INSERT INTO staffrequest (userID, workType, experience, education, salary, zipcode, distance, status, dateOpened, approvalNumber) VALUES ('{$id}', '{$workType}', '{$experience}', '{$education}', '{$salary}', '{$zip}', '{$distance}', '{$status}', '{$date}', '{$app_num}')";
     $connection->query($query);
     if (!($request = Request::getRequest($app_num, $_SESSION['access']))) {
         return false;
     }
     foreach ($potential_candidates as $candidate) {
         //connect to db server; select database
         require 'scripts/database_admin.php';
         $query = "INSERT INTO candidate (staffRequestID, staffID) VALUES ({$request->id}, {$candidate})";
         $connection->query($query);
     }
     return $app_num;
 }
Example #20
0
 /**
  * Description: 评分
  */
 public function score()
 {
     $articleId = Request::getRequest('article_id', 'int', 58);
     $score = Request::getRequest('score', 'int', 1);
     //判断参数
     if ($score != 1 && $score != 2) {
         View::showErrorMessage(GAME_URL, '非法操作');
     }
     //返回
     $data = array();
     //判断是否24小时内已经投过了。cookie判断,伪验证。
     $addScore = Request::getCookie('add_score');
     if (!empty($addScore) && $addScore - time() <= 86400) {
         $data['status'] = -2;
         $data['msg'] = '<p class="text-center">说你呢-.-</p><p class="text-center">不要贪得无厌哦</p><p class="text-center">24小时内只能顶一次';
         return json_encode($data);
     }
     Response::setCookie('add_score', time(), time() + 86400);
     //更新数据库
     if ($score == 1) {
         $result = ArticleBusiness::goodNum($articleId);
     } else {
         if ($score == 2) {
             $result = ArticleBusiness::badNum($articleId);
         }
     }
     //整理返回值
     if ($result) {
         $data['status'] = 0;
         $data['msg'] = 1;
     } else {
         $data['status'] = -1;
         $data['msg'] = '不明所以的失败了,请重新。';
     }
     return json_encode($data);
 }
<?php
require_once dirname(__FILE__).'/../init.php';
$request = new Request();

$hospitalFacultyId = Codec::getInstance()->decodeId($request->getRequest('id'));
if ($hospitalFacultyId <= 0){ 
	MsgHtml::msg("未知科室");
	exit;
}

//科室信息
$hospitalFaculty = DAL::get()->find('HospitalFaculty', $hospitalFacultyId);
//$hospitalFacultyInfo = $Moo->Model->Hdf_ViewHospitalFaculty->rowDetail($hospitalFacultyId);

//接收提交参数
$from    = $request->getRequest('from');
$info    = $request->getRequest('info');
$url     = $request->getRequest('url');
$fname   = $request->getRequest('fname');
$tel     = $request->getRequest('tel');
$mobtel  = $request->getRequest('mobtel');
$qq      = $request->getRequest('qq');
$msn     = $request->getRequest('msn');
$email   = $request->getRequest('email');
$footing = $request->getRequest('footing');
$confirm = $request->getRequest('confirm');
$result = 0;
$user = UserClient::getInstance()->getCurrentUser();

$temp = array(0=>'科室医生',1=>'患者', 2=>'其他');
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>医院-科室-医生列表</title>
</head>

<?php 
require 'init.php';
$request = new Request();
$id = $request->getRequest("id", '');
if (false == BackYardAuth::authAdmin4Interceptor()) {
    echo '系统错误,请联系技术人员!!!';
    exit;
}
?>

<frameset cols="*,120">
  <frame name="hfdlist" id="hfdlist" src="/hospital/doctorlist?id=<?php 
echo $id;
?>
">
  <frame name="hflist" id="hflist" src="/hospital/facultylist?id=<?php 
echo $id;
?>
">
</frameset>
<noframes><body>
</body>
</noframes>
</html>
Example #23
0
    <td align="right">座右铭</td>
    <td width="80%">
		<form action="/space/updatepost?id=<?php 
echo $space->id;
?>
" method="post">
			<textarea name="vars[motto]" cols="135" rows="5" id="motto"><?php 
echo $space->getSpaceMottoForDoctor();
?>
</textarea><br>
			<input type="submit" name="button" id="button" onclick='this.style.visibility="hidden";' value="提交">
		</form>
	</td>
  </tr>
  </table>
<?php 
$request = new Request();
$msg = $request->getRequest('msg', '');
$cmd = $request->getRequest('cmd', '');
?>
<div align="center"><?php 
echo $msg;
?>
</div>
<font color=white><?php 
echo $cmd;
?>
</font>
</body>
</html>
Example #24
0
  </tr>
</table>
<div align="center"><br>
  <?php 
echo $msg;
?>
  <br>
  <input type="hidden" name='userId' value="<?php 
echo $curOperatorUser->id;
?>
" />
  <input type="submit" name="Submit" onclick='this.style.visibility="hidden";' value="确定">
  <input name="confirm" type="hidden" id="confirm" value="1">
  <input name="id" type="hidden" id="id" value="<?php 
echo $userAdvice ? $userAdvice->id : 0;
?>
">
</div>
</form>
<?php 
$request = new Request();
$cmd = $request->getRequest('cmd', '');
?>
<font color=white><?php 
echo $cmd;
?>
</font>


<?php 
include dirname(__FILE__) . '/../footer.php';
Example #25
0
 /**
  * @descrpition 后台登录 ...
  */
 public function login()
 {
     $loginInfo = Request::getSession($this->sessionId);
     if (!empty($loginInfo) && !empty($loginInfo['username']) && !empty($loginInfo['id'])) {
         View::showAdminMessage('/admin.php/index/main', '已经登录!');
     }
     //表单提交处理
     if (Request::getRequest('dosubmit', 'str')) {
         $username = Request::getRequest('username', 'str');
         $password = Request::getRequest('password', 'str');
         $password = md5($username . PASSWORD_INTERFERE . $password);
         $result = $this->adminUserObj->getByUsername($username);
         if (isset($result) && $result['password'] == $password) {
             $session = array();
             $session['id'] = $result['id'];
             $session['username'] = $result['username'];
             Response::setSession($this->sessionId, $session);
             View::jsJump('/admin.php/index/main');
         } else {
             View::showAdminErrorMessage('/admin.php/admin/login', '登录后台失败!');
         }
     }
     View::showAdminTpl('login');
 }
Example #26
0
<?php
require_once dirname(__FILE__).'/../init.php';
$request = new Request();
$hospitalFacultyId = Codec::getInstance()->decodeId($request->getRequest('id'));
$hospitalFaculty = DAL::get()->find('HospitalFaculty', $hospitalFacultyId);
$user = UserClient::getInstance()->getCurrentUser();
$token = Captcha::generate('dcapply', $user->id, ContentFactory::TYPE_CHAR, 4, XIpLocation::getIp(), 3);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加医生信息基本信息</title>
<link href="http://i1.hdfimg.com/css/css.css?1303386395" rel="stylesheet" type="text/css" />
<link href="http://i1.hdfimg.com/css/frame.css?20131224" rel="stylesheet" type="text/css" />
<link href="http://i1.hdfimg.com/css/inside.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" type="text/css" href="http://i1.hdfimg.com/space/js/calendar.css" />
  <script type="text/javascript" language="javascript" src="http://i1.hdfimg.com/space/js/tools.js?1366769791"></script>
  <script type="text/javascript" src="http://i1.hdfimg.com/space/js/calendar.js"></script>
  <script type="text/javascript" src="http://i1.hdfimg.com/space/js/calendar-zh.js"></script>
  <script type="text/javascript" src="http://i1.hdfimg.com/space/js/calendar-setup.js"></script>
<style type="text/css">
.table_green {
	border-collapse: collapse;
}
.table_green td {
	padding: 5px;
	border: 1px #B6E4A7 solid;
}
</style>
<link href="http://i1.hdfimg.com/nav/nav.css?1303460346" rel="stylesheet" type="text/css"/> 
<?php
require_once dirname(__FILE__).'/../init.php';

$request = new Request();
$rid =  $request->getRequest('rid', '');
$confid = $request->getRequest('confid', '');
$result = trim($request->result);
$line = $request->line;

if(!empty($rid)){
	$sql = "update CMDInfo set ConfID = '$confid',Result = '$result', Line = '$line' where RID = '$rid' ";
	$ret = MeetingClient::getInstance()->executeSql($sql);
	if($ret){
		header('Location:'.$_SERVER['PHP_SELF']);
	}
}

?>
<!DOCTYPE unspecified PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>电话会议内部测试-信息修改</title>
<style>
body{width:1000px;margin:auto;}
.block{margin:20px 0;padding:10px;line-height:18px; }
table{border:solid 1px #aaaaaa;border-collapse:collapse;}
table td{border:solid 1px #aaaaaa;}
input .inp{width:30px;}
</style>
</head>
Example #28
0
<?php

if (!User::isAdmin()) {
    redirect('/start');
}
if (is_ajax()) {
    $id = $_REQUEST['id'];
    $state = $_REQUEST['state'];
    $admin = $_REQUEST['admin'];
    if ($state == 1) {
        Request::acceptRequest($id, $admin);
    } else {
        Request::declineRequest($id);
    }
    $return = array('result' => Request::getRequest($id)['state']);
    echo json_encode($return);
    return;
}
?>
<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="css/requests/style.css">
    <script src="libs/jquery.js"></script>
    <script src="js/requests.js"></script>
    </head>
<body>
<table>
    <?php 
foreach (Request::getAllRequests()['unsorted'] as $req) {
    $class = 'unsorted';
Example #29
0
}
</script>
</head>
<body style="position: relative">
<?php 
$base = dirname(__FILE__);
require($base.'/../../assembly.php');

$request = new Request();
$img = '';
if ($request->filepath !== null)
{
	$maxWidth = 1024;
	$maxHeight = 1024;
    DAL::get()->setUp('image');
	$filePath = $request->getRequest('filepath', '');
    $realPath = TuClient::getInstance()->getUrl($filePath);
	$size = getimagesize($realPath);
	$realWidth = $size[0];
	if ($realWidth < $maxWidth) 
	{
		$img = $realPath;
	}
	else
	{
		$img = TuClient::getInstance()->getThumbnailUrl($filePath, $maxWidth, $maxHeight, TuClient::TYPE_ZOOM);	
	}
}
elseif ($request->img !== null )
{
	$img = $request->img;
Example #30
0
 /**
  * @descrpition 修改文章
  */
 public function edit()
 {
     if (Request::getRequest('dosubmit', 'str')) {
         $jumpUrl = '/admin.php/itemdocarticle/edit/id-' . $this->param['id'];
         $fields = array();
         $fields['title'] = Request::getRequest('title', 'str');
         $fields['seo_title'] = Request::getRequest('seo_title', 'str');
         $fields['seo_description'] = Request::getRequest('seo_description', 'str');
         $fields['seo_keywords'] = Request::getRequest('seo_keywords', 'str');
         $fields['author'] = Request::getRequest('author', 'str');
         $fields['clicks'] = Request::getRequest('clicks', 'str');
         $fields['tag'] = Request::getRequest('tag', 'str');
         $fields['good_num'] = Request::getRequest('good_num', 'str');
         $fields['bad_num'] = Request::getRequest('bad_num', 'str');
         $fields['ctime'] = Request::getRequest('ctime', 'str');
         $fields['ctime'] = strtotime($fields['ctime']);
         $fields['mid'] = Request::getRequest('mid', 'int');
         $fields['item'] = Request::getRequest('item', 'str');
         $fields['content'] = Request::getRequest('content', 'str');
         //如果使用UEditor,则反转义一次
         $fields['content'] = htmlspecialchars_decode($fields['content']);
         //将TAG记录进TAG表
         $tags = explode('|', $fields['tag']);
         foreach ($tags as $tag) {
             if (empty($tag)) {
                 continue;
             }
             $tagInfo = ItemDocTagBusiness::getTagByTag($tag);
             if (!empty($tagInfo)) {
                 $tagInfo['num']++;
                 ItemDocTagBusiness::editTag($tagInfo['id'], $tagInfo);
             } else {
                 $tagFields['tag'] = $tag;
                 $tagFields['num'] = 1;
                 ItemDocTagBusiness::setTag($tagFields);
             }
         }
         $result = ItemDocArticleBusiness::editArticle($this->param['id'], $fields);
         if ($result) {
             View::showAdminMessage('/admin.php/itemdocarticle/lists', '修改成功');
         } else {
             View::showAdminErrorMessage($jumpUrl, '修改失败');
         }
     }
     $blogMenuList = ItemDocMenuBusiness::getMenuList();
     $blogMenuList = Func::arrayKey($blogMenuList);
     $blogMenuList = Func::categoryTree($blogMenuList);
     $article = ItemDocArticleBusiness::getArticle($this->param['id']);
     View::assign('article', $article);
     View::assign('blogMenuList', $blogMenuList);
     View::showAdminTpl('item_doc_article_edit');
 }