예제 #1
0
 public function perregionAction()
 {
     trackPage('/pplstats/perregion');
     $stats = new Default_Model_PplStats();
     $this->view->entries = $stats->perRegion();
     include 'pplaccounting.php';
 }
예제 #2
0
 public function indexAction()
 {
     $this->_helper->layout->disableLayout();
     trackPage('/changelog');
     $wiki = ApplicationConfiguration::app('wiki');
     $haswiki = $wiki === "" ? false : true;
     $currentwiki = "/pages/about/changelog";
     if ($haswiki) {
         $currentwiki = $wiki . "main:about:changelog";
         $this->view->currentwiki = $currentwiki;
         return;
     }
     $this->_helper->viewRenderer->setNoRender();
     $s = file_get_contents(APPLICATION_PATH . "/../CHANGELOG");
     $s = str_replace("\n", "<br/>", $s);
     $s = preg_replace("/EGI RT #(\\d+)/", '<a target="_blank" href="https://rt.egi.eu/guest/Ticket/Display.html?id=${1}">EGI RT #${1}</a>', $s);
     $s = preg_replace("/GGUS #(\\d+)/", '<a target="_blank" href="https://gus.fzk.de/ws/ticket_info.php?ticket=${1}">GGUS #${1}</a>', $s);
     echo $s;
 }
예제 #3
0
 public function indexAction()
 {
     trackPage('/ngi');
     $this->_helper->layout->disableLayout();
     $offset = $this->_getParam('ofs');
     $length = $this->_getParam('len');
     if ($offset === null) {
         $offset = 0;
     }
     if ($length === null) {
         $length = 23;
     }
     $ngis = new Default_Model_NGIs();
     $f1 = new Default_Model_NGIsFilter();
     $f2 = new Default_Model_NGIsFilter();
     if ($this->_getParam('eu') !== '' && $this->_getParam('eu') !== null) {
         if ($this->_getParam('eu') == "1") {
             $f1->countryid->notequals(null);
         } else {
             $f1->countryid->equals(null);
         }
         $this->view->european = $this->_getParam('eu');
     }
     if ($this->_getParam('filter') != '') {
         $f2->any->ilike('%' . $this->_getParam('filter') . '%');
         $this->view->ngiFilter = $this->_getParam('filter');
     }
     if ($f1->expr() != "") {
         $ngis->filter->chain($f1, 'AND');
     }
     if ($f2->expr() != "") {
         $ngis->filter->chain($f2, 'AND');
     }
     $entries = $ngis->items;
     $total = count($entries);
     if ($length > 0) {
         $this->paging($entries, $offset, $length, $total);
     } else {
         $this->view->entries = $entries;
         $this->view->total = $total;
     }
 }
예제 #4
0
</strong> has successfully completed training on identifying possible medical impairments during the license renewal process. The training is meant to help with the identification of drivers who may have vision, cognitive, or psychomotor impairments and refer them for additional evaluation.</p>
                           
                            <p><img src="/img/check.png?4" alt="Check box"> Walking to the Counter<br />
                            <img src="/img/check.png?4" alt="Check box"> Information Exchange<br /> 
                            <img src="/img/check.png?4" alt="Check box"> Testing<br /> 
                            <img src="/img/check.png?4" alt="Check box"> State Reporting</p>
                            <br />
                            <button id="printResults">Print</button>
                        <?php 
                    } else {
                        echo $noPageError;
                    }
                } else {
                    if ($main_content != '') {
                        echo $main_content;
                        trackPage($page, false);
                    } else {
                        echo $noPageError;
                    }
                }
                ?>
                </div>
                <?php 
            }
        }
    }
    ?>
             	<br class="clear" />
         	</div><!-- /insideWrapper -->        
  		</div><!-- /wrapper --> 
    </div><!-- /outsideWrapper --> 
예제 #5
0
 public function indexAction()
 {
     // action body
     trackPage('/unsupported');
     $this->view->session = $this->session;
 }
