1\n"; mysqli_query($con, "INSERT INTO stat_sync (user, fg, os, ip, synced) VALUES ('$user', $fg, '$os', '$ip', 0);"); exit(-1); } else{ $r_v = mysqli_fetch_array($q_v); if ($r_v['value'] <= $get_version){ echo "1\n"; mysqli_query($con, "INSERT INTO stat_sync (user, fg, os, ip, synced) VALUES ('$user', $fg, '$os', '$ip', 0);"); exit(-1); } } mysqli_query($con, "INSERT INTO stat_sync (user, fg, os, ip, synced) VALUES ('$user', $fg, '$os', '$ip', 1);"); error_log("INSERT INTO stat_sync (user, fg, os, ip, synced) VALUES ('$user', $fg, '$os', '$ip', 1);"); //Header echo "\n"; echo "\tgm\n"; //Echo version echo "\t$r_v[value]\n"; //Rest of settings $q = mysqli_query($con, "SELECT value FROM settings WHERE name = 'photos';"); if (mysqli_num_rows($q) > 0){ $r = mysqli_fetch_array($q); echo "\t$r[value]\n"; } $q = mysqli_query($con, "SELECT value FROM settings WHERE name = 'festivals';"); if (mysqli_num_rows($q) > 0){ $r = mysqli_fetch_array($q); echo "\t$r[value]\n"; } //Table activity echo "\t\n"; echo "\t\tactivity\n"; $q = mysqli_query($con, "SELECT id, permalink, date, city, title_es, title_en, title_eu, text_es, text_en, text_eu, after_es, after_en, after_eu, price, inscription, max_people, album, dtime, comments FROM activity WHERE visible = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[permalink]'\n"; echo "\t\t\t'$r[date]'\n"; echo "\t\t\t'$r[city]'\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[text_es]'\n"; echo "\t\t\t'$r[text_en]'\n"; echo "\t\t\t'$r[text_eu]'\n"; echo "\t\t\t'$r[after_es]'\n"; echo "\t\t\t'$r[after_en]'\n"; echo "\t\t\t'$r[after_eu]'\n"; echo "\t\t\t$r[price]\n"; echo "\t\t\t$r[inscription]\n"; echo "\t\t\t$r[max_people]\n"; echo "\t\t\t$r[album]\n"; echo "\t\t\t'$r[dtime]'\n"; echo "\t\t\t$r[comments]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table activity_comment echo "\t\n"; echo "\t\tactivity_comment\n"; $q = mysqli_query($con, "SELECT activity_comment.id AS id, activity, text, dtime, fname, username, lang FROM activity_comment, user WHERE activity_comment.user = user.id AND approved = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[activity]\n"; echo "\t\t\t'$r[text]'\n"; echo "\t\t\t'$r[dtime]'\n"; if (strlen($r['username'] == 0)){ echo "\t\t\t\'$r[fname]'\n"; } else{ echo "\t\t\t\'$r[username]'\n"; } echo "\t\t\t'$r[lang]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table activity_image echo "\t\n"; echo "\t\tactivity_image\n"; $q = mysqli_query($con, "SELECT * FROM activity_image;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[activity]\n"; echo "\t\t\t'$r[image]'\n"; echo "\t\t\t$r[idx]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table activity_itinerary echo "\t\n"; echo "\t\tactivity_itinerary\n"; $q = mysqli_query($con, "SELECT * FROM activity_itinerary;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[activity]\n"; echo "\t\t\t'$r[name_es]'\n"; echo "\t\t\t'$r[name_en]'\n"; echo "\t\t\t'$r[name_eu]'\n"; echo "\t\t\t'$r[description_es]'\n"; echo "\t\t\t'$r[description_en]'\n"; echo "\t\t\t'$r[description_eu]'\n"; echo "\t\t\t'$r[start]'\n"; echo "\t\t\t'$r[end]'\n"; echo "\t\t\t'$r[place]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table activity_tag echo "\t\n"; echo "\t\tactivity_tag\n"; $q = mysqli_query($con, "SELECT * FROM activity_tag;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[activity]\n"; echo "\t\t\t'$r[tag]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table album echo "\t\n"; echo "\t\talbum\n"; $q = mysqli_query($con, "SELECT id, permalink, title_es, title_en, title_eu, description_es, description_en, description_eu, open, dtime FROM album;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[permalink]'\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[description_es]'\n"; echo "\t\t\t'$r[description_en]'\n"; echo "\t\t\t'$r[description_eu]'\n"; echo "\t\t\t$r[open]\n"; echo "\t\t\t\n"; echo "\t\t\n"; } echo "\t
\n"; //Table festival echo "\t\n"; echo "\t\tfestival\n"; $q = mysqli_query($con, "SELECT * FROM festival;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[year]\n"; echo "\t\t\t'$r[text_es]'\n"; echo "\t\t\t'$r[text_en]'\n"; echo "\t\t\t'$r[text_eu]'\n"; echo "\t\t\t'$r[img]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table festival_day echo "\t\n"; echo "\t\tfestival_day\n"; $q = mysqli_query($con, "SELECT * FROM festival_day;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[date] 00:00:00'\n"; echo "\t\t\t'$r[name_es]'\n"; echo "\t\t\t'$r[name_en]'\n"; echo "\t\t\t'$r[name_eu]'\n"; echo "\t\t\t$r[price]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table festival_event echo "\t\n"; echo "\t\tfestival_event\n"; $q = mysqli_query($con, "SELECT * FROM festival_event;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[gm]\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[description_es]'\n"; echo "\t\t\t'$r[description_en]'\n"; echo "\t\t\t'$r[description_eu]'\n"; echo "\t\t\t$r[host]\n"; echo "\t\t\t$r[place]\n"; echo "\t\t\t'$r[start]'\n"; echo "\t\t\t'$r[end]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table festival_event_image echo "\t\n"; echo "\t\tfestival_event_image\n"; $q = mysqli_query($con, "SELECT * FROM festival_event_image;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[event]\n"; echo "\t\t\t'$r[image]'\n"; echo "\t\t\t$r[idx]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table festival_offer echo "\t\n"; echo "\t\tfestival_offer\n"; $q = mysqli_query($con, "SELECT * FROM festival_offer;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[year]\n"; echo "\t\t\t'$r[name_es]'\n"; echo "\t\t\t'$r[name_en]'\n"; echo "\t\t\t'$r[name_eu]'\n"; echo "\t\t\t'$r[description_es]'\n"; echo "\t\t\t'$r[description_en]'\n"; echo "\t\t\t'$r[description_eu]'\n"; echo "\t\t\t$r[days]\n"; echo "\t\t\t$r[price]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table location echo "\t\n"; echo "\t\tlocation\n"; $q = mysqli_query($con, "SELECT id, dtime, lat, lon, manual FROM location;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[dtime]'\n"; echo "\t\t\t$r[lat]\n"; echo "\t\t\t$r[lon]\n"; echo "\t\t\t$r[manual]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table notification echo "\t\n"; echo "\t\tnotification\n"; $q = mysqli_query($con, "SELECT id, dtime, duration, action, title_es, title_en, title_eu, text_es, text_en, text_eu, internal FROM notification;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[dtime]'\n"; echo "\t\t\t$r[duration]\n"; echo "\t\t\t'$r[action]'\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[text_es]'\n"; echo "\t\t\t'$r[text_en]'\n"; echo "\t\t\t'$r[text_eu]'\n"; echo "\t\t\t$r[internal]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table people echo "\t\n"; echo "\t\tpeople\n"; $q = mysqli_query($con, "SELECT * FROM people;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[name_es]'\n"; echo "\t\t\t'$r[name_en]'\n"; echo "\t\t\t'$r[name_eu]'\n"; echo "\t\t\t'$r[link]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table photo echo "\t\n"; echo "\t\tphoto\n"; $q = mysqli_query($con, "SELECT photo.id AS id, file, permalink, title_es, title_en, title_eu, description_es, description_en, description_eu, dtime, uploaded, place, width, height, size, fname FROM photo, user WHERE photo.user = user.id AND approved = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[file]'\n"; echo "\t\t\t$r[city]\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[description_es]'\n"; echo "\t\t\t'$r[description_en]'\n"; echo "\t\t\t'$r[description_eu]'\n"; echo "\t\t\t'$r[dtime]'\n"; echo "\t\t\t'$r[uploaded]'\n"; echo "\t\t\t$r[place]\n"; echo "\t\t\t$r[width]\n"; echo "\t\t\t$r[height]\n"; echo "\t\t\t$r[size]\n"; if (strlen($r['username'] == 0)){ echo "\t\t\t\'$r[fname]'\n"; } else{ echo "\t\t\t\'$r[username]'\n"; } echo "\t\t\n"; } echo "\t
\n"; //Table photo_album echo "\t\n"; echo "\t\tphoto_album\n"; $q = mysqli_query($con, "SELECT * FROM photo_album;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[photo]\n"; echo "\t\t\t$r[album]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table photo_comment echo "\t\n"; echo "\t\tphoto_comment\n"; $q = mysqli_query($con, "SELECT photo_comment.id AS id, photo, text, dtime, fname, username, lang FROM photo_comment, user WHERE photo_comment.user = user.id AND approved = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[photo]\n"; echo "\t\t\t'$r[text]'\n"; echo "\t\t\t'$r[dtime]'\n"; if (strlen($r['username'] == 0)){ echo "\t\t\t\'$r[fname]'\n"; } else{ echo "\t\t\t\'$r[username]'\n"; } echo "\t\t\t'$r[lang]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table place echo "\t\n"; echo "\t\tplace\n"; $q = mysqli_query($con, "SELECT * FROM place;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[name_es]'\n"; echo "\t\t\t'$r[name_en]'\n"; echo "\t\t\t'$r[name_eu]'\n"; echo "\t\t\t'$r[address_es]'\n"; echo "\t\t\t'$r[address_en]'\n"; echo "\t\t\t'$r[address_eu]'\n"; echo "\t\t\t'$r[cp]'\n"; echo "\t\t\t$r[lat]\n"; echo "\t\t\t$r[lon]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table post echo "\t\n"; echo "\t\tpost\n"; $q = mysqli_query($con, "SELECT id, permalink, title_es, title_en, title_eu, text_es, text_en, text_eu, dtime, comments FROM post WHERE visible = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t'$r[permalink]'\n"; echo "\t\t\t'$r[title_es]'\n"; echo "\t\t\t'$r[title_en]'\n"; echo "\t\t\t'$r[title_eu]'\n"; echo "\t\t\t'$r[text_es]'\n"; echo "\t\t\t'$r[text_en]'\n"; echo "\t\t\t'$r[text_eu]'\n"; echo "\t\t\t'$r[dtime]'\n"; echo "\t\t\t$r[comments]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table post_comment echo "\t\n"; echo "\t\tpost_comment\n"; //$q = mysqli_query($con, "SELECT post_comment.id AS id, post, text, dtime, fname, post_comment.username AS username, lang FROM post_comment, user WHERE post_comment.user = user.id AND approved = 1;"); $q = mysqli_query($con, "SELECT id, post, text, dtime, username, lang FROM post_comment WHERE approved = 1;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[post]\n"; echo "\t\t\t'$r[text]'\n"; echo "\t\t\t'$r[dtime]'\n"; //if (strlen($r['username'] == 0)){ // echo "\t\t\t'$r[fname]'\n"; //} //else{ echo "\t\t\t'$r[username]'\n"; //} echo "\t\t\t'$r[lang]'\n"; echo "\t\t\n"; } echo "\t
\n"; //Table post_image echo "\t\n"; echo "\t\tpost_image\n"; $q = mysqli_query($con, "SELECT * FROM post_image;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[id]\n"; echo "\t\t\t$r[post]\n"; echo "\t\t\t'$r[image]'\n"; echo "\t\t\t$r[idx]\n"; echo "\t\t\n"; } echo "\t
\n"; //Table post_tag echo "\t\n"; echo "\t\tpost_tag\n"; $q = mysqli_query($con, "SELECT * FROM post_tag;"); while ($r = mysqli_fetch_array($q)){ echo "\t\t\n"; echo "\t\t\t$r[post]\n"; echo "\t\t\t'$r[tag]'\n"; echo "\t\t\n"; } echo "\t
\n"; echo "
\n"; ?>