Example #1
0
function public_qrcode($vars = null)
{
    $data = $vars['data'];
    $query = array('app' => 'public', 'do' => 'qrcode', 'url' => $data);
    isset($vars['cache']) && ($query['cache'] = true);
    $url = iPHP::router('/api', iCMS_REWRITE);
    echo buildurl($url, $query);
}
Example #2
0
/**
 * @package iCMS
 * @copyright 2007-2010, iDreamSoft
 * @license http://www.idreamsoft.com iDreamSoft
 * @author coolmoo <*****@*****.**>
 * @$Id: iCMS.push.php 148 2013-03-14 16:15:12Z coolmoo $
 */
function iCMS_router($vars)
{
    if (empty($vars['url'])) {
        echo 'javascript:;';
        return;
    }
    $router = $vars['url'];
    unset($vars['url'], $vars['app']);
    $url = iPHP::router($router, iCMS_REWRITE);
    $vars['query'] && ($url = buildurl($url, $vars['query']));
    if ($url && stripos($url, 'http://') === false && $vars['host']) {
        $url = rtrim(iCMS_URL, '/') . '/' . ltrim($url, '/');
    }
    echo $url ? $url : 'javascript:;';
}
Example #3
0
function search_url($vars)
{
    $q = rawurlencode($vars['query']);
    if (empty($q)) {
        return;
    }
    $query['app'] = 'search';
    if (isset($vars['_app'])) {
        $query['app'] = $vars['_app'];
        $query['do'] = 'search';
    }
    $query['q'] = $q;
    $url = iPHP::router('/api', iPHP_ROUTER_REWRITE);
    $url = buildurl($url, $query);
    if ($vars['ret']) {
        return $url;
    }
    echo $url;
}
Example #4
0
<?php

$load_editor = false;
$editor = array();
$editor['title'] = "";
?>
        <?php IsSetEcho($message); ?>
        <form action="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION.ACTION_WRITE."message")); ?>" method="post">

            <?php 
            if (isset($user_id) && isset($username))
            {
                $load_editor = true;
                ?>
            
            <input type="hidden" name="<?php echo DBMessage::FCORE_MESSAGE_TOS; ?>[]" value="<?php echo $user_id; ?>" />
            <?php

                $editor['title'] .= "To: $username";
            }
            else if (isset($user_list))
            {
                $load_editor = true;
                $first = true;
                $editor['title'] .= "       To: ";
                $editor['title'] .= "       <select name=\"".DBMessage::FCORE_MESSAGE_TOS."[]\">\n";

                foreach($user_list as $user)
                {
                    $selected = false;
                    if (isset($user_id))
<?php }
else
{ ?>

<h3>Sent Messages</h3>

<form action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
        array(ACTION => ACTION.ACTION_DELETE."sentmessages")); ?>" method="post">
    <table>
        <?php foreach($message_list as $list_obj){ ?>
            <tr>
            <td>
                <input type="checkbox" name="<?php echo DBMessage::MESSAGE_ID; ?>[]" value="<?php echo $list_obj[DBMessage::MESSAGE_ID]; ?>" />
            </td>
            <td>
                <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                        array(ACTION => ACTION_READ."message", DBMessage::MESSAGE_ID => $list_obj[DBMessage::MESSAGE_ID])); ?>">
                    <i><?php echo $list_obj[DBMessage::TITLE]; ?></i>
                    At
                    <?php echo $list_obj[DBMessage::TIME_SENT]; ?>
                </a>
            </td>
        </tr>
        <?php } ?>
    </table>
    <input type="submit" value="Delete" />
</form>


<?php
}
?>
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_VIEW."profile")); ?>">
                 My Profile
            </a>
        </div>
<?php if (BoydsnestSession::GetInstance()->get(USERS_CANMESSAGE)) { ?>
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_WRITE."message")); ?>">
                 Compose Message
            </a>
        </div>
<?php } ?>
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_LIST."receivedmessages")); ?>">
                 Received Messages
            </a>
        </div>
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_LIST."sentmessages")); ?>">
                 Sent Messages
            </a>
        </div>
Example #7
0

        <?php IsSetEcho($message); ?>
        <fieldset class="bn_fieldset">
            <legend>Create Page</legend>
            <form method="post" action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                array(ACTION => ACTION.ACTION_CREATE."content")); ?>" >
                <input type="hidden" name="<?php echo USERS_USERID; ?>" value="<?php echo $user_id; ?>" />
                <table>
                    <tr>
                        <td>
                            Page Position:
                        </td>
                        <td>
                            <?php if ($hierarchy) { ?>
                            
                            <table>
                                <tr>
                                    <td class="width_100">
                                        title
                                    </td>
                                    <td class="width_100">
                                        after
                                    </td>
                                    <td class="width_100">
                                        child
                                    </td>
                                </tr>
                                <?php foreach($hierarchy as $page) { ?>
                                
                                <tr>
Example #8
0
    <tr>
        <td>
            <?php echo $user[USERS_USERNAME]; ?>
        </td>
        <td>
            <?php echo $user[USERS_CREATEDWHEN]; ?>
        </td>
        <td>
            <?php echo $user[USERS_LASTUPDATE]; ?>
        </td>
        <td>
            <a class="a_link" href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_UPDATE."users", USERS_USERID => $user[USERS_USERID])); ?>">Details</a>
        </td>
        <td>
            <?php if ($user[USERS_ISLOGGED]) { ?>
            <a class="a_link" href="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION_LOG."users", USERS_USERID => $user[USERS_USERID])); ?>">Logs</a>
            <?php } else { ?>
            Logs
            <?php } ?>
        </td>
    </tr>
    <?php } ?>

</table>

<?php 
}
else
{
    var_dump($user_list);
?>
<?php
foreach($pagelist as $value){
?>
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(USERMANUAL_PAGEID => $value[USERMANUAL_PAGEID])); ?>">
                 <?php echo $value[USERMANUAL_TITLE]; ?>
            </a>
        </div>

<?php } ?>
Example #10
0
                            <input type="radio" name="<?php echo $user[USERS_USERID]; ?>" value="<?php echo USERS_DEFAULTRIGHT_WRITE; ?>" <?php if($selected == USERS_DEFAULTRIGHT_WRITE) echo "checked=\"checked\""; ?> />
                        </td>
                    </tr>
                <?php } ?>
                
                    <tr>
                        <td><input type="submit" value="Update Rights" /></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                    </tr>
                </table>
                <input type="hidden" name="user_ids" value="<?php echo $all_users; ?>" />
            </form>
        </fieldset>
        <?php } ?>

        <fieldset class="bn_fieldset">
            <legend>Delete Page And Children</legend>
            <form method="post" action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                array(ACTION => ACTION.ACTION_DELETE."content", DBForum::POST_ID => $page_info[DBForum::POST_ID])); ?>" >
                <input type="hidden" name="<?php echo DBForum::POST_ID; ?>" value="<?php echo $page_info[DBForum::POST_ID]; ?>" />
                This will delete the page and all of its children.
                This action cannot be reversed.
                <br />
                <input type="submit" value="Delete" />
            </form>
        </fieldset>

Example #11
0
        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_HOME,
                    array(ACTION => ACTION_VIEW."content",
                          USERS_USERID => $page[USERS_USERID])); ?>">
                 <?php echo $page[USERS_USERNAME]; ?>
            </a>
        </div>
                 
            <?php
            if (isset($page[DBForum::POSTCHILDREN]))
            {
                foreach($page[DBForum::POSTCHILDREN] as $post)
                {

            ?>

        <div class="clear">
            <a href="<?php echo buildurl(BN_URL_PAGE_HOME,
                    array(ACTION => ACTION_VIEW."content",
                          USERS_USERID => $page[USERS_USERID],
                          DBForum::POST_ID => $post[DBForum::POST_ID])); ?>">
                 <?php for($i=0; $i<$post[DBForum::POSTINDENT]+1; $i++){echo "&nbsp;&nbsp;"; } echo $post[PAGETITLE]; ?>
            </a>
        </div>
        <?php
                }
            }
        }
?>

Example #12
0
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Scheme Using:
                            </td>
                            <td>
                                <input type="text" name="<?php echo USERS_SCHEMEUSING; ?>" value="<?php echo $user[USERS_SCHEMEUSING]; ?>" />
                            </td>
                            <td>
                                this is not implemented and will not effect anything if changed... yet!
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="submit" value="Update" />
                            </td>
                        </tr>
                    </table>
                </form>
            </fieldset>
            <fieldset class="bn_fieldset">
                <legend>Reset Your Password</legend>
                <form method="post" action="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION.ACTION_VIEW."profilepass")); ?>">
                    <input type="hidden" name="<?php echo USERS_USERID; ?>" value="<?php echo $user[USERS_USERID]; ?>" />
                    New Password: <input type="text" name="<?php echo USERS_PASSWORD; ?>" />
                    <br />
                    <input type="submit" value="Change Password" />
                </form>
            </fieldset>
