Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Auto Set of Due Date/Expiration :help:

Nishian

Recruit
Basic Member
Messages
8
Reaction score
0
Points
16
Mga katropa. Sinong nakaakaalam dito ng PHP or SQL. Ang gusto ko pong malaman ay kung may code po para ba sa Auto Set ng Date of expiration. Example is, Sa library system, Nanghiram ng book yung isang estudyante and then pag kaborrow niya. Mag aalert na yung time of return niya ay yung Sinet na date of expiration by the computer. And one more thing pa pala is yung Limiter sa pag borrow. Hangga't di pa niya naibabalik yung nahihiram niya. Di pa siya ulit makakahiram ng panibago ng set of books. Salamat po sa mga sasagot :) Godbless you! :):help::help::help::help::help::help::help::help:
 
Sir Salamat sa pag reply. :thumbsup: Kase ang balak po namin is yung pag ka check nong item auto na agad mag seset ng date. Maari po ba yun?
 
Yes pwedeng pwede kunin mo lang yung current date
 
sir pasensya sa abala . di po namin magets e. ibig po namin sabihin pagka click na pagkaclick ng action + borrow. Mag set na po agad siya ng date. View attachment 305409
 

Attachments

  • 123123.png
    123123.png
    475.4 KB · Views: 23
Same problem . Brader . Kelangan ko din ng auto set ng date .
 
dapat i add lang naman yung number of days sa current date.lalabas na yung due date nya.

var date = new Date();
date.setDate(date.getDate() + Number of days allowed to borrow);
$( "#duedate" ).datepicker('setDate', date);

sa javascript yan sir, datepicker ang gamit kong pang pili ng date (calendar)

try lang
 
paki try boss

$thirtydays = 2592000;
example.
$query = $conn->query("INSERT INTO tbl (date_of_purchase, terms) values ('".date('Y-m-d h:i:s')."','".$thirtydays ."')");

$qry = $conn->query("SELECT * FROM tbl");
while($row = $qry->fetch_assoc())
{
$str = strtotime($row['date_of_purchase']);
$terms = $row['terms'];
$date = date('F d, Y h:i:s', $str);
$due = date('F d, Y h:i:s', $str+$terms);

echo "Date of Purchase ".$date."<br />";
echo "Due Date ".$due ;

}

- - - Updated - - -

---- JSON Encode ---

$thirtydays = 2592000;
$values = array();

example.
$query = $conn->query("INSERT INTO tbl (date_of_purchase, terms) values ('".date('Y-m-d h:i:s')."','".$thirtydays ."')");

$qry = $conn->query("SELECT * FROM tbl");
while($row = $qry->fetch_assoc())
{
$str = strtotime($row['date_of_purchase']);
$terms = $row['terms'];
$date = date('F d, Y h:i:s', $str);
$due = date('F d, Y h:i:s', $str+$terms);

$values['Date of Purchase'] = $date;
$values['Due Date'] = $due ;

}
echo json_encode(array("Example JSON Encode" => ($values)));
 
Last edited:
yung sa limiter ts pano ginawa mo ? try mo lagyan sa db mo na column na ganito "isReturned" dun sa histroy ng pag kuha niya ng books then 1,0(true,false) yung values niya.
then kada hiram ng books mababawas yung copy ng books ng 1 then set mo yung isReturned sa history na false, then pag mag pag hihiram siya check mo muna sa history na may nahiram yung user
 
Back
Top Bottom