コード例 #1
0
ファイル: index.php プロジェクト: warunap/haaprojects
<?php

/** ===============================================
 * 2010&copy;SisoPipo.com
 * Website Project
 *
 * @author Geln Yang
 * @version 1.0
 ==================================================== */
require_once '_initialization_rss.php';
startPage('RSS Reader');
loadModuleCSS('css/rssreader.css');
loadGlobalJs('js/jtool.js');
loadModuleJS('js/rssreader.js');
$db = connectDB();
print '<div><img src="../images/rssreader.jpg" class="icon" border="0" />';
print '<h3>选择阅读</h3>';
print '<hr/>';
print '<ul>';
foreach ($db->query('SELECT * from ' . RSS_LINK_TABLE) as $row) {
    print '<li>';
    print '[' . $row['tags'] . ']<a href="#" onclick="javascript:readrss(\'' . $row['rlink'] . '\')" >' . $row['rtitle'] . '</a>';
    print '</li>';
}
print "<ul></div>";
endPage();
コード例 #2
0
<?php

include "page.php";
startPage("screenshots");
?>

<!-- begin main content -->
<div id="mainPage">
  <div class="box">
    <h1>Screenshots of Desktop Manager</h1>
    <h2>Notification Bezel</h2>
    <div class="screenShot"><img src="shots/desktopnotification.png" 
      alt="Desktop Switch Notification Bezel" /></div>
    <p>This is the desktop switch notification bezel. It behaves much as the volume/brightness control notification bezels behave. On a desktop switch this
    can (optionally) appear and tell you which desktop you are on. Like most
    of Desktop Manager it can, of course, be turned off.
    </p>
    <h2>Statusbar Pager</h2>
    <div class="screenShot"><img src="shots/desktopshot.png" 
      alt="Desktop Switch Notification Bezel" /></div>
    <p>
      The statusbar pager can be used to get a quick overview of everything
      that is happening on each desktop along with a quick means to switch
      between desktops. The menu on the left allows easy manipulation of
      the windows on the current desktop.
    </p>
  </div>
  <div class="box">
    <h1>Desktop Switch Transitions</h1>
    <p>The following videos (QuickTime) illustrate the switch transitions 
    available. Thanks to Jamie Caplan, originals available from
コード例 #3
0
ob_start("ob_gzhandler");
define("__READMEFILE", true);
header('Content-type: application/xml; charset="utf-8"', true);
require_once "../functions.php";
// get the command from the query string
$cmd = $_GET['cmd'];
echo '<?xml version="1.0" encoding="utf-8"?>' . "\r\n";
?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="commands/command[@name='<?php 
echo $cmd;
?>
']">
<?php 
startPage("Command: " . $cmd);
?>
    <h2><xsl:value-of select="@name" /> (<xsl:value-of select="access/rank" />)</h2>
    <p><b>Alias<xsl:if test="count(aliases/alias) &gt; 1">es</xsl:if></b><br />
    <xsl:if test="count(aliases/alias) &gt; 0">
        <xsl:for-each select="aliases/alias">
            <xsl:value-of select="." /> 
            <xsl:if test="position()!=last()">
                <xsl:text>, </xsl:text>
           </xsl:if>
        </xsl:for-each>
     </xsl:if>
     <xsl:if test="count(aliases/alias) = 0">
        <xsl:text>None</xsl:text>
     </xsl:if>
    </p>
コード例 #4
0
ファイル: addcompany.php プロジェクト: warunap/haaprojects
<?php

/** ===============================================
 * 2010&copy;SisoPipo.com
 * Website Project
 * 
 * @author Geln Yang
 * @version 1.0
 ==================================================== */
require_once '_initialization_companyinfo.php';
startPage('Add Company Info');
loadModuleCSS('css/companyinfo.css');
showAppLinks();
showCompanyInputForm(null);
endPage();
コード例 #5
0
        echo "<p><a href='show_preprints.php'>Return to preprints</a>.</p>";
        show_preprint($rowId, "show_preprints.php");
        break;
    case NOR_PP_MODE_DELETE:
        nor_pp_require_row_owner($rowId, $AUTH_login);
        startPage("Delete Preprint");
        echo "<h2>Do you want to delete this preprint ?</h2>\n";
        show_preprint($rowId, "delete_preprint.php");
        break;
    case NOR_PP_MODE_ACCEPT:
        if ($authClass->isAdmin()) {
            startPage("Accept Preprint");
            echo "<h2>Do you want to accept the following preprint ?</h2>\n";
            show_preprint($rowId, "accept_preprint.php");
        } else {
            startPage("Not Authorized");
            echo "<p><i>Only authorized users can accept a preprint.</i></p>\n";
        }
        break;
}
endPage();
//
//  Functions
//
// ==========================================================================
/// @fn void  ( void )
///
/// ...
///
/// @global
/// @parameter ...
コード例 #6
0
<?php

