Example #1
0
 function ModifyNormal($options = array())
 {
     $action = "admin.php?mod=setting&code=domodify_normal";
     $iphone_file_msg = $options['iphone_file_msg'] ? $options['iphone_file_msg'] : '';
     $iphone_join_msg = $options['iphone_join_msg'] ? $options['iphone_join_msg'] : '';
     $cache_id = "misc/role/admin_role_list";
     if (false === ($role_list = cache_file('get', $cache_id))) {
         $sql = "\r\n\t\t\tSELECT\r\n\t\t\t\tid,name,`type`\r\n\t\t\tFROM\r\n\t\t\t\t" . TABLE_PREFIX . 'role';
         $query = $this->DatabaseHandler->Query($sql);
         while (false != ($row = $query->getRow())) {
             $role_list[$row['type']][] = array('name' => $row['name'], 'value' => $row['id']);
         }
         cache_file('set', $cache_id, $role_list);
     }
     $login_by_uid = $this->jishigou_form->YesNoRadio('config[login_by_uid]', (int) $this->Config['login_by_uid']);
     $register_link_display_radio = $this->jishigou_form->YesNoRadio('config[register_link_display]', (int) $this->Config['register_link_display']);
     $regiter3_radio = $this->jishigou_form->YesNoRadio('config[reg_step3_radio]', (int) $this->Config['reg_step3_radio']);
     $regiter4_radio = $this->jishigou_form->YesNoRadio('config[reg_step4_radio]', (int) $this->Config['reg_step4_radio']);
     $regiter_tuijian = array(array("name" => "所选频道达人", "value" => "channel"), array('name' => '常被赞的人', 'value' => 'dig'), array("name" => "官方推荐用户", "value" => "recd"));
     $regiter_tuijian_select = $this->jishigou_form->Checkbox("config[regiter_tuijian][]", $regiter_tuijian, $this->Config['regiter_tuijian']);
     $regiter5_radio = $this->jishigou_form->YesNoRadio('config[reg_step5_radio]', (int) $this->Config['reg_step5_radio']);
     $regiter6_radio = $this->jishigou_form->YesNoRadio('config[reg_step6_radio]', (int) $this->Config['reg_step6_radio']);
     $regiter7_radio = $this->jishigou_form->YesNoRadio('config[reg_step7_radio]', (int) $this->Config['reg_step7_radio']);
     if ($this->Config['channel_enable']) {
         $cachefile = jconf::get('channel');
         $channelFirst = is_array($cachefile['first']) ? $cachefile['first'] : array();
         $channelSecond = is_array($cachefile['second']) ? $cachefile['second'] : array();
         $channels = $cachefile['channels'];
         $channel_list = array();
         if ($channels) {
             $channel_list[0] = array('name' => '请选择', 'value' => '');
             foreach ($channels as $key => $val) {
                 if ($key > 0) {
                     $channel_list[$key]['valeu'] = $key;
                     $channel_list[$key]['name'] = $channelFirst[$key]['ch_name'] ? $channelFirst[$key]['ch_name'] : $channelSecond[$key]['ch_name'];
                 }
             }
             $first_topic_to_channel = $this->jishigou_form->Select('config[first_topic_to_channel]', $channel_list, $this->Config['first_topic_to_channel']);
         }
     }
     $website_home_page_list = array(array("name" => "经典首页(微博和登录框)", "value" => "topic|normal"), array('name' => '简易首页(频道和登录框)', 'value' => 'topic|simple'), array("name" => "极简首页(仅登录框)", "value" => "topic|only_login"), array("name" => "广场(最新微博)", "value" => "topic|new"), array("name" => "图片墙(微博图片)", "value" => "topic|photo"));
     $channels = jlogic('channel')->get_pub_channel();
     if ($channels['channel_enable'] && $this->Config['channel_enable']) {
         $website_home_page_list[] = array("name" => "频道页面(频道微博)", "value" => "topic|channellogin");
     }
     $website_home_page = $this->jishigou_form->Select('config[website_home_page]', $website_home_page_list, $this->Config['default_module'] . '|' . $this->Config['default_code']);
     $normal_role_select = $this->jishigou_form->Select('config[normal_default_role_id]', $role_list['normal'], $this->Config['normal_default_role_id']);
     $no_verify_email_role_select = $this->jishigou_form->Select('config[no_verify_email_role_id]', $role_list['normal'], $this->Config['no_verify_email_role_id']);
     $email_verify_radio = $this->jishigou_form->YesNoRadio('config[reg_email_verify]', (int) $this->Config['reg_email_verify']);
     $user_forbid = jconf::get('user', 'forbid');
     $email_white_list = jconf::get('email_white_list');
     if ($email_white_list) {
         $email_white_list = implode("\r\n", $email_white_list);
     } else {
         $email_white_list = '';
     }
     $register = jconf::get('register');
     $time_unit_config = jconf::get('time_unit');
     $register_ip_time_unit_select = $this->jishigou_form->Select('register[ip][time_unit]', $time_unit_config, $register['ip']['time_unit']);
     $register_ip_white_list = is_array($register['ip']['white_list']) && $register['ip']['white_list'] ? implode("\n", $register['ip']['white_list']) : "";
     $_config = array("-12" => array("value" => "-12", "name" => "(GMT -12:00) Eniwetok, Kwajalein"), "-11" => array("value" => "-11", "name" => "(GMT -11:00) Midway Island, Samoa"), "-10" => array("value" => "-10", "name" => "(GMT -10:00) Hawaii"), "-9" => array("value" => "-9", "name" => "(GMT -09:00) Alaska"), "-8" => array("value" => "-8", "name" => "(GMT -08:00) Pacific Time (US & Canada), Tijuana"), "-7" => array("value" => "-7", "name" => "(GMT -07:00) Mountain Time (US & Canada), Arizona"), "-6" => array("value" => "-6", "name" => "(GMT -06:00) Central Time (US & Canada), Mexico City"), "-5" => array("value" => "-5", "name" => "(GMT -05:00) Eastern Time (US & Canada), Bogota, Lima, Quito"), "-4" => array("value" => "-4", "name" => "(GMT -04:00) Atlantic Time (Canada), Caracas, La Paz"), "-3.5" => array("value" => "-3.5", "name" => "(GMT -03:30) Newfoundland"), "-3" => array("value" => "-3", "name" => "(GMT -03:00) Brassila, Buenos Aires, Georgetown, Falkland Is"), "-2" => array("value" => "-2", "name" => "(GMT -02:00) Mid-Atlantic, Ascension Is., St. Helena"), "-1" => array("value" => "-1", "name" => "(GMT -01:00) Azores, Cape Verde Islands"), "0" => array("value" => "0", "name" => "(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia"), "1" => array("value" => "1", "name" => "(GMT +01:00) Amsterdam, Berlin, Brussels, Madrid, Paris, Rome"), "2" => array("value" => "2", "name" => "(GMT +02:00) Cairo, Helsinki, Kaliningrad, South Africa"), "3" => array("value" => "3", "name" => "(GMT +03:00) Baghdad, Riyadh, Moscow, Nairobi"), "3.5" => array("value" => "3.5", "name" => "(GMT +03:30) Tehran"), "4" => array("value" => "4", "name" => "(GMT +04:00) Abu Dhabi, Baku, Muscat, Tbilisi"), "4.5" => array("value" => "4.5", "name" => "(GMT +04:30) Kabul"), "5" => array("value" => "5", "name" => "(GMT +05:00) Ekaterinburg, Islamabad, Karachi, Tashkent"), "5.5" => array("value" => "5.5", "name" => "(GMT +05:30) Bombay, Calcutta, Madras, New Delhi"), "5.75" => array("value" => "5.75", "name" => "(GMT +05:45) Katmandu"), "6" => array("value" => "6", "name" => "(GMT +06:00) Almaty, Colombo, Dhaka, Novosibirsk"), "6.5" => array("value" => "6.5", "name" => "(GMT +06:30) Rangoon"), "7" => array("value" => "7", "name" => "(GMT +07:00) Bangkok, Hanoi, Jakarta"), "8" => array("value" => "8", "name" => "(GMT +08:00) Beijing, Hong Kong, Perth, Singapore, Taipei"), "9" => array("value" => "9", "name" => "(GMT +09:00) Osaka, Sapporo, Seoul, Tokyo, Yakutsk"), "9.5" => array("value" => "9.5", "name" => "(GMT +09:30) Adelaide, Darwin"), "10" => array("value" => "10", "name" => "(GMT +10:00) Canberra, Guam, Melbourne, Sydney, Vladivostok"), "11" => array("value" => "11", "name" => "(GMT +11:00) Magadan, New Caledonia, Solomon Islands"), "12" => array("value" => "12", "name" => "(GMT +12:00) Auckland, Wellington, Fiji, Marshall Island"));
     $timezone_select = $this->jishigou_form->Select("config[timezone]", $_config, (int) $this->Config['timezone']);
     $gzip_radio = $this->jishigou_form->YesNoRadio("config[gzip]", (int) $this->Config['gzip']);
     $wap_radio = $this->jishigou_form->YesNoRadio("config[wap]", (int) $this->Config['wap']);
     $iphone_push_enable = $this->jishigou_form->YesNoRadio("config[iphone_push_enable]", (int) $this->Config['iphone_push_enable']);
     $edit_nickname_enable = $this->jishigou_form->YesNoRadio('config[edit_nickname_enable]', (int) $this->Config['edit_nickname_enable']);
     $edit_face_enable = $this->jishigou_form->YesNoRadio('config[edit_face_enable]', (int) $this->Config['edit_face_enable']);
     $same_city = $this->jishigou_form->YesNoRadio('config[same_city]', (int) $this->Config['same_city']);
     $verify_radio = $this->jishigou_form->YesNoRadio('config[verify]', (int) $this->Config['verify']);
     $alert_radio = $this->jishigou_form->YesNoRadio('config[verify_alert]', (int) $this->Config['verify_alert']);
     $face_verify_radio = $this->jishigou_form->YesNoRadio('config[face_verify]', (int) $this->Config['face_verify']);
     $sign_verify_radio = $this->jishigou_form->YesNoRadio('config[sign_verify]', (int) $this->Config['sign_verify']);
     $widget_radio = $this->jishigou_form->YesNoRadio('config[widget_enable]', (int) $this->Config['widget_enable']);
     $qmd_radio = $this->jishigou_form->YesNoRadio("config[is_qmd]", (int) $this->Config['is_qmd']);
     $qmd_link_display_radio = $this->jishigou_form->YesNoRadio("config[qmd_link_display]", (int) $this->Config['qmd_link_display']);
     $video_radio = $this->jishigou_form->YesNoRadio("config[video_status]", (int) $this->Config['video_status']);
     $open_city_radio = $this->jishigou_form->YesNoRadio("config[city_status]", (int) $this->Config['city_status']);
     $open_signature_radio = $this->jishigou_form->YesNoRadio("config[is_signature]", (int) $this->Config['is_signature']);
     $open_level_radio = $this->jishigou_form->YesNoRadio("config[level_radio]", (int) $this->Config['level_radio']);
     $open_topic_level_radio = $this->jishigou_form->YesNoRadio("config[topic_level_radio]", (int) $this->Config['topic_level_radio']);
     $is_topic_user_follow = $this->jishigou_form->YesNoRadio("config[is_topic_user_follow]", (int) $this->Config['is_topic_user_follow']);
     $open_wap_reg_radio = $this->jishigou_form->YesNoRadio("config[wap_reg_radio]", (int) $this->Config['wap_reg_radio']);
     $topic_only_vip = (int) $this->Config['topic_vip'];
     $topic_only_vip_checked[$topic_only_vip ? $topic_only_vip : 0] = 'checked';
     $email_must_be_true[$this->Config['email_must_be_true'] ? $this->Config['email_must_be_true'] : 0] = 'checked';
     #发微博需要上传头像
     $add_topic_need_face = $this->jishigou_form->YesNoRadio("config[add_topic_need_face]", (int) $this->Config['add_topic_need_face']);
     $_config = array(0 => array('name' => '从中心向四周截图(多图排列更平整),生成上述设定宽高的小图,如120x120(默认)<br />', 'value' => 0), 1 => array('name' => '全图等比例缩放(将最长一边缩小到120,另一边等比例缩小),如60x120,120x100<br />', 'value' => 1));
     $thumb_cut_type_radio = $this->jishigou_form->Radio("config[thumb_cut_type]", $_config, (int) $this->Config['thumb_cut_type']);
     $watermark_enable_radio = $this->jishigou_form->YesNoRadio("config[watermark_enable])", (bool) $this->Config['watermark_enable']);
     $only_show_vip_topic = $this->jishigou_form->YesNoRadio("config[only_show_vip_topic])", (bool) $this->Config['only_show_vip_topic']);
     $_config = array(1 => array('name' => '左上角', 'value' => 1), 2 => array('name' => '左下角', 'value' => 2), 3 => array('name' => '右上角', 'value' => 3), 4 => array('name' => '右下角', 'value' => 4), -1 => array('name' => '随机位置', 'value' => -1));
     $watermark_position_radio = $this->jishigou_form->Radio("config[watermark_position]", $_config, (int) $this->Config['watermark_position']);
     $close_second_verify_enable_radio = $this->jishigou_form->YesNoRadio("config[close_second_verify_enable]", (bool) $this->Config['close_second_verify_enable']);
     $jump_to_enable_radio = $this->jishigou_form->YesNoRadio("config[jump_to_enable]", (bool) $this->Config['jump_to_enable']);
     $contents = array(0 => array('name' => '个性域名', 'value' => 'url'), 1 => array('name' => '@用户昵称', 'value' => 'nickname'));
     $watermark_contents_radio = $this->jishigou_form->Checkbox("config[watermark_contents][]", $contents, $this->Config['watermark_contents']);
     $sec_options = array(array("name" => "不开启(关闭)", "value" => "0", 'extra' => ''), array("name" => "开启普通验证码", "value" => "1", 'extra' => ''), array("name" => "开启云验证码", "value" => "2", 'extra' => ''));
     $seccode_enable_radio = $this->jishigou_form->Radio("seccode_enable", $sec_options, (int) $this->Config['seccode_enable']);
     $seccode_1_style = $this->Config['seccode_enable'] == '1' ? '' : 'none';
     $seccode_2_style = $this->Config['seccode_enable'] == '2' ? '' : 'none';
     $checked = array();
     $checked['seccode_login'] = $this->Config['seccode_login'] ? 'checked="checked"' : '';
     $checked['seccode_register'] = $this->Config['seccode_register'] ? 'checked="checked"' : '';
     $checked['seccode_password'] = $this->Config['seccode_password'] ? 'checked="checked"' : '';
     $checked['seccode_publish'] = $this->Config['seccode_publish'] ? 'checked="checked"' : '';
     $checked['seccode_comment'] = $this->Config['seccode_comment'] ? 'checked="checked"' : '';
     $checked['seccode_forward'] = $this->Config['seccode_forward'] ? 'checked="checked"' : '';
     $checked['seccode_sms'] = $this->Config['seccode_sms'] ? 'checked="checked"' : '';
     $checked['seccode_no_email'] = $this->Config['seccode_no_email'] ? 'checked="checked"' : '';
     $checked['seccode_no_photo'] = $this->Config['seccode_no_photo'] ? 'checked="checked"' : '';
     $checked['seccode_no_vip'] = $this->Config['seccode_no_vip'] ? 'checked="checked"' : '';
     @($site_enable = file_get_contents(ROOT_PATH . './data/cache/site_enable.txt'));
     $_options = array('normal' => array('name' => '普通注册', 'value' => 'normal'), 'invite' => array('name' => '邀请注册', 'value' => 'invite'));
     $regstatus_checkbox = $this->jishigou_form->Checkbox('config[regstatus][]', $_options, $this->Config['regstatus']);
     $third_party_regstatus = array();
     if (sina_weibo_init($this->Config)) {
         $third_party_regstatus['sina'] = array('name' => '新浪微博', 'value' => 'sina');
     }
     if (qqwb_init($this->Config)) {
         $third_party_regstatus['qqwb'] = array('name' => '腾讯微博', 'value' => 'qqwb');
     }
     if (kaixin_init($this->Config)) {
         $third_party_regstatus['kaixin'] = array('name' => '开心帐户', 'value' => 'kaixin');
     }
     if (renren_init($this->Config)) {
         $third_party_regstatus['renren'] = array('name' => '人人帐户', 'value' => 'renren');
     }
     if (yy_init($this->Config)) {
         $third_party_regstatus['yy'] = array('name' => 'YY帐户', 'value' => 'yy');
     }
     if ($third_party_regstatus) {
         $third_party_regstatus_checkbox = $this->jishigou_form->Checkbox('config[third_party_regstatus][]', $third_party_regstatus, $this->Config['third_party_regstatus']);
     }
     $register_invite_input_radio = $this->jishigou_form->YesNoRadio("config[register_invite_input]", (int) $this->Config['register_invite_input']);
     $register_invite_input2_radio = $this->jishigou_form->YesNoRadio("config[register_invite_input2]", (int) $this->Config['register_invite_input2']);
     $company_enable = $this->jishigou_form->YesNoRadio("config[company_enable]", (int) $this->Config['company_enable']);
     $department_enable = $this->jishigou_form->YesNoRadio("config[department_enable]", (int) $this->Config['department_enable']);
     if (@is_file(ROOT_PATH . 'include/logic/cp.logic.php')) {
         $cp_enable = true;
     } else {
         $cp_enable = false;
     }
     $reply_mode_normal_radio = $this->jishigou_form->YesNoRadio("config[reply_mode_normal]", (int) $this->Config['reply_mode_normal']);
     $tpl = $options['tpl'] ? $options['tpl'] : 'admin/setting_normal';
     $purviewhtml = $options['purviewhtml'] ? $options['purviewhtml'] : '';
     $pub_key = $options['pub_key'] ? $options['pub_key'] : $this->yxm_pri_key;
     $pri_key = $options['pri_key'] ? $options['pri_key'] : $this->yxm_pub_key;
     include template($tpl);
 }
