コード例 #1
0
ファイル: launcher.php プロジェクト: jackpf/ossim-arc
 $output = Util::execute_command($cmd, $params, 'array');
 // Send PDF by email
 $listEmails = !empty($value['email']) ? explode(';', $value['email']) : null;
 $email_ko = array();
 $email_ok = array();
 if (is_array($listEmails) && !empty($listEmails)) {
     $text = _('Sending E-mails') . '...';
     $to_text = sprintf("\n\t%s\n", $text);
     echo $to_text;
     Util::execute_command($cmd_logout, $params_logout, 'array');
     Util::execute_command($cmd_login, $params_login, 'array');
     foreach ($listEmails as $value2) {
         $cmd = 'wget -U ? -t 1 --timeout=43200 --no-check-certificate --cookies=on --keep-session-cookies --load-cookies=? --post-data=? ? -O - 2>> /var/tmp/logscheduler_err';
         $params = array('AV Report Scheduler [' . $id_sched . ']', $cookieName, 'email=' . $value2 . '&pdfName=' . $pdfName . '&pdfDir=' . $dirUser . '&subject=' . $subject_email . '&body=' . $body_email, $server . '/report/wizard_email_scheduler.php?format=email&run=' . $pdfNameEmail);
         $output = Util::execute_command($cmd, $params, 'array');
         $result = searchString($output, $info_text[1]);
         if ($result == false) {
             $email_ok[] = $value2;
         } else {
             $email_ko[] = $value2;
         }
         $output = null;
     }
     if (count($email_ko) > 0) {
         $to_text = sprintf("\t%s\n", _('Invalid address') . ': ' . implode(",", $email_ko));
     }
     if (count($email_ok) > 0) {
         $to_text = sprintf("\t%s\n", _('PDF sent OK by email to') . ': ' . implode(",", $email_ok));
     }
     echo $to_text;
 }
コード例 #2
0
    } else {
        return false;
    }
}
if ($_POST['criterio'] == "") {
    echo "Ingrese un criterio de busqueda";
} else {
    $message = $_POST['criterio'];
    if ($API->connect(IP_MIKROTIK, USER, PASS)) {
        $API->write("/log/getall");
        $API->write('/cancel', false);
        $READ = $API->read(false);
        $ARRAY = $API->parse_response($READ);
        //print_r($ARRAY);
        echo "<br />";
        if (count($ARRAY) > 0) {
            for ($x = 0; $x <= count($ARRAY); $x++) {
                //Clasifico errores del Log.
                if (preg_match("/" . $message . "/i", $ARRAY[$x]["message"])) {
                    if (searchString($ARRAY[$x]["message"], "authentication failed")) {
                        echo "<p><strong>" . $ARRAY[$x]["time"] . "</strong>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;" . $ARRAY[$x]["message"], "authentication failed" . "</p>";
                    } else {
                        echo "<p><strong>" . $ARRAY[$x]["time"] . "</strong>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp; <span style=\"color:#666;\">" . $ARRAY[$x]["message"] . "</span></p>";
                    }
                }
            }
        }
    } else {
        echo "No hay conexion";
    }
}
コード例 #3
0
ファイル: explore.php プロジェクト: FihlaTV/LeVideoCollector
			  <ol class="carousel-indicators">
			    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
			    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
			  </ol>

			<div class="carousel-inner" role="listbox">
			    <div class="item active">
				   <div class="container">	
			  		 <div class = "row">

			  		<?php 
$page = isset($_GET['page']) ? $_GET['page'] : 0;
$page2 = isset($_GET['page2']) ? $_GET['page2'] : 0;
if (isset($_GET['search'])) {
    $look = searchString($_GET['search'], $page);
} else {
    $look = searchBestRated($page, 12);
}
if ($look) {
    //showing 12 videos
    $separator = 0;
    while ($row = pg_fetch_array($look)) {
        $separator += 1;
        ?>
			  						<div class = "col-xs-8 col-sm-6 col-md-3 col-lg-3">
			  						<div class = "video_thumbnail">
			  						<a href = <?php 
        echo '"./watchvideo.php?watch=' . $row['idvideo'] . '"';
        ?>
 >
コード例 #4
0
ファイル: editusers.php プロジェクト: smankoo/Tradesheet
                echo curPageURL();
                ?>
&conf=true"
                </script>
                <?php 
            }
        }
    }
    $db_link = mysql_connect($hostname, $dbuser, $dbpassword) or die("Unable to connect to the server!");
    mysql_select_db($dbname) or die("Unable to connect to the database");
    $fields_array = array();
    $num_fields = 0;
    $num_row = 0;
    // Build Search String
    if (isset($_POST['search']) || !empty($_POST['search'])) {
        $search = searchString($_POST['search']);
    } else {
        $search = '';
    }
    // Basic construct to "pull" the data using supplied variables (parsed below to "extract" the table name from an older version!
    $sql = "select * from {$_SESSION['table']} {$search} order by {$column} desc limit {$_SESSION['limit']}";
    if ($_POST['search'] == 'test') {
        echo $sql;
    }
    // find position of "FROM" in query
    $fpos = strpos($sql, 'from');
    // get string starting from the first word after "FROM"
    $strfrom = substr($sql, $fpos + 5, 50);
    // Find position of the first space after the first word in the string
    $Opos = strpos($strfrom, ' ');
    // Get table name. If query pull data from more then one table only first table name will be read.