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


PHP site_admin_header函数代码示例

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


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

示例1: getStringFromRequest

    $form_shortname = getStringFromRequest('form_shortname');
    $form_fullname = getStringFromRequest('form_fullname');
    $form_description = getStringFromRequest('form_description');
    $newroot = trove_getrootcat($form_parent);
    if ($form_shortname) {
        $res = db_query("\n\t\t\tINSERT INTO trove_cat \n\t\t\t\t(shortname,fullname,description,parent,version,root_parent)\n\t\t\tVALUES (\n\t\t\t\t'" . htmlspecialchars($form_shortname) . "',\n\t\t\t\t'" . htmlspecialchars($form_fullname) . "',\n\t\t\t\t'" . htmlspecialchars($form_description) . "',\n\t\t\t\t'{$form_parent}',\n\t\t\t\t'" . date("Ymd", time()) . "01',\n\t\t\t\t'{$newroot}'\n\t\t\t)\n\t\t");
        if (!$res || db_affected_rows($res) < 1) {
            form_release_key(getStringFromRequest("form_key"));
            exit_error(_('Error In Trove Operation'), db_error());
        }
    }
    // update full paths now
    trove_genfullpaths($newroot, trove_getfullname($newroot), $newroot);
    session_redirect("/admin/trove/trove_cat_list.php");
}
site_admin_header(array('title' => _('Site Admin: Trove - Add Node')));
?>

<h3><?php 
echo _('Add New Trove Category');
?>
</h3>

<form action="trove_cat_add.php" method="post">
<input type="hidden" name="form_key" value="<?php 
echo form_generate_key();
?>
">
<p><?php 
echo _('Parent Category');
?>
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:trove_cat_add.php

示例2: getStringFromRequest

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'admin/admin_utils.php';
$search = getStringFromRequest('search');
$usersearch = getStringFromRequest('usersearch');
if (!$search) {
    exit_error(_('Error'), _('Refusing to display whole DB,That would display whole DB.  Please use a CLI query if you wish to do this.'));
}
site_admin_header(array('title' => _('Admin Search Results')));
function format_name($name, $status)
{
    if ($status == 'D') {
        return "<strong><strike>{$name}</strike></strong>";
    } else {
        if ($status == 'S') {
            return "<strong><span style=\"text-decoration:underline\">{$name}</span></strong>";
        } else {
            if ($status == 'H') {
                return "<strong><span style=\"text-decoration:underline\">{$name}</span></strong>";
            } else {
                if ($status == 'P') {
                    return "<strong><em>{$name}</em></strong>";
                } else {
                    if ($status == 'I') {
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:search.php

示例3: exit_error

        if (!$group->setStatus(session_get_user(), 'D')) {
            exit_error(_('Error during group rejection'), $this->getErrorMessage());
        }
        $group->addHistory('rejected', 'x');
        // Determine whether to send a canned or custom rejection letter and send it
        if ($response_id == 100) {
            $group->sendRejectionEmail(0, $response_text);
            if ($add_to_can) {
                add_canned_response($response_title, $response_text);
            }
        } else {
            $group->sendRejectionEmail($response_id);
        }
    }
}
site_admin_header(array('title' => _('Approving Pending Projects')));
// get current information
$res_grp = db_query("SELECT * FROM groups WHERE status='P'", $LIMIT);
$rows = db_numrows($res_grp);
if ($rows < 1) {
    print "<h1>" . _('None Found') . "</h1>";
    print "<p>" . _('No Pending Projects to Approve') . "</p>";
    site_admin_footer(array());
    exit;
}
if ($rows > $LIMIT) {
    print "<p>" . _('Pending projects:') . "{$LIMIT}+ ({$LIMIT} shown)</p>";
} else {
    print "<p>" . _('Pending projects:') . "{$rows}</p>";
}
while ($row_grp = db_fetch_array($res_grp)) {
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:approve-pending.php

示例4: explode

                } else {
                    return $this->master($request);
                }
            }
        }
        $GLOBALS['Response']->redirect('/admin/servers/');
    }
}
//Process request
if (!isset($_GET['r']) || !$_GET['r']) {
    $_REQUEST['action'] = 'index';
} else {
    $r = explode('/', $r);
    $_REQUEST['action'] = $r[0];
    if (isset($r[1])) {
        $_REQUEST['id'] = $r[1];
    }
}
require_once 'common/include/HTTPRequest.class.php';
$request =& HTTPRequest::instance();
$server_admin = new ServerAdmin();
$method = $_REQUEST['action'];
if (method_exists($server_admin, $method)) {
    $html = $server_admin->{$method}($request);
    site_admin_header(array('title' => $server_admin->title));
    echo '<h3>' . $server_admin->title . '</h3>';
    echo $html;
    site_admin_footer(array());
} else {
    die('Invalid action ' . $method);
}
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:index.php

示例5: html_image

    global $Language;
    print '<br />';
    for ($i = 0; $i < $GLOBALS[depth]; $i++) {
        print "&nbsp; &nbsp; ";
    }
    print html_image('ic/cfolder15.png', '15', '13', array());
    print '&nbsp; ' . $text . " ";
    print url_make_link("trove_cat_add.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Add') . "]");
    if ($nodeid != 0) {
        print url_make_link("trove_cat_edit.php?parent_trove_cat_id='.{$nodeid}.'", "[" . _('Edit') . "]");
        print help_button('trove_cat', $nodeid) . "\n";
    }
    $GLOBALS['depth']++;
    $res_child = db_query("\n\t\tSELECT trove_cat_id,fullname FROM trove_cat \n\t\tWHERE parent='{$nodeid}'\n\t\tAND trove_cat_id!=0;\n\t");
    while ($row_child = db_fetch_array($res_child)) {
        printnode($row_child["trove_cat_id"], $row_child["fullname"]);
    }
    $GLOBALS["depth"]--;
}
// ########################################################
site_admin_header(array('title' => _('Site Admin: Trove - Category List')));
?>

<h3><?php 
echo _('Browse Trove Tree');
?>
</h3>

<?php 
printnode(0, "root");
site_admin_footer(array());
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:trove_cat_list.php

示例6: user_get_object_by_name

        /*
        	Perform unsubscription
        */
        $u =& user_get_object_by_name($user_name);
        if (!$u || !is_object($u)) {
            exit_error('Error', 'Could Not Get User');
        } elseif ($u->isError()) {
            exit_error('Error', $u->getErrorMessage());
        }
        if (!$u->unsubscribeFromMailings($type == 'ALL' ? 1 : 0)) {
            exit_error(_('Error, Could not unsubscribe user:') . $u->getErrorMessage());
        }
        $feedback .= _('User unsubscribed') . '<br />';
    }
}
site_admin_header(array('title' => _('Site Mailings Subscription Maintenance')));
?>

<h4>
<?php 
echo _('Site Mailings Subscription Maintenance');
?>
</h4>

<p>
<?php 
printf(_('Use field below to find users which match given pattern with the %1$s username, real name, or email address (substring match is preformed, use \'%%\' in the middle of pattern to specify 0 or more arbitrary characters). Click on the username to unsubscribe user from site mailings (new form will appear).'), $GLOBALS['sys_name']);
?>
</p>

<form action="<?php 
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:unsubscribe.php

示例7: session_require

<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
// $Id: index.php,v 1.6 2006/01/13 12:20:49 helix Exp $
require "pre.php";
require $DOCUMENT_ROOT . '/admin/admin_utils.php';
session_require(array('group' => '1', 'admin_flags' => 'A'));
site_admin_header(array('title' => "Site Admin"));
$abc_array = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
?>
 
<h2>Administrative Functions</h2>
<p><i><b>Warning!</b> These functions currently have minimal error checking,
if any. They are fine to play with but may not act as expected if you leave
fields blank, etc... Also, navigating the admin functions with the 
<b>back</b> button is highly unadvised.</i>

<h3>User Maintenance</h3>
<ul>
<li><a href="userlist.php">Display Full User List/Edit Users</a>&nbsp;&nbsp;
<li>Display Users Beginning with : 
<?php 
for ($i = 0; $i < count($abc_array); $i++) {
    echo "<a href=\"userlist.php?user_name_search={$abc_array[$i]}\">{$abc_array[$i]}</a>|";
}
?>
<br>
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:index.php

