Example #1
0
 public function actionTest()
 {
     /*      $user_id = Yii::app()->user->id;
           var_dump(Yii::app()->user->isAdmin);
           //print_r(User::model()->findByPk($user_id));
           echo 'Places='.Place::model()->countUserPlaces($user_id);
           echo 'Blocks='.Place::model()->countOwnedBlocks($user_id);
           echo 'Estabs='.Place::model()->countOwnedEstablishments($user_id);
           yexit();*/
     $po = new Pushover();
     $po->setToken(Yii::app()->params['pushover']['key']);
     $po->setUser(getUserProfile(Yii::app()->user->id)->getAttribute('pushover_token'));
     $po->setDevice(getUserProfile(Yii::app()->user->id)->getAttribute('pushover_device'));
     $po->setTitle('Hey ' . getFirstName());
     $po->setMessage('Hello world! ' . time());
     $po->setUrl('http://jeffreifman.com/blog/');
     $po->setUrlTitle('cool blog');
     $po->setPriority(1);
     $po->setTimestamp(time());
     $po->setDebug(true);
     $go = $po->send();
     echo '<pre>';
     print_r($go);
     echo '</pre>';
 }
Example #2
0
     if (argsLen($args, 1)) {
         getWorksite($args[0]);
     } else {
         incorrect();
     }
     break;
 case 'getPosition':
     if (argsLen($args, 1)) {
         getPosition($args[0]);
     } else {
         incorrect();
     }
     break;
 case 'getFirstName':
     if (argsLen($args, 1)) {
         getFirstName($args[0]);
     } else {
         incorrect();
     }
     break;
 case 'getLastName':
     if (argsLen($args, 1)) {
         getLastName($args[0]);
     } else {
         incorrect();
     }
     break;
 case 'getCostCenter':
     if (argsLen($args, 1)) {
         getCostCenter($args[0]);
     } else {
Example #3
0
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Edit Student Information</title>
    <link rel="stylesheet" type="text/css" href="css/standard.css">
  </head>
  <body>
    <div id="login">
      <div id="form">
			<div class="top">
			<h2>Edit Student Information<span class="login-create"></span></h2>
			<form action="StudProcessEdit.php" method="post" name="Edit">
			<div class="field">
				<label for="firstN">First Name</label>
				<input id="firstN" size="30" maxlength="50" type="text" name="firstN" required value=<?php 
echo getFirstName();
?>
>
			</div>
			<div class="field">
			  <label for="lastN">Last Name</label>
			  <input id="lastN" size="30" maxlength="50" type="text" name="lastN" required value=<?php 
echo getLastName();
?>
>
			</div>
			<div class="field">
				<label for="studID">Student ID</label>
				<input id="studID" size="30" maxlength="7" type="text" pattern="[A-Za-z]{2}[0-9]{5}" title="AB12345" name="studID" disabled value=<?php 
echo $_SESSION["studID"];
?>
Example #4
0
$teamEmailList = chop($teamEmailList, ", ");
$teamEmailList = strrev(implode(strrev(' and'), explode(',', strrev($teamEmailList), 2)));
$ecard->teamEmailList = $teamEmailList;
?>

<div class="ecardPadding">
	<?php 
// get first team member
$ecard->full_name = $firstPersonEmpNum->Fname . ' ' . $firstPersonEmpNum->Sname;
$ecard->Fname = $ecard->Team;
if ($ecard->Volunteer != '') {
    $ecard->NomFull_name = $ecard->Volunteer;
} else {
    $ecard->NomFull_name = getName($ecard->NominatorEmpNum);
}
$ecard->NomFname = getFirstName($ecard->NominatorEmpNum);
if ($ecard->littleExtra == 'Yes') {
    echo indEcardTeamExtraText($ecard);
} else {
    echo indEcardTeamText($ecard);
}
?>
	<p>Thank you and well done!</p>
	<p><b>Our Heroes Team</b></p>
	<p class="small">Xexec ref: <?php 
echo $ecard->ID;
?>
</p>
	</div>
	<div class="ourheroes">
		<img class="emailCruklogo" src="<?php 
Example #5
0
function getUserBasics($typeOfUser = "******")
{
    global $lastNames;
    global $middleNames;
    global $emailProviders;
    global $states;
    global $ages;
    // global $subscribed;
    global $logFileHandle;
    /********************************************/
    // password - only if trad user
    if ($typeOfUser == "trad") {
        $thisUser["password"] = rand(100, 999) . rand(100, 999) . rand(100, 999) . rand(100, 999);
    }
    /********************************************/
    // birthday
    $age = getRandomValue($ages, max(array_keys($ages)));
    $yob = date("Y") - $age;
    $thisUser["birthday"] = getBirthday($yob);
    fwrite($logFileHandle, "<p>The yob is: " . $yob);
    /*******************************************/
    // gender
    // $thisUser["gender"] = "female";
    $thisUser["gender"] = getGender($age);
    // if (rand(1,100) > 56) { $thisUser["gender"] = "male"; }
    /*******************************************/
    // givenName
    $thisUser["givenName"] = getFirstName($thisUser["gender"], $yob);
    /*******************************************/
    // middleName
    // just a middle initial
    $thisUser["middleName"] = $middleNames[rand(0, sizeof($middleNames) - 1)];
    /*******************************************/
    // familyName
    $thisUser["familyName"] = $lastNames[rand(0, sizeof($lastNames) - 1)];
    // $fullname is used in creating the email address
    // tom.g.smith
    $fullName = strtolower($thisUser["givenName"] . "." . $thisUser["middleName"] . "." . $thisUser["familyName"]);
    // Get rid of apostrophe in O'Connor, for example
    $fullName = str_replace("'", "", $fullName);
    fwrite($logFileHandle, "<p>The full name is: " . $fullName);
    /*******************************************/
    // email
    $emailProvider = $emailProviders[rand(0, sizeof($emailProviders) - 1)];
    $thisUser["email"] = strtolower($fullName . "@" . $emailProvider);
    /*******************************************/
    // primaryAddress/country
    $thisUser["primaryAddress"]["country"] = getCountry();
    /*******************************************/
    // primaryAddress>stateAbbreviation
    if ($thisUser["primaryAddress"]["country"] == "United States") {
        $thisUser["primaryAddress"]["stateAbbreviation"] = getRandomValue($states, max(array_keys($states)));
    }
    /******************************************/
    // subscribed
    // Newsletter subscription status
    // $thisUser["subscribed"] = getRandomValue($subscribed);
    /******************************************/
    // Account created
    $thisUser["createdFake"] = getAccountCreationDate($thisUser["gender"]);
    fwrite($logFileHandle, "<p>The account creation date is: " . $thisUser["createdFake"]);
    /******************************************/
    // emailVerified
    $thisEmail = getEmailVerifiedDate();
    if (!empty($thisEmail)) {
        $thisUser["emailVerified"] = $thisEmail;
    }
    /******************************************/
    $thisUser["isAutogeneratedUser"] = "******";
    /******************************************/
    // Done!
    return $thisUser;
}
Example #6
0
?>
/css/form.css" />
	

	<title><?php 
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>

<body>

<div class="container" >

		<?php 
$this->widget('bootstrap.widgets.TbNavbar', array('brandUrl' => Yii::app()->getBaseUrl(true), 'collapse' => true, 'items' => array(!Yii::app()->user->isGuest ? array('class' => 'bootstrap.widgets.TbMenu', 'htmlOptions' => array('class' => 'pull-left'), 'items' => array(array('label' => 'Lists', 'url' => array('/mglist/index')), array('label' => 'Synchronize', 'url' => array('/mglist/syncAll')))) : array(), array('class' => 'bootstrap.widgets.TbMenu', 'htmlOptions' => array('class' => 'pull-right'), 'items' => array(array('label' => 'About', 'items' => array(array('url' => 'http://blog.mailgun.com/post/turnkey-mailing-list-applet-using-the-mailgun-php-sdk', 'label' => 'Read the tutorial'), array('url' => 'https://github.com/mailgun/listapp', 'label' => 'Get the code'), array('url' => 'http://documentation.mailgun.com/api-mailinglists.html', 'label' => 'Mailgun documentation'), array('url' => 'blog.mailgun.com/post/the-php-sdk-the-first-of-many-official-mailgun-sdks/', 'label' => 'Mailgun PHP SDK'), array('url' => 'http://jeffreifman.com/consulting', 'label' => 'About NewsCloud'))), array('label' => 'Account', 'items' => array(array('label' => 'Hi ' . getFirstName(), 'visible' => !Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->loginUrl, 'label' => Yii::app()->getModule('user')->t("Login"), 'visible' => Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->registrationUrl, 'label' => Yii::app()->getModule('user')->t("Sign up"), 'visible' => Yii::app()->user->isGuest), array('url' => Yii::app()->getModule('user')->logoutUrl, 'label' => 'Sign out', 'visible' => !Yii::app()->user->isGuest))))))));
?>
	<!-- mainmenu -->
	<?php 
//if(isset($this->breadcrumbs))     $this->widget('bootstrap.widgets.TbBreadcrumbs', array('links'=>array('Library'=>'#', 'Data'),));
?>
	<div class="nav_spacer">&nbsp;</div>
	  
	<?php 
echo $content;
?>

	<div class="clear"></div>

	<div id="footer">
    <div class="left">Provided by <a href="http://mailgun.com">Mailgun</a></div>
Example #7
0
  <head>
    <meta charset="UTF-8" />
    <title>Confirm Appointment</title>
	<link rel='stylesheet' type='text/css' href='css/standard.css'/>  </head>
  <body>
	<div id="login">
      <div id="form">
        <div class="top">
		<h1>Confirm Appointment</h1>
	    <div class="field">
		<form action = "StudProcessSch.php" method = "post" name = "SelectTime">
	    <?php 
$debug = false;
include 'GetStudentData.php';
$COMMON = new Common($debug);
$firstn = getFirstName();
$lastn = getLastName();
$studid = $_SESSION["studID"];
$major = getMajor();
$email = getEmail();
if ($_SESSION["resch"] == true) {
    $sql = "select * from Proj2Appointments where `EnrolledID` like '%{$studid}%'";
    $rs = $COMMON->executeQuery($sql, $_SERVER["SCRIPT_NAME"]);
    $row = mysql_fetch_row($rs);
    $oldAdvisorID = $row[2];
    $oldDatephp = strtotime($row[1]);
    if ($oldAdvisorID != 0) {
        $sql2 = "select * from Proj2Advisors where `id` = '{$oldAdvisorID}'";
        $rs2 = $COMMON->executeQuery($sql2, $_SERVER["SCRIPT_NAME"]);
        $row2 = mysql_fetch_row($rs2);
        $oldAdvisorName = $row2[1] . " " . $row2[2];
Example #8
0
         $email = sendEmail($sendEmail, 'T' . $id);
         $_SESSION['alreadydone'] = 'yes';
     }
 }
 // send email to teamnominee
 if ($_SESSION['teamnominee']->Volunteer != '') {
     $_SESSION['teamnominee']->NomFull_name = $_SESSION['teamnominee']->Volunteer;
 } else {
     $_SESSION['teamnominee']->NomFull_name = $_SESSION['user']->full_name();
 }
 // get team ecard
 if ($searchList) {
     foreach ($searchList as $list) {
         $_SESSION['teamnominee']->teamEmailList = $teamEmailList;
         $_SESSION['teamnominee']->Eaddress = $list->Eaddress;
         $_SESSION['teamnominee']->Fname = getFirstName($list->EmpNum);
         $_SESSION['teamnominee']->full_name = getName($list->EmpNum);
         $_SESSION['teamnominee']->content = indEcardTeamText($_SESSION['teamnominee']);
         // need to add to tblnominations
         $stmt = $db->prepare("INSERT INTO tblnominations(\n\t\t\t\t\t\t\t\tawardType, NominatorEmpNum, NominatedEmpNum, nomination_teamID, Volunteer, ApproverEmpNum,\n\t\t\t\t\t\t\t\tlittleExtra, amount, personalMessage, NomDate, AprDate, AprStatus, awardPrivate) \n\t\t\t\t\t\t\t\tVALUES (:awardType, :NominatorEmpNum, :NominatedEmpNum, :nomination_teamID, :Volunteer, :ApproverEmpNum, \n\t\t\t\t\t\t\t\t:littleExtra, :amount, :personalMessage, NOW(), NOW(), :AprStatus, :awardPrivate)");
         $stmt->bindParam(':awardType', $a = 2);
         $stmt->bindParam(':NominatorEmpNum', $_SESSION['user']->EmpNum);
         $stmt->bindParam(':NominatedEmpNum', $list->EmpNum);
         $stmt->bindParam(':nomination_teamID', $id);
         $stmt->bindParam(':Volunteer', $_SESSION['teamnominee']->Volunteer);
         $stmt->bindParam(':ApproverEmpNum', $AppEmpNum->AppEmpNum);
         $stmt->bindParam(':littleExtra', $a = 'No', PDO::PARAM_STR);
         $stmt->bindParam(':amount', $a = 0);
         $stmt->bindParam(':personalMessage', $_SESSION['teamnominee']->personalMessage);
         $stmt->bindParam(':AprStatus', $a = 1);
         $stmt->bindParam(':awardPrivate', $_SESSION['teamnominee']->awardPrivate);