?? personal.js
字號:
function do_message_delete(){
if (trim($('messageid').value)==""){
window.alert("您沒有選擇任何消息,無法繼續操作");
}else{
if (confirm("您確定要刪除此消息嗎?")){
window.open("../../service/message_action.aspx?Command=Delete&Message=" + $("messageid").value, "_self", "");
}
}
}
// 回復消息
function do_message_reply(){
if (trim($('messageid').value)==""){
window.alert("您沒有選擇任何消息,無法繼續操作");
}else{
window.open("post.aspx?title=Re:"+$("title").value+"&recvsid="+$("sendid").value, "_self", "");
}
}
// ***********************************************************************************||
// 邀請函
// ***********************************************************************************||
// 邀請函重新排序
function do_invite_order(){
document.Form1.submit();
}
// 查詢發出的邀請函
function do_invite_search(){
if (trim($("searchkey").value)==""){
window.alert("查詢關鍵字不能為空");
}else{
document.Form1.submit();
}
}
// 發送邀請函檢測腳本
function on_invite_send(){
if (trim(document.Form1.email.value)==""){
window.alert("電子信箱不能為空");
document.Form1.email.focus();
return false;
}
if (trim(document.Form1.title.value)==""){
window.alert("邀請函標題不能為空");
document.Form1.title.focus();
return false;
}
return true;
}
function do_invite_copy_link(email, code){
var _url = getlocal() + "web/member/join.aspx?email="+email+"&code="+code;
setcopy(_url);
window.alert("提取成功,您可以直接粘貼至QQ,MSN,論壇等工具中發送給好友。");
}
// ***********************************************************************************||
// 文件夾
// ***********************************************************************************||
// 文件夾重新排序
function do_file_order(){
document.Form1.submit();
}
// 查詢上傳的文件
function do_file_search(){
if (trim($("searchkey").value)==""){
window.alert("查詢關鍵字不能為空");
}else{
document.Form1.submit();
}
}
// 上傳文件檢測腳本
function on_upload_check(){
var fcount = 0;
this.extensions = document.Form1._upload_extensions.value;
this.getextension = function(filepath){
var idotindex = filepath.lastIndexOf(".");
var affix = filepath.substring(idotindex, filepath.length);
return affix.toLowerCase();
}
for (i=1; i<10; i++){
if (trim($("file"+i).value)!=null){
if (extensions.indexOf(this.getextension($("file"+i).value))<0){
window.alert("不支持您選擇的文件類型,僅支持(" + extensions + ")");
$("file"+i).focus();
return false;
}
fcount ++;
}
}
if (fcount>0){
return true;
}else{
window.alert("對不起!您沒有選擇要上傳的文件");
return false;
}
}
// 顯示文件上傳進度
function progress_file(){
this.success = function(t){
$("lu_status").innerHTML = t;
}
this.error = function(){
$("lu_status").innerHTML = "錯誤";
}
var theajax = new ajax(false, this.success, this.error);
theajax.get(url, true);
}
// 刪除選中的文件
function do_file_deletes(){
if (sc_select_count($n('File'))>0){
if (confirm("您確定要刪除選中的文件嗎?")){
document.Form1.Command.value = "File_Delete";
document.Form1.action = "../../service/file_action.aspx";
document.Form1.submit();
}
}else{
window.alert("您沒有選擇任何文件,無法繼續操作");
}
}
// 設置選中的文件為共享
function do_file_share(){
if (sc_select_count($n('File'))>0){
document.Form1.Command.value = "File_Share";
document.Form1.action = "../../service/file_action.aspx";
document.Form1.submit();
}else{
window.alert("您沒有選擇任何文件,無法繼續操作");
}
}
// 取消選中的文件為共享
function do_file_noshare(){
if (sc_select_count($n('File'))>0){
document.Form1.Command.value = "File_Noshare";
document.Form1.action = "../../service/file_action.aspx";
document.Form1.submit();
}else{
window.alert("您沒有選擇任何文件,無法繼續操作");
}
}
// 修改文件信息
function do_file_modify(id){
window.open("detail.aspx?fileid="+id,"_self","");
}
// 編輯專輯信息
function on_file_modify_check(){
if (trim(document.Form1.name.value)==""){
window.alert("文件名稱必須填寫。");
document.Form1.name.focus();
return false;
}
return true;
}
// 返回我的文件夾
function go_myfile(){
window.open("default.aspx", "_self", "");
}
// 繼續上傳文件
function go_upload(){
window.open("upload.aspx", "_self", "");
}
// ***********************************************************************************||
// 主題
// ***********************************************************************************||
// 主題重新排序
function do_topic_order(){
document.Form1.submit();
}
// 查詢發表的主題
function do_topic_search(){
if (trim($("searchkey").value)==""){
window.alert("查詢關鍵字不能為空");
}else{
document.Form1.submit();
}
}
// 刪除主題
function do_topic_deletes(){
if (sc_select_count($n('Topic'))>0){
if (confirm("您確定要永久刪除選中的主題嗎?")){
document.Form1.Command.value = "Topic_Deletes";
document.Form1.action = "../../service/topic_action.aspx";
document.Form1.submit();
}
}else{
window.alert("您沒有選擇任何主題,無法繼續操作");
}
}
// 顯示分類提示信息
function do_show_sort_info(sortid){
this.success = function(t){
$("ls_tips").className = "cls_tips";
$("ls_tips").innerHTML = t;
}
this.error = function(){
$("ls_tips").className = "cls_error";
$("ls_tips").innerHTML = "獲取分類閱讀權限信息失敗";
}
$("ls_tips").className = "cls_progress";
$("ls_tips").innerHTML = "正在獲取閱讀權限信息,請等待...";
var theajax = new ajax(false, this.success, this.error);
theajax.get("../../Service/Ajax_Action.aspx?Command=Sort_Grade&SortID="+sortid, true);
}
// 發表主題
function on_topic_post(){
if (trim(document.Form1.title.value)==""){
window.alert("主題標題不能為空。");
document.Form1.title.focus();
return false;
}
if (trim(document.Form1.sortid.value)==""){
window.alert("主題分類必須選擇。");
document.Form1.sortid.focus();
return false;
}
if (IWE_Frame!=null){
if (IWE_Design_Mode)
{
var _icount = 0;
var _images = IWE_Frame.document.getElementsByTagName("IMG");
for (i=0; i<_images.length; i++){
if (_images[i].src.indexOf("/uploads/user_")>-1){
if (trim(document.Form1.miniurl.value)==""){
var _old = getfullfilename(_images[i].src);
var _new = "mini_" + _old;
document.Form1.miniurl.value = _images[i].src.replace(_old, _new);
}
_icount ++;
}
}
var _lcount = 0;
var _link = IWE_Frame.document.getElementsByTagName("A");
for (i=0; i<_link.length; i++){
if (_link[i].href.indexOf("/uploads/user_")>-1){
_lcount ++;
}
}
var _ocount = 0;
var _object = IWE_Frame.document.getElementsByTagName("EMBED");
for (i=0; i<_object.length; i++){
if (_object[i].src.indexOf("/uploads/user_")>-1){
_ocount ++;
}
}
document.Form1.acount.value = _icount + _lcount + _ocount;
document.Form1.content.value = IWE_Filter(IWE_Frame.document.body.innerHTML);
}else{
document.Form1.content.value = IWE_Frame.document.body.innerText
}
}
if (trim(document.Form1.content.value)==""){
window.alert("主題內容不能為空。");
if (IWE_Frame!=null){
IWE_Frame.focus();
}else{
document.Form1.content.focus();
}
return false;
}
return true;
}
// 回復重新排序
function do_reply_order(){
document.Form1.submit();
}
// 查詢發表的回復
function do_reply_search(){
if (trim($("searchkey").value)==""){
window.alert("查詢關鍵字不能為空");
}else{
document.Form1.submit();
}
}
// 查詢誰關注了我
function do_attention_search(){
document.Form1.submit();
}
// ***********************************************************************************||
// 專輯
// ***********************************************************************************||
// 專輯重新排序
function do_special_order(){
document.Form1.submit();
}
// 查詢創建的專輯
function do_special_search(){
if (trim($("searchkey").value)==""){
window.alert("查詢關鍵字不能為空");
}else{
document.Form1.submit();
}
}
// 編輯專輯信息
function on_special_create_check(){
if (trim(document.Form1.name.value)==""){
window.alert("專輯標題必須填寫。");
document.Form1.name.focus();
return false;
}
return true;
}
// 修改專輯信息
function do_special_modify(id){
window.open("detail.aspx?specialid="+id,"_self","");
}
// 刪除專輯信息
function do_special_delete(id){
if (confirm("您確定要刪除此專輯嗎?")){
window.open("../../service/topic_action.aspx?Command=Special_Delete&specialid="+id+"&returnurl="+document.Form1.returnurl.value,"_self","");
}
}
// 專輯主題重新排序
function do_special_topic_order(){
document.Form1.submit();
}
// 查詢我的主題
function do_special_mytopic(){
this.success = function(t){
$("div_list").innerHTML = t;
}
this.error = function(){
$("div_list").innerHTML = "<div class='cls_error'>查詢主題失敗</div>";
}
$("div_list").innerHTML = "<div class='cls_progress'>正在查詢主題,請等待...</div>";
var theajax = new ajax(false, this.success, this.error);
theajax.get("../../Service/Ajax_Action.aspx?Command=Topic_Find&searchkey="+escape($("searchkey").value)+"&pageid="+$("_pageid").value, true);
}
// 選擇主題
function do_special_topic_find(){
if (isiexplorer()){
var retval = window.showModalDialog("topics.aspx", window, "dialogWidth:640px; dialogHeight:480px; status:yes; directories:yes; scrollbars:no; resizable=no; help: no;");
if( retval != null && trim(retval)!="" ) {
document.Form1.topicsid.value = retval;
document.Form1.Command.value = "Special_Topic_Entry";
document.Form1.action = "../../service/topic_action.aspx";
document.Form1.submit();
}
}else{
modelDialog = window.open("topics.aspx", "_blank", "width=640,height=480,scroolbars=0");
}
}
// 選中確定的主題
function do_special_topic_select(){
var _scount = sc_select_count($n("Topic"));
var _topics = "";
if (_scount>0){
if (typeof(document.Form1.Topic.length)=="undefined")
{
if (document.Form1.Topic.checked){
_topics = document.Form1.Topic.value;
}
}else{
for(i=0;i<document.Form1.Topic.length;i++){
if (document.Form1.Topic[i].checked){
if (trim(_topics)==""){
_topics += document.Form1.Topic[i].value;
}else{
_topics += "," + document.Form1.Topic[i].value;
}
}
}
}
if (isiexplorer()){
window.returnValue = _topics;
window.close();
}else{
window.opener.document.Form1.topicsid.value = _topics;
window.opener.document.Form1.Command.value = "Special_Topic_Entry";
window.opener.document.Form1.action = "../../service/topic_action.aspx";
window.opener.document.Form1.submit();
window.close();
}
}else{
window.alert("沒有選擇任何主題。");
}
}
// 從專輯中刪除主題
function do_special_topic_delete(){
if (sc_select_count($n('Topic'))>0){
if (confirm("您確定要從專輯中刪除選中的主題嗎?")){
document.Form1.Command.value = "Special_Topic_Delete";
document.Form1.action = "../../service/topic_action.aspx";
document.Form1.submit();
}
}else{
window.alert("您沒有選擇任何主題,無法繼續操作");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -