public function draw()
 {
     $main = new Skin("installer");
     $head = new Skinlet("frame-public-head");
     $main->setContent("head", $head->get());
     $header = new Skinlet("header");
     $main->setContent("header", $header->get());
     $body = new Skinlet("installer_databaseform");
     $main->setContent("body", $body->get());
     $footer = new Skinlet("footer");
     $main->setContent("footer", $footer->get());
     $main->close();
 }
 public function updateOutput()
 {
     if ($this->validData) {
         header('Location: install_complete.php');
     } else {
         $main = new Skin("installer");
         $head = new Skinlet("frame-public-head");
         $main->setContent("head", $head->get());
         $header = new Skinlet("header");
         $main->setContent("header", $header->get());
         $body = new Skinlet("installer_template");
         $main->setContent("body", $body->get());
         $footer = new Skinlet("footer");
         $main->setContent("footer", $footer->get());
         $main->close();
     }
 }
 public function updateOutput()
 {
     if ($this->validData) {
         header('location: install_complete.php');
     } else {
         $main = new Skin("system");
         $head = new Skinlet("frame-private-head");
         $main->setContent("head", $head->get());
         $header = new Skinlet("header");
         $header->setContent("webApp", 'Installing');
         $main->setContent("header", $header->get());
         $body = new Skinlet("installer_admin");
         $main->setContent("body", $body->get());
         $menu = new Skinlet("menu_installer");
         $footer = new Skinlet("footer");
         $menu->setContent('footer', $footer->get());
         $main->setContent("menu", $menu->get());
         $main->close();
     }
 }
Ejemplo n.º 4
0
 public function updateOutput()
 {
     $main = new Skin("system");
     $head = new Skinlet("frame-private-head");
     $main->setContent("head", $head->get());
     $header = new Skinlet("header");
     $header->setContent('webApp', 'Installing');
     $main->setContent("header", $header->get());
     $menu = new Skinlet('menu_installer');
     $footer = new Skinlet("footer");
     $menu->setContent("footer", $footer->get());
     $main->setContent('menu', $menu->get());
     if ($this->validData) {
         $body = new Skinlet("installer_databaseform");
     } else {
         $body = new Skinlet("installer_init");
     }
     $main->setContent("body", $body->get());
     $main->close();
 }
Ejemplo n.º 5
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("aqua");
$news = new Content($newsEntity, $usersEntity, $newsCatEntity);
$news->setOrderFields("date DESC");
$main->setContent("body", $news->get());
$main->close();
Ejemplo n.º 6
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("aqua");
$content = new Content($usersEntity, $facultyRoleEntity, $ssdEntity, $areaEntity);
$content->setFilter("users.active_home = '*'");
$content->setStyle(HIERARCHICAL);
$content->setOrderFields("facultyrole.position", "surname", "name");
$content->setPresentation("facultyrole_name_plural", "users_username", "users_name", "users_surname", "users_email", "area_id", "area_title", "ssd_id", "ssd_name");
$main->setContent("body", $content->get());
$main->close();
?>

Ejemplo n.º 7
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("nevia");
$news = new Content($newsEntity, $usersEntity);
$news->setOrderFields("date DESC");
$main->setContent("body", $news->getPager(3));
$main->close();
Ejemplo n.º 8
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$foto = new Content($fotoEntity, $galleryEntity);
$foto->setOrderFields("position");
$main->setContent("body", $foto->get());
$main->close();
Ejemplo n.º 9
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$eventi = new Content($eventiEntity);
$eventi->setTemplate("eventi-multiple");
$main->setContent("body", $eventi->getPager());
$main->close();
Ejemplo n.º 10
0
    function addItem_postInsertion()
    {
        /* controllare reload */
        $mail = new Template("dtml/user.mail");
        $mail->setContent("name", $_REQUEST['name']);
        $mail->setContent("username", $_REQUEST['username']);
        $mail->setContent("password", $_REQUEST['password']);
        $mail->setContent("message", $_REQUEST['message']);
        mail("{$_REQUEST['email']}", "{$GLOBALS['config']['website']['name']} Login data", $mail->get(), "From: {{$GLOBALS['config']['website']['email']}}");
    }
}
/* LOCAL END */
#if (isset($_SESSION['registered-user'])) {
#	$main = new Template("dtml_{$_SESSION['language']}/frame-public-2.html");
#} else {
#	$main = new Template("dtml/frame-private.html");
#}
$main = new Skin();
$form = new Form("dataEntry", $usersEntity);
$form->addSection("Modifica Password");
#$form1->addText("username", "username", 20, MANDATORY);
#$form1->addSection("personal data");
$form->addPassword("password", aux::lingual("Nuova Password", "New Password", "Nuova Password"));
if (!isset($_REQUEST['page'])) {
    $_REQUEST['page'] = 1;
    $_REQUEST['value'] = $_SESSION['user']['username'];
}
$main->setContent("body", $form->editItem(NO_DELETE));
$main->close();
?>
 
Ejemplo n.º 11
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$pictures = new Content($pictureEntity, $albumEntity);
$album = new Content($albumEntity);
$album->apply($pictures, "menu");
$main->setContent("body", $pictures->get());
$main->close();
Ejemplo n.º 12
0
<?php

session_start();
mysql_connect("localhost", "root", "");
mysql_select_db("learnpad");
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$email = $_SESSION['username'];
$oid = mysql_query("SELECT luoghi.titolo, luoghi.indirizzo, luoghi.id FROM luoghi, itinerario WHERE luoghi.id=itinerario.id_luoghi");
$itinerario = new Content($itinerarioEntity, $luoghiEntity);
$itinerario->setParameter("username_users", $email);
$itinerario->setTemplate("itinerario");
if ($oid) {
}
while ($data = mysql_fetch_assoc($oid)) {
    $main->setContent("body", $itinerario->get());
}
$main->close();
Ejemplo n.º 13
0
 /**
  *
  * @param Skin $skin
  * @param boolean $login
  * Costruisce la struttura del back-end.
  * Utilizza:
  * frame-private-head: tag html <head>
  * header e footer: header e footer del tema
  *
  */
 public function createSystemGraphic($skin, $login = false)
 {
     /*
      * entity necessarie per il funzionamento del back-end
      */
     $actualUser = $_SESSION['user']['username'];
     $servicecategoryEntity = $GLOBALS['sys_servicecategory'];
     $servicesEntity = $GLOBALS['sys_service'];
     $servicesGroupsRelation = $GLOBALS['sys_service_sys_group'];
     $groupsEntity = $GLOBALS['sys_group'];
     $userEntity = $GLOBALS['sys_user'];
     $usersGroupsRelation = $GLOBALS['sys_user_sys_group'];
     /*
      * skinlet frame-private-head: skins/system/frame-private-head.html
      */
     $head = new Skinlet("frame-private-head");
     /*
      * skinlet header: skins/system/header.html
      */
     $header = new Skinlet("header");
     $loggedUser = new Content($userEntity);
     $loggedUser->setFilter('username', $actualUser);
     $loggedUser->forceSingle();
     $loggedUser->apply($header);
     $config = Config::getInstance()->getConfigurations();
     $header->setContent('webApp', $config["defaultuser"]["webApp"]);
     /*
      * skinlet menu_admin: skins/system/menu_admin.html
      */
     $menuTemplate = new Skinlet("menu_admin");
     $menu = new Content($servicecategoryEntity, $servicesEntity, $servicesGroupsRelation, $groupsEntity, $usersGroupsRelation);
     $menu->setOrderFields("position");
     $menu->setFilter("username_sys_user", $actualUser);
     $menu->apply($menuTemplate);
     /*
      * skinlet footer: skins/system/footer.html
      */
     $footer = new Skinlet("footer");
     $menuTemplate->setContent("footer", $footer->get());
     /*
      * funzionalità breadcrump
      */
     /*
         $breadcrump = new Skinlet("sitemap");
         $breadcrumpContent = new Content($pageEntity, $pageEntity, $pageEntity);
         $breadcrumpContent->forceMultiple();
         $breadcrumpContent->apply($breadcrump);
     
         $actual_script=str_replace("/", "", $_SERVER['SCRIPT_NAME']);
     
         if($actual_script!="page.php")
             $breadcrump->setContent('actual_script', $actual_script);
         else
             $breadcrump->setContent('actual_script',str_replace("/", "", $_SERVER['REQUEST_URI']) );
     
         $skin->setContent("sitemap", $breadcrump->get());
     */
     /*
      * creazione della struttura
      */
     $skin->setContent("head", $head->get());
     $skin->setContent("header", $header->get());
     $skin->setContent("menu", $menuTemplate->get());
 }
Ejemplo n.º 14
0
 /**
  * This method applies the content to a template passed as a parameter, is useful in the case of partial
  * content in a page and for using a template different from the standard entityName_single / entityName_multiple
  * it operates on the $skin and compiles fields related to this content for that skin
  * it uses getRaw to retrieve data
  * @param Skin $skin
  * @param String $prefix
  *
  * usa il prefix per due apply differenti nella stessa skin
  */
 function apply($skin, $prefix = "")
 {
     $entity = DB::getInstance()->getEntityByName($this->entity_name);
     $data = $this->getRaw();
     /*passing retrieved instances to smarty*/
     if ($this->mode == SINGLE) {
         if (isset($entity->instances)) {
             if ($prefix != '') {
                 $skin->setContent($prefix . '_instance', $entity->instances[0]);
             } else {
                 $skin->setContent("instance", $entity->instances[0]);
             }
         } else {
             $skin->setContent("instance", null);
         }
         $skin->setContent("instances", null);
     } else {
         if (isset($entity->instances)) {
             if ($prefix != '') {
                 $skin->setContent($prefix . '_instances', $entity->instances);
             } else {
                 $skin->setContent("instances", $entity->instances);
             }
         } else {
             $skin->setContent("instances", null);
         }
         $skin->setContent("instance", null);
     }
 }
