Esempio n. 1
0
/**
 * Main logic to handle updating an item
 * @return void
 */
function handleUpdate()
{
    try {
        if (updateItem()) {
            showMainMenu('Recipe successfully updated.', $_POST['token']);
        } else {
            showMainMenu('Recipe update failed.', $_POST['token']);
        }
    } catch (Zend_Gdata_App_Exception $e) {
        showMainMenu('Recipe update failed: ' . $e->getMessage(), $_POST['token']);
    }
}
Esempio n. 2
0
        adminRenewMember($option);
        break;
    case 'toggletaskflag':
        toggleTaskFlag($option);
        break;
    case 'listtransactions':
        listTransactions($option, $mode);
        break;
    case 'showemailqueries':
        showEmailQueries($option);
        break;
    case 'emailmenu':
        emailMenu($option);
        break;
    case 'composeemail':
        composeEmail($option);
        break;
    case 'sendemail':
        sendEmail($option);
        break;
    case 'showstafftotals':
        showStaffTotals($option);
        break;
    case 'generatereport':
        showReportForm($option);
        break;
    case 'mainmenu':
    default:
        showMainMenu($option);
        break;
}
/**
 *  Main program procedure
 */
function main()
{
    global $client, $user;
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        procSystem('cls');
    } else {
        procSystem('clear');
    }
    try {
        $user = $client->user->get();
    } catch (\ErrorException $e) {
        error($e);
    }
    showUserInfo();
    showMainMenu();
}
Esempio n. 4
0
/**
 * We arrive here after the user first authenticates and we get back
 * a single-use token.
 */
function showFirstAuthScreen()
{
    $singleUseToken = $_GET['token'];
    $sessionToken = exchangeToken($singleUseToken);
    if (!$sessionToken) {
        showIntroPage();
    } else {
        $tableTitle = 'Here\'s your <b>single use token:</b> <code>' . $singleUseToken . '</code>' . "\n" . '<br>And here\'s the <b>session token:</b> <code>' . $sessionToken . '</code>';
        showMainMenu($tableTitle, $sessionToken);
    }
}
Esempio n. 5
0
        showNewBanner();
        break;
    case 'new2':
        addBanner();
        showMainMenu();
        break;
    case 'delete':
        deleteBanner();
        showMainMenu();
        break;
    case 'donate':
        updateDonate();
        showMainMenu();
        break;
    default:
        showMainMenu();
}
/**
* Show the main options menu
*/
function showMainMenu()
{
    global $options_url;
    $donate = get_option('wpads_donate');
    $bannersManager = new Banners();
    $banners = $bannersManager->getBanners();
    $zones = $bannersManager->getZones($banners, $donate);
    ?>
<div class="wrap"> 
	<h2><?php 
    _e('WPAds');