function __construct() { parent::__construct(); $this->load->library("email"); $this->url = get_referer_url(false); $this->client_ip = array('ip' => get_client_ip(), 'browser' => $_SERVER['HTTP_USER_AGENT']); }
/** * 顯示登入表單 * @version 20140423 Pulipuli Chen */ private function _show_login_form($data = NULL) { if (is_null($data)) { $data = array('domain' => "", 'email' => "", 'password' => ""); } $referer_url = get_referer_url(); $is_not_login_path = ends_with($referer_url, $this->_login_path) === FALSE; $is_from_mobile_apps = strpos($referer_url, "/mobile_apps/") !== FALSE; $data["referer_url"] = ""; if ($is_not_login_path && $is_from_mobile_apps) { $data["referer_url"] = $referer_url; } if ($data["referer_url"] == "") { $data["referer_url"] = $this->_webpage_path; } if (isset($_POST["domain"])) { $data["domain"] = $_POST["domain"]; } if (isset($_POST["do_redirect"])) { $data["do_redirect"] = TRUE; } $data["lang"] = $this->lang; $this->load->view('mobile_apps/view_header', $data); $this->load->view('mobile_apps/login', $data); $this->load->view('mobile_apps/view_footer'); }
function __construct() { parent::__construct(); $this->url = get_referer_url(TRUE); $this->webpage = get_context_webpage(); $this->load->helper('file'); }
function __construct() { parent::__construct(); $this->load->library('kals_actor/User'); $this->user = get_context_user(); $this->url = get_referer_url(TRUE); }
function __construct() { parent::__construct(); $this->load->library('kals_actor/User'); $this->url = get_referer_url(TRUE); $this->client_ip = array('ip' => get_client_ip(), 'browser' => $_SERVER['HTTP_USER_AGENT']); $this->load->library("kals_actor/User_statistic"); }
function __construct() { parent::__construct(); $this->load->library('scope/Annotation_scope_collection'); $this->load->library('scope/Annotation_scope'); $this->load->library('kals_resource/Annotation'); $this->load->library('kals_actor/User'); $this->user = get_context_user(); $this->url = get_referer_url(TRUE); require_once 'annotation_getter.php'; $this->annotation_getter = new annotation_getter(); }
function __construct() { parent::__construct(); $this->load->library('scope/Annotation_scope_collection'); $this->load->library('scope/Annotation_scope'); $this->load->library('kals_resource/Domain'); $this->load->library('kals_resource/Webpage'); $this->load->library('kals_resource/Annotation'); $this->load->library('kals_actor/User'); $this->load->library('search/Search_annotation_collection'); $this->load->library('search/Search_annotation_id_collection'); $this->load->library('search/Search_annotation_user_collection'); $this->load->library('search/Search_scope_collection'); $this->load->library('type/Type_factory'); $this->url = get_referer_url(TRUE); }
function get_url_parameters($url = NULL) { if ($url == NULL) { $url = get_referer_url(); } if ($url === FALSE) { return FALSE; } $url = @trim($url); $parameters = @parse_url($url); if ($parameters === FALSE) { return FALSE; } else { return $parameters; } }
function __construct() { parent::__construct(); $this->load->library('scope/Annotation_scope_collection'); $this->load->library('scope/Annotation_scope'); $this->load->library('kals_resource/Domain'); $this->load->library('kals_resource/Webpage'); $this->load->library('kals_resource/Annotation'); $this->load->library('kals_actor/User'); $this->load->library('search/Search_annotation_collection'); $this->load->library('search/Search_annotation_id_collection'); $this->load->library('search/Search_annotation_user_collection'); $this->load->library('search/Search_scope_collection'); $this->load->library('type/Type_factory'); $this->url = get_referer_url(TRUE); $this->user = get_context_user(); require_once 'annotation_getter.php'; $this->annotation_getter = new annotation_getter(); }
function test() { $this->load->library('unit_test'); //$test = 1 + 1; //$expected_result = 2; //$test_name = 'Adds one plus one'; //$this->unit->run($test, $expected_result, $test_name); $this->load->helper('kals'); $this->unit->run(get_referer_url(), 'http://localhost/CodeIgniter_1.7.2/unit_test', '取得參考的網址!' . get_referer_url()); $this->unit->run(parse_host(get_referer_url()), $this->host, '取得參考的HOST!' . parse_host()); $this->unit->run(parse_uri('http://localhost/CodeIgniter_1.7.2/index.php/ut_misc/ut_kals_helper/test'), '/CodeIgniter_1.7.2/index.php/ut_misc/ut_kals_helper/test', '取得參考的URI!' . parse_uri()); $this->unit->run(url_is_link('http://images.plurk.com/1422855_79bdc93f1317c2a7b8c9f0c5d51586c9.jpg'), TRUE, '確認是否是連結'); $this->unit->run(url_is_image('http://images.plurk.com/1422855_79bdc93f1317c2a7b8c9f0c5d51586c9.jpg'), TRUE, '確認是否是圖片'); $this->unit->run(url_is_link('http://www.plurk.com/p/5u89gi#response-1629050986'), TRUE, '確認是否是連結'); $this->unit->run(url_is_image('http://www.plurk.com/p/5u89gi#response-1629050986'), FALSE, '確認是否是圖片'); $this->unit->run(parse_email_name('*****@*****.**'), 'puddingchen.35', '取出email的名字'); $this->unit->run(retrieve_title('http://www.plurk.com/p/5uuz7o#response-1632175301'), 'JS布丁 正在 [CODING D2] http://www.youtube.com/watch?v=c8I_WPonFHE 進度:2/182 - #5uuz7o', '取得網頁的title'); $data = array('title' => get_class($this), 'unit' => $this->unit); $this->load->view('misc/unit_test', $data); }
/** * 取得請求網址 * @return String */ protected function get_url() { return get_referer_url(); }
</font> <br/> <?php if (empty($jumpurl) || $jumpurl == '') { ?> <br/> <a href="<?php echo Request::getRefererUrl(); ?> ">[如果您的浏览器没有自动跳转,请点击这里 返回上一页]</a> <script type="text/javascript"> setTimeout("<?php echo empty($target) ? '' : 'parent.parent.'; ?> location.href='<?php echo get_referer_url(); ?> '",<?php echo $ms; ?> ); </script> <?php } else { if ($jumpurl == 'goback') { ?> <br/> <a href="javascript:history.back();" >[如果您的浏览器没有自动跳转,请点击这里 返回上一页]</a> <script type="text/javascript"> setTimeout("history.back();",<?php echo $ms;
<text class="alert-sec-unit" x="70" y="172" fill="#BDBDBD">秒跳转</text> </svg> <div id="js-sec-text" class="alert-sec-text"></div> <div class="alert-body"> <!--<div id="js-alert-head" class="alert-head"></div>--> <div class="alert-concent"> <p style="color:#27ae60;"><?php echo $msg; ?> </p> </div> <?php if (empty($jumpurl) || $jumpurl == '') { ?> <a id="js-alert-btn" class="alert-btn" href="<?php $url = get_referer_url(); echo Request::getRefererUrl(); ?> ">点击立即跳转页面</a> <?php } else { if ($jumpurl == 'goback') { $url = "javascript:history.back();"; ?> <a id="js-alert-btn" class="alert-btn" href="javascript:history.back();">点击立即跳转页面</a> <?php } elseif ($jumpurl == "close") { ?> <a id="js-alert-btn" class="alert-btn" href="javascript:viod(0);" onclick="window.close();">点击关闭页面</a> <?php } elseif ($jumpurl) {
/** * 以資料庫記錄Log * * 20140511 注意,資料庫中的log資料表欄位需要新增「action_key」 * * log資料表的建置SQL如下: * * * @param CI_DB $db * @param String|Int $action 如果是用string,則會記錄在資料庫的 action_key * @param Object $data */ function kals_log($db, $action, $data = array()) { $url = get_referer_url(FALSE); $webpage_id = NULL; if ($url !== FALSE) { /* $CI =& get_instance(); if (isset($CI->webpage) == FALSE || is_null($CI->webpage)) $CI->load->library('kals_resource/Webpage'); $webpage_id = $CI->webpage->filter_webpage_id($url); */ $webpage_id = get_context_webpage()->get_id(); } $user_id = NULL; $note = NULL; if (is_array($data) && (isset($data['user_id']) || isset($data['memo']))) { if (isset($data['user_id'])) { $user_id = $data['user_id']; } if (isset($data['memo'])) { $note = $data['memo']; if (is_array($note) || is_object($note)) { $note = json_encode($note); } if ($note === '') { $note = NULL; } } } else { if (defined("JSON_UNESCAPED_UNICODE")) { $note = json_encode($data, JSON_UNESCAPED_UNICODE); } else { $note = kals_json_encode($data); } } if (is_null($user_id)) { $user = get_context_user(); if (isset($user)) { $user_id = $user->get_id(); } } $CI =& get_instance(); $action_key_mapper = $CI->config->item("log.action_key_mapper"); // 根據action的類型,修改action資料 $action_id = null; $action_key = null; if (is_int($action) || strval(intval($action)) === $action) { $action_id = $action; if (array_key_exists($action_id, $action_key_mapper)) { $action_key = $action_key_mapper[$action_id]; } } else { $action_key = $action; } $db->insert('log', array('webpage_id' => $webpage_id, 'user_id' => $user_id, 'user_ip' => get_client_ip(), 'action' => $action_id, 'action_key' => $action_key, 'note' => $note)); }
<?php require_once 'includes/common/require.php'; //get referer page $redirect = get_referer_url(); // Store the messages in a variable to prevent interfering with headers manipulation. $msg = ''; // This is the action requested by the user $action = @$_POST['action']; // This is the first uLogin-specific line in this file. // We construct an instance and pass a function handle to our // callback functions (we have just defined 'appLogin' and // 'appLoginFail' a few lines above). $ulogin = new uLogin('appLogin', 'appLoginFail'); if (!isAppLoggedIn() && isset($_POST['btnsubmit'])) { if (!$redirect) { $redirect = 'index.php'; } if ($action == 'login') { // Here we verify the nonce, so that only users can try to log in // to whom we've actually shown a login page. The first parameter // of Nonce::Verify needs to correspond to the parameter that we // used to create the nonce, but otherwise it can be anything // as long as they match. if (isset($_POST['nonce']) && ulNonce::Verify('login', $_POST['nonce'])) { // We store it in the session if the user wants to be remembered. This is because // some auth backends redirect the user and we will need it after the user // arrives back. if (isset($_POST['autologin'])) { $_SESSION['appRememberMeRequested'] = true; } else { unset($_SESSION['appRememberMeRequested']);
function get_current_domain() { if ($this->domain == NULL) { $url = get_referer_url(); //$this->CI->load->library('kals_resource/Domain'); $this->_CI_load('library', 'kals_resource/Domain', 'domain'); $this->domain = $this->CI->domain->create($url); } return $this->domain; }
/** * 取得參考的來源網址 * @return type */ private function _login_get_referer_url() { $referer_url = null; if (isset($_POST["input_url"])) { $referer_url = $_POST["input_url"]; } else { $referer_url = get_referer_url(); } return $referer_url; }