コード例 #1
0
ファイル: Content.inc.php プロジェクト: radicaldesigns/amp
 function temp_auth_actions()
 {
     require_once 'AMP/Auth/Password/Reset/Form.php';
     $password_reset_form = new AMP_Auth_Password_Reset_Form();
     $password_reset_form->Build();
     AMP_directDisplay($password_reset_form->execute());
 }
コード例 #2
0
ファイル: comment.php プロジェクト: radicalsuz/amp
<?php

require_once 'AMP/Base/Config.php';
require_once 'AMP/Content/Map.inc.php';
require_once 'AMP/Content/Page.inc.php';
require_once 'AMP/Content/Article/Comment/Public/ComponentMap.inc.php';
$modid = AMP_MODULE_ID_COMMENTS;
$map =& new ComponentMap_Article_Comment_Public();
$controller =& $map->get_controller();
/**
 *  Initialize the Page
 */
$currentPage =& AMPContent_Page::instance();
$controller->set_page($currentPage);
AMP_directDisplay($controller->execute());
require_once "AMP/BaseFooter.php";
コード例 #3
0
ファイル: modinput4.php プロジェクト: radicalsuz/amp
if ($uid) {
    // Set authentication token if uid present
    $auth = $udm->authenticate($uid, $otp);
}
// Fetch or save user data.
if ((!$uid || $auth) && $udm->submitted) {
    // Save only if submitted data is present, and the user is
    // authenticated, or if the submission is anonymous (i.e., !$uid)
    $udm->saveUser();
} elseif ($uid && $auth && !$udm->submitted) {
    // Fetch the user data for $uid if there is no submitted data
    // and the user is authenticated.
    $udm->getUser($uid);
}
/* Now Output the Form.

   Any necessary changes to the form should have been registered
   before now, including any error messages, notices, or
   complete form overhauls. This can happen either within the
   $udm object, or from print() or echo() statements.

   By default, the form will include AMP's base template code,
   and any database-backed intro text to the appropriate module.

*/
$intro_id = $udm->modTemplateID;
AMP_directDisplay($udm->output());
require_once 'AMP/BaseTemplate.php';
require_once 'AMP/BaseModuleIntro.php';
// Append the footer and clean up.
require_once 'AMP/BaseFooter.php';
コード例 #4
0
ファイル: profile.php プロジェクト: radicaldesigns/amp
$udm = new UserDataInput(AMP_dbcon(), 20);
$udm->getUser($AMP_Authen_Handler->getUserId());
// Hide fields that should be present on the signup form, but not on the edit form
// Custom1 = username
// Custom2 = password
// remember users email field so we can use it later when we save
$email = $udm->fields['Email'];
// Remove non-editable fields so that they don't display on the form
$non_editable_fields = array('custom1', 'custom2', 'Email');
foreach ($non_editable_fields as $field_name) {
    unset($udm->fields[$field_name]);
}
// if there is POST data, save and redirect back to self.
if (isset($_POST['btnUdmSubmit'])) {
    // add email field back in so DIA syncing works
    if (empty($udm->fields['Email'])) {
        $udm->fields['Email'] = $email;
        //add the email back in the post so that the udm save function doesn't throw a validation error.
        $_POST['Email'] = $email['value'];
    }
    $udm->saveUser();
    AMP_flashMessage('Profile Updated');
    AMP_redirect('profile.php');
}
//BaseModuleIntro uses this local variable to decide what intro text to display for this page.
//$intro_id = $udm->modTemplateID;
$intro_id = AMP_CONTENT_EDIT_PROFILE_INTROTEXT_ID;
AMP_directDisplay('<div id="' . sprintf(AMP_UDM_FORM_CONTAINER, 20) . '">' . $udm->output() . '</div>');
require_once 'AMP/BaseTemplate.php';
require_once 'AMP/BaseModuleIntro.php';
require_once 'AMP/BaseFooter.php';
コード例 #5
0
<?php

require_once 'AMP/Base/Config.php';
require_once 'AMP/Auth/Password/Reset.php';
require_once 'AMP/Auth/Password/Reset/Request/Form.php';
$login_type = AMP_params('login_type');
if (!($login_type && $login_type == 'content')) {
    trigger_error('attempted to request password reset for non-content login');
    AMP_redirect(AMP_CONTENT_URL_FRONTPAGE);
}
$pw_reset = new AMP_Auth_Password_Reset($login_type);
if ($pw_reset->success()) {
    AMP_flashMessage('You should receive an email message allowing you to reset your password shortly.');
    AMP_redirect(AMP_CONTENT_URL_FRONTPAGE);
} else {
    if ($pw_reset->submitted()) {
        AMP_flashMessage('I can\'t find that account, please try again.');
    }
    $form = new AMP_Auth_Password_Reset_Request_Form();
    $form->Build();
    AMP_directDisplay($form->execute());
    $intro_id = AMP_CONTENT_PUBLICPAGE_ID_PASSWORD_RESET;
    require_once 'AMP/BaseTemplate.php';
    require_once 'AMP/BaseModuleIntro.php';
    require_once 'AMP/BaseFooter.php';
}
コード例 #6
0
ファイル: BaseFooter.php プロジェクト: radicaldesigns/amp
 * Determine the status of the current Page and send the correct output
 *
 * @package Content 
 * @author Austin Putman <austin@radicaldesigns.org
 * @copyright Radical Designs 2005
 * @version 3.5.3
 * @since 2.0
 */
require_once 'AMP/Content/Page.inc.php';
$currentPage =& AMPContent_Page::instance();
if ($currentPage->isRedirected()) {
    ob_end_flush();
    exit;
}
if ($buffer_contents = ob_get_clean()) {
    AMP_directDisplay($buffer_contents, AMP_CONTENT_DISPLAY_KEY_BUFFER);
}
/**
 * displayType controls the formatting of the Page output  
 *
 * @var string
 */
$displayType = AMP_CONTENT_PAGE_DISPLAY_DEFAULT;
if (isset($_GET['printsafe']) && $_GET['printsafe'] == 1) {
    $displayType = AMP_CONTENT_PAGE_DISPLAY_PRINTERSAFE;
}
/**
 * finalPageHtml is the complete representation of the Page  
 */
$finalPageHtml = $currentPage->output($displayType);
print $finalPageHtml;