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


PHP EncodeUrl函数代码示例

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


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

示例1: _render

 function _render()
 {
     $show = $this->_show ? $this->_show : "add";
     if ($show == "update") {
         list($id, $rateConfig, $isopen) = $this->_buildUpdateHtml();
     }
     isset($isopen) ? $isopen : ($isopen[1] = "checked=checked");
     $typeId = isset($rateConfig['typeid']) ? $rateConfig['typeid'] : 1;
     $typeSelect = $this->_buildTypeSelectHTML($typeId);
     $default_handler_url = EncodeUrl($this->_getDefaultUrl() . "&job=ajax");
     include H_R . '/template/ajax.htm';
     ajax_footer();
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:ajaxAction.php

示例2: exit

<?php

!defined('P_W') && exit('Forbidden');
$baseUrl = $admin_file . "?adminjob=mode&admintype=cms_purview&";
$purviewService = C::loadClass('PurviewService');
/* @var $purviewService PW_PurviewService */
S::gp(array('action', 'page'));
if (!$action) {
    $perPage = 20;
    S::gp(array('username'));
    $cmsPurviews = $purviewService->findAll($username, $page, $perPage);
    if (!$username) {
        $count = $purviewService->countPurview();
        $pager = pwGetPager($count, $page, $perPage, $baseUrl);
    }
    $ajaxUrl = EncodeUrl($baseUrl);
} elseif ($action == 'add') {
    S::gp(array('username', 'pid'));
    if (!empty($pid)) {
        $userpurview = $purviewService->findPurviewById($pid);
    }
    $superchecked = $userpurview['super'] ? "checked=checked" : "";
    $columns = $purviewService->getAllColumns();
} elseif ($action == 'addsubmit') {
    S::gp(array('pid', 'username', 'columnids', 'super'));
    if (empty($username)) {
        Showmsg('用户名不能为空', $basename . '&action=add&pid=' . $pid);
    }
    if (!empty($columnids) && !is_array($columnids)) {
        Showmsg('非法操作', $basename . '&action=add&pid=' . $pid);
    }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:purview.php

示例3: foreach

    if ($forumdb) {
        foreach ($forumdb as $value) {
            $forum_L[] = $value;
        }
    }
    if ($subdb1) {
        foreach ($subdb1 as $value) {
            $forum_L[] = $value;
        }
    }
    if ($subdb2) {
        foreach ($subdb2 as $value) {
            $forum_L[] = $value;
        }
    }
    $ajaxurl = EncodeUrl($basename);
} elseif ($action == 'editforum') {
    InitGP(array('fidcommend'), 'P', 0);
    InitGP(array('order'), 'P', 2);
    $pwSQL = $forumDB = $fids = array();
    $query = $db->query("SELECT fid,vieworder FROM pw_searchforum");
    while ($rt = $db->fetch_array($query)) {
        $forumDB[$rt['fid']]['fid'] = $rt['fid'];
        $forumDB[$rt['fid']]['vieworder'] = (int) $rt['vieworder'];
        $fids[] = $rt['fid'];
    }
    foreach ($fidcommend as $key => $value) {
        //用于add|update
        $vieworder = (int) $order[$key];
        if (!S::inArray($key, $fids)) {
            $addSQL[$key]['fid'] = $key;
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:searcher.php

示例4: array

     if ($_num > 1500) {
         $_cacheService = L::loadClass('cacheservice', 'utility');
         $_cacheService->flush(PW_CACHE_MEMCACHE);
     } else {
         $_query = $db->query("SELECT uid FROM tmp_datastate");
         $_uids = array();
         while ($rt = $db->fetch_array($_query)) {
             $_uids[] = $rt['uid'];
         }
         Perf::gatherInfo('changeMembersWithUserIds', array('uid' => $_uids));
     }
     //* 清除pw_members缓存 end
     if ($havesend < $count) {
         $step++;
         $j_url = "{$basename}&action={$action}&step={$step}&sendto=" . implode(',', $sendto) . "&by={$by}&count={$count}";
         adminmsg("sendmsg_step", EncodeUrl($j_url), 1);
     }
     adminmsg('operate_success');
 } elseif ($by == 2) {
     $cache_file = D_P . "data/bbscache/" . substr(md5($admin_pwd), 10, 10) . ".txt";
     if (!$step) {
         pwCache::setData($cache_file, $atc_content);
     } else {
         //* $atc_content = readover($cache_file);
         $atc_content = pwCache::getData($cache_file, false, true);
     }
     if (empty($subject) || empty($atc_content)) {
         adminmsg('sendmsg_empty');
     }
     $subject = S::escapeChar($subject);
     $sendmessage = S::escapeChar($atc_content);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:sendmsg.php

示例5: exit

<?php

!defined('P_W') && exit('Forbidden');
InitGP(array("jobact"));
$ajaxurl = EncodeUrl($stopic_admin_url);
$bg_perpage = 6;
if ("preadd" == $jobact) {
    InitGP(array("new_category", "layout_select", 'style'));
    InitGP(array("is_new_category", "category_id", "is_new_bg", "bg_id", "copy_stopic_id"), null, 2);
    if ($is_new_category) {
        if (trim($new_category) == "") {
            Showmsg("对不起,新增分类名不能为空", $stopic_admin_url . "&job=default");
        }
        $new_category_id = $stopic_service->addCategory(array("title" => $new_category, "creator" => $admin_name));
        !$new_category_id && Showmsg("对不起,新分类增加失败", $stopic_admin_url . "&job=default");
        $category_id = $new_category_id;
    }
    if (!$category_id) {
        Showmsg("对不起,您既没有选择分类,也没有新建分类,请您重试", $stopic_admin_url . "&job=default");
    }
    if (!$layout_select) {
        Showmsg("对不起,请选择布局", $stopic_admin_url . "&job=default");
    }
    $layoutDefaultSet = $stopic_service->getLayoutSet($style);
    $defaultBanner = $stopic_service->getStyleBanner($style);
    $styles = $stopic_service->getStyles();
    $bg_list = $stopic_service->getPicturesAndDefaultBGs($category_id);
    $bg_total = ceil(count($bg_list) / $bg_perpage);
    include stopic_use_layout('admin');
} elseif ("add" == $jobact) {
    InitGP(array("stopic_title", "banner_url", "nav_set", "layout_select", "layout_set", "seo_keyword", "seo_desc"));
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:draw.php

示例6: pwEscape

        $db->update("UPDATE pw_pcfield SET fieldname=" . pwEscape($fieldname) . " WHERE fieldid=" . pwEscape($fieldid));
        /*$ckfieldname = $db->get_one("SHOW COLUMNS FROM $pcvaluetable LIKE '$fieldname'");
        		if ($ckfieldname) {
        			Showmsg('field_have_exists');
        		} else {
        			$sql = getFieldSqlByType($fieldtype);
        			$db->query("ALTER TABLE $pcvaluetable ADD $fieldname $sql");
        		}*/
        $sql = getFieldSqlByType($fieldtype);
        $db->query("ALTER TABLE {$pcvaluetable} ADD {$fieldname} {$sql}");
        Showmsg('pcfield_add_success');
    }
} elseif ($action == 'editfield') {
    define('AJAX', 1);
    if (!$_POST['step']) {
        $ajax_basename_edit = EncodeUrl($basename . "&action=editfield");
        InitGP(array('fieldid'));
        if (empty($fieldid)) {
            Showmsg('field_not_select');
        }
        $fielddb = $db->get_one("SELECT name,fieldname,rules,type,descrip,ifdel FROM pw_pcfield WHERE fieldid=" . pwEscape($fieldid));
        $count = $db->get_value("SELECT COUNT(*) FROM {$pcvaluetable} WHERE " . $fielddb['fieldname'] . " != ''");
        //查找是否变量已有值
        if ($count || $fielddb['ifdel']) {
            $ifhidden = '1';
        }
        if (in_array($fielddb['fieldname'], array('objecter', 'payway'))) {
            $areaifhidden = '1';
        }
        $rules = unserialize($fielddb['rules']);
        $type = $fielddb['type'];
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:postcate.php

示例7: _buildRateParams

 function _buildRateParams($typeId)
 {
     $default_ajax_url = EncodeUrl($this->_getDefaultUrl());
     $rateConfigs = $this->_buildRateConfigHTML($typeId);
     $imageUrl = $this->_bbsUrl . '/hack/rate/images/';
     return array($rateConfigs, $default_ajax_url, $imageUrl);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:7,代码来源:adminAction.php

示例8: opendir

        $fp = opendir($path);
        while ($file = readdir($fp)) {
            if ($file != '' && !in_array($file, array('.', '..')) && preg_match('/^fcache\\_\\d+\\_\\d+\\.php$/i', $file)) {
                ++$isnum;
                //* P_unlink("$path/$file");
                pwCache::deleteData("{$path}/{$file}");
            }
            if ($isnum > $num) {
                break;
            }
        }
        closedir($fp);
        if ($isnum > $num) {
            $url = "{$basename}&action=delf&num={$num}&step={$step}";
            $delnum = $num * $step;
            adminmsg('fcache_delete', EncodeUrl($url), 2);
        }
        adminmsg('operate_success');
    }
}
//class & functions for updatecache
class ClearMemcache
{
    function _isMemecacheOpen()
    {
        return class_exists("Memcache") && strtolower($GLOBALS['db_datastore']) == 'memcache';
    }
}
function getForumSelectHtml()
{
    global $db;
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:aboutcache.php

示例9: explode

}
*/
$diyoptions = $db_diy ? explode(',', $db_diy) : array('setforum', 'setuser', 'level', 'postcache', 'article');
$newopration = getHotOpration();
$menu = new MenuStart();
$diymenu = new MenuDiy();
$hotmenu = new MenuDiy();
creadMenu($nav_left, $menu);
$allmenu = $menu->myStruct();
$allmenu = "" == $allmenu ? "{}" : $allmenu;
$diyjsstr = $diymenu->myStruct();
$hotjsstr = $hotmenu->myStruct();
$headjsstr = headSerialize();
$db_guideshow = $db_guideshow === null ? 1 : ($db_guideshow == 1 ? 1 : 0);
/*init*/
$ajaxurl = EncodeUrl($db_adminfile . "?adminjob=ajaxhandler");
if ($adskin) {
    include PrintEot('windowindex');
} else {
    $mainList = $minorList = array();
    $flag = 0;
    foreach ($nav_left as $key => $value) {
        $key == 'modelist' && ($flag = 1);
        if (!isset($headdb[$key])) {
            continue;
        }
        if ($flag) {
            $minorList[$key] = $value;
        } else {
            $mainList[$key] = $value;
        }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:windowindex.php

示例10: P_unlink

                                P_unlink("{$attachdir}/thumb/{$file1}/{$file2}");
                            }
                            if ($num - $start >= $pernum) {
                                $start = $num - $delnum;
                                $j_url = "{$basename}&action={$action}&start={$start}&pernum={$pernum}&deltotal={$deltotal}";
                                adminmsg('delattach_step', EncodeUrl($j_url), 0);
                            }
                        }
                    }
                }
            } elseif (is_file("{$attachdir}/{$file1}")) {
                $num++;
                if ($num > $start) {
                    $rt = $db->get_one("SELECT aid,ifthumb FROM pw_attachs WHERE attachurl=" . S::sqlEscape($file1));
                    if (!$rt) {
                        $delnum++;
                        $deltotal++;
                        P_unlink("{$attachdir}/{$file1}");
                        P_unlink("{$attachdir}/thumb/{$file1}");
                    }
                    if ($num - $start >= $pernum) {
                        $start = $num - $delnum;
                        $j_url = "{$basename}&action={$action}&start={$start}&pernum={$pernum}&deltotal={$deltotal}";
                        adminmsg('delattach_step', EncodeUrl($j_url), 0);
                    }
                }
            }
        }
    }
    adminmsg('operate_success');
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:attachrenew.php

