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


PHP RainTPL::draw方法代码示例

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


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

示例1: beginLoggedIn

 private function beginLoggedIn()
 {
     $this->getNaechsteFristen();
     $this->generateAktuelleErgebnisse();
     $this->generateNaechstenSpieltag();
     $this->raintpl->draw('home');
 }
开发者ID:nichdu,项目名称:tippspiel,代码行数:7,代码来源:Page.Home.class.php

示例2: generate

 /**
  * Generiert die Ausgabe nach der im Konstruktor vorgegebenen Regeln
  * @return string|null String, wenn $display im Konstruktor auf false gesetzt wurde, ansonsten null
  * und das Template wird direkt ausgegeben
  */
 public function generate()
 {
     $spieltagArray = $this->loadFromDatabase();
     $this->tpl->assign('spieltage', $spieltagArray);
     if ($this->display) {
         StartUp::AssignVars($this->tpl, 'Nächste Tippfristen');
         $this->tpl->draw('naechste_fristen', false);
     } else {
         return $this->tpl->draw('naechste_fristen', true);
     }
     return null;
 }
开发者ID:nichdu,项目名称:tippspiel,代码行数:17,代码来源:Page.NaechsteFristen.class.php

示例3: loadView

 public function loadView($fileName, $data = array(), $return_string = false)
 {
     require_once CORE_DIR . '/rain.tpl.class.php';
     raintpl::configure("base_url", null);
     raintpl::configure("tpl_dir", APP_DIR . "/views/");
     raintpl::configure("cache_dir", APP_DIR . "/cache/");
     $tpl = new RainTPL();
     foreach ($data as $key => $val) {
         $tpl->assign($key, $val);
     }
     $tpl->assign("baseURL", baseURL());
     if ($return_string) {
         $html = $tpl->draw($fileName, true);
         return $html;
     } else {
         $tpl->draw($fileName, false);
     }
 }
开发者ID:khanhicetea,项目名称:kMVC,代码行数:18,代码来源:baseController.php

示例4: action_default

 public function action_default()
 {
     if (isset($_SESSION['user'])) {
         unset($_SESSION['user']);
         session_destroy();
     }
     $tmp2 = new RainTPL();
     return $tmp2->draw('logout', true);
 }
开发者ID:cherry-wb,项目名称:Qemu,代码行数:9,代码来源:logout.php

示例5: index

 public static function index()
 {
     //Get Products Information
     $data = ProductDataSource::getProductData();
     //Initalize Rain TPL templating
     $view = new RainTPL();
     //Assign data to info variable
     $view->assign('info', $data);
     //Draw out HTML
     $view->draw('index');
 }
开发者ID:alikingravi,项目名称:itc,代码行数:11,代码来源:IndexController.php

示例6: action_default

 public function action_default()
 {
     if (Modul::hasAccess('system') == false) {
         return '<div class="notice error">Sie haben keinen Zugriff</div>';
     }
     $query = $GLOBALS['pdo']->prepare("SELECT count(vmID) AS `vms`, SUM(IF(status=1,1,0)) AS `vms_on` FROM vm");
     $query->execute();
     $data = $query->fetch();
     $query = $GLOBALS['pdo']->prepare("SELECT imageID FROM images");
     $query->execute();
     $images = $query->rowCount();
     $tmp = new RainTPL();
     $tmp->assign('vms', $data['vms']);
     $tmp->assign('vms_on', $data['vms_on']);
     $tmp->assign('images', $images);
     $ram = Server::getRamSettings();
     if ($ram) {
         $ram_usage = FileSystem::formatFileSize($ram['used']) . ' / ' . FileSystem::formatFileSize($ram['all']);
     } else {
         $ram_usage = 'linux only';
     }
     $tmp->assign('ram_usage', $ram_usage);
     $cpu = Server::getCPUusage();
     if ($cpu) {
         $cpu_usage = implode(" ", array_values($cpu));
     } else {
         $cpu_usage = 'linux only';
     }
     $tmp->assign('cpu_usage', $cpu_usage);
     $free = disk_free_space('/');
     $all = disk_total_space('/');
     $tmp->assign('free', FileSystem::formatFileSize($all - $free));
     $tmp->assign('all', FileSystem::formatFileSize($all));
     $qemu_ram = Server::getQemuRamTemp();
     if ($qemu_ram !== false) {
         $tmp->assign('ram_qemu', FileSystem::formatFileSize($qemu_ram));
     } else {
         $tmp->assign('ram_qemu', 'linux only');
     }
     $roles = '';
     $query = $GLOBALS['pdo']->prepare("SELECT * FROM roles");
     $query->execute();
     while ($ds = $query->fetch()) {
         $roles .= '<option value="' . $ds['roleID'] . '">' . $ds['name'] . '</option>';
     }
     $roles = str_replace('value="' . $GLOBALS['config']['default_role'] . '"', 'value="' . $GLOBALS['config']['default_role'] . '" selected="selected"', $roles);
     $tmp->assign('roles', $roles);
     foreach ($GLOBALS['config'] as $key => $value) {
         $tmp->assign($key, $value);
     }
     return $tmp->draw('system', true);
 }
