Example #1
1
File: cv.php Project: Ashaan/phpcv
 static function getInstance()
 {
     if (is_null(cv::$instance)) {
         cv::$instance = new cv();
     }
     return cv::$instance;
 }
Example #2
0
        if (!isset($this->pub_ids)) {
            $this->pageError = true;
            return;
        }
        $pubs = explode(',', $this->pub_ids);
        if (!is_array($pubs) || count($pubs) == 0) {
            $this->pageError = true;
            return;
        }
        $pub_list = pdPubList::create($this->db, array('pub_ids' => $pubs));
        if (empty($pub_list) || count($pub_list) == 0) {
            $this->pageError = true;
            return;
        }
        $pub_count = 0;
        foreach ($pub_list as $pub) {
            $pub_count++;
            $result = $pub->dbLoad($this->db, $pub->pub_id);
            if ($result === false) {
                $this->pageError = true;
                return;
            }
            echo '<b>[', $pub_count, ']</b> ', $pub->getCitationText(), '<p/>';
        }
    }
}
$page = new cv();
echo $page->toHtml();
?>

Example #3
0
<?php

define('appName', 'phpCV');
define('appVersion', '0.2b');
define('appAuthor', 'Ashaan');
define('appSubAuthor', '');
define('appLink', 'http://test.sygil.eu');
$chronoStart = microtime(true);
require_once 'includes/class/template.php';
require_once 'includes/class/cv.php';
require_once 'includes/class/engine.php';
$engine = engine::getInstance();
$cv = cv::getInstance();
$engine->initialize();
$cv->initialize();
$engine->execute();
$cv->execute();
$engine->finalize();
/*
$template = template::getInstance();

$header['menu'] = '';//$engine->menu;

$main = array(
  'header'        => $template->evaluate('header' ,$header),
 // 'content'       => $template->evaluate('content' ,array('content'  => $cv->html)),
  'footer'        => $template->evaluate('footer' ,array()),
  'job'           => $cv->header['job'],
  'subjob'        => $cv->header['subjob'],
  'fullname'      => $cv->header['fullname'],
  'theme'         => $engine->getThemeList(),
Example #4
0
 public function finalize()
 {
     $cv = cv::getInstance();
     $template = template::getInstance();
     $main = array('header' => $this->getHeader(), 'content' => $template->evaluate('content', array('content' => $cv->html)), 'footer' => $template->evaluate('footer', array()), 'job' => $cv->header['job'], 'subjob' => $cv->header['subjob'], 'fullname' => $cv->header['fullname'], 'theme' => $this->getThemeList(), 'themesel' => $this->getSwitchTheme(), 'cvsel' => $this->getSwitchCV(), 'langue' => $this->getSwitchLang());
     $html = $template->evaluate('main', $main);
     echo $this->translate($html);
 }