Example #13
0
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
             array(ACTION => ACTION_LIST."content")); ?>">
          Content List
     </a>
 </div>
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
             array(ACTION => ACTION_CREATE."content")); ?>">
          Create Content
     </a>
 </div>
Example #14
0
 <div class="login_form">
     <form action="<?php echo buildurl(BN_URL_PAGE_LOGIN, array(ACTION => ACTION_ATTEMPT)) ?>" method="post">
         <table class="login_form_table">
             <caption><?php IsSetEcho($message); ?></caption>
             <tr>
                 <td>
                     Login Name:
                 </td>
                 <td>
                     <input tabindex="1" class="login_form_input_text" type="text" name="<?php echo USERS_USERNAME; ?>" value="<?php IsSetEcho($username); ?>" />
                 </td>
             </tr>
             <tr>
                 <td>
                     Login Pass:
                 </td>
                 <td>
                     <input tabindex="2" class="login_form_input_text" type="password" name="<?php echo USERS_PASSWORD; ?>" />
                 </td>
             </tr>
             <tr>
                 <td></td>
                 <td>
                     <input tabindex="3" class="login_form_input_submit" type="submit" value="Login" />
                 </td>
             </tr>
         </table>
     </form>
 </div>
Example #15
0
                <td class="width_150">Update</td>
                <td class="width_150">Write</td>
                <td class="width_150">Delete</td>
            </tr>
            <?php foreach($pagelist as $value) { ?>
            <tr>
                <form action="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION.ACTION_UPDATE)); ?>" method="post">
                    <input type="hidden" name="<?php echo USERMANUAL_PAGEID; ?>" value="<?php echo $value[USERMANUAL_PAGEID]; ?>" />
                    <td>
                        <input type="text" name="<?php echo USERMANUAL_TITLE; ?>" value="<?php echo $value[USERMANUAL_TITLE]; ?>" />
                    </td>
                    <td>
                        <input type="text" name="<?php echo USERMANUAL_RANK; ?>" value="<?php echo $value[USERMANUAL_RANK]; ?>" />
                    </td>
                    <td>
                        <input type="submit" value="Update" />
                    </td>
                    <td>
                        <a href="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION_WRITE,USERMANUAL_PAGEID => $value[USERMANUAL_PAGEID]))?>">Write</a>
                    </td>
                </form>
                <form action="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION.ACTION_DELETE)); ?>" method="post">
                    <input type="hidden" name="<?php echo USERMANUAL_PAGEID; ?>" value="<?php echo $value[USERMANUAL_PAGEID]; ?>" />
                    <td>
                        <input type="submit" value="Delete" />
                    </td>
                </form>
            </tr>
            <?php } ?>
        </table>
<?php } else { IsSetEcho($pagelist); }?>
Example #16
0
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION_LIST)); ?>">
          View List
     </a>
 </div>
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION_CREATE)); ?>">
          Create Page
     </a>
 </div>
Example #17
0
        <?php IsSetEcho($message); ?>
        <form action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                array(ACTION => ACTION.ACTION_CREATE."users")); ?>" method="post">
            <table>
                <tr>
                    <td>
                        Username:
                    </td>
                    <td>
                        <input type="text" name="<?php echo USERS_USERNAME; ?>" value="<?php IsSetEcho($user_data[USERS_USERNAME], ""); ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Password:
                    </td>
                    <td>
                        <input type="text" name="<?php echo USERS_PASSWORD; ?>" value="<?php IsSetEcho($user_data[USERS_PASSWORD], ""); ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
                        email:
                    </td>
                    <td>
                        <input type="text" name="<?php echo USERS_EMAIL; ?>" value="<?php IsSetEcho($user_data[USERS_EMAIL], ""); ?>" />
                    </td>
                </tr>
                <tr>
                    <td>
