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


PHP pnVarPrepHTMLDisplay函数代码示例

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


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

示例1: smarty_function_exampleadminlinks

/**
 * Smarty function to display admin links for the example module
 * based on the user's permissions
 * 
 * Example
 * <!--[exampleadminlinks start="[" end="]" seperator="|" class="pn-menuitem-title"]-->
 * 
 * @author       Andreas Krapohl
 * @since        10/01/04
 * @see          function.exampleadminlinks.php::smarty_function_exampleadminlinks()
 * @param        array       $params      All attributes passed to this function from the template
 * @param        object      &$smarty     Reference to the Smarty object
 * @param        string      $start       start string
 * @param        string      $end         end string
 * @param        string      $seperator   link seperator
 * @param        string      $class       CSS class
 * @return       string      the results of the module function
 */
function smarty_function_exampleadminlinks($params, &$smarty)
{
    extract($params);
    unset($params);
    // set some defaults
    if (!isset($start)) {
        $start = '[';
    }
    if (!isset($end)) {
        $end = ']';
    }
    if (!isset($seperator)) {
        $seperator = '|';
    }
    if (!isset($class)) {
        $class = 'pn-menuitem-title';
    }
    $adminlinks = "<span class=\"{$class}\">{$start} ";
    if (pnSecAuthAction(0, 'Example::', '::', ACCESS_READ)) {
        $adminlinks .= "<a href=\"" . pnVarPrepHTMLDisplay(pnModURL('Example', 'admin', 'view')) . "\">" . _VIEW . "</a> ";
    }
    if (pnSecAuthAction(0, 'Example::', '::', ACCESS_ADD)) {
        $adminlinks .= "{$seperator} <a href=\"" . pnVarPrepHTMLDisplay(pnModURL('Example', 'admin', 'new')) . "\">" . _NEW . "</a> ";
    }
    if (pnSecAuthAction(0, 'Example::', '::', ACCESS_ADMIN)) {
        $adminlinks .= "{$seperator} <a href=\"" . pnVarPrepHTMLDisplay(pnModURL('Example', 'admin', 'modifyconfig')) . "\">" . _MODIFYCONFIG . "</a> ";
    }
    $adminlinks .= "{$end}</span>\n";
    return $adminlinks;
}
开发者ID:grlf,项目名称:eyedock,代码行数:48,代码来源:function.lenses_admin_links.php

示例2: blocks_ephem_block

