本文整理汇总了PHP中myclass类的典型用法代码示例。如果您正苦于以下问题:PHP myclass类的具体用法?PHP myclass怎么用?PHP myclass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了myclass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: account_save_profile
public function account_save_profile($profile_row_name, $profile_row_name_val, $mno)
{
$mc = new myclass();
$fullName = '';
$isName = FALSE;
echo " profile_row_name_val = {$profile_row_name_val}";
$prn = explode(',', $profile_row_name);
$prnv = explode('_new_', $profile_row_name_val);
echo " rowname <br> ";
print_r($prn);
echo " values <br>";
print_r($prnv);
for ($i = 0; $i < count($prn); $i++) {
#check if exist if its exist then return faild.
$rn = $prn[$i];
$rv = $prnv[$i];
// $rv = str_replace('Your Firstname','',$rv);
$rv = str_replace('Your Nickname / Alias', '', $rv);
$rv = str_replace('Your Lastname', '', $rv);
// if update the full name
if ($rn == 'lastname' || $rn == 'firstname' || $rn == 'nickname' || $rn == 'middlename') {
$rv = ucwords($rv);
$isName = TRUE;
$fullName .= $rv . ' ';
}
//if update the username
if ($rn == 'username' || $rn == 'email') {
update1('fs_member_accounts', $rn, $rv, array('mno', $mno));
} else {
update1('fs_members', $rn, $rv, array('mno', $mno));
}
}
// If name is being updated then notify all the followers
if ($isName == TRUE) {
$_SESSION['noti_table_name'] = TRUE;
$_SESSION['noti_type'] = 'change-name';
$_SESSION['fullName'] = $fullName;
$mc->send_notification_to_follower($mno);
print 'send notification to follwers change name';
} else {
print 'failed to send notification maybe this is not changing name';
}
// add or updated keyword
$mc->fs_search(array('type' => 'add-or-updated-keyword', 'table_name' => 'fs_members', 'table_id' => $mno));
}
示例2: toplook
function toplook($from, $rows)
{
$mc = new myclass();
$date_dif = $mc->date_difference();
if ($_SESSION['show'] == 'today') {
$q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['today']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} ";
}
if ($_SESSION['show'] == 'week') {
$q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_week']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} ";
}
if ($_SESSION['show'] == 'month') {
$q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_month']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} ";
}
if ($_SESSION['show'] == 'year') {
$q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_year']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} ";
}
if ($_SESSION['show'] == 'all') {
$q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} ";
}
$ex = mysql_query($q) or die(mysql_error());
$i = 1;
while ($r = mysql_fetch_array($ex)) {
$plinfo = $mc->posted_look_info($r[0]);
$xx = mysql_query("select sum(rating) from ratings where plno={$r['0']}") or die(mysql_error());
$rr = mysql_fetch_array($xx);
$xxx = mysql_query("select count(rating) from ratings where plno={$r['0']}") or die(mysql_error());
$rrr = mysql_fetch_array($xxx);
$xxxx = mysql_query("select count(*) from posted_looks_comments where plno={$r['0']}") or die(mysql_error());
$rrrr = mysql_fetch_array($xxxx);
$x5 = mysql_query("select count(*) from pl_loves where plno={$r['0']}") or die(mysql_error());
$r5 = mysql_fetch_array($x5);
$memq = mysql_query("select * from fs_members fs,fs_member_accounts fa where fs.mno=fa.mno and fs.mno=" . $r["mno"]) or die(mysql_error());
$rsmemq = mysql_fetch_array($memq);
$qr = mysql_query("select sum(r.rating) from ratings r, postedlooks pl where r.plno=pl.plno and pl.mno=" . $r["mno"]);
$rsqr = mysql_fetch_array($qr);
$qc = mysql_query("select count(*) from ratings r, postedlooks pl where r.plno=pl.plno and pl.mno=" . $r["mno"]);
$rsqc = mysql_fetch_array($qc);
$ql = mysql_query("select count(*) from pl_loves l, postedlooks pl where pl.plno=l.plno and pl.mno=" . $r["mno"]);
$rsql = mysql_fetch_array($ql);
$qf = mysql_query("select count(*) from friends f where mno2=" . $r["mno"]);
$rsqf = mysql_fetch_array($qf);
$qff = mysql_query("select count(*) from friends f where mno1=" . $r["mno"]);
$rsqff = mysql_fetch_array($qff);
echo "\n\t\t\t\t\t\t\t<style>\n\t\t\t\t\t\t\t\t.stands b{\n\t\t\t\t\t\t\t\t\tcolor:#000\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t";
echo "\n\t\t\t\t\t\t\t\t<li >\n\t\t\t\t\t\t\t\t\t<div onmouseover=\"showRate({$r['0']},'block')\" onmouseout=\"showRate({$r['0']},'none')\" >\n\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;display:none;' id='rate{$r['0']}'>\n\t\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style='position:relative;left:44px;top:-20px;'><img src='images/corner.png' /></div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"overflow:hidden;font:bold 12px 'arial';padding:10px;width:150px;position:relative;left:50px;top:15px;background:url('images/trans-back.png');width:218px;color:white\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b style=\"font:bold 15px 'arial'\">" . $r["lookName"] . "</b>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . $r["lookAbout"] . "<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTags: Polka Dot; Brand; <br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tOther<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tPrice: \$89<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tWhere: Name of Store<br><br>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tPosted on " . $r["date_"] . "<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t04:15 pm\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class='rate' style='background:white;WIDTH:35px;padding:1px;position:relative;left:5px;top:-20px;border:1px solid #6d6d6d' >\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"padding:5px 2px 5px 2px;background:#02c7ea;font:bold 11px 'arial';color:#fff\">" . @round($rr[0] / ($rrr[0] * 5) * 100) . "%</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"padding:0px;background:white;font:bold 11px 'helvetica (TT)';color:#3b3b3b\">RATE</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r5' onclick=\"ratethis({$r['0']},5)\">5</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r4' onclick=\"ratethis({$r['0']},4)\" >4</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r3' onclick=\"ratethis({$r['0']},3)\" >3</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r2' onclick=\"ratethis({$r['0']},2)\" >2</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r1' onclick=\"ratethis({$r['0']},1)\" >1</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t<div onclick=\"dripthis({$r['0']})\" style=\"background:white url('images/drip.png') center no-repeat\"> </div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div onclick=\"lovethis({$r['0']})\" style=\"background:white url('images/love.png') center no-repeat\"> </div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<table border=0 width=100% >\n\t\t\t\t\t\t\t\t\t\t\t<td valign=top >\n\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img onclick=\"window.location='lookdetails.php?id={$r['0']}'\" src='images/members/posted looks/{$r['0']}.jpg' style='width:287px;height:450px' />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t<div style='padding:5px;'></div>\n\t\t\t\t\t\t\t\t\t\t<table width=100% class='stands'>";
if (file_exists("../images/members/{$rsmemq['mno']}.jpg")) {
echo "<td width=1><a href='" . $rsmemq["username"] . "'><img src='images/members/" . $rsmemq["mno"] . ".jpg' width=50px height=53px style='margin-top:6px;' /></a></td>";
} else {
echo "<td width=1><a href='" . $rsmemq["username"] . "'><img src='images/members/0.jpg' width=50px height=53px style='margin-top:6px;' /></a></td>";
}
echo "\t\n\t\t\t\t\t\t\t\t\t\t\t\t<td style='padding:5px;'> ";
// echo "<a href='".$rsmemq["username"]."' style='color:#454545;font:15px helveticaBold;text-decoration:none;//text-transform:uppercase'>".$rsmemq["firstname"]." ".$rsmemq["lastname"]."</a><br>";
echo "<a style='color:#454545;font:12px helveticaBold;text-decoration:none;//text-transform:uppercase'>" . $rsmemq["firstname"] . " " . $rsmemq["lastname"] . " </a> <span style='font-size:11px'>posted a new look </span><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='color:#454545;font:11px helvetica; font-weight:bold;' >" . $plinfo['tlrates'] . " Rates | Ratings " . $plinfo['tlrpercent'] . " %</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<table style='width:auto;color:#454545;font:bold 11px helvetica' border=0>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><b>{$plinfo['tldrips']}</b></td><td><img src='images/drip.png' height=10 /></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> | <b>{$plinfo['tllove']}</b></td><td><img src='images/love.png' height=10 /></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> | " . $plinfo['tlcomments'] . " Comments</b></td> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='font-size:11px;font-weight:bold'>" . get_look_tview($r[0]) . " total Views</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td valign=center ><br><img src='images/look-icon.png' /></td>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</li>\t\n\t\t\t\t\t\t\t\t";
$i++;
}
}
示例3: session_start
<?php
session_start();
require "fs_folders/php_functions/connect1.php";
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
require "fs_folders/php_functions/myclass.php";
require "fs_folders/dropdown/dropdown_php_file/dropdown.php";
$dd = new dropdown();
$mc = new myclass();
$ri = new resizeImage();
$mc->auto_detect_path();
$mno = $mc->get_cookie('mno', 136);
$_SESSION["mno"] = $mc->get_cookie('mno', 136);
require 'fs_folders/php_functions/Class/User.php';
require 'fs_folders/php_functions/Class/Email.php';
use App\Email;
$user = new User($mno, $db);
$email = new Email($mno, $db);
//print_r($user->getInfo());
if ($user->getInfo()[0]['status'] == 0) {
$email->sendConfirmationEmail($user->getInfo()[0]['identity_email'], $mc->mno);
print 'New confirmation email sent to ' . $user->getInfo()[0]['identity_email'];
} else {
print 'User already confirmed.';
}
?>
示例4: myclass
<?php
require "fs_folders/php_functions/connect.php";
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/myclass.php";
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
require "fs_folders/php_functions/Class/User.php";
require "fs_folders/php_functions/Class/Brand.php";
require "fs_folders/php_functions/Class/Article.php";
require "fs_folders/php_functions/Class/Look.php";
require "fs_folders/php_functions/Class/UserProfilePic.php";
require 'fs_folders/php_functions/Database/post.php';
$_SESSION['post_a_look_is_look_upload_once_in_db'] = false;
use App\UserProfilePic;
use App\Article;
$mc = new myclass();
$article = new Article($mc->mno, $db);
$look = new Look($mc->mno, $db);
$userProfilePic = new UserProfilePic($mc->mno, $db);
$mc->post = new Post();
$mc->auto_detect_path();
$mc->save_current_page_visited();
# initlaized mno
// $is_cookie_set = $mc->set_cookie( 'mno' , 130 , time()+3600*24 );
$_SESSION['mno'] = $mc->get_cookie('mno', 136);
$mno = $mc->get_cookie('mno', 136);
# initialized the next viewed more modals
$_SESSION['counter'] = 3;
// echo " <bR><br><bR><Br>mno ".$_SESSION['mno'];
// $mc->automatic_insert(5);
// echo " id = ".$_GET["id"];
示例5: blah
parse error on class variable named 'default'
<?php
class myclass
{
var $default = 'test';
function blah()
{
$this->default = 'meep';
}
}
$c = new myclass();
$c->blah();
echo $c->default;
示例6: myclass
<?php
@session_start();
require "fs_folders/php_functions/connect1.php";
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/myclass.php";
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
$_SESSION['post_a_look_is_look_upload_once_in_db'] = false;
$mc = new myclass();
$article = new postarticle();
$image = new resizeImage();
$mc->auto_detect_path();
$_SESSION['mno'] = $mc->get_cookie('mno', 136);
$mno = $mc->get_cookie('mno', 136);
?>
<!DOCTYPE html>
<html>
<head>
<?php
$mc->header_attribute("Log-in or Sign Up | Fashion Sponge");
?>
</head>
<body style="padding:0px; margin:0px;" >
<div id="login-container" >
</div>
示例7: myclass
<?php
require("fs_folders/php_functions/connect1.php");
require("fs_folders/php_functions/function.php");
require("fs_folders/php_functions/myclass.php");
require("fs_folders/php_functions/library.php");
require("fs_folders/php_functions/source.php");
$mc = new myclass( );
// echo " all ads connected here and redirect to their original websites and must be saved also to fs database in order to records the ads stat.";
$ads_location = str_replace(" ",".", $_GET["loc"]);
$mc->get_visitor_info( "" , " [ advertisement clicked ] = link $ads_location " , "home" );
$ads_location = $mc->generate_url( $ads_location );
?>
<?php
// $mc->header_attribute(
// "Fashion Sponge | OOTD | Trends | Fashion Blogs | Beauty Tips | Fashion Inspiration " ,
// "FASHION SPONGE IS THE EASIEST AND FASTEST WAY TO... Show your OOTD, see the lastest trends, discover new fashion blogs, get beauty and style tips and get fashion inspiration.",
// "OOTD | Trends | Fashion Blogs | Beauty Tips | Fashion Inspiration "
// );
$mc->go($ads_location);
?>
示例8: myclass
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
require "fs_folders/php_functions/myclass.php";
$mc = new myclass();
$ri = new resizeImage();
}
//capture the id and to be change to slug
@setcookie('plno', !empty($_GET['id']) ? $_GET['id'] : $_SESSION['table_id'], time() + 3600 * 24);
echo " <div style='display:none' > ";
if ($_GET['id'] = helper::get_table_id(!empty($_GET['id']) ? $_GET['id'] : null, $_SESSION['table_id'])) {
if (!$_GET['id']) {
$mc->go("/");
}
unset($_SESSION['table_id']);
}
$mc = new myclass();
$ri = new resizeImage();
$mc->save_current_page_visited();
# initialize 1
$_SESSION['mno'] = $mc->get_cookie('mno', 136);
$mno = $mc->get_cookie('mno', 136);
// echo " <bR><br><bR><Br>mno ".$_SESSION['mno'];
// echo " $mno ";
/*
if ( empty($_GET['id'])) {
$mc->go("/");
$looks = $mc-> retreive_specific_user_all_looks( $mno , "order by plno desc " );
$_GET['id'] = $looks[0]["plno"];
}else{
}
*/
示例9: display_array_result_of_checking_blog
public function display_array_result_of_checking_blog()
{
$mc = new myclass();
$start = 0;
$end = 100;
$url = $this->get_url_of_the_scrapped_users($start, $end);
$mc->print_r1($url);
for ($i = 0; $i < count($url); $i++) {
$url1 = $url[$i];
for ($j = 0; $j < count($url1); $j++) {
$url2 = $url1[$j]['url'];
echo " <br>url:{$url2}";
$response = $this->get_emails_from_the_page($url2);
$mc->print_r1($response);
}
echo "<br>next----------------------------------------";
}
}
示例10: require
<?php
require ("fs_folders/php_functions/connect.php");
require ("fs_folders/php_functions/function.php");
require ("fs_folders/php_functions/library.php");
require ("fs_folders/php_functions/source.php");
require ("fs_folders/php_functions/myclass.php");
require ("fs_folders/php_functions/Time/Time.php");
require ("fs_folders/php_functions/Database/LookbookDatabase.php");
require ("fs_folders/php_functions/Extends/LookbookExtends.php");
require ("fs_folders/php_functions/Class/Lookbook.php");
$mc = new myclass();
$pa = new postarticle( );
$ri = new resizeImage ();
$sc = new scrape();
$lookbook = new lookbook();
LookbookDatabase::$database = $db;
if($mc->send_email_signup_to_user('Rico', 'mrjesuserwinsuarez@gmail.com', 'signup', 'maricio@gmail.com' , 'this is a test for dev')) {
// echo "<br>succesfully sent send";
} else {
// echo "<br>failled to send";
}
示例11: setcookie
<?php
@session_start();
// $_SESSION['temp_mno'] = 754; //
// $_SESSION['temp_mno'] = 133; // rico
// $_SESSION['temp_mno'] = 134; kayab
// $_SESSION['temp_mno'] = 135;
// $_SESSION['temp_mno'] = 1169;
$lastpagevisited = !empty($_GET['url']) ? $_GET['url'] : $lastpagevisited;
if ($_SESSION['temp_mno'] != null) {
setcookie('mno', $_SESSION['temp_mno'], time() + 10 * 365 * 24 * 60 * 60);
require "fs_folders/php_functions/connect1.php";
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/myclass.php";
$mc = new myclass();
$lastpagevisited = !empty($_SESSION['lastpagevisited']) ? $_SESSION['lastpagevisited'] : '/';
$_SESSION['mno'] = $_SESSION['temp_mno'];
// echo "succesfully authenticated, please wait.....";
$mc->update_total_login($_SESSION['mno'], 1);
$mc->confirm_mem_account($_SESSION['mno']);
// echo " lastpagevisited $lastpagevisited ";
$mc->add_new_member_profile_pic($_SESSION['mno']);
// $mc->add_new_member_time_lime( $_SESSION['mno'] );
$db->update('fs_members', array('logtime' => "{$mc->date_time}"), "mno={$_SESSION['mno']}");
//update logtime everylogin
$db->update('fs_members', array('logstat' => 1), "mno={$_SESSION['mno']}");
//update logtime everylogin
$mc->go("{$lastpagevisited}");
} else {
echo " failled to authenticate, sorry for inconvenience we are redirecting you to login area..";
$mc->go("home");
示例12: Database
require "fs_folders/php_functions/connect.php";
include "fs_folders/php_functions/Time/Time.php";
include "fs_folders/php_functions/Database/LookbookDatabase.php";
include "fs_folders/php_functions/Extends/LookbookExtends.php";
include "fs_folders/php_functions/Class/Lookbook.php";
require "fs_folders/php_functions/function.php";
require "fs_folders/php_functions/library.php";
require "fs_folders/php_functions/source.php";
require "fs_folders/php_functions/myclass.php";
require_once "fs_folders/php_functions/Database/Invited.php";
$database = new Database();
$invited1 = new \Invitation\Invited();
$database->connect();
$invited1->_setInvitedTotals($database);
echo "<div style='display:none' >";
$mc = new myclass();
$pa = new postarticle();
$sc = new scrape();
$lookbook = new lookbook();
$mc->header_attribute();
$mc->auto_detect_path();
$mno = 968;
$plno = 509;
$plcno = 14;
$mppno = 111;
$mptno = 1;
$comment = 'this is the test comment';
$mno = 135;
$mno1 = 134;
$limit_start = 0;
$limit_end = 2;
示例13: require
<?php
require("fs_folders/php_functions/connect.php");
require("fs_folders/php_functions/function.php");
require("fs_folders/php_functions/myclass.php");
require("fs_folders/php_functions/library.php");
require("fs_folders/php_functions/source.php");
$mc = new myclass();
$ri = new resizeImage();
$_SESSION['mno'] = $mc->get_cookie( 'mno' , 136 );
$mno = $mc->get_cookie( 'mno' , 136 );
$width = $_SESSION['width_crop_size_limit'];
$type = ( !empty($_SESSION['type']) ) ? $_SESSION['type'] : null ; ;
$type1 = ( !empty($_GET['type']) ) ? $_GET['type'] : null ;
if ( !empty($type1) )$type = $type1;
// $type = 'profile-timeline';
//$mno = 1016;
//echo "mno - " . $mno;
echo " <div id='fs-general-ajax-response' style='color:#fff;position:fixed;background-color:#000;z-index:200;display:none' > ";
// $mc->unlink_profile_pics( $mno );
echo "Type = " . $type . '<br>';
switch ( $type ) {
case 'new-member-fb-login':
echo " new member fb login <br> ";
$mppno = $mc ->member_profile_pic_query( array('mno'=>$mno , 'type'=>'get-latest-mppno' ) );
示例14: session_start
<?php
session_start();
require "../../../php_functions/connect.php";
require "../../../php_functions/function.php";
require "../../../php_functions/library.php";
require "../../../php_functions/source.php";
require "../../../php_functions/myclass.php";
$mc = new myclass();
$date_time = $mc->date_difference();
$comment = str_replace('\'', "\"", $_GET["comment"]);
// $plno=$_GET["plno"];
$dtime = $date_time['date_time'];
$mno = $_SESSION['mno'];
$plno = $_SESSION['plno'];
// echo "comment was $comment ";
save_comment($plno, $mno, $comment, $dtime);
function save_comment($plno, $mno, $comment, $dtime)
{
if (strlen($comment) > 0) {
insert('posted_looks_comments', array('plno', 'mno', 'date_', 'msg'), array($plno, $mno, $dtime, tcleaner($comment)), 'plcno');
// echo "<span style='color:green'> succesfully post comment </span>";
} else {
// echo " <span style='color:red' > failled to post comment </span>" ;
}
}
$posted_comment = true;
require 'commentDesign.php';
// echo " <li> comment design <li> ";
?>
示例15: get_gravatar
/**
* @param string $email The email hash
* @param string $s Size in pixels, defaults to 80px [ 1 - 512 ]
* @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]
* @param string $r Maximum rating (inclusive) [ g | pg | r | x ]
* for more info : http://gravatar.com/site/implement/images/php/
*/
function get_gravatar( $email, $s = 20, $d = 'identicon', $r = 'g') {
$obj = new myclass();
$sql = "SELECT members.*,member_photos.photo, member_photos.Approve FROM members LEFT JOIN member_photos ON members.id = member_photos.member_id WHERE md5(members.email_id)='".$email."'";
$sql_res=$obj->select($sql);
$path = "upload/".$sql_res[0]['photo'];
if(!empty($sql_res[0]['photo']) && $sql_res[0]['Approve']==1)
{
if (file_exists($path))
{
$avatarSrc=$path;
}
else
{
if($sql_res[0]['gender']=='M')
{
$avatarSrc='images/male-user1.png';
}
else
{
$avatarSrc='images/female-user1.png';
}
}
}
else
{
if($sql_res[0]['gender']=='M')
{
$avatarSrc='images/male-user1.png';
}
else
{
$avatarSrc='images/female-user1.png';
}
}
//$url = 'gravatar.com/avatar/';
//$url .= "$email?s=$s&d=$d&r=$r";
//return $url;
return $avatarSrc;
}