index.action.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Fanwe 方维p2p借贷系统
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2011 http://www.fanwe.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Author: 云淡风轻(1956838968@qq.com)
  8. // +----------------------------------------------------------------------
  9. class indexCModule extends baseModule
  10. {
  11. //首页
  12. public function index()
  13. {
  14. $root = array();
  15. $root['page_title'] = "首页";
  16. $m_config = load_auto_cache("m_config");//初始化手机端配置
  17. $root['app_logo']=get_spec_image(".".substr($m_config['app_logo'],strpos($m_config['app_logo'],'/public')),170,170);//logo 170*170
  18. $root['app_name']=$m_config['app_name'];//应用名称
  19. $root['android_filename']=$m_config['android_filename'];//android下载链接
  20. if($m_config['ios_check_version'] != ''){
  21. $root['android_filename'] = '';
  22. }
  23. $root['ios_down_url']=$m_config['ios_down_url'];//ios下载链接
  24. $root['SITE_LICENSE']=app_conf('SITE_LICENSE');//站点版权:
  25. $root['NETWORK_FOR_RECORD']=app_conf('NETWORK_FOR_RECORD');//网络备案信息:
  26. $root['COPYRIGHT']=app_conf('COPYRIGHT');//Copyright:
  27. //生成二维码
  28. $invite_url = SITE_DOMAIN_DOWNLOAD.'/appdown.php';
  29. $path_dir = "/public/qrcode_wx.png";
  30. $path_logo_dir = "/public/qrcode_log_wx.png";
  31. $qrcode_dir = APP_ROOT_PATH.$path_dir;
  32. $qrcode_dir_logo = APP_ROOT_PATH.$path_logo_dir;
  33. if(!is_file($qrcode_dir)||!is_file($qrcode_dir_logo)){
  34. get_qrcode_png($invite_url,$qrcode_dir,$qrcode_dir_logo);
  35. }
  36. //$root['qrcode_url']=get_domain().$path_logo_dir;//二维码
  37. $root['qrcode_url']=SITE_DOMAIN.'/mapi/index.php?ctl=app_download';//二维码
  38. $root['bg_page']=app_conf('BG_PAGE');//背景图
  39. $root['bg_app']=app_conf('BG_APP');//右侧图片//bg_app 规格: 536*730
  40. $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
  41. $uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile|android)/i";
  42. if((preg_match($uachar, $ua))|| isApp()){
  43. api_wap_ajax_return($root);
  44. }else{
  45. api_ajax_return($root);
  46. }
  47. }
  48. //联系我们
  49. public function contact(){
  50. $root = array();
  51. $root['page_title'] = "联系我们";
  52. $sql = "select a.id,a.cate_id,a.title,a.content from ".DB_PREFIX."article a left join ".DB_PREFIX."article_cate b on b.id = a.cate_id where a.is_delete = 0 and a.is_effect = 1 and b.title = '联系我们'";
  53. $article = $GLOBALS['db']->getRow($sql,true,true);
  54. $root['content'] = $article['content'];
  55. api_ajax_return($root);
  56. }
  57. //隐私政策
  58. public function privacy(){
  59. $root = array();
  60. $root['page_title'] = "隐私政策";
  61. $sql = "select a.id,a.cate_id,a.title,a.content from ".DB_PREFIX."article a left join ".DB_PREFIX."article_cate b on b.id = a.cate_id where a.is_delete = 0 and a.is_effect = 1 and b.title = '隐私政策'";
  62. $article = $GLOBALS['db']->getRow($sql,true,true);
  63. $root['content'] = $article['content'];
  64. api_ajax_return($root);
  65. }
  66. //服务条款
  67. public function service(){
  68. $root = array();
  69. $root['page_title'] = "服务条款";
  70. $sql = "select a.id,a.title,a.cate_id,a.content from ".DB_PREFIX."article a left join ".DB_PREFIX."article_cate b on b.id = a.cate_id where a.is_delete = 0 and a.is_effect = 1 and b.title = '主播协议'";
  71. $article = $GLOBALS['db']->getRow($sql,true,true);
  72. $root['content'] = $article['content'];
  73. api_ajax_return($root);
  74. }
  75. }
  76. ?>