Beispiel #1
0
function compair_spiders_form()
{
    include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
    $form = new XoopsThemeForm(_AM_SPIDERS_COMPAIRAPI, "import", "", "post");
    $apiprotocol = new XoopsFormSelect(_AM_SPIDERS_APIPROT, 'api', apimethod());
    $apiprotocol->setDescription(_AM_SPIDERS_APIPROTDESC);
    $options['soap'] = _AM_SPIDERS_API_SOAP;
    $options['curl'] = _AM_SPIDERS_API_CURL;
    $options['json'] = _AM_SPIDERS_API_JSON;
    $apiprotocol->addOptionArray($options);
    $form->addElement($apiprotocol);
    $form->addElement(new XoopsFormHidden("op", 'compair-api'));
    $form->addElement(new XoopsFormButton('', 'contents_submit', _SUBMIT, "submit"));
    $form->display();
}
Beispiel #2
0
                 $change++;
                 $newmod->setVar($key, $value);
             }
         }
         $newmod->setVar('id', $id);
         if ($change / count($apispider) * 100 > intval($xoConfig['compair_percent'])) {
             $spidermods_handler->insert($newmod, true);
         }
     }
     redirect_header('index.php?op=listmods', 4, _AM_SPIDERS_COMPARISONFINISHED);
     exit(0);
     break;
 case "signup":
     switch ($_REQUEST['fct']) {
         case "save":
             $xortifyAuth =& XortifyAuthFactory::getAuthConnection(false, apimethod());
             $myts =& MyTextSanitizer::getInstance();
             $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC(trim($_POST['uname'])) : '';
             $email = isset($_POST['email']) ? $myts->stripSlashesGPC(trim($_POST['email'])) : '';
             $url = isset($_POST['url']) ? $myts->stripSlashesGPC(trim($_POST['url'])) : '';
             $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC(trim($_POST['pass'])) : '';
             $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC(trim($_POST['vpass'])) : '';
             $agree = isset($_POST['agree']) && intval($_POST['agree']) ? 1 : 0;
             if ($agree != 1) {
                 $stop .= _US_UNEEDAGREE . '<br />';
             }
             $validate = $xortifyAuth->validate($uname, $email, $pass, $vpass);
             if ($validate != false) {
                 $stop .= "User details didn't validate with Xortify.com<br/>{$validate}";
             }
             xoops_load("captcha");
$modversion['config'][$i]['name'] = 'match_percentile';
$modversion['config'][$i]['title'] = "_MI_SPIDER_MATCHPERCENTILE";
$modversion['config'][$i]['description'] = "_MI_SPIDER_MATCHPERCENTILE_DESC";
$modversion['config'][$i]['formtype'] = 'select';
$modversion['config'][$i]['valuetype'] = 'int';
$modversion['config'][$i]['default'] = 52;
$modversion['config'][$i]['options'] = $options;
include_once $GLOBALS['xoops']->path('/modules/spiders/include/functions.php');
$i++;
$modversion['config'][$i]['name'] = 'protocol';
$modversion['config'][$i]['title'] = '_MI_SPIDERS_PROTOCOL';
$modversion['config'][$i]['description'] = '_MI_SPIDERS_PROTOCOL_DESC';
$modversion['config'][$i]['formtype'] = 'select';
$modversion['config'][$i]['valuetype'] = 'text';
$modversion['config'][$i]['default'] = apimethod(false);
$modversion['config'][$i]['options'] = apimethod(true);
$i++;
$modversion['config'][$i]['name'] = 'xortify_urisoap';
$modversion['config'][$i]['title'] = '_MI_SPIDERS_URISOAP';
$modversion['config'][$i]['description'] = '_MI_SPIDERS_URISOAP_DESC';
$modversion['config'][$i]['formtype'] = 'text';
$modversion['config'][$i]['valuetype'] = 'text';
$modversion['config'][$i]['default'] = 'http://xortify.chronolabs.coop/soap/';
$i++;
$modversion['config'][$i]['name'] = 'xortify_uricurl';
$modversion['config'][$i]['title'] = '_MI_SPIDERS_URICURL';
$modversion['config'][$i]['description'] = '_MI_SPIDERS_URICURL_DESC';
$modversion['config'][$i]['formtype'] = 'text';
$modversion['config'][$i]['valuetype'] = 'text';
$modversion['config'][$i]['default'] = 'http://xortify.chronolabs.coop/curl/';
$i++;