Example #18
0
 <h4><?php IsSetEcho($message); ?></h4>
 <div class="form_setup">
     <table>
         <form method="post" action="<?php echo buildurl(BN_URL_PAGE_USERMANUAL, array(ACTION => ACTION.ACTION_CREATE)); ?>" >
             <tr>
                 <td>
                     Title:
                 </td>
                 <td>
                     <input tabindex="1" class="form_input_text" type="text" name="<?php echo USERMANUAL_TITLE; ?>" value="<?php IsSetEcho($title); ?>" />
                 </td>
             </tr>
             <tr>
                 <td>
                     Rank:
                 </td>
                 <td>
                     <input tabindex="2" class="form_input_text" type="text" name="<?php echo USERMANUAL_RANK; ?>" value="<?php IsSetEcho($rank); ?>" />
                 </td>
             </tr>
             <tr>
                 <td></td>
                 <td>
                     <input tabindex="3" class="form_input_submit" type="submit" value="Create" />
                 </td>
             </tr>
         </form>
     </table>
 </div>
Example #19
0
                        <input type="hidden" name="<?php echo DBForum::POST_ID; ?>" value="<?php echo $page[DBForum::POST_ID]; ?>" />
                        <input type="text" size="4" name="<?php echo DBForum::POSTORDER; ?>" value="<?php echo $page[DBForum::POSTORDER]; ?>" />
                        <input type="submit" value="Update" />
                    </form>
                </td>
                <td>
                    <form method="post" action="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION.ACTION_LIST."content")); ?>" >
                        <input type="hidden" name="<?php echo DBForum::POST_ID; ?>" value="<?php echo $page[DBForum::POST_ID]; ?>" />
                        <input type="text" size="4" name="<?php echo DBForum::POSTPARENT; ?>" value="<?php echo $page[DBForum::POSTPARENT]; ?>" />
                        <input type="submit" value="Update" />
                    </form>
                </td>
                <td>
                    <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN, 
                        array(ACTION => ACTION_VIEW."content", DBForum::POST_ID => $page[DBForum::POST_ID])); ?>">View Content</a>
                </td>
                <td>
                    <?php if ($page[PAGETYPE] != BN_PAGETHREADTYPE_NONE) { ?>
                    <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                        array(ACTION => ACTION_VIEW."response", DBForum::POST_ID => $page[DBForum::POST_ID])); ?>">View Content</a>
                    <?php } else { ?>
                    View Content
                    <?php } ?>
                    
                </td>
            </tr>
            <?php } ?>
            
        </table>

Example #20
0
 /**
  * 设置url头地址
  * @param: String $url
  * @return boolean
  */
 function _set_url($url = "", $total_type = null)
 {
     if ($this->html['enable']) {
         $this->url = $url;
     } else {
         $query = array();
         $total_type === "G" && ($query['total_num'] = $this->total);
         $query[$this->page_name] = "---PN---";
         $this->url = buildurl($url, $query);
         $this->url = str_replace('---PN---', '{P}', $this->url);
     }
 }
Example #21
0
<?php IsSetEcho($message); ?>

<h3><?php IsSetEcho($username); ?>'s Logs</h3>

