Example #1
0
 /**
  * Render template.
  *
  * @param string $template Template name.
  * @param array  $params   Template params.
  *
  * @return string
  */
 private function _viewRender($template, $params)
 {
     ob_start();
     $viewsDir = $this->_view->getViewsDir();
     $this->_view->setViewsDir(ROOT_PATH . '/app/modules/Core/View');
     $this->_view->partial('Profiler/' . $template, $params);
     $this->_view->setViewsDir($viewsDir);
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Example #2
0
function tab_tag($tabs, $color = 'green', $width = 800)
{
    switch ($color) {
        case 'blue':
            $col1 = '#E8E8E8';
            $col2 = '#C0c0c0';
            $col3 = '#000000';
            break;
        case 'pink':
            $col1 = '#FFE6F2';
            $col2 = '#FFCCE4';
            $col3 = '#FE1B59';
            break;
        case 'orange':
            $col1 = '#FCE6BC';
            $col2 = '#FDF1DB';
            $col3 = '#DE950C';
            break;
        case 'green':
            $col2 = '#EAFFD7';
            $col1 = '#DAFFB9';
            $col3 = '#008000';
            break;
    }
    print "\n\t\t\t<table cellspacing=0 cellpadding=0 width={$width}>\n\t\t\t<tr>";
    $p = 1;
    $w = $width;
    foreach ($tabs as $tab) {
        if ($p == 1) {
            $color = $col1;
        } else {
            $color = $col2;
        }
        $ww = (int) ($width * 0.22);
        $www = (int) ($width * 0.21);
        print "<td align='center'\n\t\t\t\t  width={$ww} style='padding-top:5px;padding-left:5px;padding-right:5px;padding-bottom:-5px'>\n\t\t\t\t  <div style='width:{$www}" . "px;border-top:1px solid {$col3};border-left:1px solid {$col3};border-right:1px solid {$col3};background:{$color};padding:2px;color:{$col3};cursor:pointer' id='spanm_{$p}'\n\t\t\t\t  onclick='showTab({$p}, this)'\n\t\t\t\t  >" . $tab['caption'] . "</div></td>";
        $p++;
        $w -= $ww;
    }
    print "\n\t\t\t<script>\n\t\t\t\tfunction showTab(p, obj){\n\t\t\t\t  \tfor(i=1;i<={$p}-1;i++){\n\t\t\t\t\t    \$('tab_'+i).hide();\n\t\t\t\t\t    \$('spanm_'+i).style.background = '{$col2}';\n\t\t\t\t\t}\n\t\t\t\t\t\$('tab_'+p).show();\n\t\t\t\t\tobj.style.background = '{$col1}'\n\t\t\t\t}\n\t\t\t</script>\n\t\t\t";
    $p = $p + 1;
    //$w = $width/2;
    print "<td width={$w}></td><tr>";
    print "<td colspan={$p} style='border:1px solid {$col3};background:{$col1};padding:10px'>";
    $p = 1;
    foreach ($tabs as $tab) {
        if ($p != 1) {
            print "<div id='tab_{$p}' style='display:none'>";
        } else {
            print "<div id='tab_{$p}'>";
        }
        View::partial($tab['partial']);
        print "</div>";
        $p++;
    }
    print "<br></td><td width=30></td>";
    print "</table>";
}
function view($view, $vars = array(), $layout = null)
{
    return View::partial($view, $vars, $layout);
}
/**
 * Renderiza una vista parcial
 *
 * @param string $partial vista a renderizar
 * @param string $time tiempo de cache
 * @param array $params
 **/
function render_partial($partial, $time = false, $params = array())
{
    View::partial($partial, $time, $params);
}
<?php

View::partial('jobs/student/profilecommon');
?>

<style>
  section field {
    cursor: auto;
  }
</style>

<templates>
  <fieldtemplate>
    <field class="nohover" name="{name}">{val}</field>
  </fieldtemplate>

  <educationitemtemplate>
    <item>
      <h1><field name="school" class="nohover">{school}</field></h1>
      <h2>Class of <field name="class" class="nohover">{class}</field></h2>
      <field name="degree" class="nohover">{degree}</field>
      in
      <majors>
        <fields name="majors"></fields>
      </majors>
      <br />
      <fieldline>
        <strong>Dates Attended: </strong>
        <field name="dates.start" class="nohover">{dates.start}</field>
        to
        <field name="dates.end" class="nohover">{dates.end}</field>
Example #6
0
        <label for="input-bio" class="fortextarea">
          Write a short summary for yourself:
        </label>
        <textarea id="input-bio" class="flexinput"></textarea>

        <fieldline>
          <strong>Resume: </strong>
          <resume class="hide">
            <a target="_blank">
              View Existing Resume
            </a>
          </resume>
        </fieldline>
        <?php 
View::partial('S3/resume');
?>
        <div class="hide" id="resumelink"></div>

        <fieldline>
          <strong>Interests: </strong>
          <fields name="interests"></fields>
          <addfield name="interests"></addfield>
        </fieldline>

        <fieldline>
          <strong>Skills: </strong>
          <fields name="skills"></fields>
          <addfield name="skills"></addfield>
        </fieldline>
      </section name="basicinfo">
Example #7
0
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <?php 
View::partial('metatags', View::vars());
?>
    <?php 
$url = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
$url .= $_SERVER['HTTP_HOST'] . htmlspecialchars($_SERVER['REQUEST_URI']);
echo '<meta property="og:url" content="' . $url . '" />';
?>

    <meta property="og:type" content="website" />
    <meta property="og:site_name" content="SubLite" />
    <meta property="fb:app_id" content="478408982286879"/>

    <link rel="shortcut icon" type="image/png"
          href="data:<?php 
echo $GLOBALS['dirpre'];
?>
assets/gfx/favicon.png" />

    <!-- JQUERY -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
    <?php 
Example #8
0
 /**
  * Internal function to view the email debug information
  *
  * @return html
  */
 private function outputDebug()
 {
     echo View::partial('email-debug', array('object' => $this));
 }
Example #9
0
if (count($jobs = vget('joblocations')) > 0) {
    ?>
        <subheadline>Recruitment Locations</subheadline>
      <?php 
    foreach (array_unique($jobs) as $job) {
        echo "{$job}<br />";
    }
}
?>

      <?php 
if (vget('Loggedinstudent')) {
    ?>
        <br /><br />
        <?php 
    View::partial('newmessage', ['from' => View::get('L_id'), 'to' => View::get('recruiterid'), 'text' => 'Message']);
    ?>
      <?php 
}
?>
    </div>

    <a href="search.php?byrecruiter=<?php 
vecho('recruiterid');
?>
"><input type="button" value="View Job Listings" /></a>

    <?php 
if (vget('isme')) {
    ?>
      <br /><br />
Example #10
0
$isRecruiter = View::get('isRecruiter');
if ($isStudent || $isRecruiter) {
    echo '<br /><br />';
    $studentId = View::get('studentId') . '';
    $recruiterId = View::get('recruiterId') . '';
    if ($isStudent) {
        $from = $studentId;
        $to = $recruiterId;
        $toText = 'Recruiter';
    }
    if ($isRecruiter) {
        $from = $recruiterId;
        $to = $studentId;
        $toText = 'Student';
    }
    View::partial('newmessage', ['from' => $from, 'to' => $to, 'text' => "Message {$toText}"]);
    if ($isStudent) {
        echo View::linkTo('<input type="button" value="See More Jobs" />', '../search', ['byrecruiter' => $recruiterId]);
    }
}
?>

    <left style="margin-top: 2em;">
      <div class="headline">
        Job application from: <b><?php 
View::echof('studentname');
?>
</b>
      </div>

      <responses></responses>