Ejemplo n.º 1
0
 function update()
 {
     $rep = $this->getResponse('json');
     $this->msg = 'Votre Version de Business Open Suite est déjà à jours';
     $project = simplexml_load_file('project.xml');
     $local_version = $project->info->version->__toString();
     $data = array('module' => 'bos', 'action' => 'updater:info');
     $bos_info = jHttp::quickPost(UPDATE_URL . 'index.php', $data);
     $bos_info = json_decode($bos_info);
     if ($bos_info->version != $local_version) {
         $tempname = uniqid() . '.zip';
         $bos = jHttp::quickGet(UPDATE_URL . 'bos.zip');
         file_put_contents('var/uploads/' . $tempname, $bos);
         $this->unpackUpdate('var/uploads/' . $tempname);
         unlink('var/uploads/' . $tempname);
         $this->msg = 'votre version de Business Open Suite a été mise à jours';
         $this->success = true;
     }
     $rep->data = array('success' => $this->success, 'msg' => $this->msg);
     return $rep;
 }
Ejemplo n.º 2
0
 function sendViaGoogle()
 {
     $rep = $this->getResponse('text');
     $emailSrv = new EmailService();
     $emailSrv->getEmails();
     foreach ($emailSrv->getEmails() as $email) {
         //$rep->content .= $email->email."\n";
         $email = "*****@*****.**" . "\n";
         $data = array('email' => $email);
         $pageweb = jHttp::quickPost('http://localhost/testapp/mailServlet', $data);
         $rep->content .= $pageweb;
     }
     return $rep;
 }
Ejemplo n.º 3
0
 function sendMail($email, $text, $serv)
 {
     $data = array('email' => $email, 'text' => $text);
     return jHttp::quickPost($serv . '/testapp/mailServlet', $data);
 }