Beispiel #1
0
			<?php 
echo trim($infos['idPSN']) != '' ? $infos['idPSN'] : '-';
?>
		</div>
		
		<div class="infoProfil">
			<div>Compte Xbox live</div>
			<?php 
echo trim($infos['idXboxlive']) != '' ? $infos['idXboxlive'] : '-';
?>
		</div>
		
		<div class="infoProfil">
			<div>Date de naissance</div>
			<?php 
echo $infos['birth'] != '0000-00-00' ? date('d/m/Y', date2timestamp($infos['birth'])) : '-';
?>
 - <?php 
echo $infos['birth'] != '0000-00-00' ? age($infos['birth']) . ' ans' : '';
?>
		</div>
				
		<div class="infoProfil">
			<div>Messages postés</div>
			<?php 
echo $infos['nbPost'];
?>
		</div>
		
		<div class="infoProfil">
			<div>Messages chatbox</div>
Beispiel #2
0
    echo $row["Name"];
    ?>
</a>
            </b></div></td>
            <td width="15%" style="padding-top:5px" bgcolor=" <?php 
    echo $rcolor;
    ?>
"><div align="center"><b><?php 
    echo $row["Bloodgroup"];
    ?>
</b></div></td>
            <td width="10%" style="padding-top:5px" bgcolor=" <?php 
    echo $rcolor;
    ?>
"><div align="right"><b><?php 
    echo getAge(date2timestamp($row["DOB"]));
    ?>
</b></div></td>
            <td width="19%" style="padding-top:5px" bgcolor=" <?php 
    echo $rcolor;
    ?>
"><div align="right"><b><?php 
    if ($row['Publish'] == '1') {
        echo $row["ContactNo"];
    } else {
        echo "Contact Admin *";
    }
    ?>
</b></div></td>
            <td width="17%" style="padding-top:5px" bgcolor=" <?php 
    echo $rcolor;
Beispiel #3
0
     $todo_s_p = $_GET["p"];
 }
 if ($todo_s_p === NULL) {
     $todo_s_p = "todo";
 }
 // ID指定
 if ($_GET["n"] !== NULL) {
     $todo_s_n = $_GET["n"];
 }
 if ($todo_s_n === NULL) {
     $todo_s_n = "";
 }
 $begin_from_stamp = date2timestamp($todo_s_from_begin_year . "/" . $todo_s_from_begin_month . "/" . $todo_s_from_begin_day);
 $begin_to_stamp = date2timestamp($todo_s_to_begin_year . "/" . $todo_s_to_begin_month . "/" . $todo_s_to_begin_day);
 $end_from_stamp = date2timestamp($todo_s_from_end_year . "/" . $todo_s_from_end_month . "/" . $todo_s_from_end_day);
 $end_to_stamp = date2timestamp($todo_s_to_end_year . "/" . $todo_s_to_end_month . "/" . $todo_s_to_end_day);
 $begin_from_date = date("Y/m/d", $begin_from_stamp);
 $begin_to_date = date("Y/m/d", $begin_to_stamp);
 $end_from_date = date("Y/m/d", $end_from_stamp);
 $end_to_date = date("Y/m/d", $end_to_stamp);
 $todo_s_from_begin_year = date("Y", $begin_from_stamp);
 $todo_s_from_begin_month = date("n", $begin_from_stamp);
 $todo_s_from_begin_day = date("j", $begin_from_stamp);
 $todo_s_to_begin_year = date("Y", $begin_to_stamp);
 $todo_s_to_begin_month = date("n", $begin_to_stamp);
 $todo_s_to_begin_day = date("j", $begin_to_stamp);
 $todo_s_from_end_year = date("Y", $end_from_stamp);
 $todo_s_from_end_month = date("n", $end_from_stamp);
 $todo_s_from_end_day = date("j", $end_from_stamp);
 $todo_s_to_end_year = date("Y", $end_to_stamp);
 $todo_s_to_end_month = date("n", $end_to_stamp);
Beispiel #4
0
              <td width="1">&nbsp;</td>
              <td width="133">Contact No</td>
              <td width="136"><label><?php 
if ($row['Publish'] == 1) {
    echo $row['ContactNo'];
} else {
    echo "Requested Privacy";
}
?>
</label></td>
            </tr>
            <tr>
              <td height="29">Age</td>
              <td>&nbsp;</td>
              <td colspan="0"><label><?php 