开发者ID:cherry-wb,项目名称:Qemu,代码行数:52,代码来源:system.php

示例7: action_default

 public function action_default()
 {
     if (isset($_SESSION['user']) == false) {
         return '<div class="error notice">Sie haben keinen Zugriff</div>';
     }
     $query = $GLOBALS['pdo']->prepare("SELECT * FROM users WHERE userID=:user");
     $query->bindValue('user', $_SESSION['user']->id);
     $query->execute();
     $data = $query->fetch();
     $tmp = new RainTPL();
     $tmp->assign('username', $data['username']);
     $tmp->assign('email', $data['email']);
     $tmp->assign('name', $data['name']);
     return $tmp->draw('profil', true);
 }
开发者ID:cherry-wb,项目名称:Qemu,代码行数:15,代码来源:profil.php

示例8: RainTPL

                echo $value1["id"];
                ?>
"><img src='<?php 
                echo WEB_PATH;
                ?>
templates/images/delete.gif' ALT='<?php 
                echo _('Delete');
                ?>
' border='0'></a><?php 
            }
            ?>
</td>
  </tr>
<?php 
            $counter1++;
        }
    }
    ?>
</table>
</center>
<?php 
}
$RainTPL_include_obj = new RainTPL();
$RainTPL_include_obj->assign($var);
$RainTPL_directory_template_temp = $RainTPL_include_obj->tpl_dir;
$this->tpl_dir = $GLOBALS['RainTPL_tpl_dir'] = $RainTPL_include_obj->tpl_dir . "/" . dirname("global_footer");
$RainTPL_include_obj->draw("global_footer");
$this->tpl_dir = $GLOBALS['RainTPL_tpl_dir'] = $RainTPL_directory_template_temp;
?>
<!--/ template_manager -->
开发者ID:swk,项目名称:bluebox,代码行数:30,代码来源:template_manager_1282114110.php

示例9: RainTPL

            }
        }
        ?>
                    </ul>
                </li>
            <?php 
    }
}
?>
    </ul>


<?php 
$left_column = ob_get_contents();
ob_clean();
$footer_control = '<div class="total_money"><label>Tổng tiền :</label> <span id="total-money" style="font-size: 16px;color: red;font-weight: bold"> </span></div>';
$rainTpl = new RainTPL();
add_more_css('custom.css', $load_header);
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$rainTpl->assign('left_control', $left_control);
$rainTpl->assign('right_control', $right_control);
$rainTpl->assign('top_control', $top_control);
$rainTpl->assign('footer_control', $footer_control);
$rainTpl->assign('left_column', $left_column);
$rainTpl->assign('right_column', $right_column);
$custom_script = file_get_contents('script.html');
$rainTpl->assign('custom_script', $custom_script);
$rainTpl->draw('fullwidth_2column_report_transfer');
开发者ID:virutmath,项目名称:crm_local,代码行数:30,代码来源:revenue_menus.php

示例10: count

 */
