Пример #1
0
$my_shop_id = $myshopRequest->getParam('master_shopid');
$action = $myshopRequest->getParam('action');
$actionvar = $myshopRequest->getParam('actionvar');
getactionvarparameters($actionvar, $my_pagenr, $my_urlsperpage, $my_sortfield, $my_sortdirection, $my_view, $my_eyes);
// Retrieves the requested parameters from $actionvar
$my_pagenr = ($my_pagenr <= 0 or $my_pagenr >= 999) ? 1 : $my_pagenr;
$my_urlsperpage = ($my_urlsperpage <= 1 or $my_urlsperpage >= 999) ? 50 : $my_urlsperpage;
$my_pagenrlast = max(intval((getnumofrecords($my_shop_id, $my_view, $my_eyes) + $my_urlsperpage - 1) / $my_urlsperpage), 1);
$my_sortfield = $my_sortfield == '' ? 'index' : $my_sortfield;
$my_sortdirection = $my_sortdirection == '' ? 'DESC' : $my_sortdirection;
$my_sorttext = '`' . $my_sortfield . '` ' . $my_sortdirection;
$my_view = $my_view == '' ? '1' : $my_view;
$my_eyes = $my_eyes == '' ? 'both_open_and_closed_eyes' : $my_eyes;
$my_lowerlimit = $my_pagenr * $my_urlsperpage - $my_urlsperpage;
//Find the editlanguage and include the text-elements for that language
$my_language = getelementfromXMLstring('editlang', $XMLtextClean);
if ($my_language == "nl") {
    include_once 'lang/nl.lang.php';
} else {
    //default to english
    include_once 'lang/en.lang.php';
}
/* Get location */
$location = $myshopRequest->getLocation();
if ($baseLocation . 'start.html' == $location) {
    /* Return start screen */
} else {
    if ($baseLocation . 'settings.html' == $location) {
        /* Return settings screen */
    } else {
        if ($baseLocation . 'submit.html' == $location) {
Пример #2
0
<?php

//The database connection-data
$host = 'localhost';
$login = '******';
$password = '******';
$database = 'mw_addon_404';
$XMLtext = @file_get_contents('php://input');
$XMLtextClean = str_replace("<![CDATA[", "", str_replace("]]>", "", $XMLtext));
//Find the edit language and include the text-elements for that language
include_once 'lang/langs.php';
include_once 'functions.php';
// Read all needed variables
$my_language = getelementfromXMLstring('editlang', $XMLtextClean);
$my_shop_id = getelementfromXMLstring('vid', $XMLtextClean);
if ($my_language == "nl") {
    include_once 'lang/nl.lang.php';
} else {
    //default to english
    include_once 'lang/en.lang.php';
}
//Report back to the editor what 404-url have been registered.
$con = mysql_connect($host, $login, $password);
if (!$con) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db($database, $con);
$mysql = "SELECT * FROM `404` WHERE `shop_id`=" . $my_shop_id . ";";
$result = mysql_query($mysql);
echo '<?xml version="1.0" encoding="UTF-8"?>
<response>