Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2. $smarty->assign('settings', true);
  3. if(empty($_POST)){
  4. $smarty->assign('submit', false);
  5.  
  6. $all = dibi::select('var,value')
  7. ->from($configTable)
  8. //->test();
  9. ->fetchAll();
  10. $smarty->assign_by_ref('ListSettings', $all);
  11. }
  12. else{
  13. $smarty->assign('submit', true);
  14. foreach ($_POST as $n => $r) {
  15. $record = array(
  16. 'value' => $r,
  17. );
  18. $update = dibi::update($configTable, $record) #updateing table
  19. ->where('var = %s', $n)
  20. //->test();
  21. ->execute();
  22. $smarty->assign('update', true);
  23. }
  24. $Main->log($_SESSION['userName'],$userIP,'Updated <i><b>'. $title .'</b></i>');
  25. }
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement