Exemplo n.º 1
0
 function display($renderData)
 {
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_UPDATES"));
     $this->assignRef('renderData', $renderData);
     parent::display(null);
 }
Exemplo n.º 2
0
 function display($tpl = null)
 {
     $configHelper = new JXConfig();
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_MANAGE_DEPARTMENT"));
     parent::display($tpl);
 }
Exemplo n.º 3
0
 function display($tpl = null)
 {
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_CATEGORIES"));
     // grab existing categories
     parent::display($tpl);
 }
Exemplo n.º 4
0
 function display($tpl = null)
 {
     jimport('joomla.html.pagination');
     $configHelper = new JXConfig();
     $usersInvite = AccountFactory::getModel('usersInvite');
     $my = JXFactory::getUser();
     $total = $usersInvite->getTotal(array('from_email' => $my->email));
     $result = $usersInvite->getList(array('from_email' => $my->email, 'order_by' => 'status, last_invite_date'), $configHelper->get('list_limit'), JRequest::getVar('limitstart', 0));
     $inviteEmail = '';
     if ($_POST) {
         $postVar = JRequest::getVar('params');
         $inviteEmail = $postVar['invitation'];
     }
     // Extranet/Limited groups
     $groupModel = StreamFactory::getModel('groups');
     $myJoinedGroups = $groupModel->getGroups(array('id' => $my->getParam('groups_member')), 100);
     // Pagination
     $pagination = new JPagination($total, JRequest::getVar('limitstart', 0), $configHelper->get('list_limit'));
     $pendingStat = AccountTableUsersInvite::PENDING;
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_INVITE_USERS"));
     $this->assignRef('inviteEmail', $inviteEmail);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('pendingStat', $pendingStat);
     $this->assign('allowInvite', $configHelper->allowUsersRegister());
     $this->assignRef('results', $result);
     $this->assignRef('myJoinedGroups', $myJoinedGroups);
     parent::display($tpl);
 }
Exemplo n.º 5
0
 function display($tpl = null)
 {
     $integrationModel = JModel::getInstance('integrations', 'AccountModel');
     $row = $integrationModel->getList();
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_THIRD_PARTY_INTEGRATION"));
     $this->assignRef('row', $row);
     parent::display($tpl);
 }
Exemplo n.º 6
0
 /**
  * Tests if the information given by the user before creating a new user in the database is correct.
  **/
 public function controlInscription()
 {
     $accountView = new AccountView();
     if (empty($_POST['lastname']) || empty($_POST['firstname'])) {
         $accountView->showMessage("Veuillez renseigner tous les champs.");
         exit;
     }
     if (!empty($_POST['mail'])) {
         $accountModel = new AccountModel();
         $_POST["mail"] = htmlspecialchars($_POST["mail"]);
         $_POST["passe"] = htmlspecialchars($_POST["passe"]);
         $_POST["passe2"] = htmlspecialchars($_POST["passe2"]);
         if ($_POST["passe"] != $_POST["passe2"]) {
             $accountView->showMessage("Mot de passe non identique");
         } else {
             if (empty($_POST["passe"]) && empty($_POST["passe2"])) {
                 $accountView->showMessage("Veuillez renseigner les deux champs mot de passe");
             } else {
                 if ($userR = $accountModel->getUserEmail($_POST['mail'])) {
                     $accountView->showMessage("Adresse email existe déjà.");
                 } else {
                     if (preg_match('#[ÁÂÄàáâä@ÈÉÊËèéêë€ÌÍÎÏìíîïÒÓÔÖòóôöÙÚÛÜùúûüµŒœ]#', $_POST["firstname"]) != 0) {
                         $accountView->showMessage("Les caractères spéciaux sont interdits");
                     } else {
                         if (preg_match('#[ÁÂÄàáâä@ÈÉÊËèéêë€ÌÍÎÏìíîïÒÓÔÖòóôöÙÚÛÜùúûüµŒœ]#', $_POST["lastname"]) != 0) {
                             $accountView->showMessage("Les caractères spéciaux sont interdits");
                         } else {
                             //$_POST["passe"] = sha1($_POST["passe"]);
                             $userId = $accountModel->addUser($_POST["mail"], $_POST["firstname"], $_POST["lastname"], sha1($_POST["passe"]));
                             $_SESSION['infoUser'] = $accountModel->getUserById(intval($userId['user_id']));
                             $studentResult = $accountModel->getDataStudent('*', $_SESSION['infoUser']['user_id']);
                             $_SESSION['infoStudent'] = $studentResult;
                             $trainingResult = $accountModel->getTrainingInformationsForUser('*', $_SESSION['infoUser']['user_id']);
                             $_SESSION['infoTraining'] = $trainingResult;
                             $accountModel->sendEmail($_POST["mail"], $_POST["passe"]);
                         }
                     }
                 }
             }
         }
     } else {
         $accountView->showMessage("Veuillez remplir le champs adresse email.");
     }
 }
Exemplo n.º 7
0
 function display($tpl = null)
 {
     $configHelper = new JXConfig();
     $this->assign('logo', $configHelper->get(JXConfig::LOGO));
     $this->assign('style', $configHelper->get(JXConfig::STYLE));
     $this->assignRef('configHelper', $configHelper);
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_MANAGE_THEME"));
     parent::display($tpl);
 }
Exemplo n.º 8
0
 function display($tpl = null)
 {
     $jxConfig = new JXConfig();
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_BILLING"));
     $total = 0;
     /*$payments = JModel::getInstance('payments', 'AccountModel');
     		$total	 = $payments->getTotal();
     		$payments->getList(null, $jxConfig->get('list_limit'), JRequest::getVar('limitstart', 0));		
     		*/
     $pagination = new JPagination($total, JRequest::getVar('limitstart', 0), $jxConfig->get('list_limit'));
     $this->assignRef('availablePlans', $jxConfig->getAvailablePlans());
     $this->assignRef('plan', $jxConfig->getCurrentPlan());
     $this->assignRef('jxConfig', $jxConfig);
     $this->assignRef('payments', $payments);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Exemplo n.º 9
0
 function display($tpl = null)
 {
     $configHelper = new JXConfig();
     $my = JFactory::getUser();
     $defaultLang = JText::_('JXLIB_DEFAULT_LANGUAGE');
     $defaultTz = JText::_('JXLIB_DEFAULT_TIMEZONE');
     $defaultInvite = JXConfig::DISALLOW;
     $defaultAnon = JXConfig::ALLOW;
     // Additional Configuration which are not Joomla! native variables
     $siteName = $configHelper->get(JXConfig::SITENAME) == '' ? '' : $configHelper->get(JXConfig::SITENAME);
     $timeZone = $configHelper->getTimezone();
     $language = $configHelper->getLanguage();
     $allowAnon = $configHelper->get(JXConfig::ALLOW_ANON) == '' ? $defaultAnon : $configHelper->get(JXConfig::ALLOW_ANON);
     $allowInvite = $configHelper->get(JXConfig::ALLOW_INVITE) == '' ? $defaultInvite : $configHelper->get(JXConfig::ALLOW_INVITE);
     $limitEmailDomain = $configHelper->get(JXConfig::LIMIT_EMAIL_DOMAIN) == '' ? '' : $configHelper->get(JXConfig::LIMIT_EMAIL_DOMAIN);
     $domainName = $configHelper->getDomainName(true) == '' ? '' : $configHelper->getDomainName(true);
     //overwrite value with postParam when save error
     $error = array();
     if ($_POST) {
         $postParam = JRequest::getVar('params');
         $timeZone = isset($postParam['timezone']) ? $postParam['timezone'] : $timeZone;
         $language = isset($postParam['language']) ? $postParam['language'] : $language;
         $siteName = isset($postParam['sitename']) ? $postParam['sitename'] : $configHelper->get('sitename');
         $allowInvite = isset($postParam['allow_invite']) ? $postParam['allow_invite'] : $allowInvite;
         $limitEmailDomain = isset($postParam['limit_email_domain']) ? $postParam['limit_email_domain'] : $limitEmailDomain;
         $domainName = isset($postParam['domain_name']) ? $postParam['domain_name'] : $domainName;
     }
     $form = JForm::getInstance('profileForm', JPATH_ROOT . DS . 'components' . DS . 'com_profile' . DS . 'models' . DS . 'forms' . DS . 'edit.xml');
     $this->assignRef('profileForm', $form);
     $this->assignRef('my', $my);
     $this->assignRef('sitename', $siteName);
     $this->assignRef('default_timezone', $timeZone);
     $this->assignRef('default_language', $language);
     $this->assignRef('domain_name', $domainName);
     $this->assignRef('limit_email_domain', $limitEmailDomain);
     $this->assignRef('allow_invite', $allowInvite);
     $this->assignRef('allow_anon', $allowAnon);
     $this->assign('domain_editable', $configHelper->allowChangeDomain());
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_ACCOUNT_SETTING"));
     parent::display($tpl);
 }
Exemplo n.º 10
0
 function display($tpl = null)
 {
     $defaultAdmin = JXFactory::getUser(42);
     $configHelper = new JXConfig();
     $crocodocs = $configHelper->get('crocodocs');
     $crocodocsenable = $configHelper->get('crocodocsenable');
     $scribd_api = $configHelper->get('scribd_api');
     $scribd_secret = $configHelper->get('scribd_secret');
     $scribdenable = $configHelper->get('scribdenable');
     $diffbot = $configHelper->get('diffbot');
     $mailer = $configHelper->get('mailer');
     $mailfrom = $configHelper->get('mailfrom');
     // admin email ?
     $fromname = $configHelper->get('fromname');
     // admin name ?
     $sendmail = $configHelper->get('sendmail');
     // /usr/sbin/sendmail
     $smtpauth = $configHelper->get('smtpauth');
     $smtpuser = $configHelper->get('smtpuser');
     $smtppass = $configHelper->get('smtppass');
     $smtphost = $configHelper->get('smtphost');
     $smtpsecure = $configHelper->get('smtpsecure');
     $smtpport = $configHelper->get('smtpport');
     // 25
     //overwrite value with postParam when save error
     $error = array();
     if ($_POST) {
         $postParam = JRequest::getVar('jform');
         $crocodocs = $postParam['crocodocs'];
         $crocodocsenable = $postParam['crocodocsenable'];
         $scribd_api = $postParam['scribd_api'];
         $scribd_secret = $postParam['scribd_secret'];
         $scribdenable = $postParam['scribdenable'];
         $diffbot = $postParam['diffbot'];
         $mailer = $postParam['mailer'];
         $mailfrom = $postParam['mailfrom'];
         $fromname = $postParam['fromname'];
         $sendmail = $postParam['sendmail'];
         $smtpauth = $postParam['smtpauth'];
         $smtpuser = $postParam['smtpuser'];
         $smtppass = $postParam['smtppass'];
         $smtphost = $postParam['smtphost'];
         $smtpsecure = $postParam['smtpsecure'];
         $smtpport = $postParam['smtpport'];
     }
     $this->assignRef('crocodocs', $crocodocs);
     $this->assignRef('crocodocsenable', $crocodocsenable);
     $this->assignRef('scribd_api', $scribd_api);
     $this->assignRef('scribd_secret', $scribd_secret);
     $this->assignRef('scribdenable', $scribdenable);
     $this->assignRef('diffbot', $diffbot);
     $this->assignRef('mailer', $mailer);
     $this->assignRef('mailfrom', $mailfrom);
     $this->assignRef('fromname', $fromname);
     $this->assignRef('sendmail', $sendmail);
     $this->assignRef('smtpauth', $smtpauth);
     $this->assignRef('smtpuser', $smtpuser);
     $this->assignRef('smtppass', $smtppass);
     $this->assignRef('smtphost', $smtphost);
     $this->assignRef('smtpsecure', $smtpsecure);
     $this->assignRef('smtpport', $smtpport);
     $doc = JFactory::getDocument();
     $doc->setTitle(JText::_("COM_ACCOUNT_LABEL_ACCOUNT_ADVANCE_SETTING"));
     parent::display($tpl);
 }
Exemplo n.º 11
0
 /**
  * Sends an e-mail to the user mail address
  * @param $userMail string containing the user mail address
  */
 public function sendEmail($userMail)
 {
     $accountView = new AccountView();
     $body = "\n               <p>Bienvenue !! vous êtes inscrit sur la page Zenetude.</p>\n               <p> Votre identifiant : " . $_POST['mail'] . "</p>\n               <p>Accédez au site : <a href='http://zenetude.esy.es'>Zenetude</a></p>\n               <hr/>\n               <p>Ce message a été généré automatiquement. Merci de ne pas y répondre.</p>\n           ";
     $mailer = new PHPMailer();
     $mailer->CharSet = "utf-8";
     $mailer->IsHTML(true);
     $mailer->From = "noreply@zenetude.esy.es";
     $mailer->FromName = "Noreply - Zenetude";
     // Définition du sujet/objet
     $mailer->Subject = "Zenetude - Inscription";
     $mailer->AddAddress($userMail);
     //$mailer->Subject =/*"Subject: =?UTF-8?B?".*/base64_encode("Inscription au site Zenetude");
     $mailer->Body = $body;
     if (!$mailer->Send()) {
         $accountView->showMessage("Erreur d'envoie du mail de récapitulation ! Mais l'inscription a réussie.");
     } else {
         $accountView->showMessage("Inscription terminée.", "ok", "index.php");
     }
 }
Exemplo n.º 12
0
  *		ACCOUNT
  **********************************************************/
 case 'account':
     switch ($route[1]) {
         case routeIsId($route[1]):
             $Controller = new AccountController();
             $Account = $Controller->getUser($route[1]);
             $AccountView = new AccountView();
             $sMainContentView = $AccountView->getAccount($Account);
             break;
             switch ($route[2]) {
                 # account/$iId/edit
                 case 'edit':
                     $Controller = new AccountController();
                     $Account = $Controller->getUser($route[1]);
                     $AccountView = new AccountView();
                     $sMainContentView = $AccountView->editAccount($Account);
                     break;
                     # account/$iId/delete
                 # account/$iId/delete
                 case 'delete':
                     break;
             }
     }
     break;
 case 'signup':
     $signupView = new View();
     $sMainContentView = $signupView->fetch('signup.tpl');
     if ($_POST) {
         $Controller = new AccountController();
         if ($Controller->signup($_POST)) {
Exemplo n.º 13
0
}
//echo "Control: $control <br>";
switch ($control) {
    case "products":
        MasterView::showHeader();
        ProductsView::show();
        MasterView::showFooter();
        break;
    case "specials":
        MasterView::showHeader();
        SpecialsView::show();
        MasterView::showFooter();
        break;
    case "myaccount":
        MasterView::showHeader();
        AccountView::show();
        MasterView::showFooter();
        break;
    case "signup":
        MasterView::showHeader();
        SignUpView::show();
        MasterView::showFooter();
        break;
    case "placeOrder":
        MasterView::showHeader();
        placeOrderView::show();
        MasterView::showFooter();
        break;
    case "confirmOrder":
        MasterView::showHeader();
        confirmOrderView::show();