// ============================================================================
// PREPRINTS/RESERVE_PPN.PHP
// ============================================================================
include_once "config.manage.php";
core_declare_input("res_UID");
core_declare_input("field");
core_declare_input("authors", "");
core_declare_input("title", "");
startPage("Reserve Preprint Number");
if (!$title) {
    errorPage("Preprint title is missing", "Submit Preprint", "Error");
}
if (!$authors) {
    errorPage("Authors list is missing", "Submit Preprint", "Error");
}
if (!($account = core_getpwuid($res_UID, $dbClass))) {
    bugPage("no account found for UID='{$res_UID}'");
}
$res_login = $account["name"];
if (!$authClass->isAdmin() && $res_login != $AUTH_login) {
    errorPage("Reserving of preprint nbrs for others is only " . "permitted for administrative staff.");
}
$res_gecos = $account["gecos"];
$res_ppn = pp_reserveNumber($nor_pp_year, $res_UID, $field, $authors, $title);
// reread back the record
$q = $dbClass->query("SELECT * FROM publications WHERE Year={$nor_pp_year} AND Report={$res_ppn} AND Field='{$field}'");
$row = $dbClass->next_record($q);
$_POST["rowId"] = $row["RowId"];
require "update_preprint.inc.php";
コード例 #7
0
ファイル: index.php プロジェクト: Tom-Byrne/gocdb
function Draw_Page($Page_Type)
{
    // Read only pages - these pages don't strictly require user authentication.
    // Therefore, to enable permit-all page viewing, comment out the call
    // to rejectIfNotAuthenticated() in the relevant case block. Note, some of
    // these pages will replace sensitive info such as telephone/email with
    // the string 'PROTECTED'
    // ************************************************************************
    switch ($Page_Type) {
        case "default":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
        case "View_Service_Endpoint":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service_endpoint.php';
            view_endpoint();
            break;
        case "Service_Groups":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_all.php';
            showAllServiceGroups();
            break;
        case "Service_Group":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup.php';
            showServiceGroup();
            break;
        case "Site":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_site.php';
            view_site();
            break;
        case "NGI":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngi.php';
            view_ngi();
            break;
        case "Service":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_service.php';
            view_se();
            break;
        case "Services":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/view_all.php';
            drawSEs();
            break;
        case "NGIs":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/view_ngis.php';
            view_ngis();
            break;
        case "Sites":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/view_all.php';
            showAllSites();
            break;
        case "Projects":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_all.php';
            show_all_projects();
            break;
        case "Project":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/view_project.php';
            show_project();
            break;
        case "Scope_Help":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/scope_help.php';
            show_help();
            break;
        case "Site_Geo_xml":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/sitesForGoogleMapXML.php';
            show_xml();
            break;
        case "Error_Redirect":
            //rejectIfNotAuthenticated();
            show_view('error.php', $_REQUEST['error']);
            break;
        case "Static_HTML":
            //rejectIfNotAuthenticated();
            Draw_Static_HTML();
            break;
        case "Search":
            //rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/search.php';
            search();
            break;
            // CrUD Pages - These pages MUST have authentication enabled so
            // the calls to rejectIfNotAuthenticated() must be used.
            // *********************************************************************
        // CrUD Pages - These pages MUST have authentication enabled so
        // the calls to rejectIfNotAuthenticated() must be used.
        // *********************************************************************
        case "Revoke_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/revoke_request.php';
            view_revoke_request();
            break;
        case "Accept_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/accept_request.php';
            view_accept_request();
            break;
        case "Deny_Role_Request":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/deny_request.php';
            view_deny_request();
            break;
        case "Role_Requests":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/view_requests.php';
            view_requests();
            break;
        case "Request_Role":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/political_role/request_role.php';
            request_role();
            break;
        case "Edit_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site.php';
            edit_site();
            break;
        case "Edit_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service.php';
            edit_service();
            break;
        case "SE_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/se_downtimes.php';
            se_downtimes();
            break;
        case "Add_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service.php';
            add_service();
            break;
        case "Add_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_endpoint.php';
            add_service_endpoint();
            break;
        case "Delete_Service":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service.php';
            delete();
            break;
        case "Edit_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/edit_user.php';
            edit_user();
            break;
        case "User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/view_user.php';
            view_user();
            break;
        case "Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_downtime.php';
            view();
            break;
        case "My_Sites":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/my_sites.php';
            my_sites();
            break;
        case "Edit_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/ngi/edit_ngi.php';
            edit_ngi();
            break;
        case "Edit_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group.php';
            edit_service_group();
            break;
        case "Add_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_ses.php';
            add_ses();
            break;
        case "Search_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/search_ses.php';
            search_ses();
            break;
        case "Remove_Service_Group_SEs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/remove_ses.php';
            remove_ses();
            break;
        case "Add_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site.php';
            add_site();
            break;
        case "SGroup_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/view_sgroup_downtimes.php';
            view_sgroup_downtimes();
            break;
        case "Add_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group.php';
            add_service_group();
            break;
        case "Site_Downtimes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/site_downtimes.php';
            site_downtimes();
            break;
        case "Register":
            rejectIfNotAuthenticated('Access denied - ' . 'you need to be pre-authenticated before you can register a new account');
            require_once __DIR__ . '/controllers/user/register.php';
            register();
            break;
        case "Add_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/add_downtime.php';
            //require_once __DIR__.'/controllers/downtime/add_downtime_old.php';
            add();
            break;
        case "Edit_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/edit_downtime.php';
            //require_once __DIR__.'/controllers/downtime/edit_downtime_old.php';
            edit();
            break;
        case "End_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/end_downtime.php';
            endDt();
            break;
        case "Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            getServiceandEndpointList();
            break;
        case "Edit_Downtime_view_endpoint_tree":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_endpoint_tree.php';
            editDowntimePopulateEndpointTree();
            break;
        case "Downtime_View_Services":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/view_services.php';
            getSitesServices();
            break;
        case "Delete_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site.php';
            delete();
            break;
        case "Delete_Downtime":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/delete_downtime.php';
            delete();
            break;
        case "Downtimes_Overview":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/downtime/downtimes_overview.php';
            view();
            break;
        case "Delete_Service_Group":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group.php';
            delete();
            break;
        case "Delete_User":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/delete_user.php';
            delete();
            break;
        case "Edit_Certification_Status":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_cert_status.php';
            edit();
            break;
        case "Retrieve_Account":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account.php';
            retrieve();
            break;
        case "Remove_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/remove_ngis.php';
            remove_ngis_project();
            break;
        case "Add_Project_NGIs":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/add_ngis.php';
            add_ngis_to_project();
            break;
        case "Edit_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/edit_project.php';
            edit_project();
            break;
        case "Delete_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/project/delete_project.php';
            delete_project();
            break;
        case "Admin_Move_Site":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_site.php';
            move_site();
            break;
        case "Admin_Move_SEP":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/move_service_end_point.php';
            move_service_end_point();
            break;
        case "Admin_Service_Types":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_types.php';
            show_all();
            break;
        case "Admin_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/view_service_type.php';
            view_service_type();
            break;
        case "Admin_Edit_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_service_type.php';
            edit_type();
            break;
        case "Admin_Add_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_service_type.php';
            add_type();
            break;
        case "Admin_Delete_Service_Type":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type.php';
            delete_service_type();
            break;
        case "Admin_Delete_Service_Type_Denied":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_service_type_denied.php';
            deny_delete_type();
            break;
        case "Admin_Add_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_ngi.php';
            add_ngi();
            break;
        case "Admin_Users":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/users.php';
            show_users();
            break;
        case "Admin_Edit_User_DN":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_user_dn.php';
            edit_dn();
            break;
            //        case "Admin_Change_User_Admin_Status":
            //            rejectIfNotAuthenticated();
            //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
            //            make_admin();
            //            break;
        //        case "Admin_Change_User_Admin_Status":
        //            rejectIfNotAuthenticated();
        //            require_once __DIR__.'/controllers/admin/edit_user_isadmin.php';
        //            make_admin();
        //            break;
        case "Admin_Add_Project":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_project.php';
            add_project();
            break;
        case "Admin_Scopes":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scopes.php';
            show_scopes();
            break;
        case "Admin_Remove_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_scope.php';
            remove_scope();
            break;
        case "Admin_Add_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/add_scope.php';
            add_scope();
            break;
        case "Admin_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/scope.php';
            view_scope();
            break;
        case "Admin_Edit_Scope":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/edit_scope.php';
            edit_scope();
            break;
        case "Admin_Delete_NGI":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/admin/delete_ngi.php';
            delete_ngi();
            break;
        case "User_Validate_DN_Change":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/user/retrieve_account_user_validate.php';
            validate_dn_change();
            break;
        case "Add_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/add_site_property.php';
            add_site_property();
            break;
        case "Add_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_service_property.php';
            add_service_property();
            break;
        case "Add_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/add_endpoint_property.php';
            add_endpoint_property();
            break;
        case "Delete_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/delete_site_property.php';
            delete();
            break;
        case "Delete_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_property.php';
            delete();
            break;
        case "Delete_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_endpoint_property.php';
            delete();
            break;
        case "Edit_Site_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/site/edit_site_property.php';
            edit_property();
            break;
        case "Edit_Service_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_property.php';
            edit_property();
            break;
        case "Edit_Endpoint_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_endpoint_property.php';
            edit_property();
            break;
        case "Add_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/add_service_group_property.php';
            add_service_group_property();
            break;
        case "Edit_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/edit_service_group_property.php';
            edit_property();
            break;
        case "Delete_Service_Group_Property":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service_group/delete_service_group_property.php';
            delete();
            break;
        case "Delete_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/delete_service_endpoint.php';
            delete_endpoint();
            break;
        case "Edit_Service_Endpoint":
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/service/edit_service_endpoint.php';
            edit_endpoint();
            break;
        default:
            // require auth by default
            rejectIfNotAuthenticated();
            require_once __DIR__ . '/controllers/start_page.php';
            startPage();
            break;
    }
}
コード例 #8
0
ファイル: addrss.php プロジェクト: warunap/haaprojects
<?php

