Example #1
0
            // Force only one replacement to permit multiple use of the same condition
            if ($condition_ok) {
                // Do IF
                $string = preg_replace($regex_if, "\\1", $string, 1);
                $string = preg_replace($regex_else, "", $string, 1);
            } else {
                // Do ELSE
                $string = preg_replace($regex_if, "", $string, 1);
                $string = preg_replace($regex_else, "\\1", $string, 1);
            }
        }
    }
    return $string;
}
echo "<div class='center'>" . "\n\r";
$helpdesk = new PluginFormcreatorHelpdesk();
$formID = $_REQUEST['id'];
$form = new PluginFormcreatorForm();
$form->getFromDB($formID);
$tableau_beneficiary_name = "";
$targets = $helpdesk->getTarget($formID);
foreach ($targets as $target_id => $target_value) {
    $ticket = array();
    $validation_exist = false;
    $validationTab = array();
    $cpt_valid = 0;
    $ticket['entities_id'] = $form->fields['entities_id'];
    $ticket['urgency'] = $target_value['urgency'];
    $ticket['priority'] = $target_value['priority'];
    $ticket['itilcategories_id'] = $target_value['itilcategories_id'];
    $ticket['name'] = $target_value['name'];
Example #2
0
<?php

include '../../../inc/includes.php';
//anonyme or not ?
Session::checkLoginUser();
//onload
$helpdesk = new PluginFormcreatorHelpdesk();
$formID = $_GET['form'];
$verifQuestion = $helpdesk->getQuestionByForm($formID);
if (!empty($verifQuestion)) {
    $cache = "\"";
    $affiche = "\"";
    foreach ($verifQuestion as $question_id => $question_value) {
        $x = $y = 0;
        if ($question_value['type'] == 8) {
            $tab = PluginFormcreatorQuestion::_unserialize($question_value['data']);
            foreach ($tab['value'] as $value_id => $value) {
                if ($x != 0) {
                    $cache .= $helpdesk->creationTabDyna($tab['question'][$value_id]);
                    if (strlen($cache) > 2) {
                        $cache .= ":";
                    }
                } else {
                    if (isset($tab['question'][$value_id])) {
                        $affiche .= $helpdesk->creationTabDyna($tab['question'][$value_id]);
                        if (strlen($affiche) > 2) {
                            $affiche .= ":";
                        }
                    }
                    $x = 1;
                }