PHP Method User::sessionPersistent, Code Examples

PHP User::sessionPersistent - 10 examples found. These are the top rated real world PHP examples of method User::sessionPersistent from package extracted from open source projects. You can rate examples to help us improve the quality of examples
 /**
  * A custom method within the Plugin to generate the content
  * 
  * @return string : HTML form
  * @see class/UserRelations.class.php
  */
 function generateCoworkerSearchForm()
 {
     $output = '<div>' . _('Search for Co-Workers by first or last name:') . '</div>';
     if (!is_object($_SESSION['do_User_search'])) {
         $do_User_search = new User();
         $do_User_search->sessionPersistent("do_User_search", "logout.php", OFUZ_TTL);
     }
     $e_search = new Event("do_User_search->eventSetSearchByName");
     $e_search->setLevel(500);
     $e_search->addParam("goto", "co_worker_search.php");
     $output .= $e_search->getFormHeader();
     $output .= $e_search->getFormEvent();
     $output .= '<div class="marginform">
                   <input type="Text" name="search_txt" id="search_txt" value="">
                </div>
                 <div class="dottedline"></div>
                 <div class="section20">
                   <input type="submit" value="Search" />
                 </div>
         </div></form>';
     return $output;
 }
Example #2
0
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
$pageTitle = 'Ofuz :: Login';
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once 'config.php';
include_once 'includes/i_header.inc.php';
?>
<div class="loginbg1">
    <div class="loginbg_mobile">
    <?php 
$loginForm = new User();
$loginForm->sessionPersistent("do_User", "", 36000);
if ($_GET['message']) {
    ?>
        <div class="error_message">
        <?php 
    echo htmlentities(stripslashes($_GET['message']));
    ?>
        </div>
    <?php 
}
?>
        <div class="text">
            <?php 
$_SESSION['do_User']->formLogin("i_contacts.php", "Incorrect username or password", "text", $_SERVER['PHP_SELF']);
?>
            If you have not registered yet, please do so <a href="user_register.php">here</a> .<br />
Example #3
0
//]]>
</script>

<div class="loginbg1">
    <div class="loginheader"><a href="/index.php"><img src="/images/ofuz_logo2.jpg" width="170" height="90" alt="" /></a></div>
 <div class="messageshadow" style="width:440px; margin: 0 auto">
     <div class="messages">
        <?php 
echo htmlentities(stripslashes($_GET['message']));
?>
        </div>
      </div>
    <div class="loginbg2">
    <?php 
$loginForm_tw = new User();
$loginForm_tw->sessionPersistent('do_User_login', 'logout.php', 36000);
?>
        <div class="text">
      <div class="section20">
            <?php 
echo _('If you are a new Ofuz user, please continue with your Google account information to create a new account:');
?>
<br /><br />
        <?php 
$e_google_user_reg = new Event("User->eventRegGoogleUser");
$e_google_user_reg->setLevel(20);
$e_google_user_reg->addParam("google_openid_identity", $_SESSION["google"]["openid_identity"]);
$e_google_user_reg->addParam("err_page", $_SERVER["PHP_SELF"]);
echo $e_google_user_reg->getFormHeader();
echo $e_google_user_reg->getFormEvent();
?>
Example #4
0
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
/**
 * A cron job script for sending the autoresponders.
 * Will get the autoresponders with the tags and will send the email to the contacts associated with the tag_name
 * @see class/Autoresponder.class.php
 */