/** ===============================================
 * 2010&copy;SisoPipo.com
 * Website Project
 * 
 * @author Geln Yang
 * @version 1.0
 ==================================================== */
require_once '_initialization_rss.php';
startPage('Add RSS Resource');
$link = $_POST["link"];
$tags = $_POST["tags"];
if ($link == null || $tags == null) {
    print '<form method="post">';
    if ($link == null) {
        print "Please input link:<br/>";
    }
    print 'URL:<input name="link" size="100" maxlength="200" value="' . $link . '" /><br />';
    if ($tags == null) {
        print "Please input tags:<br/>";
    }
    print 'Tags:<input name="tags" size="100" maxlength="200" value="' . $tags . '"  /><br />';
    print '<input type="submit" value="submit" />';
    print '</form>';
} else {
    addRSS($link, $tags);
}
print '<hr/>';
showRSS();
closeDB();
コード例 #9
0
<?php

// ============================================================================
// PREPRINTS/CONFIG.MANAGE.PHP
// ============================================================================
require_once "config.php";
if (!(list($AUTH_gecos, $AUTH_login, $AUTH_uid) = $authClass->whoami())) {
    startPage("Manage preprints");
    $authClass->loginPrompt();
    endPage();
}
コード例 #10
0
<?php

// ============================================================================
// PREPRINTS/EDIT_USERS.PHP
// ============================================================================
if ($_REQUEST["button"] == "cancel") {
    header("Location: " . $_SERVER["PHP_SELF"]);
}
require_once "config.manage.php";
if (!$authClass->isAdmin()) {
    errorPage("You can not modify the Access Control List.");
}
startPage("Preprints Access Control");
define("localUsers", "Local users");
define("authUsers", "Authorised external users");
define("nonaUsers", "Non-authorised users");
define("adduser", "Add external user");
#print x("i","Here there will be an explanation what is external/internal users... Still to be done")."<br><br>";
foreach (array(authUsers, nonaUsers, localUsers, adduser) as $tab) {
    $links[$tab] = $_SERVER["PHP_SELF"] . "?show={$tab}";
    if (!$_GET["show"]) {
        $_GET["show"] = $tab;
    }
    if (!$links["default"]) {
        $links["default"] = $links[$tab];
    }
}
$tabs = new tabs();
$tabs->show($links);
if ($_GET["show"] == adduser) {
    add_SQLuser();
コード例 #11
0
ファイル: functions.php プロジェクト: DragonLegion/StealthBot
function printTeam()
{
    global $db;
    $align = 0;
    startPage("Meet the StealthBot Team");
    echoln("<h2>Meet the Team</h2>");
    echoln("<p>As of September 24th, 2007, there are five StealthBot developers. Their bios are listed below. <b>This page is under construction and far from finished :)</b></p><br />");
    $ret = $db->doQuery("SELECT * FROM dev;");
    // Field format for this database:
    //  0       1       2       3       4
    // devid    name    loc     imgurl  bio
    while ($row = mysql_fetch_row($ret)) {
        echoln("<h3>" . $row[1] . "</h3>");
        echoln("<p>\r\n                    <a href='http://www.stealthbot.net/board/index.php?showuser="******"'>\r\n                    <img src='" . $row[3] . "' align='" . ($align == 0 ? "right" : "left") . "'>\r\n                    </a>");
        echoln("\t" . stripslashes($row[5]));
        echoln("</p>");
        if ($align == 0) {
            $align = 1;
        } else {
            $align = 0;
        }
        echoln("<br />");
    }
}
コード例 #12
0
ファイル: index.php プロジェクト: warunap/haaprojects
<?php

/** ===============================================
 * 2010&copy;SisoPipo.com
 * Website Project
 *
 * @author Geln Yang
 * @version 1.0
 ==================================================== */
require_once '_initialization_companyinfo.php';
startPage('Company List');
loadModuleCSS('css/companyinfo.css');
showAppLinks();
$db = connectDB();
$page = _page_getpage('page');
_page_initalize($db, COMPANY_INFO_TABLE, $page);
$query = 'SELECT * from ' . COMPANY_INFO_TABLE . ' LIMIT ' . $page->offset . ',' . $page->pagesize;
$result = $db->query($query) or die('Error, query failed');
function GetUrlLink($url)
{
    return '<a href="' . $url . '" target="_blank">' . $url . '</a>';
}
function addCompanyTableLine($company)
{
    print '<tr>';
    print '<td>' . $company->companyid . '</td>';
    print '<td>' . $company->companyname . '</td>';
    print '<td>' . GetUrlLink($company->webhost) . '</td>';
    print '<td>' . GetUrlLink($company->mailhost) . '</td>';
    print '<td>' . $company->tel . '</td>';
    print '<td>' . $company->phone . '</td>';
コード例 #13
0
<?php

include "page.php";
startPage("news");
?>

<!-- begin main content -->
<div id="mainPage">
  <?php 
include "newsItems.php";
$i = 0;
while ($i < count($newsItems)) {
    $item = $newsItems[$i];
    ?>
 
	    <div class="box">
	    <a name="item<?php 
    echo $item['date'];
    ?>
"></a>
	    <h1><?php 
    echo $item['date'] . " " . $item['title'];
    ?>
</h1>
	    <?php 
    echo $item['contents'];
    ?>
	    </div>
    <?php 
    $i++;
}
コード例 #14
0
<?php

include "page.php";
startPage("about");
?>

<!-- begin main content -->
<div id="mainPage">
  <div id="rightBox">
  <div class="box" id="news">
    <h1>Latest News</h1>
<?php 
include "newsItems.php";
$i = 0;
echo "<ul>\n";
while ($i < 5 && $i < count($newsItems)) {
    $item = $newsItems[$i];
    ?>
 <li><span class="date"><?php 
    echo $item['date'];
    ?>
</span>
	    <a href="news.php#item<?php 
    echo $item['date'];
    ?>
"><?php 
    echo $item['title'];
    ?>
</a></li><?php 
    $i++;
}
コード例 #15
0
}
core_declare_input("period", $year);
core_declare_input("group", "all");
core_declare_input("author", "");
core_declare_input("selectPP", "");
$title = array($NOR_fields[$group]);
if ($period != "all") {
    $title[] = $period;
}
if (TRUE) {
    $title[] = "preprints";
}
if ($author != "") {
    $title[] = "with author '" . $author . "'";
}
startPage(join(" ", $title));
$t = new table("width='95%'", "<form action='index.php' method='get'>");
$t->tro();
$t->td("align='left'", getSelection());
if ($authClass->authenticated()) {
    if (getAllPreprints()) {
        $t->td("", core_getLink("manage preprints", "show_preprints.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("manage users", "edit_users.php"));
    }
    if ($authClass->isAdmin()) {
        $t->td("", core_getLink("see access log", "listLog.php"));
    }
    if (True) {
        $t->td("", core_getLink(PP_RESERVE, "edit_preprints.php?nor_pp_period=" . $nor_pp_period . "&amp;nor_pp_mode=" . NOR_PP_MODE_RESERVE));
コード例 #16
0
<?php

include "page.php";
startPage("faq");
?>

<!-- begin main content -->
<div id="mainPage">
  <div class="box">
  <h1>Frequenly Asked Questions</h1>
    <h2>
    Are you going to add focus-follows-mouse support?
  </h2>
  <p>As a long-time Linux user I would love this feature. If anyone can think of
  a cunning way to focus a particular window on demand (preferably without changing the
  window ordering) then tell me and I'll add it into Desktop Manager.</p>
  
    <h2>
    How do I switch desktops without clicking on the pager?
  </h2>

  <p>Switching desktops can be performed either by clicking on the
  desktop preview in the status bar on by using the desktop switch
  hot keys 'Command-Option-Right Arrow' and 'Command-Option-Left
  Arrow'.</p>

  <h2>
    I've hidden the status bar menu, how do I quit the app?
  </h2>

  <p>Control-clicking on the status bar pager also brings up the
コード例 #17
0
<?php

// ============================================================================
// PREPRINTS/LISTLOG.PHP
// ============================================================================
require_once "config.manage.php";
startPage("Preprints DB access log");
$header["time"] = "when";
$header["type"] = "act";
$header["ip"] = "from IP";
$header["uid"] = "who";
$header["text"] = "what";
if (!$_GET["sortby"]) {
    $_GET["sortby"] = "time";
}
if (!$_GET["sortbyDir"]) {
    $_GET["sortbyDir"] = "DESC";
}
if (logTitle()) {
    $q = queryForTPL();
    while ($rec = $dbClass->next_record($q)) {
        drawTableHeader();
        formatRecord();
        $t->printTableRow($rec);
    }
    if ($t) {
        $t->close();
    }
} else {
    print x("h3", "log-file is empty");
}
コード例 #18
0
<?php

ob_start("ob_gzhandler");
define("__READMEFILE", true);
header('Content-type: application/xml; charset="utf-8"', true);
require_once "../functions.php";
echo '<?xml version="1.0" encoding="utf-8"?>' . "\r\n";
?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<?php 
startPage("Command List");
?>
    <h2>StealthBot Commands</h2>
    <p>Here is the full list of all <xsl:value-of select="count(/commands/command)" /> StealthBot commands. You can use them inside the bot by typing a slash, then the command:</p>
<p><b>/ban anAnnoyingPerson</b></p>
<p>You can use them inside the bot, but have their results displayed publicly to the channel you're in, by typing two slashes before the command:</p>
<p><b>//mp3<br />&lt;StealthBot&gt; Current MP3: 1418: Lamb of God - Again We Rise</b></p>

<p>You can also use them from outside the bot, if you have enough access:</p>
<p><b>&lt;Stealth&gt; .say Hello, world!<br />&lt;StealthBot&gt; Hello, world!</b></p>
<p>If you want to chain together multiple commands, you can do that also:</p>
<p><b>&lt;Stealth&gt; .whoami; say Hello, world!<br />&lt;StealthBot&gt; You have access 999 and flags ADMOST.<br />&lt;StealthBot&gt; Hello, world!</b></p>

<p>Lastly, if more than one of your bots share the same trigger, you can order them around by name:</p>
<p><b>&lt;Stealth&gt; .StealthBot say Hello, world!<br />&lt;StealthBot&gt; Hello, world!</b></p>
<p>Click on a command's name to see a detailed description of it, and an example of its use.</p>


<table width='600' cellpadding='1' cellspacing='15'>
    <tr valign='top'>
コード例 #19
0
function errorPage($text, $title = "Manage preprints", $h1 = "Unauthorized access", $return = False)
{
    global $_SERVER;
    if (!$return) {
        $return = $_SERVER["HTTP_REFERER"];
    }
    //startPage($title, "", "pic/person_NO_l.gif");
    startPage($title);
    print "<center>" . "<table>" . "<tr valign=bottom><td colspan=2><h2>{$h1}</h2></td>" . "<tr valign=bottom><td><img src='pic/person_NO_r.gif' align='left' alt='' valign='top'></td>" . "<td>{$text}<br>" . core_getLink("go back", $return) . "</td>" . "</tr></table></center>\n";
    endPage();
}
コード例 #20
0
require_once 'code/setup.php';
global $conn;
global $config;
$emailMessage = "\nPayment for %s %s\n\n\nCompany: %s\n\nName: %s %s\n\n\n\nAddress\n\n%s\n\n%s, %s %s\n\n\n\nPhone: %s\n\nEmail: %s\n\n\nAmount Charged: %s\n\nSuccess: %s\n\n";
$query = "SELECT * FROM recurring_plan WHERE id=%s";
$query = sprintf($query, mysql_real_escape_string($_REQUEST['PlanId']));
$dbResult = mysql_query($query);
$plan = mysql_fetch_assoc($dbResult);
\Stripe\Stripe::setApiKey($config['stripeSecretKey']);
$stripeToken = $_POST['StripeToken'];
$success = true;
$errorMessage = '';
try {
    \Stripe\Charge::create(['amount' => intval($_REQUEST['Amount'] * 100), 'currency' => 'usd', 'source' => $stripeToken, 'description' => $_REQUEST['InvoiceNumber']]);
} catch (Exception $e) {
    $success = false;
    $errorMessage = $e->getMessage();
}
if (!$success) {
    startPage('payment.twig', ['plan' => $plan, 'errorMessage' => $errorMessage, 'postedData' => $_REQUEST]);
    exit;
}
$emailMessage = sprintf($emailMessage, $plan['name'], $_REQUEST['InvoiceNumber'], $_REQUEST['CompanyName'], $_REQUEST['FirstName'], $_REQUEST['LastName'], $_REQUEST['Address1'], $_REQUEST['City'], $_REQUEST['State'], $_REQUEST['PostalCode'], $_REQUEST['Phone'], $_REQUEST['Email'], $_REQUEST['Amount'], $success ? 'yes' : 'no');
$subject = 'Invoice Paid';
if ($_SERVER['ENVIRONMENT_NAME'] == 'stage') {
    $subject .= ' - TESTING ENVIRONMENT NOT REAL CUSTOMER';
}
mail('*****@*****.**', $subject, $emailMessage, "From: billing@builderprofessional.com\r\n");
startPage('processPayment.twig', ['plan' => $plan]);
コード例 #21
0
ファイル: payment.php プロジェクト: builderprofessional/main
<?php

require_once 'code/setup.php';
global $conn;
$query = "SELECT * FROM recurring_plan WHERE id=%s";
$query = sprintf($query, mysql_real_escape_string($_REQUEST['plan_id']));
$dbResult = mysql_query($query);
$plan = mysql_fetch_assoc($dbResult);
startPage('payment.twig', ['plan' => $plan]);
コード例 #22
0
<?php

require_once 'code/setup.php';
startPage('artisanal/artisanal.twig', ['product' => 'artisanal']);
コード例 #23
0
ファイル: convert.php プロジェクト: BackupTheBerlios/sotf-svn
// CHANGED BY BUDDHAFLY
$audioVideoFiles =& new sotf_FileList();
if ($jingle) {
    $audioVideoFiles->getAudioVideoFromDir($obj->getMetaDir());
} else {
    $audioVideoFiles->getAudioVideoFromDir($obj->getAudioDir());
}
$checker =& new sotf_ContentCheck($audioVideoFiles);
$checker = $checker->selectType();
if ($videoconv) {
    $checker->console = false;
} else {
    $checker->console = true;
}
////////////////////////////////////////////////////////
startPage();
$file_errors = 0;
if ($all) {
    //convertall
    $targets = $checker->convertAll($obj->id);
    if ($videoconv) {
        //if video
        foreach ($targets as $target) {
            if (!$checker->fileOK($target)) {
                $file_errors++;
                continue;
            }
            if ($jingle) {
                $obj->setJingle($target);
            } else {
                $obj->setAudio($target);
コード例 #24
0
function errorExit($text)
{
    startPage("Edit Preprints: Error", "../preprints.css");
    echo "<p>{$text}</p>";
    endPage();
}