web/tweet.php
changeset 229 74c9ddc3640b
parent 0 4eba9c11703f
child 1427 8b3d57a519eb
equal deleted inserted replaced
228:1bcc79e78fa1 229:74c9ddc3640b
     2 
     2 
     3 /**
     3 /**
     4  * include some common code (like we did in the 90s)
     4  * include some common code (like we did in the 90s)
     5  * People still do this? ;)
     5  * People still do this? ;)
     6  */
     6  */
     7 include_once './common.php';
     7 $rep = $_REQUEST['rep'];
       
     8 include_once dirname(__FILE__).'/'.$rep.'/config.php';
       
     9 include_once 'common.php';
     8 
    10 
     9 /**
    11 /**
    10  * Check for a POSTed status message to send to Twitter
    12  * Check for a POSTed status message to send to Twitter
    11  */
    13  */
    12 if (!empty($_POST) && isset($_POST['status'])
    14 if (!empty($_POST) && isset($_POST['status'])
    33         $result = 'true';
    35         $result = 'true';
    34     }
    36     }
    35     /**
    37     /**
    36      * Tweet sent (hopefully), redirect back home...
    38      * Tweet sent (hopefully), redirect back home...
    37      */
    39      */
    38     header('Location: ' . URL_ROOT . '?result=' . $result);
    40     header('Location: ' . URL_ROOT . '$rep/client.php?result=' . $result);
    39 } else {
    41 } else {
    40     /**
    42     /**
    41      * Mistaken request? Some malfeasant trying something?
    43      * Mistaken request? Some malfeasant trying something?
    42      */
    44      */
    43     exit('Invalid tweet request. Oops. Sorry.');
    45     exit('Invalid tweet request. Oops. Sorry.');