Exemple #1
0
        changeAccess($cid[0], 0);
        break;
    case 'accessregistered':
        changeAccess($cid[0], 1);
        break;
    case 'accessspecial':
        changeAccess($cid[0], 2);
        break;
    case 'saveorder':
        saveOrder($cid);
        break;
    case 'cancel':
        cancelContact();
        break;
    default:
        showContacts($option);
        break;
}
/**
* List the records
* @param string The current GET/POST option
*/
function showContacts($option)
{
    global $mainframe;
    $db =& JFactory::getDBO();
    $filter_order = $mainframe->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'cd.ordering', 'cmd');
    $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', '', 'word');
    $filter_state = $mainframe->getUserStateFromRequest($option . 'filter_state', 'filter_state', '', 'word');
    $filter_catid = $mainframe->getUserStateFromRequest($option . 'filter_catid', 'filter_catid', 0, 'int');
    $search = $mainframe->getUserStateFromRequest($option . 'search', 'search', '', 'string');
Exemple #2
0
    $w->sendGetGroups();
    $w->sendGetBroadcastLists();
    $sql = 'UPDATE data SET login=?';
    $query = $db->prepare($sql);
    $query->execute(['0']);
}
$w->sendGetPrivacyBlockedList();
$w->sendAvailableForChat($nickname);
$show = true;
global $onlineContacts;
$GLOBALS['online_contacts'] = [];
$GLOBALS['current_contact'];
$poll = 0;
do {
    if ($show) {
        showContacts();
        $show = false;
    }
    $poll++;
    if ($poll == 10) {
        $w->pollMessage();
        $poll = 0;
    }
    $mainCmd = fgets_u(STDIN);
    switch ($mainCmd) {
        case '/add':
            echo "\nEnter the number you want to add > ";
            $numberToAdd = trim(fgets(STDIN));
            do {
                echo "\nIs it right yes/no > ";
                $check = trim(fgets(STDIN));