예제 #6
0
 public function indexAction()
 {
     trackPage('/');
     if (isset($_COOKIE['rememberme']) && $this->session->userid === null) {
         //save permaLink in order to handle it after login
         if (array_key_exists('p', $_GET)) {
             $this->session->permaLink = $_GET['p'];
         }
         if (APPLICATION_ENV == "production") {
             header('Location: https://' . $_SERVER['HTTP_HOST'] . '/users/login');
         } else {
             header('Location: http://' . $_SERVER['HTTP_HOST'] . '/users/logindev2');
         }
         return;
     }
     /*
      * Check if user is signed in from a different service or browser tab.
      */
     if ($this->session->isLocked()) {
         $this->session->unLock();
     }
     if ($this->session !== null && $this->session->developsession === true) {
         //do nothing. It's local development instance where no SImpleSaml installed
     } else {
         $auth = SamlAuth::isAuthenticated();
         if ($auth === false) {
             //if logged in but not authdicated the clear session
             if (isset($this->session->userid) && is_numeric($this->session->userid)) {
                 SamlAuth::logout($this->session);
                 $this->_helper->layout->disableLayout();
                 $this->_helper->viewRenderer->setNoRender();
                 header('Location: http://' . $_SERVER["HTTP_HOST"]);
                 return;
             }
         } else {
             if (isset($this->session) === false || isset($this->session->userid) === false || is_numeric($this->session->userid) === false) {
                 //if authenticated but not logged in setup user session
                 $this->session = new Zend_Session_Namespace('default');
                 $attributes = $auth->getAttributes();
                 $uid = $attributes['idp:uid'][0];
                 $_SESSION['identity'] = $uid;
                 $_SESSION['logouturl'] = $auth->getLogoutURL();
                 $this->session->samlattrs = $attributes;
                 $this->session->samlauthsource = isset($attributes["idp:sourceIdentifier"]) ? $attributes["idp:sourceIdentifier"][0] : "";
                 SamlAuth::setupSamlAuth($this->session);
                 if ($this->session->isNewUser === true) {
                     header('Location: https://' . $_SERVER['HTTP_HOST'] . '/saml/newaccount');
                     return;
                 }
                 //Check and redirect if user account is blocked
                 if ($this->session->accountStatus === "blocked") {
                     header('Location: https://' . $_SERVER['HTTP_HOST'] . '/saml/blockedaccount');
                     return;
                 }
                 //Check and redirect if user is deleted
                 if ($this->session->userDeleted === true) {
                     header('Location: https://' . $_SERVER['HTTP_HOST'] . '/saml/deletedprofile');
                     return;
                 }
             }
         }
     }
     $this->session->appCriteria = null;
     $this->session->pplCriteria = null;
     $this->session->certLogin = false;
     $this->view->username = $this->session->username;
     if ($this->session->userid !== null) {
         $ppl = new Default_Model_Researchers();
         $ppl->filter->id->equals($this->session->userid);
         $user = $ppl->items[0];
         $this->view->user = $user;
         /* Get count of user requests */
         $urs = new Default_Model_UserRequests();
         $s2 = new Default_Model_PermissionsFilter();
         $s2->actor->equals($this->session->userguid);
         $s3 = new Default_Model_UserRequestStatesFilter();
         $s3->name->equals("submitted");
         $urs->filter->chain($s2->chain($s3, "AND"), "AND");
         $reqsitems = $urs->items;
         $uritems = array_merge($reqsitems);
         //Fetch user requests for NILs
         if (userIsAdminOrManager($this->session->userid) === false && userIsNIL($this->session->userid) === true) {
             $nilusers = new Default_Model_UserRequests();
             $s1 = new Default_Model_UserRequestTypesFilter();
             $s1->id->numequals(3);
             $s2 = new Default_Model_ResearchersFilter();
             $s2->countryid->equals($this->session->userCountryID);
             $s3 = new Default_Model_UserRequestStatesFilter();
             $s3->name->equals("submitted");
             $s4 = new Default_Model_ActorGroupsFilter();
             $s4->id->numequals(-3);
             $nilusers->filter->chain($s1->chain($s2->chain($s3->chain($s4, "AND"), "AND"), "AND"), "AND");
             if (count($nilusers->items) > 0) {
                 $uritems = array_merge($uritems, $nilusers->items);
                 $uritems = array_filter($uritems, 'uniqueDBObjectFilter');
             }
         }
         $this->view->userRequests = count($uritems);
     }
     $p = '';
     if ($this->session->permaLink != '') {
         $p = $this->session->permaLink;
         $this->session->permaLink = '';
     } elseif (array_key_exists('p', $_GET)) {
         $p = $_GET["p"];
     } else {
         //TODO : needs review
         $p = $_SERVER["QUERY_STRING"];
         $pos = strpos($p, "p=");
         if ($pos === false) {
             $p = '';
         } else {
             $p = substr($p, 2, strlen($p) - 2);
         }
     }
     if ($p != "") {
         if ($p == "reports") {
             $this->view->permaLink = $p;
         } elseif ($p == "brokenlinks") {
             $this->view->permaLink = $p;
         } elseif (substr($p, 0, 6) == "about:") {
             $this->view->permaLink = $p;
         } elseif (substr($p, 0, 5) == "apps:") {
             $this->view->permaLink = $p;
         } elseif (substr($p, 0, 7) == "people:") {
             $this->view->permaLink = $p;
         } else {
             $pp = base64_decode($p);
             $pp = mb_convert_encoding($pp, 'UTF-8');
             $this->view->permaLink = $pp;
         }
     }
 }
