Exemplo n.º 1
0
 public function edit_pwd()
 {
     include_once "./functions/account/edit.php";
     include_once "models/account/account_info.php";
     $account = new Account_info();
     $main = new Edit();
     $account->edit_result = $main->edit_pwd($_POST);
     return View("account/main", $account);
 }
Exemplo n.º 2
0
$id = $_GET["id"];
$delete = $_GET["delete"];
if (isset($edit)) {
    if (!empty($id)) {
        $sql = "SELECT *,orders.id as order_id FROM orders JOIN customers ON customers.id=customer_id WHERE orders.id='{$id}'";
        $rs = sql::fetchOne($sql);
        $_SESSION[order_id] = $rs[order_id];
        $_SESSION[order] = $rs[number];
        $_SESSION[orderdate] = $rs[orderdate];
        $_SESSION[customer_id] = $rs[customer_id];
        $_SESSION[customer] = $rs[customer];
        echo "ok<script>selectmenu('tz','');</script>";
    } else {
        $sql = "SELECT * FROM orders WHERE id='{$edit}'";
        $ord = sql::fetchOne($sql);
        $form = new Edit($processing_type);
        $form->init();
        if (empty($edit) && empty($_SESSION[customer_id])) {
            $customers = array();
            $sql = "SELECT id,customer FROM customers ORDER BY customer";
            $res = sql::fetchAll($sql);
            foreach ($res as $rs) {
                $customers[$rs[id]] = $rs[customer];
            }
            $form->addFields(array(array("type" => CMSFORM_TYPE_SELECT, "name" => "customerid", "label" => "Заказчик:", "values" => $customers)));
        } else {
            $form->addFields(array(array("type" => CMSFORM_TYPE_HIDDEN, "name" => "customerid", "value" => !empty($_SESSION[customer_id]) ? $_SESSION[customer_id] : $ord["customer_id"], "options" => array("html" => "size=30"))));
        }
        $form->addFields(array(array("type" => CMSFORM_TYPE_TEXT, "name" => "orderdate", "label" => 'Дата:', "value" => date2datepicker($ord[orderdate]), "options" => array("html" => ' datepicker=1 '), "check" => array("type" => CMSFORM_CHECK_NUMERIC), "format" => array("type" => CMSFORM_FORMAT_CUSTOM, "pregPattern" => "/[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9][0-9][0-9]/"), "obligatory" => true), array("type" => CMSFORM_TYPE_TEXT, "name" => "number", "label" => "Номер письма:", "value" => $ord["number"], "options" => array("html" => "size=30"), "obligatory" => true), array("type" => CMSFORM_TYPE_FILE, "name" => "order_file", "label" => "Файл письма:"), array("type" => CMSFORM_TYPE_TEXT, "name" => "curfile", "label" => "Текущий файл:", "value" => basename(getFileNameById($ord["filelink"])), "options" => array("html" => "readonly"))));
        $form->show();
    }
Exemplo n.º 3
0
 public function obtener_listado()
 {
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' && isset($_POST)) {
         include_once "functions/manage_events/edit.php";
         $data = $_POST;
         $funcion = new Edit();
         return $funcion->obtener_listado($data);
     }
 }
Exemplo n.º 4
0
 function edit_post()
 {
     include_once "./functions/manage_blog/edit.php";
     $main = new Edit();
     $main->edit_post($_POST);
 }
Exemplo n.º 5
0
 function execute()
 {
     $hako = new HakoEdit();
     $cgi = new CgiImitation();
     $cgi->parseInputData();
     $cgi->getCookies();
     if (!$hako->readIslands($cgi)) {
         HTML::header();
         HakoError::noDataFile();
         HTML::footer();
         exit;
     }
     $cgi->setCookies();
     $edit = new Edit();
     switch ($cgi->mode) {
         case "enter":
             $html = new HtmlTop();
             $html->header();
             $edit->main($hako, $cgi->dataSet);
             $html->footer();
             break;
         case "list":
             $html = new HtmlTop();
             $html->header();
             $edit->main($hako, $cgi->dataSet);
             $html->footer();
             break;
         case "map":
             $html = new HtmlTop();
             $html->header();
             $edit->editMap($hako, $cgi->dataSet);
             $html->footer();
             break;
         case "regist":
             $html = new HtmlTop();
             $html->header();
             $edit->register($hako, $cgi->dataSet);
             $html->footer();
             break;
         default:
             $html = new HtmlTop();
             $html->header();
             $edit->enter();
             $html->footer();
     }
     exit;
 }
