Exemplo n.º 1
0
 function getInfosFilm($id = null, $keyconnexion = null)
 {
     \model\simple\Utilisateur::authentificationPourRtorrent($keyconnexion);
     if (!\config\Conf::$user["user"]) {
         throw new \Exception("Non User");
     }
     if (is_null($id)) {
         $id = $_REQUEST["id"];
     }
     $o["typesearch"] = "movie";
     $all = new \model\simple\Allocine($id, $o);
     $this->set(array("film" => $all->retourneResMovieFormat()));
 }
Exemplo n.º 2
0
 function liste($keyconnexion = null)
 {
     \model\simple\Utilisateur::authentificationDistante($keyconnexion);
     if (!\config\Conf::$user["user"]) {
         throw new \Exception("Non User");
     }
     if (!\config\Conf::$user["role"] >= \config\Conf::$rolenumero["Torrent"]) {
         throw new \Exception("Non authorisé");
     }
     $vv = \model\simple\Repertoire::getFindAll();
     //var_dump($vv);
     $this->set("rep", $vv);
     //$this->set("rep", "rigolo");
 }
Exemplo n.º 3
0
 function create()
 {
     if (!(isset($_REQUEST["login"]) && isset($_REQUEST["mail"]) && isset($_REQUEST["role"]))) {
         throw new \Exception("Manque les variables post");
     }
     $mdp = \model\simple\Utilisateur::getRandomMdp();
     $options = null;
     if (isset($_REQUEST["vlc"])) {
         $options["vlc"] = true;
     }
     if (!\model\mysql\Utilisateur::insertUtilisateur($_REQUEST["login"], $mdp, $_REQUEST["role"], $_REQUEST["mail"], $options)) {
         throw new \Exception("Impossible d'enregistrer cet utilisateur");
     }
     Mail::creationCompte($_REQUEST["mail"], $_REQUEST["login"], $mdp);
 }
Exemplo n.º 4
0
 function mdpoublier()
 {
     if (isset($_POST["mail"])) {
         $u = \model\mysql\Utilisateur::getUtilisateurParMail($_POST["mail"]);
         if ($u) {
             $mdp = \model\simple\Utilisateur::getRandomMdp();
             $args["login"] = $u->login;
             $args["mdp"] = $mdp;
             $t = \model\mysql\Ticket::savTicket("controller\\horsligne\\Utilisateur", "modifierMdp", $args);
             $f = false;
             if (!is_bool($t)) {
                 $f = \model\simple\Mail::activationMotDePasse($u->mail, $u->login, $mdp, $t);
             }
             $this->set(array("succereinitialmdp" => $f));
             $this->render("index");
         } else {
             $this->set(array("erreur" => true));
         }
     }
 }
Exemplo n.º 5
0
 function init($keyconnexion = null)
 {
     \model\simple\Utilisateur::authentificationPourRtorrent($keyconnexion);
     $theSettings = \model\xmlrpc\rTorrentSettings::get(\config\Conf::$userscgi, true);
     $req = new \model\xmlrpc\rXMLRPCRequest(\config\Conf::$userscgi, array($theSettings->getOnFinishedCommand(array("seedingtime", \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.set_custom') . '=seedingtime,"$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'execute_capture') . '={date,+%s}"')), $theSettings->getOnInsertCommand(array("addtime", \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.set_custom') . '=addtime,"$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'execute_capture') . '={date,+%s}"')), $theSettings->getOnHashdoneCommand(array("seedingtimecheck", \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'branch=') . '$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'not=') . '$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_complete=') . ',,' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_custom') . '=seedingtime,,"' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.set_custom') . '=seedingtime,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_custom') . '=addtime' . '"')), \model\xmlrpc\rTorrentSettings::get(\config\Conf::$userscgi)->getOnEraseCommand(array('erasedata', \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'branch=') . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_custom1') . '=,"' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'execute') . '={rm,-r,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_base_path') . '=}"')), $theSettings->getOnFinishedCommand(array('addbibliotheque', \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'execute') . '={' . 'php,' . ROOT . DS . 'script/addbibliotheque.php,' . \config\Conf::$userscgi . ',$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_hash') . '=,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_base_path') . '=,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_base_filename') . '=,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.is_multi_file') . '=,$' . \model\xmlrpc\rTorrentSettings::getCmd(\config\Conf::$userscgi, 'd.get_custom') . "=clefunique" . '}'))));
     if ($req->run()) {
         echo "ok";
     } else {
         echo $req->val;
     }
 }
Exemplo n.º 6
0
 function getInfos($code, $keyconnexion, $all = "")
 {
     \model\simple\Utilisateur::authentificationPourRtorrent($keyconnexion);
     if (!\config\Conf::$user["user"]) {
         throw new \Exception("Non User");
     }
     if ($all === "") {
         $res = \model\mysql\Serie::getByIdFormat($code);
     } else {
         $o["typesearch"] = "tvseries";
         $all = new \model\simple\Allocine($code, $o);
         $res = $all->retourneResSerieFormat();
     }
     $this->set(array("film" => $res));
 }