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


PHP gp函数代码示例

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


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

示例1: main

 function main()
 {
     $this->PageSubtitle = "Documentation Generation";
     if (gp('gp_posted') == '1') {
         return $this->ehProcess();
     }
     ?>
   <h1>Code And Data Dictionary Scanning</h1>
   
   <p>This process will scan all code in this application and
      rebuild the documentation.  The program also scans the data
      dictionary and regenerates table definitions.
      Table definitions are not automatically
      rebuilt during a build, so this process must be run manually
      after each database rebuild.
   
   <p>The process can take anywhere from a few seconds to
      several minutes, depending on how many files and table are
      in the application.
      
   <p><font color=red>This process completely purges out and replaces
      the contents of the DOCPAGES table.  Any changes made to that
      table from other sources will be lost every time this program
      runs.</font></p>
      
   <br><br>
   <p>
   <a href="javascript:Popup('?gp_page=x_docgen&gp_posted=1','Code Scan')">
      Generate Documentation</a>
   <?php 
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:31,代码来源:x_docgen.php

示例2: personadd

 public function personadd()
 {
     $id = (int) $this->_get("id");
     $pid = (int) $this->_get("pid");
     $t = $this->_get("t");
     //        $parentid = (int) $this->_get("parentid");
     $aname = $t == 'a' ? '增加' : '修改';
     //$param1 = gp($this->_get('param')); //htmlspecialchars
     //$param1 = json_encode(ser($this->_post('param'),1)); //htmlspecialchars
     $pinfo = $this->Cusperson->where(array('id' => $pid))->find();
     if ($t == 'a') {
         $_defsts = 'N';
         $pinfo['default_zh'] = '2';
         $param1 = gp($this->_get('param'));
         //htmlspecialchars
     } else {
         $_defsts = $pinfo['sts'];
         $param1 = json_encode(ser($this->_post('param'), 1));
         //htmlspecialchars
     }
     //echo $param1;
     $sel = new stdClass();
     $sel->sts = nysts('使用', '停用', 'sts', $_defsts, '', 'class="length_2"');
     $this->assign('sel', $sel);
     $info = $this->Cusperson->where(array('wtf_id' => $id))->order(array("sts" => "ASC"))->select();
     $this->assign("parentid", $id);
     $this->assign("info", $info);
     $this->assign("pinfo", $pinfo);
     $this->assign("t", $t);
     $this->assign("aname", $aname);
     $this->assign('param', $param1);
     //        $this->display("Dcustomermsg:personadd");
     $this->display();
 }
开发者ID:BGCX262,项目名称:ztoa-svn-to-git,代码行数:34,代码来源:DwtfzhmsgAction.class.php

示例3: callback

function callback($data)
{
    $data = json_encode($data);
    if (gp("callback")) {
        return gp("callback") . "({$data});";
    } else {
        return $data;
    }
}
开发者ID:justinleoye,项目名称:webim-js,代码行数:9,代码来源:common.php

示例4: main

 function main()
 {
     $file = $GLOBALS['AG']['dirs']['root'] . 'application/' . gp('file');
     include_once "spyc.php";
     echo "\n<h2>Examine YAML file {$file}</h2>";
     echo "\n<h3>HERE IS THE SOURCE FILE:</h3>";
     echo "\n<pre>";
     readfile($file);
     echo "\n</pre>";
     $temparray = Spyc::YAMLLoad($file);
     echo "<h3>HERE IT IS PARSED:</h3>";
     hprint_r($temparray);
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:13,代码来源:yamlview.php

示例5: main

    function main()
    {
        if (gp('gp_posted') == 1) {
            return $this->PullCode();
        }
        if (gp('gp_posted') == 2) {
            return $this->PullAndro();
        }
        sourceDeprecated();
        ?>
      <h1>Upgrade Node Manager Only</h1>

      <p>This program below will download the latest available code
         for the node manager only.
      </p>
      
      <p style="color:red">Warning!  This program will overwrite the live
      running code of the Node Manager.  Any programs directly linked to the
      node manager will be instantly updated (this does not apply to 
         instances).  Remember to always keep production databases running
      as instances so that they are unaffected by this action.
      </p>
      
      <a href="javascript:Popup('?gp_page=a_pullcode&gp_posted=2')">Step 1: Get Code</a>
      <br/>
      <br/>
      <?php 
        echo hLinkBuild('andro', 'Step 2: Rebuild Node Manager');
        ?>
     
      <h1>Download Latest Software Updates</h1>      

      <p>This program downloads the latest available version
         of each program listed in the table of applications.
         The code is pulled from the 'Authoritative Node' for 
         that application (applications without an authoritative
         node are not reviewed).
      </p>
      
      <p>This program does not actually run updates to any running
         instances, each instance is upgraded manually at the 
         discretion of the administrator.
      </p>
      
      <br>
      <p>
      <a href="javascript:Popup('?gp_page=a_pullcode&gp_posted=1')">Pull Now</a>

      <?php 
    }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:50,代码来源:a_pullcode.php

示例6: main

 function main()
 {
     if (gpExists('gp_xajax')) {
         $sq = "UPDATE variables\n                    SET variable_value = " . SQLFC(gp('varval')) . "\n                  WHERE variable = " . SQLFC(gp('variable'));
         SQL($sq);
     }
     if (gpExists('gp_cache')) {
         //unlink($GLOBALS['AG']['dirs']['dynamic'].'table_variables.php');
         OptionGet('X');
     }
     if (gpExists('gp_xajax')) {
         return;
     }
     parent::main();
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:15,代码来源:variables.php

示例7: main

 function main()
 {
     // Basically three items.  Either give them back the latest
     // filename, give them contents of latest, or give them
     // contents of a specific version of Andromeda
     if (gp('gp0') == 'latest_filename.php') {
         echo LatestAndro();
     } else {
         $file = gp('gp0');
         if (strpos($file, 'andro') === false) {
             echo "File not found";
         } else {
             $this->GiveEmFile($file);
         }
     }
     // Exit prevents any further extraneous output.
     exit;
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:18,代码来源:public_downloads.php

示例8: processSubmit

 function processSubmit()
 {
     // Get the submitted data
     $table = gp('gp_table_upd', '');
     // Get the flat table def
     $table_dd = dd_TableRef($table);
     $tabflat = ArraySafe($table_dd, 'flat');
     //hprint_r($table);
     $row = aFromGP('gp_upd_');
     //hprint_r($row);
     //hprint_r($row);
     // Build a WHERE clause
     $where = array();
     foreach ($row as $col => $val) {
         if (ArraySafe($tabflat[$col], 'primary_key', 'N') != 'Y') {
             continue;
         }
         $where[] = $col . " = '" . $val . "'";
     }
     //hprint_r($where);
     $where = implode(' AND ', $where);
     // Build a SELECT
     $sql = "SELECT skey\n                 FROM " . ddTable_IDResolve($table) . "\n                WHERE " . $where;
     //hprint_r($sql);
     $records = SQL_AllRows($sql);
     if (count($records) != 1) {
         echo "Invalid or non-unique key supplied\n<br>";
         return;
     }
     // Well, we haven't failed yet, let's add the skey before the update, just to be safe.
     $row['skey'] = $records[0]['skey'];
     $skey = $records[0]['skey'];
     //hprint_r($row);
     SQLX_Update($table_dd, $row);
     if (Errors()) {
         echo hErrors();
     } else {
         echo "Update Successful.  <a href=\"?gp_page={$table}&gp_skey={$skey}\">View Record</a> <br>\n";
     }
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:40,代码来源:x_pkc.php

示例9: main

    function main()
    {
        echo "<h1>View Build Log</h1>";
        ?>
<p>Currently viewing the log for application code "
  <b><?php 
        echo gp('application');
        ?>
</b>".  Click any
   of the links below to see the logs for the particular application:</p>
<?php 
        // Run out list of apps they can see
        echo "<hr>\n";
        $results = SQL("select * from applications");
        while ($row = pg_fetch_array($results)) {
            echo HTMLE_A_STD($row["application"] . " - " . $row["description"], "a_builder_log", "gp_out=info&application=" . $row["application"]) . "<br>\n";
        }
        echo "<hr>\n";
        // Make up a filename
        global $AG;
        $t = pathinfo(__FILE__);
        $pLogDir = $t["dirname"];
        $pLogFile = "AndroDBB." . CleanGet("application") . ".log";
        $pLogPath = "{$pLogDir}/{$pLogFile}";
        if (!file_exists($pLogPath)) {
            echo "<p>There is no build log file for this application at this time.  This usually\n\t\t\t\tmeans that the application has not been built yet.  Try launching a build process\n\t\t\t\tand then coming back to this page.</p>";
            return;
        }
        //echo "<pre style=\"background-color: silver; color: blue\">";
        $fgc = file_get_contents($pLogPath);
        $fgc = str_replace("\n", "<br>", $fgc);
        echo "<div style=\"font: 10pt courier; color: navy;\">" . $fgc . "</div>";
        //echo file_get_contents($pLogPath);
        //echo "</pre>";
        return "View Build/Update Log for: " . CleanGet("application");
    }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:36,代码来源:a_builder_log.php

示例10: makeDefault

 function makeDefault()
 {
     $col = SQLFN(gp('column'));
     $skey = SQLFN(gp('skey'));
     SQL("update configuser set {$col} = null WHERE skey = {$skey}");
     configWrite('user');
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:7,代码来源:x4configuser.php

示例11: header

<?php

include_once "common.php";
if ($connection["ticket"] == gp("ticket")) {
    echo "ok";
} else {
    header("HTTP/1.0 404 Not Found");
    echo "No client.";
}
开发者ID:justinleoye,项目名称:webim-js,代码行数:9,代码来源:refresh.php

示例12: gp

<?php

include_once 'common.php';
require 'http_client.php';
$ticket = gp('ticket');
$room_id = gp('id');
$nick = gp('nick');
if (!empty($ticket)) {
    $data = array('ticket' => $ticket, 'nick' => $nick, 'domain' => $_IMC['domain'], 'apikey' => $_IMC['apikey'], 'room' => $room_id, 'endpoint' => $space['uid']);
    $client = new HttpClient($_IMC['imsvr'], $_IMC['impost']);
    $client->post('/room/leave', $data);
    $pageContents = $client->getContent();
    echo $pageContents;
}
开发者ID:Harvey,项目名称:www.nextim.cn,代码行数:14,代码来源:leave.php

示例13: nick

<?php

include_once 'common.php';
if (empty($space)) {
    exit;
}
$name = nick($space);
require 'http_client.php';
$stranger_ids = ids_except($space['uid'], ids_array(gp("stranger_ids")));
//陌生人
$friend_ids = ids_array($space['friends']);
//好友
$buddy_ids = ids_array(gp("buddy_ids"));
//正在聊天的联系人
$new_messages = find_new_message();
//查找离线消息
for ($i = 0; $i < count($new_messages); $i++) {
    $msg_uid = $new_messages[$i]["from"];
    array_push($buddy_ids, $msg_uid);
    array_push($stranger_ids, $msg_uid);
}
//Login webim server.
$nick = to_utf8($name);
$setting = setting();
$block_list = is_array($setting->block_list) ? $setting->block_list : array();
$rooms = find_room();
$room_ids = array();
foreach ($rooms as $key => $value) {
    if (in_array($key, $block_list)) {
        $rooms[$key]['blocked'] = true;
    } else {
开发者ID:Harvey,项目名称:www.nextim.cn,代码行数:31,代码来源:online.php

示例14: mainDiff

 function mainDiff($quiet = false)
 {
     $app = gp('gp_app');
     $file = gp('gpfile');
     $d1 = AppDir($app);
     $f1 = $d1 . $file;
     $f2 = $d1 . '/ref/' . $file;
     $diff = shell_exec("diff -u {$f2} {$f1}");
     if ($quiet) {
         return $diff;
     }
     // If not in quiet mode, they want to view the diff
     x_EchoFlush("<h1>File Diff</h1>");
     x_EchoFlush("Application {$app}");
     x_EchoFlush("Local file is: {$f1}");
     x_EchoFlush("Reference file is: {$f2}");
     echo "<pre>";
     echo htmlentities($diff);
     echo "</pre>";
 }
开发者ID:KlabsTechnology,项目名称:andro,代码行数:20,代码来源:a_scontrol.php

示例15: main

    function main()
    {
        # KFD 2/17/09.  If installed with Debian package, will
        #               have username and password of "start".
        #               Must force a new id now.
        #
        if (SessionGet('UID') == 'start') {
            if (gp('user_id') != '') {
                if (gp('user_id') == '') {
                    ErrorAdd("User Id may not be empty");
                }
                if (substr(gp('user_id'), 0, 5) == 'andro') {
                    ErrorAdd("User Id may not begin with 'andro'");
                }
                if (gp('password1') != gp('password2')) {
                    ErrorAdd("Passwords do not match");
                }
                if (strlen(trim(gp('password1'))) == 0) {
                    ErrorAdd("Password may not be empty");
                }
                if (!Errors()) {
                    $row = array('user_id' => gp('user_id'), 'member_password' => gp('password1'));
                    SQLX_Insert('usersroot', $row);
                    if (!Errors()) {
                        scDBConn_Pop();
                        SessionSet('UID', gp('user_id'));
                        SessionSet('PWD', gp('password1'));
                        scDBConn_Push();
                        SQL("DELETE FROM USERSROOT WHERE user_id='start'");
                        # Get rid of the form that replaces login
                        $file = fsDirTop() . 'application/x_login_form.inc.html';
                        $fileto = $file . '.done';
                        @rename($file, $fileto);
                        ?>
                        <h1>New Root User Created</h1>
                        
                        <p>Your new user is created.</p>
                        
                        <p><a href="index.php?st2logout=1">
                           Return to Login Page</a></p>
                        <?php 
                        return;
                    }
                }
            }
            ?>
            <h1>New Install - Must Create User</h1>
            
            <p>You are logged into your Node Manager with the default
               username of "start" and password "start".  We have to change
               this right now so nobody can get into your new system.
            </p>
            
            <p>Please provide a new ROOT (superuser) user id and password
               below.  Andromeda will create the new user, log you in as
               that user, and remove the "start" user.
            </p>
            
            <table>
              <tr><td align="left">User Name
                  <td><input name = 'user_id' /> (may not begin with 'andro')
              <tr><td align="left">Password
                  <td><input type="password" name = 'password1'/>
              <tr><td align="left">Password (verify)
                  <td><input type="password" name = 'password2'/>
            </table>
            <input type="submit" value="Create User Now" />
            <?php 
            return;
        }
        /* FUTURE X6 VERSION OF NODE MANAGER
           ?>
           <h1>Node Manager Upgrade Required</h1>
           
           <p>The new version of the Node Manager uses the "x6" 
              interface to provide a richer experience.  Please click
              the link below to upgrade your Node Manager.  Once the
              upgrade is complete, log out and back in.
           </p>
           
           <p><a href="javascript:Popup('index.php?gp_page=a_builder&gp_out=none&x2=1&txt_application=andro','Build')"
               >Upgrade Node Manager Now</a>.</p>
               
           <p><a href="?st2logout=1">Logout After Upgrade</a>.</p>
           
           <?php
           return;
           */
        # <------- EARLY RETURN.
        # KFD 1/10/08, The old x_welcome screen is not used anymore,
        #              we have the new 'cpanel' now in x6.
        # ===============================================================
        ?>
        <h1>Welcome to the Andromeda Node Manager</h1>
        <?php 
        // Work out if there is a new release available
        //
        $apps = svnVersions();
        $andro = a($apps, 'andro', array('svn_url' => ''));
        if (trim($andro['svn_url']) == '') {
//.........这里部分代码省略.........
开发者ID:KlabsTechnology,项目名称:andro,代码行数:101,代码来源:x_welcome.php


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