Example #1
0
 public static function setLastPageScrapped($location)
 {
     // $page = array();
     $page = Database::selectV1('fs_invited', '*', "location = '{$location}' && scrape_version = 1 order by invited_date desc limit 1");
     echo "<pre>";
     print_r($page);
     self::$page = !empty($page[0]['page']) ? $page[0]['page'] : 1;
 }
Example #2
0
 public static function setInvitedById($invited_id)
 {
     $invited = $database->selectV1('fs_invited', '*', "invited_id = {$invited_id} limit 1");
     self::$invitedLocation = $invited[0]['location'];
 }
Example #3
0
<?php

require "../../../fs_folders/php_functions/String/String.php";
require "../../../fs_folders/php_functions/Database/LookbookDatabase.php";
require "../../../fs_folders/php_functions/Program.php";
require "../../../fs_folders/php_functions/Time/Time.php";
require "../../../fs_folders/php_functions/myclass.php";
$time = new Time();
$program = new Program(new Database());
$mc = new myclass();
$database = new Database();
$database->connect();
$lookBookDatabase = new LookbookDataBase();
// $_GET['invitedIds'] = '615,614,613,612';
// $_GET['dateTime'] = '2015-01-05 08:20:23';
// update data
/*
   	$_GET['type'] = 'updateScrapedTimeSend';
switch (string::isEmpty($_GET['type'] , 'NULL'))
{
	case 'updateScrapedTimeSend': 
		$program->updateScrapedTimeSend(
			string::isEmpty(
				$_GET['dateTime'] , 
				'0000-00-00 00-00-00'
			) , 
			string::isEmpty(
				$_GET['invitedIds'] , 
				'0'
			)
		);   
Example #4
0
                    $('#signup-container-responsive').css('display', 'none');
                    $('body').css('background-color', 'rgba(000,000,000,0.8)');
                });
            </script>
        </head>

        <body>
        <?php
        echo "<div style='display:none' >";
        LookbookDataBase::$database = $db;
        LookbookDataBase::$database->connect();
        $email = (!empty($_GET['email'])) ? $_GET['email'] : '';
        // LookbookDataBase::updateEmailToOfficiallySignup($email);
        // $blog =  LookbookDataBase::getBlogByEmail($email);
        echo "</div>";
        $fname = LookbookDataBase::getFirstNameByEmail($email);
        $mc->signup_popUp_responnsive1(true, ' ' . $fname);
        ?>
        </body>
        </html>


    <?php
    } else {

        $email = '';
        $blog = '';  ?>
        <!-- <br /><b>Notice</b>:  Undefined variable: blog in <b>E:\xampp\htdocs\fs\new_fs\alphatest\signup.php</b> on line <b>107</b><br /> -->
        <!DOCTYPE html>
        <html lang="en">
        <head>
Example #5
0
 function sendInvitationToInvitedEmail($invitedInformation, $sc, $mc)
 {
     $totalDaysAllowedMax = 3;
     // when the days passed by 3 days then the system will send an invite to the specific emails
     $totalTimeAllowedMax = 0;
     // when hours come and it should send if the hours remaining is between 2 - 0.
     $totalTimeAllowedMin = 0;
     // when hours come and it should send if the hours remaining is between 2 - 0.
     $subject = 'An Invitation to Share Your Blog Content on Fashion Sponge';
     // title of the invite email
     $from = '*****@*****.**';
     //sender of the invite email
     $type = 'invitations';
     //email type dont change it
     $totalEmailSentMLimit = 3;
     //after 3 then the invited person should go to personal invite
     $counter = 0;
     $firstSentEmailTotalEmailSent = 0;
     // set zero because if total email sent is zero then that is first time of sending the invitation
     $firstSentEmailTotalDays = 1;
     // set 1 because if the days passed is 1 day then the invitation email sent for the first time
     $firstSentEmailTotalTime = 0;
     // set zero because if the time is zero like 8:00 = 8:00 the and day is 1 then email will be sent for the first time.
     for ($i = 0; $i < count($invitedInformation); $i++) {
         //initialized data
         $counter++;
         $invited_id = $invitedInformation[$i]['invited_id'];
         $invited_email = $invitedInformation[$i]['invited_email'];
         $invited_fn = $invitedInformation[$i]['invited_fn'];
         $DateTimeSend = $invitedInformation[$i]['DateTimeSend'];
         $timezoneUrl = $invitedInformation[$i]['timezone_url'];
         $temail_sent = $invitedInformation[$i]['temail_sent'];
         $invited_status = $invitedInformation[$i]['invited_status'];
         $location = $invitedInformation[$i]['location'];
         $timezone = $invitedInformation[$i]['timezone'];
         //notification send to admin when email clicked action
         $action = 'Recieved Notification';
         $to = 'mrjesuserwinsuarez@gmail.com,pecotrain1@gmail.com';
         $subject1 = 'Invited person recieved email';
         // 'invited person clicked the email content ' .  $action;
         $body = 'Full Name: ' . $invited_fn . "\n" . 'Email: ' . $invited_email . "\n" . 'Action: ' . $action . "\n" . 'Total Email Sent ' . $temail_sent;
         $from1 = $invited_email;
         $title = 'Fs Recieved Invitation';
         $defaultLink = 'http://fashionsponge.com/';
         //get timezone date time
         //$locationDateTime  = $sc->get_time_zone_time($timezoneUrl,$mc);
         echo " timezone = {$timezone} ";
         Time::setTimeZoneDateTime($timezone);
         //server time send
         $serverDate = Time::getDateRemoveTime($DateTimeSend);
         $serverTime = Time::getTimeRemoveDate($DateTimeSend);
         //timezone time
         $locationDate = Time::getTimezoneDate();
         //Time::getDateRemoveTime($locationDateTime);
         $locationTime = Time::getTimeZoneTime24();
         //Time::getFromTime12ToTime24(); // the set of the time is in the get_time_zone_time();
         $locationTime1 = Time::getTimeZoneTime24();
         //Time::getTimeRemoveDate($locationDateTime);
         // echo " time location $locationTime <br> ";
         // get total passed days
         $totalPassedDays = Time::getTotalDaysPassed($serverDate, $locationDate);
         //get time difference
         Time::setTimeDifference($serverTime, $locationTime);
         //variables declare
         $this->setFirstName($invited_fn);
         $this->setNewTotalEmailSent($temail_sent);
         //validate information
         $dateTimeValidadted = $this->validateDateAndTimeToSendInvitation($totalPassedDays, $totalDaysAllowedMax, Time::getTotalHours(), $totalTimeAllowedMax, $totalTimeAllowedMin, $firstSentEmailTotalEmailSent, $firstSentEmailTotalDays, $firstSentEmailTotalTime, $temail_sent);
         if ($dateTimeValidadted === TRUE) {
             if ($mc->send_email_signup_to_user(' ' . $this->getFirstName(), $invited_email, $type, $from, $subject)) {
                 echo "<b><h3> SUCCESSFULLY SENT EMAIL INVITE</H3>";
                 if (Program::emailInvitationClickedSaveActivityAndRedirectLocation($defaultLink, $action, $invited_email, FALSE, Program::$adminEmail, $subject1, $body, $from1, $title)) {
                     echo '<br>' . 'notification sent to Email sent to admins = ' . Program::$adminEmail . ' that new invitation sent to ' . $invited_email;
                 } else {
                     echo '<br>' . '<b> failled to send notifacation to the admins  ' . Program::$adminEmail . ' that new invitation is sent to ' . $invited_email;
                 }
             } else {
                 echo "<b><h3> FAILLED SENT EMAIL INVITE</H3>";
             }
             if (LookbookDataBase::updateTimeSendAndTotalEmailSent($this->getNewTotalEmailSent(), Time::getTimeZoneDateTime24(), "invited_id = {$invited_id}")) {
                 echo "<b><h3> LOCATION TIME AND TOTAL EMAIL SENT SUCCESSFULLY UPDATED </H3>";
             } else {
                 echo "<b><h3> LOCATION TIME AND TOTAL EMAIL SENT FAILLED SENT EMAIL INVITE</H3>";
             }
             if (LookbookDataBase::ifExceedTotalSendEmailThenMovedToPersonalInvite($this->getNewTotalEmailSent(), $totalEmailSentMLimit, "invited_id = {$invited_id}")) {
                 echo "<b><h3> USER SUCCESSFULLY TO MOVED PERSONAL INVITED </H3>";
             } else {
                 echo "<b><h3> USER FAILLED TO MOVED PERSONAL INVITED </H3>";
             }
         } else {
             echo "<br> dont send invitation to email because validation of days and time is false";
             //refuse semd invitation email
         }
         // echo " hourMinutes $hourMinutes  minutes  $minutes hours $hours";
         echo "<br>  \t  \n\t\t\t\tnumber: {$counter} .) <br>\n\t\t\t\tecmail with: btag {$invited_email} <br>\n\t\t\t\tlocation: {$location} <br>\n\t\t\t\temail: {$invited_email}<br>\n\t\t\t\t<b>database time </b><br>\n\t\t\t\tdate: {$serverDate} <br>\n\t\t\t\ttime: {$serverTime} <br>  \n\t\t\t\t<b>location</b><br>\n\t\t\t\tdate: {$locationDate} <br>\n\t\t\t\ttime: {$locationTime}  or  " . Time::$hour12 . "   <br>   \n\t\t\t\t<b>calculation</b><br> \n\t\t\t\ttotal passed days: {$totalPassedDays} <br>\n\t\t\t\ttotal passed time: " . Time::getTotalHours() . " <br>\n\t\t\t";
         echo "<hr>";
     }
 }
Example #6
0
 public function updateScrapedTimeSend($dateTime, $invitedIds)
 {
     return LookbookDataBase::updateScrapedTimeSendDb($dateTime, $invitedIds);
 }
Example #7
0
<?php     
	echo "<div style='display:none' >";
	require 'fs_folders/php_functions/Database/Database.php';
    require 'fs_folders/php_functions/Database/LookbookDatabase.php';   
    LookbookDataBase::$database = new Database(); 
    LookbookDataBase::$database->connect();  
	$email = (!empty($_GET['email'])) ? $_GET['email'] : '' ;  
	if (LookbookDataBase::updateEmailToOfficiallySignup($email)) 
	{   
		$message = "Congratulation $email Succesfully signup click <a href='http://fashionsponge.com/' >here</a> to visit home page."; 
	}
	else
	{  
		$message = "Failled to signup click <a href='http://fashionsponge.com/' >here</a> to visit home page."; 
	}  
	echo "</div>";

	echo "$message";