Exemple #1
0
 /**
  * Parses a path info into an action ID and GET variables.
  * @param string $pathInfo path info
  * @return string action ID
  */
 protected function getControllerAction($pathInfo)
 {
     if (($pos = strpos($pathInfo, '/')) !== false) {
         $manager = \Site::urlManager();
         $manager->parsePathInfo((string) substr($pathInfo, $pos + 1));
         $actionID = substr($pathInfo, 0, $pos);
         return $manager->caseSensitive ? $actionID : strtolower($actionID);
     } else {
         return $pathInfo;
     }
 }
Exemple #2
0
 public function init()
 {
     try {
         $this->uploadTarget = \Site::urlManager()->createUrl('site/front/ajaxWidget', array('widget_method' => 'upload', 'widget_class' => $this->className()));
         if (empty($this->max_file_size)) {
             $this->max_file_size = \GO::config()->max_file_size;
         }
         \Site::scripts()->registerGapiScript('jquery');
         \Site::scripts()->registerGapiScript('jquery-ui');
         $assetUrl = \Site::assetManager()->publish(\GO::config()->root_path . 'modules/site/widget/plupload/assets');
         $this->_swfUrl = $assetUrl . '/assets/js/plupload.flash.swf';
         \Site::scripts()->registerCssFile($assetUrl . '/assets/style.css');
         \Site::scripts()->registerScriptFile($assetUrl . '/assets/js/plupload.full.js');
         \Site::scripts()->registerScriptFile($assetUrl . '/assets/js/jquery.plupload.queue/jquery.plupload.queue.js');
         $langFile = '/assets/js/i18n/' . \GO::language()->getLanguage() . '.js';
         //			if(file_exists(\Site::assetManager()->getBasePath().$langFile)){
         \Site::scripts()->registerScriptFile($assetUrl . $langFile);
         //			}
     } catch (\Exception $e) {
         echo '<h2 style="color:red;">AN ERROR HAS OCCURED</h2>';
         //echo '<p style="color:red;">'.$e->getMessage().'</p>';
         echo '<p style="color:red;">Please check if the folder( <b>' . \GO::config()->assets_path . '</b> ) is writable for the webserver.<br />This path is also configurable in the Group-Office <b>config.php</b> file.<br />Please check the options: <b>assets_path</b> and <b>assets_url</b></p>';
     }
 }
Exemple #3
0
				</tr>
			<?php 
}
?>
				
			<tr>
				<td><label><?php 
echo \GO::t('rememberme', 'defaultsite');
?>
</label></td>
				<td><input type="checkbox" name="rememberMe" value="rememberMe"></tr>
			</tr>
		</table>
			
		<div class="button-bar">
			<input class="button" type="submit" id="submit-login-button" value="Login">
			<a id="recover-login-button" href="<?php 
echo \Site::urlManager()->createUrl('/site/account/recoverpassword');
?>
 " class="button"><?php 
echo \GO::t('lostPassword', 'defaultsite');
?>
</a>
			<div class="clear"></div>
		</div>
		
		<?php 
echo $form->endForm();
?>
	</div>
</div>
Exemple #4
0
 /**
  * Logout the current user and redirect to loginpage 
  */
 public function actionLogout()
 {
     \GO::session()->logout();
     \GO::session()->start();
     $this->redirect(\Site::urlManager()->getHomeUrl());
 }
Exemple #5
0
    ?>
	
	
  <div class="col-md-3">
			
			<div data-spy="affix" data-offset-top="100" class="panel panel-default toc">
				<div class="panel-heading">Table of contents</div>
				<div class="panel-body">
				<?php 
    $toc = new TOC(array('content' => $content));
    echo $toc->render();
    ?>
				<div class="nav-bottom">
					<!--<div class="top-link"><a title="Jump to the top of the page" href="#header"><span class="glyphicon glyphicon-chevron-up"></span> Jump to top</a></div>-->				
					<div class="home-link"><a title="Go to home page" href="<?php 
    echo Site::urlManager()->getHomeUrl();
    ?>
