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


PHP Lobby::u方法代码示例

本文整理汇总了PHP中Lobby::u方法的典型用法代码示例。如果您正苦于以下问题:PHP Lobby::u方法的具体用法?PHP Lobby::u怎么用?PHP Lobby::u使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lobby的用法示例。


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

示例1: makePanelItem

 public function makePanelItem($text, $href, $id, $extraClass = "")
 {
     if ($href == L_URL) {
         /**
          * Home button
          */
         $html = "<li class='item {$extraClass}' id='home'><a href='" . L_URL . "'></a></li>";
     } else {
         if ($href == "/admin") {
             /**
              * Admin button
              */
             $html = "<li class='item {$extraClass}' id='lobby'><a href='" . \Lobby::u($href) . "' class='parent'>Lobby</a></li>";
         } else {
             $html = '<li class="item ' . $extraClass . '" id="' . $id . '">';
             if ($href == "") {
                 $html .= $text;
             } else {
                 if ($href === "htmlContent") {
                     $html .= $text;
                 } else {
                     $html .= \Lobby::l($href, $text);
                 }
             }
             $html .= '</li>';
         }
     }
     return $html;
 }
开发者ID:LobbyOS,项目名称:server,代码行数:29,代码来源:Theme.php

示例2: foreach

              <?php 
    foreach ($Apps as $app => $null) {
        $App = new \Lobby\Apps($app);
        $data = $App->info;
        $appImage = !isset($data['image']) ? L_URL . "/includes/lib/core/Img/blank.png" : $data['image'];
        $enabled = $App->isEnabled();
        ?>
                <tr <?php 
        if (!$enabled) {
            echo 'style="background: #EEE;"';
        }
        ?>
>
                  <td>
                    <a href="<?php 
        echo \Lobby::u("/admin/app/{$app}");
        ?>
"><?php 
        echo $data['name'];
        ?>
</a>
                  </td>
                  <td><?php 
        echo $data['version'];
        ?>
</td>
                  <td><?php 
        echo $data['short_description'];
        ?>
</td>
                  <td style="//text-align:center;">
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:apps.php

示例3: u

 public function u($path = null, $src = false)
 {
     $path = ltrim($path, "/");
     return $path === null ? \Lobby::u() : ($src ? $this->srcURL : $this->url) . "/{$path}";
 }
开发者ID:LobbyOS,项目名称:server,代码行数:5,代码来源:App.php

示例4: array

<?php

$notifications = Lobby\DB::getJSONOption("notify_items");
/**
 * If there is a update available either app or core, add a Notify item
 */
if (\Lobby\Update::isAvailable()) {
    $notifications["update"] = array("contents" => "New Updates Are Available", "icon" => "update", "iconURL" => null, "href" => \Lobby::u("/admin/update.php"));
}
echo json_encode($notifications);
开发者ID:LobbyOS,项目名称:server,代码行数:10,代码来源:notify.php

示例5: unset

<?php

unset($_SESSION['kerala-it-exam-rid']);
unset($_SESSION['kerala-it-exam-qs']);
unset($_SESSION['kerala-it-exam-class']);
?>
<div class="contents">
  <h1>Please Wait....</h1>
  <p>I'm doing some ninja stuff. So, please wait for 2 seconds. :-)</p>
  <script>
  localStorage["end_time"] = "invalid"; // In case `delete` didn't work
  delete localStorage["end_time"];
  setTimeout(function(){
    window.location = "<?php 
echo \Lobby::u("/app/kerala-it-exam");
?>
";
  }, 50);
  </script>
</div>
开发者ID:saviobosco,项目名称:lobby,代码行数:20,代码来源:restart.php

示例6: ser

                     * Enable app lEdit
                     */
                    \Lobby::$installed = true;
                    \Lobby\DB::init();
                    $App = new \Lobby\Apps("ledit");
                    $App->enableApp();
                    echo '<cl/><a href="?step=3" class="button">Proceed</a>';
                } else {
                    ser("Unable To Create Database Tables", "Are there any tables with the same name ? Or Does the user have the permissions to create tables ?<cl/>The <b>config.php</b> file is created. To try again, remove the <b>config.php</b> file and click the button. <cl/>" . \Lobby::l("/admin/install.php?step=2", "Try Again", "class='button'"));
                }
            }
        } else {
            ?>
              <h2 style="margin-top: -20px;">Database Configuration</h2>
              <form action="<?php 
            \Lobby::u();
            ?>
" method="POST">
                 <table>
                  <tbody>
                    <tr>
                      <td>Database Host</td>
                      <td>
                        <input type="text" name="dbhost" value="localhost">
                      </td>
                      <td>On Most Systems, It's localhost</td>
                    </tr>
                    <tr>
                      <td>Database Port</td>
                      <td>
                        <input type="text" name="dbport" value="3306">
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:install.php

示例7: htmlspecialchars

<html>
  <head>
    <?php 
\Hooks::doAction("head.begin");
\Response::head("Admin Login");
?>
  </head>
  <body>
    <?php 
\Hooks::doAction("body.begin");
?>
    <div id="workspace">
      <div class="contents">
        <h2>Log In</h2>
        <form method="POST" action="<?php 
echo \Lobby::u("/admin/login");
?>
">
          <label clear>
            <span clear>Username</span>
            <input clear type="text" name="username" value="<?php 
if (isset($_POST['username'])) {
    echo htmlspecialchars($_POST['username']);
}
?>
" />
          </label>
          <label clear>
            <span clear>Password</span>
            <input clear type="password" name="password" id="password" />
            <?php 
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:login.php

示例8: redirect

 /**
  * A redirect function that support HTTP status code for redirection 
  * 302 = Moved Temporarily
  */
 public static function redirect($url, $status = 302)
 {
     $url = \Lobby::u($url);
     header("Location: {$url}", true, $status);
     exit;
 }
开发者ID:LobbyOS,项目名称:server,代码行数:10,代码来源:Response.php

示例9: sss

  <head>
    <?php 
\Hooks::doAction("admin.head.begin");
\Response::head("Admin");
?>
  </head>
  <body>
    <?php 
\Hooks::doAction("admin.body.begin");
?>
    <div id="workspace">
      <div class="contents">
        <h1>Admin</h1>
        <?php 
if (\Lobby\Update::isAvailable()) {
    echo sss("Updates Available", "Some updates are available for you to update. Yay!<cl/><a class='btn blue' href='" . \Lobby::u("/admin/update.php") . "'>See Updates</a>");
}
?>
        <p>Manage your Lobby installation.</p>
        <?php 
echo \Lobby::l("admin/settings.php", "Settings", "class='btn red'") . "&nbsp;";
echo \Lobby::l("admin/apps.php", "Apps", "class='btn green'") . "&nbsp;";
echo \Lobby::l("admin/lobby-store.php", "Lobby Store", "class='btn pink'") . "&nbsp;";
if (\Lobby\Modules::exists("admin")) {
    echo \Lobby::l("admin/login?logout=true", "Log Out", "class='btn'");
}
?>
        <h2>About</h2>
        <p>You are using <b>Lobby <?php 
echo \Lobby::getVersion();
?>
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:index.php

示例10:

              <div class="app col s12 m6 l4">
                <div class="app-inner card row">
                  <div class="lpane col s4 m5 l5">
                    <a href="<?php 
            echo \Lobby::u("/admin/apps.php?app={$app}");
            ?>
">
                      <img src="<?php 
            echo $App->info["logo"];
            ?>
" />
                    </a>
                  </div>
                  <div class="rpane col s8 m6 l7">
                    <a href="<?php 
            echo \Lobby::u("/admin/apps.php?app={$app}");
            ?>
" class="name truncate" title="<?php 
            echo $App->info["name"];
            ?>
"><?php 
            echo $App->info["name"];
            ?>
</a>
                    <div class="actions">
                      <?php 
            if ($App->hasUpdate()) {
                echo "<cl/>" . \Lobby::l("/admin/update.php", "Update", "class='btn orange'");
            } else {
                if ($App->enabled) {
                    echo \Lobby::l("/admin/apps.php?app={$app}&action=disable" . CSRF::getParam(), "Disable", "class='btn'");
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:apps.php

示例11: sss

  <p>Make a standalone Lobby app.</p>
  <h2>Config</h2>
  <?php 
$appID = Request::postParam("appID");
if ($appID !== null && CSRF::check()) {
    if ($appID === "") {
        $this->removeData("appID");
    } else {
        $this->saveData("appID", $appID);
    }
    echo sss("Saved", "Settings has been saved.");
}
$appID = $this->getData("appID");
?>
  <form action="<?php 
echo Lobby::u("/admin/app/indi");
?>
" method="POST">
    <label>
      <span>App ID</span>
      <select name="appID">
        <option value="">Choose App:</option>
        <?php 
foreach (Lobby\Apps::getEnabledApps() as $app) {
    echo "<option value='{$app}' " . ($appID === $app ? "selected='selected'" : "") . ">{$app}</option>";
}
?>
      </select>
    </label>
    <?php 
echo CSRF::getInput();
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:index.php

示例12:

<?php

$GLOBALS['AppID'] = $AppID;
?>
<html>
  <head>
    <?php 
\Lobby::doHook("head.begin");
?>
    <script>
      window.tmp = {};window.lobbyExtra = {};<?php 
if (isset($AppID)) {
    echo 'lobbyExtra["app"] = { id: "' . $AppID . '", url: "' . APP_URL . '", src: "' . \Lobby::u("/contents/apps/{$AppID}") . '" };';
}
?>
</script>
    <?php 
\Lobby::head();
\Lobby::doHook("head.end");
?>
  </head>
  <body>
    <?php 
\Lobby::doHook("body.begin");
?>
    <div class="workspace" <?php 
if (isset($AppID)) {
    echo 'id="' . $AppID . '"';
}
?>
>
开发者ID:anandubajith,项目名称:lobby,代码行数:31,代码来源:page.php

示例13: appAdminSetup

 public function appAdminSetup()
 {
     Router::route("/admin/app/[:appID]?/[**:page]?", function ($request) {
         $appID = $request->appID;
         $page = $request->page === null ? "/" : "/{$request->page}";
         $App = new \Lobby\Apps($appID);
         if (!$App->exists) {
             ser();
             return null;
         }
         Hooks::addFilter("admin.view.sidebar", function ($links) use($appID, $App) {
             $links["/admin/app/{$appID}"] = $App->info["name"];
             return $links;
         });
         Hooks::addFilter("app.manifest", function ($info) {
             $info["adminURL"] = L_URL . "/admin/app/" . $info["id"];
             return $info;
         });
         $class = $App->getInstance();
         /**
          * Set the title
          */
         Response::setTitle($App->info["name"]);
         $pageResponse = $class->page($page);
         if ($pageResponse === "auto") {
             if ($page === "/") {
                 $page = "/index";
             }
             $html = $class->inc("/src/page/admin{$page}.php");
             if ($html) {
                 Response::setPage($html);
             } else {
                 ser();
             }
         } else {
             if ($pageResponse === null) {
                 ob_start();
                 echo ser("Error", "The app '<strong>{$AppID}</strong>' does not have an Admin Page. <a clear href='" . \Lobby::u("/app/{$AppID}") . "' class='btn green'>Go To App</a>");
                 $error = ob_get_contents();
                 ob_end_clean();
                 Response::setPage($error);
             } else {
                 Response::setPage($pageResponse);
             }
         }
     });
 }
开发者ID:LobbyOS,项目名称:server,代码行数:47,代码来源:Module.php

示例14: htmlspecialchars

<div class="contents">
  <h1>CSS Compressor</h1>
  <p>Paste your CSS code in the textbox below and COMPRESS !</p>
  <form action="<?php 
echo \Lobby::u();
?>
" method="POST">
    <center>
      <textarea name="code"></textarea></textarea><cl/>
      <button style="font-size: 18px;">Compress</button>
    </center>
  </form>
  <?php 
if (isset($_POST['code'])) {
    include APP_DIR . "/src/load.php";
    $code = $_POST['code'];
    $cmp = $SC->_compressor("css", $code);
    $cmp = htmlspecialchars($cmp);
    ?>
    <h2>Compressed Code</h2>
    <p>Here is the compressed code. Hurray!</p>
    <textarea><?php 
    echo $cmp;
    ?>
</textarea>
  <?php 
}
?>
  <style>
    textarea{height: 200px;width: 600px;}
  </style>
开发者ID:saviobosco,项目名称:lobby,代码行数:31,代码来源:css.php

示例15: getAuthorName

 function getAuthorName($id = 1)
 {
     $sql = \Lobby\DB::getDBH()->prepare("SELECT `name` FROM `users` WHERE `id` = ?");
     $sql->execute(array($id));
     return $sql->fetchColumn();
 }
 function getRating($id)
 {
     $GLOBALS['star']->id = "app-{$id}";
     return $GLOBALS['star']->getRating("", "rate_value");
 }
 $i = 0;
 foreach ($results as $r) {
     $response['apps'][$i] = $r;
     $response['apps'][$i]['author'] = getAuthorName($r['author']);
     $response['apps'][$i]['author_page'] = \Lobby::u("/u/{$r['author']}");
     $response['apps'][$i]['description'] = $Parsedown->text(htmlspecialchars($r['description']));
     $response['apps'][$i]['image'] = L_URL . "/api/app/{$r['id']}/logo";
     $response['apps'][$i]['permalink'] = L_URL . "/apps/{$r['id']}";
     $response['apps'][$i]['rating'] = getRating($r['id']) . "/5";
     $response['apps'][$i]['requires'] = json_decode($r['requires'], true);
     /**
      * If `lobby` param is not present then,
      * client is using Lobby < 0.6
      */
     if (!isset($_POST["lobby"])) {
         $response['apps'][$i]['requires']["lobby"] = array(">=", "0.6");
     }
     /**
      * Recommended : Singular word
      * For versions >=0.7
开发者ID:LobbyOS,项目名称:server,代码行数:31,代码来源:api.php


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