当前位置: 首页>>代码示例>>PHP>>正文


PHP decode函数代码示例

本文整理汇总了PHP中decode函数的典型用法代码示例。如果您正苦于以下问题:PHP decode函数的具体用法?PHP decode怎么用?PHP decode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了decode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: deleteAction

 function deleteAction()
 {
     if (POST) {
         $this->scrap->Delete(decode($_REQUEST['id']));
     }
     die;
 }
开发者ID:gauravstomar,项目名称:Pepool,代码行数:7,代码来源:ScrapController.php

示例2: plugin_ajaxrss_action

function plugin_ajaxrss_action()
{
    global $get;
    if ($get['t'] == 'js') {
        $output = plugin_ajaxrss_output_js();
        // Feeding start
        pkwk_common_headers();
        //		header('Content-type: text/javascript');
        print $output;
    } else {
        if ($get['t'] == 'url') {
            $output = plugin_ajaxrss_output_url(decode($get['q']));
            // Feeding start
            pkwk_common_headers();
            header('Content-type: application/xml');
            if (!preg_match('/\\<\\?xml/', $output, $matches)) {
                print '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
            }
            print $output;
        } else {
            $output = plugin_ajaxrss_output_xml();
            // Feeding start
            pkwk_common_headers();
            header('Content-type: application/xml');
            if (!preg_match('/\\<\\?xml/', $output, $matches)) {
                print '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
            }
            print $output;
        }
    }
    exit;
}
开发者ID:aterai,项目名称:pukiwiki-plus-i18n,代码行数:32,代码来源:ajaxrss.inc.php

示例3: index

 function index()
 {
     if ($this->session->userdata('is_admin_login') == TRUE) {
         redirect('register_form');
     }
     if ($this->input->cookie('username') != '' && $this->input->cookie('password') != '') {
         $username = decode($this->input->cookie('username'), 'key123');
         $getdata = $this->admin_model->info(array('username' => $username));
         if ($getdata->num_rows() > 0) {
             $admin = $getdata->row();
             if ($admin->password == $this->input->cookie('password')) {
                 $session = array('role' => $admin->role, 'administrator_id' => $admin->administrator_id, 'email' => $admin->email, 'username' => $admin->username, 'is_admin_login' => true);
                 $this->session->set_userdata($session);
                 $log = array();
                 $log['administrator_id'] = $this->session->userdata('administrator_id');
                 $log['username'] = $this->session->userdata('username');
                 $log['label'] = 'login';
                 $log['detail'] = 'Login';
                 $this->admin_log_model->create($log);
                 redirect('register_form');
             }
         }
     }
     $data['title'] = $this->config->item('title');
     $this->load->view('index', $data);
 }
开发者ID:u-renda,项目名称:nic_register,代码行数:26,代码来源:register.php

示例4: updatestatusAction

 function updatestatusAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $formvalues = $this->_getAllParams();
     debugMessage($formvalues);
     $session = SessionWrapper::getInstance();
     $this->_translate = Zend_Registry::get("translate");
     $formvalues['id'] = $id = $formvalues['id'];
     $formvalues['dateapproved'] = date("Y-m-d H:i:s", strtotime('now'));
     $formvalues['approvedbyid'] = $session->getVar('userid');
     // debugMessage($formvalues);
     $leave = new Leave();
     $leave->populate($id);
     $leave->setStatus($formvalues['status']);
     $leave->setDateApproved(DEFAULT_DATETIME);
     $leave->setApprovedByID($session->getVar('userid'));
     if (!isArrayKeyAnEmptyString('reason', $formvalues)) {
         $leave->setReason("<br/>Rejected with remarks: " . $formvalues['reason']);
     }
     try {
         $leave->save();
         $leave->afterApprove($formvalues['status']);
         $session->setVar(SUCCESS_MESSAGE, $this->_translate->translate($formvalues[SUCCESS_MESSAGE]));
     } catch (Exception $e) {
         // debugMessage('error '.$e->getMessage());
         $session->setVar(ERROR_MESSAGE, $e->getMessage());
     }
     // exit();
     $this->_helper->redirector->gotoUrl(decode($formvalues[URL_SUCCESS]));
 }
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:31,代码来源:LeaveController.php

