/* Set base location / path for this plugin */ $baseLocation = '/connections/statistics404/'; /* Base string for the body */ $body = ''; //1 Get the parameters and the action-parameters //* Create MyshopRequest instance */ $myshopRequest = new MyshopRequest($privateKey); //XMLtextClean is only used to get the editlang. $XMLtext = @file_get_contents('php://input'); $XMLtextClean = str_replace("<![CDATA[", "", str_replace("]]>", "", $XMLtext)); /* Get state variables */ $stateVariables = $myshopRequest->getStates(); // Returns associative array with all state variables $pluginParameters = $myshopRequest->getParams(); // Returns associative array with all plugin parameters $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);
/* Set your private key for this plugin here */ $privateKey = '6db7415ddebd2e9842022f71cccda46c485b8f40-1f4553e62e36e693c61a8aeea4e93a575caf9de8'; /* Set base location / path for this plugin */ $baseLocation = '/connections/statistics404/'; /* Base string for the body */ $body = ''; try { /* Create MyshopRequest instance */ $myshopRequest = new MyshopRequest($privateKey); /* Get state variables */ $stateVariables = $myshopRequest->getStates(); // Returns associative array with all state variables /* Get plugin parameters */ $pluginParameters = $myshopRequest->getParams(); // Returns associative array with all plugin parameters $action = $myshopRequest->getParam($action); /* Get location */ $location = $myshopRequest->getLocation(); if ($baseLocation . 'start.html' == $location) { /* Return start screen */ $body .= '<h1>helloWorld!</h1>'; $body .= '<p>Press next to continue</p>'; } else { if ($baseLocation . 'settings.html' == $location) { /* Return settings screen */ $body .= '<label for="myName">Please enter your name:</label><br/>'; $body .= '<input type="text" name="myName"/>'; } else { if ($baseLocation . 'submit.html' == $location) { /* Process user input and return submit screen */ $name = $pluginParameters['myName'];