SOCMED/temp.php

228 lines
7.9 KiB
PHP
Raw Normal View History

2020-01-02 21:48:25 +07:00
<?php
include('application/config/config.php');
include('application/model/user.php');
include('application/model/community.php');
include('foto.php');
include('func.php');
session_start();
//advance registration(sukses)
/*
if (isset($_POST['sbm'])){
$u = new User();
$data = array( 'nama' => 'Al Azhar',
'dob' => date("Y-m-d",strtotime('1992-10-21')),
'telp' => '000',
'address' => 'test',
'hometown' => 'kampung',
'Fakultas' => 'if',
'Jurusan' => 'sif',
'Angkatan' => '2010',
'Kelas' => '04',
'relationship' => '1',
'user' => $_SESSION['username']
);
if ($u->inputProfil($data)){
//echo ' insert bisa ';
$idp = $u->getId();
$foto = new Foto($_FILES);
$foto->insert($_SESSION['username']);
$hasil = $foto->getHasil();
$photo = $hasil['lokasi'];
//echo $photo;
if($u->inputAvatar($photo,$idp))echo '</br> complete';
else echo '</br> gagal foto';
}
else echo '</br> gagal';
}
*/
//create post(suskses)
/*
if (isset($_SESSION['username']) && isset($_POST['sbm'])){
$u = new User();
$data = array( 'name' => 'test nama',
'status' => 'lab',
'user' => $_SESSION['username']
);
if ($u->insertPost($data))else echo 'sukses';
else echo 'gagal'
}
*/
//add friend
/*
*/
//approve friend
/*
*/
//notification
/*
*/
//add and delete member
/*
*/
//crete community and event(sukses)
/*
if (isset($_SESSION['username']) && isset($_POST['sbm'])){
$u = new Community();
$data = array( 'name' => 'test nama',
'type' => 'lab',
'user' => $_SESSION['username'],
'desc' => 'test desc'
);
if ($u->create($data)){
echo ' insert bisa ';
$idp = $u->getId();
mkdir(user_file . $idp, 0700);
$foto = new Foto($_FILES);
$foto->insert($idp);
$hasil = $foto->getHasil();
$photo = $hasil['lokasi'];
//echo $photo;
if($u->inputPhoto($photo,$idp))header('Location: home.php');
else echo '</br> gagal foto';
}
else echo '</br> gagal';
}
*/
//update
/*
*/
echo date('d/m/Y H:i:s',time());
if (hasPassed('06/03/2014 8:00')) echo ' passed';
else echo ' not';
if (isset($_POST['select3'])){
print_r($_REQUEST);
}
?>
<html>
<head>
<style type="text/css">
/* SEARCH*/
/* SEARCH FORM */
#searchform { margin:50px 200px; font-size:18px; }
#searchform div { color:#eeeeee; }
#searchform div input { font-size:18px; padding:5px; width:320px; }
#suggestions{ position: absolute; left:206px; top:78px; width:320px; display:none; }
/* SEARCHRESULTS */
#searchresults { border-width:1px; border-color:#919191; border-style:solid; width:320px; background-color:#a0a0a0; font-size:10px; line-height:14px; }
#searchresults a { display:block; background-color:#e4e4e4; clear:left; height:56px; text-decoration:none; }
#searchresults a:hover { background-color:#b7b7b7; color:#ffffff; }
#searchresults a img { float:left; padding:5px 10px; width:10%;}
#searchresults a span.searchheading { display:block; font-weight:bold; padding-top:5px; color:#191919; }
#searchresults a:hover span.searchheading { color:#ffffff; }
#searchresults a span { color:#555555; }
#searchresults a:hover span { color:#f1f1f1; }
#searchresults span.category { font-size:11px; margin:5px; display:block; color:#ffffff; }
#searchresults span.seperator { float:right; padding-right:15px; margin-right:5px;
background-image:url(../images/shortcuts_arrow.gif); background-repeat:no-repeat; background-position:right; }
#searchresults span.seperator a { background-color:transparent; display:block; margin:5px; height:auto; color:#ffffff; }
/* FBCK COMPLETE */
/* TextboxList sample CSS */
ul.holder { margin: 0; border: 1px solid #999; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; }
*:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */
ul.holder li { float: left; list-style-type: none; margin: 0 5px 4px 0; white-space:nowrap;}
ul.holder li.bit-box, ul.holder li.bit-input input { font: 11px "Lucida Grande", "Verdana"; }
ul.holder li.bit-box { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; border: 1px solid #CAD8F3; background: #DEE7F8; padding: 1px 5px 2px; }
ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }
ul.holder li.bit-input input { width: auto; overflow:visible; margin: 0; border: 0px; outline: 0; padding: 3px 0px 2px; } /* no left/right padding here please */
ul.holder li.bit-input input.smallinput { width: 20px; }
/* Facebook demo CSS */
ul.holder { width: 500px; }
ul.holder { margin: 0 !important }
ul.holder li.bit-box, #apple-list ul.holder li.bit-box { padding-right: 15px; position: relative; z-index:1000;}
#apple-list ul.holder li.bit-input { margin: 0; }
#apple-list ul.holder li.bit-input input.smallinput { width: 5px; }
ul.holder li.bit-hover { background: #BBCEF1; border: 1px solid #6D95E0; }
ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }
ul.holder li.bit-box a.closebutton { position: absolute; right: 4px; top: 5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url('asset/image/close.gif'); }
ul.holder li.bit-box a.closebutton:hover { background-position: 7px; }
ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutton:hover { background-position: bottom; }
/* Autocompleter */
.facebook-auto { display: none; position: absolute; width: 512px; background: #eee; z-index:1001;}
.facebook-auto .default { padding: 5px 7px; border: 1px solid #ccc; border-width: 0 1px 1px;font-family:"Lucida Grande","Verdana"; font-size:11px; }
.facebook-auto ul { display: none; margin: 0; padding: 0; overflow: auto; position:absolute; z-index:9999}
.facebook-auto ul li { padding: 5px 12px; z-index: 1000; cursor: pointer; margin: 0; list-style-type: none; border: 1px solid #ccc; border-width: 0 1px 1px; font: 11px "Lucida Grande", "Verdana"; background-color: #eee }
.facebook-auto ul li em { font-weight: bold; font-style: normal; background: #ccc; }
.facebook-auto ul li.auto-focus { background: #4173CC; color: #fff; }
.facebook-auto ul li.auto-focus em { background: none; }
.deleted { background-color:#4173CC !important; color:#ffffff !important;}
.hidden { display:none;}
#demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #999; }
.ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;}
/*scrollbar*/
#select3_feed::-webkit-scrollbar-track{ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); background-color: #F5F5F5;}
#select3_feed::-webkit-scrollbar{ width: 4px; background-color: #F5F5F5;}
#select3_feed::-webkit-scrollbar-thumb{ background-color: #FFFFFF;}
</style>
<script src="asset/js/jquery.js"></script>
<script src="asset/js/jquery.fcbkcomplete.js"></script>
</head>
<body>
<!--
<div style="border:1px solid;padding:10px;margin-top:20px;width:350px;">
<form action='temp.php' method='post'>
<input type="file" name="file" id="inputfile">
<input type='hidden' name='sbm' value='true'>
<input type="date" name="date">
<input type="submit" value='submit'>
</form>
</div>
-->
<div>
<form id="searchform">
<div>
<input type="text" size="30" value="" onkeyup="lookup(this.value);" placeholder="Cari" />
</div>
<div id="suggestions"></div>
</form>
</div>
<div>
<form action="temp.php" method="POST" accept-charset="utf-8">
<select id="select3" name="select3">
</select>
<input type="submit" value="Send">
</form>
</div>
<script type="text/javascript">
function lookup(inputString) {
if(inputString.length == 0) {
$('#suggestions').fadeOut();
}else {
$.get("home.php?search="+inputString, function(data) {
$('#suggestions').fadeIn();
$('#suggestions').html(data);
});
}
}
$(document).ready(function(){
$("#select3").fcbkcomplete({
json_url: "home.php?action=search",
addontab: true,
height: 3,
complete_text: "Masukkan nama anggota...",
firstselected: true,
cache: true
});
});
</script>
</body>
</html>