<?php
if (is_array($user_logs))
{
?>

<form method="post" action="<?php echo buildurl(BN_URL_PAGE_ADMIN, array(ACTION => ACTION.ACTION_LOG.ACTION_DELETE."users", "start" => $start, "amount" => $amount, USERS_USERID => $user_id)); ?>" >

    <table>
        <tr >
            <td class="width_50">
                
            </td>
            <td class="width_100">
                Number
            </td>
            <td class="width_150">
                Logged At
            </td>
            <td>
                message
            </td>
        </tr>

        <?php $counter = $start + 1; foreach($user_logs as $user) { ?>
        <tr>
            <td>
Example #22
0
</body>
</html>

<?php 
} else {
    $url_c = geturlarray($url);
    $params = array_merge($_GET, $_POST);
    //don't pass throught the parameter we are using
    unset($params["laudurl"]);
    //create the query or post parameters
    $query = http_build_query($params);
    if ($query != "") {
        $url_c["query"] = $query;
    }
    //get the files
    $fp = fopen(buildurl($url_c), "rb");
    // use the headers, except the response code which is popped off the array
    $headers = $http_response_header;
    // pop
    array_shift($headers);
    // fix cookies
    $headers = rewritecookies($headers);
    $ctype = getcontenttype($headers);
    $cencoding = getcontentencoding($headers);
    // we will remove gzip encoding later, but we need to remove the header now
    // before it is added to the response.
    if ($cencoding == "gzip") {
        $headers = removeheader("Content-Encoding", $headers);
    }
    // set headers for response to client
    if (preg_match("/text|image/", $ctype)) {
Example #23
0
 public static function folder($dir = '', $type = NULL)
 {
     $dir = trim($dir, '/');
     $sDir = $dir;
     $_GET['dir'] && ($gDir = trim($_GET['dir'], '/'));
     // print_r('$dir='.$dir.'<br />');
     // print_r('$gDir='.$gDir.'<br />');
     //$gDir && $dir = $gDir;
     //strstr($dir,'.')!==false  && self::alert('What are you doing?','',1000000);
     //strstr($dir,'..')!==false && self::alert('What are you doing?','',1000000);
     $sDir_PATH = iFS::path_join(iPATH, $sDir);
     $iDir_PATH = iFS::path_join($sDir_PATH, $gDir);
     // print_r('$sDir_PATH='.$sDir_PATH."\n");
     // print_r('$iDir_PATH='.$iDir_PATH."\n");
     strpos($iDir_PATH, $sDir_PATH) === false && self::_error(array('code' => 0, 'state' => 'DIR_Error'));
     if (!is_dir($iDir_PATH)) {
         return false;
     }
     $url = buildurl(false, 'dir');
     if ($handle = opendir($iDir_PATH)) {
         while (false !== ($rs = readdir($handle))) {
             // print_r('$rs='.$rs."\n");
             $filepath = iFS::path_join($iDir_PATH, $rs);
             $filepath = rtrim($filepath, '/');
             //              print_r('$filepath='.$filepath."\n");
             $sFileType = @filetype($filepath);
             //              print_r('$sFileType='.$sFileType."\n");
             // var_dump($sDir_PATH,$filepath);
             $path = str_replace($sDir_PATH, '', $filepath);
             $path = ltrim($path, '/');
             if ($sFileType == "dir" && !in_array($rs, array('.', '..', 'admincp'))) {
                 $dirArray[] = array('path' => $path, 'name' => $rs, 'url' => $url . urlencode($path));
             }
             if ($sFileType == "file" && !in_array($rs, array('..', '.iPHP'))) {
                 $filext = iFS::get_ext($rs);
                 $fileinfo = array('path' => $path, 'dir' => dirname($path), 'url' => iFS::fp($path, '+http'), 'name' => $rs, 'modified' => get_date(filemtime($filepath), "Y-m-d H:i:s"), 'md5' => md5_file($filepath), 'ext' => $filext, 'size' => iFS::sizeUnit(filesize($filepath)));
                 if ($type) {
                     in_array(strtolower($filext), $type) && ($fileArray[] = $fileinfo);
                 } else {
                     $fileArray[] = $fileinfo;
                 }
             }
         }
     }
     $a['DirArray'] = (array) $dirArray;
     $a['FileArray'] = (array) $fileArray;
     $a['pwd'] = str_replace($sDir_PATH, '', $iDir_PATH);
     $a['pwd'] = trim($a['pwd'], '/');
     $pos = strripos($a['pwd'], '/');
     $a['parent'] = ltrim(substr($a['pwd'], 0, $pos), '/');
     $a['URI'] = $url;
     // var_dump($a);
     //      exit;
     return $a;
 }
Example #24
0
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
             array(ACTION => ACTION_CREATE."users")); ?>">
          Create User
     </a>
 </div>
 <div class="clear">
     <a href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
             array(ACTION => ACTION_LIST."users")); ?>">
          View Users
     </a>
 </div>
Example #25
0
$viewer['title']    = isset($title) ? $title : "No Title";
$viewer['content']  = isset($content) ? BBConsumer::consume($content) : "No Content";

if (isset($user_id) &&
        BoydsnestSession::GetInstance()->get(USERS_CANMESSAGE) &&
        BoydsnestSession::GetInstance()->get(USERS_USERID) != $user_id)
{
?>

<a style="float: left" href="<?php echo buildurl(BN_URL_PAGE_ADMIN,
        array(ACTION => ACTION_WRITE."message", USERS_USERID => $user_id)); ?>">Respond</a>
<?php
}
if (isset($message_id))
{
?>

<form style="float: left" action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
        array(ACTION => ACTION.ACTION_DELETE."readmessage")); ?>" method="post">
    <input type="submit" value="Delete" />
    <input type="hidden" name="<?php echo DBMessage::MESSAGE_ID; ?>[]" value="<?php echo $message_id; ?>" />
</form>
<?php
}
?>

<br />