function blocks_ephem_block($row)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    $currentlang = pnUserGetLang();
    if (!pnSecAuthAction(0, 'Ephemeridsblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    if (pnConfigGetVar('multilingual') == 1) {
        $column =& $pntable['ephem_column'];
        $querylang = "AND ({$column['elanguage']}='" . pnVarPrepForStore($currentlang) . "' OR {$column['elanguage']}='')";
    } else {
        $querylang = "";
    }
    $today = getdate();
    $eday = $today['mday'];
    $emonth = $today['mon'];
    $column =& $pntable['ephem_column'];
    $result = $dbconn->Execute("SELECT {$column['yid']}, {$column['content']}\n                              FROM {$pntable['ephem']}\n                              WHERE {$column['did']}='" . pnVarPrepForStore($eday) . "' AND {$column['mid']}='" . pnVarPrepForStore($emonth) . "' {$querylang}");
    $boxstuff = '<span class="pn-normal"><b>' . _ONEDAY . '</b></span><br />';
    while (list($yid, $content) = $result->fields) {
        $result->MoveNext();
        $boxstuff .= '<br /><br />';
        $boxstuff .= '<b>' . pnVarPrepForDisplay($yid) . '</b><br />' . pnVarPrepHTMLDisplay(nl2br($content)) . '';
    }
    if (empty($row['title'])) {
        $row['title'] = _EPHEMERIDS;
    }
    $row['content'] = $boxstuff;
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:31,代码来源:ephem.php

示例3: Tools_admin_main

function Tools_admin_main()
{
    // Permission check.
    if (!pnSecAuthAction(0, 'Tools::', '::', ACCESS_ADMIN)) {
        return pnVarPrepHTMLDisplay(_MODNOAUTH);
    }
    // Create a new output object.
    $pnRender =& new pnRender('Tools');
    // Return template.
    return $pnRender->fetch('tools_admin.htm');
}
开发者ID:grlf,项目名称:eyedock,代码行数:11,代码来源:pnadmin.php

示例4: blocks_weblinks_display

function blocks_weblinks_display($row)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    if (!pnSecAuthAction(0, 'Weblinksblock::', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    $url = explode('|', $row['url']);
    if (!$url[0]) {
        $row['content'] = 'You forgot to set the module name!';
        return themesideblock($row);
    }
    if (!$url[1]) {
        $url[1] = 10;
    }
    $links_col =& $pntable['links_links_column'];
    $linksok = 0;
    $linkcount = 0;
    $result = $dbconn->Execute("SELECT {$links_col['cat_id']}, {$links_col['title']} FROM {$pntable['links_links']} ORDER BY {$links_col['date']} DESC");
    while (list($cid, $title) = $result->fields) {
        $result->MoveNext();
        $linkcount++;
        if (pnSecAuthAction(0, "Web Links::Category", "{$title}::{$cid}", ACCESS_READ)) {
            $linksok++;
        }
        if ($linksok == $url[1]) {
            break;
        }
    }
    $oldurl = $url[1];
    $url[1] = $linkcount;
    $row['content'] = '<span class="pn-normal">';
    $links_col =& $pntable['links_links_column'];
    $cats_col =& $pntable['links_categories_column'];
    $sql = "SELECT {$links_col['lid']} as lid, {$links_col['cat_id']} as catid, {$links_col['title']} as title, {$links_col['description']} as description, {$links_col['hits']} as hits, IF({$links_col['cat_id']}, CONCAT('/', {$cats_col['title']}), {$cats_col['title']}) AS cattitle\n               FROM {$pntable['links_links']}\n               LEFT JOIN {$pntable['links_categories']}\n               ON {$cats_col['cat_id']}={$links_col['cat_id']}\n               ORDER BY {$links_col['date']} DESC";
    $result = $dbconn->SelectLimit($sql, $url[1]);
    while (!$result->EOF) {
        $lrow = $result->GetRowAssoc(false);
        if (pnSecAuthAction(0, "Web Links::Category", "{$lrow['cattitle']}::{$lrow['catid']}", ACCESS_READ)) {
            $lrow['title'] = pnVarPrepForDisplay($lrow['title']);
            $lrow['description'] = pnVarPrepHTMLDisplay($lrow['description']);
            $lrow['cattitle'] = pnVarPrepForDisplay($lrow['cattitle']);
            $row['content'] .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?op=modload&amp;name={$url['0']}&amp;file=index&amp;req=visit&amp;lid={$lrow['lid']}\" target=\"_blank\" title=\"{$lrow['cattitle']}:\n{$lrow['description']}\" class=\"pn-sub\">{$lrow['title']}</a><br>\n";
            $result->MoveNext();
        }
    }
    //$row['content'] .= "<div align=\"right\"><font class=\"pn-sub\"><a href=\"modules.php?op=modload&name=Web_Links&file=index&req=NewLinks&newlinkshowdays=10\">"._READMORE."</a></font></div>";
    $row['content'] .= '</span>';
    return themesideblock($row);
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:50,代码来源:weblinks.php

示例5: search_stories


//.........这里部分代码省略.........
    // authors
    if (isset($stories_author) && $stories_author != '') {
        if (!$no_flag) {
            $query .= ' AND (';
        }
        $query .= "{$storcol['informant']}='" . pnVarPrepForStore($stories_author) . "'";
        $result =& $dbconn->Execute("SELECT {$pntable['users_column']['uid']} as pn_uid FROM {$pntable['users']} WHERE {$pntable['users_column']['uname']} LIKE '%" . pnVarPrepForStore($stories_author) . "%' OR {$pntable['users_column']['name']} LIKE '%" . pnVarPrepForStore($stories_author) . "%'");
        while (!$result->EOF) {
            $row = $result->GetRowAssoc(false);
            $query .= " OR {$storcol['aid']}={$row['pn_uid']}";
            $result->MoveNext();
        }
        if (!$no_flag) {
            $query .= ') ';
            $no_flag = false;
        }
    } else {
        $stories_author = '';
    }
    if (pnConfigGetVar('multilingual') == 1) {
        if (!empty($query)) {
            $query .= ' AND';
        }
        $query .= " ({$storcol['alanguage']}='" . pnVarPrepForStore(pnUserGetLang()) . "' OR {$storcol['alanguage']}='')";
    }
    if (empty($query)) {
        $query = '1';
    }
    $query .= " ORDER BY {$storcol['time']} DESC";
    $query = $query1 . $query;
    // get the total count with permissions!
    if (empty($total)) {
        $total = 0;
        $countres =& $dbconn->Execute($query);
        // check for a db error
        if ($dbconn->ErrorNo() != 0) {
            return;
        }
        while (!$countres->EOF) {
            $row = $countres->GetRowAssoc(false);
            if (pnSecAuthAction(0, 'Stories::Story', "{$row['aid']}:{$row['cat_title']}:{$row['sid']}", ACCESS_READ) && pnSecAuthAction(0, 'Topics::Topic', "{$row['topicname']}::{$row['topicid']}", ACCESS_READ)) {
                $total++;
            }
            $countres->MoveNext();
        }
    }
    $result = $dbconn->SelectLimit($query, 10, $startnum - 1);
    // check for a db error
    if ($dbconn->ErrorNo() != 0) {
        return;
    }
    if (!$result->EOF) {
        $output->Text(_STORIES_TOPICS . ': ' . $total . ' ' . _SEARCHRESULTS);
        $output->SetInputMode(_PNH_VERBATIMINPUT);
        // Rebuild the search string from previous information
        $url = 'index.php?name=Search&amp;action=search&amp;active_stories=1&amp;stories_author=' . pnVarPrepForDisplay($stories_author);
        if (isset($stories_cat) && $stories_cat) {
            foreach ($stories_cat as $v) {
                $url .= "&amp;stories_cat%5B%5D={$v}";
            }
        }
        if (isset($stories_topics) && $stories_topics) {
            foreach ($stories_topics as $v) {
                $url .= "&amp;stories_topics%5B%5D={$v}";
            }
        }
        $url .= '&amp;bool=' . pnVarPrepForDisplay($bool);
        if (isset($q)) {
            $url .= '&amp;q=' . pnVarPrepForDisplay($q);
        }
        $output->Text('<dl>');
        while (!$result->EOF) {
            $row = $result->GetRowAssoc(false);
            if (pnSecAuthAction(0, 'Stories::Story', "{$row['aid']}:{$row['cat_title']}:{$row['sid']}", ACCESS_READ) && pnSecAuthAction(0, 'Topics::Topic', "{$row['topicname']}::{$row['topicid']}", ACCESS_READ)) {
                $row['fdate'] = ml_ftime(_DATELONG, $result->UnixTimeStamp($row['fdate']));
                $output->Text('<dt><a href="index.php?name=News&amp;file=article&amp;sid=' . pnVarPrepForDisplay($row['sid']) . '">' . pnVarPrepHTMLDisplay($row['story_title']) . '</a></dt>');
                $output->Text('<dd>');
                $output->Text(pnVarPrepForDisplay($row['fdate']) . ' (');
                if (!empty($row['topicid'])) {
                    $output->Text($row['topictext']);
                }
                if (!empty($row['catid'])) {
                    $output->Text(' - ' . pnVarPrepHTMLDisplay($row['cat_title']));
                }
                $output->Text(')</dd>');
            }
            $result->MoveNext();
        }
        $output->Text('</dl>');
        // Munge URL for template
        $urltemplate = $url . "&amp;startnum=%%&amp;total={$total}";
        $output->Pager($startnum, $total, $urltemplate, 10);
    } else {
        $output->SetInputMode(_PNH_VERBATIMINPUT);
        $output->Text(_SEARCH_NO_STORIES_TOPICS);
        $output->SetInputMode(_PNH_PARSEINPUT);
    }
    $output->Linebreak(3);
    return $output->GetOutput();
}
开发者ID:BackupTheBerlios,项目名称:freshwind-svn,代码行数:101,代码来源:stories.php

示例6: Example_admin_updateconfig

/**
 * Update the configuration
 *
 * This is a standard function to update the configuration parameters of the
 * module given the information passed back by the modification form
 * Modify configuration
 *
 * @author       Jim McDonald
 * @param        bold           print items in bold
 * @param        itemsperpage   number of items per page
 */
function Example_admin_updateconfig()
{
    // Security check - important to do this as early as possible to avoid
    // potential security holes or just too much wasted processing
    if (!pnSecAuthAction(0, 'Example::', '::', ACCESS_ADMIN)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
    }
    // Get parameters from whatever input we need.  All arguments to this
    // function should be obtained from pnVarCleanFromInput(), getting them
    // from other places such as the environment is not allowed, as that makes
    // assumptions that will not hold in future versions of PostNuke
    list($bold, $itemsperpage) = pnVarCleanFromInput('bold', 'itemsperpage');
    // Confirm authorisation code.  This checks that the form had a valid
    // authorisation code attached to it.  If it did not then the function will
    // proceed no further as it is possible that this is an attempt at sending
    // in false data to the system
    if (!pnSecConfirmAuthKey()) {
        pnSessionSetVar('errormsg', pnVarPrepHTMLDisplay(_BADAUTHKEY));
        return pnRedirect(pnModURL('Example', 'admin', 'view'));
    }
    // Update module variables.  Note that depending on the HTML structure used
    // to obtain the information from the user it is possible that the values
    // might be empty, so it is important to check them all and assign them
    // default values if required.
    // ** Please note pnVarCleanFromInput will always return a set variable, even
    // it's empty so isset() checking is not appropriate.
    if (empty($bold)) {
        $bold = false;
    }
    pnModSetVar('Example', 'bold', (bool) $bold);
    if (empty($itemsperpage)) {
        $itemsperpage = 10;
    }
    // make sure $itemsperpage is a positive integer
    if (!is_integer($itemsperpage) || $itemsperpage < 1) {
        pnSessionSetVar('errormsg', pnVarPrepForDisplay(_EXAMPLEITEMSPERPAGE));
        $itemsperpage = (int) $itemsperpage;
        if ($itemsperpage < 1) {
            $itemsperpage = 25;
        }
    }
    pnModSetVar('Example', 'itemsperpage', $itemsperpage);
    // The configuration has been changed, so we clear all caches for
    // this module.
    $pnRender =& new pnRender('Example');
    // Please note that by using clear_cache without any parameter,
    // we clear all cached pages for this module.
    $pnRender->clear_cache();
    // the module configuration has been updated successfuly
    pnSessionSetVar('statusmsg', _CONFIGUPDATED);
    // Let any other modules know that the modules configuration has been updated
    pnModCallHooks('module', 'updateconfig', 'Example', array('module' => 'Example'));
    // This function generated no output, and so now it is complete we redirect
    // the user to an appropriate page for them to carry on their work
    return pnRedirect(pnModURL('Example', 'admin', 'view'));
}
开发者ID:grlf,项目名称:eyedock,代码行数:67,代码来源:calc_contact_lens.php

示例7: postcalendar_adminapi_buildAdminList

function postcalendar_adminapi_buildAdminList($args)
{
    extract($args);
    $output = new pnHTML();
    $output->SetInputMode(_PNH_VERBATIMINPUT);
    pnThemeLoad(pnUserGetTheme());
    // get the theme globals :: is there a better way to do this?
    global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5;
    global $textcolor1, $textcolor2;
    $formUrl = pnModUrl(__POSTCALENDAR__, 'admin', 'adminevents');
    $output->FormStart($formUrl);
    $output->Text('<table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="' . $bgcolor2 . '"><tr><td>');
    $output->Text('<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="' . $bgcolor1 . '"><tr><td>');
    $output->Text('<center><font size="4"><b>' . $title . '</b></font></center>');
    $output->Text('</td></tr></table>');
    $output->Text('</td></tr></table>');
    $output->Linebreak();
    $output->Text('<table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="' . $bgcolor2 . '"><tr><td>');
    $output->Text('<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="' . $bgcolor1 . '">');
    if (!$result || $result->EOF) {
        $output->Text('<tr><td width="100%" bgcolor="' . $bgcolor1 . '" align="center"><b>' . _PC_NO_EVENTS . '</b></td></tr>');
    } else {
        $output->Text('<tr><td bgcolor="' . $bgcolor1 . '" align="center"><b>' . _PC_EVENTS . '</b></td></tr>');
        $output->Text('<table border="0" cellpadding="2" cellspacing="0" width="100%" bgcolor="' . $bgcolor1 . '">');
        // build sorting urls
        if (!isset($sdir)) {
            $sdir = 1;
        } else {
            $sdir = $sdir ? 0 : 1;
        }
        $title_sort_url = pnModUrl(__POSTCALENDAR__, 'admin', $function, array('offset' => $offset, 'sort' => 'title', 'sdir' => $sdir));
        $time_sort_url = pnModUrl(__POSTCALENDAR__, 'admin', $function, array('offset' => $offset, 'sort' => 'time', 'sdir' => $sdir));
        $output->Text('<tr><td>select</td><td><a href="' . $title_sort_url . '">title</a></td><td><a href="' . $time_sort_url . '">timestamp</a><td></tr>');
        // output the queued events
        $count = 0;
        for (; !$result->EOF; $result->MoveNext()) {
            list($eid, $title, $timestamp) = $result->fields;
            $output->Text('<tr>');
            $output->Text('<td align="center" valign="top">');
            $output->FormCheckbox('pc_event_id[]', false, $eid);
            $output->Text('</td>');
            $output->Text('<td  align="left" valign="top" width="100%">');
            $output->URL(pnModURL(__POSTCALENDAR__, 'admin', 'edit', array('pc_event_id' => $eid)), pnVarPrepHTMLDisplay(postcalendar_removeScriptTags($title)));
            $output->Text('</td>');
            $output->Text('<td  align="left" valign="top" nowrap>');
            $output->Text($timestamp);
            $output->Text('</td>');
            $output->Text('</tr>');
            $count++;
        }
        $output->Text('</table>');
    }
    $output->Text('</td></tr></table>');
    if ($result->NumRows()) {
        $output->Linebreak();
        // action to take?
        $output->Text('<table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="' . $bgcolor2 . '"><tr><td>');
        $output->Text('<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="' . $bgcolor1 . '"><tr>');
        $output->Text('<td align="left" valign="middle">');
        $seldata[0]['id'] = _ADMIN_ACTION_VIEW;
        $seldata[0]['selected'] = 1;
        $seldata[0]['name'] = _PC_ADMIN_ACTION_VIEW;
        $seldata[1]['id'] = _ADMIN_ACTION_APPROVE;
        $seldata[1]['selected'] = 0;
        $seldata[1]['name'] = _PC_ADMIN_ACTION_APPROVE;
        $seldata[2]['id'] = _ADMIN_ACTION_HIDE;
        $seldata[2]['selected'] = 0;
        $seldata[2]['name'] = _PC_ADMIN_ACTION_HIDE;
        $seldata[3]['id'] = _ADMIN_ACTION_DELETE;
        $seldata[3]['selected'] = 0;
        $seldata[3]['name'] = _PC_ADMIN_ACTION_DELETE;
        $output->FormSelectMultiple('action', $seldata);
        $output->FormHidden('thelist', $function);
        $output->FormSubmit(_PC_PERFORM_ACTION);
        $output->Text('</td>');
        $output->Text('</tr></table>');
        $output->Text('</td></tr></table>');
        $output->Linebreak();
        // start previous next links
        $output->Text('<table border="0" cellpadding="1" cellspacing="0" width="100%" bgcolor="' . $bgcolor2 . '"><tr><td>');
        $output->Text('<table border="0" cellpadding="5" cellspacing="0" width="100%" bgcolor="' . $bgcolor1 . '"><tr>');
        if ($offset > 1) {
            $output->Text('<td align="left">');
            $next_link = pnModUrl(__POSTCALENDAR__, 'admin', $function, array('offset' => $offset - $offset_increment, 'sort' => $sort, 'sdir' => $sdir));
            $output->Text('<a href="' . $next_link . '"><< ' . _PC_PREV . ' ' . $offset_increment . '</a>');
            $output->Text('</td>');
        } else {
            $output->Text('<td align="left"><< ' . _PC_PREV . '</td>');
        }
        if ($result->NumRows() >= $offset_increment) {
            $output->Text('<td align="right">');
            $next_link = pnModUrl(__POSTCALENDAR__, 'admin', $function, array('offset' => $offset + $offset_increment, 'sort' => $sort, 'sdir' => $sdir));
            $output->Text('<a href="' . $next_link . '">' . _PC_NEXT . ' ' . $offset_increment . ' >></a>');
            $output->Text('</td>');
        } else {
            $output->Text('<td align="right">' . _PC_NEXT . ' >></td>');
        }
        $output->Text('</tr></table>');
    }
    $output->Text('</td></tr></table>');
//.........这里部分代码省略.........
开发者ID:juggernautsei,项目名称:openemr,代码行数:101,代码来源:pnadminapi.php

示例8: Lenses_user_compare_view

function Lenses_user_compare_view($args)
{
    if (!pnSecAuthAction(0, 'Lenses::', '::', ACCESS_OVERVIEW)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
    }
    $lens = pnVarCleanFromInput('lens');
    extract($args);
    //an array object that will be returned.  It will be two dimensional ... $array[field][tid]
    $field_array = array();
    $pnRender =& new pnRender('Lenses');
    foreach ($lens as $tid => $value) {
        $temp_array = pnModAPIFunc('Lenses', 'user', 'get', array('item_type' => 'lens', 'item_id' => $tid));
        foreach ($temp_array as $field => $property) {
            $field_array[$field][$tid] = $property;
        }
    }
    $pnRender->assign('field_array', $field_array);
    //print_r($field_array);
    return $pnRender->fetch('lenses_user_compare_view.htm');
}
开发者ID:grlf,项目名称:eyedock,代码行数:20,代码来源:pnuser.php

示例9: Lenses_adminapi_report_company

function Lenses_adminapi_report_company($args)
{
    // Clean $tid from input.
    $comp_tid = pnVarCleanFromInput('comp_tid');
    // Get arguments from argument array
    extract($args);
    // Ensure valid values were passed in.
    if (empty($comp_tid) || !is_numeric($comp_tid)) {
        return pnVarPrepHTMLDisplay('Invalid company id.');
    }
    //set up the array that will be returned
    $items = array();
    // Get datbase setup
    list($dbconn) = pnDBGetConn();
    //get the table info
    $pntable =& pnDBGetTables();
    $table_lens =& $pntable['lenses'];
    $field_lens =& $pntable['lenses_column'];
    $table_polymer =& $pntable['lenses_polymers'];
    $field_polymer =& $pntable['lenses_polymers_column'];
    $sql = "SELECT * FROM {$table_lens} \n               LEFT JOIN {$table_polymer} ON {$field_polymer['poly_tid']} = {$field_lens['poly_id']}\n               WHERE {$field_lens['comp_id']} = {$comp_tid} AND {$field_lens['display']} = 1;";
    //echo ("<p>".$sql."</p>");
    $result = $dbconn->Execute($sql);
    //print_r ($result);die;
    // Check for an error with the database code, and if so set an appropriate
    // error message and return
    if ($dbconn->ErrorNo() != 0) {
        return false;
    }
    // get polymer data to switch polymer IDs for polymer names
    $polymer_data = pnModAPIFunc('Lenses', 'user', 'getall', array('item_type' => 'polymers'));
    for (; !$result->EOF; $result->MoveNext()) {
        list($tid, $name, $aliases, $comp_id, $poly_id, $visitint, $ew, $ct, $dk, $oz, $process_text, $process_simple, $qty, $replace_simple, $replace_text, $wear, $price, $markings, $fitting_guide, $website, $image, $other_info, $discontinued, $display, $redirect, $bc_simple, $bc_all, $max_plus, $max_minus, $max_diam, $min_diam, $diam_1, $base_curves_1, $powers_1, $diam_2, $base_curves_2, $powers_2, $diam_3, $base_curves_3, $powers_3, $sph_notes, $toric, $toric_type, $toric_type_simple, $cyl_power, $max_cyl_power, $cyl_axis, $cyl_axis_steps, $oblique, $cyl_notes, $bifocal, $bifocal_type, $add_text, $max_add, $cosmetic, $enh_names, $enh_names_simple, $opaque_names, $opaque_names_simple, $updated) = $result->fields;
        $items_array[$tid] = array('tid' => $tid, 'name' => $name, 'aliases' => $aliases, 'comp_id' => $comp_id, 'comp_name' => $company_data[$comp_id][comp_name], 'poly_id' => $poly_id, 'poly_name' => $polymer_data[$poly_id][poly_name], 'fda_grp' => $polymer_data[$poly_id][fda_grp], 'h2o' => $polymer_data[$poly_id][h2o], 'visitint' => $visitint, 'ew' => $ew, 'ct' => $ct, 'dk' => $dk, 'oz' => $oz, 'process_text' => $process_text, 'process_simple' => $process_simple, 'qty' => $qty, 'replace_simple' => $replace_simple, 'replace_text' => $replace_text, 'wear' => $wear, 'price' => $price, 'markings' => $markings, 'fitting_guide' => $fitting_guide, 'website' => $website, 'image' => $image, 'other_info' => $other_info, 'discontinued' => $discontinued, 'display' => $display, 'redirect' => $redirect, 'bc_simple' => $bc_simple, 'bc_all' => $bc_all, 'max_plus' => $max_plus, 'max_minus' => $max_minus, 'max_diam' => $max_diam, 'min_diam' => $min_diam, 'diam_1' => $diam_1, 'base_curves_1' => $base_curves_1, 'powers_1' => $powers_1, 'diam_2' => $diam_2, 'base_curves_2' => $base_curves_2, 'powers_2' => $powers_2, 'diam_3' => $diam_3, 'base_curves_3' => $base_curves_3, 'powers_3' => $powers_3, 'sph_notes' => $sph_notes, 'toric' => $toric, 'toric_type' => $toric_type, 'toric_type_simple' => $toric_type_simple, 'cyl_power' => $cyl_power, 'max_cyl_power' => $max_cyl_power, 'cyl_axis' => $cyl_axis, 'cyl_axis_steps' => $cyl_axis_steps, 'oblique' => $oblique, 'cyl_notes' => $cyl_notes, 'bifocal' => $bifocal, 'bifocal_type' => $bifocal_type, 'add_text' => $add_text, 'max_add' => $max_add, 'cosmetic' => $cosmetic, 'enh_names' => $enh_names, 'enh_names_simple' => $enh_names_simple, 'opaque_names' => $opaque_names, 'opaque_names_simple' => $opaque_names_simple, 'updated' => $updated);
    }
    //print_r ($items_array);die;
    // Return the item array
    return $items_array;
}
开发者ID:grlf,项目名称:eyedock,代码行数:39,代码来源:pnadminapi.php

示例10: search_comments

function search_comments()
{
    list($active_comments, $startnum, $total, $bool, $q) = pnVarCleanFromInput('active_comments', 'startnum', 'total', 'bool', 'q');
    if (empty($active_comments)) {
        return;
    }
    if (!pnModAvailable('Comments')) {
        return;
    }
    $dbconn =& pnDBGetConn(true);
    $pntable =& pnDBGetTables();
    $output =& new pnHTML();
    $output->SetInputMode(_PNH_VERBATIMINPUT);
    if (!isset($startnum) || !is_numeric($startnum)) {
        $startnum = 1;
    }
    if (isset($total) && !is_numeric($total)) {
        unset($total);
    }
    $w = search_split_query($q);
    $flag = false;
    $column =& $pntable['comments_column'];
    $query = "SELECT {$column['subject']} as subject, {$column['tid']} as tid, ";
    $query .= "{$column['sid']} as sid, {$column['pid']} as pid, {$column['comment']} as comment FROM {$pntable['comments']} WHERE ";
    foreach ($w as $word) {
        if ($flag) {
            switch ($bool) {
                case 'AND':
                    $query .= ' AND ';
                    break;
                case 'OR':
                default:
                    $query .= ' OR ';
                    break;
            }
        }
        $query .= '(';
        $query .= "{$column['subject']} LIKE '" . pnVarPrepForStore($word) . "' OR ";
        $query .= "{$column['comment']} LIKE '" . pnVarPrepForStore($word) . "'";
        $query .= ')';
        $flag = true;
    }
    $query .= " ORDER BY {$column['subject']}";
    if (empty($total)) {
        $countres =& $dbconn->Execute($query);
        // check for a db error
        if ($dbconn->ErrorNo() != 0) {
            return;
        }
        $total = $countres->PO_RecordCount();
        $countres->Close();
    }
    $result = $dbconn->SelectLimit($query, 10, $startnum - 1);
    // check for a db error
    if ($dbconn->ErrorNo() != 0) {
        return;
    }
    if (!$result->EOF) {
        $output->Text(_COMMENTS . ': ' . $total . ' ' . _SEARCHRESULTS);
        $output->SetInputMode(_PNH_VERBATIMINPUT);
        // Rebuild the search string from previous information
        $url = "index.php?name=Search&amp;action=search&amp;active_comments=1&amp;bool={$bool}&amp;q={$q}";
        $output->Text('<dl>');
        while (!$result->EOF) {
            $row = $result->GetRowAssoc(false);
            $row['comment'] = strip_tags($row['comment']);
            if (strlen($row['comment']) > 128) {
                $row['comment'] = substr($row['comment'], 0, 125) . '...';
            }
            if ($row[subject] == "") {
                $row[subject] = "No title";
            }
            if ($row[pid] != 0) {
                // comment with parent posting
                $output->Text("<dt><a href=\"index.php?name=Comments&amp;req=showreply&amp;tid={$row['tid']}&amp;sid={$row['sid']}&amp;pid={$row['pid']}\">" . pnVarPrepHTMLDisplay($row[subject]) . "</a></dt>");
            } else {
                // comment without parent posting
                $output->Text("<dt><a href=\"index.php?name=Comments&amp;tid={$row['tid']}&amp;sid={$row['sid']}#{$row['tid']}\">" . pnVarPrepHTMLDisplay($row[subject]) . "</a></dt>");
            }
            $output->Text("<dd>" . pnVarPrepForDisplay($row[comment]) . "</dd>");
            $result->MoveNext();
        }
        $output->Text('</dl>');
        // Munge URL for template
        $urltemplate = $url . "&amp;startnum=%%&amp;total={$total}";
        $output->Pager($startnum, $total, $urltemplate, 10);
    } else {
        $output->SetInputMode(_PNH_VERBATIMINPUT);
        $output->Text(_SEARCH_NO_COMMENTS);
        $output->SetInputMode(_PNH_PARSEINPUT);
    }
    $output->Linebreak(3);
    return $output->GetOutput();
}
开发者ID:BackupTheBerlios,项目名称:freshwind-svn,代码行数:94,代码来源:comments.php

示例11: Lenses_admin_search_report

function Lenses_admin_search_report($args)
{
    // Clean input from the form.
    $time = pnVarCleanFromInput('time');
    // Extract any extra arguments.
    extract($args);
    // Permission check.
    if (!pnSecAuthAction(0, 'Lenses::', '::', ACCESS_ADMIN)) {
        return pnVarPrepHTMLDisplay(_MODULENOAUTH);
    }
    // Start a new output object.
    $pnRender =& new pnRender('Lenses');
    // Call API function to get all lenses.
    $lenses_data = pnModAPIFunc('Lenses', 'user', 'search_report', array('time' => $time));
    //
    // Assign $lenses to template.
    $pnRender->assign('lenses_data', $lenses_data);
    $pnRender->assign('time', $time);
    // Return templated output.
    return $pnRender->fetch('lenses_admin_search_report.htm');
}
开发者ID:grlf,项目名称:eyedock,代码行数:21,代码来源:pnadmin.php

示例12: postcalendar_admin_testSystem


//.........这里部分代码省略.........
    if (phpversion() >= '4.1.0') {
        $__SERVER =& $_SERVER;
        $__ENV =& $_ENV;
    } else {
        $__SERVER =& $HTTP_SERVER_VARS;
        $__ENV =& $HTTP_ENV_VARS;
    }
    if (defined('_PN_VERSION_NUM')) {
        $pnVersion = _PN_VERSION_NUM;
    } else {
        $pnVersion = pnConfigGetVar('Version_Num');
    }
    array_push($infos, array('CMS Version', $pnVersion));
    array_push($infos, array('Sitename', pnConfigGetVar('sitename')));
    array_push($infos, array('url', pnGetBaseURL()));
    array_push($infos, array('PHP Version', phpversion()));
    if ((bool) ini_get('safe_mode')) {
        $safe_mode = "On";
    } else {
        $safe_mode = "Off";
    }
    array_push($infos, array('PHP safe_mode', $safe_mode));
    if ((bool) ini_get('safe_mode_gid')) {
        $safe_mode_gid = "On";
    } else {
        $safe_mode_gid = "Off";
    }
    array_push($infos, array('PHP safe_mode_gid', $safe_mode_gid));
    $base_dir = ini_get('open_basedir');
    if (!empty($base_dir)) {
        $open_basedir = "{$base_dir}";
    } else {
        $open_basedir = "NULL";
    }
    array_push($infos, array('PHP open_basedir', $open_basedir));
    array_push($infos, array('SAPI', php_sapi_name()));
    array_push($infos, array('OS', php_uname()));
    array_push($infos, array('WebServer', $__SERVER['SERVER_SOFTWARE']));
    array_push($infos, array('Module dir', "modules/{$pcDir}"));
    $modversion = array();
    include "modules/{$pcDir}/pnversion.php";
    $error = '';
    if ($modversion['version'] != $version) {
        $error = '<br /><div style=\\"color: red;\\">';
        $error .= "new version {$modversion['version']} installed but not updated!";
        $error .= '</div>';
    }
    array_push($infos, array('Module version', $version . " {$error}"));
    array_push($infos, array('smarty version', $tpl->_version));
    array_push($infos, array('smarty location', SMARTY_DIR));
    array_push($infos, array('smarty template dir', $tpl->template_dir));
    $info = $tpl->compile_dir;
    $error = '';
    if (!file_exists($tpl->compile_dir)) {
        $error .= " compile dir doesn't exist! [{$tpl->compile_dir}]<br />";
    } else {
        // dir exists -> check if it's writeable
        if (!is_writeable($tpl->compile_dir)) {
            $error .= " compile dir not writeable! [{$tpl->compile_dir}]<br />";
        }
    }
    if (strlen($error) > 0) {
        $info .= "<br /><div style=\"color: red;\">{$error}</div>";
    }
    array_push($infos, array('smarty compile dir', $info));
    $info = $tpl->cache_dir;
    $error = "";
    if (!file_exists($tpl->cache_dir)) {
        $error .= " cache dir doesn't exist! [{$tpl->cache_dir}]<br />";
    } else {
        // dir exists -> check if it's writeable
        if (!is_writeable($tpl->cache_dir)) {
            $error .= " cache dir not writeable! [{$tpl->cache_dir}]<br />";
        }
    }
    if (strlen($error) > 0) {
        $info .= "<br /><div style=\"color: red;\">{$error}</div>";
    }
    array_push($infos, array('smarty cache dir', $info));
    $header = <<<EOF
\t<html>
\t<head></head>
\t<body bgcolor=
EOF;
    $header .= '"' . $GLOBALS['style']['BGCOLOR2'] . '">';
    $output .= $header;
    $output = postcalendar_adminmenu();
    $output .= '<table border="1" cellpadding="3" cellspacing="1">';
    $output .= '  <tr><th align="left">Name</th><th align="left">Value</th>';
    $output .= '</tr>';
    foreach ($infos as $info) {
        $output .= '<tr><td ><b>' . pnVarPrepHTMLDisplay($info[0]) . '</b></td>';
        $output .= '<td>' . pnVarPrepHTMLDisplay($info[1]) . '</td></tr>';
    }
    $output .= '</table>';
    $output .= '<br /><br />';
    $output .= postcalendar_admin_modifyconfig('', false);
    $output .= "</body></html>";
    return $output;
}
开发者ID:robertdown,项目名称:openemr,代码行数:101,代码来源:pnadmin.php

示例13: admin_messages_messagesblock_display

/**
 * display block
 */
function admin_messages_messagesblock_display($row)
{
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    if (!isset($row['title'])) {
        $row['title'] = '';
    }
    if (!pnSecAuthAction(0, 'Admin Messages:Messagesblock:', "{$row['title']}::", ACCESS_READ)) {
        return;
    }
    $messagestable = $pntable['message'];
    $messagescolumn =& $pntable['message_column'];
    if (pnConfigGetVar('multilingual') == 1) {
        $currentlang = pnUserGetLang();
        $querylang = "AND ({$messagescolumn['mlanguage']}='{$currentlang}' OR {$messagescolumn['mlanguage']}='')";
    } else {
        $querylang = '';
    }
    $sql = "SELECT {$messagescolumn['mid']},\n                   {$messagescolumn['title']},\n                   {$messagescolumn['content']},\n                   {$messagescolumn['date']},\n                   {$messagescolumn['view']}\n            FROM {$messagestable}\n            WHERE {$messagescolumn['active']} = 1 \n            AND  ( {$messagescolumn['expire']} > unix_timestamp(now())\n                  OR {$messagescolumn['expire']} = 0)\n            {$querylang}\n            ORDER by {$messagescolumn['mid']} DESC";
    $result = $dbconn->Execute($sql);
    if ($dbconn->ErrorNo() != 0) {
        return;
    }
    $output = new pnHTML();
    while (list($mid, $title, $content, $date, $view) = $result->fields) {
        $result->MoveNext();
        $show = 0;
        if (pnSecAuthAction(0, 'Admin Messages:Messagesblock:', "{$row['title']}::{$mid}", ACCESS_READ)) {
            switch ($view) {
                case 1:
                    // Message for everyone
                    $show = 1;
                    break;
                case 2:
                    // Message for users
                    if (pnUserLoggedIn()) {
                        $show = 1;
                    }
                    break;
                case 3:
                    // Messages for non-users
                    if (!pnUserLoggedIn()) {
                        $show = 1;
                    }
                    break;
                case 4:
                    // Messages for administrators of any description
                    if (pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) {
                        $show = 1;
                    }
                    break;
            }
        }
        if ($show) {
            list($title, $content) = pnModCallHooks('item', 'transform', '', array($title, $content));
            $output->TableStart('', '', 0);
            $output->SetInputMode(_PNH_VERBATIMINPUT);
            $output->SetOutputMode(_PNH_RETURNOUTPUT);
            $ttitle = $output->Linebreak();
            $ttitle .= $output->Text($title);
            $ttitle .= $output->Linebreak(2);
            $output->SetOutputMode(_PNH_KEEPOUTPUT);
            $output->TableAddRow(array("<font class=\"pn-title\">" . pnVarPrepHTMLDisplay($ttitle) . "</font>"), 'center');
            $output->TableAddRow(array("<font class=\"pn-normal\">" . pnVarPrepHTMLDisplay($content) . "</font>"), 'left');
            $output->SetInputMode(_PNH_PARSEINPUT);
            $output->TableEnd();
        }
    }
    if ($output->output != "") {
        // Don't want a title
        $row['title'] = '';
        $row['content'] = $output->GetOutput();
        return themesideblock($row);
    }
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:78,代码来源:messages.php

示例14: Meds_user_display

function Meds_user_display($args)
{
    // Permission check.
    if (!pnSecAuthAction(0, 'Meds::', '::', ACCESS_READ)) {
        return pnVarPrepHTMLDisplay(_MODULENOTSUBSCRIBED);
    }
    // This is a flag to use in the template for
    // the purpose of displaying a go-back link.
    // This flag is needed because the go back link
    // is not needed when the user dialed in a med
    // and displayed it directly (ie, non-search)
    $search = pnVarCleanFromInput('search');
    // Get the object type and start number.
    $med_id = pnVarCleanFromInput('med_id');
    // Get medication from database.
    $med = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'med', 'med_id' => $med_id));
    // Check if medication could not be obtained.
    if (!$med) {
        return pnVarPrepHTMLDisplay(_NOSUCHITEM);
    }
    if (strpos($med['rxInfo'], "pdf/") === 0) {
        $med['rxInfo'] = "modules/Meds/pn" . $med['rxInfo'];
    }
    //print (strpos($med['rxInfo'], "pdf/"));
    //information used for popup windows. I'm sure there's a better way to do this but...
    $pregnancy = pnModAPIFunc('Meds', 'user', 'preg_descriptions');
    $schedules = pnModAPIFunc('Meds', 'user', 'sched_descriptions');
    if ($med['pres_id1']) {
        $pres_info1 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'preserve', 'pres_id' => $med['pres_id1']));
    }
    if ($med['pres_id2']) {
        $pres_info2 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'preserve', 'pres_id' => $med['pres_id2']));
    }
    $comp_info = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'company', 'comp_id' => $med['comp_id']));
    $comp_text = pnModFunc('Meds', 'user', 'company_popup', array('comp_info' => $comp_info));
    if ($med['moa_id1']) {
        $moa_info1 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'moa', 'moa_id' => $med['moa_id1']));
    }
    if ($med['moa_id2']) {
        $moa_info2 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'moa', 'moa_id' => $med['moa_id2']));
    }
    if ($med['moa_id3']) {
        $moa_info3 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'moa', 'moa_id' => $med['moa_id3']));
    }
    if ($med['moa_id4']) {
        $moa_info4 = pnModAPIFunc('Meds', 'user', 'get', array('object' => 'moa', 'moa_id' => $med['moa_id4']));
    }
    // Start a new output object.
    $pnRender =& new pnRender('Meds');
    // Assign medication's data to template.
    $pnRender->assign('med', $med);
    //assign popup info to templates
    $pnRender->assign('preg', $pregnancy[$med['preg']]);
    $pnRender->assign('sched', $schedules[$med['schedule']]);
    $pnRender->assign('comp_text', $comp_text);
    $pnRender->assign('preserve_info1', $pres_info1['comments']);
    $pnRender->assign('preserve_info2', $pres_info2['comments']);
    $pnRender->assign('moa_info1', $moa_info1['comments']);
    $pnRender->assign('moa_info2', $moa_info2['comments']);
    $pnRender->assign('moa_info3', $moa_info3['comments']);
    $pnRender->assign('moa_info4', $moa_info4['comments']);
    // Assign flag to template; for search back-links.
    if (!empty($search)) {
        $pnRender->assign('search', $search);
    }
    // Assign flag for admin permission capacity.
    $pnRender->assign('is_admin', pnSecAuthAction(0, 'Meds::', '::', ACCESS_ADMIN));
    // Let any hooks know that we are displaying an item.  As this is a display
    // hook we're passing a URL as the extra info, which is the URL that any
    // hooks will show after they have finished their own work.  It is normal
    // for that URL to bring the user back to this function
    $pnRender->assign('hooks', pnModCallHooks('item', 'display', $med_id, pnModURL('Meds', 'user', 'display', array('med_id' => $med_id))));
    // Get options for all dropdowns.  These are not used
    // for dropdowns here, but rather are used to help convert
    // the med's various ids back into meaning texts.
    $pnRender->assign(pnModAPIFunc('Meds', 'user', 'getall_selects'));
    // Return templated output.
    return $pnRender->fetch('meds_user_display.htm');
}
开发者ID:grlf,项目名称:eyedock,代码行数:79,代码来源:pnuser.php

