common.php 454 B

12345678910111213141516
  1. <?php
  2. function checkVersion()
  3. {
  4. $video = 1;
  5. $journal_buy = 1;
  6. $config = Dever::db('main/config')->one();
  7. if (isset($config['video']) && $config['video'] == 2) {
  8. $video = 2;
  9. } elseif (isset($config['version']) && Dever::input('version') && $config['version'] == Dever::input('version')) {
  10. $video = 2;
  11. $journal_buy = 2;
  12. }
  13. return (object) array('video' => $video, 'journal_buy' => $journal_buy);
  14. }