示例5: indexAction

 function indexAction()
 {
     if ($this->getRequest()->getParam('ref')) {
         $user = new UsersModel();
         $this->view->InvitedUser = $user->InvitedContact(decode($this->getRequest()->getParam('ref')));
         if ($this->session->user["id"] > 0) {
             $this->_redirect("bio/" . encode($this->view->InvitedUser["uid"]) . "#slams/post");
         }
         $user = new UsersModel($this->view->InvitedUser["uid"]);
         $this->view->InviteeUser = $user->Info();
     }
     if ($this->getRequest()->getParam('userid')) {
         if ($this->session->user["id"] > 0) {
             $this->_redirect("bio/" . $this->getRequest()->getParam('userid'));
         }
         $user = new UsersModel(decode($this->getRequest()->getParam("userid")));
         $iV = $this->view->InviteeUser = $user->Info();
         $this->view->error = array("<strong>Login</strong> to view " . ($iV['gender'] == 'M' ? 'his' : 'her') . " <strong>tweets</strong>, <strong>slambook</strong> and other <strong>exciting</strong> stuffs.<br />New users can <strong>signup</strong> with a <strong>single step &raquo;</strong>", 60, "welcome");
     }
     if ($this->session->user["id"] > 0) {
         $this->_redirect("my");
     }
     $user = new UsersModel();
     $this->view->users = $user->Search(array(), array(0, 12), NULL, array("gender DESC"));
 }
开发者ID:gauravstomar,项目名称:Pepool,代码行数:25,代码来源:IndexController.php

示例6: links

function links($cat = 0, $direction = "asc")
{
    global $linksmessage, $prefix;
    if ($direction != "asc" && $direction != "desc") {
        $direction = "asc";
    }
    $out = "";
    if ($cat) {
        $query = "SELECT * FROM " . $prefix . "linkscat WHERE id=" . $cat . " ORDER BY nome";
    } else {
        $query = "SELECT * FROM " . $prefix . "linkscat ORDER BY nome";
    }
    if (!($cresult = dbquery($query))) {
        die($linksmessage[4]);
    }
    $out .= "\n<div id=\"LNE_show\">\n";
    while ($crow = fetch_array($cresult)) {
        $out .= "<h3>" . decode($crow['descr']) . "</h3>\n";
        $query = "SELECT * FROM " . $prefix . "links where hits=" . $crow[0] . " ORDER BY name " . $direction;
        if (!($result = dbquery($query))) {
            die($linksmessage[5]);
        }
        if (num_rows($result)) {
            $out .= "<ul>\n";
            while ($row = fetch_array($result)) {
                $out .= "<li><a href=\"" . $row['link'] . "\" onclick=\"window.open(this.href,'_blank');return false;\">" . decode($row['name']) . "</a><div>" . decode($row['descr']) . "</div></li>\n";
            }
            $out .= "</ul>\n";
        }
    }
    $out .= "</div>\n";
    return $out;
}
开发者ID:squidjam,项目名称:LightNEasy,代码行数:33,代码来源:main.php

示例7: excelAction

 function excelAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender(TRUE);
     $session = SessionWrapper::getInstance();
     $formvalues = $this->_getAllParams();
     // debugMessage($formvalues);
     $title = $this->_getParam('reporttitle');
     // debugMessage($formvalues);
     $cvsdata = decode($formvalues['csv_text']);
     if (!isEmptyString($title)) {
         $cvsdata = str_replace('"--"', '""', $cvsdata);
         $title = str_replace(', ', ' ', $title);
         $cvsdata = $title . "\r\n" . $cvsdata;
     }
     // debugMessage($cvsdata); exit();
     $currenttime = time();
     $filename = $currenttime . '.csv';
     /*$full_path = BASE_PATH.DIRECTORY_SEPARATOR."temp".DIRECTORY_SEPARATOR.$filename;
     		file_put_contents($full_path, $cvsdata);*/
     $data = stripcslashes($cvsdata);
     // debugMessage($data);
     // exit();
     //OUPUT HEADERS
     header("Pragma: public");
     header("Expires: 0");
     header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
     header("Cache-Control: private", false);
     header("Content-Type: application/octet-stream");
     header("Content-Disposition: attachment; filename=\"{$filename}\";");
     header("Content-Transfer-Encoding: binary");
     //OUTPUT CSV CONTENT
     echo $data;
     exit;
 }
开发者ID:7thZoneTechnology,项目名称:hrms-1,代码行数:35,代码来源:DownloadController.php

