Привет, Гость!
Главная
Вход

Последняя активность

Форум / JohnCMS / моды, дизайн / Модули для JohnCMS 7.x.x
Поиск | Файлы топика (2)
  Magazin Shop
casanova casanova [Off] [#] (25.05.2017 / 18:46)
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
Прикреплённый файл:
1495727211index.rar (1.77 кб.)
Скачано: 209 раз
citybooks citybooks [Off] [#] (08.06.2017 / 19:34)
What is it for? Please
casanova casanova [Off] [#] (09.06.2017 / 09:19)
For karma , change status and remove ban history
citybooks citybooks [Off] [#] (09.06.2017 / 18:24)
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.
jimy jimy [Off] [#] (14.06.2017 / 09:09)
# citybooks (09.06.2017 / 18:24)
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.
maybe like this,
  1. .''")->fetchColumn();
  2.  
  3. /* executor */
  4. if (isset($_POST['submit'])) {
  5. $error = [];
  6. $point = isset($_POST['point']) ? trim($_POST['point']) : false;
  7. if (empty($_POST['text'])) {
  8. $error['point'][] = _t('You cant send empty point!','system');
  9. }
  10. if ($point >= $pointgiver) {
  11. $error['point'][] = _t('You cant send more than your point!','system');
  12. }
  13. if ($user['id'] == $systemUser->id) {
  14. $error['point'][] = _t('You cant send to your self!','system');
  15. }
  16. $flood = $tools->antiflood();
  17. if ($flood) {
  18. $error['flood'][] = sprintf(_t('You cannot add point so often. Please, wait %d seconds.','system'), $flood);
  19. }
  20. /* update data for receiver */
  21. if (!$error) {
  22. $receive = $pointreceive + $point;
  23. $db->prepare('
  24. UPDATE `point` SET
  25. `total` = ?
  26. WHERE `user` = ?
  27. ')->execute([
  28. $receive,
  29. $user['id'],
  30. ]);
  31. }
  32.  
  33. /* update data for giver */
  34. if (!$error) {
  35. $given = $pointgiver - $point;
  36. $db->prepare('
  37. UPDATE `point` SET
  38. `total` = ?
  39. WHERE `user` = ?
  40. ')->execute([
  41. $given,
  42. $user['id'],
  43. ]);
  44. }
  45. $db->query("OPTIMIZE TABLE `point`");
  46. }
  47.  
  48. /* form (edit form action) */
  49. echo '<form action="?" method="post" name="form">'.
  50. (isset($error['flood']) ? '<p class="red">'.implode($error['flood']).'</p>' : '').
  51. (isset($error['point']) ? '<p class="red">'.implode($error['point']).'</p>' : '');
  52. echo '<p>Point giver</p>';
  53. echo '<p><input type="number" name="point" value="'.$point.'"/></p>';
  54. echo '<input type="submit" name="submit" value="'._t('Send','system').'"/></form>';

Изм. jimy (14.06.2017 / 09:11) [1]
jimy jimy [Off] [#] (14.06.2017 / 09:12)
cek file for comple example
Изм. jimy (14.06.2017 / 09:13) [1]
Прикреплённый файл:
expoint.txt (1.87 кб.)
Скачано: 206 раз
citybooks citybooks [Off] [#] (16.06.2017 / 01:22)
# jimy (14.06.2017 / 09:09)
maybe like this,
.''")->fetchColumn();

/* executor */
if (isset($_POST['submit'])) {
$error = [];
$point = isset($_POST['point']) ? trim($_POST['point']) : false;
if (empty($_POST['text']))
Not working properly for me, http://kinsvilla.com.ng
jimy jimy [Off] [#] (01.07.2017 / 08:42)
# citybooks (16.06.2017 / 01:22)
Not working properly for me, http://kinsvilla.com.ng
that's for example, learn the structure only, check every sql request
citybooks citybooks [Off] [#] (13.07.2017 / 17:58)
# jimy (01.07.2017 / 08:42)
that's for example, learn the structure only, check every sql request
Can u help me fix it? An new to it bro
  Всего: 9

Фильтр по автору
Скачать тему

Форум

Новые вверху
Главная
1 / 57

JohnCMS 7.1.0

Яндекс.Метрика
© JohnCMS