Пример #1
0
    </tbody>
    <tfoot>
        <tr class="th-bottom">
            <th class="cel_play"></th>
            <th class="cel_streamname"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=name', T_('Name'), 'live_stream_sort_name');
?>
</th>
            <th class="cel_streamurl"><?php 
echo T_('Stream URL');
?>
</th>
            <th class="cel_codec"><?php 
echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&sort=codec', T_('Codec'), 'live_stream_codec_bottom');
?>
</th>
            <th class="cel_action"><?php 
echo T_('Action');
?>
 </th>
        </tr>
    </tfoot>
</table>
<script src="<?php 
echo AmpConfig::get('web_path');
?>
/lib/javascript/tabledata.js" language="javascript" type="text/javascript"></script>
<?php 
if ($browse->get_show_header()) {
    require AmpConfig::Get('prefix') . '/templates/list_header.inc.php';
}
Пример #2
0
require_once AmpConfig::get('prefix') . "/modules/twitter/twitteroauth/twitteroauth.php";
session_start();
if (!empty($_SESSION['twitterusername'])) {
    header('Location: ' . AmpConfig::Get('web_path') . '/modules/twitter/twitter_update.php');
    debug_event("Twitter", "Twitter user has logged in this session.", "5");
}
if (!empty($_GET['oauth_verifier']) && !empty($_SESSION['oauth_token']) && !empty($_SESSION['oauth_token_secret'])) {
    debug_event("Twitter", "Got all 3 pieces for auth", "5");
} else {
    if ($_SESSION['twitterCount'] < 4) {
        debug_event("Twitter", "Didn't get all 3 auth pieces, going to try again.  Try #" . $_SESSION['twitterCount'], "5");
        $_SESSION['twitterCount']++;
        header('Location: ' . AmpConfig::Get('web_path') . '/modules/twitter/twitter_login.php');
    } else {
        debug_event("Twitter", "Failed to auth too many times.  Giving up.", "5");
        header('Location: ' . AmpConfig::Get('web_path'));
    }
}
// TwitterOAuth instance, with two new parameters we got in twitter_login.php
$twitteroauth = new TwitterOAuth(AmpConfig::get('twitter_consumer_key'), AmpConfig::get('twitter_consumer_secret'), $_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
if (!isset($twitteroauth)) {
    debug_event("Twitter", "Couldn't create OAuth object.", "5");
    header('Location: ' . AmpConfig::get('web_path'));
}
// Let's request the access token
$access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
if (!isset($access_token)) {
    debug_event("Twitter", "Couldn't get access token", "5");
    header('Location: ' . AmpConfig::get('web_path'));
}
// Save it in a session var