Ejemplo n.º 1
0
     foreach ($es as $e) {
         $options[$e->tagName] = $e->nodeValue;
     }
 }
 if ($options['current_session'] == 'y') {
     $cookies = $_COOKIE;
 }
 if (strtolower($_REQUEST['action']) == strtolower(tra('Replay'))) {
     $options['use_tidy'] = $_REQUEST['show_tidy'];
     $options['show_page'] = $_REQUEST['show_page'];
     $options['show_post'] = $_REQUEST['show_post'];
     $options['summary'] = $_REQUEST['summary'];
     $options['current_session'] = $_REQUEST['current_session'];
     $test_success = $test_failure = $test_count = 0;
     foreach ($urls as $url) {
         $tmp = verif_url($url, $options['use_tidy'] == 'y');
         $result[] = $tmp;
         if ($options['summary']) {
             $test_count++;
             if ($tmp['html'] == '') {
                 $test_success++;
             } else {
                 $test_failure++;
             }
         }
     }
     $smarty->assign_by_ref('result', $result);
 }
 $smarty->assign('filename', $_REQUEST['filename']);
 $smarty->assign('show_page', $options['show_page']);
 $smarty->assign('show_post', $options['show_post']);
Ejemplo n.º 2
0
function getAllImg($argv, $c)
{
    $tmp = array();
    $allimgtmp = array();
    $j = 0;
    while ($c < count($argv) - 1) {
        if (preg_match("/^https?:\\/\\//", $argv[$c], $k) == FALSE) {
            if (!file_exists($argv[$c])) {
                echo "imagepanel: {$argv[$c]} No such file or directory\n";
            } else {
                if (is_dir($argv[$c])) {
                    echo "imagepanel: {$argv[$c]}: Is a directory\n";
                } else {
                    if (!is_readable($argv[$c])) {
                        echo "imagepanel: {$argv[$c]}: Permission denied\n";
                    } else {
                        if (($file = fopen($argv[$c], "r")) === FALSE) {
                            echo "imagepanel: {$argv[$c]}: Cannot open file\n";
                        } else {
                            $tmp = getImg($argv[$c], 0);
                        }
                    }
                }
            }
            $i = 0;
            while (isset($tmp[$i])) {
                $allimgtmp[$j] = $tmp[$i];
                $j++;
                $i++;
            }
        } else {
            if (verif_url($argv[$c]) == false) {
                echo "imagepanel: {$argv[$c]}: An error occured.\n";
            } else {
                $tmp = getImg($argv[$c], 1);
                $i = 0;
                while (isset($tmp[$i])) {
                    $allimgtmp[$j] = $tmp[$i];
                    $j++;
                    $i++;
                }
            }
        }
        $c++;
    }
    return $allimgtmp;
}