Пример #1
0
echo $ForumName;
?>
</a> &gt;
	<?php 
echo $ThreadTitle;
?>
</div>
<div class="linkbox">
	<?php 
echo $Pages;
?>
</div>
<?php 
if (!$ThreadInfo['IsLocked'] || check_perms('site_moderate_forums')) {
    if (Forums::check_forumperm($ForumID, 'Write') && !$LoggedUser['DisablePosting']) {
        View::parse('generic/reply/quickreply.php', array('InputTitle' => 'Post reply', 'InputName' => 'thread', 'InputID' => $ThreadID, 'ForumID' => $ForumID, 'TextareaCols' => 90));
    }
}
if (check_perms('site_moderate_forums')) {
    G::$DB->query("\n\t\t\tSELECT ID, AuthorID, AddedTime, Body\n\t\t\tFROM forums_topic_notes\n\t\t\tWHERE TopicID = {$ThreadID}\n\t\t\tORDER BY ID ASC");
    $Notes = G::$DB->to_array();
    ?>
	<br />
	<h3 id="thread_notes">Thread notes</h3> <a href="#" onclick="$('#thread_notes_table').gtoggle(); return false;" class="brackets">Toggle</a>
	<form action="forums.php" method="post">
		<input type="hidden" name="action" value="take_topic_notes" />
		<input type="hidden" name="auth" value="<?php 
    echo $LoggedUser['AuthKey'];
    ?>
" />
		<input type="hidden" name="topicid" value="<?php 
Пример #2
0
View::show_header('Staff PMs', 'staffpm');
// Get messages
$StaffPMs = $DB->query("\n\tSELECT\n\t\tID,\n\t\tSubject,\n\t\tUserID,\n\t\tStatus,\n\t\tLevel,\n\t\tAssignedToUser,\n\t\tDate,\n\t\tUnread\n\tFROM staff_pm_conversations\n\tWHERE UserID = " . $LoggedUser['ID'] . "\n\tORDER BY Status, Date DESC");
// Start page
?>
<div class="thin">
	<div class="header">
		<h2>Staff PMs</h2>
		<div class="linkbox">
			<a href="#" onclick="$('#compose').gtoggle();" class="brackets">Compose new</a>
		</div>
	</div>
	<br />
	<br />
	<?php 
View::parse('generic/reply/staffpm.php', array('Hidden' => true));
?>
	<div class="box pad" id="inbox">
<?php 
if (!$DB->has_results()) {
    // No messages
    ?>
		<h2>No messages</h2>
<?php 
} else {
    // Messages, draw table
    ?>
		<form class="manage_form" name="staff_messages" method="post" action="staffpm.php" id="messageform">
			<input type="hidden" name="action" value="multiresolve" />
			<h3>Open messages</h3>
			<table class="message_table checkboxes">
Пример #3
0
 /**
  * Gets the action view HTML.
  * @param bool $print
  * @return bool|string
  */
 public function getActionView($print = false)
 {
     $this->_returnActionView = true;
     // Load an action view to the View object
     $this->_viewAction->load(Router::$controller_view, Router::$method);
     // Parse action view
     $action_content = $this->_viewAction->parse($this->view, new View_Helper());
     // Set parsed action view
     $this->view->setActionContent($action_content);
     if ($print) {
         print $this->view->getActionContent();
         return true;
     }
     return $this->view->getActionContent();
 }
Пример #4
0
<?php 
echo Text::full_format($Request['Description']);
?>
			</div>
		</div>
	<div id="request_comments">
		<div class="linkbox">
			<a name="comments"></a>
<?php 
$Pages = Format::get_pages($Page, $NumComments, TORRENT_COMMENTS_PER_PAGE, 9, '#comments');
echo $Pages;
?>
		</div>
<?php 
//---------- Begin printing
CommentsView::render_comments($Thread, $LastRead, "requests.php?action=view&amp;id={$RequestID}");
if ($Pages) {
    ?>
		<div class="linkbox pager"><?php 
    echo $Pages;
    ?>
</div>
<?php 
}
View::parse('generic/reply/quickreply.php', array('InputName' => 'pageid', 'InputID' => $RequestID, 'Action' => 'comments.php?page=requests', 'InputAction' => 'take_post', 'SubscribeBox' => true));
?>
		</div>
	</div>
</div>
<?php 
View::show_footer();
Пример #5
0
 function display($tpl = 0)
 {
     $module = empty(APP::$__module) ? "" : APP::$__module . '/';
     $tpl = $tpl ? $tpl : APP::$__controller . '_' . APP::$__action;
     $tplfile = APP_FILE . APP::$config['app']['view_file'] . $module . $tpl . '.html';
     if (!file_exists($tplfile)) {
         APP::error('can not load template file : ' . $tplfile);
     }
     $compliefile = APP_FILE . APP::$config['app']['runtime_file'] . $module . md5($tpl) . '.php';
     //缓存文件
     if (!file_exists($compliefile) || filemtime($tplfile) > filemtime($compliefile)) {
         $_v = new View();
         $_v->parse($tplfile, $module);
     }
     include_once $compliefile;
 }
Пример #6
0
echo $CollageID;
?>
); return false;"><?php 
echo Subscriptions::has_subscribed_comments('collages', $CollageID) !== false ? 'Unsubscribe' : 'Subscribe';
?>
</a>
<?php 
$Pages = Format::get_pages($Page, $NumComments, TORRENT_COMMENTS_PER_PAGE, 9);
if ($Pages) {
    echo '<br /><br />' . $Pages;
}
?>
		</div>
	</div>
<?php 
//---------- Begin printing
CommentsView::render_comments($Thread, $LastRead, "collages.php?action=comments&amp;collageid={$CollageID}");
if (!$ThreadInfo['IsLocked'] || check_perms('site_moderate_forums')) {
    if ($ThreadInfo['MinClassWrite'] <= $LoggedUser['Class'] && !$LoggedUser['DisablePosting']) {
        View::parse('generic/reply/quickreply.php', array('InputName' => 'pageid', 'InputID' => $CollageID, 'Action' => 'comments.php?page=collages', 'InputAction' => 'take_post', 'TextareaCols' => 90, 'SubscribeBox' => true));
    }
}
?>
	<div class="linkbox">
		<?php 
echo $Pages;
?>
	</div>
</div>
<?php 
View::show_footer();
Пример #7
0
 /**
  * Outputs the preview and edit buttons
  * Can be called many times to place buttons in different areas
  */
 public function buttons()
 {
     View::parse('generic/textarea/buttons.phtml', array('ID' => $this->id));
 }
Пример #8
0
 function display($tpl = 0)
 {
     $this->vars['es'] = array("session" => $_SESSION, "get" => $_GET, "post" => $_POST);
     $this->vars['__ROOT__'] = __ROOT__;
     $module = empty(App::$_module) ? "" : App::$_module . '/';
     $tpl = $tpl ? $tpl : App::$_controller . '_' . App::$_action;
     $tplfile = APP_FILE . App::$config['app']['view'] . $module . $tpl . '.html';
     if (!file_exists($tplfile)) {
         throw new Exception('can not load template file : ' . $tplfile);
     }
     $compliefile = APP_FILE . App::$config['app']['cache'] . 'runtime/' . $module . md5($tpl) . '.php';
     if (!file_exists($compliefile) || filemtime($tplfile) > filemtime($compliefile)) {
         $_v = new View();
         $_v->parse($tplfile, $module);
     }
     include_once $compliefile;
 }
Пример #9
0
<?php

require_once '../blitz.class.php';
define('MICROTIME_START', microtime(TRUE));
error_reporting(E_ALL);
ini_set('display_errors', 'On');
class View extends Blitz
{
    function escape($string)
    {
        return htmlspecialchars($string);
    }
}
$fn = 'blitz/index.tpl';
$blitz = new View($fn);
//$blitz->force_compile = TRUE;
//$blitz->compile_check = FALSE;
$blitz->assign('a', 'value of $a');
$blitz->iterate('test');
$blitz->parse();
echo '<hr />' . (microtime(TRUE) - MICROTIME_START);
echo '<hr />';
highlight_file($blitz->_get_compile_path($fn, ''));
echo '<hr />';
highlight_file($blitz->template_dir . $fn);
echo '<hr />';
highlight_file(__FILE__);
Пример #10
0
 /**
  * Include a file and render content
  *
  * @param $template
  * @return string
  **/
 function parse($template)
 {
     return View::parse($template);
 }
Пример #11
0
 /**
  * Parses a template file and returns the converted HTML.
  *
  * @access protected
  * @param  string    $template  The name of the partial to render.
  * @param  array     $variables An array of variables to replace.
  * @param  mixed     $cacheName null to not cache, string otherwise.
  * @return string               Converted template file into HTML.
  */
 protected function renderPartial($template, $variables, $cacheName = null)
 {
     return self::$_view->parse(Config::get('path', 'base') . Config::get('path', 'project') . 'View/Partial/' . $template . '.phtml', $variables, $cacheName);
 }
Пример #12
0
<?php

require dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'application/internals/Autoload.php';
if (file_exists("cache.html") && strtotime("+5 minutes", filectime("cache.html")) > time()) {
    echo file_get_contents("cache.html");
    exit;
}
try {
    $streamer = new Streamer();
    /* @var $results ArrayObject */
    $results = $streamer->searchMessageFor("brhackday")->get(120);
    $view = new View("index");
    foreach ($results as $message) {
        /* @var $message Message */
        $strMessage = preg_replace("/http\\:\\/\\/([^\\s]+)/", '<a href="http://$1">http://$1</a> ', $message->getMessage());
        $strMessage = preg_replace("/\\#([^\\#\\s]+)/", '<a href="http://twitter.com/#search?q=$1">#$1</a>', $strMessage);
        $strMessage = preg_replace("/\\@([^\\s]+)/", '<a href="http://twitter.com/$1">@$1</a> ', $strMessage);
        $view->block("twitte", array("image" => $message->getImageURL(), "url" => $message->getProfile(), "username" => $message->getUsername(), 'messageId' => $message->getMessageUrl(), "message" => $strMessage));
    }
    echo $data = $view->parse();
    file_put_contents("cache.html", $data);
} catch (Exception $ex) {
    header('HTTP/1.1 500 Internal Server Error');
    echo "YQL Fault - Estão nos bloqueando _O_ ";
    exit;
}