Example #2
0
 function _init_yy()
 {
     if ($this->Config['yy_enable'] && yy_init($this->Config)) {
         $this->callback_url = $this->Config['site_url'] . "/api/yy.php";
         $this->yyConfig = jconf::get('yy');
         if (MEMBER_ID > 0) {
             $this->yyBindInfo = DB::fetch_first("select * from " . TABLE_PREFIX . "yy_bind_info where `uid`='" . MEMBER_ID . "'");
         }
         $this->_init_yy_oauth();
         if ($this->Config['third_party_regstatus'] && in_array('yy', $this->Config['third_party_regstatus'])) {
             define('JISHIGOU_FORCED_REGISTER', true);
         }
     } else {
         $this->Messager("整合YY的功能未开启", null);
     }
 }
Example #3
0
    ?>
 <?php 
}
?>
 <?php 
if ($this->Config['qqwb_enable'] && qqwb_init()) {
    ?>
&nbsp; 
<?php 
    echo qqwb_login('b');
    ?>
 <?php 
}
?>
 <?php 
if ($this->Config['yy_enable'] && yy_init()) {
    ?>
&nbsp; 
<?php 
    echo yy_login('b');
    ?>
 <?php 
}
?>
 <?php 
if ($this->Config['renren_enable'] && renren_init()) {
    ?>
&nbsp; 
<?php 
    echo renren_login('b');
    ?>
Example #4
0
 function Main()
 {
     if (!$this->Config['ldap_enable']) {
         $member = jsg_member_info(MEMBER_ID);
         $act_list = array();
         $act_list['qqwb'] = '腾讯微博';
         $act_list['sina'] = '新浪微博';
         $act_list['yy'] = 'YY帐号';
         $act_list['renren'] = '人人帐号';
         $act_list['kaixin'] = '开心帐号';
         if ($this->Config['fjau_enable']) {
             $act_list['fjau'] = 'FJAU帐号';
         }
         $act = isset($act_list[$this->Code]) ? $this->Code : 'qqwb';
         $this->Code = $act;
         if ('qqwb' == $act) {
             $qqwb_init = qqwb_init($this->Config);
             if ($qqwb_init) {
                 $qqwb = jconf::get('qqwb');
                 $qqwb_bind_info = qqwb_bind_info(MEMBER_ID);
                 if ($qqwb_bind_info) {
                     if ($qqwb['is_synctopic_toweibo']) {
                         $synctoqq_radio = jform()->YesNoRadio('synctoqq', (int) $qqwb_bind_info['synctoqq']);
                     }
                     if ($qqwb['is_synctopic_tojishigou']) {
                         $sync_weibo_to_jishigou_radio = jform()->YesNoRadio('sync_weibo_to_jishigou', (int) $qqwb_bind_info['sync_weibo_to_jishigou']);
                     }
                     if ($qqwb['is_syncreply_tojishigou']) {
                         $sync_reply_to_jishigou_radio = jform()->YesNoRadio('sync_reply_to_jishigou', (int) $qqwb_bind_info['sync_reply_to_jishigou']);
                     }
                 }
             }
         } elseif ('sina' == $act) {
             $profile_bind_message = '新浪微博帐号绑定功能未启用,请联系管理员';
             $sina_init = sina_init($this->Config);
             if ($sina_init) {
                 $sina = jconf::get('sina');
                 if ($sina['oauth2_enable']) {
                     $sina_bind_info = sina_weibo_bind_info(MEMBER_ID);
                     if ($sina_bind_info) {
                         $profiles = $sina_bind_info['profiles'];
                         if ($sina['is_synctopic_toweibo']) {
                             $synctoweibo_radio = jform()->YesNoRadio('bind_setting', (int) sina_weibo_bind_setting(MEMBER_ID));
                         }
                         if ($sina['is_synctopic_tojishigou']) {
                             $synctopic_tojishigou_radio = jform()->YesNoRadio('synctopic_tojishigou', (int) $profiles['synctopic_tojishigou']);
                         }
                         if ($sina['is_syncreply_tojishigou']) {
                             $syncreply_tojishigou_radio = jform()->YesNoRadio('syncreply_tojishigou', (int) $profiles['syncreply_tojishigou']);
                         }
                         $expires_in_time = my_date_format($sina_bind_info['dateline'] + $sina_bind_info['expires_in'], 'Y-m-d H:i');
                     }
                 } else {
                     $xwb_start_file = ROOT_PATH . 'include/ext/xwb/sina.php';
                     if (!is_file($xwb_start_file)) {
                         $profile_bind_message = '&#25554;&#20214;&#25991;&#20214;&#20002;&#22833;&#65292;&#26080;&#27861;&#21551;&#21160;&#65281;';
                     } else {
                         require $xwb_start_file;
                         $profile_bind_message = '<a href="javascript:XWBcontrol.bind()">&#22914;&#26524;&#30475;&#19981;&#21040;&#26032;&#28010;&#24494;&#21338;&#32465;&#23450;&#35774;&#32622;&#31383;&#21475;&#65292;&#35831;&#28857;&#20987;&#36825;&#37324;&#21551;&#21160;&#12290;</a>';
                         $GLOBALS['xwb_tips_type'] = 'bind';
                         $profile_bind_message .= jsg_sina_footer();
                     }
                 }
             }
         } elseif ('yy' == $act) {
             $yy_init = yy_init($this->Config);
             if ($yy_init) {
                 $yy_bind_info = yy_bind_info(MEMBER_ID);
             }
         } elseif ('renren' == $act) {
             $renren_init = renren_init($this->Config);
             if ($renren_init) {
                 $renren_bind_info = renren_bind_info(MEMBER_ID);
             }
         } elseif ('kaixin' == $act) {
             $kaixin_init = kaixin_init($this->Config);
             if ($kaixin_init) {
                 $kaixin_bind_info = kaixin_bind_info(MEMBER_ID);
             }
         } elseif ('fjau' == $act) {
             $fjau_init = fjau_init($this->Config);
             if ($fjau_init) {
                 $fjau_bind_info = fjau_bind_info(MEMBER_ID);
             }
         } else {
         }
         $this->Title = $act_list[$act];
     }
     include template('setting/account_main');
 }