<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
$BGAdminModel = new BGAdmin();
global $modx;
$sphereList = $BGAdminModel->SphereListElements();
if (isset($_POST) && $_POST['action'] == "update") {
    $sphereList[$_POST['key']] = $_POST['name'];
    $tv = $modx->getObject('modTemplateVar', array("name" => "vid_name"));
    $tv->set('elements', implode("||", $sphereList));
    $tv->save();
    echo "Сохранено";
} else {
    $id = mysql_escape_string($_GET['id']);
    $currentSphere = $sphereList[$id];
    ?>
        <div class="w-container edit-container">
            <h1 class="main-container-h1">Редактирование сферы деятельности <a class="go-back" href="/bg-admin/buisnes-sphere-admin/">Вернуться</a></h1>

            <div class="w-form form-edit-add">
                <form method="post">
                    <input type="hidden" name="action" value="update"/>
                    <input type="hidden" name="key" value="<?php 
    echo $id;
    ?>
Exemplo n.º 2
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
$list = new BGAdmin();
$list->ManagerAdd();
Exemplo n.º 3
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
$list = new BGAdmin();
$list->ProductList();
Exemplo n.º 4
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
require_once __DIR__ . "/bg.class.php";
$list = new BGAdmin();
$list2 = new BG();
if ($_GET['action'] == "upload") {
    $list2->UploadProductsImg();
}
if (isset($_POST['action']) and $_POST['action'] == 'update') {
    $list->ProductUpdate();
} else {
    $list->ProductEdit();
}
Exemplo n.º 5
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
$list = new BGAdmin();
$list->ProductAdd();
Exemplo n.º 6
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 24.09.15
 * Time: 9:48
 * снипет для админки покупки бизнеса
 */
require_once "snipets/bg-admin.class.php";
$BGAdmin = new BGAdmin();
$BGAdmin->ProductByMenu();
$BGAdmin->ProductByList($scriptProperties);
Exemplo n.º 7
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
require_once __DIR__ . "/bg.class.php";
$BGAdminModel = new BGAdmin();
$BGModel = new BG();
if (isset($_POST['action']) && $_POST['action'] == 'update') {
    $BGAdminModel->ManagerUpdate();
} elseif (isset($_GET['delete']) && intval($_GET['delete']) > 0) {
    $BGAdminModel->DeleteModxPage();
} else {
    $BGAdminModel->ManagerEdit();
}
Exemplo n.º 8
0
<?php

/**
 * Created by PhpStorm.
 * User: elex
 * Date: 03.09.15
 * Time: 11:41
 */
require_once __DIR__ . "/bg-admin.class.php";
$BGAdminModel = new BGAdmin();
$BGAdminModel->ManagerList();