Go to the documentation of this file.
22 if (!defined(
'NOTOKENRENEWAL')) {
23 define(
'NOTOKENRENEWAL',
'1');
25 if (!defined(
'NOREQUIREHTML')) {
26 define(
'NOREQUIREHTML',
'1');
28 if (!defined(
'NOREQUIREAJAX')) {
29 define(
'NOREQUIREAJAX',
'1');
31 if (!defined(
'NOREQUIRESOC')) {
32 define(
'NOREQUIRESOC',
'1');
34 if (!defined(
'NOCSRFCHECK')) {
35 define(
'NOCSRFCHECK',
'1');
38 if (!defined(
'NOREQUIREMENU')) {
39 define(
'NOREQUIREMENU',
'1');
42 if (!defined(
"NOLOGIN")) {
43 define(
"NOLOGIN",
'1');
45 if (!defined(
'NOIPCHECK')) {
46 define(
'NOIPCHECK',
'1');
48 if (!defined(
'NOBROWSERNOTIF')) {
49 define(
'NOBROWSERNOTIF',
'1');
51 include
'../../main.inc.php';
53 $action =
GETPOST(
'action',
'aZ09');
54 $idticketgroup =
GETPOST(
'idticketgroup',
'aZ09');
55 $idticketgroup =
GETPOST(
'idticketgroup',
'aZ09');
56 $lang =
GETPOST(
'lang',
'aZ09');
69 if ($action ==
"getKnowledgeRecord") {
71 $sql =
"SELECT kr.rowid, kr.ref, kr.question, kr.answer,kr.url,ctc.code";
72 $sql .=
" FROM ".MAIN_DB_PREFIX.
"knowledgemanagement_knowledgerecord as kr ";
73 $sql .=
" JOIN ".MAIN_DB_PREFIX.
"c_ticket_category as ctc ON ctc.rowid = kr.fk_c_ticket_category";
74 $sql .=
" WHERE ctc.code = '".$db->escape($idticketgroup).
"'";
75 $sql .=
" AND ctc.active = 1 AND ctc.public = 1 AND (kr.lang = '".$db->escape($lang).
"' OR kr.lang = 0 OR kr.lang IS NULL)";
76 $sql .=
" AND kr.status = 1 AND (kr.answer IS NOT NULL AND kr.answer <> '')";
79 $num = $db->num_rows(
$resql);
83 $obj = $db->fetch_object(
$resql);
84 $response[] = array(
'title'=>$obj->question,
'ref'=>$obj->ref,
'answer'=>
dol_escape_htmltag(preg_replace(
'/\\r|\\r\\n|\\n/',
"", $obj->answer)),
'url'=>$obj->url);
90 $response =json_encode($response);
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.