예제 #7
0
 public function leavemessageAction()
 {
     trackPage('/people/leavemessage', $this->_getParam("format"));
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     //validations
     if ($this->session->userid == null) {
         echo "";
         return;
     }
     if (!(isset($_POST['msg']) && isset($_POST['receiverID']))) {
         echo "";
         return;
     }
     $data = $_POST['msg'];
     $receiverID = $_POST['receiverID'];
     if (trim($data) == "" || is_numeric($receiverID) === false) {
         echo "";
         return;
     }
     //Send message to user
     $ms = new Default_Model_Messages();
     $m = new Default_Model_Message();
     $m->receiverID = $receiverID;
     $m->senderID = $this->session->userid;
     $m->msg = $data;
     $m->isRead = "0";
     $ms->add($m);
     //Notify user for inbox message
     sendUserInboxNotification($receiverID, $this->session->fullName);
     echo "ok";
 }
예제 #8
0
 public function detailsAction()
 {
     $this->_helper->layout->disableLayout();
     $appID = $this->_getParam("id");
     $format = $this->_getParam("format");
     if ($format === "json") {
         $format = "xml";
     }
     trackPage('/apps/details/' . $appID, $format);
     if ($appID == '') {
         $appID = $this->session->lastAppID;
     }
     $this->view->dialogCount = $_GET['dc'];
     if ($appID == '0') {
         $appID = '';
     }
     $this->view->entryid = $appID;
     $this->view->session = $this->session;
     $this->view->entitytype = 'software';
     if ($this->_getParam('histid') != '') {
         $this->view->histid = $this->_getParam('histid');
     }
     if ($this->_getParam('histtype') != '') {
         $this->view->histtype = $this->_getParam('histtype');
     }
     if ($this->_getParam('entitytype') != '') {
         $this->view->entitytype = strtolower(trim($this->_getParam('entitytype')));
         switch ($this->view->entitytype) {
             case "vappliance":
             case "virtualappliance":
                 $this->view->entitytypeid = 1;
                 break;
             case "softwareappliance":
             case "swappliance":
                 $this->view->entitytypeid = 2;
                 break;
             case "software":
             case "sw":
                 $this->view->entitytypeid = 0;
                 break;
             default:
                 $this->view->entitytypeid = "invalid metatype";
                 break;
         }
     }
 }
예제 #9
0
 public function indexAction()
 {
     trackPage('/vo');
     $this->_helper->layout->disableLayout();
 }
예제 #10
0
 public function ppldetailsAction()
 {
     $pplID = $this->_getParam("id");
     trackPage('/people/details?id=' . $pplID, $this->_getParam("format"));
     if ($pplID == '') {
         $pplID = $this->session->lastPplID;
     }
     $this->_helper->layout->disableLayout();
     $apps = new Default_Model_Researchers();
     if ($this->_getParam("id") == "0") {
         $this->view->entry = new Default_Model_Researcher();
         $this->view->entry->countryID = '0';
     } else {
         $apps->filter->id->equals($pplID);
         $apps->refresh($this->_getParam('format'), true, $this->_getParam('userid'));
         $this->view->entry = $apps->items[0];
         $this->showimageAction();
     }
     $this->view->dialogCount = $_GET['dc'];
     $this->view->positionTypes = new Default_Model_PositionTypes();
     $this->view->positionTypes->filter->orderBy('ord');
     $this->view->countries = new Default_Model_Countries();
     $this->view->countries->filter->orderBy('name');
     $this->view->contactTypes = new Default_Model_ContactTypes();
     $this->view->session = $this->session;
     if ($this->session->username !== null && $this->session->userid !== null) {
         $users = new Default_Model_Researchers();
         $users->filter->id->equals($this->session->userid);
         $this->view->user = $users->items[0];
     } else {
         $this->view->user = null;
     }
 }