Exemple #1
0
function cron($start = 0, $limit = 70, $schema_id = 0)
{
    global $_db;
    $where = "WHERE `status` = 'on'";
    if ($schema_id > 0) {
        $where .= " AND schema_id = {$schema_id}";
        $start = 0;
        $limit = 1;
    }
    $sql = "SELECT * FROM `schemas` {$where} LIMIT {$start},{$limit}";
    $schemas = $_db->get_results($sql);
    fetch_web($schemas);
    return count($schemas);
}
     } else {
         $edit_id = upload_browser(false);
     }
 }
 if ($_GET['do'] == "web" and $_POST['method'] == "link") {
     if (isset($_GET['id'])) {
         $edit_id = link_web($_GET['id']);
     } else {
         $edit_id = link_web(false);
     }
 }
 if ($_GET['do'] == "web" and $_POST['method'] == "copy") {
     if (isset($_GET['id'])) {
         $edit_id = fetch_web($_GET['id']);
     } else {
         $edit_id = fetch_web(false);
     }
 }
 if ($_GET['do'] == "ftp") {
     if (isset($_GET['id'])) {
         $edit_id = copy_ftp($_GET['id']);
     } else {
         $edit_id = copy_ftp(false);
     }
 }
 if ($_GET['do'] == "nofile") {
     if (isset($_GET['id'])) {
         $edit_id = nofile($_GET['id']);
     } else {
         $edit_id = nofile(false);
     }
Exemple #3
0
<?php

$template = 'schema.html';
if ($_view == 'edit') {
    $template = 'schema_edit.html';
    if ($_POST['submit_schema_activate']) {
        $_POST['status'] = 'on';
        $_POST['submit_schema'] = 1;
    }
    if ($_POST['submit_schema']) {
        if (is_numeric($_POST['schema_id'])) {
            schema::update($_POST);
            $template = 'schema.html';
        } else {
            schema::add($_POST);
            $template = 'schema.html';
        }
    }
} elseif ($_view == 'test') {
    $keywords = str_replace('^^', ' ', $_REQUEST['keywords']);
    $schema = array('channel' => $_REQUEST['channel'], 'url' => $_REQUEST['url'], 'keywords' => $keywords);
    $result = fetch_web(array((object) $schema), true);
    echo $result;
    exit;
} elseif ($_view == 'del') {
    schema::delete($_GET);
}
include TEMPLATES_PATH . $template;