示例11: pwEscape

            $schtime = $timestamp - $msgdate * 24 * 3600;
            $sql .= " AND mdate<" . pwEscape($schtime);
        }
        $lines < 1 && ($lines = 100);
        $delids = array();
        $query = $db->query("SELECT DISTINCT mid FROM pw_msglog WHERE {$sql} LIMIT {$lines}");
        while ($rt = $db->fetch_array($query)) {
            $delids[] = $rt['mid'];
        }
        require_once R_P . 'require/msg.php';
        if ($delids) {
            $delids = pwImplode($delids);
            $db->update("DELETE FROM pw_msglog WHERE mid IN({$delids})");
            $delnum += $db->affected_rows();
            delete_msgc($delids);
            adminmsg('msglog_delete_step', EncodeUrl("{$basename}&action={$action}&msgdate={$msgdate}&lines={$lines}&delnum={$delnum}"));
        } else {
            delete_msgc();
            adminmsg('operate_success');
        }
    }
}
function numofpage_t($count, $page, $numofpage, $url, $max = null, $ajaxurl = '')
{
    global $tablecolor;
    $total = $numofpage;
    if (!empty($max)) {
        $max = (int) $max;
        $numofpage > $max && ($numofpage = $max);
    }
    if ($numofpage <= 1 || !is_numeric($page)) {
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:superdel.php

示例12: InitGP

 $invokepiece = $invokeService->getInvokePieceByInvokeId($invokepieceid);
 if ($invokepiece['rang'] != 'fid') {
     $fid = 0;
 }
 if (!$step) {
     InitGP(array('pushtid'));
     $default = array();
     if ($pushtid) {
         require R_P . 'lib/tplgetdata.class.php';
         $default = getSubjectByTid($pushtid, $invokepiece['param']);
     } else {
         foreach ($invokepiece['param'] as $key => $value) {
             $default[$key] = '';
         }
     }
     $ajax_basename = EncodeUrl($basename . "&action=addpush");
     require_once PrintMode('ajax_tplcontent');
     ajax_footer();
 } else {
     InitGP(array('param', 'offset', 'endtime', 'starttime', 'title1', 'title2', 'title3', 'title4', 'titletime'), 'GP');
     if (isset($invokepiece['param']['tagrelate'])) {
         InitGP(array('tagrelate'));
         $param['tagrelate'] = getTagRelate($tagrelate);
     }
     $titlecss = $invokeService->pushDataTitleCss($title1, $title2, $title3, $title4, $titletime);
     if (isset($param['image']) && count($_FILES) && $_FILES["uploadpic"]["name"] && $_FILES["uploadpic"]["size"]) {
         $uploadPicUrl = $invokeService->uploadPicture($_FILES, $invokepieceid, $admin_name);
         $param['image'] = $uploadPicUrl ? $uploadPicUrl : $param['image'];
     }
     $offset = (int) $offset;
     $invokeService->insertPushData(array('invokename' => $invokepiece['invokename'], 'invokepieceid' => $invokepieceid, 'fid' => $fid, 'loopid' => $loopid, 'starttime' => $starttime, 'endtime' => $endtime, 'offset' => $offset, 'data' => $param, 'editor' => $admin_name, 'titlecss' => $titlecss));
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:tplcontent.php

示例13: adminmsg

        adminmsg('operate_success', "{$basename}&type={$type}");
    } else {
        adminmsg('operate_error', "{$basename}&type={$type}");
    }
} elseif ($action == 'empty') {
    $pwServer['REQUEST_METHOD'] != 'POST' && PostCheck($verify);
    $recycleService = new PW_RecycleEmpty();
    if ($type == 'topic') {
        $result = $recycleService->emptyTopic();
        adminmsg($result);
    } else {
        S::gp(array('ptable'));
        !is_numeric($ptable) && ($ptable = $db_ptable);
        $result = $recycleService->emptyReply($ptable);
        $j_url = "{$basename}&type={$type}";
        adminmsg($result, EncodeUrl($j_url), 2);
    }
}
function RevertModelTopic($modeldb)
{
    global $db;
    foreach ($modeldb as $key => $value) {
        $modelids = S::sqlImplode($value);
        $pw_topicvalue = GetTopcitable($key);
        $db->update("UPDATE {$pw_topicvalue} SET ifrecycle='0' WHERE tid IN({$modelids})");
    }
}
function RevertPcTopic($pcdb)
{
    global $db;
    foreach ($pcdb as $key => $value) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:recycle.php

示例14: str_replace

        }
        $cname = str_replace('%', '*', $cname);
        $aname = str_replace('%', '*', $aname);
        $uploader = str_replace('%', '*', $uploader);
        $pintro = str_replace('%', '*', $pintro);
        require_once PrintApp('admin');
    }
} elseif ($action == 'level') {
    require_once A_P . 'action/admin_level.php';
} elseif ($action == 'active') {
    S::gp(array('job'));
    if ($job == 'del') {
        if (empty($_POST['step'])) {
            S::gp(array('id'));
            define('AJAX', 1);
            $posthash = EncodeUrl("{$basename}&action=active&job=del&selid={$id}&ajax=1");
            require_once A_P . 'template/admin_ajax.htm';
            ajax_footer();
        } else {
            S::gp(array('selid', 'urladd'));
            if (isset($_GET['ajax'])) {
                define('AJAX', 1);
            }
            $basename .= "&action={$action}&job=list" . $urladd;
            if (!$selid) {
                adminmsg('operate_error');
            }
            require_once A_P . 'lib/active.class.php';
            $newActive = new PW_Active();
            $newActive->delActive($selid);
            if (defined('AJAX')) {
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:admin.php

示例15: adminmsg

            if ($errormsg[0] != 1) {
                adminmsg($errormsg[1]);
            }
        }
        $sphinxData = array('isopen' => $isopen, 'host' => $host, 'port' => $port, 'rank' => trim($rank), 'group' => trim($group), 'tindex' => trim($tindex), 'tcindex' => trim($tcindex), 'pindex' => trim($pindex));
        setConfig('db_sphinx', $sphinxData);
        updatecache_c();
        adminmsg("operate_success");
    } else {
        $ajax = GetGP('ajax');
        if ($ajax == 1 && strtolower($pwServer['REQUEST_METHOD']) == 'post') {
            InitGP(array('host', 'port'));
            $errormsg = testSockopen($host, $port);
            showError($errormsg[1]);
        }
        $baseUrl = EncodeUrl($basename);
        $default = $sphinxSearch->getDefaults();
        $configure = $db_sphinx ? $db_sphinx : $default;
        /*兼容*/
        foreach ($default as $k => $v) {
            $configure[$k] = isset($db_sphinx[$k]) ? $db_sphinx[$k] : $default[$k];
        }
        $configure['isopen'] == 0 ? $isopenCheck[0] = 'checked=checked' : ($isopenCheck[1] = 'checked=checked');
        $rankSelects = assignSelect($ranks, $configure['rank']);
        $groupSelects = assignSelect($groups, $configure['group']);
        include PrintEot('advanced');
    }
}
function assignSelect($arrays, $select)
{
    $selects = array();
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:advanced.php


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