Ejemplo n.º 1
0
        gaz_dbi_put_row($gTables['company_data'],'var','website_subtitle','data',$form['subtitle']);
        gaz_dbi_put_row($gTables['company_data'],'var','website_meta_author','data',$form['author']);
        gaz_dbi_put_row($gTables['company_data'],'var','website_meta_keywords','data',$form['keywords']);
        // infine inserisco le pagine
        foreach ($pages_name_and_descri as $k=>$v) {
            $db_data[$k]['ref']='';
            $ks=str_split($k,3);
            if ($ks[0]=='new') { // se ho aggiunto una pagina allora la devo inserire nel database
                company_dataInsert($db_data[$k]);
            } else {
                company_dataUpdate(array('id',$k),$db_data[$k]);
            }

        }
    } else {
        echo '<tr><td colspan=3 class="FacetDataTDred">ERROR!!!'.$r[1]." failed: ".$gForm->outputErrors($r[0],$script_transl['errors'])."</td></tr>\n";
    }
} else {
    echo "<tr>\n";
    echo "\t<td class=\"FacetFieldCaptionTD\">".$script_transl['sqn']."</td>";
    echo "\t </td>\n";
    echo "\t<td  class=\"FacetDataTD\">\n";
    echo '<input name="Return" type="submit" value="'.$script_transl['return'].'!">';
    echo "\t </td>\n";
    echo "\t<td  class=\"FacetDataTD\" align=\"right\">\n";
    echo '<input name="Submit" type="submit" value="'.strtoupper($script_transl['submit']).'!">';
    echo "\t </td>\n";
    echo "</tr>\n";
}
echo "</table>\n";
?>
Ejemplo n.º 2
0
require("../../library/include/header.php");
$script_transl = HeadMain();
echo "<form method=\"POST\">";
echo "<input type=\"hidden\" name=\"ritorno\" value=\"".$form['ritorno']."\">\n";
echo "<input type=\"hidden\" name=\"".ucfirst($toDo)."\" value=\"\">";
$gForm = new GAzieForm();
if ($toDo == 'insert') {
   echo "<div align=\"center\" class=\"FacetFormHeaderFont\">".$script_transl['ins_this']."</div>\n";
} else {
   echo "<div align=\"center\" class=\"FacetFormHeaderFont\">".$script_transl['upd_this']." '".$form['codice']."'</div>\n";
   echo "<input type=\"hidden\" value=\"".$form['codice']."\" name=\"codice\" />\n";
}
echo "<table class=\"Tmiddle\">\n";
if (!empty($msg)) {
    echo '<tr><td colspan="3" class="FacetDataTDred">'.$gForm->outputErrors($msg,$script_transl['errors'])."</td></tr>\n";
}
if ($toDo == 'insert') {
   echo "<tr>\n";
   echo "\t<td class=\"FacetFieldCaptionTD\">".$script_transl['codice']."* </td>\n";
   echo "\t<td class=\"FacetDataTD\" colspan=\"2\"><input type=\"text\" name=\"codice\" value=\"".$form['codice']."\" align=\"right\" maxlength=\"3\" size=\"3\" /></td>\n";
   echo "</tr>\n";
}
echo "<tr>\n";
echo "\t<td class=\"FacetFieldCaptionTD\">".$script_transl['descri']."* </td>\n";
echo "\t<td class=\"FacetDataTD\" colspan=\"2\"><input type=\"text\" name=\"descri\" value=\"".$form['descri']."\" align=\"right\" maxlength=\"50\" size=\"50\" /></td>\n";
echo "</tr>\n";
echo "<tr><td class=\"FacetFieldCaptionTD\">".$script_transl['annota']."</td>
     <td class=\"FacetDataTD\" colspan=\"2\">\n";
echo "\t<input type=\"text\" name=\"annota\" value=\"".$form['annota']."\" maxlength=\"50\" size=\"30\" class=\"FacetInput\">\n";
echo "</td></tr>";
Ejemplo n.º 3
0
                  "</codice>\n\t\t<descri>".$item['des'].
                  "</descri>\n\t\t<unimis>".$item['web_mu'].
                  "</unimis>\n\t\t<catmer>".$item['catmer'].
                  "</catmer>\n\t\t<prezzoweb>".number_format($item['prezzo']*$item['web_multiplier'],$admin_aziend['decimal_price'],'.','').
                  "</prezzoweb>\n\t\t<taxrate>".$item['aliquo'].
                  "</taxrate>\n\t\t<url>".htmlspecialchars($item['web_url']).
                  "</url>\n\t\t<annota>".$item['note'].
                  "</annota>\n\t</artico>\n";
          if (!empty($item['image'])) {
             for ($i = 1; $i <= $attempts; $i++) {  // cicli per i tentativi di upload ftp
                $msg = updateGAzieCart($form['server'],$form['user'],$form['pass'],$item['image'],$form['path'].'components/com_gaziecart/images/artico/'.preg_replace('/\//','_',$item['cod']).'.png');
                if (!$msg){ // Š andato a buon fine
                    $i=9;
                    echo '<tr><td class="FacetDataTD">File:  artico/'.$item['cod'].".png uploaded!</td></tr>\n";
                } else {
                    echo '<tr><td class="FacetDataTDred">Attempts n.'.$i." artico/".$item['cod'].".png failed: ".$gForm->outputErrors($msg,$script_transl['errors'])."</td></tr>\n";
                }
             }
          }
       }
 endwhile;
 $rs = gaz_dbi_query ('SELECT codice,descri,image,annota FROM '.$gTables['catmer'].' ORDER BY codice');
 while ($item = gaz_dbi_fetch_array($rs)) :
       $xml .= "\t<catmer>\n\t\t<codice>".$item['codice']."</codice>\n\t\t<descri>".$item['descri']."</descri>\n\t\t<annota>".$item['annota']."</annota>\n\t</catmer>\n";
       if (!empty($item['image'])) {
           for ($i = 1; $i <= $attempts; $i++) {  // cicli per i tentativi di upload ftp
               $msg = updateGAzieCart($form['server'],$form['user'],$form['pass'],$item['image'],$form['path'].'components/com_gaziecart/images/catmer/'.$item['codice'].'.png');
               if (!$msg){ // Š andato a buon fine
                    $i=9;
                    echo "<tr><td class=\"FacetDataTD\">File:  catmer/".$item['codice'].".png uploaded!</td></tr>\n";
               } else {