Ejemplo n.º 15
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$best = new Skinlet("best");
$rece = new Skinlet("rec");
$slides = new Skinlet("slide-multiple");
$last = new Skinlet("lastminute");
$recensioni = new Content($recensioniEntity);
$recensioni->setOrderFields("id DESC");
$recensioni->setLimit(3);
$recensioni->apply($rece);
$recensioni->applyIndexed($rece);
$main->setContent('recensioni', $rece->get());
$slide = new Content($slideEntity);
$slide->apply($slides);
$main->setContent("slide", $slides->get());
$lastminute = new Content($eventiEntity);
$lastminute->setOrderFields("id DESC");
$lastminute->setLimit(3);
$lastminute->apply($last);
$main->setContent("lastminute", $last->get());
$main->setContent("best", $best->get());
$main->close();
Ejemplo n.º 16
0
<?php

session_start();
$luog = $_GET['luoghi_id'];
$_SESSION['var'] = $luog;
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$body = new Skinlet("home");
$rece = new Skinlet("recluogo");
$luoghi = new Content($luoghiEntity);
$luoghi->setTemplate("luogo-i");
$main->setContent("body", $luoghi->get());
$recensioni = new Content($recensioniEntity);
$recensioni->setTemplate("recluogo");
$recensioni->setParameter("id_luoghi", $luog);
$recensioni->setOrderFields("id DESC");
$recensioni->setLimit(3);
$recensioni->applyIndexed($recensioni);
$recensioni->apply($rece);
$main->setContent('recensioni', $rece->get());
$main->close();
Ejemplo n.º 17
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("nevia");
$main->setContent("body", $becontent->search($pageEntity, $userEntity, $mergedNewsEntity));
$main->close();
Ejemplo n.º 18
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("aqua");
$body = new Skinlet("homepage");
#$user = new Content($homeEntity, $usersEntity, $roleEntity);
$user = new Content($usersEntity, $facultyRoleEntity, $areaEntity, $ssdEntity, $resGroupEntity, $buildingEntity);
$user->apply($body);
// $ft = fopen("http://didattica.disim.univaq.it/didattica/content.php?docente=1&pid=87&embed", "r");
$teaching = file_get_contents("http://www-disim.disim.univaq.it/didattica/content.php?docente={$_REQUEST[users_username]}&pid=87&embed");
$body->setContent("teaching", utf8_decode($teaching));
/*
$user->setJoinRules("",$usersEntity);
$user->setOrderFields("position");
$user->setLimit(1);
$user->propagate("homepage_username");
$user->apply($body);
$user->unsetParameter("homepage_id");
$menu = new Content($homeEntity, $usersEntity);
$menu->setOrderFields("position");
$menu->setFilter("homepage.active = '*'");
$menu->apply($body,"menu");
*/
$main->setContent("body", $body->get());
$main->close();
Ejemplo n.º 19
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("nevia");
$wp = new Content($wpEntity);
$main->setContent("body", $wp->get());
$main->close();
Ejemplo n.º 20
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/auth.inc.php";
$main = new Skin();
$form = new Form("dataEntry", $channelEntity);
$form->addSection("Picture Management");
$form->addText("title", "Title", 50, MANDATORY);
$form->addTextarea("description", "Description", 2, 100);
$form->addSelectFromReference2($albumEntity, "title_album", "Select Album", 100);
$form->addSelectFromReference2($usersEntity, "username_users", "Username", 100);
if (!isset($_REQUEST['action'])) {
    $_REQUEST['action'] = "edit";
}
switch ($_REQUEST['action']) {
    case "add":
        $main->setContent("body", $form->addItem());
        break;
    case "edit":
        $main->setContent("body", $form->editItem());
        break;
}
$main->close();
?>
 
Ejemplo n.º 21
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("nevia");
$page = new Content($pageEntity);
$page->setTemplate("page_single_2");
$main->setContent("body", $page->get());
$main->close();
Ejemplo n.º 22
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
if (!$_SESSION['username']) {
    $main = new Skin("nevia");
} else {
    $main = new Skin("loggato");
}
$generic = new Content($genEntity);
$generic->setTemplate("comearrivare");
$generic->setParameter("id", 2);
$main->setContent("body", $generic->get());
$main->close();
Ejemplo n.º 23
0
<?php

session_start();
require "include/template2.inc.php";
require "include/beContent.inc.php";
require "include/content.inc.php";
$main = new Skin("nevia");
$luoghi = new Content($luoghiEntity);
$luoghi->setTemplate("luogo");
$main->setContent("body", $luoghi->get());
$main->close();