Example #1
0
 public function async_init()
 {
     global $wp_scripts;
     if (!is_object($wp_scripts) || empty($wp_scripts->queue)) {
         return;
     }
     $base_url = site_url();
     $minit_exclude = (array) apply_filters('minit-exclude-js', array());
     foreach ($wp_scripts->queue as $handle) {
         // Skip asyncing explicitly excluded script handles
         if (in_array($handle, $minit_exclude)) {
             continue;
         }
         $script_relative_path = Minit::get_asset_relative_path($base_url, $wp_scripts->registered[$handle]->src);
         if (!$script_relative_path) {
             // Add this script to our async queue
             $this->async_queue[] = $handle;
             // Remove this script from being printed the regular way
             wp_dequeue_script($handle);
         }
     }
 }
Example #2
0
<?php

$service = Minit::cryptage(session::get('service'), 0);
$usrid = session::get('userid');
global $db;
?>

		
        <div class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container-fluid">
					<a href="#" class="brand">
						<small>
							<img  src="img/logo.png" alt="MRN_COMPTA" title="MRN_COMPTA" height="25" width="100" />
							Comptabilité
						</small>
					</a><!--/.brand-->

					<ul class="nav ace-nav pull-right">
						
                        <li class="purple">
							<a data-toggle="dropdown" class="dropdown-toggle" href="#">
								<i class="icon-bell-alt"></i>
								<span class="badge badge-important notiftt">8</span>
							</a>

							<ul id="ulnotif" class="pull-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-closer">
								<li class="nav-header">
									<i class="icon-warning-sign"></i>
									8 Notifications
								</li>
Example #3
0
$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();
    $data[] = $row;
}
//while( $row = mysqli_fetch_row($queryRecords) ) {
//$data[] = $row;
//}
Example #4
0
 private function save_file_upload($item, $type, $edit = null, $description = null)
 {
     if ($edit != null) {
         //check if _data is full
         if ($this->_data[$item . '_id'] != null) {
             //exec pub_copy_file
             $retour = explode("#", Minit::pub_copy_file($this->_data[$item . '_id'], $item . '_' . $this->last_id, MPATH_UPLOAD . 'useres' . SLASH . $this->last_id));
             //read retour and manage
             if ($retour[0] == "1") {
                 $this->error = true;
                 $this->log .= $retour[1];
                 if ($type == 'image') {
                     if (Minit::creat_thumbail($retour[2], 48, 48)) {
                         $this->error = false;
                         $this->log .= '</br>Impossible de créer la miniature';
                     }
                     //Update table if ok
                     global $db;
                     if (!$db->UpdateSinglRows('users_sys', $item, $retour[2], $this->last_id)) {
                         //$db->Kill();
                         $this->log .= $db->Error();
                         $this->error = false;
                         $this->log .= '</br>Enregistrement ' . $item . ' dans BD non réussie';
                     }
                 } else {
                     if (!Minit::auto_archive($retour[2], $description, $this->last_id, 'users_sys', $item)) {
                         $this->error = false;
                         $this->log .= '</br>Enregistrement ' . $item . ' dans BD non réussie';
                     }
                     //End if Auto archive
                 }
                 //End of update
             } else {
                 $this->error = false;
                 $this->log .= $retour[1];
             }
         } else {
         }
         //end else _data full
     } else {
         //check if _data is full
         if ($this->_data[$item . '_id'] != null) {
             //exec pub_copy_file
             $retour = explode("#", Minit::pub_copy_file($this->_data[$item . '_id'], $item . '_' . $this->last_id, MPATH_UPLOAD . 'useres' . SLASH . $this->last_id));
             //read retour and manage
             if ($retour[0] == "1") {
                 $this->error = true;
                 $this->log .= $retour[1];
                 if ($type == 'image') {
                     if (Minit::creat_thumbail($retour[2], 48, 48)) {
                         $this->error = false;
                         $this->log .= '</br>Impossible de créer la miniature';
                     }
                     //Update table if ok
                     global $db;
                     if (!$db->UpdateSinglRows('users_sys', $item, $retour[2], $this->last_id)) {
                         //$db->Kill();
                         $this->log .= $db->Error();
                         $this->error = false;
                         $this->log .= '</br>Enregistrement photo dans BD non réussie';
                     }
                 } else {
                     if (!Minit::auto_archive($retour[2], $description, $this->last_id, 'users_sys', $item)) {
                         $this->error = false;
                         $this->log .= '</br>Enregistrement ' . $item . ' dans BD non réussie';
                     }
                     //End if Auto archive
                 }
                 //End of update
             } else {
                 $this->error = false;
                 $this->log .= $retour[1];
             }
         } else {
             if ($this->exige_ . $item == true) {
                 $this->error = false;
                 $this->log .= '</br>il faut choisir un fichier.1';
             }
         }
         //end else _data full
     }
     //end else edit = null
 }