Exemplo n.º 6
0
<?php

require_once "../config_global.php";
$database = "if15_teamalpha_3";
require_once "edit.class.php";
require_once "header.php";
require_once "footer.php";
//if(!isset($_SESSION["logged_in_user_id"])){
//	header("Location: login.php");
//}
$Edit = new Edit($mysqli);
$office = $_GET["office"];
$packet_id = $_GET["edit_id"];
$packet_array = $Edit->getPacketData($packet_id);
if (isset($_POST["update_packet"])) {
    $Edit->updatePacket($office, $_POST["arrival"], $_POST["departure"], $_POST["fromc"], $_POST["comment"], $_POST["office_id"], $packet_id);
    header("Location: dataWorker.php");
}
?>

<h2>Muuda saadetise andmeid</h2>
<form method="post">
		
		<label for ="arrival">Saabumisaeg</label><br>
		<input id="arrival" name="arrival" type="text" value="<?php 
echo $packet_array[0]->arrival;
?>
"> <br><br>
		
		<label for ="arrival">Väljumisaeg</label><br>
		<input id="departure" name="departure" type="text" value="<?php 
Exemplo n.º 7
0
<?php

// управление правами доступа
require $_SERVER["DOCUMENT_ROOT"] . "/lib/engine.php";
authorize();
// вызов авторизации
$processing_type = basename(__FILE__, ".php");
ob_start();
if (isset($edit)) {
    /*
    $sql = "SELECT * FROM rights WHERE id='".$edit."'";
    $rs=sql::fetchOne($sql);
    $uid = !empty($uid)?$uid:$rs["u_id"];
    */
    $uid = $edit;
    $form = new Edit($processing_type);
    $form->init();
    $sql = "SELECT * FROM rtypes ORDER BY type";
    $res = sql::fetchAll($sql);
    $sql = "SELECT * FROM rrtypes";
    $res1 = sql::fetchAll($sql);
    foreach ($res as $rs) {
        $label = sprintf("<span id='rrr' rtype='" . $rs["type"] . "'>[%-10s]</span>:", $rs["type"]);
        $name = "r|" . $rs["id"] . "";
        //sprintf("[%-10s]:",$rs["type"]);
        //echo $name."<br>";
        foreach ($res1 as $rs1) {
            $sql = "SELECT * FROM rights WHERE type_id='" . $rs["id"] . "' AND u_id='{$uid}' AND rtype_id='" . $rs1["id"] . "'";
            $rs2 = sql::fetchOne($sql);
            //echo $rs1["rtype"]."-<input type=checkbox name=r[".$rs["id"]."][".$rs1["id"]."] ".($rs2["right"]=='1'?"checked":"").">";
            $value[$rs1["id"]] = $rs2["right"] == 1 ? 1 : 0;
<?php

require_once "config/db.php";
require_once "classes/Edit.php";
$palabra = new Edit();
$numero = $palabra->nextNumber();
echo $numero;
echo "<br>Se está subiendo el dato de temperatura con id " . $numero . "con el valor " . $_POST['value'];
$crear = new Edit();
$insert = $crear->putTables($numero, $_POST['value']);
if ($insert == true) {
    echo "<br>se ha subido satisfactoriamente";
} else {
    echo "la prueba ha ido mal";
}
<?php

require_once "functions.php";
require_once "../classes/Edit.class.php";
$Edit = new Edit($mysqli);
//kasutaja muudab andmeid
if (isset($_GET["update"])) {
    $Edit->updateContestData($_GET["contest_id"], $_GET["contest_name"], $_GET["name"]);
}
//kas muutuja on aadressireal
if (isset($_GET["edit_id"])) {
    echo $_GET["edit_id"];
    //küsin andmed
    $Edit->{$all_contest} = getSingleContestData($_GET["edit_id"]);
    var_dump($all_contest);
} else {
    //kui muutujat ei ole, ei ole mõtet siia lehele tulla
    header("Location: table.php");
}
?>

<form action="edit.php" method="get">
    <input name="contest_id" type="hidden" value="<?php 
echo $_GET["edit_id"];
?>
">
    <input name="contest_name" type="text" value="<?php 
echo $car->contest_name;
?>
"><br>
    <input name="name" type="text" value="<?php 
Exemplo n.º 10
0
<?php

include 'includes/functions_editAcc.php';
page_head("Úprava účtu");
page_nav();
get_topright_form();
if (!isset($_SESSION["loggedUser"]) || $_SESSION["loggedUser"] == null) {
    dieWithError("err-not-logged-in");
}
if (get_class($_SESSION["loggedUser"]) != "Administrator") {
    dieWithError("err-edit-accounts-rights");
}
$val = new Validate();
$edit = new Edit();
$udaje = daj_udaje_uctu($_GET['id']);
$_SESSION['uname'] = $udaje["name"];
$_SESSION['email'] = $udaje["mail"];
$_SESSION['os'] = $udaje["description"];
$_SESSION['liga'] = $udaje["sk_league"];
if (isset($_POST["uname"]) && $val->validate_name($_POST["uname"]) && isset($_POST["email"]) && $val->validate_mail($_POST["email"]) && isset($_POST["os"]) && isset($_POST["liga"])) {
    if ($_SESSION['uname'] != $_POST["uname"]) {
        if ($val->validate_pass($_POST["pass"], $_POST["pass2"])) {
            if ($val->meno($_POST["uname"])) {
                $edit->edituj($_POST["email"], $_POST["pass"], $_POST["uname"], $_POST["os"], $_POST["liga"]);
            }
        }
    } elseif ($_SESSION['email'] != $_POST["email"]) {
        if ($val->validate_pass($_POST["pass"], $_POST["pass2"])) {
            if ($val->email($_POST["email"])) {
                $edit->edituj($_POST["email"], $_POST["pass"], $_POST["uname"], $_POST["os"], $_POST["liga"]);
            }
Exemplo n.º 11
0
<?php

// отображает задачи по усовершенствованию
require $_SERVER["DOCUMENT_ROOT"] . "/lib/engine.php";
authorize();
// вызов авторизации
$processing_type = basename(__FILE__, ".php");
// serialize form
if (isset(${'form_' . $processing_type})) {
    extract(${'form_' . $processing_type});
}
if (isset($edit)) {
    $sql = "SELECT * FROM todo WHERE id='" . $edit . "'";
    $rs = sql::fetchOne($sql);
    $form = new Edit($processing_type);
    $form->init();
    $form->addFields(array(array("type" => CMSFORM_TYPE_TEXTAREA, "name" => "what", "label" => '', "value" => $rs["what"], "options" => array("rows" => "10", "html" => " cols=50 onfocus='\$(this).wysiwyg();' "))));
    $form->show();
} elseif (isset($delete)) {
    $sql = "SELECT what FROM todo WHERE id='" . $delete . "'";
    $rs = sql::fetchOne($sql);
    $sql = "UPDATE todo SET rts=NOW(), what='<del>" . $rs["what"] . "</del>' WHERE id='{$delete}'";
    sql::query($sql);
    sql::error(true);
    echo "ok";
} else {
    $sql = "SELECT *, todo.id FROM todo JOIN users ON users.id=u_id " . (isset($find) ? "WHERE (what LIKE '%{$find}%' ) " : "") . (isset($all) ? "" : (isset($find) ? " AND rtsrts='000000000000' " : " WHERE rts='000000000000' ")) . (!empty($order) ? "ORDER BY " . $order . " " : "ORDER BY cts ") . (isset($all) ? "" : "LIMIT 20");
    // echo $sql;
    $cols[id] = "ID";
    $cols[nik] = "Кто";
    $cols[cts] = "Задан";
Exemplo n.º 12
0
<?php

require_once "config/db.php";
require_once "classes/Edit.php";
$select = new Edit();
$getData = $select->showSomething("value");
echo count($getData);
for ($i = 0; $i <= count($getData); $i++) {
    echo "<br>" . $getData[$i];
}
Exemplo n.º 13
0
authorize();
// вызов авторизации
$processing_type = basename(__FILE__, ".php");
ob_start();
if (isset($edit)) {
    if (!empty($id)) {
        $sql = "SELECT * FROM customers WHERE id='{$id}'";
        $rs = sql::fetchOne($sql);
        $_SESSION[customer_id] = $rs[id];
        $_SESSION[customer] = $rs[customer];
        echo "ok<script>selectmenu('orders','');</script>";
        exit;
    } else {
        $sql = "SELECT * FROM customers WHERE id='{$edit}'";
        $cust = sql::fetchOne($sql);
        $form = new Edit($processing_type);
        $form->init();
        $form->addFields(array(array("type" => CMSFORM_TYPE_TEXT, "name" => "customer", "label" => "Краткое название (имя каталога):", "value" => $cust["customer"]), array("type" => CMSFORM_TYPE_TEXT, "name" => "fullname", "label" => "Полное название (для теззаданий):", "value" => $cust["fullname"], "options" => array("html" => "size=60")), array("type" => CMSFORM_TYPE_TEXT, "name" => "kdir", "label" => "Каталог на диске К (для сверловок):", "value" => $cust["kdir"])));
        $form->show();
    }
} elseif (isset($delete)) {
    // удаление
    $sql = "DELETE FROM customers WHERE id='{$delete}'";
    sql::query($sql);
    sql::error(true);
    // удаление связей
    // удалить и платы заказчика
    $sql = "SELECT * FROM plates WHERE customer_id='{$delete}'";
    $res = sql::fetchAll($sql);
    foreach ($res as $rs) {
        $sql = "DELETE FROM plates WHERE id='{$rs["id"]}'";
Exemplo n.º 14
0
    {
        $this->fetchData();
        Page::header('baseMVC - Edit "' . $this->article_data['title'] . '"');
        $this->view('edit_view', $this->article_data);
    }
    function submitEdited()
    {
        $edited = $this->insert("UPDATE BlogContent\n\t\t\t\tSET title = '" . DB::$_instance->real_escape_string($_POST['title']) . "',\n\t\t\t\t\tintro = '" . DB::$_instance->real_escape_string($_POST['intro']) . "',\n\t\t\t\t\tcontent = '" . DB::$_instance->real_escape_string($_POST['content']) . "'\n\t\t\t\tWHERE id_Content = {$_GET['id']};");
        if (DB::$_instance->affected_rows === 1) {
            header('Location: ' . BASE_URL . "?page=article&id={$_GET['id']}");
        } else {
            echo 'Affected rows: ' . DB::$_instance->affected_rows . "<br/>UPDATE BlogContent\n\t\t\t\tSET title = '" . DB::$_instance->real_escape_string($_POST['title']) . "',\n\t\t\t\t\tintro = '" . DB::$_instance->real_escape_string($_POST['intro']) . "',\n\t\t\t\t\tcontent = '" . DB::$_instance->real_escape_string($_POST['content']) . "'\n\t\t\t\tWHERE id_Content = {$_GET['id']}";
        }
    }
}
$edit = new Edit();
if (isset($_GET['id']) && isset($_SESSION['uid']) && $edit->blogAuthorisation($_GET['id'], $_SESSION['uid']) && isset($_POST['submit'])) {
    $edit->submitEdited();
}
if (!isset($_SESSION['uid'])) {
    $_SESSION['error_msg'] = "<p>Login required to access the page</p>";
    $edit->requireLogin(REFR_URL);
} elseif ($edit->blogAuthorisation($_GET['id'], $_SESSION['uid'])) {
    // == $author_id && $user_group == 'blogauthor' ) :
    $edit->getView();
    $edit->footer();
} else {
    $_SESSION['error_msg'] = "<p>You don't have the permission to edit this article!<br/>It seems that you don't own this article.</p>";
    $edit->header('Page Access Error - baseMVC');
    $edit->footer();
}
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="apple-touch-icon" href="apple-touch-icon.png">

        <link rel="stylesheet" href="css/normalize.min.css">
        <link rel="stylesheet" href="css/foundation.css" />
        <link rel="stylesheet" href="css/main.css">
        <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>

        <script src="js/vendor/modernizr-2.8.3.min.js"></script>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
        <script type="text/javascript" src="https://www.google.com/jsapi"></script>
	
	<?php 
require_once "config/db.php";
require_once "classes/Edit.php";
$select = new Edit();
$getId = $select->showSomething("id");
$getData = $select->showSomething("value");
?>
	


    <script type="text/javascript">
      google.load("visualization", "1.1", {packages:["bar"]});
      google.setOnLoadCallback(drawStuff);

      function drawStuff() {
        var data = new google.visualization.arrayToDataTable([
          ['Move', 'Percentage'],
<?php 
for ($s = 0; $s < count($getData); $s++) {
Exemplo n.º 16
0
<?php

// управление ползователями
require $_SERVER["DOCUMENT_ROOT"] . "/lib/engine.php";
authorize();
// вызов авторизации
$processing_type = basename(__FILE__, ".php");
// serialize form
if (isset(${'form_' . $processing_type})) {
    extract(${'form_' . $processing_type});
}
ob_start();
if (isset($edit)) {
    $sql = "SELECT * FROM users WHERE id='" . $edit . "'";
    $rs = sql::fetchOne($sql);
    $form = new Edit($processing_type);
    $form->init();
    $form->addFields(array(array("type" => CMSFORM_TYPE_TEXT, "name" => "nik", "label" => "Ник:", "value" => $rs["nik"]), array("type" => CMSFORM_TYPE_TEXT, "name" => "fullname", "label" => "Полное имя:", "value" => $rs["fullname"]), array("type" => CMSFORM_TYPE_TEXT, "name" => "position", "label" => "Должность:", "value" => $rs["position"]), array("type" => CMSFORM_TYPE_TEXT, "name" => "password1", "label" => "Пароль:", "value" => $rs["password"]), array("type" => CMSFORM_TYPE_TEXT, "name" => "password2", "label" => "Повтор пароля", "value" => $rs["password"])));
    $form->show();
} elseif (isset($delete)) {
    // удаление
    $sql = "DELETE FROM users WHERE id='{$delete}'";
    sql::query($sql);
    sql::error(true);
    echo "ok";
} else {
    // вывести таблицу
    // sql
    $sql = "SELECT * FROM users " . (isset($find) ? "WHERE (nik LIKE '%{$find}%' OR fullname LIKE '%{$find}%' OR position LIKE '%{$find}%') " : "") . (!empty($order) ? "ORDER BY " . $order . " " : "ORDER BY nik ") . (isset($all) ? "" : "LIMIT 20");
    //print $sql;
    $cols[id] = "ID";
Exemplo n.º 17
0
 /**
  * @magentoDataFixture Magento/Customer/_files/customer.php
  * @magentoDataFixture Magento/Customer/_files/customer_address.php
  */
 public function testGetStreetLine()
 {
     $this->assertEquals('Green str, 67', $this->_block->getStreetLine(1));
     $this->assertEquals('', $this->_block->getStreetLine(2));
 }
Exemplo n.º 18
0
<?php

/*
@info
Κλάση για την αλλαγή στοιχείων των χρηστών
@details
Δίνουμε την δυνατότητα στον χρήστη να μπορεί να αλλάξει στοιχεία όπως όνομα,επίθετο,τηλ κτλ
*/
header('Content-type=application/json; charset=utf-8');
require_once __DIR__ . '/db_connect.php';
$database = new DB_CONNECT();
$editor = new Edit();
if ($_REQUEST["usertype"] == "customer") {
    $editor->makeEdit(mysql_real_escape_string($_REQUEST["cellphone"]), mysql_real_escape_string($_REQUEST["password"]), mysql_real_escape_string($_REQUEST["town"]), mysql_real_escape_string($_REQUEST["deviceid"]), null, null, $_REQUEST["usertype"]);
} else {
    $editor->makeEdit(mysql_real_escape_string($_REQUEST["cellphone"]), mysql_real_escape_string($_REQUEST["password"]), mysql_real_escape_string($_REQUEST["town"]), mysql_real_escape_string($_REQUEST["deviceid"]), mysql_real_escape_string($_REQUEST["taxiplate"]), $_REQUEST["imageUrl"], $_REQUEST["usertype"]);
}
//for debugging
/*
$editor->makeEdit("695345345","newleme",
						"serres_new","/357777961700933",
						"ereNEWre-345234",null, "driver" );
*/
//====================================================================
class Edit
{
    private $jsonResponse;
    private $cellphone;
    private $password;
    private $town;
    private $deviceid;