echo getAge(date2timestamp($row['DOB']));
?>
</label></td>
              <td>&nbsp;</td>
              <td>Email ID</td>
              <td colspan="3"><label><?php 
echo $row['Emailid'];
?>
</label></td>
            </tr>
            
            <tr>
              <td height="37">Blood Group</td>
              <td rowspan="2">&nbsp;</td>
              <?php 
if ($row['Gender'] == 1) {
Beispiel #5
0
function age($date)
{
    $birthDate = date('m/d/Y', date2timestamp($date));
    $birthDate = explode("/", $birthDate);
    return $age = date("md", date("U", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date("md") ? date("Y") - $birthDate[2] - 1 : date("Y") - $birthDate[2];
}
             $timevalue = date("Hi", datetime2timestamp($row["timefrom"]));
         } elseif ($row["timeto"] != "" && $row["datefrom"] == $row["dateto"]) {
             $timevalue = date("Hi", datetime2timestamp($row["timefrom"]) - 3600);
         } else {
             $timevalue = 0;
         }
         if ($row["datefrom"] == $row["dateto"]) {
             // 同一日の予定
             $daynumber = floor(date2timestamp($row["datefrom"]) / 86400) - floor($firststamp / 86400);
             $column[$daynumber][$row["seqno"]] = $timevalue;
         } else {
             // 日をまたぐ予定
             $c = 0;
             for ($viewstamp = $firststamp; $viewstamp <= $laststamp; $viewstamp = $viewstamp + 86400) {
                 $datefromstamp = date2timestamp($row["datefrom"]);
                 $datetostamp = date2timestamp($row["dateto"]);
                 if ($datefromstamp <= $viewstamp && $datetostamp >= $viewstamp) {
                     if ($viewstamp == $datefromstamp) {
                         $column[$c][$row["seqno"]] = $timevalue;
                     } else {
                         $column[$c][$row["seqno"]] = 0;
                     }
                 }
                 $c++;
             }
         }
     }
 }
 print "<TR BGCOLOR=#CCCCCC>";
 print "<TD WIDTH=15% VALIGN=TOP BGCOLOR=" . $bodyBackColor . ">";
 print "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD VALIGN=TOP NOWRAP>";
Beispiel #7
0
/**
 * Return date some hours before
 *
 * @param string $date1 Date to compare
 * @param string $hour1 Hours before
 * @access public
 */
function hours_before($date1, $hour1)
{
    global $dayHourArray;
    $timestamp1 = date2timestamp($date1);
    $diff = 0;
    while ($diff < $hour1) {
        $currDate = date("Y-m-d", $timestamp1);
        $tmpquery = " WHERE hol.date='{$currDate}'";
        $listHoliday = new request();
        $listHoliday->openHoliday($tmpquery);
        $comptListHoliday = count($listHoliday->hol_id);
        if ($comptListHoliday == 0) {
            $weekDay = date("w", $timestamp1);
            $diff += $dayHourArray[$weekDay];
            if ($diff >= $hour1) {
                break;
            }
        }
        $timestamp1 -= 3600 * 24;
    }
    return date("Y-m-d", $timestamp1);
}
Beispiel #8
0
     $sql = "SELECT * FROM events WHERE seqno=" . $seqno;
     $res = pg_query($conn, $sql);
     $cnt = pg_num_rows($res);
     if ($cnt > 0) {
         $row = pg_fetch_array($res, 0);
         print "<TR><TD>";
         print date("n/j", date2timestamp($row["datefrom"]));
         if ($row["timefrom"] != "") {
             print "&nbsp;";
             print date("H:i", datetime2timestamp($row["timefrom"]));
         }
         if ($row["datefrom"] != $row["dateto"] || $row["timefrom"] != "") {
             print "〜";
         }
         if ($row["datefrom"] != $row["dateto"]) {
             print date("n/j", date2timestamp($row["dateto"]));
         }
         if ($row["timeto"] != "") {
             if ($row["dateto"] != $row["datefrom"]) {
                 print "&nbsp;";
             }
             print date("H:i", datetime2timestamp($row["timeto"]));
         }
         print "<BR>";
         print "・" . "<A HREF=\"./event/add/?p=top&s=" . $seqno . "\">";
         print mb_strcut(preg_replace("/\r\n|\r|\n|\r\n/", " ", $row["title"]), 0, 100, "EUC-JP");
         print "</A><BR>";
         print "</TD></TR>";
         $r++;
     }
 }