<?php
echo FCore::LoadViewPHP("content/BasicTextViewer", $viewer);
?>
Example #26
0
 public static function pagenav($total, $displaypg = 20, $unit = "条记录", $url = '', $target = '')
 {
     $displaypg = intval($displaypg);
     $page = $GLOBALS["page"] ? intval($GLOBALS["page"]) : 1;
     $lastpg = ceil($total / $displaypg);
     //最后页,也是总页数
     $page = min($lastpg, $page);
     $prepg = $page - 1 < 0 ? "0" : $page - 1;
     //上一页
     $nextpg = $page == $lastpg ? 0 : $page + 1;
     //下一页
     $url = buildurl($url, array('total_num' => $total, 'page' => ''));
     self::$offset = ($page - 1) * $displaypg;
     self::$offset < 0 && (self::$offset = 0);
     self::$pagenav = "<ul><li><a href='{$url}1' target='_self'>首页</a></li>";
     self::$pagenav .= $prepg ? "<li><a href='{$url}{$prepg}' target='_self'>上一页</a></li>" : '<li class="disabled"><a href="javascript:;">上一页</a></li>';
     $flag = 0;
     for ($i = $page - 2; $i <= $page - 1; $i++) {
         if ($i < 1) {
             continue;
         }
         self::$pagenav .= "<li><a href='{$url}{$i}' target='_self'>{$i}</a></li>";
     }
     self::$pagenav .= '<li class="active"><a href="javascript:;">' . $page . '</a></li>';
     for ($i = $page + 1; $i <= $lastpg; $i++) {
         self::$pagenav .= "<li><a href='{$url}{$i}' target='_self'>{$i}</a></li>";
         $flag++;
         if ($flag == 4) {
             break;
         }
     }
     self::$pagenav .= $nextpg ? "<li><a href='{$url}{$nextpg}' target='_self'>下一页</a></li>" : '<li class="disabled"><a href="javascript:;">下一页</a></li>';
     self::$pagenav .= "<li><a href='{$url}{$lastpg}' target='_self'>末页</a></li>";
     self::$pagenav .= "<li> <span class=\"muted\">共{$total}{$unit},{$displaypg}{$unit}/页 共{$lastpg}页</span></li>";
     for ($i = 1; $i <= $lastpg; $i = $i + 5) {
         $s = $i == $page ? ' selected="selected"' : '';
         $select .= "<option value=\"{$i}\"{$s}>{$i}</option>";
     }
     if ($lastpg > 200) {
         self::$pagenav .= "<li> <span class=\"muted\">跳到 <input type=\"text\" id=\"pageselect\" style=\"width:24px;height:12px;margin-bottom: 0px;line-height: 12px;\" /> 页 <input class=\"btn btn-small\" type=\"button\" onClick=\"window.location='{$url}'+\$('#pageselect').val();\" value=\"跳转\" style=\"height: 22px;line-height: 18px;\"/></span></li>";
     } else {
         self::$pagenav .= "<li> <span class=\"muted\">跳到 <select id=\"pageselect\" style=\"width:48px;height:20px;margin-bottom: 3px;line-height: 16px;padding: 0px\" onchange=\"window.location='{$url}'+this.value\">{$select}</select> 页</span></li>";
     }
     self::$pagenav .= '</ul>';
     //(int)$lastpg<2 &&UCP::$pagenav='';
 }
Example #27
0
        <fieldset class="bn_fieldset">
            <legend>Pass Master To User</legend>
            <form action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                    array(ACTION => ACTION.ACTION_PASS."usermaster", USERS_USERID => $user_data[USERS_USERID])); ?>" method="post">
                <input type="hidden" name="<?php echo USERS_USERID; ?>" value="<?php echo $user_data[USERS_USERID]; ?>" />
                <input type="submit" value="Pass Master" />

                <br />
                This is not reversible unless the user that gets master
                <br />
                passes it back to you.
                <br />

            </form>
        </fieldset>

        <fieldset class="bn_fieldset">
            <legend>Delete User</legend>
            <form action="<?php echo buildurl(BN_URL_PAGE_ADMIN,
                    array(ACTION => ACTION.ACTION_DELETE."users", USERS_USERID => $user_data[USERS_USERID])); ?>" method="post">
                <input type="hidden" name="<?php echo USERS_USERID; ?>" value="<?php echo $user_data[USERS_USERID]; ?>" />
                <input type="submit" value="Delete User" />

                <br />
                This is not reversible and will delete all of the pages,
                <br />
                messages, and all other data associated to this user.
                <br />

            </form>
        </fieldset>