Exemplo n.º 1
0
function inscription($tab, $numero, $base)
{
    //inserer l'evenement dans la base
    $sms = array(":objet" => "inscription à ALIENTECH", ":expediteur" => "inconnue:{$numero}", ":destinataire" => "serveur", ":contenu" => implode(" ", $tab), ":date_sms" => Date("Y-m-d H-i-s"));
    newSMS($sms, $base);
    if (count($tab) == 2) {
        $fillial = $tab[1];
        //inserer un nouveau client
        $id = newClient($numero, $base);
        //definir de l'uid
        $uid = newUID($id, $fillial, $base);
        //inserer dans la base
        modifieChampClient("client_UID", $uid, $id, $base);
        //envoyer la reponse
        $msg = "Bonjour, ALIENTECH vous remercie de votre intérêt pour ses services. Votre UID est" . $uid . ". Pour finaliser votre inscription au service S1, merci d’envoyer S1 INSCR " . $uid . " au 24248. Cout du SMS 490 F.";
        //inserer l'evenement dans la base
        $sms = array(":objet" => "confirmation inscription", ":expediteur" => "serveur", ":destinataire" => "{$uid}:{$numero}", ":contenu" => $msg, ":date_sms" => Date("Y-m-d H-i-s"));
        newSMS($sms, $base);
        //envoyer le msg au client
        envoieMsg($msg);
    }
}
Exemplo n.º 2
0
     }
 } elseif ($action == "clientUpdatePassword") {
     $password = trim($_POST['cpconew']);
     $result = clientUpdatePassword($password);
     echo $result;
 } else {
     if ($action == "clientregister") {
         $data['reg_first_name'] = ucfirst(trim($_POST['reg_first_name']));
         $data['reg_last_name'] = ucfirst(trim($_POST['reg_last_name']));
         $data['reg_email'] = trim($_POST['reg_email']);
         $data['reg_username'] = trim($_POST['reg_username']);
         $data['reg_password'] = trim($_POST['reg_password']);
         $data['reg_bdate'] = trim($_POST['reg_bdate']);
         $data['reg_address'] = ucfirst(trim($_POST['reg_address']));
         $data['reg_mobile'] = trim($_POST['reg_mobile']);
         $result = newClient($data);
         echo $result;
     } elseif ($action == "updateClientProfile") {
         $data['ce_fname'] = ucfirst(trim($_POST['ce_fname']));
         $data['ce_lname'] = ucfirst(trim($_POST['ce_lname']));
         $data['ce_address'] = ucfirst(trim($_POST['ce_address']));
         $data['ce_email'] = trim($_POST['ce_email']);
         $data['ce_uname'] = trim($_POST['ce_uname']);
         $data['ce_contact'] = trim($_POST['ce_contact']);
         $result = updateClientProfile($data);
         echo $result;
     } else {
         if ($action == "userlogin") {
             $data['user_login_username'] = trim($_POST['user_login_username']);
             $data['user_login_password'] = trim($_POST['user_login_password']);
             $result = userLogin($data);
Exemplo n.º 3
0
	<body>
		
		<!-- contenu de la page -->
		<?php 
session_start();
if (isset($_SESSION['pseudo']) && isset($_SESSION['pass'])) {
    include "template/header.php";
    ?>
		<section>
			<?php 
    if (isset($_POST['client_UID']) && $_POST['client_UID'] !== "" && isset($_POST['client_UFR']) && isset($_POST['client_numTel']) && $_POST['client_numTel'] !== "" && isset($_POST['client_adrMac']) && isset($_POST['client_extCouv'])) {
        require_once "../scripts/base_connexion.php";
        require_once "../scripts/traitement.php";
        require_once "../scripts/requetes.php";
        //creer un client
        $cl = newClient($_POST['client_numTel'], $base);
        //
        $client = array(":client_UID" => $_POST['client_UID'], ":client_UFR" => $_POST['client_UFR'], ":client_numTel" => $_POST['client_numTel'], ":client_extCouv" => $_POST['client_extCouv'], ":client_adrMac" => $_POST['client_adrMac'], ":client_dateInsc" => Date("Y-m-d H-i-s"), ":client_id" => $cl);
        //insertion dans la base
        $res = modifieClient($client, $base);
        if ($res == -1) {
            echo "<div>Impossible d'ajouter ce client!</div>";
        } elseif ($res == 0) {
            echo "<div>le titre de ce client existe deja. ...</div>";
        } else {
            header("location: liste_client.php");
        }
    } else {
        ?>
					<form method="post" action="ajouter_client.php">
						<table>
Exemplo n.º 4
0
if ($action != "login" && $action != "logout" && !$username) {
    login();
    exit;
}
switch ($action) {
    case 'login':
        login();
        break;
    case 'logout':
        logout();
        break;
    case 'newArticle':
        newArticle();
        break;
    case 'newClient':
        newClient();
        break;
    case 'editClient':
        editClient();
        break;
    case 'deleteClient':
        deleteClient();
        break;
    case 'listClients':
        listClients();
        break;
    case 'editArticle':
        editArticle();
        break;
    case 'editPage':
        editPage();