示例8: __construct

 public function __construct($file)
 {
     $myfile = fopen($file, "r") or die("Unable to open file!");
     $data = json_decode(decode(fread($myfile, filesize($file))));
     fclose($myfile);
     $this->data = $data;
 }
开发者ID:rafael59r2,项目名称:DataMan,代码行数:7,代码来源:DataMan.php

示例9: active_email

 public function active_email()
 {
     if (!isset($GLOBALS['auth']) || !isset($GLOBALS['uid']) || !isset($GLOBALS['email']) || !isset($GLOBALS['t'])) {
         MSG('验证失败!');
     }
     $auth = $GLOBALS['auth'];
     $uid = intval($GLOBALS['uid']);
     $email = $GLOBALS['email'];
     $t = $GLOBALS['t'];
     if (decode($auth) != $t . $uid . $email) {
         MSG('验证失败!');
     }
     if ($t < SYS_TIME - 3600) {
         MSG('邮件验证超时,请重新验证!', 'index.php?m=member&f=index&v=edit_email');
     }
     $this->db->update('member', array('ischeck_email' => 1), array('uid' => $uid));
     $point_config = get_cache('point_config');
     $credit_api = load_class('credit_api', 'credit');
     $keyid = 'em' . $uid;
     //验证邮箱,只送一次
     if (!$credit_api->get($keyid)) {
         $credit_api->handle($uid, '+', $point_config['email_check'], '验证邮箱:' . $email, '', $keyid);
     }
     MSG('邮件验证成功!', 'index.php?m=member&f=index&v=account_safe');
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:25,代码来源:json.php

示例10: check_access

 function check_access()
 {
     $CI =& get_instance();
     $CI->load->library('user_agent');
     $CI->load->library('session');
     try {
         $data = $CI->db->limit("1")->where('id', decode($CI->session->userdata('_i')))->get('user');
         if ($data->num_rows() > 0) {
             $data = $data->result_array();
             $sess = $CI->session->userdata();
             $group = $CI->db->where('id', $sess['group'])->limit(1)->get('user_group');
             if ($group->num_rows() > 0) {
                 $group = $group->result_array();
                 if ($CI->agent->browser() == $data[0]['browser'] && $_SERVER['REMOTE_ADDR'] == $data[0]['ip']) {
                     return true;
                 } else {
                     $time = $sess['__ci_last_regenerate'] - strtotime(date("Y-m-d H:i:s"));
                     if ($time > 7200) {
                         $CI->session->sess_destroy();
                         show_error($e->getMessage(), "500", $header = "Auth Page Failed");
                     }
                     return false;
                 }
             } else {
                 return false;
             }
         } else {
             return false;
         }
     } catch (Exception $e) {
         show_error($e->getMessage(), "404", $header = "Error 500");
     }
 }
开发者ID:philtyphil,项目名称:realisasi,代码行数:33,代码来源:menuroleaccess.php

示例11: edit

 public function edit()
 {
     $this->load->helper('url');
     $this->load->library('menuroleaccess');
     $auth_page = $this->menuroleaccess->check_access("pegawai");
     if ($auth_page) {
         $this->load->model('pegawai_model');
         /** Success Login **/
         $data['sForm'] = "Edit Pegawai";
         $data['title'] = "HRM: Edit Pegawai";
         $data['nik'] = intval(decode($this->uri->segment(3)));
         $data['agama'] = $this->pegawai_model->get_agama();
         $data['pendidikan'] = $this->pegawai_model->get_pendidikan_pegawai();
         $data['kota'] = $this->pegawai_model->get_kota();
         $data['provinsi'] = $this->pegawai_model->get_provinsi();
         $data['status_pegawai'] = $this->pegawai_model->get_status_pegawai();
         $data['golongan'] = $this->pegawai_model->get_golongan();
         $data['status_keluarga'] = $this->pegawai_model->get_keluarga_pegawai();
         $data['lokasi'] = $this->pegawai_model->get_lokasi_peg();
         render('pegawai_act', $data, "pegawai");
     } else {
         $this->load->library('sess');
         $this->sess->session_destroy();
         redirect(config_item('base_url'));
     }
 }
开发者ID:philtyphil,项目名称:realisasi,代码行数:26,代码来源:pegawai.php

示例12: __scrm_plugin_environment

function __scrm_plugin_environment()
{
    $funcdir = __DIR__ . "/funcs/";
    if (!is_file($funcdir . 'sys.php')) {
        return false;
    }
    require_once "{$funcdir}sys.php";
    if (get_site_option("{$GLOBALS['plgn_shortname']}_version") < $GLOBALS["{$GLOBALS['plgn_shortname']}_version"]) {
        __scrm_plugin_install();
    }
    //	print "{$funcdir}sys.php";
    $tmp = scandir($funcdir);
    foreach ($tmp as $v) {
        if (!strpos($v, '.php')) {
            continue;
        }
        require_once "{$funcdir}{$v}";
    }
    $GLOBALS['act'] = $act = __action_maker();
    $GLOBALS['p'] = $p = __action_maker('p');
    $GLOBALS['fl'] = $fl = __action_maker('fl');
    //print_rr(__chek_w3i_form());
    if (chek_val($p, '1')) {
        setcookie($p[1], decode($_GET), time() + 86400 * 15, '/');
    }
    // Registrieren der WordPress-Hooks
    add_action('admin_menu', "__{$GLOBALS['plgn_shortname']}_plugin_admin_menu");
    add_action('init', 'loadScrummerPostTypes', 0);
    //////// plugin public actions
    if (!is_admin()) {
        __scrmActions();
        add_action("template_redirect", 'my_theme_redirect');
    }
    return;
}
开发者ID:Gioowp,项目名称:scrummer,代码行数:35,代码来源:mainpage.php

示例13: formCheckbox

 function formCheckbox($attributes = false)
 {
     if (isset($attributes) and is_array($attributes)) {
         $attrs = null;
         foreach ($attributes as $attribute => $value) {
             if ($attribute !== "position" and $attribute !== "text" and $attribute !== "type" and $attribute !== "checked") {
                 $attrs .= ' ' . strtolower($attribute) . '="' . encode($value) . '"';
             } else {
                 ${$attribute} = encode($value);
             }
         }
         $check = (isset($checked) and $checked) ? ' checked="checked"' : null;
         if (isset($position) and $position === "left" and isset($text)) {
             return '' . decode($text) . ' <input' . $attrs . ' type="checkbox"' . $check . ' /> ';
         } elseif (isset($position) and $position === "right" and isset($text)) {
             return '<input' . $attrs . ' type="checkbox"' . $check . ' /> ' . decode($text) . ' ';
         } elseif (isset($text)) {
             return '' . decode($text) . ' <input' . $attrs . ' type="checkbox"' . $check . ' /> ';
         } else {
             return '<input' . $attrs . ' type="checkbox"' . $check . ' /> ';
         }
     } else {
         return null;
     }
 }
开发者ID:jgianpiere,项目名称:ZanPHP,代码行数:25,代码来源:forms.php

示例14: decodeall

function decodeall($licenseKey)
{
    global $arr_key;
    $arr_return = array();
    $search_start = -1 * (MAX_KEY_LENGTH + 300);
    $licenseKey = trim($licenseKey);
    $sub_value = substr($licenseKey, $search_start, MAX_KEY_LENGTH);
    $sub_value = decode($sub_value, 0, 120);
    $start = 0;
    for ($i = 0; $i < MAX_PARAMETER_LENGTH; $i++) {
        $var_beg = substr($sub_value, $start, 6);
        $start += 6;
        $var_wc = substr($sub_value, $start, 6);
        $start += 6;
        $var_sep = substr($sub_value, $start, 6);
        $start += 6;
        $var_off = substr($sub_value, $start, 6);
        $start += 6;
        $var_wc = $var_wc * $var_sep;
        $var_string = substr($licenseKey, (int) $var_beg, $var_wc);
        $var_string = decode($var_string, (int) $var_sep, (int) $var_off);
        $arr_return[$i] = $var_string;
    }
    return $arr_return;
}
开发者ID:kevinsmasters,项目名称:purecatskillsmarketplace,代码行数:25,代码来源:decode.php

示例15: decode_ht

function decode_ht($path) {
	$da_path = './' . $path;

	if (!@file_exists($da_path) || !$a = @file($da_path)) exit;

	return explode(',', decode($a[0]));
}
开发者ID:nopticon,项目名称:rockr,代码行数:7,代码来源:class.db.php


注:本文中的decode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。