示例#1
0
 /**
  * Displays a particular model.
  * @param integer $id the ID of the model to be displayed
  */
 public function actionCreate()
 {
     $model = new catalogo();
     if (isset($_POST["catalogo"])) {
         $model->attributes = $_POST['catalogo'];
         if ($model->validate()) {
             /**
              * realizamos el upload de la foto
              * */
             $file = CUploadedFile::getInstance($model, "img");
             //echo $file->getExtensionName();exit;
             //die("estamos aqui");
             $name = sha1($file->getName()) . ".jpg";
             //die("name=".$name);
             if ($file->getExtensionName() == "jpg" or $file->getExtensionName() == "jpeg") {
                 $file->saveAs(Yii::getPathOfAlias("webroot") . "/anyuri/catalogo/" . $name);
             } else {
                 Yii::app()->user->setFlash('mensaje', 'Sólo fotos JPG por favor');
                 $this->refresh();
             }
             /**
              * se hace el insert del registro
              * */
             $guardar = $model->insert($name);
             if ($guardar) {
                 Yii::app()->user->setFlash('mensaje', 'El registro se ha creado exitosamente');
                 $this->redirect(Yii::app()->request->baseUrl . "/catalogo");
             } else {
                 Yii::app()->user->setFlash('mensaje', 'La foto debe ser sólo JPG');
                 $this->refresh();
             }
         }
     }
     $this->render('_form', compact("model"));
 }
 public static function run()
 {
     //Suprimir Warnings
     //error_reporting(E_WARNING);
     //$template = file_get_contents('app.view/template.class.php');
     $catalogo = new catalogo();
     $catalogo->show();
 }
