Exemplo n.º 1
0
function pr($var, $name = '')
{
    if (!is_devel()) {
        return;
    }
    watch($var, $name = '');
}
Exemplo n.º 2
0
 /**
  *
  * @param  InputInterface        $input
  * @param  OutputInterface       $output
  * @throws FileNotFoundException
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     try {
         $output->writeln('<comment>Watcher started running. Ctrl/Cmd + C to quit</comment>');
         watch($output);
     } catch (Exception $ex) {
         $output->writeln('<error>Execution has been interrupted by an error :</error>');
         $output->writeln('<error>' . $ex->getMessage() . '</error>');
     }
 }
Exemplo n.º 3
0
<?php

$cryptinstall = "./crypt/cryptographp.fct.php";
require_once $cryptinstall;
$listing_id = mysql_real_escape_string(route(1));
// if watch was set on request let's do it!
if (isset_or($_REQUEST['watch'])) {
    watch($listing_id);
}
if (isset_or($_REQUEST['share_listing']) && isset_or($_REQEUST['email_listing_id']) != "" && isset_or($_REQUEST['y_email']) != "" && isset_or($_REQUEST['d_email']) != "") {
    $email_listing_id = $_REQUEST['email_listing_id'];
    $email = $_REQUEST['d_email'];
    $listing_title = $db->queryUniqueValue("SELECT title FROM listings WHERE id='{$email_listing_id}'");
    $subject = 'BusinessFieds: ' . $listing_title;
    $body = '
		<html>
		<head>
		  <title>BusinessFieds Shared Listing</title>
		</head>
		<body>
		  <p>' . $_REQUEST['y_email'] . ' has forwarded you this <a href="http://www.businessfieds.com" target="_blank">BusinessFieds.com</a> listing.</p>
		  <p>Please see below for more information</p>
		  <p>Visit the posting at <a href="http://www.businessfieds.com/listing/' . $_REQUEST['email_listing_id'] . '" target="_blank">http://www.businessfieds.com/listing/' . $_REQUEST['email_listing_id'] . '
		  to contact the seller</p>
		  <p>Thank you,<br>BusinessFieds</p>
		</body>
		</html>
		';
    // To send HTML mail, the Content-type header must be set
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
Exemplo n.º 4
0
$following_btn = '<a href="/myAccount#watchlist" class="watchingbtn"><img src="images/book.png" style="padding-right:3px;vertical-align:bottom;">Watching</a>';
$follow_btn = '<a href="#" class="watchbtn"><img src="images/book_add.png" style="padding-right:3px;vertical-align:bottom;">Add to Watchlist</a>';
if (isset($_GET['id'])) {
    $listing_id = $_GET['id'];
    if ($_GET['action'] == 'check') {
        // check the following status
        if (checkWatch($listing_id)) {
            // following is a go! send in the unfollow button
            echo $following_btn;
        } else {
            // no sir, you are not in fact following this. would you like to?
            echo $follow_btn;
        }
    }
    if ($_GET['action'] == 'watch') {
        if (watch($listing_id)) {
            // you have successfully followed the element!
            echo $following_btn;
        } else {
            // well something went wrong... we should probably put in some sort of notification but the user will never know
            echo $follow_btn;
        }
    }
    if ($_GET['action'] == 'unwatch') {
        if (unWatch($listing_id)) {
            // we are sad to see you go :(
            echo $follow_btn;
        } else {
            // hmm problem unfollowing...sorry charlie!
            echo $following_btn;
        }
Exemplo n.º 5
0
function router()
{
    $page = isset($_GET['page']) ? $_GET['page'] : "";
    switch ($page) {
        case 'login':
            login();
            break;
        case 'logout':
            logout();
            break;
        case 'watch':
            watch();
            break;
        default:
            main();
            break;
    }
}
Exemplo n.º 6
0
     checkUserName();
     break;
 case 'logout':
     logout();
     break;
 case 'myMovies':
     getMyMovies();
     break;
 case 'notMyMovies':
     notMyMovies();
     break;
 case 'addComment':
     addComment();
     break;
 case 'watch':
     watch();
     break;
 case 'addGenre':
     addGenre();
     break;
 case 'getGenre':
     getGenre();
     break;
 case 'addMovie':
     addMovie();
     break;
 case 'delete':
     delete();
     break;
 case 'addUser':
     createAccount();