"><span class="glyphicon glyphicon-chevron-left"></span> Home</a></div>
				</div>
				</div>
			</div>
	
	</div>
	
	

	<div class="col-md-9">
		
	<?php 
} else {
    echo '<div class="col-md-12">';
Exemple #6
0
    echo $message->getAttribute("content", "html");
    ?>
</p>

					<?php 
    if (!empty($message->attachments)) {
        ?>
						<span class="ticketmessage-files"><?php 
        echo \GO::t('ticketFiles', 'defaultsite');
        ?>
:</span>
							<?php 
        foreach ($message->getFiles() as $file => $obj) {
            ?>
								<a target="_blank" href="<?php 
            echo \Site::urlManager()->createUrl('tickets/site/downloadAttachment', array('file' => $obj->id, 'ticket_number' => $ticket->ticket_number, 'ticket_verifier' => $ticket->ticket_verifier));
            ?>
">
									<?php 
            echo $file;
            ?>
								</a>
							<?php 
        }
        ?>
					<?php 
    }
    ?>

				<?php 
    if ($message->has_status) {
Exemple #7
0
$form = new \GO\Site\Widget\Form();
?>
		<?php 
echo $form->beginForm();
?>

		<?php 
if (Site::notifier()->hasMessage('success')) {
    ?>
			<div class="notification success"><?php 
    echo Site::notifier()->getMessage('success');
    ?>
</div>
			<div class="button-bar">
				<a id="reset-login-button" class="button" href="<?php 
    echo Site::urlManager()->createUrl('/site/account/login');
    ?>
"><?php 
    echo \GO::t('login', 'defaultsite');
    ?>
</a>
				<div class="clear"></div>
			</div>
		<?php 
} else {
    ?>

			<?php 
    if (Site::notifier()->hasMessage('error')) {
        ?>
				<div class="notification error"><?php 
Exemple #8
0
<?php

\Site::scripts()->registerCssFile(\Site::file('css/ticket.css'));
?>

<div class="external-ticket-page newticket ticket">
	<div class="wrapper">
		
			<?php 
if (\GO::user()) {
    ?>
				&lt;&lt;&nbsp;<a id="back-to-overview-button" href="<?php 
    echo \Site::urlManager()->createUrl('tickets/externalpage/ticketlist');
    ?>
"><?php 
    echo \GO::t('ticketBackToList', 'defaultsite');
    ?>
</a>			
			<?php 
}
?>

		
		<h2><?php 
echo \GO::t('ticketNewTicket', 'defaultsite');
?>
</h2>
		

		
		<?php 
Exemple #9
0
				<tr><td colspan="5"><?php 
    echo \GO::t('ticketNoneFound', 'defaultsite');
    ?>
</td></tr>
			<?php 
} else {
    ?>
				<?php 
    foreach ($pager->getItems() as $i => $ticket) {
        ?>
					<tr class="<?php 
        echo $i % 2 ? 'even' : 'odd';
        ?>
">
						<td><?php 
        echo '<a href="' . \Site::urlManager()->createUrl("tickets/externalpage/ticket", array("ticket_number" => $ticket->ticket_number, "ticket_verifier" => $ticket->ticket_verifier)) . '">' . $ticket->ticket_number . '</a>';
        ?>
</td>
						<td><?php 
        echo $ticket->subject;
        ?>
</td>
						<td><?php 
        echo $ticket->getStatusName();
        ?>
</td>
						<td><?php 
        echo $ticket->agent ? $ticket->agent->name : "";
        ?>
</td>
						<td><?php 
Exemple #10
0
 /**
  * The link for the page with the given number
  * @param int $pageNum number of page
  * @return string URL to page
  */
 private function getPageUrl($pageNum)
 {
     $params = array_merge($_GET, array($this->requestPrefix . $this->pageParam => $pageNum));
     return \Site::urlManager()->createUrl(\Site::router()->getRoute(), $params);
 }
Exemple #11
0
 /**
  * Return to this url its return value can be used in redirect()
  * @param type $url
  */
 public function setReturnUrl($url)
 {
     if (is_array($url)) {
         $route = isset($url[0]) ? $url[0] : '';
         $url = \Site::urlManager()->createUrl($route, array_splice($url, 1));
     }
     \GO::session()->values['sites']['returnUrl'] = $url;
 }
Exemple #12
0
<h1><?php 
echo \GO::t('ticketCreatedTitle', 'defaultsite');
?>
</h1>
<p><?php 
echo \GO::t('ticketCreatedText', 'defaultsite');
?>
</p>


<?php 
echo '<a href="' . \Site::urlManager()->createUrl("tickets/externalpage/ticket", array("ticket_number" => $ticket->ticket_number, "ticket_verifier" => $ticket->ticket_verifier)) . '">' . \GO::t('gotoTicket', 'defaultsite') . '</a>';
Exemple #13
0
 /**
  * Get a thumbnail URL for user uploaded files. This does not work for template
  * images.
  * 
  * @param string $relativePath
  * @param array $thumbParams
  * @return string URL to thumbnail
  */
 public static function thumb($relativePath, $thumbParams = array("lw" => 100, "ph" => 100, "zc" => 1))
 {
     $file = new \GO\Base\Fs\File(\GO::config()->file_storage_path . $relativePath);
     $thumbParams['filemtime'] = $file->mtime();
     $thumbParams['src'] = $relativePath;
     return \Site::urlManager()->createUrl('site/front/thumb', $thumbParams);
 }