include_once 'config.php';
$AutoResponder = new AutoResponder();
$AutoResponder->getAutoresponders();
if ($AutoResponder->getNumRows()) {
    while ($AutoResponder->next()) {
        $User = new User();
        $User->getId($AutoResponder->iduser);
        $User->sessionPersistent('do_User', 'contacts.php', OFUZ_TTL);
        $email_template = new EmailTemplate();
        $email_template->bodyhtml = nl2br(stripslashes($AutoResponder->bodyhtml));
        $email_template->subject = $AutoResponder->subject;
        $email_template->senderemail = $User->email;
        $email_template->sendername = $User->firstname . ' ' . $User->lastname;
        $resp_name = $AutoResponder->resp_name;
        $Contact = new Contact();
        $Contact->getContactsForAutoResponder($AutoResponder->iduser, $AutoResponder->tag_name, $AutoResponder->num_days_to_send);
        if ($Contact->getNumRows()) {
            while ($Contact->next()) {
                $values = array("idcontact" => $Contact->idcontact, "firstname" => $Contact->firstname, "lastname" => $Contact->lastname, "position" => $Contact->position, "company" => $Contact->company, "idtag" => $Contact->idtag, "resp_name" => $resp_name, "flag" => "unsubscribe_autoresponder");
                $Contact->sendMessage($email_template, $values);
                echo '<br /> Email Sent to :' . $Contact->email_address;
            }
        }
$Author = 'SQLFusion LLC';
$Keywords = 'Keywords for search engine';
$Description = 'Description for search engine';
$background_color = 'white';
include_once "config.php";
include_once "includes/header.inc.php";
?>

<div class="loginbg1">
    <div class="loginheader"><a href="/index.php"><img src="/images/ofuz_logo2.jpg" width="170" height="90" alt="" /></a></div>
    <div class="loginbg2">
<?php 
if ($_GET['openidmessage']) {
    ?>
<div class="error_message"><?php 
    echo htmlentities(stripslashes($_GET['openidmessage']));
    ?>
</div>
<?php 
}
$do_user = new User();
$do_user->sessionPersistent("do_User", "signout.php", 36000);
$_SESSION['do_User']->formRegisterOpenId('index.php', 'regthank', 'admin_registration_alert', 'support@sqlfusion.com');
?>
    </div>
</div>



  </body>
</html>
Example #6
0
        </div>
      </div>
    <div class="loginbg2">
    <?php 
$loginForm_tw = new User();
$loginForm_tw->sessionPersistent('do_User_login', 'logout.php', 36000);
?>
        <div class="text">
		    <div class="section20">
            <?php 
echo _('If you are a new Ofuz user, please enter your email address below:');
?>
<br /><br />
            <?php 
$loginFormEmail_tw = new User();
$loginFormEmail_tw->sessionPersistent('do_User_login_email', 'logout.php', 36000);
$e_new_tw_reg = new Event('do_User_login_email->eventRegNewTwUser');
$e_new_tw_reg->setLevel(20);
$e_new_tw_reg->addParam('tw_user_id', $_SESSION['TWITTER_REGISTER']['tw_user_id']);
$e_new_tw_reg->addParam('tw_screen_name', $_SESSION['TWITTER_REGISTER']['tw_screen_name']);
$e_new_tw_reg->addParam('tw_token', $_SESSION['TWITTER_REGISTER']['tw_token']);
$e_new_tw_reg->addParam('firstname', $_SESSION['TWITTER_REGISTER']['firstname']);
$e_new_tw_reg->addParam('lastname', $_SESSION['TWITTER_REGISTER']['lastname']);
$e_new_tw_reg->addParam('errPage', 'tw_user_register.php');
echo $e_new_tw_reg->getFormHeader();
echo $e_new_tw_reg->getFormEvent();
echo _('Your email address: ') . '<input type="Text" name="emailid" id="emailid" class="formfield" /><br />';
echo '<div align="right"><input type="submit" value="' . _('Continue') . '" /></div>';
echo '</form>';
echo '</div>';
?>
$loginForm_fb = new User();
$loginForm_fb->sessionPersistent("do_User_login", "logout.php", 36000);
//  if ($_GET['message']) {
?>
    <?php 
//}
?>
        <div class="text">
		    <div class="section20">
		<?php 
echo _('If you are a new Ofuz user, please enter your email address below:');
?>
<br />
            <?php 
$loginFormEmail_fb = new User();
$loginFormEmail_fb->sessionPersistent("do_User_login_email", "logout.php", 36000);
$e_new_fb_reg = new Event("do_User_login_email->eventRegNewFbUser");
$e_new_fb_reg->setLevel(20);
$e_new_fb_reg->addParam("fbuid", $_SESSION['do_ofuz_fb']->fb_uid);
$e_new_fb_reg->addParam("fname", $fname);
$e_new_fb_reg->addParam("lname", $lname);
$e_new_fb_reg->addParam("comp", $company);
$e_new_fb_reg->addParam("position", $position);
$e_new_fb_reg->addParam("errPage", "fb_ofuz_login_verification.php");
echo $e_new_fb_reg->getFormHeader();
echo $e_new_fb_reg->getFormEvent();
echo _('Your email address: ') . '<input type="Text" name = "emailid" id = "emailid" class="formfield" ><br />';
echo '<div align="right"><input type="submit" value="' . _('Continue') . '" /></div>';
//echo '<div class="section20">';
//echo '<div class="dottedline"></div>';
echo '</form>';
Example #8
0
 * @package RadriaSampleSite
 * @author Philippe Lewicki  <phil@sqlfusion.com>
 * @copyright  SQLFusion LLC 2012
 * @version 1.0
 */
$pageTitle = "Users :: Details";
$Author = "SQLFusion";
$Keywords = "Keywords for search engine";
$Description = "Description for search engine";
$background_color = "white";
$background_image = "";
include_once "config.php";
include "includes/header.inc.php";
if (!isset($_SESSION['do_user'])) {
    $do_user = new User();
    $do_user->sessionPersistent('do_user', 'index.php');
} else {
    $do_user = $_SESSION['do_user'];
}
if ($_GET['id']) {
    $do_user->getId((int) $_GET['id']);
}
?>
<div><a href="users.php">Return to the list of users</a></div>
<div><a href="user_edit.php?id=<?php 
echo $do_user->iduser;
?>
">Edit User: <?php 
echo $do_user->firstname;
?>
</a><br>
Example #9
0
        <div class="left_menu_header">
            <div class="left_menu_header_content"><?php 
echo _('Find Co-Workers');
?>
</div>
        </div>
        <div class="left_menu">
            <div class="left_menu_content">
                <div><?php 
echo _('Search for Co-Workers by first or last name:');
?>
</div>
                <?php 
if (!is_object($_SESSION['do_User_search'])) {
    $do_User_search = new User();
    $do_User_search->sessionPersistent("do_User_search", "logout.php", 36000);
}
$e_search = new Event("do_User_search->eventSetSearchByName");
$e_search->setLevel(20);
$e_search->addParam("goto", "co_worker_search.php");
echo $e_search->getFormHeader();
echo $e_search->getFormEvent();
?>
                   <div class="marginform">
                      <input type="Text" name = "search_txt" id = "search_txt" value = "<?php 
echo $_SESSION['do_User_search']->user_search_txt;
?>
">
                   </div>
                    <div class="dottedline"></div>
                    <div class="section20">
Example #10
0
<?php

/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
// Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
/** Ofuz Open Source version is released under the GNU Affero General Public License, please read the full license at: http://www.gnu.org/licenses/agpl-3.0.html **/
/**
 * unsubscribe a user 
 */
include_once "config.php";
$idcontact = (int) $_GET['idc'];
$iduser = (int) trim($_GET['idu']);
$do_contact = new Contact();
//$do_contact->getId($idcontact);
$do_user = new User();
$do_user->getId($iduser);
$do_user->sessionPersistent('user_unsub', 'unsubscribe_message.php', TTL_OFUZ);
$do_contact->query("SELECT * \n                            FROM  contact \n                            WHERE contact.idcontact=" . $idcontact . " AND contact.iduser = " . $iduser);
if ($do_contact->getNumRows() == 0) {
    $do_contact->query("SELECT contact.*\n                            FROM contact, contact_sharing \n                            WHERE `contact_sharing`.`idcoworker` = " . $iduser . "\n                            AND contact.idcontact = contact_sharing.idcontact\n\t\t\t\t\t\t\tAND contact.idcontact=" . $idcontact);
}
if ($do_contact->getNumRows() == 1 && $do_user->getNumRows() == 1) {
    $do_contact->email_optout = 'y';
    $do_contact->update();
    $do_workfeed_uns = new WorkFeedContactUnsubscibeEmails();
    $do_workfeed_uns->addUnsubscribeEmailWorkfeed($do_contact);
}
//$do_contact->sessionPersistent('do_contact', 'unsubscribe_messaage.php', OFUZ_TTL);
header("Location: /unsubscribe_message.php");
exit;