本文整理汇总了PHP中View::Render方法的典型用法代码示例。如果您正苦于以下问题:PHP View::Render方法的具体用法?PHP View::Render怎么用?PHP View::Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类View
的用法示例。
在下文中一共展示了View::Render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: imprimer
public function imprimer()
{
parent::printable();
$view = new View();
$view->Assign("pdf", $this->pdf);
switch ($this->request->code) {
case "0001":
$personnel = $this->Personnel->findSingleRowBy(["IDPERSONNEL" => $this->request->idpersonnel]);
$view->Assign("personnel", $personnel);
$ens = $this->Personnel->getEnseignements($this->request->idpersonnel);
$view->Assign("enseignements", $ens);
echo $view->Render("enseignant" . DS . "impression" . DS . "fiche", false);
break;
case "0002":
break;
}
}
示例2: imprimer
public function imprimer()
{
ob_start();
parent::printable();
$code = $this->request->code;
$view = new View();
$view->Assign("pdf", $this->pdf);
switch ($code) {
# Impression du taux de couverture des programmes et heures
case "0001":
$this->pdf->isLandscape = true;
echo $view->Render("statistique" . DS . "impression" . DS . "couverture", false);
break;
case "0002":
# Impression du bilan global des resultats
echo $view->Render("statistique" . DS . "impression" . DS . "bilanresultat", false);
break;
case "0005":
$this->getBilanGlobal($view);
echo $view->Render("statistique" . DS . "impression" . DS . "bilanresultat");
break;
}
echo ob_get_contents();
ob_end_flush();
}
示例3: ajax
public function ajax($action)
{
$json = array();
$json[0] = "";
$view = new View();
$heure_de_cours = array(["08:00", "08:55"], ["09:00", "09:55"], ["10:00", "11:05"], ["11:00", "12:00"], ["12:00", "12:55"], ["13:00", "13:55"], ["13:55", "14:50"], ["14:55", "15:50"], ["16:00", "16:55"], ["17:00", "17:55"]);
$view->Assign("heure_de_cours", $heure_de_cours);
$view->Assign("idselect", $this->comboClasses->idname);
switch ($action) {
case "charger":
$enseignements = $this->Enseignement->getEnseignements($this->request->idclasse);
$view->Assign("enseignements", $enseignements);
$json[0] = $view->Render("emplois" . DS . "ajax" . DS . "enseignement", FALSE);
break;
case "ajout":
$params = ["jour" => $this->request->jour, "idenseignement" => $this->request->idenseignement, "heuredebut" => $this->request->heuredebut, "heurefin" => $this->request->heurefin];
$this->Emplois->insert($params);
break;
case "supprimer":
$this->Emplois->delete($this->request->idemplois);
break;
}
//dataTable de l'emploi du temps: Onglet 1
$ens = $this->Emplois->getEmplois($this->request->idclasse);
$view->Assign("enseignements", $ens);
$json[1] = $view->Render("emplois" . DS . "ajax" . DS . "emplois", false);
//apercu de l'emploi du temps: Onglet 2
$json[2] = $view->Render("emplois" . DS . "ajax" . DS . "apercu", false);
echo json_encode($json);
}
示例4: eleve
/** Pour les onglets eleves */
public function eleve($val)
{
$view = new View();
$arr = array();
$onglet1 = $view->Render("ajax" . DS . "80010", false);
$onglet2 = $view->Render("ajax" . DS . "80011", false);
$arr[0] = $onglet1;
$arr[1] = $onglet2;
print json_encode($arr);
}
示例5: ajax
public function ajax($action)
{
$view = new View();
$json = array();
$compte = $this->Compteeleve->findSingleRowBy(["ELEVE" => $this->request->eleve]);
switch ($action) {
case "supprimer":
$this->Scolarite->delete($this->request->idscolarite);
break;
case "charger":
//Frais dont l'eleve doit payer
$frais = $this->Frais->getEleveFrais($this->request->eleve, $this->session->anneeacademique);
$view->Assign("frais", $frais);
$json[1] = $view->Render("scolarite" . DS . "ajax" . DS . "comboFrais", false);
$caisses = $this->Caisse->findBy(["COMPTE" => $compte['IDCOMPTE']]);
$view->Assign("caisses", $caisses);
$json[2] = $view->Render("scolarite" . DS . "ajax" . DS . "comboCaisses", false);
break;
case "ajout":
$frais = $this->Frais->findSingleRowBy(["IDFRAIS" => $this->request->idfrais]);
//Rechercher le montant lie a cette operation caisse
$caisse = $this->Caisse->findSingleRowBy(['IDCAISSE' => $this->request->idcaisse]);
/**
* Rechercher tous le total des payement se basant sur cette operation caisse
*/
$total = $this->Scolarite->getTotalByCaisse($this->request->idcaisse);
/**
* definir le montant du payement = montant de l'operation caisse - montant total des scolarite se basant
* sur cette operation caisse
*/
$montantscolarite = intval($caisse['MONTANT']) - intval($total['TOTAL']);
if ($montantscolarite == 0) {
$json[1] = $caisse['MONTANT'];
} else {
$montant = $montantscolarite < $frais['MONTANT'] ? $montantscolarite : $frais['MONTANT'];
$personnel = $this->Personnel->findSingleRowBy(["USER" => $this->session->iduser]);
$params = ["eleve" => $this->request->eleve, "frais" => $this->request->idfrais, "montant" => $montant, "datepayement" => date("Y-m-d", time()), "anneeacademique" => $this->session->anneeacademique, "realiserpar" => $personnel['IDPERSONNEL']];
$this->Scolarite->insert($params);
//Debiter le compte
$json[1] = '';
}
break;
}
$scolarites = $this->Scolarite->getScolarites($this->request->eleve, $this->session->anneeacademique);
$view->Assign("scolarites", $scolarites);
$json[0] = $view->Render("scolarite" . DS . "ajax" . DS . "scolarite", false);
echo json_encode($json);
}
示例6: index
public function index()
{
$this->view->clientsJS("connexion" . DS . "index");
$view = new View();
$view->Assign("errors", false);
$view->setCSS("public/css/connexion.css");
//le formulaire est soumis
if (isset($this->request->login) && isset($this->request->pwd)) {
if ($this->Connexion->authenticate($this->request->login, md5($this->request->pwd)) === TRUE) {
$_SESSION['user'] = $this->request->login;
//Definir la valeur du Timeout lors de la connexion a 10 min
$_SESSION['timeout'] = time() + TIME_OUT;
$_SESSION['anneeacademique'] = $this->request->anneeacademique;
//Garder la trace de connexion dans la table connexion
$this->keepTrack();
if (isset($_SESSION['activeurl'])) {
header("Location:" . $_SESSION['activeurl']);
} else {
header("Location:" . SITE_ROOT);
}
} else {
$view->Assign("errors", true);
}
}
$view->Assign("post", $this->request);
$this->loadModel("anneeacademique");
$anneeAcad = $this->Anneeacademique->selectAll();
$anneeacademique = new Combobox($anneeAcad, "anneeacademique", "ANNEEACADEMIQUE", "ANNEEACADEMIQUE");
$view->Assign("anneeacademique", $anneeacademique->view());
$content = $view->Render("connexion" . DS . "index", false);
$this->Assign("content", $content);
}
示例7: saisie
/**
* Code droit 512: Saisie d'une operation caise
*/
public function saisie()
{
$this->view->clientsJS("caisse" . DS . "caisse");
$view = new View();
$content = $view->Render("caisse" . DS . "saisie", false);
$this->Assign("content", $content);
}
示例8: envoi
public function envoi()
{
if (!isAuth(307)) {
return;
}
$this->view->clientsJS("message" . DS . "envoi");
$view = new View();
if (!empty($this->request->message)) {
# Envoyer le SMS et rediriger vers la page de suivi de SMS
$this->activateSMS();
$retval = $this->send($this->request->destinataire, $this->request->message);
if ($retval === false) {
$view->Assign("errors", true);
} else {
$view->Assign("errors", false);
# Inserer dans la table message envoyes
$personnel = $this->Personnel->getBy(["USER" => $this->session->iduser]);
$params = ["dateenvoie" => date("Y-m-d H:i:s", time()), "destinataire" => $this->request->destinataire, "expediteur" => $personnel['IDPERSONNEL'], "message" => $this->request->message];
$this->Messageenvoye->insert($params);
}
}
$destinataires = $this->Repertoire->getDestinataires();
$view->Assign("destinataires", $destinataires);
$content = $view->Render("message" . DS . "envoi", false);
$this->Assign("content", $content);
}
示例9: ajaxverrouillage
public function ajaxverrouillage()
{
$action = $this->request->action;
$view = new View();
$json = array();
switch ($action) {
case "verrouiller":
$this->Sequence->update(["VERROUILLER" => 1], ["IDSEQUENCE" => $this->request->idsequence]);
# Verrouiller egalement toutes les notes dans la table notation de ce semestre
$this->Notation->update(["VERROUILLER" => 1], ["SEQUENCE" => $this->request->idsequence]);
# Verrouiller les appels de cette sequence
$sequence = $this->Sequence->get($this->request->idsequence);
$this->Appel->lockAppelsByPeriode($sequence['DATEDEBUT'], $sequence['DATEFIN']);
# Inserer dans la BD, un resume des bulletins de la sequence
$this->recapitulerMoyenne($this->request->idsequence);
break;
case "deverrouiller":
$this->Sequence->update(["VERROUILLER" => 0], ["IDSEQUENCE" => $this->request->idsequence]);
# Deverrouiller egalement les notes de ce semestre
$this->Notation->update(['VERROUILLER' => 0], ["SEQUENCE" => $this->request->idsequence]);
# Deverrouiller les appels de cette sequences
$sequence = $this->Sequence->get($this->request->idsequence);
$this->Appel->unlockAppelsByPeriode($sequence['DATEDEBUT'], $sequence['DATEFIN']);
# Supprimer le resume des bulletins precedement defini lors du verrouillage
$this->Recapitulatifbulletin->deleteBy(["sequence" => $this->request->idsequence]);
break;
}
$sequences = $this->Sequence->getSequences($this->session->anneeacademique);
$view->Assign("sequences", $sequences);
$json[0] = $view->Render("sequence" . DS . "ajax" . DS . "tableSequence", false);
echo json_encode($json);
}
示例10: index
public function index()
{
$view = new View();
$this->loadJPGraph();
$content = $view->Render("jpgraph" . DS . "index", false);
$this->Assign("content", $content);
}
示例11: imprimer
public function imprimer()
{
parent::printable();
$view = new View();
$view->Assign("pdf", $this->pdf);
echo $view->Render("index" . DS . "impression" . DS . "font", false);
}
示例12: index
public function index()
{
$view = new View();
$str = "Utilisateur connecté : " . $_SESSION['user'] . "/" . $_SESSION['profile'] . "/IPW " . $_SESSION['anneeacademique'];
$view->Assign("infos", $str);
$content = $view->Render("index" . DS . "index", false);
$this->Assign("content", $content);
}
示例13: ajaxsaisie
public function ajaxsaisie($action)
{
$json = array();
$json[0] = "";
$view = new View();
$horaire = $this->Horaire->selectAll();
$heure_debut = array();
foreach ($horaire as $line) {
$heure_debut[] = substr($line["HEUREDEBUT"], 0, strlen($line["HEUREDEBUT"]) - 3);
}
$view->Assign("horaire", $horaire);
$view->Assign("heure_debut", json_encode($heure_debut));
switch ($action) {
case "charger":
$enseignements = $this->Enseignement->getEnseignements($this->request->idclasse);
$view->Assign("enseignements", $enseignements);
$json[0] = $view->Render("emplois" . DS . "ajax" . DS . "enseignement", FALSE);
break;
case "ajout":
$horaires = $this->Horaire->getHoraireIntervalle($this->request->horairedebut, $this->request->horairefin, $this->session->anneeacademique);
foreach ($horaires as $h) {
$params = ["jour" => $this->request->jour, "enseignement" => $this->request->enseignement, "horaire" => $h['IDHORAIRE']];
# Inserer dans la BD
$this->Emplois->insert($params);
}
if (empty($this->request->horairefin)) {
$params = ["jour" => $this->request->jour, "enseignement" => $this->request->enseignement, "horaire" => $this->request->horairedebut];
# Inserer dans la BD
$this->Emplois->insert($params);
}
break;
case "supprimer":
$this->Emplois->delete($this->request->idemplois);
break;
}
//dataTable de l'emploi du temps: Onglet 1
$ens = $this->Emplois->getEmplois($this->request->idclasse);
$view->Assign("enseignements", $ens);
$json[1] = $view->Render("emplois" . DS . "ajax" . DS . "emplois", false);
//apercu de l'emploi du temps: Onglet 2
$json[2] = $view->Render("emplois" . DS . "ajax" . DS . "apercu", false);
echo json_encode($json);
}
示例14: edit
public function edit($id)
{
if (!empty($this->request->idresponsable)) {
$acceptsms = isset($this->request->acceptesms) ? "1" : "0";
$params = ["civilite" => $this->request->comboCivilite, "nom" => $this->request->nom, "prenom" => $this->request->prenom, "adresse" => $this->request->adresse, "bp" => $this->request->bp, "portable" => $this->request->portable, "telephone" => $this->request->telephone, "email" => $this->request->email, "profession" => $this->request->profession, "acceptesms" => $acceptsms, "numsms" => $this->request->numsms];
$this->Responsable->update($params, ["IDRESPONSABLE" => $this->request->idresponsable]);
header("Location:" . Router::url("responsable"));
}
$view = new View();
$resp = $this->Responsable->findSingleRowBy(['IDRESPONSABLE' => $id]);
$this->comboCivilite->selectedid = $resp['CIVILITE'];
$view->Assign("comboCivilite", $this->comboCivilite->view());
$view->Assign("resp", $resp);
$content = $view->Render("responsable" . DS . "edit", false);
$this->Assign("content", $content);
}
示例15: mdp
public function mdp()
{
if (!empty($this->request->pwd) && !empty($this->request->comboUtilisateurs)) {
$mdpcrypte = md5($this->request->pwd);
$this->User->update(["PASSWORD" => $mdpcrypte], ["IDUSER" => $this->request->comboUtilisateurs]);
header("Location:" . Router::url("user", "droit"));
}
$this->view->clientsJS("parametre" . DS . "mdp");
$view = new View();
$users = $this->User->selectAll();
$comboUtilsateurs = new Combobox($users, "comboUtilisateurs", "IDUSER", "LOGIN");
$comboUtilsateurs->first = " ";
$view->Assign("comboUtilisateurs", $comboUtilsateurs->view());
$content = $view->Render("parametre" . DS . "mdp", false);
$this->Assign("content", $content);
}