function _birthday() { // // main submodule for birthday // if (func_num_args()>0) { $arg_list = func_get_args(); $menu_id = $arg_list[0]; $post_vars = $arg_list[1]; $get_vars = $arg_list[2]; $validuser = $arg_list[3]; $isadmin = $arg_list[4]; //print_r($arg_list); } $b = new birthday; $b->greet_celebrant($menu_id, $post_vars, $get_vars); }
public function test06_as_string() { $_GET['birthday'] = 1; $_GET['birthmonth'] = 2; $_GET['birthyear'] = 3; $birthday = new birthday(); $this->assertEquals('3-2-1', $birthday->as_string()); $birthday->day = ''; $this->assertEquals('', $birthday->as_string()); }
function birthday_comment() { ?> <div class="mdl-card mdl-shadow--4dp mdl-cell mdl-cell--12-col"> <style> .demo-blog--blogpost .demo-blog__posts > .mdl-card .mdl-card__media { /*background-image: url('images/road_big.jpg');*/ height: 100px; } </style> <div class="mdl-card__media mdl-color-text--grey-50"> <h3><?php echo "Wish your Friend"; ?> </h3> </div> <div class="mdl-color-text--primary-contrast mdl-card__supporting-text comments"> <?php // including the birthday_wish forum if (islogin()) { $comment = $_POST['comment']; if (isset($comment) && !empty($comment)) { $comobj = new birthday(); $comobj->get_comment($uid, $comment); $comobj->check_exist(); $comobj->add_comment(); } } include 'core.php'; include 'birthday_wish.form.php'; // including the comments include 'birthday_wish.func.php'; include 'dbms/dbms_imp.php'; $today = date('Y-m-d'); $resultc = $connection->query("SELECT * FROM `bd_comments` WHERE `date`='{$today}' ORDER BY `bcid` DESC"); if (!$resultc) { echo "Comment loading failed" . mysqli_error($connection) . "<br/> Report it to Developers"; } while ($rows = $resultc->fetch_array()) { $comm = new birthday($rows[0]); birthday_wish($comm); } mysqli_close($connection); ?> </div> </div> <?php }
<?php /** * Created by PhpStorm. * User: Dabz * Date: 6/01/2015 * Time: 10:49 PM */ require_once 'birthday.php'; $person1 = new birthday('rajdeep', 'hazarika', '19/10/1983', ' male'); $person2 = new birthday('swagata', 'hazarika', '24/02/1984', 'female'); echo $person2->greet();
} } if (file_exists('../modules/barangay/class.barangay.php')) { include '../modules/barangay/class.barangay.php'; $barangay = new barangay; if (!$module->activated('barangay') && $initmod) { $barangay->init_sql(); $barangay->init_menu(); $barangay->init_deps(); $barangay->init_lang(); $barangay->init_help(); } } if (file_exists('../modules/birthday/class.birthday.php')) { include '../modules/birthday/class.birthday.php'; $birthday = new birthday; if (!$module->activated('birthday') && $initmod) { $birthday->init_sql(); $birthday->init_menu(); $birthday->init_deps(); $birthday->init_lang(); $birthday->init_help(); } } if (file_exists('../modules/calendar/class.calendar.php')) { include '../modules/calendar/class.calendar.php'; $calendar = new calendar; if (!$module->activated('calendar') && $initmod) { $calendar->init_sql(); $calendar->init_menu(); $calendar->init_deps();
define('IS_SITE_ADMIN', 1); $no_banner = 1; $rpath = "../../"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/birthday.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/classes/users.php"; session_start(); get_uid(); if (!hasPermissions('birthday')) { header("Location: /404.php"); exit; } $year = __paramInit('int', 'year', 'year', 2009); $action = __paramInit('string', 'action', 'action'); $id = __paramInit('int', 'id', 'id', NULL); $birthday = new birthday($year); switch ($action) { case "add": $login = __paramInit('string', 'login', 'login'); $usero = new users(); $usero->GetUser($login); if (!$usero->uid) { $error = "Ошибка. Пользователя с логином {$login} не существует"; break; } $usero->utype = is_emp() ? 2 : 1; $user['uname'] = __paramInit('string', NULL, 'name', $usero->uname); $user['usurname'] = __paramInit('string', NULL, 'surname', $usero->usurname); $user['utype'] = __paramInit('int', NULL, 'type', $usero->utype); if ($birthday->add($usero->uid, $user)) { header("Location: /siteadmin/birthday/?year={$year}");
<?php /** * Created by PhpStorm. * User: Dabz * Date: 6/01/2015 * Time: 10:49 PM */ require_once 'birthday.php'; $person1 = new birthday('rajdeep', 'hazarika', '19/10/1983', ' male'); $person2 = new birthday('swagata', 'hazarika', '24/02/1984', 'female'); echo $person2->greet(); $obj = new birthday('rajdeep', 'hazarika', '19/10/1983', 'male'); echo $obj->greet();
/** * Приглашение на банкет 2009 от сервиса. * * @deprecated */ public function BD2009() { return; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/birthday.php'; require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/messages.php'; $bd = new birthday(2009); $users = $bd->getAll(false); $this->subject = ''; $smtp = 0; $admin_id = users::GetUid($error, 'admin'); foreach ($users as $ikey => $user) { if (!$user['email']) { continue; } $email_msg = ''; $lichka_msg = ''; $this->recipient = $user['uname'] . ' ' . $user['usurname'] . ' [' . $user['login'] . '] <' . $user['email'] . '>'; $this->message = self::GetHtml($user['uname'], $email_msg); // если приветствия не надо, то добавить 3-й параметр: array('header'=>'no', 'footer'=>'no')); $smtp = $this->SmtpMail(false, $smtp, 'text/html'); $error = messages::Add($admin_id, $user['login'], $lichka_msg, ''); } self::SmtpClose($smtp); }
// This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero // General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program in a file in the toplevel directory called // "AGPLv3". If not, see <http://www.gnu.org/licenses/>. // // Authors: // Morgan Manach <*****@*****.**> // Loic Dachary <*****@*****.**> // require_once 'common.php'; require_once 'birthday.php'; $birthday = new birthday(); if (_post_string('submit')) { $account = array('name' => _post_string('name'), 'password' => _post_string('password'), 'password2' => _post_string('password2'), 'email' => _post_string('email'), 'firstname' => _post_string('firstname'), 'lastname' => _post_string('lastname'), 'addr_street' => _post_string('addr_street'), 'addr_street2' => _post_string('addr_street2'), 'addr_zip' => _post_string('addr_zip'), 'addr_town' => _post_string('addr_town'), 'addr_state' => _post_string('addr_state'), 'addr_country' => _post_string('addr_country'), 'phone' => _post_string('phone'), 'gender' => _post_string('gender'), 'birthdate' => $birthday->as_string()); try { if ($account['password'] != $account['password2']) { throw new Exception('Password and confirmation must be the same.'); } if ($account['email'] == '') { throw new Exception('Email is mandatory'); } $poker->send(array('type' => 'PacketPokerCreateAccount', 'name' => $account['name'], 'password' => $account['password'], 'email' => $account['email'], 'firstname' => $account['firstname'], 'lastname' => $account['lastname'], 'addr_street' => $account['addr_street'], 'addr_street2' => $account['addr_street2'], 'addr_zip' => $account['addr_zip'], 'addr_town' => $account['addr_town'], 'addr_state' => $account['addr_state'], 'addr_country' => $account['addr_country'], 'phone' => $account['phone'], 'gender' => $account['gender'], 'birthdate' => $account['birthdate'], 'affiliate' => 4242)); $poker->login($account['name'], $account['password']); header('Location: index.php?comment=Account%20created.'); die; } catch (Exception $e) { $poker_error = $e->getMessage();
<meta charset="UTF-8"> <title></title> <style> </style> </head> <body> <h1>Creating form.</h1> <div> <div> <form> Birthday: <input type="date"name="Birthday"></br> Submit.<input type="submit" name="Submit."> </form> </div> </div> <?php include_once "../../../" . 'vendor/autoload.php'; use src\Bitm\SEIP106607\Birthday; $Title = new birthday(); echo $Title->create(); echo "<hr \\>"; ?> </body> </html>