= _TEXT_236 ?>
- /**************** to be updated HERE ********************/
+
try {
- $db = new cms;
+ $db = new Cms;
$cod_mart = $_GET["cpr"];
$flag_td = getFlagTd($_SESSION["cod_anag"]);
diff --git a/file_manager.php b/file_manager.php
index adf63c8..d754228 100644
--- a/file_manager.php
+++ b/file_manager.php
@@ -6,7 +6,7 @@ require_once("include_login.php");
if(!in_array("file_manager", $conf["page_menu"][$_SESSION["gruppo"]]))
header("Location: ".$conf["homepage_user"]);
-$db2 = new cms;
+$db2 = new Cms;
$id_file_focus = (isset($_GET["focus"])) ? $_GET["focus"] : "";
diff --git a/file_received.php b/file_received.php
index 32f4e30..1249db9 100644
--- a/file_received.php
+++ b/file_received.php
@@ -3,7 +3,7 @@ session_start();
// require_once('include.php');
require_once('config.php');
require_once('include_login.php');
-$db2 = new cms;
+$db2 = new Cms;
if(!in_array("ricezione_file", $conf['user_menu']))
header("Location: ".$conf["homepage_user"]);
diff --git a/file_upload.php b/file_upload.php
index ba0b141..4732982 100644
--- a/file_upload.php
+++ b/file_upload.php
@@ -7,7 +7,7 @@ require_once('include_login.php');
if(!in_array('file_upload', $conf["page_menu"][$_SESSION["gruppo"]]))
header("Location: ".$conf["homepage_user"]);
-$db2 = new cms;
+$db2 = new Cms;
$maxcharnote = 1000;
if(isset($_POST["tot_user"])){
diff --git a/func.php b/func.php
index 0ee514c..f78ec5e 100644
--- a/func.php
+++ b/func.php
@@ -61,7 +61,7 @@ function sql2array($sql, $options = array())
$ret = array();
$return_class = false;
try {
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
$k = 0;
$retData = array();
@@ -183,7 +183,7 @@ function writeLog($message)
function getFlagTd($cod_anag)
{
- $db = new cms;
+ $db = new Cms;
$db->query("SELECT flag_td FROM vtb_clie WHERE cod_anag='$cod_anag'");
$flag_td = '';
while ($db->next_record()) {
@@ -201,7 +201,7 @@ function getSerie()
{
if (isset($_SESSION["gruppo"])) {
if ($_SESSION["gruppo"] == _agenti) {
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT ISNULL(serie, 'WEB') AS serie FROM vtb_agen WHERE cod_vage = '" . $_SESSION["user_code"] . "'";
$db->query($sql);
if ($db->next_record()) {
@@ -245,7 +245,7 @@ function formatDatetimeGeneral($date, $format)
function getNewNumOrd($gestione, $serie, $anno)
{
try {
- $db = new cms;
+ $db = new Cms;
$wsdl_url = "http://" . $db->getEndpoint() . "/axis2/services/" . $db->getWsdl() . "?wsdl";
$client = new SOAPClient($wsdl_url);
$params = array("profileDB" => $db->getDbname(),
@@ -579,7 +579,7 @@ function checkStralci()
dtb_ordt.cod_vage = wtb_users.user_code AND
wtb_users.user_name = '" . $_SESSION["username"] . "'
GROUP BY dtb_ordt.num_ord,dtb_ordt.data_ord, dtb_ordt.serie";
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
$_SESSION["stralci"] = $db->num_rows();
}
@@ -941,7 +941,7 @@ function get_user_email($username = null)
if (is_null($username)) {
return null;
}
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT e_mail, wtb_user_groups.user_group, user_code, full_name
FROM wtb_users INNER JOIN wtb_user_groups ON wtb_user_groups.Key_group = wtb_users.key_group
WHERE User_name = '{$username}'";
@@ -1138,7 +1138,7 @@ function get_constIfDef($const_name, $default_value)
function mail_ws($to, $subject, $message, $from)
{
try {
- $db = new cms;
+ $db = new Cms;
$body = array(
"to" => $to,
@@ -1186,7 +1186,7 @@ function autocompile_email($user_code, $user_group, $user_email)
if (strlen($tab_name) > 0) {
list($tab_name, $id_key) = explode(".", $tab_name);
$sql = "SELECT e_mail FROM $tab_name WHERE $id_key = '$user_code'";
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
if ($db->next_record()) {
$user_email = $db->f("e_mail");
@@ -1293,7 +1293,7 @@ function getAzienda()
function get_prod_images($cod_mart)
{
return array();
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT path_link, descrizione_link FROM mtb_aart_link WHERE cod_mart='{$cod_mart}'";
$arr_items = sql2array($sql);//var_dump($arr_items);
diff --git a/getPDFdoc.php b/getPDFdoc.php
index 2463606..467b67a 100644
--- a/getPDFdoc.php
+++ b/getPDFdoc.php
@@ -2,7 +2,7 @@
session_start();
include "config.php";
-$db = new cms;
+$db = new Cms;
// utilizzato solo da area report
try{
$ret["returnId"] = 1;
diff --git a/include/Cms.php b/include/Cms.php
index 09c3632..5d944fe 100644
--- a/include/Cms.php
+++ b/include/Cms.php
@@ -1,12 +1,12 @@
"192.168.2.205:8080", "cliente" => "172.16.30.5:8080");
diff --git a/include/GestSetup.class.php b/include/GestSetup.class.php
index f7da4c0..9270344 100644
--- a/include/GestSetup.class.php
+++ b/include/GestSetup.class.php
@@ -58,7 +58,7 @@ class GestSetup{
/**************************************** NEW CMS ***********************************************/
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
diff --git a/include/export_files.php b/include/export_files.php
index e5f1d95..30394e9 100644
--- a/include/export_files.php
+++ b/include/export_files.php
@@ -2,7 +2,7 @@
function exportFileToServer_add($localPath, $filename){
try{
if(file_exists($localPath)){
- $db = new cms;
+ $db = new Cms;
$content = fileIntoString($localPath);
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
$client = new SOAPClient($wsdl_url);
@@ -26,7 +26,7 @@ function exportFileToServer_read($filename){
try{
deleteCache("jrxml", 300); // ELIMINA DALLA CACHE FILE JRXML PIU VECCHI DI 300 SECONDI
if(!file_exists(cache_folder.basename($filename))){
- $db = new cms;
+ $db = new Cms;
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
$client = new SOAPClient($wsdl_url);
$params = array("filename" => $filename);
@@ -59,7 +59,7 @@ function exportFileToServer_read($filename){
function exportFileToServer_delete($filename){
try{
- $db = new cms;
+ $db = new Cms;
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
$client = new SOAPClient($wsdl_url);
$params = array("filename" => $filename);
diff --git a/index.php b/index.php
index 7ec74f2..5150245 100644
--- a/index.php
+++ b/index.php
@@ -31,13 +31,13 @@ unset_order_in_session();
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_" . $_SESSION["azienda"] . "/logintop.jpg";
-$db = new cms;
+$db = new Cms;
$err_text = " ";
if (isset($_POST["username"])) {
$username = sanitize($_POST["username"]);
$password = sanitize($_POST["password"]);
setcookie("user");
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT wtb_user_groups.User_group, wtb_users.key_group, User_name, Password, e_mail, Full_name, ctrl_state,
CASE WHEN User_code IS NULL AND wtb_users.key_group = 3 THEN (
SELECT wtb_clie.cod_anag FROM wtb_clie WHERE wtb_clie.user_name = wtb_users.user_name
diff --git a/index0.php b/index0.php
index a18d6a7..1983b88 100644
--- a/index0.php
+++ b/index0.php
@@ -76,7 +76,7 @@ require_once "top_menu.php";
if($conf["tipo_ins"]==1){
if(isset($_GET["cpr"])){
- $db = new cms;
+ $db = new Cms;
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp='".sanitize($_GET["cline"])."'");
while($db->next_record()){
$nome_linea = $db->f("descrizione");
@@ -87,7 +87,7 @@ require_once "top_menu.php";
}?>
} elseif(isset($_GET["cline"])){
- $db = new cms;
+ $db = new Cms;
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp='".sanitize($_GET["cline"])."'");
while($db->next_record()){
$nome_linea = $db->f("descrizione");
@@ -107,10 +107,12 @@ if($conf["tipo_ins"]==1){
require_once "menu_sx.php";?>
if(isset($_GET["all"])){
+ /***** for all DIVISIONI *****/
include "modulo_vis_line_all.php";
} else if(isset($_GET["cpr"])){
include "modulo_vis_prodotto.php";
} else if(isset($_GET["cline"])){
+ /**** for a specific DIVISIONE ******/
include "modulo_vis_line.php";
} else{
include "modulo_index.php";
diff --git a/index1.php b/index1.php
index 81ccb5e..d03a52b 100644
--- a/index1.php
+++ b/index1.php
@@ -145,7 +145,8 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
}
try {
- $data = date("d/m/Y");
+ /************ DATA, COD_ANAG, COD_VDES *****************/
+ $data = date("Y-m-d");
$cod_anag = $_SESSION["cod_anag"];
$cod_vdes = $_SESSION["cod_vdes"];
$cod_mgrp = $cod_msgr = $cod_msfa = $cod_mart = $cod_vlis = "";
@@ -154,14 +155,13 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
FROM Wtb_users INNER JOIN wtb_user_groups ON Wtb_users.key_group = wtb_user_groups.Key_group
WHERE User_name = '{$_SESSION["username"]}'";
-
$db->query($sql);
while ($db->next_record()) {
$user_group = $db->f("user_group");
$user_code = $db->f("User_code");
}
-
+ /************** COD_MGRP *********************/
if ($user_group == _fornitori) {
$db->query("SELECT DISTINCT mtb_grup.cod_mgrp
FROM mtb_grup, mtb_aart_anag, mtb_aart
@@ -184,14 +184,16 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
"data_prezzo" => $data,
"cod_anag" => $cod_anag,
"cod_vdes" => $cod_vdes,
- "cod_vlis" => $cod_vlis,
"cod_mgrp" => $cod_mgrp,
+
+ "cod_vlis" => $cod_vlis,
"cod_msgr" => $cod_msgr,
"cod_msfa" => $cod_msfa,
"cod_mart" => $cod_mart);
+
$params = array(
- "profileDB" => $profileDB,
+ "profileDb" => $profileDB,
"username" => $db->getUtenteWEB(),
"password"=>$db->getPasswordWEB(),
"body"=>$body);
@@ -199,7 +201,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
$client->getCustomerPriceListNew($params);
if ($client->return->esito == 1) {
- $_SESSION["xml_1"] = preg_replace('/(<\?xml[^?]+?)utf-16/i', '$1utf-8', $result->return);
+ $_SESSION["cod_mgrp"] = json_decode($client->return->dto)->divisione;
} else {
echo $client->return->errorMessage;
}
@@ -211,7 +213,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
include "wrap-riep_current_order.php";
if (isset($_GET["cpr"])) {
- $db = new cms;
+ $db = new Cms;
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp = '" . $_GET["cline"] . "'");
while ($db->next_record()) {
$nome_linea = $db->f("descrizione");
@@ -225,7 +227,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
merceologico »
">= $nome_linea ?> »
= $cod_articolo ?>
} else if (isset($_GET["cline"])) {
- $db = new cms;
+ $db = new Cms;
$db->query("SELECT descrizione FROM mtb_grup WHERE cod_mgrp = '" . $_GET["cline"] . "'");
while ($db->next_record()) {
$nome_linea = $db->f("descrizione");
@@ -239,6 +241,7 @@ if ($conf["tipo_ins"] == 1) { // VG e CEDIAL
+ /*************** menu_sx defines variables: $cod_mgrp, $descrizione, $count_promo, $logo_web ********/
require_once "menu_sx.php";
?>
diff --git a/integry_reporting/execute_report.php b/integry_reporting/execute_report.php
index f363aa2..f4de91f 100644
--- a/integry_reporting/execute_report.php
+++ b/integry_reporting/execute_report.php
@@ -5,7 +5,7 @@ ini_set('soap.wsdl_cache_ttl', 0);
$_reportingFunc->deleteCache(300, "jrxml"); // ELIMINA DALLA CACHE FILE JRXML PIU VECCHI DI 300 SECONDI
-$db = new cms;
+$db = new Cms;
$div_style = "font-family:verdana, arial;font-size: 12px;";
$token = isset($_POST["token"]) ? $_POST["token"] : null;
diff --git a/integry_reporting/export_files.class.php b/integry_reporting/export_files.class.php
index 3b8ffcb..07c7a84 100644
--- a/integry_reporting/export_files.class.php
+++ b/integry_reporting/export_files.class.php
@@ -5,7 +5,7 @@ class exportFileToServer{
try{
$cache_filepath = cache_folder.basename($filename);
if(!file_exists($cache_filepath)){
- $db = new cms;
+ $db = new Cms;
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
$client = new SOAPClient($wsdl_url);
$params = array("filename" => $filename);
@@ -30,7 +30,7 @@ class exportFileToServer{
public function delete($filename){
try{
- $db = new cms;
+ $db = new Cms;
$wsdl_url = "http://".$db->getEndPoint()."/axis2/services/".$db->getWsdl()."?wsdl";
$client = new SOAPClient($wsdl_url);
$params = array("filename" => $filename);
diff --git a/integry_reporting/preview_report_filters.php b/integry_reporting/preview_report_filters.php
index 9df39d0..fbf09ec 100644
--- a/integry_reporting/preview_report_filters.php
+++ b/integry_reporting/preview_report_filters.php
@@ -57,7 +57,7 @@ else if($paramType=="select_sql" || $paramType=="monoselect_sql"){?>
$conf["report"]["keyfield"][] = $paramName;
$sql = $_reportingFunc->convertSqlVar2Values($expression);
$values_array = $columns_array = array();
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
while($db->next_record()){ // CARICAMENTO RIGHE
for($i = 0; $i<$db->num_fields(); $i++){
diff --git a/integry_reporting/reporting.class.php b/integry_reporting/reporting.class.php
index f83e6cb..222a92f 100644
--- a/integry_reporting/reporting.class.php
+++ b/integry_reporting/reporting.class.php
@@ -4,7 +4,7 @@ class reporting{
public function call_ws_execJasper($REPO_FLT){
$ret = array();
try{
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$REPO_FLT["reportName"]}'";
$db->query($sql);
if($db->next_record()){
@@ -57,7 +57,7 @@ class reporting{
}
public function check_unique_name($name){
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$name}'"; // VERIFICA SE ESISTE GIA UN REPORT STESSO NOME
$db->query($sql);
return ($db->num_rows()>0) ? $this->check_unique_name($name."_01") : $name;
@@ -68,7 +68,7 @@ class reporting{
$_reportingFunc = new reporting_func;
$report_name = $_reportingFunc->escape($FIELDS["report_name"]);
- $db = new cms;
+ $db = new Cms;
$sql = "SELECT * FROM wtb_jrept WHERE report_name = '{$report_name}'";
$db->query($sql);
if($db->next_record()){
@@ -91,7 +91,7 @@ class reporting{
$jrxml = simplexml_load_string(base64_decode($b64_jrxml));
if($jrxml){
- $db2 = new cms;
+ $db2 = new Cms;
$sql = "SELECT *, CONVERT(TEXT, expression) AS expression
FROM wtb_jrepr
WHERE report_name = '{$report_name}' AND
@@ -199,8 +199,8 @@ class reporting{
public function exec_query_update(){
$updated = false;
- $db = new cms;
- $db2 = new cms;
+ $db = new Cms;
+ $db2 = new Cms;
$sql = "SELECT * FROM wtb_jrepr";
$db->query($sql);
while($db->next_record()){
@@ -272,7 +272,7 @@ class reporting_func{
public function sql2array($sql){
$ret = array();
try{
- $db = new cms;
+ $db = new Cms;
$db->query($sql);
$k = 0;
$ret_json = array();
@@ -355,7 +355,7 @@ class reporting_func{
foreach($values as $valp){
$returning = "";
$paramName = str_replace("[[", "", str_replace("]]", "", $valp)); // PRENDE NOME PARAMETRO
- $db3 = new cms;
+ $db3 = new Cms;
$sql = "SELECT CONVERT(TEXT, expression) AS expression,
tipo
FROM wtb_jrepr
@@ -370,7 +370,7 @@ class reporting_func{
$expression_2 = $this->convertSqlVar2Values($expression_2);
$sql = $this->test($expression_2, $report_name);
if($sql!="-1"){
- $db4 = new cms;
+ $db4 = new Cms;
$db4->query($sql);
if($db4->next_record()){
$returning.= " '".$db4->f($paramName)."' "; // LEGGE 1 VALORE DATO DAL PARAMETRO ANNIDATO
diff --git a/integry_reporting/view_repfilters.php b/integry_reporting/view_repfilters.php
index 086fa3b..477a123 100644
--- a/integry_reporting/view_repfilters.php
+++ b/integry_reporting/view_repfilters.php
@@ -196,7 +196,7 @@ $_reporting->exec_query_update();
tipo IN ('select_sql', 'monoselect_sql') AND
parameter_name <> '$paramName' AND
flag_disabled= 'N'";
- $db3 = new cms;
+ $db3 = new Cms;
$db3->query($sql);
while($db3->next_record()){
if(strpos(base64_decode($db3->f("expression")), "[[$paramName]]") !== false){
@@ -213,7 +213,7 @@ $_reporting->exec_query_update();
$sql = $_reportingFunc->convertSqlVar2Values(str_replace("MONOSELECT:", "", $expression));
$values_array = $columns_array = array();
- $db3 = new cms;
+ $db3 = new Cms;
$db3->query($sql);
while($db3->next_record()){ // CARICAMENTO RIGHE
for($i = 0; $i<$db3->num_fields(); $i++){
diff --git a/livesearch.php b/livesearch.php
index 42c2291..a5b65d0 100644
--- a/livesearch.php
+++ b/livesearch.php
@@ -17,7 +17,7 @@ if(!isset($_SESSION)){
}
-$db = new cms;
+$db = new Cms;
$car_min= 1; // caratteri minimi per avviare la ricerca
$ris_max = 30; // numero risultati massimi da visualizzare
$q = $_GET["q"];
diff --git a/login_expired.php b/login_expired.php
index 6d1621f..efc6791 100644
--- a/login_expired.php
+++ b/login_expired.php
@@ -11,7 +11,7 @@ if(isset($_GET["user"]))
include_once("config.php");
include_once("func.php");
-$db = new cms;
+$db = new Cms;
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_".$_SESSION["azienda"]."/logintop.jpg";
diff --git a/login_recover.php b/login_recover.php
index 55bb99b..2dbd523 100644
--- a/login_recover.php
+++ b/login_recover.php
@@ -8,7 +8,7 @@ if(isset($_COOKIE["azienda"])){
include_once "config.php";
include_once "func.php";
-$db = new cms;
+$db = new Cms;
$url_imgtop = ($debugMode) ? "logintop_integry.jpg" : "custom_".$_SESSION["azienda"]."/logintop.jpg";
diff --git a/menu_sx.php b/menu_sx.php
index 62fce6a..6c313a4 100644
--- a/menu_sx.php
+++ b/menu_sx.php
@@ -1,17 +1,12 @@