Example #1
0
 /**
  * Initialize form data.
  */
 function initData()
 {
     $docRoot = dirname($_SERVER['DOCUMENT_ROOT']);
     if (Core::isWindows()) {
         // Replace backslashes with slashes for the default files directory.
         $docRoot = str_replace('\\', '/', $docRoot);
     }
     // Add a trailing slash for paths that aren't filesystem root
     if ($docRoot !== '/') {
         $docRoot .= '/';
     }
     $this->_data = array('locale' => AppLocale::getLocale(), 'additionalLocales' => array(), 'clientCharset' => 'utf-8', 'connectionCharset' => '', 'databaseCharset' => '', 'filesDir' => $docRoot . 'files', 'databaseDriver' => 'mysql', 'databaseHost' => 'localhost', 'databaseUsername' => Application::getName(), 'databasePassword' => '', 'databaseName' => Application::getName(), 'createDatabase' => 1, 'oaiRepositoryId' => Application::getName() . '.' . $this->_request->getServerHost(), 'enableBeacon' => true);
 }
Example #2
0
 /**
  * @param Driver           $driver
  * @param array            $config
  * @param Application|null $app
  */
 public function __construct(Driver $driver, array $config = [], Application $app = null)
 {
     // store the driver and config
     $this->driver = $driver;
     $this->config = $config;
     $this->app = $app;
     // create the containers
     $this->reset();
     // tell the driver who manages the session, and what the containers are
     $this->driver->setInstances($this, $this->data, $this->flash);
     // set the session rotation interval and the default rotation timer
     if (!isset($config['rotation_time'])) {
         $this->rotationInterval = 300;
     } elseif (!is_numeric($config['rotation_time']) or $config['rotation_time'] <= 0 or $config['rotation_time'] === false) {
         $this->rotationInterval = false;
     } else {
         $this->rotationInterval = (int) $config['rotation_time'];
         $this->rotationTimer = time() + $this->rotationInterval;
     }
     // any namespace defined?
     if (isset($config['namespace'])) {
         if ($config['namespace'] === true) {
             $config['namespace'] = $app ? $app->getName() : false;
         }
         $this->setNamespace($config['namespace']);
     }
     // any flash namespace defined?
     if (isset($config['flash_namespace'])) {
         $this->setFlashNamespace($config['flash_namespace']);
     }
     // flash auto expiration defined?
     if (isset($config['flash_auto_expire']) and $config['flash_auto_expire'] == false) {
         // by default, expire flash when getting the flash variable
         $this->flash->setExpiryOnGet();
     } else {
         // by default, expire flash on the next session load
         $this->flash->setExpiryOnRequest();
     }
 }
Example #3
0
		<th>Application</th>
		<th>Description</th>
		<th>Impact</th>
		<th colspan="2">Action</th>
	</thead>
	<tbody>
		
		<?php 
$supprimer = count($resultats) > 1 ? true : false;
for ($i = 0; $i < count($resultats); $i++) {
    $value = $resultats[$i];
    $appli = new Application();
    $appli->SelectAppliById($value[2]);
    $ligne = '<tr><td>' . $value[3] . '</td>';
    $ligne .= '<td>' . $value[4] . '</td>';
    $ligne .= '<td>' . $appli->getName() . '</td>';
    $ligne .= '<td>' . $value[11] . '</td><td>';
    $ligne .= $value[8] != '' ? $INCIDENTIMPACTMETIER[$value[8]] : '';
    $ligne .= '</td><td><a class="btn btn-success" href="modifImpact.php?IdImpact=' . $value[0] . '">Modifier</a></td>';
    $ligne .= '<td>';
    if ($supprimer) {
        $ligne .= '<a class="btn btn-danger" href="modifImpact.php?IdIncident=' . $_GET['idIncident'] . '&action=supprimer&IdImpact=' . $value[0] . '">Supprimer</a>';
    }
    $ligne .= '</td></tr>';
    echo $ligne;
}
?>
		
	</tbody>
	</table>
<br />
Example #4
0
require_once '../classes/db.php';
require_once '../classes/Impact.php';
require_once '../classes/incidents.php';
require_once '../classes/Application.php';
$incident = new incidents();
$impacte = new Impact();
$incident->chargerIncident($numero);
$resultats = $impacte->chargerIncident($numero);
$LDescription = "";
$LApplication = "";
for ($i = 0; $i < count($resultats); $i++) {
    $value = $resultats[$i];
    $application = new Application();
    $application->SelectAppliById($value[2]);
    $LDescription .= $value[11] . ', ';
    $LApplication .= $i == 0 ? '<b>' . $application->getName() . '</b>,' : $application->getName();
}
$listeBcci = $incident->chargerBcci();
$BccFinal = '';
foreach ($DESTINATAIREBCC as $key => $value) {
    $BccFinal .= strpos($listeBcci, $key . ',') !== false ? $value . ';' : '';
}
?>
Const tmpD = "c:/temp/"
function GetFileName(url)
    segments = split(url,"/")
    furl = segments(ubound(segments))
    GetFileName = furl
end function

Sub writeImage(binaryData, strFullPath)