コード例 #1
0
ファイル: addtask_v.php プロジェクト: rachidkada/MRN_PRO
		<div class="clearfix">
			
		</div>
		<div class="table-header">
			Formulaire: "<?php 
echo ACTIV_APP;
?>
"

		</div>
		<div class="widget-content">
			<div class="widget-box">
				
<?php 
$form = new Mform('addtask', 'addtask', 'task');
$form->input_hidden('id_modul', Mreq::tg('id'));
//Déscription application
$desc_array[] = array('required', 'true', 'Insérer la Déscription');
$form->input('Déscription', 'description', 'text', 6, null, $desc_array);
//Nom Application
$app_array[] = array('required', 'true', 'Insérer Nom d l' . "\\'" . ' application');
$app_array[] = array('minlength', '3', 'Minimum 3 caractères');
$app_array[] = array('remote', 'app#task', 'Ce nom existe déja');
$form->input('Nom Application', 'app', 'text', 6, null, $app_array);
//Option Application système
$app_sys = array('NON' => 0, 'OUI' => 1);
$form->select('Application Système', 'app_sys', 3, $app_sys, $indx = NULL, $selected = NULL);
//Button submit
$form->button('Enregistrer Application');
//Add JS function if need
//$form->js_add_funct('alert(\'Test alert\');');
コード例 #2
0
ファイル: recovery_c.php プロジェクト: ATS001/MRN
<?php