示例15: referers_admin_main

function referers_admin_main()
{
    include "header.php";
    $bgcolor2 = $GLOBALS["bgcolor2"];
    list($dbconn) = pnDBGetConn();
    $pntable = pnDBGetTables();
    GraphicAdmin();
    OpenTable();
    echo "<center><font class=\"pn-title\"><b>" . _HTTPREFERERS . "</b></font></center>";
    CloseTable();
    if (!pnSecAuthAction(0, 'Referers::', '::', ACCESS_ADMIN)) {
        echo _REFERERSNOAUTH;
        include 'footer.php';
        return;
    }
    // Added by Leithya - Start
    list($sortby, $page) = pnVarCleanFromInput('sortby', 'page');
    if (!isset($page) || !is_numeric($page)) {
        $page = 1;
    }
    if ($sortby != "pn_url") {
        $sortby = "pn_frequency";
    }
    $column =& $pntable['referer_column'];
    if ($sortby == 'pn_url') {
        $sort = "ORDER BY {$column['url']} ";
    } else {
        $sort = "ORDER BY {$column['frequency']} DESC ";
    }
    $pagesize = '25';
    $min = $pagesize * ($page - 1);
    $max = $pagesize;
    // Added by Leithya - End
    // Edited by Leithya - Start
    OpenTable();
    echo "<center><font class=\"pn-normal\"><b>" . _WHOLINKS . "</b</font></center><br /><br />" . "<table border=0 width=\"100%\">" . "<tr><td><font class=\"pn-normal\"><a class=\"pn-sub\" href='admin.php?module=NS-Referers&amp;op=main&amp;sortby=pn_frequency'>" . _FREQUENCY . "</a></font></td>" . "<td><font class=\"pn-normal\"><a class=\"pn-sub\" href='admin.php?module=NS-Referers&amp;op=main&amp;sortby=pn_url'>" . _URL . "</a></font></td>" . "<td><font class=\"pn-sub\">" . _PERCENT . "</font></td></tr>";
    /**
     * fifers: grab the total count of referers for percentage calculations
     */
    $hresult = $dbconn->Execute("SELECT SUM({$column['frequency']}) FROM {$pntable['referer']}");
    list($totalfreq) = $hresult->fields;
    $hresult5 = $dbconn->Execute("SELECT * FROM {$pntable['referer']}");
    list($totalurl) = $hresult5->fields;
    $totalurl = $hresult5->PO_RecordCount();
    $hresult = $dbconn->Execute("SELECT {$column['url']}, {$column['frequency']} FROM {$pntable['referer']} {$sort} LIMIT " . $min . "," . $max . " ");
    while (list($url, $freq) = $hresult->fields) {
        $urls = str_replace('&', ' &', $url);
        $urls = str_replace('/', '/ ', $urls);
        $url = pnVarPrepForDisplay($url);
        // Edited by Leithya - End
        /* 
            $hresult = $dbconn->Execute("SELECT $column[url], $column[frequency] FROM $pntable[referer] ORDER BY $column[frequency] DESC");
            while(list($url, $freq) = $hresult->fields) {
        */
        $hresult->MoveNext();
        echo "<tr>\n" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"pn-normal\">" . pnVarPrepForDisplay($freq) . "</font></td>\n" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"pn-normal\">" . ($url == "bookmark" ? "" : "<a target=_blank href={$url}>") . pnVarPrepForDisplay($urls) . ($url == "bookmark" ? "" : "</a>") . "</font></td>\n" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"pn-normal\">" . round($freq / $totalfreq * 100, 2) . " %</font></td>\n" . "</tr>\n";
    }
    echo "</table><font class=\"pn-normal\">" . _TOTAL . " " . pnVarPrepForDisplay($totalfreq) . " </font><br />";
    // Added by Leithya - Start
    if ($totalurl > $pagesize) {
        $total_pages = ceil($totalurl / $pagesize) + 0.99;
        $prev_page = $page - 1;
        $next_page = $page + 1;
        if ($prev_page > 0) {
            echo "<a class=\"pn-normal\" href='admin.php?module=NS-Referers&amp;op=main&amp;sortby={$sortby}&amp;page={$prev_page}'><font class=\"pn-sub\"> <-- </font></a>";
        }
        for ($n = 1; $n < $total_pages; $n++) {
            if ($n == $page) {
                echo " <font class=\"pn-sub\">{$n}</font></a> ";
            } else {
                echo " <a class=\"pn-normal\" href='admin.php?module=NS-Referers&amp;op=main&amp;sortby={$sortby}&amp;page={$n}'><font class=\"pn-sub\">" . pnVarPrepHTMLDisplay($n) . "</font></a> ";
            }
        }
        if ($next_page <= $total_pages) {
            echo "<a class=\"pn-normal\" href='admin.php?module=NS-Referers&amp;op=main&amp;sortby={$sortby}&amp;page={$next_page}'><font class=\"pn-sub\"> --> </font></a>";
        }
    }
    // Added by Leithya - End
    echo "<form action=\"admin.php\" method=\"post\">" . "<input type=\"hidden\" name=\"module\" value=\"NS-Referers\">" . "<input type=\"hidden\" name=\"authid\" value=\"" . pnSecGenAuthKey() . "\">" . "<input type=\"hidden\" name=\"op\" value=\"delete\">" . "<center><input type=\"submit\" value=\"" . _DELETEREFERERS . "\"></center></form>";
    CloseTable();
    // Access Referer Settings
    OpenTable();
    echo "<center><font class=\"pn-title\"><b>" . _REFERERSCONF . "</b></font></center><br /><br />";
    echo "<center><a href=\"admin.php?module=" . $GLOBALS['module'] . "&amp;op=getConfig\">" . _REFERERSCONF . "</a></center>";
    CloseTable();
    include "footer.php";
}
开发者ID:BackupTheBerlios,项目名称:microbuilder,代码行数:87,代码来源:admin.php


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