Пример #1
0
$user = $_SESSION['user'];
/* Init Databases */
$db = mysql_connect(WALKER_DB_HOST, WALKER_DB_USERNAME, WALKER_DB_PASSWORD) or die('Could not connect: ' . mysql_error());
mysql_select_db(WALKER_DB_NAME);
mysql_query('SET NAMES utf8');
mysql_query('SET CHARACTER SET utf8');
mysql_query("SET COLLATION_CONNECTION='utf8_general_ci'");
/* Zend_Cache solution */
$frontendOptions = array('lifetime' => LIFETIME, 'automatic_serialization' => true);
$backendOptions = array('cache_dir' => CACHE_DIR);
$cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);
$content = Zend_Cache::factory('Core', 'File', array('lifetime' => LIFETIME_OF_CONTET, 'automatic_serialization' => true), array('cache_dir' => CACHE_DIR));
/* Get tags list */
$tags = new Tags();
if (ROOT) {
    $tag_list = $tags->getAll(true);
} else {
    $tag_list = $tags->getAll();
}
$view->assign('tag', $tag_list);
/* Get links list */
$links = new Links("schema/Links.xml");
$link_list = $links->output();
$view->assign('links', $link_list);
if (isset($_GET['m'])) {
    $m = strtolower(trim($_GET['m']));
} else {
    $m = 'home';
}
switch ($m) {
    default:
Пример #2
0
 /**
  * Show the tag list
  * @return unknown_type
  */
 function changeTags()
 {
     if ($this->_realAccessLevel < ACCESS_LEVEL_DEMO && !$_SESSION['CATS']->hasUserCategory('careerportal')) {
         CommonErrors::fatal(COMMONERROR_PERMISSION, $this);
         return;
         //$this->fatal(ERROR_NO_PERMISSION);
     }
     $tags = new Tags($this->_siteID);
     $tagsRS = $tags->getAll();
     //if (!eval(Hooks::get('SETTINGS_EMAIL_TEMPLATES'))) return;
     $this->_template->assign('active', $this);
     $this->_template->assign('subActive', 'Administration');
     $this->_template->assign('tagsRS', $tagsRS);
     $this->_template->display('./modules/settings/tags.tpl');
 }
Пример #3
0
 private function addCandidateTags()
 {
     /* Bail out if we don't have a valid candidate ID. */
     if (!$this->isRequiredIDValid('candidateID', $_GET)) {
         CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this, 'Invalid candidate ID.');
     }
     $candidateID = $_GET['candidateID'];
     $candidates = new Candidates($this->_siteID);
     $candidateData = $candidates->get($candidateID);
     /* Bail out if we got an empty result set. */
     if (empty($candidateData)) {
         CommonErrors::fatalModal(COMMONERROR_BADINDEX, $this);
         return;
         /*$this->fatalModal(
               'The specified candidate ID could not be found.'
           );*/
     }
     $tags = new Tags($this->_siteID);
     $tagsRS = $tags->getAll();
     $this->_template->assign('candidateID', $candidateID);
     $this->_template->assign('assignedTags', $tags->getCandidateTagsID($candidateID));
     $this->_template->assign('isFinishedMode', false);
     $this->_template->assign('tagsRS', $tagsRS);
     $this->_template->display('./modules/candidates/AssignCandidateTagModal.tpl');
 }