$list->add('dic_key', 'Nội dung', 'string', 1, 0);
$list->add('dic_translate_en', 'Bản dịch', 'string');
$list->add('', 'Edit', 'edit');
$list->add('', 'Delete', 'delete');
$db_count = new db_count('SELECT count(*) as count
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ');
$total = $db_count->total;
unset($db_count);
$db_listing = new db_query('SELECT *
                            FROM ' . $bg_table . '
                            WHERE 1 ' . $list->sqlSearch() . '
                            ORDER BY ' . $list->sqlSort() . ' ' . $id_field . ' DESC
                            ' . $list->limit($total));
$total_row = mysqli_num_rows($db_listing->result);
$table_header = $list->showHeader($total_row);
$rainTpl->assign('table_header', $table_header);
$table_footer = $list->showFooter();
$rainTpl->assign('table_footer', $table_footer);
$table_listing = array();
$i = 0;
while ($row = mysqli_fetch_assoc($db_listing->result)) {
    $i++;
    $array_td = array('<td width="50%">' . $row['dic_key'] . '</td>', '<td width="50%">' . $row['dic_translate_en'] . '</td>', $list->showEdit($row[$id_field]), $list->showDelete($row[$id_field]));
    $table_listing[] = array('start_tr' => $list->start_tr($i, $row[$id_field]), 'end_tr' => $list->end_tr(), 'array_td' => $array_td);
}
$rainTpl->assign('table_listing', $table_listing);
$rainTpl->draw('listing');
开发者ID:virutmath,项目名称:suckhoe,代码行数:30,代码来源:listing.php

示例11: stop_service

function stop_service()
{
    header("HTTP/1.0 200");
    $xxx = new RainTPL();
    echo $xxx->draw('stop_service', 1);
    exit;
}
开发者ID:virutmath,项目名称:suckhoe,代码行数:7,代码来源:functions.php

示例12: RainTPL

            </div>
            <div class="modal-body">
               <div class="form-group">
                  Descripción:
                  <input class="form-control" type="text" name="descripcion" placeholder="Cuenta principal" autocomplete="off" required=""/>
               </div>
               <div class="form-group">
                  <a target="_blank" href="http://es.wikipedia.org/wiki/International_Bank_Account_Number">IBAN</a>:
                  <input class="form-control" type="text" name="iban" maxlength="34" placeholder="ES12345678901234567890123456" autocomplete="off"/>
               </div>
               <div class="form-group">
                  <a target="_blank" href="http://es.wikipedia.org/wiki/Society_for_Worldwide_Interbank_Financial_Telecommunication">SWIFT</a> o BIC:
                  <input class="form-control" type="text" name="swift" maxlength="11" autocomplete="off"/>
               </div>
            </div>
            <div class="modal-footer">
               <button class="btn btn-sm btn-primary" type="submit">
                  <span class="glyphicon glyphicon-floppy-disk"></span> &nbsp; Guardar
               </button>
            </div>
         </div>
      </div>
   </div>
</form>

<?php 
$tpl = new RainTPL();
$tpl_dir_temp = self::$tpl_dir;
$tpl->assign($this->var);
$tpl->draw(dirname("footer") . (substr("footer", -1, 1) != "/" ? "/" : "") . basename("footer"));
开发者ID:desalort,项目名称:FSAutoventas,代码行数:30,代码来源:admin_empresa.b3d75dca6f3bad01d8be9e3c65858363.rtpl.php

示例13: RainTPL

}
$db_bill_debit = new db_query('SELECT * FROM ' . $tabel . ' ' . $left_join . '
                                WHERE ' . $id_column . ' 
                                AND ' . $status . ' = 0');
$number_bill = mysqli_num_rows($db_bill_debit->result);
while ($data_bill_debit = mysqli_fetch_assoc($db_bill_debit->result)) {
    $name = $data_bill_debit[$name_key];
    $total_debit += $data_bill_debit[$totalmoney];
    if ($data_bill_debit[$image] == '') {
        $avatar = $avatars;
    } else {
        $avatar = '<img src="' . get_picture_path($data_bill_debit[$image]) . '"/>';
    }
}
$total_money = '<span class="total_money" data-total_money="' . $total_debit . '">' . number_format($total_debit) . '</span>';
$rainTpl = new RainTPL();
add_more_css('pay_debit.css', $load_header);
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('name_object', $name_object);
$rainTpl->assign('name', $name);
$rainTpl->assign('id', $id);
$rainTpl->assign('record_id', $record_id);
$rainTpl->assign('type', $type);
$rainTpl->assign('avatar', $avatar);
$rainTpl->assign('number_bill', $number_bill);
$rainTpl->assign('total_debit', $total_debit);
$rainTpl->assign('total_money', $total_money);
$rainTpl->assign('footer_control', $footer_control);
$rainTpl->assign('link_custom_script', '<script type="text/javascript" src="script_debit.js"></script>');
$rainTpl->draw('content_pay_debit');
开发者ID:virutmath,项目名称:crm_local,代码行数:30,代码来源:pay_debit.php

示例14: showDailyRSS

function showDailyRSS()
{
    // Cache system
    $query = $_SERVER["QUERY_STRING"];
    $cache = new CachedPage($GLOBALS['config']['PAGECACHE'], page_url($_SERVER), startsWith($query, 'do=dailyrss') && !isLoggedIn());
    $cached = $cache->cachedVersion();
    if (!empty($cached)) {
        echo $cached;
        exit;
    }
    // If cached was not found (or not usable), then read the database and build the response:
    // Read links from database (and filter private links if used it not logged in).
    $LINKSDB = new LinkDB($GLOBALS['config']['DATASTORE'], isLoggedIn(), $GLOBALS['config']['HIDE_PUBLIC_LINKS'], $GLOBALS['redirector']);
    /* Some Shaarlies may have very few links, so we need to look
          back in time (rsort()) until we have enough days ($nb_of_days).
       */
    $linkdates = array();
    foreach ($LINKSDB as $linkdate => $value) {
        $linkdates[] = $linkdate;
    }
    rsort($linkdates);
    $nb_of_days = 7;
    // We take 7 days.
    $today = Date('Ymd');
    $days = array();
    foreach ($linkdates as $linkdate) {
        $day = substr($linkdate, 0, 8);
        // Extract day (without time)
        if (strcmp($day, $today) < 0) {
            if (empty($days[$day])) {
                $days[$day] = array();
            }
            $days[$day][] = $linkdate;
        }
        if (count($days) > $nb_of_days) {
            break;
            // Have we collected enough days?
        }
    }
    // Build the RSS feed.
    header('Content-Type: application/rss+xml; charset=utf-8');
    $pageaddr = escape(index_url($_SERVER));
    echo '<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">';
    echo '<channel>';
    echo '<title>Daily - ' . $GLOBALS['title'] . '</title>';
    echo '<link>' . $pageaddr . '</link>';
    echo '<description>Daily shared links</description>';
    echo '<language>en-en</language>';
    echo '<copyright>' . $pageaddr . '</copyright>' . PHP_EOL;
    // For each day.
    foreach ($days as $day => $linkdates) {
        $daydate = linkdate2timestamp($day . '_000000');
        // Full text date
        $rfc822date = linkdate2rfc822($day . '_000000');
        $absurl = escape(index_url($_SERVER) . '?do=daily&day=' . $day);
        // Absolute URL of the corresponding "Daily" page.
        // Build the HTML body of this RSS entry.
        $html = '';
        $href = '';
        $links = array();
        // We pre-format some fields for proper output.
        foreach ($linkdates as $linkdate) {
            $l = $LINKSDB[$linkdate];
            $l['formatedDescription'] = format_description($l['description'], $GLOBALS['redirector']);
            $l['thumbnail'] = thumbnail($l['url']);
            $l['timestamp'] = linkdate2timestamp($l['linkdate']);
            if (startsWith($l['url'], '?')) {
                $l['url'] = index_url($_SERVER) . $l['url'];
                // make permalink URL absolute
            }
            $links[$linkdate] = $l;
        }
        // Then build the HTML for this day:
        $tpl = new RainTPL();
        $tpl->assign('title', $GLOBALS['title']);
        $tpl->assign('daydate', $daydate);
        $tpl->assign('absurl', $absurl);
        $tpl->assign('links', $links);
        $tpl->assign('rfc822date', escape($rfc822date));
        $html = $tpl->draw('dailyrss', $return_string = true);
        echo $html . PHP_EOL;
    }
    echo '</channel></rss><!-- Cached version of ' . escape(page_url($_SERVER)) . ' -->';
    $cache->cache(ob_get_contents());
    ob_end_flush();
    exit;
}
开发者ID:birdofpray70,项目名称:Shaarli,代码行数:87,代码来源:index.php

示例15: getValue

/* Phân trang ajax*/
if ($isAjaxRequest) {
    $action = getValue('action', 'str', 'POST', '');
    switch ($action) {
        case 'listRecord':
            $array_return['content'] = $content_column;
            $array_return['money_default'] = number_format($all_money_default);
            $array_return['money_discount'] = number_format($all_money_discount);
            $array_return['money_service'] = number_format($all_money_service);
            $array_return['money_vat'] = number_format($all_money_vat);
            $array_return['money_real'] = number_format($all_money_real);
            $array_return['money_true'] = number_format($all_money_true);
            $array_return['money_cash'] = number_format($all_money_cash);
            $array_return['money_debit'] = number_format($all_money_debit);
            echo json_encode($array_return);
            break;
    }
    die;
}
$rainTpl = new RainTPL();
add_more_css('custom.css', $load_header);
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$rainTpl->assign('content_column', $content_column);
$rainTpl->assign('top_control', $top_control);
$rainTpl->assign('footer_control', $footer_control);
$custom_script = file_get_contents('script.html');
$rainTpl->assign('custom_script', $custom_script);
$rainTpl->draw('report_1column');
开发者ID:virutmath,项目名称:crm_local,代码行数:30,代码来源:report_bill_detail.php


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