示例#3
0
ob_start();
@(include "config.inc.php");
@(include LANG_CONFIG);
$curr_page = "catalogo";
@(include LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
//inclusione dizionario catalogo
@(include DB);
//inclusione DB
@(require_once CLASS_catalogo);
//classe per gestione catalogo
//Permessi di amministratore
$admin = false;
if (isset($_SESSION['admin_sofia_@12']) && $_SESSION['admin_sofia_@12']["sid"] == session_id() && $_SESSION['admin_sofia_@12']["radd"] == $_SERVER["REMOTE_ADDR"]) {
    $admin = true;
}
$catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
//iniz. classe
$catalogo->admin = $admin;
$catalogo->unit_size = $_SESSION['lang']['id'] != 0 ? 'inch' : 'cm';
$catalogo->listen_ricerca_articoli();
$_SESSION['curr_cat'] = $catalogo->categoria_id;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo sprintf($lang['catalogo']['title'], $catalogo->categoria);
?>
 | Ceramiche di Caltagirone SOFIA&reg;</title>
<meta name="description" content="<?php 
示例#4
0
ob_start();
@(include "config.inc.php");
@(include LANG_CONFIG);
$curr_page = "catalogo";
@(include LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
//inclusione dizionario catalogo
@(include DB);
//inclusione DB
@(require_once CLASS_catalogo);
//classe per gestione catalogo
//Permessi di amministratore
$admin = false;
if (isset($_SESSION['admin_sofia_@12']) && $_SESSION['admin_sofia_@12']["sid"] == session_id() && $_SESSION['admin_sofia_@12']["radd"] == $_SERVER["REMOTE_ADDR"]) {
    $admin = true;
}
$catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
//iniz. classe
$catalogo->categoria_id = $_GET["id"];
$catalogo->id_prodotto = $_GET["prod"];
$catalogo->id_listino = $_GET["l"];
//id del listino
$catalogo->admin = $admin;
$catalogo->unit_size = $_SESSION['lang']['id'] != 0 ? 'inch' : 'cm';
$catalogo->listen_ricerca_articoli();
$ri = $catalogo->get_articolo($catalogo->id_prodotto, $catalogo->id_listino);
//qry singolo prodotto
$titolo_personalizzato = $ri->fields['nuovo_codice'] . " " . sprintf($lang['catalogo']['title'], $catalogo->categoria) . " | Ceramiche SOFIA&reg";
$ri->MoveFirst();
?>

<?php 
示例#5
0
ob_start();
@(include "config.inc.php");
//configurazione generale
@(include LANG_CONFIG);
//configurazione lingua
$curr_page = "home";
@(include LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
//inclusione dizionario catalogo
@(include LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_HOME);
//inclusione dizionario home
@(include DB);
//inclusione DB
@(require_once CLASS_catalogo);
//classe per gestione catalogo
$catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
//iniz. classe
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo $lang['home']['meta_title'];
?>
</title>
<meta name="description" content="<?php 
echo $lang['home']['meta_description'];
?>
"  />
<meta name="keywords" content="<?php 
示例#6
0
<ul class="nav navbar-nav <?php 
echo $bianca;
?>
">
<?php 
//Verifico che la classe catalogo sia istanziata
if (@method_exists($catalogo, "catalogo")) {
} else {
    @(include LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
    //inclusione dizionario catalogo
    require_once CLASS_catalogo;
    $catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
}
$i = 0;
$r = $catalogo->get_categorie();
foreach ($lang['menu'] as $k => $v) {
    $class = "";
    $liClassNew = "";
    $liNew = "";
    $target = "";
    if ($k == "galleria") {
        $target = 'target="_blank"';
        /*$liClassNew ='linew';
        		$liNew='<img src="'.DIR2.'template/pix/new_sticker_yellow.png" />';*/
    }
    if ($k == 'catalogo' || $k == 'azienda') {
        $numeroGruppo = 3;
        $class = "dropdown";
        $class .= $curr_page == $k ? ' active' : '';
        //echo '<li '.$liClassNew.'><a href="'.$v[LINK].'" title="'.$v['title'].'" '.$target;
        echo '<li class="' . $class . '" title = "' . $v['title'] . '"><a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' . $v['label'] . ' <span class="caret"></span></a>';
示例#7
0
//CATALOGO RICHIESTE AJAX
ob_start();
include "../config.inc.php";
include "../" . LANG_CONFIG;
@(include "../" . LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
//inclusione dizionario catalogo
@(include "../" . DB);
//inclusione DB
require_once "../" . CLASS_catalogo;
//classe per gestione catalogo
//Permessi di amministratore
$admin = false;
if (isset($_SESSION['admin_sofia_@12']) && $_SESSION['admin_sofia_@12']["sid"] == session_id() && $_SESSION['admin_sofia_@12']["radd"] == $_SERVER["REMOTE_ADDR"]) {
    $admin = true;
}
$catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
//iniz. classe
$catalogo->admin = $admin;
$catalogo->unit_size = $_SESSION['lang']['id'] != 0 ? 'inch' : 'cm';
$catalogo->categoria_id = $_GET['id_cat'];
$catalogo->decoro_id = $_GET['decoro'];
$catalogo->taglia = $_GET['taglia'];
//sleep(1);
echo $catalogo->elenco_articoli();
?>
   
	<script type="text/javascript">
		//$(".riflesso").reflect({
			//height: 35
		//});
		//$('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();
示例#8
0
<?php

//RICHIESTE AJAX
require_once "../classes/cart/product.class.php";
require_once "../classes/cart/cart.class.php";
include "../config.inc.php";
include "../" . LANG_CONFIG;
@(include "../" . LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_HOME);
//inclusione dizionario home
@(include "../" . LANG_PATH . $_SESSION['lang']['label'] . '/' . LANG_CATALOGO);
//inclusione dizionario catalogo
@(include "../" . DB);
//inclusione DB
require_once "../" . CLASS_catalogo;
//classe per gestione catalogo
$catalogo = new catalogo($db_conn, 1, $_SESSION['lang']['id'], $lang['catalogo']);
//iniz. classe
$catalogo->unit_size = $_SESSION['lang']['id'] != 0 ? 'inch' : 'cm';
//Richiesta visualizzazione prodotto a schermo intero
if (isset($_POST['fullWindow'])) {
    //sleep(1);
    $token = $catalogo->purifica($_POST['fullWindow']);
    $art = $db_conn->Execute("SELECT A.id,A.codice,C.nome AS categoria,D.nome AS decoro,D1.descrizione\n\t\t\t\t\t\t\t\t  FROM articolo A \n\t\t\t\t\t\t\t\t  JOIN articolo_categoria C ON A.categoria=C.id\n\t\t\t\t\t\t\t\t  JOIN articolo_decoro D ON A.decoro=D.id\n\t\t\t\t\t\t\t\t  JOIN articolo_descrizione D1 ON A.id=D1.articolo\n\t\t\t\t\t\t\t\t  WHERE SHA1(MD5(CONCAT(A.id,A.codice)))=? AND A.sezione=1 AND D1.language=? AND C.language=?", array($token, $_SESSION['lang']['id'], $_SESSION['lang']['id']));
    if ($art->EOF) {
        echo '0';
    } else {
        $imgs = $db_conn->Execute("SELECT id,nome\n\t\t\t\t\t\t\t\t\t  FROM articolo_immagini\n\t\t\t\t\t\t\t\t\t  WHERE articolo=?\n\t\t\t\t\t\t\t\t\t  ORDER BY sort,id", array($art->fields['id']));
        ?>
		<div style="width:250px; height: 520px; padding: 10px; float:left; background: url(<?php 
        echo DIR2;
        ?>