//Check Valid link
//End Check Valid link
if (Mreq::tp('verif') == 1) {
    //exit('0#exec');
    $posted_data = array('pass' => Mreq::tp('pass'), 'passc' => Mreq::tp('passc'), 'token' => Mreq::tp('token'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['pass'] == NULL) {
        $empty_list .= "<li>Mot de passe</li>";
        $checker = 1;
    }
    if ($posted_data['passc'] == NULL) {
        $empty_list .= "<li>Confirmation mot de passe</li>";
        $checker = 1;
    }
    if ($posted_data['pass'] != $posted_data['passc']) {
        $empty_list .= "<li>Les deux mots de passe incompatibles</li>";
        $checker = 1;
    }
    if ($posted_data['token'] == NULL || strlen($posted_data['token']) != 32) {
        $empty_list .= "<li>Le token est Invalide</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
コード例 #3
0
ファイル: check_c.php プロジェクト: rachidkada/MRN_PRO
}
//Function check good password
function check_Password_complex($pass)
{
    if (strlen($pass) < 8 || !preg_match("#[0-9]+#", $pass) || !preg_match("#[a-zA-Z]+#", $pass)) {
        exit("false");
        //
    } else {
        exit("true");
        //.
    }
}
//Check username avalaible
if (Mreq::tp('f') != null && Mreq::tp('f') != 'pass') {
    $champs = Mreq::tp('f');
    $table = Mreq::tp('t');
    $value = Mreq::tp($champs);
    //exit($champs.' '.$table.' '.$value);
    check_exist($table, $champs, $value, Mreq::tp('isedit'));
}
if (Mreq::tp('f') == "pass") {
    check_Password_complex(Mreq::tp('pass'));
}
/*//Check username avalaible

//Check email adress exist for existing account
if(Mreq::tp('f') == "mail"){check_exist('users_sys', 'mail', Mreq::tp('email'), Mreq::tp('isedit'));}
//Check app task exist for existing  task
if(Mreq::tp('f') == "app"){check_exist('users_sys', 'mail', Mreq::tp('email'), Mreq::tp('isedit'));}
//Check password is good
if(Mreq::tp('f') == "pass"){check_Password_complex(Mreq::tp('pass'));}*/
コード例 #4
0
ファイル: init.class.php プロジェクト: ATS001/MRN
 /**
  * Function Format verif form get an set
  * using session 
  * return string true.
  */
 public static function form_verif($sens = true)
 {
     if ($sens == true) {
         session::clear('f_v');
         session::set('f_v', session::generate_sid());
         $str = session::get('f_v');
         echo $str;
     } else {
         if (Mreq::tp('verif') != null) {
             if (Mreq::tp('verif') == session::get('f_v')) {
                 return true;
             } else {
                 exit('3#Token non valid');
             }
             return true;
         }
     }
 }
コード例 #5
0
ファイル: edituser_c.php プロジェクト: ATS001/MRN
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('id' => Mreq::tp('id'), 'nom' => Mreq::tp('pseudo'), 'lnom' => Mreq::tp('lnom'), 'fnom' => Mreq::tp('fnom'), 'mail' => Mreq::tp('email'), 'tel' => Mreq::tp('tel'), 'service' => Mreq::tp('service'), 'pass' => Mreq::tp('pass'), 'passc' => Mreq::tp('passc'), 'photo_id' => Mreq::tp('photo-id'), 'form_id' => Mreq::tp('form-id'), 'signature_id' => Mreq::tp('signature-id'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['lnom'] == NULL) {
        $empty_list .= "<li>Nom</li>";
        $checker = 1;
    }
    if ($posted_data['fnom'] == NULL) {
        $empty_list .= "<li>Prénom</li>";
        $checker = 1;
    }
    if ($posted_data['nom'] == NULL) {
        $empty_list .= "<li>Pseudo</li>";
        $checker = 1;
    }
    /*if($posted_data['pass'] == NULL){
    
          $empty_list .= "<li>Mot de passe</li>";
          $checker = 1;
        }*/
    if ($posted_data['pass'] != NULL && $posted_data['passc'] == NULL) {
        $empty_list .= "<li>Confirmation mot de passe</li>";
        $checker = 1;
    }
    if ($posted_data['mail'] == NULL) {
        $empty_list .= "<li>Adresse Email</li>";
コード例 #6
0
ファイル: forgot_c.php プロジェクト: ATS001/MRN
<?php

if (Mreq::tp('verif') == 1) {
    $posted_data = array('email' => Mreq::tp('email'), 'captcha' => Mreq::tp('captcha'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['email'] == NULL) {
        $empty_list .= "<li>L'adresse email ou Pseudo</li>";
        $checker = 1;
    }
    if ($posted_data['captcha'] == NULL) {
        $empty_list .= "<li>Le code Anti-robots</li>";
        $checker = 1;
    }
    if ($posted_data['captcha'] != $_SESSION['Captcha']) {
        $empty_list .= "<li>Le code Anti-robots Incorrect</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_forgot = new MLogin($posted_data);
    //execute Login returne false if error
    if ($new_forgot->do_forgot()) {
        echo "1#" . $new_forgot->log;
    } else {
        echo "0#" . $new_forgot->log;
コード例 #7
0
ファイル: listuser_c.php プロジェクト: ATS001/MRN
//concatenate search sql if value exist
if (isset($where) && $where != '') {
    $sqlTot .= $where;
    $sqlRec .= $where;
}
$sqlRec .= " ORDER BY statut DESC, " . $columns[$params['order'][0]['column']] . "   " . $params['order'][0]['dir'] . "  LIMIT " . $params['start'] . " ," . $params['length'] . " ";
if (!$db->Query($sqlTot)) {
    $db->Kill($db->Error() . " SQLTOT {$sqlTot}");
}
//
$totalRecords = $db->RowCount();
//Export data to CSV File
if (Mreq::tp('export') == 1) {
    $file_name = 'user_list';
    $title = 'Liste utilisateur ';
    if (Mreq::tp('format') == 'csv') {
        $header = array('ID', 'Nom & Prénom', 'Service', 'Statut');
        Minit::Export_xls($header, $file_name, $title);
    } else {
        $header = array('ID' => 10, 'Nom & Prénom' => 50, 'Service' => 20, 'Statut' => 20);
        Minit::Export_pdf($header, $file_name, $title);
    }
}
//
if (!$db->Query($sqlRec)) {
    $db->Kill($db->Error() . " SQLREC {$sqlRec}");
}
//
//iterate on results row and create new index array of data
while (!$db->EndOfSeek()) {
    $row = $db->RowValue();
コード例 #8
0
ファイル: header.php プロジェクト: ATS001/MRN
<!DOCTYPE html>
<html lang="fr">
	<head>
		<meta charset="utf-8" />
		<title><?php 
echo SYS_TITRE . ' | ' . MCfg::get('sys_desc') . ' | ' . CLIENT_TITRE;
?>
.</title>

		<meta name="description" content="overview &amp; stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<?php 
if (Mreq::tg('noscript') == "0" && Mreq::tg('_tsk') != 'errorjs') {
    $error_link = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?_tsk=errorjs&noscript=1';
    ?>
	<noscript>
		<meta http-equiv="refresh" content="0;url=<?php 
    echo $error_link;
    ?>
"/>
	</noscript>
<?php 
}
?>
        <?php 
require_once 'css.php';
?>

		
		<!--inline styles related to this page-->
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
コード例 #9
0
ファイル: actiontask_c.php プロジェクト: ATS001/MRN
<ul class="dropdown-menu dropdown-menu-right">
<?php 
$actions = new Mmodul();
$actions->id_task = Mreq::tp('id');
$actions->action_task();
?>
</ul>
コード例 #10
0
ファイル: login_c.php プロジェクト: ATS001/MRN
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('user' => Mreq::tp('user'), 'pass' => Mreq::tp('pass'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['user'] == NULL) {
        $empty_list .= "<li>Nom d'utilisateur</li>";
        $checker = 1;
    }
    if ($posted_data['pass'] == NULL) {
        $empty_list .= "<li>Mot de passe</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_login = new MLogin($posted_data);
    //execute Login returne false if error
    if ($new_login->do_login()) {
        echo "1#" . $new_login->log;
    } else {
        echo "0#" . $new_login->log;
    }
} else {
    view::load('login', 'login');
}
コード例 #11
0
ファイル: task_v.php プロジェクト: ATS001/MRN
<script type="text/javascript">


$(document).ready(function(){
	
	var table = $('#task_grid').DataTable({
		bProcessing: true,
		serverSide: true,
		ajax: {
                    url: "./?_tsk=task&ajax=1&id=<?php 
$info_modul->Shw('id');
?>
", // 
                    type: "post",
                    //data: "id=<?php 
Mreq::tp('id');
?>
", // 
              },

                aoColumns: [
                   {"sClass": "center","sWidth":"5%"}, //
                   
                   {"sClass": "left","sWidth":"55%"},
                   {"sClass": "left","sWidth":"35%"},
                   {"sClass": "center","sWidth":"5%"},



                   ],
コード例 #12
0
ファイル: rules_v.php プロジェクト: ATS001/MRN
										<th>
											Description
										</th>
										<th width = "5%">
											<input  name="form-field-checkbox" class="check-all ace ace-checkbox-2" type="checkbox">
											<span class="lbl"></span>
										</th>
									</tr>
								</thead>

								<tbody>
<?php 
    //liste user
    $query_modul = new Mmodul();
    global $db;
    if (!$db->Query($query_modul->Get_action_modul($row[0], Mreq::tp('id')))) {
        $db->Kill($db->Error());
    }
    while (!$db->EndOfSeek()) {
        $row = $db->Row();
        ?>
									<tr>
										<td>
											<?php 
        echo $row->action_id;
        ?>
										</td>

										

										<td>
コード例 #13
0
ファイル: edituser_v.php プロジェクト: ATS001/MRN
<?php

//Get all compte info
$info_user = new Musers();
$info_user->id_user = Mreq::tp('id');
if (!$info_user->get_user()) {
    exit('3#' . $info_user->log . '<br>Les informations pour cette ligne sont erronées contactez l\'administrateur');
}
?>


<script type="text/javascript">

jQuery(function($) {
	
    // validate signup form on keyup and submit
    $("#adduser").validate({
    	execApp:"edituser",
    	execNext:"user",
    	isedit: '<?php 
$info_user->Shw('id');
?>
',
    	//execAlert:true,
    	//remoteAlert:true,
    	rules: {
    		fnom: "required",
    		lnom: "required",
    		service: "required",

    		pseudo: {
コード例 #14
0
ファイル: applic.class.php プロジェクト: ATS001/MRN_ERP
 public static function load($ifsses, $appid)
 {
     //Format Messages
     $msg_ajax = '<div class="alert alert-error"><strong><i class="icon-remove"></i>Attention!</strong><br> Vous n\'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\AJAX</div>';
     $msg_app = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\APP";
     $msg_file = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\FILE";
     $msg_perm = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\PERMISSION_USER";
     $msg_sess = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\SESSION_USER";
     //Avant tout on check le browser
     //exit($appid);
     if (!MInit::check_browser()) {
         $errpage = "Navigateur non supporté<br> merci de contacter le Service Informatique de <<CLIENT>>.";
         //header("location:ff.exe");
         exit(msgbox($errpage, 0, '', 45));
     }
     global $db;
     Cookie::close_session_open();
     $default_applic_id = $ifsses == 1 ? 'login' : $appid;
     //exit(Mreq::tg('_tsk'));
     $app_id = Mreq::tg('_tsk') != "0" ? Mreq::tg('_tsk') : $default_applic_id;
     if (!$db->Query("SELECT * FROM task where  app='{$app_id}' ")) {
         $db->Kill($db->Error());
     }
     if ($db->RowCount() == 0) {
         exit("3#{$msg_app}'");
     }
     $array = $db->RowArray();
     $appc_idc = $array['id'];
     $needsession = $array['session'];
     $app_rep = $array['rep'];
     $app_file = $array['file'];
     $app_ajax = $array['ajax'];
     $app_target = MPATH_MODULES . $app_rep . SLASH . $app_file . '_c.php';
     if ($app_ajax == 1) {
         exit("3#{$msg_ajax}");
     }
     //Check if is good appli not need session
     $good_app = $db->QuerySingleValue0("select modul from task where id = {$appc_idc}");
     if ($needsession == 1 && session::get('userid') == FALSE) {
         //exit("3#$msg_sess");
         header('location:./');
     }
     if ($needsession == 0 && session::get('userid') == TRUE) {
         //exit("3#$msg_sess");
         header('location:./');
     }
     if ($good_app == "0") {
         $sql = "SELECT *  FROM permission_users where perm=1 and  appid=" . $appc_idc . " and userid=" . $_SESSION['userid'];
         if (!$db->Query($sql)) {
             $db->Kill($db->Error());
         }
         if ($db->RowCount() <= 0) {
             exit("3#{$msg_perm} ");
         }
     }
     if (!file_exists($app_target)) {
         print "3#{$msg_file} {$app_target}";
     } else {
         define('ACTIV_APP', $array['dscrip']);
         define('MODUL_APP', $array['modul']);
         define('APP_ID', $array['id']);
         require_once $app_target;
     }
 }
コード例 #15
0
ファイル: editlangue_v.php プロジェクト: rachidkada/MRN_PRO
<?php

//Get all compte info
$info_langue = new Mlangue();
$info_langue->id_langue = Mreq::tp('id');
if (!$info_langue->get_langue()) {
    exit('3#' . $info_langue->log . '<br>Les informations pour cette ligne sont erronées contactez l\'administrateur');
}
?>


<script type="text/javascript">
 

jQuery(function($) {
    // validate signup form on keyup and submit
    $("#editlangue").validate({
    	execApp:"editlangue",
    	execNext:"langue",
    	isedit: '<?php 
$info_langue->Shw('id');
?>
',
    	//execAlert:true,
    	//remoteAlert:true,
    

    	rules: {
    		lang: "required"
    		
    	},
コード例 #16
0
ファイル: task_v.php プロジェクト: rachidkada/MRN_PRO
				</thead>
			</table>
		</div>
	</div>
</div>
<script type="text/javascript">


$(document).ready(function(){
	
	var table = $('#task_grid').DataTable({
		bProcessing: true,
		serverSide: true,
		ajax_url:"task",
		extra_data : "id=<?php 
echo Mreq::tp('id');
?>
",
		

                aoColumns: [
                   {"sClass": "center","sWidth":"5%"}, //
                   
                   {"sClass": "left","sWidth":"55%"},
                   {"sClass": "left","sWidth":"35%"},
                   {"sClass": "center","sWidth":"5%"},



                   ],
コード例 #17
0
ファイル: mainns.php プロジェクト: ATS001/MRN
<!-- styles -->

<body class="login-layout">
		<div class="main-container container-fluid">
			<div class="main-content">
				<div class="row-fluid">
					<div class="span12">
						<div class="login-container">
							<div class="row-fluid">
								<div class="center">
<!-- ==== load app here==== -->

<?php 
$execute_app = new MAjax();
$execute_app->is_appli = true;
$execute_app->default_app = Mreq::tg('_tsk') != "0" ? Mreq::tg('_tsk') : 'login';
$execute_app->load();
//applic::load(1,0);
?>
                           
                                </div><!--/position-relative-->
                            </div>
						</div>
					</div><!--/.span-->
				</div><!--/.row-fluid-->
			</div>
		</div><!--/.main-container-->
<!-- ======== -->

  </body>
</html>
コード例 #18
0
ファイル: addtask_c.php プロジェクト: rachidkada/MRN_PRO
        $empty_list .= "<li>Nom de l'application</li>";
        $checker = 1;
    }
    if ($posted_data['description'] == NULL) {
        $empty_list .= "<li>Déscription</li>";
        $checker = 1;
    }
    if ($posted_data['app_sys'] == NULL) {
        $empty_list .= "<li>Type de l'Application</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_modul = new Mmodul($posted_data);
    //$new_modul->exige_pkg = true;
    //execute Insert returne false if error
    if ($new_modul->save_new_task()) {
        echo "1#" . $new_modul->log;
    } else {
        echo "0#" . $new_modul->log;
    }
} else {
    //check if the modul is the right one
    if (md5(Mreq::tp('id')) != Mreq::tp('idc')) {
        exit('3#<br>Les informations pour cette ligne sont erronées contactez l\'administrateur');
    }
    view::load('modul_mgr', 'addtask');
}
コード例 #19
0
ファイル: actionuser_c.php プロジェクト: ATS001/MRN
<ul class="dropdown-menu dropdown-menu-right">
<?php 
$actions = new Musers();
$actions->id_user = Mreq::tp('id');
$actions->action_user();
?>
<!-- <li>
	    <a href="#" class="this_url" redi="user" data="id=%id%" rel="edituser" item="%id%" >
			<i class="ace-icon fa fa-pencil bigger-100"></i> Afficher contrat
		</a>
</li> -->
</ul>
コード例 #20
0
ファイル: upload_c.php プロジェクト: ATS001/MRN
<?php

if (Mreq::tp('upld') == 1) {
    $fileid = Mreq::tp('fileID');
    $handle = new Mupload();
    if ($handle->upload($_FILES[$fileid])) {
        $handle->file_max_size = '1000000000';
        $handle->Process('temp');
        $handle->stop_all = true;
        $handle->Clean();
    } else {
        echo '  Error2: ' . $handle->error . '';
    }
} elseif (Mreq::tp('del') == 1) {
    $handle = new Mupload();
    $handle->stop_all = true;
    $handle->delete_file(Mreq::tp('f'));
}
コード例 #21
0
ファイル: errorjs_c.php プロジェクト: ATS001/MRN
<?php

if (Mreq::tg('_tsk') == 'errorjs' && Mreq::tg('noscript') == 0) {
    //exit(Mreq::tg('noscript').' 1');
    header('location:./');
} else {
    //exit(Mreq::tg('noscript').' 2');
    $session = new session();
    if (!$session->stop()) {
        return false;
    } else {
        view::load('ajax', 'errorjs');
    }
}
コード例 #22
0
ファイル: actionlangue_c.php プロジェクト: rachidkada/MRN_PRO
<ul class="dropdown-menu dropdown-menu-right">
<?php 
$actions = new Mlangue();
$actions->id_langue = Mreq::tp('id');
$actions->action_langue();
?>
</ul>
コード例 #23
0
ファイル: editlangue_c.php プロジェクト: rachidkada/MRN_PRO
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('id' => Mreq::tp('id'), 'lang' => Mreq::tp('lang'), 'ide' => Mreq::tp('ide'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['lang'] == NULL) {
        $empty_list .= "<li>Nom de la Lanue</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_langue = new Mlangue($posted_data);
    $new_langue->id_langue = $posted_data['id'];
    //execute Insert returne false if error
    if ($new_langue->edit_langue()) {
        echo "1#" . addslashes($new_langue->log);
    } else {
        echo "0#" . addslashes($new_langue->log);
    }
} else {
    view::load('langue', 'editlangue');
}
コード例 #24
0
ファイル: addmodul_c.php プロジェクト: rachidkada/MRN_PRO
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('modul' => Mreq::tp('modul'), 'description' => Mreq::tp('description'), 'app' => Mreq::tp('app'), 'sbclass' => Mreq::tp('sbclass'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['modul'] == NULL) {
        $empty_list .= "<li>Nom de module</li>";
        $checker = 1;
    }
    if (!MInit::is_regex($posted_data['modul'])) {
        $empty_list .= "<li>Nom de module non valid (a-z 1-9)</li>";
        $checker = 1;
    }
    if ($posted_data['description'] == NULL) {
        $empty_list .= "<li>Déscription</li>";
        $checker = 1;
    }
    if ($posted_data['app'] == NULL) {
        $empty_list .= "<li>Nom de l'application de base</li>";
        $checker = 1;
    }
    if (!MInit::is_regex($posted_data['app'])) {
        $empty_list .= "<li>Nom de l'application non valid (a-z 1-9)</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
コード例 #25
0
ファイル: addmodul_c.php プロジェクト: ATS001/MRN
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('modul' => Mreq::tp('modul'), 'description' => Mreq::tp('description'), 'app_modul' => Mreq::tp('app_modul'), 'pkg_id' => Mreq::tp('pkg-id'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['modul'] == NULL) {
        $empty_list .= "<li>Nom de module</li>";
        $checker = 1;
    }
    if ($posted_data['description'] == NULL) {
        $empty_list .= "<li>Déscription</li>";
        $checker = 1;
    }
    if ($posted_data['app_modul'] == NULL) {
        $empty_list .= "<li>Application de base</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_modul = new Mmodul($posted_data);
    //$new_modul->exige_pkg = true;
    //execute Insert returne false if error
    if ($new_modul->save_new_modul()) {
        echo "1#" . $new_modul->log;
    } else {
コード例 #26
0
ファイル: listtask_c.php プロジェクト: rachidkada/MRN_PRO
//SELECT `fnom`, `lnom`, `servic`,`active` FROM `users_sys`
//define index of column
$columns = array(0 => 'id', 1 => 'dscrip', 2 => 'file');
//Format all variables
$colms = $tables = $joint = $where = $sqlTot = $sqlRec = "";
// define used table.
$tables .= " task, modul ";
// define joint and rtable elation start always with 'WHERE'
$joint .= " WHERE task.modul = modul.id ";
// set sherched columns.(the final colm without comma)
$colms .= " task.id, ";
//$colms .= " CONCAT('<div class=\"user\"><img class=\"nav-user-photo\" alt=\"\" src=\"./upload/useres/',users_sys.id,'/',MD5(users_sys.photo),'48x48.png\"></div>') as photo, ";
$colms .= " task.dscrip, ";
$colms .= " CONCAT(task.rep,'-',task.file) as file ";
//default where";
$where .= "AND modul.id = " . Mreq::tp('id');
// check search value exist
if (!empty($params['search']['value'])) {
    $serch_value = str_replace('+', ' ', $params['search']['value']);
    //Format where in case joint isset
    $where .= $joint == "" ? " WHERE " : " AND ";
    $where .= " task.file LIKE '%" . $serch_value . "%' ";
    $where .= " OR task.rep LIKE '%" . $serch_value . "%' ";
    $where .= " OR  task.id LIKE '%" . $serch_value . "%' ";
}
// getting total number records without any search
$sql = "SELECT {$colms}  FROM  {$tables} {$joint} ";
$sqlTot .= $sql;
$sqlRec .= $sql;
//concatenate search sql if value exist
if (isset($where) && $where != '') {
コード例 #27
0
ファイル: editmodul_c.php プロジェクト: rachidkada/MRN_PRO
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('modul' => Mreq::tp('modul'), 'description' => Mreq::tp('description'), 'app' => Mreq::tp('app'), 'sbclass' => Mreq::tp('sbclass'), 'id' => Mreq::tp('id'), 'id_checker' => Mreq::tp('id_checker'), 'id_app' => Mreq::tp('id_app'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['id_checker'] != MInit::cryptage($posted_data['id'], 1)) {
        $empty_list .= "<li>Le ID n'est pas Valid</li>";
        $checker = 1;
    }
    if ($posted_data['modul'] == NULL) {
        $empty_list .= "<li>Nom de module</li>";
        $checker = 1;
    }
    if (!MInit::is_regex($posted_data['modul'])) {
        $empty_list .= "<li>Nom de module non valid (a-z 1-9)</li>";
        $checker = 1;
    }
    if ($posted_data['description'] == NULL) {
        $empty_list .= "<li>Déscription</li>";
        $checker = 1;
    }
    if ($posted_data['app'] == NULL) {
        $empty_list .= "<li>Nom de l'application de base</li>";
        $checker = 1;
    }
    if (!MInit::is_regex($posted_data['app'])) {
        $empty_list .= "<li>Nom de l'application non valid (a-z 1-9)</li>";
        $checker = 1;
コード例 #28
0
ファイル: Cookie.class.php プロジェクト: ATS001/MRN
 public static function auto_lastexec($field)
 {
     if (!isset($_SESSION[$field]) or Mreq::tg('tik') == 0) {
         $_SESSION[$field] = time();
     }
 }
コード例 #29
0
ファイル: actionmodul_c.php プロジェクト: ATS001/MRN
<ul class="dropdown-menu dropdown-menu-right">
<?php 
$actions = new Mmodul();
$actions->id_modul = Mreq::tp('id');
$actions->action_modul();
?>
</ul>
コード例 #30
0
ファイル: addlangue_c.php プロジェクト: rachidkada/MRN_PRO
<?php

if (MInit::form_verif(false)) {
    $posted_data = array('lang' => Mreq::tp('lang'));
    //Check if array have empty element return list
    //for acceptable empty field do not put here
    $checker = null;
    $empty_list = "Les champs suivants sont obligatoires:\n<ul>";
    if ($posted_data['lang'] == NULL) {
        $empty_list .= "<li>Nom de la Langue</li>";
        $checker = 1;
    }
    $empty_list .= "</ul>";
    if ($checker == 1) {
        exit("0#{$empty_list}");
    }
    //End check empty element
    $new_langue = new Mlangue($posted_data);
    //execute Insert returne false if error
    if ($new_langue->save_new_langue()) {
        echo "1#" . $new_langue->log;
    } else {
        echo "0#" . $new_langue->log;
    }
} else {
    view::load('langue', 'addlangue');
}