コード例 #1
0
ファイル: form2.php プロジェクト: siterun/content_efile
<?php

include 'main_class.php';
$obj = new parent_data();
//$result = $obj->select_full('countries');
//$country_result = mysql_fetch_assoc($result);
$user_all = $obj->select_full('register');
//$user_res = mysql_fetch_assoc($user_all);
$username = array();
//if we dont write this then also the below process will work as it suppose to be but if there is no data will come in $username during the loop then error will occur and here we r using  $username variable in the jquery process also and functionality of jquery will halt by giving error if the $username will blank and  so we define it as array in the starting to overcome all of these problems.
while ($user_res = mysql_fetch_assoc($user_all)) {
    $username[] = $user_res['username'];
}
$st_json = json_encode($username);
//json_encode function convert php data into  json format,we can use this data in java or json if we want.
?>

<!DOCTYPE html >
<html>
<head>
<style>
.user_exist_cla{
	border-color:red;
	background-color:red;
}
.error {
	color: #D8000C;
	background-color: #FFBABA;
}
</style>
<title>A FORM </title>
コード例 #2
0
ファイル: mes_detail.php プロジェクト: siterun/content_efile
<?php

session_start();
$uid = $_SESSION["sid"];
include_once 'main_class.php';
$obj = new parent_data();
//for update unread status to read status begins
$seid = $_GET['seid'];
//$reid = $_GET['reid'];
$trash = 4;
$db_fname = array('read_status' => 5);
$obj->update_unread('messages', $db_fname, $uid, $seid, $trash);
$result = $obj->get_content('messages', $db_fname, $uid, $seid, $trash);
//$row = mysql_fetch_assoc($result);
?>
  
<!DOCTYPE html>
<html>
<head><title>Chat page</title>
<style>
body {
	background-color:#FCC}
.chater_name {
	 color: #06F;
	 font-size:18px;
	 font-family:"Lucida Console", Monaco, monospace;
	}
.msg_in { 
	width:400px;
	height:20px;
	text-align:left;	
コード例 #3
0
ファイル: home.php プロジェクト: siterun/content_efile
.offline_class{
	color:red;
}
</style>
</head>


<?php 
error_reporting(0);
session_start();
$uid = $_SESSION["sid"];
if (!isset($_SESSION["sid"])) {
    header("location:login.php");
}
include_once 'main_class.php';
$obj = new parent_data();
$table_1 = 'online_user';
$table_2 = 'register';
$online_user_result = $obj->all_online_users($table_1, $table_2, $uid);
//$row_online = mysql_fetch_assoc($online_user_result);
$users_id = array();
while ($row_online = mysql_fetch_assoc($online_user_result)) {
    $users_id[] = $row_online['user_id'];
    //$user_current_login_staus = $row_online['online_status'];
}
if (!in_array($uid, $users_id)) {
    $db_fname = "user_id,login_status";
    $user_current_online_status = 13;
    $db_values = "'{$uid}','{$user_current_online_status}'";
    $obj->user_online_status('online_user', $db_fname, $db_values);
} else {
コード例 #4
0
ファイル: message.php プロジェクト: siterun/content_efile
<?php

/*session_start();
$uid=$_SESSION["sid"];
*/
session_start();
$uid = $_SESSION["sid"];
require_once 'main_class.php';
$obj = new parent_data();
$msg_res = $obj->for_msg('register', $uid);
$bring = mysql_fetch_array($msg_res);
$get_id = $_GET["id"];
$result = $obj->for_msg('register', $get_id);
$row = mysql_fetch_array($result);
//echo $lan[0];
//print_r($lan);
?>
 
 

<!DOCTYPE html>
<html>
<head>
<title>message</title>
</head>

<body bgcolor="#FF9933">
<?php 
include "header.php";
?>
<form action="form2_submit.php" method="post" />
コード例 #5
0
ファイル: inbox.php プロジェクト: siterun/content_efile
<div id="myDiv">
<?php 
session_start();
$uid = $_SESSION["sid"];
require_once 'main_class.php';
$obj = new parent_data();
$trash = 4;
//not deleted
$unread_mes_status = 6;
//unread message
$result = $obj->select_msgs('messages', $uid, $trash, $unread_mes_status);
//$row = mysql_fetch_array($result);
//$count_ur = $obj->count_unread('messages',$uid,$unread_mes_status);
//$count_unread_all = mysql_fetch_assoc($count_ur);
/* while($count_unread_all = mysql_fetch_assoc($count_ur)){
	 $s[]=$count_unread_all['senderid'];
	  $ur[]=$count_unread_all['count(read_status)'];}
	echo '<pre>';
	//print_r($s);print_r($ur);
	
while($row = mysql_fetch_assoc($result)){
	 $senro=$row['senderid'];
	 if(in_array($senro,$s)){echo 'matched';}
	 }
	  //$ur[]=$count_unread_all['count(read_status)'];
die;		
	 
	
	echo '</pre>';
	die;  */
require_once "header.php";
コード例 #6
0
<?php

include 'main_class.php';
$obj = new parent_data();
$result = $obj->select_full('register');
//$row = mysql_fetch_assoc($result);
/* while($row= mysql_fetch_assoc($result)){
	echo '<pre>';
print_r($row);
	echo '</pre>';
} */
/* $username = '******';
$password = '******';
$tablename = 'register';
$id = 4;
$dbfname = array('username'=>$username,'password'=>$password);
  
  $obj->update_database($tablename,$dbfname,$id); */
/* $res = mysql_fetch_array($result);
print_r($res);
 */
$str = 'This is THE name';
echo $str_ch = strtolower($str);