示例8: array

                $em->processEvent('project_is_deleted', array('group_id' => $group_id));
            }
        }
    }
}
// get current information
$res_grp = db_query("SELECT * FROM groups WHERE group_id={$group_id}");
if (db_numrows($res_grp) < 1) {
    exit_error("ERROR", $Language->getText('admin_groupedit', 'error_group'));
}
$row_grp = db_fetch_array($res_grp);
if ($request->exist('export')) {
    export_grouphistory($group_id, $event, $subEvents, $value, $startDate, $endDate, $by);
    exit;
}
site_admin_header(array('title' => $Language->getText('admin_groupedit', 'title')));
echo '<H2>' . $row_grp['group_name'] . '</H2>';
?>

<p>
<A href="/project/admin/?group_id=<?php 
print $group_id;
?>
"><B><BIG>[<?php 
echo $Language->getText('admin_groupedit', 'proj_admin');
?>
]</BIG></B></A><BR/>
<A href="userlist.php?group_id=<?php 
print $group_id;
?>
"><B><BIG>[<?php 
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:groupedit.php

示例9: group_add_history

            group_add_history('added foundry_data row', '', $group_id);
            $feedback .= ' CREATING NEW FOUNDRY_DATA ROW ';
            $r = db_query("INSERT INTO foundry_data (foundry_id) VALUES ('{$group_id}')");
            if (!$r || db_affected_rows($r) < 1) {
                echo 'COULD NOT INSERT NEW FOUNDRY_DATA ROW: ' . db_error();
            }
        }
    }
}
// get current information
$res_grp = db_query("SELECT * FROM groups WHERE group_id={$group_id}");
if (db_numrows($res_grp) < 1) {
    exit_error("Invalid Group", "Invalid group was passed in.");
}
$row_grp = db_fetch_array($res_grp);
site_admin_header(array('title' => "Editing Group"));
echo '<h2>Group: ' . $row_grp['group_name'] . '</h2>';
?>

<?php 
print "<h3><A href=\"/project/admin/?group_id={$group_id}\">[Group Admin]</A>";
?>

<br><A href="userlist.php?group_id=<?php 
print $group_id;
?>
">[View/Edit Group Members]</A></h3>

<p>
<FORM action="<?php 
echo $PHP_SELF;
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:groupedit.php

示例10: session_require

	should be edited from that group's admin page
*/
require "pre.php";
require "account.php";
require $DOCUMENT_ROOT . '/admin/admin_utils.php';
session_require(array('group' => '1', 'admin_flags' => 'A'));
if ($action == "update_user") {
    $user = user_get_object($user_id);
    $user->setEmail($email);
    $user->setShell($shell);
    $user->setUnixStatus($unix_status);
    if ($user->isError()) {
        $feedback = $user->getErrorMessage();
    }
}
site_admin_header(array('title' => 'User Info'));
// get users info
$res_user = db_query("SELECT * FROM users WHERE user_id={$user_id}");
$row_user = db_fetch_array($res_user);
?>
<h2>User: <?php 
print user_getname($user_id);
?>
</h2>
<p>User ID: <?php 
print $user_id;
?>
<br>Status: <?php 
print $row_user['status'];
?>
<br>Registered: <?php 
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:useredit.php

示例11: session_require

<?php

