public function Form($Form) { $ActionModel = new ActionModel(); $Actions = $ActionModel->Get(); $Reactions = array(); foreach ($Actions as $Action) { $Reactions[$Action->ActionID] = $Action->Name; } $String = $Form->Label('Yaga.Rules.ReactionCount.Criteria.Head', 'ReactionCount'); $String .= $Form->Textbox('Target', array('class' => 'SmallInput')) . ' '; $String .= $Form->DropDown('ActionID', $Reactions); return $String; }
/** * Returns a list of all available actions * * @return dataset */ public function Get() { if (empty(self::$_Actions)) { self::$_Actions = $this->SQL->Select()->From('Action')->OrderBy('Sort')->Get()->Result(); } return self::$_Actions; }
public function Form($Form) { $ActionModel = new ActionModel(); $Actions = $ActionModel->Get(); $String = $Form->Label('Yaga.Rules.PostReactions.Criteria.Head', 'ReactionCount'); $ActionList = ''; foreach ($Actions as $Action) { $ActionList .= Wrap(sprintf(T('Yaga.Rules.PostReactions.LabelFormat'), $Action->Name) . ' ' . $Form->Textbox('ActionID_' . $Action->ActionID, array('class' => 'SmallInput')), 'li'); } if ($ActionList == '') { $String .= T('Yaga.Error.NoActions'); } else { $String .= Wrap($ActionList, 'ul'); } return $String; }
public function act_getActionLists($condition, $sort = '', $limit = '') { $actionmodel = new ActionModel(); $filed = ' action_id,action_description,action_name,action_group_id,group_description,group_name,group_system_id'; $where = !empty($condition) && is_array($condition) ? implode(' AND ', $condition) : ''; //获取条数 if ($this->is_count === true) { $this->is_count = false; $actioncount = $actionmodel->count()->getActionLists($filed, $where); return $this->_checkReturnData($actioncount, 0); } $orderby = empty($orderby) ? '' : " ORDER BY {$sort} "; $actionlists = $actionmodel->getActionLists($filed, $where, $orderby, $limit); return $this->_checkReturnData($actionlists, array()); }
public function getActionLists($filed, $where, $orderby, $limit) { self::initDB(); $sql = 'select ' . $filed . ' from `' . self::$table_action_info . '` LEFT JOIN `' . self::$table_action_group . '` ON action_group_id=group_id where ' . $where . ' ' . $order . ' ' . $limit; $query = self::$dbConn->query($sql); if (!$query) { self::$errCode = '1803'; self::$errMsg = "[{$sql}] is error"; return false; } if ($this->{$is_count} === true) { $this->{$is_count} = false; return self::$dbConn->num_rows($query); } return self::$dbConn->fetch_array_all($query); }
public function screen_applicant_process_close() { $btn1 = ""; $btn2 = ""; $reset = ""; $this->make_message_form(); if (empty($this->action)) { $MemberModel = new MemberModel(); $CustomerModel = new CustomerModel(); $member_data = $MemberModel->get_member_name_info_id($_SESSION['applicant']['member_id']); $project_data = $CustomerModel->get_project_title($_SESSION['applicant']['project_id']); $subject = "不採用のお知らせ"; $body = $member_data['last_name'] . " " . $member_data['first_name'] . " 様\n\n"; $body .= "このたびは下記のお仕事\n\n"; $body .= "「" . $project_data . "」\n"; $body .= "http://localhost/index.php?type=detail_project&project_id=" . $_SESSION['applicant']['project_id'] . "\n\n"; $body .= "にご応募いただきありがとうございました。\n\n"; $body .= "誠に残念でございますが、\n今回のお仕事は不採用となりました。\n\n"; $body .= "何卒、ご了承いただけましたら\n幸いでございます。\n\n"; $body .= $_SESSION[_CUSTOMER_AUTHINFO]['company_name']; $this->form->setDefaults(array('subject' => $subject, 'body' => $body)); $this->form->freeze(); $this->title = "見送り"; $this->message = "不採用の通知をお送りして宜しいでしょうか?"; $this->file = "customer_applicant_message_form.tpl"; $this->next_type = "applicant_process_close"; $this->next_action = "complete"; $btn1 = "OK"; $btn2 = "戻る"; } else { if ($this->action == "complete" && isset($_POST['submit2']) && $_POST['submit2'] == "戻る") { $this->screen_applicant_detail(); exit; } else { if ($this->action == "complete" && isset($_POST['submit1']) && $_POST['submit1'] == "OK") { $data = $this->form->getSubmitValues(); $MessageModel = new MessageModel(); $ActionModel = new ActionModel(); $data['action_id'] = $ActionModel->get_action_some_id($_SESSION['applicant']['member_id'], $_SESSION['applicant']['project_id']); $MessageModel->regist_customer_message_two_data($data, $_SESSION['applicant']); $ActionModel = new ActionModel(); $history = "close"; $ActionModel->regist_action_history($_SESSION['applicant']['project_id'], $history); $this->title = "お見送り完了"; $this->message = "不採用の通知の送付が完了しました。"; $this->file = "message.tpl"; unset($_SESSION['applicant']); } } } $this->form->addElement('submit', 'submit1', $btn1); $this->form->addElement('submit', 'submit2', $btn2); $this->view_display(); }
public function system_get_detail_message_messsage_id($message_id) { try { $sql = " SELECT * FROM message \n WHERE\n id = :message_id \n limit 1 "; $stmh = $this->pdo->prepare($sql); $stmh->bindValue(':message_id', $message_id, PDO::PARAM_INT); $stmh->execute(); $i = 0; $data = array(); $MemberModel = new MemberModel(); $CustomerModel = new CustomerModel(); $ActionModel = new ActionModel(); $data = $stmh->fetch(PDO::FETCH_ASSOC); $action_data = $ActionModel->get_action_id($data['action_id']); $customer_data = $CustomerModel->get_customer_authinfo_id($data['company_id']); $member_data = $MemberModel->get_member_base_info_id($data['member_id']); $project_data = $CustomerModel->get_project_title($data['project_id']); $data['action_reg_date'] = $action_data['reg_date']; $data['company_name'] = $customer_data['company_name']; $data['member_name'] = $member_data['last_name'] . ' ' . $member_data['first_name']; $data['title'] = $project_data; $data['body'] = htmlspecialchars($data['body'], ENT_QUOTES); $data['body'] = nl2br($data['body']); $i++; } catch (PDOException $Exception) { print "エラー" . $Exception->getMessage(); } return $data; }
public function createUrl($service = null, $action = null, $parameters = null, $user = null) { if ($service === null) { $service = $this->_current_controller; } if ($action === null) { $action = $this->_current_action; } // TODO:: need cache to service+action for getting request key! $controller_model = new ControllerModel(); $controller_model->loadByKey($service); if ((int) $controller_model->id <= 0) { throw new InvalidValueException("Can't create url, controller is not exists"); } $action_model = new ActionModel(); $action_model->loadByKey($controller_model->id, $action); if ((int) $action_model->id <= 0) { throw new InvalidValueException("Can't create url, action is not exists"); } if (!strlen($action_model->request_key)) { throw new InvalidValueException(__METHOD__ . "::" . __LINE__ . ":: Bad request key: controller - " . $controller_model->name . "; action - " . $action_model->name . ";action ID=" . $action_model->id); } // Default user controller action ---------- if ($service == 'User' && $action_model->default && $this->getUsername()) { $action_model->request_key = ''; } // ----------------------------------------- if (!$this->_rewrite) { if ($action !== null) { $parameters = array_merge(array($this->_request_action_key => $action), $parameters); } $parameters = array_merge(array($this->_request_controller_key => $service), $parameters); } if (!is_array($parameters)) { $parameters = array(); } $session_name = Project::getSession()->getSessionName(); /*if (($this -> _username != $user) && ($user !== null) && ((int)Project::getUser() -> getDbUser() -> id > 0)){ $sid = Project::getSession() -> getSID(); //var_dump($sid);die; $parameters[$session_name] = $sid; } else { if (isset($parameters[$session_name])){ unset($parameters[$session_name]); } }*/ $query = ''; foreach ($parameters as $k => $v) { if (strlen($query)) { $query .= $this->_param_delimiter; } if (!is_numeric($k) && strlen($k)) { $query .= $k . $this->_value_delimiter . $v; } else { $query .= $v; } } //$query = http_build_query(is_array($parameters)?$parameters:array(), '', $this -> _param_delimiter); $url = ''; if ($this->_rewrite) { $url = $action_model->request_key; } if ($query) { //$query = str_replace('=', $this -> _value_delimiter, $query); //$query = str_replace($this -> _param_delimiter.$this -> _value_delimiter, $this -> _param_delimiter, $query); $url .= ($this->_rewrite ? '/' : '?') . $query . ($this->_rewrite ? '/' : null); } if ($this->_rewrite) { if ($user === null) { if ($this->_username !== null) { $user = $this->_username; } } if ($user !== null) { $host = ($this->IsSecure() ? "https://" : "http://") . $user . (strlen($user) ? '.' : '') . $this->_config->get('base_host') . '/'; } else { $host = $this->getHost(); } $url = $host . $url; } else { $url = $this->getAbsoluteUrl() . $url; } return $url; }
/** * JobAct::act_update() * 修改岗位act * @return bool */ public function act_update() { if (!isset($_POST['jobName']) || trim($_POST['jobName']) == '') { exit("岗位名填写非法!"); } if (!isset($_POST['jobPower']) || trim($_POST['jobPower']) == '' || !intval($_POST['jobPower'])) { exit("所属上级非法!"); } if (!isset($_POST['jobDept']) || trim($_POST['jobDept']) == '' || !intval($_POST['jobDept'])) { exit("所属部门非法!"); } if (!isset($_POST['jobId']) || trim($_POST['jobId']) == '' || !intval($_POST['jobId'])) { exit("岗位ID非法!"); } if (!isset($_POST['jobpowerId']) || trim($_POST['jobpowerId']) == '' || !intval($_POST['jobpowerId'])) { exit("岗位权限ID非法!"); } $jobName = post_check(trim($_POST['jobName'])); $jobPower = intval(trim($_POST['jobPower'])); $jobDept = intval($_POST['jobDept']); $jobId = intval($_POST['jobId']); $jobpowerId = intval($_POST['jobpowerId']); $newJob = array('jobId' => $jobId, 'jobName' => $jobName, 'jobDeptId' => $jobDept, 'jobPid' => $jobPower, 'jobCompanyId' => '1'); $result = JobModel::jobUpdate($newJob); if ($result === false) { exit; } $power = array(); $usersingle = UserModel::getInstance(); //获取当前用户信息 $filed = ' a.*,b.job_name,c.dept_name,d.company_name'; $where = " WHERE a.user_id='{$_SESSION[C('USER_AUTH_ID')]}' "; $userinfo = $usersingle->getUserInfo($filed, $where); $groupname = ActionModel::actionGroupList(C('AUTH_SYSTEM_ID')); //读取系统的actiongroup列表 foreach ($groupname as $v) { if (is_array($_POST["{$v}"]) && isset($_POST["{$v}"])) { array_push($power, "\"{$v}\":" . json_encode($_POST["{$v}"])); } else { //array_push($power,"\"{$v}\":[]"); } } $power = implode(",", $power); $power = "{" . $power . "}"; $newJobpower = array('jobpowerId' => $jobpowerId, 'jobpowerPower' => json_decode($power, true), 'jobpowerMenu' => json_decode('["31"]', true)); $result = JobModel::jobPowerUpdate($newJobpower); return $result; }
* @param string cn キャンペーンコード * @param string cid クライアントID */ try { // パラメータ取得 $array = array_merge((array)$_POST, (array)$_GET); $code = 'yukoyuko'; $clientUserId = $array['cid']; // 処理オブジェクト $core = new CampaignCore(); // モデル取得 require_once (ABS_MODEL . "ActionModel.php"); $m = new ActionModel($core, $code); // アクセスログを残す $m->putAccessLog($array); // 処理 $m->init($clientUserId); $m->main(); } catch (Exception $e) { ///////////////////////// // 例外処理 ///////////////////////// // ログ出力 $core = new CampaignCore();
public function screen_applicant_list() { $this->title = "サイト内・応募者一覧"; $this->message = "サイト内で発生した応募の全件表示"; $perPage = 8; $ActionModel = new ActionModel(); list($data, $count) = $ActionModel->system_get_all_action(); $data = $this->get_applicant_list($data); list($data, $links) = $this->make_page_link($perPage, $data); $this->view->assign('data', $data); $this->view->assign('count', $count); $this->view->assign('links', $links['all']); $this->file = "system_applicant_list.tpl"; $this->view_display(); }
/** * UserAct::act_update() * 修改用户act * @return bool */ public function act_update() { if (!isset($_POST['username']) || trim($_POST['username']) == '') { exit("用户名为空!"); } $dataArr = $_POST; $power = array(); $username = post_check(trim($_POST['username'])); $password = post_check(trim($_POST['password'])); $jobno = isset($_POST['jobno']) ? post_check(trim($_POST['jobno'])) : ''; $phone = isset($_POST['phone']) ? post_check(trim($_POST['phone'])) : ''; $email = isset($_POST['email']) ? post_check(trim($_POST['email'])) : ''; $independence = intval($_POST['user_independence']); $stat = intval($_POST['user_status']); $userjob = explode("|", $_POST['userjob']); $userdept = intval($_POST['userdept']); $grantDate = post_check(trim($_POST['grantDate'])); $effectiveDate = intval($_POST['effectiveDate']); $userToken = post_check(trim($_POST['usertoken'])); $usersingle = UserModel::getInstance(); //获取当前用户信息 $filed = ' a.*,b.job_name,c.dept_name,d.company_name'; $where = " WHERE a.user_id='{$_SESSION[C('USER_AUTH_ID')]}' "; $userinfo = $usersingle->getUserInfo($filed, $where); $groupname = ActionModel::actionGroupList("8"); //读取系统的actiongroup列表 foreach ($groupname as $v) { if (is_array($_POST["{$v}"]) && isset($_POST["{$v}"])) { array_push($power, "\"{$v}\":" . json_encode($_POST["{$v}"])); } else { array_push($power, "\"{$v}\":[]"); } } $power = implode(",", $power); $power = "{" . $power . "}"; $newInfo = array('userName' => $username, 'pwd' => $password, 'jobNo' => $jobno, 'email' => $email, 'phone' => $phone, 'menuPower' => '["31"]', 'status' => $stat, 'independence' => $independence, 'power' => $power, 'jobPower' => intval($userjob[0]), 'tokenGrantDate' => $grantDate, 'TokenEffectiveDate' => $effectiveDate, 'company' => '1', 'dept' => $userdept, 'job' => intval($userjob[1])); if ($userToken == $userinfo['user_token']) { //如果当前用户是自己就不修改权限 unset($newInfo['power']); } $result = UserModel::userUpdate($newInfo, $userToken); return $result; }
function ActionDeleteAction() { if ($this->request->id) { $a = new ActionModel(); $a->delete($this->request->id); } Project::getResponse()->redirect($this->request->createUrl('Dev', 'Actions', array('cid' => $this->request->cid))); }
function ChangeAccessAction() { $request = Project::getRequest(); $group_model = new UserTypeModel(); $group_data = $group_model->load($request->gid); if (!count($group_data)) { // Bad request:: group not exists return; } $controller_model = new ControllerModel(); $controller_data = $controller_model->load($request->cid); if (!count($controller_data)) { // Bad request:: controller not exists return; } $action_model = new ActionModel(); $action_data = $action_model->load($request->id); if (!count($action_data)) { // Bad request:: action not exists return; } $right_model = new UserRightModel(); $right_data = $right_model->loadByTypeControllerAction($request->gid, $request->cid, $request->id); if (!count($right_data)) { $right_model->user_type_id = $request->gid; $right_model->controller_id = $request->cid; $right_model->action_id = $request->id; $right_model->access = 1; } else { $right_model->access = 1 - (int) $right_model->access; } $right_model->save(); }
public function screen_apply() { if (!$this->auth->check_member()) { //ログイン画面 新規登録 へのリンク $this->message = "すでにアカウントをお持ちですか?"; $this->screen_login(); exit; } else { $action['member_id'] = $_SESSION[_MEMBER_AUTHINFO]['id']; $action['company_id'] = $_POST['company_id']; $action['project_id'] = $_POST['project_id']; $history = "appli"; $ActionModel = new ActionModel(); $ActionModel->regist_action($action, $history); $this->title = '応募完了'; $this->message = "応募が完了しました。<br><br>企業からの返信を待ちましょう!"; $this->file = 'message.tpl'; } $this->view_display(); }
/** * Get default url for this controller: create as current controller name+default action */ protected function getDefaultUrl() { $action_model = new ActionModel(); $action_model->loadDefault($this->_controller_model->id); return Project::getRequest()->createUrl(null, $action_model->name); }
public function actionGroupList($id) { self::initDB(); $sql = "SELECT group_name FROM " . self::$table_action_group . " WHERE group_system_id = {$id}"; $query = self::$dbConn->query($sql); if (!$query) { self::$errCode = '1803'; self::$errMsg = "[{$sql}] is error"; return false; } $result = array(); $ret = self::$dbConn->fetch_array_all($query); for ($i = 0; $i < count($ret); $i++) { array_push($result, $ret[$i]['group_name']); } return $result; }
function procees($auth) { $request = Project::getRequest(); $load_default = false; $request_action = $request->getAction(); // Default action... if (!$request_action && $request->getUsername()) { $request_action = 'user_profile'; } // $action_model = new ActionModel(); $action_model->loadByRequestKey($request_action); if ((int) $action_model->id > 0) { // requested action exists $controller_model = new ControllerModel(); $controller_model->load($action_model->controller_id); if ((int) $controller_model->id > 0) { // controller exists $reflection = new ReflectionClass($controller_model->name); if ($reflection->hasMethod($action_model->name . 'Action')) { // Action exists at controller if ($auth->checkAccess($controller_model->id, $action_model->id) === true) { // Have access to requested action $this->setData($controller_model, $action_model); } else { $this->accessLog(__METHOD__, __LINE__, "No access to requested action: requested action - " . $request_action . ";controller - " . $controller_model->name); // No access to action. try to get default action of controller $action_model = new ActionModel(); $action_model->loadDefault($controller_model->id); if ($action_model->id > 0) { // Action exists at database if ($reflection->hasMethod($action_model->name . 'Action')) { // Action method exists at controller class if ($auth->checkAccess($controller_model->id, $action_model->id) === true) { // Have access to default action of requested controller (by requested action) $this->setData($controller_model, $action_model); } else { // No access to default action : try to load default controller and action $this->accessLog(__METHOD__, __LINE__, "No access to default action of requested action's controller: default action - " . $action_model->name . ";controller - " . $controller_model->name); $load_default = true; } } else { // Default action not exists at controller $this->accessLog(__METHOD__, __LINE__, "Default action method not exists at controller class: default action - " . $action_model->name . ";controller - " . $controller_model->name); $load_default = true; } } else { // Default action not exists at database (default in controller of requested action) $this->accessLog(__METHOD__, __LINE__, "Default action not exists at database: controller - " . $controller_model->name); $load_default = true; } } } else { // No access to requested action:: get default action of this controller $this->accessLog(__METHOD__, __LINE__, "Requested action method not exists at controller class: default action - " . $action_model->name . ";controller - " . $controller_model->name); $action_model = new ActionModel(); $action_model->loadDefault($controller_model->id); if ($action_model->id > 0) { // Action exists at database if ($reflection->hasMethod($action_model->name . 'Action')) { // Action method exists at controller class if ($auth->checkAccess($controller_model->id, $action_model->id) === true) { // Have access to default action of requested controller (by requested action) $this->setData($controller_model, $action_model); } else { // No access to default action : try to load default controller and action $this->accessLog(__METHOD__, __LINE__, "No access to default action of requested action's controller: default action - " . $action_model->name . ";controller - " . $controller_model->name); $load_default = true; } } else { // Default action not exists at controller $this->accessLog(__METHOD__, __LINE__, "Default action method not exists at controller class: default action - " . $action_model->name . ";controller - " . $controller_model->name); $load_default = true; } } else { // Default action not exists at database (default in controller of requested action) $this->accessLog(__METHOD__, __LINE__, "Default action not exists at database: controller - " . $controller_model->name); $load_default = true; } } } else { // Controller not exists $load_default = true; $this->accessLog(__METHOD__, __LINE__, "Controller not exists at database: requested action - " . $request_action); } } else { // Requested action not exists $load_default = true; $this->accessLog(__METHOD__, __LINE__, "Requested action not exists at database: requested action - " . $request_action); } $get_login = false; if ($load_default === true) { // Load default controller and action $controller_model = new ControllerModel(); // TODO:: how to check, if we need default admin or user controller? $controller_model->loadDefault($admin = true); if ($controller_model->id > 0) { // Default controller exists and load default action of it $reflection = new ReflectionClass($controller_model->name); $action_model = new ActionModel(); $action_model->loadDefault($controller_model->id); if ($action_model->id > 0 && $reflection->hasMethod($action_model->name . 'Action')) { // Default action exists if ($auth->checkAccess($controller_model->id, $action_model->id) === true) { // Has access to default $this->setData($controller_model, $action_model); } else { // No access to default controller and action, so get login $this->accessLog(__METHOD__, __LINE__, "No access to default controller and action, so get login: default controller - " . $controller_model->name . ";default action - " . $action_model->name); $get_login = true; } } else { // Default action not exists at default controller $this->accessLog(__METHOD__, __LINE__, "No default action at default controller: default controller - " . $controller_model->name . ";default action - " . $action_model->name); $get_login = true; } } else { // Default controller not exists $this->accessLog(__METHOD__, __LINE__, "Default controller not exists: default controller - " . $controller_model->name); $get_login = true; } } if ($get_login === true) { $controller_model = new ControllerModel(); $controller_model->loadByKey($this->_login_controller); if ($controller_model->id > 0) { // Login controller exists at database list $reflection = new ReflectionClass($controller_model->name); $action_model = new ActionModel(); $action_model->loadByKey($controller_model->id, $this->_login_action); if ($action_model->id > 0 && $reflection->hasMethod($action_model->name . 'Action')) { // Login action exists at login controller $this->setData($controller_model, $action_model); } else { throw new SecurityException('Critical security error: login action not defined at configuration'); } } else { throw new SecurityException('Critical security error: login controller not defined at configuration'); } } Project::getRequest()->setController($controller_model->request_key); if ($controller_model->id > 0 && $action_model->id > 0) { if ($action_model->request_key != $request_action) { //var_dump($get_login, $load_default,$controller_model -> name, $request_controller, $action_model -> name, $request_action);die; if ($get_login || $load_default) { // If controllers is not equal to requested $url = Project::getRequest()->createUrl($controller_model->request_key, $action_model->name); // TODO:: check, if it's ajax request, then change location!!! //Project::getAjaxResponse() -> location($url); //header("HTTP/1.0 404 Not Found"); //exit; //Project::getResponse() -> redirect($url); } } } }
public function get_project($project_id, $member_id = "") { try { $sql = "SELECT * FROM project WHERE id = :id limit 1"; $stmh = $this->pdo->prepare($sql); $stmh->bindValue(':id', $project_id, PDO::PARAM_INT); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $row['action'] = 0; if ($member_id != "") { $ActionModel = new ActionModel(); if ($ActionModel->check_member_action($member_id, $project_id)) { $row['action'] = 1; } } $ViewModel = new ViewModel(); $project = $ViewModel->get_project_type(); $area = $ViewModel->get_area_type(); $company = $ViewModel->get_company_name(); $row['project_type'] = $project[$row['project_type']]; $row['area_type'] = $area[$row['area_type']]; $row['company_name'] = $company[$row['company_id']]; } catch (PDOException $Exception) { print "エラー" . $Exception->getMessage(); } return $row; }
public function screen_action() { $this->title = "応募履歴"; $this->message = ""; $perPage = 6; $ActionModel = new ActionModel(); //actionに登録されたidより、関連する情報も取得 list($data, $count) = $ActionModel->get_project_action_id($_SESSION[_MEMBER_AUTHINFO]['id']); list($data, $links) = $this->make_page_link($perPage, $data); $this->view->assign('count', $count); $this->view->assign('data', $data); $this->view->assign('links', $links['all']); $this->file = "member_action_list.tpl"; $this->view_display(); }
/** * リアル戻しURLを取得します。 * @param string (拡張)対象商品購入合計金額 * @return string リアル戻しURL */ public function getRealReturnUrl($baseUrl, $prefix, $newSeikaId, $mediaUserId, $goodsData) { $goodsPrice = $goodsData["goods1_price"] + $goodsData["goods2_price"] + $goodsData["goods3_price"]; $url = parent::getRealReturnUrl($baseUrl, $prefix, $newSeikaId, $mediaUserId); if (strlen($url) != 0) { // 置き換えパターン(金額) $patten = '--AMOUNT--'; if (strstr($url, $patten) != false) { $url = str_replace($patten, $goodsPrice, $url); } } return $url; }
$code = $array['cn']; $clientUserId = $array['cid']; // 処理オブジェクト $core = new CampaignCore(); // モデル取得 $m =& $core->getActionModel($code); // アクセスログを残す $m->putAccessLog($array); // 処理 $m->init($clientUserId); $m->main(); } catch (Exception $e) { ///////////////////////// // 例外処理 ///////////////////////// // ログ出力 $core = new CampaignCore(); $log =& $core->getLogger(); $log->fatal($e->toText()); $m = new ActionModel($core, $code); // 1pxgifを表示するのみ $m->printSpacer(); } ?>