This is a remake of the file magazin.php i have found on this site.
Works for johncms 7++
Feel free to add any modification
Instalation:
Just create new folder in root of the site and put this file in it.
After,add a link to it in mainmenu.php
This is a remake of the file magazin.php i have found on this site.
Works for johncms 7++
Feel free to add any modification
Instalation:
Just create new folder in root of the site and put this file in it.
After,add a link to it in mainmenu.php
What is it for? Please
For karma , change status and remove ban history
How about users sharing there point, cod with admin function to share point for all users too, and admin ability to close and open the sharing page.
# citybooks (09.06.2017 / 18:24)maybe like this,
How about users sharing there point, cod with admin function to share point for all users too, and admin ability to close and open the sharing page.
.''")->fetchColumn();
/* executor */
if (isset($_POST['submit'])) {
$error = [];
$point = isset($_POST['point']) ? trim($_POST['point']) : false;
if (empty($_POST['text'])) {
$error['point'][] = _t('You cant send empty point!','system');
}
if ($point >= $pointgiver) {
$error['point'][] = _t('You cant send more than your point!','system');
}
if ($user['id'] == $systemUser->id) {
$error['point'][] = _t('You cant send to your self!','system');
}
$flood = $tools->antiflood();
if ($flood) {
$error['flood'][] = sprintf(_t('You cannot add point so often. Please, wait %d seconds.','system'), $flood);
}
/* update data for receiver */
if (!$error) {
$receive = $pointreceive + $point;
$db->prepare('
UPDATE `point` SET
`total` = ?
WHERE `user` = ?
')->execute([
$receive,
$user['id'],
]);
}
/* update data for giver */
if (!$error) {
$given = $pointgiver - $point;
$db->prepare('
UPDATE `point` SET
`total` = ?
WHERE `user` = ?
')->execute([
$given,
$user['id'],
]);
}
$db->query("OPTIMIZE TABLE `point`");
}
/* form (edit form action) */
echo '<form action="?" method="post" name="form">'.
(isset($error['flood']) ? '<p class="red">'.implode($error['flood']).'</p>' : '').
(isset($error['point']) ? '<p class="red">'.implode($error['point']).'</p>' : '');
echo '<p>Point giver</p>';
echo '<p><input type="number" name="point" value="'.$point.'"/></p>';
echo '<input type="submit" name="submit" value="'._t('Send','system').'"/></form>'; # jimy (14.06.2017 / 09:09)Not working properly for me, http://kinsvilla.com.ng
maybe like this,
.''")->fetchColumn();
/* executor */
if (isset($_POST['submit'])) {
$error = [];
$point = isset($_POST['point']) ? trim($_POST['point']) : false;
if (empty($_POST['text']))
# citybooks (16.06.2017 / 01:22)that's for example, learn the structure only, check every sql request
Not working properly for me, http://kinsvilla.com.ng
# jimy (01.07.2017 / 08:42)Can u help me fix it? An new to it bro
that's for example, learn the structure only, check every sql request