//
// SourceForge: Breaking Down the Barriers to Open Source Development
// Copyright 1999-2000 (c) The SourceForge Crew
// http://sourceforge.net
//
require "pre.php";
require $DOCUMENT_ROOT . '/admin/admin_utils.php';
session_require(array('group' => '1', 'admin_flags' => 'A'));
site_admin_header(array('title' => "User/Group Maintenance"));
print "<h2>User/Group Maintenance</h2>\n";
if ($search == "") {
    exit_error("Refusing to display whole DB", "That would display whole DB.  Please use a CLI query if you wish to do this.");
}
if ($usersearch) {
    print "<p>User Search Criteria: <b>%{$search}%</b><p>\n";
    $sql = "select distinct * from users where user_id like '%{$search}%' or user_name like '%{$search}%' or email like '%{$search}%' or realname like '%{$search}%'";
    $result = db_query($sql);
    if (db_numrows($result) < 1) {
        print "No matches.<p><a href=\"/admin/\">Back</a>";
    } else {
        echo '<p>Key:
		<b>Active</b>
		<i>Deleted</i>
		Suspended
		(*)Pending
        <p>
		<table cellspacing="0" cellpadding="1" border="1">
		<tr><th>UserName</th><th>User\'s Name</th><th>eMail</th><th>DevProfile</th><th colspan=\\"4\\">Set to Status</th></tr>';
        while ($row = db_fetch_array($result)) {
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:search.php

示例12: site_admin_header

 * GForge is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfcommon . 'include/account.php';
require_once $gfwww . 'include/canned_responses.php';
require_once $gfwww . 'admin/admin_utils.php';
require_once $gfwww . 'project/admin/project_admin_utils.php';
site_admin_header(array('title' => _('Site Admin: Edit Rejection Responses')));
function check_select_value($value, $type)
{
    if ($value == "100") {
        print "<span class=\"important\">" . sprintf(_('You can\'t %1$s \\"None\\"!'), $GLOBALS['type']) . "</span><br />\n";
    }
}
?>

<form method="post" action="<?php 
echo getStringFromServer('PHP_SELF');
?>
">
<?php 
echo _('Existing Responses:');
echo get_canned_responses();
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:responses_admin.php

示例13: session_require

<?php

//
// BerliOS: The Open Source Mediator
// Copyright 2000-2004 (c) The BerliOS Crew
// http://www.berlios.de
//
// $Id: group_donations.php,v 1.2 2005/02/11 11:09:08 helix Exp $
require "pre.php";
require $DOCUMENT_ROOT . '/admin/admin_utils.php';
session_require(array('group' => '1', 'admin_flags' => 'A'));
site_admin_header(array('title' => "Group Donations"));
echo '<H2>List of Group Donations</H2>';
// Administrative functions for Donations
/*
	Set donation to approved
*/
if ($action == 'approve') {
    db_query("UPDATE group_donors SET status='A' WHERE user_id='{$user_id}' AND add_date='{$date}'");
    echo '<p>Group Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is changed to APPROVED';
}
/*
	Set donation to deleted
*/
if ($action == 'delete') {
    db_query("UPDATE group_donors SET status='D' WHERE user_id='{$user_id}' AND add_date='{$date}'");
    echo '<p>Group Donation from ' . $user_id . ' at ' . date($sys_datefmt, $date) . ' (' . $date . ') is changed to DELETED';
}
/*
	Set donation to pending
*/
开发者ID:BackupTheBerlios,项目名称:berlios,代码行数:31,代码来源:group_donations.php

示例14: exit_error

        if (!$res || db_affected_rows($res) < 1) {
            exit_error(_('Error In Trove Operation'), db_error());
        }
    }
    session_redirect("/admin/trove/trove_cat_list.php");
}
/*
	Main Code
*/
$trove_cat_id = getIntFromRequest("trove_cat_id");
$res_cat = db_query("SELECT * FROM trove_cat WHERE trove_cat_id={$trove_cat_id}");
if (db_numrows($res_cat) < 1) {
    exit_error(_('No Such Category, That trove cat does not exist'));
}
$row_cat = db_fetch_array($res_cat);
site_admin_header(array('title' => _('Site Admin: Trove - Edit Category')));
?>

<h3><?php 
echo _('Edit Trove Category');
?>
</h3>

<form action="trove_cat_edit.php" method="post">

<p><?php 
echo _('Parent Category:');
?>
<br /><select name="form_parent">

<?php 
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:trove_cat_edit.php

示例15: ob_start

      <li><a href="externaltools.php?tool=munin">munin</a></li>
      <li><a href="externaltools.php?tool=info">PHP info</a></li>
      <li><a href="externaltools.php?tool=APC">APC - PHP Cache</a></li>
      ' . $pluginsContent . '
    </ul>
  </li>
</ul>');
// Plugins
ob_start();
$em->processEvent('site_admin_option_hook', null);
$pluginsContent = ob_get_contents();
ob_end_clean();
$wPlugins = new Widget_Static($Language->getText('admin_main', 'header_plugins'));
$wPlugins->setContent('<ul>' . $pluginsContent . '</ul>');
// Start output
site_admin_header(array('title' => $Language->getText('admin_main', 'title')));
echo "<p><i>" . $Language->getText('admin_main', 'message') . "</i></p>";
echo '<table id="site_admin_main_table"><tr>';
echo '<td>';
$wUser->display();
$wProject->display();
echo "</td>";
echo '<td>';
$wUtils->display();
$wConf->display();
echo "</td>";
echo '<td>';
$wDoc->display();
$wStats->display();
$wPlugins->display();
echo "</td>";
开发者ID:nterray,项目名称:tuleap,代码行数:31,代码来源:index.php


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