Beispiel #1
0
function save_product_php($br_id, $pr_id, $pr_name, $pr_sdesc, $pr_desc, $pc_id, $pr_at_id)
{
    $basemng = new basemng();
    $basemng->dbconnect();
    $basemng->user_autorization();
    $pr_id = (int) $pr_id;
    if ($pr_id != 0) {
        $new_id = $basemng->save_product_info((int) $br_id, $pr_id, $basemng->u2w($pr_name), $basemng->u2w($pr_sdesc), $basemng->u2w($pr_desc), $pr_at_id);
        $string_out = $basemng->show_product($pr_id);
    } else {
        $new_id = $basemng->insert_new_product((int) $br_id, $basemng->u2w($pr_name), $basemng->u2w($pr_sdesc), $basemng->u2w($pr_desc), $pr_at_id);
        $basemng->link_product_to_category($new_id, (int) $pc_id);
    }
    /*
    $fp = fopen("test.txt", "a"); // Открываем файл в режиме записи 
    $mytext = $pr_desc."\n"; // Исходная строка
    $test = fwrite($fp, $mytext); // Запись в файл
    if ($test) echo 'Данные в файл успешно занесены.';
    else echo 'Ошибка при записи в файл.';
    fclose($fp); //Закрытие файла
    */
    echo $string_out;
}
Beispiel #2
0
<?php

$back_names[] = "cl_call";
$back_names[] = "cl_call2";
$back_names[] = "cl_call3";
$back_names[] = "cl_call4";
$back_names[] = "cl_call5";
$basemng = new basemng();
$basemng->mysqli = $this->mysqli;
$basemng->request = $this->request;
$basemng->user = $this->user;
//$js_functions[]=$basemng->show_js();
$js_include[] = 'js/treeNavigation.js';
$string_out .= $basemng->show_map();
$string_out .= "\n<div id='action_buttons' class='divactionbuttons'></div>";
if ($this->request['showproduct'] != '') {
    $out = $basemng->show_product($this->request['showproduct']);
}
$string_out .= "<div id ='main_div' class='divmain'>" . $out . "</div>";
$string_out .= "<div id='tree_selector' class='div_outer_tree'>" . $basemng->product_tree(0, 1) . "</div>";