コード例 #1
0
ファイル: default.php プロジェクト: mined-gatech/hubzero-cms
							<?php 
                }
            }
            ?>
							</span>
						</td>
					<?php 
        }
        ?>
					<?php 
        if ($item->status != 7) {
            ?>
						<td class="priority-4 voting">
							<?php 
            $view = new \Hubzero\Component\View(array('base_path' => PATH_CORE . DS . 'components' . DS . 'com_wishlist' . DS . 'site', 'name' => 'wishlists', 'layout' => '_vote'));
            $view->set('option', 'com_wishlist')->set('item', new \Components\Wishlist\Models\Wish($item))->set('listid', $this->wishlist->id)->set('plugin', 0)->set('admin', 0)->set('page', 'wishlist')->set('filters', $this->filters)->display();
            ?>
						</td>
						<td class="priority-3 ranking">
							<?php 
            /*if ($this->admin
            			|| $item->status == 1
            			|| ($item->status == 0 && $item->accepted == 1)
            			|| $item->status == 3
            			|| $item->status == 4
            		) { */
            $html = '';
            switch ($item->status) {
                case 0:
                    if (isset($item->ranked) && !$item->ranked && ($this->admin == 2 or $this->admin == 3)) {
                        $html .= '<a class="rankit" href="index.php?option=com_wishlist&task=wish&category=' . $this->wishlist->category . '&rid=' . $this->wishlist->referenceid . '&wishid=' . $item->id . '&filterby=' . $this->filters['filterby'] . '&sortby=' . $this->filters['sortby'] . '&tags=' . $this->filters['tag'] . '">' . Lang::txt('COM_WISHLIST_WISH_RANK_THIS') . '</a>' . "\n";
コード例 #2
0
ファイル: latest.php プロジェクト: mined-gatech/hubzero-cms
<section class="main section">
	<h3><?php 
echo Lang::txt('COM_JOBS_LATEST_POSTINGS');
?>
</h3>
	<form method="get" action="<?php 
echo Route::url('index.php?option=' . $this->option . '&task=browse');
?>
">
	<?php 
if (count($this->jobs) > 0) {
    ?>
		<?php 
    // Display List of items
    $view = new \Hubzero\Component\View(array('base_path' => PATH_CORE . DS . 'components' . DS . 'com_jobs' . DS . 'site', 'name' => 'jobs', 'layout' => '_list'));
    $view->set('option', $this->option)->set('filters', $this->filters)->set('config', $this->config)->set('task', $this->task)->set('emp', $this->emp)->set('mini', 1)->set('jobs', $this->jobs)->set('admin', $this->admin)->display();
    ?>
		<?php 
} else {
    ?>
		<p><?php 
    echo Lang::txt('COM_JOBS_NO_JOBS_FOUND');
    ?>
</p>
		<?php 
}
?>
	</form>
</section>
コード例 #3
0
ファイル: profiles.php プロジェクト: kevinwojo/hubzero-cms
 /**
  * Send a confirmation code to a user's email address
  *
  * @param   strong   $login    Username
  * @param   string   $email    User email address
  * @param   string   $confirm  Confirmation code
  * @return  boolean
  */
 private function _sendConfirmationCode($login, $email, $confirm)
 {
     // Email subject
     $subject = Config::get('sitename') . ' account email confirmation';
     // Email message
     $eview = new \Hubzero\Component\View(array('name' => 'emails', 'layout' => 'confirm'));
     $eview->set('option', $this->_option)->set('sitename', Config::get('sitename'))->set('login', $login)->set('confirm', $confirm)->set('baseURL', Request::base());
     $message = $eview->loadTemplate();
     $message = str_replace("\n", "\r\n", $message);
     $msg = new \Hubzero\Mail\Message();
     $msg->setSubject($subject)->addTo($email)->addFrom(Config::get('mailfrom'), Config::get('sitename') . ' Administrator')->addHeader('X-Component', $this->_option)->setBody($message);
     $result = false;
     // Send the email
     if ($msg->send()) {
         Notify::success('A confirmation email has been sent to "' . htmlentities($email, ENT_COMPAT, 'UTF-8') . '". You must click the link in that email to re-activate your account.');
         $result = true;
     } else {
         Notify::error('An error occurred emailing "' . htmlentities($email, ENT_COMPAT, 'UTF-8') . '" your confirmation.');
     }
     return $result;
 }