$cur_r = 1; } eval("\$" . "r_" . $modules[$i]['module_id'] . " = \$" . "cur_r;"); eval("\$" . "w_" . $modules[$i]['module_id'] . " = \$" . "cur_w;"); } } // endif post submit if ($submitOK && $configArray['rightWrite']) { $updateUserANCS = "UPDATE conturi_admin SET " . "nume = '" . mysql_escape_string($nume) . "', " . "prenume = '" . mysql_escape_string($prenume) . "', " . "email = '" . mysql_escape_string($email) . "', " . "parola = '" . mysql_escape_string($parola) . "', " . "cont_tip = '" . mysql_escape_string($cont_tip) . "' " . "WHERE id = " . $_ID . ""; //echo $updateUserANCS; exit(); if (!mysql_query($updateUserANCS, $configArray['dbcnx'])) { echo 'eroare la update 1'; } else { echo ''; } $accesModules = getQueryInArray("SELECT * FROM mm_cont_modul cm WHERE cm.id_cont = " . intval($_ID) . " ORDER BY id_modul ASC"); for ($i = 0; $i < count($modules); $i++) { eval("\$" . "cur_r = \$" . "r_" . $modules[$i]['module_id'] . ";"); eval("\$" . "cur_w = \$" . "w_" . $modules[$i]['module_id'] . ";"); if (checkArrayValue($accesModules, 'id_modul', $modules[$i]['module_id'])) { updateTable("UPDATE mm_cont_modul SET r = " . intval($cur_r) . ", w = " . intval($cur_w) . " WHERE id_cont = " . intval($_ID) . " AND id_modul = " . intval($modules[$i]['module_id']) . ""); } else { insertIntoTable("INSERT INTO mm_cont_modul SET r = " . intval($cur_r) . ", w = " . intval($cur_w) . ", id_cont = " . intval($_ID) . ", id_modul = " . intval($modules[$i]['module_id']) . ""); } } //endfor $insertLog = "INSERT INTO log SET " . "data = NOW(), " . "obs = 'ACTUALIZARE CONT - DUPA AUTENTIFICARE', " . "ip = '" . get_ip_address() . "', " . "query = '" . mysql_real_escape_string($updateUserANCS) . "' " . ""; if (!mysql_query($insertLog, $configArray['dbcnx'])) { echo $insertLog . ' eroare la adaugare 2'; } else { echo '';
echo $_DATA[0]['added_at']; ?> </td> </tr> <tr> <td align="left" valign="top">Modificari:</td> <td align="left" valign="top" class="" style="width:100%; font-size:12px;"><?php echo $_DATA[0]['change_log']; ?> </td> </tr> <tr> <td align="left" valign="top">Sesizari similare:</td> <td align="left" valign="top" class="" style="width:100%; font-size:12px;"> <?php $_SIMILAR = getQueryInArray("SELECT sesizare_id, sesizare_titlu FROM sesizari WHERE deleted = 0 AND sesizare_titlu LIKE '%" . $_DATA[0]['sesizare_titlu'] . "%' AND sesizare_id <> " . intval($_DATA[0]['sesizare_id']) . " "); for ($i = 0; $i < count($_SIMILAR); $i++) { print '<a href="sesizari_edit.php?id=' . $_SIMILAR[$i]['sesizare_id'] . '">' . $_SIMILAR[$i]['sesizare_titlu'] . '</a><br />'; } //endfor $_SIMILAR if (!count($_SIMILAR)) { print '-'; } ?> </td> </tr> <tr> <td align="left" valign="top"><img src="images/spacer.gif" width="200" height="1" border="0" alt="" /></td> <td align="left" valign="top" class="error"></td> </tr>
echo "Cannot include a file."; exit; } $sBasePath = $_SERVER['PHP_SELF']; $sBasePath = substr($sBasePath, 0, strpos($sBasePath, 'texte_site')); $sBasePath .= "fckeditor/"; $configArray['currentModule'] = 'texte_site'; $_GET['id'] = $_ID = intval($_GET['id']); if ($_ID <= 0) { redirect('index.php?msg=2'); } pageHeader(); //DB SELECT FROM STRUCT intranetDBConnect(); $QRY = 'SELECT * FROM pages WHERE page_id = ' . $_ID . ' LIMIT 1 '; $_DATA = getQueryInArray($QRY, $configArray['STRUCTdbcnx']); if (!count($_DATA)) { redirect('index.php?msg=3'); } ?> <div class="subTable"> <table cellpadding="0" cellspacing="0" class="T-top"> <tr> <td class="w100"><h1><img src="images/userpic_default.jpg" width="48" height="48" border="0" align="left" style="margin-right:10px;" />Modifica text site</h1> <div class="Dcontainer"> <br /> <?php $submitOK = true; if (!isset($_POST['submit']) || $_POST['submit'] == '') {
echo 'Nu am putut include un fisier.2'; exit; } pageHeader(); $submitOK = true; if (!isset($_POST['submit']) || $_POST['submit'] == '') { $submitOK = false; $email = trim($_POST['email']); } else { $email = trim($_POST['email']); if (isset($email) && $email != '') { if (!validate_email($email)) { $submitOK = false; $error_msg['email'] = 'Adresa de email invalida!'; } else { $checkEmail = getQueryInArray("SELECT * FROM conturi_admin c WHERE email='" . mysql_escape_string($email) . "' AND c.activ=1 LIMIT 1"); if (!count($checkEmail)) { $submitOK = false; $error_msg['email'] = 'Aceasta adresa de email nu exista in baza noastra de date.'; } } } else { $submitOK = false; $error_msg['email'] = 'Adresa de email este obligatorie!'; } } // endif post submit ?> <div class="subTable">
<?php require_once 'includes/config.php'; $sesizare_id = intval($_GET['s']); $_SESIZARE = getQueryInArray("SELECT * FROM sesizari WHERE validated = 1 AND deleted = 0 AND sesizare_id = :sesizare_id LIMIT 1", array('sesizare_id' => $sesizare_id)); if (!count($_SESIZARE)) { redirect(add_querystring_var($config['siteURL'], 'm', '102')); } $_CATEGORII_SESIZARE = getQueryInArray("SELECT c.* FROM mm_categs_sesizari mc JOIN categories c ON mc.categ_id = c.categ_id WHERE mc.sesizare_id = :sesizare_id", array('sesizare_id' => $sesizare_id)); $_LINKURI_SESIZARE = getQueryInArray("SELECT l.* FROM mm_sesizari_linkuri l WHERE l.sesizare_id = :sesizare_id AND l.link_sursa <> '' ", array('sesizare_id' => $sesizare_id)); $_IMAGINI_SESIZARE = getQueryInArray("SELECT i.* FROM mm_sesizari_images i WHERE i.sesizare_id = :sesizare_id ", array('sesizare_id' => $sesizare_id)); $_CODURI_EMBED = getQueryInArray("SELECT e.* FROM mm_sesizari_embeds e WHERE e.sesizare_id = :sesizare_id AND e.embed_sursa <> '' ", array('sesizare_id' => $sesizare_id)); $config['currentMenuSection'] = 'index'; $config['currentSubMenuSection'] = 'sesizare'; pageHeader(); ?> <div class="container_12"> <div class="grid_7"> <h1><?php echo '<a href="' . getSesizareURL($_SESIZARE[0]['sesizare_id']) . '">' . $_SESIZARE[0]['sesizare_titlu'] . '</a>'; ?> </h1> <div class="icon_time"></div><div class="sesizareMeta"><?php echo getDataOraNice($_SESIZARE[0]['data_ora']); ?> </div> <div class="icon_location"></div><div class="sesizareMeta"><?php echo getLocationNice($_SESIZARE[0]['location_search'], $_SESIZARE[0]['location_reverse']); ?>
function pageHeader() { global $configArray; global $_tableDesc; verifyLogin(); //if($_SESSION['userIdConturi'] == 129) { if (isset($_SESSION['userId']) && $_SESSION['userId'] >= 0) { //get rights for current module $getCurrentModuleRights = getQueryInArray("SELECT * FROM mm_cont_modul cm JOIN modules m ON m.module_id = cm.id_modul WHERE m.module_slug = '" . $configArray['currentModule'] . "' AND cm.id_cont = " . $_SESSION['userId'] . " LIMIT 1"); if (count($getCurrentModuleRights)) { $configArray['rightRead'] = intval($getCurrentModuleRights[0]['r']); $configArray['rightWrite'] = intval($getCurrentModuleRights[0]['w']); } else { $configArray['rightRead'] = 0; $configArray['rightWrite'] = 0; } //redirect //echo($configArray['currentModule'].': '.$configArray['rightRead'].' '.$configArray['rightWrite']); if (!$configArray['rightRead'] && !stristr(strtolower($_SERVER['SCRIPT_NAME']), 'index.php')) { redirect('index.php?msg=7'); } } //endif logged // } ?> <!DOCTYPE html> <html lang="ro"> <head> <meta charset="utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta content="text/html;charset=utf-8" http-equiv="Content-Type"> <meta content="utf-8" http-equiv="encoding"> <title>Harta FreeEx Admin</title> <link href="css/reset.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="css/menu.css" rel="stylesheet" type="text/css" /> <?php if (!$configArray['noHeader']) { ?> <script type="text/javascript" src="js/menu.js"></script> <script type="text/javascript" language="javascript" src="js/lytebox.js"></script> <link rel="stylesheet" href="css/lytebox.css" type="text/css" media="screen" /> <link rel="stylesheet" href="openlayers/theme/default/style.css" type="text/css"/> <?php } //noheader ?> <?php if ($configArray['prototypeOn']) { ?> <script type="text/javascript" language="javascript" src="js/prototype.js"></script> <script type="text/javascript" language="javascript" src="js/scriptaculous.js"></script> <script type="text/javascript" language="javascript" src="js/effects.js"></script> <script type="text/javascript" language="javascript" src="js/controls.js"></script> <?php } else { ?> <?php /*?><script type="text/javascript" src="js/jquery-1.2.3.js"></script><?php */ ?> <script src="//code.jquery.com/jquery-2.0.3.min.js"></script> <script src="3rdparty/ckeditor/ckeditor.js"></script> <script src="3rdparty/ckeditor/adapters/jquery.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="css/jquery-ui-timepicker-addon.css"/ > <script src="js/jquery-ui.js"></script> <script src="js/datepicker-ro.js"></script> <script type="text/javascript" src="js/jquery-ui-timepicker-addon.js"></script> <script type="text/javascript" src="openlayers/lib/OpenLayers.js"></script> <script type="text/javascript" src="js/tooltip1.js"></script> <?php } ?> <style type="text/css"> img, div { behavior: url(css/iepngfix.htc) } </style> <script type="text/javascript" src="js/iepngfix_tilebg.js"></script> <script type="text/javascript" src="js/script.js?r=<?php echo rand(0, 1000000); ?> "></script> <link rel="stylesheet" type="text/css" href="js/jscal2/css/jscal2.css" /> <link rel="stylesheet" type="text/css" href="js/jscal2/css/border-radius.css" /> <script type="text/javascript" src="js/jscal2/js/jscal2.js"></script> <script type="text/javascript" src="js/jscal2/js/lang/ro.js"></script> <?php $bodyExtraAttb = ''; ?> <?php if ($configArray['currentMenuSection'] == 'sesizare_add') { $bodyExtraAttb = ' onload="initAdauga()"'; } ?> <?php if ($configArray['currentMenuSection'] == 'sesizare_edit') { $bodyExtraAttb = ' onload="initEdit()"'; } ?> </head> <body<?php echo $bodyExtraAttb; ?> > <?php if (!$configArray['noHeader']) { ?> <table cellpadding="0" cellspacing="0" id="topTable"> <tr> <td valign="top" align="left" id="logoBox" class="w100"><a href="./" onmouseover="changeImages('logoancs', 'images/logo-over.gif'); return true;" onmouseout="changeImages('logoancs', 'images/logo.gif'); return true;" onmousedown="changeImages('logoancs', 'images/logo-over.gif'); return true;" onmouseup="changeImages('logoancs', 'images/logo-over.gif'); return true;"><img name="logoancs" src="images/logo.gif" width="275" height="59" border="0" alt="" /></a></td> <td valign="top" align="left" id="authBox"> <div class="authDiv"> <?php //login area printLoginArea(); ?> </div> </td> </tr> <tr> <td align="left" valign="top" class="w100" colspan="2" id="menuTD"> <div id="ancs_menu"> <?php generateMenuNew(); ?> </div> </td> </tr> <tr> <td align="left" valign="top" class="w100" colspan="2"> <div id="mainWrapper"> <?php } //noheader ?> <?php getSiteMsg($_GET['msg']); }
} else { $_tableDesc['orderColumn'] = 'c.id'; //default order $_tableDesc['orderColumnWay'] = 'DESC'; } if ($_tableDesc['orderColumn'] == "ip") { $_tableDesc['orderColumn'] = "sip"; } if ($_tableDesc['orderColumn'] == "activ") { $_tableDesc['orderColumn'] = "c.activ"; } $QRY .= " ORDER BY " . $_tableDesc['orderColumn'] . " " . $_tableDesc['orderColumnWay'] . ""; //echo '['.$_tableDesc['orderColumn'].' - '.$_tableDesc['orderColumnWay'].']'; //QRY //print $QRY; $_tableData = getQueryInArray($QRY); $_tableDesc['totalRecordsInTable'] = count($_tableData); ?> <div class="subTable"> <table cellpadding="0" cellspacing="0" class="T-top"> <tr> <td class="w100"><h1><?php echo $_tableDesc['title']; ?> </h1></td> <td> <div id="cautaBox"> <form method="get" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI'];
//Sesizare Categorii $selected_categs = array(); foreach ($_POST as $key => $value) { //just checkboxes if (begins_with($key, 'cb')) { $selected_categs[] = $value; } } if (!count($selected_categs)) { $formErr['selected_categs'] = 'Va rugam selectati cel putin o categorie!'; $addAlertaSubmitOK = 0; } //Process Insert Data if ($addAlertaSubmitOK) { //check if mail exists => overwrite categs $_USER_CHECK = getQueryInArray("SELECT alerta_id FROM alerte WHERE alerta_email = :alerta_email LIMIT 1", array('alerta_email' => $email)); if (count($_USER_CHECK)) { $alertaId = $_USER_CHECK[0]['alerta_id']; //delete old alerte categories (new ones will overwrite) deleteFromTable("DELETE FROM mm_categs_alerte WHERE alerta_id = :alerta_id ", array("alerta_id" => $alertaId)); } else { //Insert Alerta insertIntoTable("INSERT INTO alerte SET \n\t\t\t\t\t\t\t\t alerta_nume = :alerta_nume, \n\t\t\t\t\t\t\t\t alerta_email = :alerta_email,\n\t\t\t\t\t\t\t\t alerta_added_at = :alerta_added_at\n\t\t\t\t\t\t\t\t ", array("alerta_nume" => $nume, "alerta_email" => $email, "alerta_added_at" => date("Y-m-d H:i:s"))); $alertaId = $config['dbConnection']->lastInsertId(); } //insert $selected_categs in alerte for ($i = 0; $i < count($selected_categs); $i++) { insertIntoTable("INSERT INTO mm_categs_alerte SET alerta_id = :alerta_id, categ_id = :categ_id ", array("alerta_id" => $alertaId, "categ_id" => intval($selected_categs[$i]))); } //endfor $selected_categs //succes: refresh and message
global $configArray; $configArray['dbcnx'] = @mysql_connect($configArray['DBhostname'], $configArray['DBuserName'], $configArray['DBpassword']); if (!$configArray['dbcnx']) { echo "No server connection."; exit; } if (!mysql_select_db($configArray['DBname'])) { echo "No database connection."; exit; } mysql_query("set character_set_client='utf8'"); mysql_query("set character_set_results='utf8'"); mysql_query("set collation_connection='utf8_general_ci'"); } intranetDBConnect(); /*/////////////////////////////// END DB CONN /////////////////////////////////////////////////////////////////////// */ $configArray['lunileAnului'] = array("1" => "Ianuarie", "2" => "Februarie", "3" => "Martie", "4" => "Aprilie", "5" => "Mai", "6" => "Iunie", "7" => "Iulie", "8" => "August", "9" => "Septembrie", "10" => "Octombrie", "11" => "Noiembrie", "12" => "Decembrie"); $configArray['lunileAnuluiScurt'] = array("1" => "ian.", "2" => "feb.", "3" => "mar.", "4" => "apr.", "5" => "mai", "6" => "iun.", "7" => "iul.", "8" => "aug.", "9" => "sept.", "10" => "oct.", "11" => "nov.", "12" => "dec."); $configArray['zileleSapt'] = array("0" => "Duminica", "1" => "Luni", "2" => "Marti", "3" => "Miercuri", "4" => "Joi", "5" => "Vineri", "6" => "Sambata"); $configArray['prototypeOn'] = 0; $configArray['jqueryOn'] = 1; $configArray['rightRead'] = 1; $configArray['rightWrite'] = 1; $configArray['cont_admin_tipuri'][0]['id'] = 'superadmin'; $configArray['cont_admin_tipuri'][0]['name'] = 'Admin'; $configArray['cont_admin_tipuri'][1]['id'] = 'editor'; $configArray['cont_admin_tipuri'][1]['name'] = 'Editor'; $configArray['cont_admin_tipuri'][2]['id'] = 'contributor'; $configArray['cont_admin_tipuri'][2]['name'] = 'Contributor'; $configArray['categs'] = getQueryInArray("SELECT * FROM categories WHERE 1 ORDER BY categ_id ASC");
} else { echo 'Nu am putut include un fisier.'; exit; } $configArray['currentModule'] = 'conturi_admin'; pageHeader(); $_GET['id'] = $_ID = intval(intval($_SESSION['userId'])); //if($_ID <= 0) redirect('index.php?msg=2'); //DB SELECT FROM STRUCT intranetDBConnect(); $QRY = 'SELECT * FROM conturi_admin WHERE id = ' . $_ID . ' LIMIT 1 '; $_DATA = getQueryInArray($QRY, $configArray['STRUCTdbcnx']); if (!count($_DATA)) { redirect('index.php?msg=3'); } $modules = getQueryInArray("SELECT * FROM modules m ORDER BY module_id ASC"); ?> <div class="subTable"> <table cellpadding="0" cellspacing="0" class="T-top"> <tr> <td><h1><img src="images/userpic_default.jpg" width="48" height="48" border="0" align="left" style="margin-right:10px;" /><?php echo $_DATA[0]['prenume'] . ' ' . $_DATA[0]['nume']; ?> </h1> <div class="Dcontainer"> <br /> <?php $submitOK = true; if (!isset($_POST['submit']) || $_POST['submit'] == '') {
<div class="subTable"> <table cellpadding="0" cellspacing="0" class="T-top"> <tr> <td class="w100"><h1><img src="images/userpic_default.jpg" width="48" height="48" border="0" align="left" style="margin-right:10px;" />Modifica Alerta</h1> <div class="Dcontainer"> <br /> <?php $submitOK = true; if (!isset($_POST['submit']) || $_POST['submit'] == '') { $submitOK = false; $alerta_nume = trim($_DATA[0]['alerta_nume']); $alerta_email = trim($_DATA[0]['alerta_email']); //Alerte Categorii $selected_categs = array(); $_CATEGS = getQueryInArray("SELECT categ_id FROM mm_categs_alerte WHERE alerta_id = " . $_ID . ""); for ($i = 0; $i < count($_CATEGS); $i++) { $selected_categs[] = $_CATEGS[$i]['categ_id']; } } else { $alerta_nume = trim($_POST['alerta_nume']); if (strlen($alerta_nume) < 1) { $error['alerta_nume'] = 'Obligatoriu.'; $submitOK = false; } $alerta_email = trim($_POST['alerta_email']); if (validate_email($alerta_email)) { $error['alerta_email'] = 'Obligatoriu.'; $submitOK = false; } //Alerte Categorii
<?php require_once 'includes/config.php'; //get params $h = filter_var($_GET['h'], FILTER_SANITIZE_STRING); if (!strlen($h)) { redirect($config['siteURL']); } $_SESIZARE = getQueryInArray("SELECT * FROM sesizari WHERE deleted = 0 AND validation_code = :validation_code LIMIT 1", array('validation_code' => $h)); if (!count($_SESIZARE)) { redirect(add_querystring_var($config['siteURL'], 'm', '103')); } if ($_SESIZARE[0]['validated'] == 1) { redirect(add_querystring_var(getSesizareURL($_SESIZARE[0]['sesizare_id']), 'm', '104')); } else { //validare $updateTableStr = "UPDATE sesizari SET validated = :validated WHERE sesizare_id = :sesizare_id "; $updateTableArray = array('validated' => intval(1), 'sesizare_id' => $_SESIZARE[0]['sesizare_id']); updateTable($updateTableStr, $updateTableArray); //trimitere e-mail alerta catre abonati sendAlertsForSesizare($_SESIZARE[0]); //redirectare in pagina de sesizare + mesaj succes redirect(add_querystring_var(getSesizareURL($_SESIZARE[0]['sesizare_id']), 'm', '105')); }
$config['smtpEmail'] = '*****@*****.**'; $config['smtpName'] = 'Harta FreeEx'; /* $config['sendValidationRequestToEmail'] = '*****@*****.**'; $config['sendValidationRequestToName'] = 'Dan Birtas'; $config['sendValidationRequestCC'][0]['email'] = '*****@*****.**'; $config['sendValidationRequestCC'][0]['name'] = 'Dan Gmail'; */ $config['sendValidationRequestToEmail'] = '*****@*****.**'; $config['sendValidationRequestToName'] = 'Free Ex Activewatch'; $config['sendValidationRequestCC'][0]['email'] = '*****@*****.**'; $config['sendValidationRequestCC'][0]['name'] = 'user one'; $config['mailSignature'] = 'Echipa Activewatch FreeEx<br /><br />'; $config['siteURL'] = 'http://freeex.activewatch.ro/'; $config['filesUploadDir'] = '/path/to/uploads/'; $config['webUploadDir'] = $config['siteURL'] . 'uploads/'; //files where login is not required //$config['publicFiles'] = array('index.php'); $config['sesizare']['imgBig']['w'] = 300; $config['sesizare']['imgBig']['h'] = 200; $config['sesizare']['imgThumb']['w'] = 140; $config['sesizare']['imgThumb']['h'] = 70; $config['currentFile'] = basename(strtolower($_SERVER['SCRIPT_NAME'])); $config['currentMenuSection'] = 'index'; $config['messages'] = array(); $config['dbConnection'] = new PDO('mysql:dbname=' . $config['dbname'] . ';host=' . $config['dbserver'] . ';charset=utf8', $config['dbuser'], $config['dbpass'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); $config['dbConnection']->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); $config['dbConnection']->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $config['categs'] = getQueryInArray("SELECT * FROM categories WHERE 1 ORDER BY categ_id ASC", array()); $config['pages'] = getQueryInArray("SELECT * FROM pages WHERE 1 ORDER BY page_id ASC", array()); $config['time'] = time();
} if (strlen($date_start)) { $selectStr .= " AND data_ora >= '" . $date_start . " 00:00:00' "; } if (strlen($date_end)) { $selectStr .= " AND data_ora <= '" . $date_end . " 23:59:59'"; } if (strlen($q)) { $selectStr .= " AND ( sesizare_titlu LIKE :sesizare_titlu OR sesizare_descriere LIKE :sesizare_descriere )"; $qArray = array('sesizare_titlu' => '%' . $q . '%', 'sesizare_descriere' => '%' . $q . '%'); } else { $qArray = array(); } //echo $selectStr; print_nice($selected_categs); $selectStr .= " ORDER BY data_ora DESC"; $_SESIZARI = getQueryInArray($selectStr, $qArray); pageHeader(); ?> <form action="<?php echo $_SERVER['REQUEST_URI']; ?> " method="get" enctype="multipart/form-data" id="sendForm" class="noEnterSubmit"> <div class="container_12"> <div class="grid_3"> <div class="box"> <div class="boxTitle">Categorii</div> <div class="categsCheckBoxes"> <?php generateCategoriesCheckboxes($selected_categs); ?>
function sendAlertsForSesizare($_SESIZARE) { global $config; $_SESIZARE_ID = $_SESIZARE['sesizare_id']; //get categorii $_CATEGORII_SESIZARE = getQueryInArray("SELECT c.* FROM mm_categs_sesizari mc JOIN categories c ON mc.categ_id = c.categ_id WHERE mc.sesizare_id = :sesizare_id", array('sesizare_id' => $_SESIZARE_ID)); $categIdsStr = generateCommaSeparatedStringFromArrayColumn($_CATEGORII_SESIZARE, 'categ_id'); //get alert emails for categories in $_CATEGORII_SESIZARE if (count($_CATEGORII_SESIZARE)) { $_DESTINATARI_ALERTE = getQueryInArray("SELECT * FROM mm_categs_alerte ca JOIN alerte a ON ca.alerta_id = a.alerta_id WHERE ca.categ_id IN (" . $categIdsStr . ") GROUP BY a.alerta_email", array()); for ($i = 0; $i < count($_DESTINATARI_ALERTE); $i++) { sendSesizareAlertaToUser($_SESIZARE, $_DESTINATARI_ALERTE[$i]); } //endfor _DESTINATARI_ALERTE } }
echo 'Nu am putut include un fisier.'; exit; } $_QRY = "SELECT `email` FROM `parteneri` WHERE pos <> -1 AND proiect_id IN "; echo '<br><br>C2_CDI <br>'; $_QRY .= "(292,289,404,240,213,360,228,225,246,326,384,249,413,295,251,312,279,216,230,234,377,333,259,341,220,325,387,278,362,397,408,237,250,254,273,363,352,269,307,329,394,403,270)"; $_DATA = getQueryInArray($_QRY); for ($i = 0; $i < count($_DATA); $i++) { echo $_DATA[$i]['email'] . '; '; } $_QRY = "SELECT `email` FROM `parteneri` WHERE pos <> -1 AND proiect_id IN "; echo '<br><br>C2_CCTS <br>'; $_QRY .= "(327,411,366,331,314,390,381)"; $_DATA = getQueryInArray($_QRY); for ($i = 0; $i < count($_DATA); $i++) { echo $_DATA[$i]['email'] . '; '; } $_QRY = "SELECT `email` FROM `parteneri` WHERE pos <> -1 AND proiect_id IN "; echo '<br><br>C1_CDI <br>'; $_QRY .= "(77,101,172,165,188,152,197,32,123,81,153,156,170,14,35,167,186,109,116,168,200,70,193,151,73,127,128,140,171,191,59,203,67,131,169,82,85,91,132,149,184,187)"; $_DATA = getQueryInArray($_QRY); for ($i = 0; $i < count($_DATA); $i++) { echo $_DATA[$i]['email'] . '; '; } $_QRY = "SELECT `email` FROM `parteneri` WHERE pos <> -1 AND proiect_id IN "; echo '<br><br>C1_PS <br>'; $_QRY .= "(139,143,103,60,161)"; $_DATA = getQueryInArray($_QRY); for ($i = 0; $i < count($_DATA); $i++) { echo $_DATA[$i]['email'] . '; '; }
function generateDetaliiHistory($_ID = 0, $type = 1) { global $configArray; ?> <?php $QRY3 = 'SELECT * FROM desc_type_archive_' . intval($type) . ' WHERE obiect_id = ' . $_ID . ' ORDER BY data DESC'; $_DATA3 = getQueryInArray($QRY3, $configArray['STRUCTdbcnx']); if (count($_DATA3)) { ?> <h2 style="color:#999;">Istoric Detalii</h2> <table cellspacing="4" border="0" style="width:500px; font-size:11px; padding:0px;"> <?php for ($i = 0; $i < count($_DATA3); $i++) { ?> <tr<?php if (!($i % 2)) { print ' class="TRgrey"'; } ?> > <td align="left" valign="top" style="padding:2px;"><a href="inventar_desc_view_type_<?php echo intval($type); ?> .php?noheader=1&id=<?php echo $_DATA3[$i]['desc_id']; ?> " rev="width: 900px; height: 500px; scrolling: auto;" rel="lyteframe" class="oldDesc"><img src="images/icon16_calendar.png" width="16" height="16" border="0" /> <?php echo $_DATA3[$i]['data']; ?> </a></td> <td align="left" valign="top" style="width:100%; padding:2px 2px 2px 5px;"> <?php if (file_exists($configArray['uploadDir'] . 'xml/' . $_DATA3[$i]['file_xml']) && strlen($_DATA3[$i]['file_xml'])) { ?> <a href="<?php echo $configArray['uploadDirWeb'] . 'xml/' . $_DATA3[$i]['file_xml']; ?> " class="oldDesc" target="_blank"><img src="images/icon16_xml.png" width="16" height="16" border="0" /> <?php echo $_DATA3[$i]['file_xml']; ?> </a> <?php } else { ?> not avaialble <?php } ?> </td> </tr> <?php } //endfor ?> <tr> <td align="left" valign="top"><img src="images/spacer.gif" width="150" height="1" border="0" alt="" /></td> <td align="left" valign="top" class="error"></td> </tr> </table> <?php } ?> <?php }