public static function loadApplications($_apps = '')
 {
     if ($_apps == '') {
         $_apps = ApplicationManager::getApplications();
     }
     foreach ($_apps as $app) {
         require_once ApplicationManager::APPLICATION_REPOSITORY . '/' . $app . '/manifest.php';
     }
 }
Beispiel #2
0
 public function vxShop()
 {
     require_once 'core/ApplicationManagerCore.php';
     $_applications = ApplicationManager::getApplications();
     ApplicationManager::loadApplications($_applications);
     _v_m_s();
     _v_b_l_s();
     _v_ico_map();
     echo ' <a href="/">' . Vocabulary::site_name . '</a> &gt; ' . $this->lang->shop();
     _v_d_e();
     _v_b_l_s();
     // Introduction
     _v_ico_silk('information');
     echo ' 你可以在 ' . Vocabulary::SITE_NAME . ' Shop 买到各种有用的在线应用程序和资料,一切都在持续更新中。';
     _v_d_e();
     _v_b_l_s();
     // Shop
     echo '<span class="text_large">Buy</span>';
     _v_hr();
     $i = 0;
     foreach ($_applications as $application) {
         $i++;
         echo '<table cellpadding="0" cellspacing="0" border="0" width="700">';
         echo '<tr>';
         echo '<td width="150" height="130" align="left" valign="middle">';
         echo '<img src="/' . ApplicationManager::APPLICATION_REPOSITORY . '/' . $application . '/icon.png" />';
         echo '</td>';
         echo '<td width="400" align="left" valign="top">';
         echo '<span style="color: #999; font-size: 18px;">';
         eval('echo app_' . $application . '::name;');
         echo '</span>';
         echo '<span class="tip">';
         echo '<br /><br />';
         eval('echo app_' . $application . '::description;');
         echo '</span>';
         echo '<br /><br />';
         echo '<span class="tip_i">售价</span> <strong>';
         eval('echo app_' . $application . '::price;');
         echo ' 铜币</strong> &nbsp; <span class="tip_i">类型</span> <strong>应用</strong>';
         echo '</td>';
         echo '<td width="150" align="center">';
         _v_btn_l('购买', '/buy');
         echo '</td>';
         echo '</tr>';
         echo '</table>';
         _v_hr();
     }
     _v_d_e();
     _v_b_l_s();
     // Information for Developers
     _v_ico_silk('cog');
     echo ' 如果你熟悉程序开发,希望开发能够被放到 ' . Vocabulary::SITE_NAME . ' Shop 中进行出售的物品,请参考 Project Babel 的 SimpleStorage 实现。';
     _v_d_e();
     _v_d_e();
 }
    public function getBodyHeader($param = null)
    {
        $is_login = false;
        $user_nm = '';
        if (Utils::isPresent($param)) {
            if (isset($param['is_login'])) {
                $is_login = $param['is_login'];
            }
            if (isset($param['user_nm'])) {
                $user_nm = $param['user_nm'];
            }
        }
        $app_mgr = new ApplicationManager();
        $app_nm = $app_mgr->getApplicationName();
        $body_header = <<<END_OF_DATA
  <div id="header">
    <div class="container">
      <span id="logo">
END_OF_DATA;
        if ($is_login) {
            $body_header .= '<a href="/" class="logo" target="_self">' . $app_nm . '</a>';
        } else {
            $body_header .= '<span class="logo">' . $app_nm . '</span>';
        }
        $body_header .= '</span>';
        if ($is_login) {
            //$body_header .= '<span style="padding: 7px 0; position: relative; float: right;">'
            $body_header .= '<span style="padding: 7px 10px; position: relative; float: right;">';
            if (Utils::isPresent($user_nm)) {
                $body_header .= '<span class="user-name">' . $user_nm . '様</span>';
            }
            $body_header .= '<a id="btnLogout" class="button green" href="/login/php/logout.php" target="_self">ログアウト</a>' . '</span>';
        }
        $body_header .= <<<END_OF_DATA
    </div>
  </div>
END_OF_DATA;
        return $body_header;
    }