code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<div id="body-wrapper"> <!-- Wrapper for the radial gradient background --> <div id="sidebar"> <div id="sidebar-wrapper"> <!-- Sidebar with logo and menu --> <h1 id="sidebar-title"><a href="#" title="{$LANG.WEBSITE_NAME}">{$LANG.WEBSITE_NAME}</a></h1> <!-- Logo (221px wide) --> <a href="#"><img id="logo" src="{$admin_image}/logo.png" alt="{$LANG.WEBSITE_NAME}" /></a> <div id="profile-links"><a href="{$LANGUAGE_PATH}?language=english">{$LANG.ENGLISH}</a> | <a href="{$LANGUAGE_PATH}?language=chinese">{$LANG.CHINESE}</a></div> <!-- Sidebar Profile links --> <div id="profile-links"> {*$user.customer->user_login_name*} <a href="login.php?method=out" title="{$LANG.SIGN_OUT}">{$LANG.SIGN_OUT}</a> </div> <ul id="main-nav"> <!-- Accordion Menu --> {$customer_menu} </ul> <!-- End #main-nav --> <div id="messages" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal" --> <h3>3 Messages</h3> <p> <strong>17th May 2009</strong> by Admin<br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <p> <strong>2nd May 2009</strong> by Jane Doe<br /> Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <p> <strong>25th April 2009</strong> by Admin<br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <form action="#" method="post"> <h4>New Message</h4> <fieldset> <textarea class="textarea" name="textfield" cols="79" rows="5"></textarea> </fieldset> <fieldset> <select name="dropdown" class="small-input"> <option value="option1">Send to...</option> <option value="option2">Everyone</option> <option value="option3">Admin</option> <option value="option4">Jane Doe</option> </select> <input class="button" type="submit" value="Send" /> </fieldset> </form> </div> <!-- End #messages --> </div></div> <!-- End #sidebar -->
zysms
trunk/zysms/customer/theme/default/include/left.tpl
Smarty
asf20
2,698
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset={$CHARSET}" /> <title>Welcome to {$LANG.WEBSITE_NAME}</title> <!-- CSS --> <!-- Reset Stylesheet --> <link rel="stylesheet" href="{$admin_css}/reset.css" type="text/css" media="screen" /> <!-- Main Stylesheet --> <link rel="stylesheet" href="{$admin_css}/style.css" type="text/css" media="screen" /> <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid --> <link rel="stylesheet" href="{$admin_css}/invalid.css" type="text/css" media="screen" /> <link rel="stylesheet" href="{$admin_css}/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" /> <!-- Javascripts --> <!-- jQuery --> <script type="text/javascript" src="{$admin_js}/jquery-1.3.2.min.js"></script> <!-- jQuery Configuration --> <script type="text/javascript" src="{$admin_js}/simpla.jquery.configuration.js"></script> <!-- Facebox jQuery Plugin --> <script type="text/javascript" src="{$admin_js}/facebox.js"></script> <!-- jQuery WYSIWYG Plugin --> <script type="text/javascript" src="{$admin_js}/jquery.wysiwyg.js"></script> <!-- jQuery Datepicker Plugin --> <script type="text/javascript" src="{$admin_js}/jquery-ui-1.8.16.custom.min.js"></script> <!--[if IE]><script type="text/javascript" src="{$admin_js}/jquery.bgiframe.js"></script><![endif]--> <!-- Internet Explorer .png-fix --> <!--[if IE 6]> <script type="text/javascript" src="{$admin_js}/DD_belatedPNG.js"></script> <script type="text/javascript"> DD_belatedPNG.fix('.png_bg, img, li'); </script> <![endif]--> <script type="text/javascript" src="{$ROOT_URL}/include/ckeditor/ckeditor.js"></script> <script type="text/javascript"> window.onload = function()    {     CKEDITOR.replace('content');    }; </script> {include file="$admin_theme/include/js.tpl"} <style> .tbs { white-space:nowrap; text-overflow:ellipsis; -o-text-overflow:ellipsis; overflow:hidden; } </style> </head> <body> <div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
zysms
trunk/zysms/customer/theme/default/include/top.tpl
Smarty
asf20
2,593
<script type="text/javascript"> {if $method=='add' || $method=='update'} $(document).ready(function () { $(".tab").click(); }); {/if} $(document).ready(function () { $("#contact_birth_date").datepicker({ dateFormat:'yy-mm-dd', }); }); function del(url){ if(!confirm("{$LANG.DELETE_THIS_RECORD}")){ return; }else{ window.location=url; } } </script>
zysms
trunk/zysms/customer/theme/default/include/js.tpl
Smarty
asf20
392
<!-- Page Head --> <h2>{$LANG.WELCOME} {$user.customer->user_login_name},所剩短信{$balance}条</h2> <p id="page-intro">{$LANG.WHAT_WOULD_YOU_LIKE_TO_DO}</p> <ul class="shortcut-buttons-set"> <li><a class="shortcut-button" href="message.php"><span> <img src="{$admin_image}/icons/pencil_48.png" alt="icon" /><br /> {$LANG.SEND_MESSAGE} </span></a></li> <li><a class="shortcut-button" href="contact.php"><span> <img src="{$admin_image}/icons/paper_content_pencil_48.png" alt="icon" /><br /> {$LANG.MY_CONTACTS} </span></a></li> <li><a class="shortcut-button" href="buy.php"><span> <img src="{$admin_image}/icons/image_add_48.png" alt="icon" /><br /> {$LANG.BUY} </span></a></li> <li><a class="shortcut-button" href="login.php?method=out"><span> <img src="{$admin_image}/icons/clock_48.png" alt="icon" /><br /> {$LANG.SIGN_OUT} </span></a></li> <!--<li><a class="shortcut-button" href="#messages" rel="modal"><span> <img src="{$admin_image}/icons/comment_48.png" alt="icon" /><br /> Open Modal </span></a></li>--> </ul><!-- End .shortcut-buttons-set --> <div class="clear"></div> <!-- End .clear -->
zysms
trunk/zysms/customer/theme/default/include/pageheader.tpl
Smarty
asf20
1,279
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <script type="text/javascript"> <!--jQuery 验证--> $(document).ready(function(){ <!--当点击submit时触发以下事件--> $("#submit").click(function(){ <!--视频标题--> if($("#video_title").val() == ''){ alert('Please fill in the name of the title.'); $("#video_title").focus(); return false; } <!--视频类别--> if($("#category").val() =='Please select'){ alert('Please select the category name.'); $("#category").focus(); return false; } <!--content--> var content=CKEDITOR.instances.content.getData() if(content == ''){ alert('Please enter the content.'); return false; } <!--视频标签--> if($("#video_tags").val()==''){ alert('Please fill out the video tag.'); $("#video_tags").focus(); return false; } <!--视频上传时间--> if($("#video_date").val()==''){ alert('Please fill out the video upload time.'); $("#video_date").focus(); return false; } <!--视频上传文件--> if($("#video_file").val()==''){ alert('Please fill out the video upload file.'); $("#video_file").focus(); return false; } <!--图片上传文件--> if($("#video_imagefile").val()==''){ alert('Please fill out the video upload image file.'); $("#video_imagefile").focus(); return false; } <!--视频备注--> if($("#video_remark").val()==''){ alert('Please fill out the video upload image file.'); $("#video_remark").focus(); return false; } }); }); </script> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.VIDEO_TITLE}</th> <th>{$LANG.VIDEO_CONTENT}</th> <th>{$LANG.VIDEO_DATE}</th> <th>{$LANG.VIDEO_REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=video loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[video]->video_id}</td> <td>{$item[video]->video_title}</td> <td>{$item[video]->video_content}</td> <td>{$item[video]->video_date}</td> <td>{$item[video]->remark}</td> <td> <!-- Icons --> <a href="javascript:del('video_manager.php?method=delete&video_id={$item[video]->video_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="video_manager.php?method=updateForward&video_id={$item[video]->video_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <!--{literal} <script type="text/javascript"> $(document).ready(function(){ $("#video_date").daterangepicker({arrows:true}); }); </script> {/literal}--> <div class="tab-content" id="tab2"> <form action="video_manager.php?method={if $method!='update'}add{else}update{/if}" name="upForm" method="post" enctype="multipart/form-data"> {if $ERROR_VIDEO_MESSAGE} <div class="notification error png_bg"> <a href="#" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$ERROR_VIDEO_MESSAGE} </div> </div> {else} <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.VIDEO_VIDEO_INFOMATION} </div> </div> {/if} <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input class="text-input medium-input" type="hidden" id="video_id" name="video_id" value="{$videoObj->video_id}"/> </p> <p> <label>{$LANG.VIDEO_TITLE}</label> <input class="text-input medium-input" type="text" id="video_title" name="video_title" value="{$videoObj->video_title}"/> </p> <p> <label>{$LANG.VIDEO_CATEGORIES}</label> <select id="category" name="category"> <option>Please select</option> {section name=category loop=$category} {if {$category[category]->category_id}=={$videoObj->category_id} } <option value="{$category[category]->category_id}" selected="selected">{$category[category]->category_name}</option> {else} <option value="{$category[category]->category_id}">{$category[category]->category_name}</option> {/if} {/section} </select> </p> <p> <label>{$LANG.VIDEO_CONTENT}</label> <textarea name="content" id="content" class="ckeditor">{$videoObj->video_content}</textarea> <!--<label>{$LANG.VIDEO_COUNT}</label>--> <input class="text-input medium-input" type="hidden" id="video_count" name="video_count" value="{$videoObj->video_count}"/> </p> <p> <label>{$LANG.VIDEO_TAGS}</label> <input class="text-input medium-input" type="text" id="video_tags" name="video_tags" value="{$videoObj->video_tags}"/> </p> <p> <label>{$LANG.VIDEO_DATE}</label> <input class="text-input medium-input" type="text" id="video_date" name="video_date" value="{$videoObj->video_date}"/> </p> <p> <label>{$LANG.UPLOAD_VIDEO}</label> <input class ="text-input medium-input" type="file" id ="video_file" name="video_file" size="48" value="{$videoObj->video_urlpath}"> </p> <p> <label>{$LANG.UPLOAD_IMAGE}</label> <input class ="text-input medium-input" type="file" id ="video_imagefile" name="video_imagefile" size="48" value="{$videoObj->video_urlpath}"> </p> <p> <label>{$LANG.REMARK}</label> <textarea id="video_remark" name="video_remark" cols="59" rows="10">{$videoObj->remark}</textarea> </p> <p> <input class="button" name="submit" type="submit" id="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/customer/theme/default/video_manager.tpl
Smarty
asf20
8,734
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1" > <!-- This is the target div. id must match the href of this div's tab --> <table width="100%" style="table-layout:fixed;"> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th width="5%">{$LANG.ID}</th> <th width="10%">{$LANG.SEND_TIME}</th> <th width="5%">发送人</th> <th width="5%">接收人</th> <th width="5%">接收号码</th> <th width="15%">发送内容</th> <th width="5%">发送状态</th> {*<th>{$LANG.FAIL_COUNT}</th>*} </tr> </thead> <tbody> {section name=history loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td width="5%">{$item[history]->sms_record_id}</td> <td width="10%">{$item[history]->sms_record_time}</td> <td width="5%">{$item[history]->user_real_name}</td> <th width="5%">{$item[history]->contact_surname}{$item[history]->contact_first_name}</th> <th width="5%">{$item[history]->sms_success_list}</th> <td width="15%" class="tbs" title="{$item[history]->sms_content}">{$item[history]->sms_content}</td> <td width="5%">{if $item[history]->sms_success_count eq "1"}发送成功{else}发送失败{/if}</td> {*<td>{$item[history]->sms_fail_count}</td>*} </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/customer/theme/default/send_history.tpl
Smarty
asf20
3,123
<?php /** * Author:Arthur * Date:2013-1-31 * File Name:test.php * Email:kingarthurx@sina.cn * toDo: 定时器 */ ignore_user_abort(true); set_time_limit(0); function test(){ echo "不要迷恋哥,哥只是个定时器!"; echo date('h:i:s') . "<br>"; } function just_do_it(){ test(); usleep(2000000); } ob_end_clean(); ob_start();//开始缓冲数据 while(1){ echo str_repeat(" ",1024);//ie有默认的1k buffer ob_flush(); flush(); just_do_it(); }
zysms
trunk/zysms/customer/test.php
PHP
asf20
484
<?php /* * Created on 2012-5-6 *====================================== *Author: Administrator *Project:zy-sms *File: template.php *Date: 2012-5-6 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; if (empty ($method)) { $method = 'select'; } if ($method === 'select') { select(); $view_file = "underline.tpl"; } function select(){ } $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/customer/template.php
PHP
asf20
533
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: credit.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/customer/credit.php
PHP
asf20
250
<?php /* * Created on 2011-10-12 *====================================== *Author: Allen *Project:health360 *File: login.php *Date: 2011-10-12 *====================================== *TODO *@param @type @var @note */ require('../include/init.php'); //是否登陆 if(isset($_SESSION['user']['customer'])){ header("location:index.php"); } $view_file="admin_login.tpl"; $method = $_GET['method']; if ($method === 'check') { checkLogin(); $lang_method = $_LANG['ADD']; $view_file = "admin_login.tpl"; } if($method === 'out') { out(); } /* * 获取管理员信息 * */ function getAdminContent(){ $login = new login(); if(isset($_POST['submit'])){ if(isset($_POST['user_login_name'])){ $login->user_login_name=$_POST['user_login_name']; } if(isset($_POST['user_login_password'])){ $login->user_login_password=$_POST['user_login_password']; } $login->group=$_POST['group']; $login->login_by_params=$_POST['login_by_params']; }else{ $login->user_id=$_GET['user_id']; $login->group=$_GET['group']; $login->login_by_params=$_GET['login_by_params']; $login->company_id=$_GET['company_id']; } return $login; } function checkLogin() { $login = getAdminContent(); $message=$login->check(); global $smarty; global $_LANG; if($message[0]=="") { echo "!!!";die(); $smarty ->assign("user",$_SESSION['user']); header("location:index.php"); } else { echo "???";die(); if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_PASSWORD_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } /*退出后台*/ function out() { unset($_SESSION['user']['customer']); header("location:login.php"); } $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/customer/login.php
PHP
asf20
2,015
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'update') { $method = 'update'; contactUpdate(); $lang_method = $_LANG['UPDATE']; $view_file = "contact_list.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "contact_list.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "contact_list.tpl"; } if ($method === 'updateForward') { $method = 'update'; selectSingleContactList(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "contact_list.tpl"; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "contact_list.tpl"; } /** * 获取表单修改信息 */ function getField() { $contact = new contact(); if (isset ($_POST['submit'])) { $contact->contact_list_id=$_POST['contact_list_id']; $contact->contact_list_name=$_POST['contact_list_name']; $contact->contact_list_count=0; $contact->agent_id=0; $contact->company_id=$_SESSION['user']['customer']->company_id; $contact->department_id=$_SESSION['user']['customer']->department_id; $contact->user_id=$_SESSION['user']['customer']->user_id; $contact->contact_id=0; $contact->contact_list_create_time=date('Y-m-d H:i:m'); $contact->contact_list_update_time=date('Y-m-d H:i:m'); $contact->contact_list_remark=$_POST['contact_list_remark']; }else{ $contact->contact_list_id=$_GET['contact_list_id']; $contact->company_id=$_SESSION['user']['customer']->company_id; $contact->department_id=$_SESSION['user']['customer']->department_id; $contact->user_id=$_SESSION['user']['customer']->user_id; } return $contact; } /** * 添加公司信息 */ function add() { $contact = getField(); $company_id=$contact->addContact(); header("location:contact_list.php"); } /* * 查询所有联系人列表*/ function select() { $contact = getField(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $total =$contact->countContactCustomer(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item=$contact->queryContact(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } /*删除一条记录*/ function delete(){ $contact = getField(); $contact->deleteContact(); header("location:contact_list.php"); } /*查询单个contact list记录*/ function selectSingleContactList(){ $contact = getField(); $contactObj=$contact->ADepartmentInquires(); global $smarty; $smarty ->assign("contactObj",$contactObj); } /* * 修改一条联系人列表记录 * */ function contactUpdate(){ $contact = getField(); $contact->updateContact(); header("location:contact_list.php"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/customer/contact_list.php
PHP
asf20
3,634
<?php /* * Created on 2011-8-28 *====================================== *Author: Allen *Project:health360 *File: index.php *Date: 2011-8-28 *====================================== */ require('../include/init.php'); $method = $_GET['method']; $login=new login(); $news=$login->checkLogined(); if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "category.tpl"; } if ($method === 'update') { $method = 'update'; update(); $lang_method = $_LANG['UPDATE']; $view_file = "category.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "category.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "category.tpl"; } if($method==='updateForward'){ $method = 'update'; selectID(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "category.tpl"; } /* * 获取表单信息 * * */ function getFormContent() { $category = new category(); if(isset($_POST['submit'])) { if (isset($_POST['category_id'])) { $category ->category_id = $_POST['category_id']; } if (isset($_POST['category_name'])) { $category->category_name = $_POST['category_name']; } if (isset($_POST['category_remark'])) { $category->category_remark = $_POST['category_remark']; } $category->category_parent_id = 0; $category->category_sort = 10; } else { $category->category_id=$_GET['category_id']; } return $category; } /** * 添加视频分类信息 */ function add() { $category = getFormContent(); $category->addCategory(); header("location:category.php"); } /* * 查询视频分类信息 * */ function select() { $category = new category(); $item = $category->queryCategory(); global $smarty; $smarty ->assign("item", $item); } /* * 根据ID查询视频分类信息 * */ function selectID() { $category = getFormContent(); $categoryObj = $category->queryCategoryID(); global $smarty; $smarty ->assign("categoryObj", $categoryObj); } /* * 删除视频分类信息 * */ function delete() { $category = getFormContent(); $category ->deleteCategory(); header("location:category.php"); } /* * 修改视频分类 * */ function update() { $category = getFormContent(); $category ->updateCategory(); header("location:category.php"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); //分页 // $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/customer/category.php
PHP
asf20
2,973
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: payment.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; if (empty ($method)) { $method = 'select'; } if ($method === 'update') { $method = 'update'; departmen_update(); $lang_method = $_LANG['UPDATE']; $view_file = "department.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "message.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "message.tpl"; } if ($method === 'updateForward') { $method = 'update'; selectSingleDpartment(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "department.tpl"; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "department.tpl"; } function select(){ } ?>
zysms
trunk/zysms/customer/payment.php
PHP
asf20
1,139
<?php /* Smarty version Smarty-3.0.8, created on 2013-01-30 16:09:57 compiled from "theme/default/" */ ?> <?php /*%%SmartyHeaderCode:13275108d555aa5409-89676265%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '657f65798d925b40f54b5d6adc4776241438965a' => array ( 0 => 'theme/default/', 1 => 1359532115, 2 => 'file', ), ), 'nocache_hash' => '13275108d555aa5409-89676265', 'function' => array ( ), 'has_nocache_code' => false, )); /*/%%SmartyHeaderCode%%*/?>
zysms
trunk/zysms/customer/templates_c/657f65798d925b40f54b5d6adc4776241438965a.file.default.php
PHP
asf20
599
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: buy.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/buy.php
PHP
asf20
247
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'update') { $method = 'update'; contactUpdate(); $lang_method = $_LANG['UPDATE']; $view_file = "contact.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "contact.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "contact.tpl"; } if ($method === 'updateForward') { $method = 'update'; selectSingleContactPerson(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "contact.tpl"; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "contact.tpl"; } /** * 获取表单修改信息 */ function getField() { $contact = new contact(); if (isset ($_POST['submit'])) { $contact->contact_list=$_POST['contact_list_id']; $contact->contact_id=$_POST['contact_id']; $contact->contact_first_name=$_POST['contact_first_name']; $contact->contact_surname=$_POST['contact_surname']; $contact-> contact_email=$_POST['contact_email']; $contact->contact_mobile=$_POST['contact_mobile']; $contact->contact_phone=0; $contact->contact_title=$_POST['contact_title']; $contact->contact_create_time=date('Y-m-d H:i:m'); $contact->contact_update_time=date('Y-m-d H:i:m'); $contact-> contact_birth_date=$_POST['contact_birth_date']; $contact-> contact_country=0; $contact-> contact_state=0; $contact-> contact_city=0; $contact->contact_address=$_POST['contact_address']; $contact-> contact_remark=$_POST['contact_remark']; $contact->company_id=0; $contact->department_id=0; $contact->user_id=0; }else{ $contact->contact_id=$_GET['contact_id']; $contact->company_id=0; $contact->department_id=0; $contact->user_id=0; } return $contact; } /** * 添加公司信息 */ function add() { $contact = getField(); $contact->addAdminContactPerson(); $number = count($_POST['contact_list_id']); for($i=0;$i<$number;$i++){ $id=$contact->contact_list[$i]; $contact->updateContactListCount($id); } header("location:contact.php"); } /*查询所有公司*/ function select() { $contact = getField(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $total =$contact->countAdminContactPerson(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item=$contact->queryAdminContactPerson(); $contact_list=$contact->selectContact(); global $smarty; $smarty->assign("item", $item); $smarty->assign("contact_list", $contact_list); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } /*删除一条记录*/ function delete(){ $contact = getField(); $contact->deleteAdminContactPerson(); header("location:contact.php"); } /*查询单个contact记录*/ function selectSingleContactPerson(){ $contact = getField(); $contactObj=$contact->ADepartmentInquireAdmin(); $contactList=explode('[]|[',$contactObj->contact_list); $contactLists=explode('|',$contactList[0]); for($i=0;$i<count($contactLists);$i++){ $contactListArr[]=substr($contactLists[$i],1,strlen($contactLists[$i])-2); } global $smarty; $smarty ->assign("contactObj",$contactObj); $smarty ->assign("contactList",$contactListArr); } /* * 修改一条联系人列表记录 * */ function contactUpdate(){ $contact = getField(); $contact->updateAdminContactPerson(); header("location:contact.php"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file));
zysms
trunk/zysms/admin/contact.php
PHP
asf20
4,323
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; $login=new login(); $news=$login->checkLogined(); if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "charge.tpl"; } function select() { $charge = new charge(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $rs =$charge->queryPage(); $totle =mysql_num_rows($rs); $GLOBALS['page']->pageft($totle,$GLOBALS['displaypg']); $item=$charge->queryCharge(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/charge_history.php
PHP
asf20
1,190
<?php /* * Created on 2011-8-28 *====================================== *Author: Allen *Project:health360 *File: index.php *Date: 2011-8-28 *====================================== */ require('../include/init.php'); if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { //history(); $lang_method = $_LANG['ADD']; $view_file = "index.tpl"; } /* * 浏览记录 * * */ function history(){ $history=new history(); $history=$history->historyAll(); global $smarty; $smarty->assign("history",$history); } $view_file = "index.tpl"; $smarty->display(admin_display($view_file));
zysms
trunk/zysms/admin/index.php
PHP
asf20
700
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: message.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/message.php
PHP
asf20
251
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; $view_file="company.tpl"; if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'update') { $method = 'update'; company_update(); $lang_method = $_LANG['UPDATE']; $view_file = "company.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "company.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "company.tpl"; } if ($method === 'updateForward') { $method = 'update'; selectID(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "company.tpl"; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "company.tpl"; } if ($method === 'setApi') { selectUserApi(); $lang_method = $_LANG['ADD']; $view_file = "userapi.tpl"; } if ($method === 'updateAPIForward') { queryUserApiById(); $lang_method = $_LANG['UPDATE']; $method = 'update'; $view_file = "userapi.tpl"; } if ($method === 'updateUserAPI') { $method = 'update'; userapi_update(); $lang_method = $_LANG['UPDATE']; $view_file = "userapi.tpl"; } if ($method === 'addUserAPI') { addUserAPI(); $lang_method = $_LANG['ADD']; $view_file = "userapi.tpl"; } if ($method === 'deleteApi') { deleteUserAPI(); $lang_method = $_LANG['ADD']; $view_file = "userapi.tpl"; } if($method === 'fill'){ addInfo(); $lang_method = $_LANG['ADD']; $view_file = "company.tpl"; } /** * 获取表单修改信息 */ function getField() { $company = new company(); if (isset ($_POST['submit'])) { if (isset ($_POST['company_id'])) { $company->company_id = $_POST['company_id']; } if (isset ($_POST['company_name'])) { $company->company_name = $_POST['company_name']; } if (isset ($_POST['company_address'])) { $company->company_address = $_POST['company_address']; } if (isset ($_POST['company_phone'])) { $company->company_phone = $_POST['company_phone']; } if (isset ($_POST['company_remark'])) { $company->company_remark = $_POST['company_remark']; } if (isset ($_POST['user_login_name'])) { $company->user_login_name = $_POST['user_login_name']; } if (isset ($_POST['user_login_password']) == isset ($_POST['user_repeat_password'])) { $company->user_login_password =$_POST['user_login_password']; } if (isset ($_POST['user_real_name'])) { $company->user_real_name =$_POST['user_real_name']; } if (isset ($_POST['user_email'])) { $company->user_email = $_POST['user_email']; } if (isset ($_POST['user_phone'])) { $company->user_phone = $_POST['user_phone']; } if (isset ($_POST['user_mobile'])) { $company->user_mobile = $_POST['user_mobile']; } if (isset ($_POST['user_remark'])) { $company->user_remark = $_POST['user_remark']; } //$company->company_id=0; $company->user_id=0; $company->department_id=0; $company->roleid="0"; $company->api_username=$_POST['api_username']; $company->api_password=md5($_POST['api_password']); $company->api_id=$_POST['api_id']; $company->api_status=$_POST['api_status']; $company->userapi_remark=$_POST['userapi_remark']; $company->companyUser_id = $_POST['user_id']; $company->userapi_id=$_POST['userapi_id']; $company->sender_name=$_POST['sender_name']; $company->sender_status=$_POST['sender_status']; $company->contact_list_create_time=date('Y-m-d'); $company->contact_list_update_time=date('Y-m-d'); $company->contact_list_count=0; $company->agent_id=0; $company->sender_motivation=$_POST['sender_motivation']; /**info属性*/ $company->balance=$_POST['bulance']; $company->type=$_POST['cc_type']; $company->number=$_POST['cc_number']; $company->name=$_POST['cc_name']; $company->expirydate=$_POST['cc_expirydate']; $company->bsbnumber=$_POST['dd_bsbnumber']; $company->accountnumber=$_POST['dd_accountnumber']; $company->accountname=$_POST['dd_accountname']; $company->defaultpay=$_POST['defaultpay']; }else{ $company->company_id=$_GET['company_id']; $company->companyUser_id = $_GET['user_id']; $company->userapi_id=$_GET['userapi_id']; } return $company; } /** * 添加公司信息 */ function add() { $company = getField(); $company_id=$company->addCompany(); $user_id=$company->addUser($company_id); $department_id=$company->addDepartmentCompanyId($company_id); $company->updateCompanyCompanyId($user_id,$company_id); $company->updateUserDepartmentId($company_id,$department_id); $company->addContactList($user_id,$company_id,$department_id);//添加未分组 /*********添加默认send id************/ $company->company_id=$company_id; $company->api_status=2; $company->sender_status=4; $company->api_type=0; $company->api_id='0'; $company->api_username='0'; $company->api_password='0'; $company->addUserAPI(); /*********添加余额************/ $company->addPaymentInfo(); header("location:company.php"); } /** * 添加 info 信息 */ function addInfo(){ $company = getField(); /*********添加余额************/ $company->updatePaymentInfo(); header("location:company.php"); } /*查询所有公司*/ function select() { $company = new company(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $total =$company->countCompany(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item=$company->queryCompany(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } ; /** * 根据公司ID查询所有Api * */ function selectUserApi(){ $company = getField(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $total =$company->countUserAPI(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item=$company->queryUserApi(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); $smarty ->assign("companyObj", $company); } /** * 添加USER API */ function addUserAPI() { $company = getField(); $company->api_type=1; $company->addUserAPI(); header("location:company.php?method=setApi&company_id=$company->company_id"); } /** * 查询一条UESR API记录 */ function queryUserApiById(){ $company = getField(); $companyObj =$company->queryUserApiById(); //当sender处于审核状态且不是系统默认时,自动将默认sender的帐号密码赋上去 if($companyObj->sender_status==4&&$companyObj->api_type!=0){ $company->company_id=$companyObj->company_id; $companyDefault=$company->queryDefaultUserApi(); $companyObj->api_username=$companyDefault->api_username; $companyObj->api_password=$companyDefault->api_password; } global $smarty; $smarty ->assign("companyObj", $companyObj); } /* * 查询一条公司记录 * * */ function selectID() { $company = getField(); $companyObj =$company->queryCompanyID(); global $smarty; $smarty ->assign("companyObj", $companyObj); } ///* // * 删除一条公司记录 // * */ //function delete(){ // $company = getField(); // $company->deleteCompany(); // header("location:company.php"); //} /* * 修改一条公司记录 * */ function company_update(){ $company = getField(); $company ->updateCompany(); header("location:company.php"); } /** * 修改一条userpai记录 * */ function userapi_update(){ $company = getField(); $company ->updateUserAPI(); header("location:company.php?method=setApi&company_id=$company->company_id"); } /** * 删除一条userpai记录 * */ function deleteUserAPI(){ $company = getField(); $company ->deleteUserAPI(); header("location:company.php?method=setApi&company_id=$company->company_id"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/company.php
PHP
asf20
8,739
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: send_history.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/send_history.php
PHP
asf20
256
<?php /* * Created on 2012-4-19 *====================================== *Author: Administrator *Project:zy-sms *File: user_class.php *Date: 2012-4-19 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/user.php
PHP
asf20
254
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require('../include/init.php'); $view_file="admin.tpl"; $method = $_GET['method']; $login=new login(); /* $news=$login->checkLogined(); if(!$news==true) { header("location:login.php"); } */ if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "admin.tpl"; } if ($method === 'update') { $method = 'update'; update(); $lang_method = $_LANG['UPDATE']; $view_file = "admin.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "admin.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "admin.tpl"; } if($method==='updateForward'){ $method = 'update'; selectID(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "admin.tpl"; } /* * 获取管理员信息 * */ function getAdminContent(){ $admin = new admin(); if(isset($_POST['submit'])){ if(isset($_POST['admin_id'])){ $admin->admin_id=$_POST['admin_id']; } if(isset($_POST['admin_login_name'])){ $admin->admin_login_name=$_POST['admin_login_name']; } if(isset($_POST['admin_login_password']) == isset($_POST['admin_repeat_password'])) { $admin->admin_login_password=$_POST['admin_login_password']; } if(isset($_POST['admin_real_name'])){ $admin->admin_real_name = $_POST['admin_real_name']; } if(isset($_POST['admin_remark'])){ $admin->admin_remark=$_POST['admin_remark']; } }else{ $admin->admin_id=$_GET['admin_id']; } return $admin; } /* * 查询用户信息 * */ function select() { $admin = new admin(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; //// $rs =$admin->queryPage(); $total =$admin->countAdmin(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item = $admin->queryAdmin(); global $smarty; $smarty ->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } /* * 根据ID查询用户信息 * */ function selectID() { $admin = getAdminContent(); $adminObj = $admin->queryAdminId(); global $smarty; $smarty ->assign("adminObj",$adminObj); } /* * * 添加用户信息 */ function add(){ $admin = getAdminContent(); $message=$admin->addAdmin(); if($message[0]=="") { header("location:admin.php"); } else { global $smarty; global $_LANG; if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } /* * 删除用户信息 * */ function delete() { $admin = getAdminContent(); $admin->deleteAdmin(); header("location:admin.php"); } /* * 修改用户类 * */ function update() { $admin = getAdminContent(); $message=$admin->updateAdmin(); if($message[0]=="") { header("location:admin.php"); } else { global $smarty; global $_LANG; if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } $smarty->assign("method",$method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/admin.php
PHP
asf20
4,048
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.CONTACT_FIRST_NAME}</th> {*<th>{$LANG.COMPANY_NAME}</th>*} <th>{$LANG.CONTACT_SURNAME}</th> <th>{$LANG.CONTACT_TITLE}</th> <th>{$LANG.CONTACT_MOBILE}</th> <th>{$LANG.CONTACT_UPDATE_TIME}</th> {*<th>{$LANG.CONTACT_COUNTRY}</th>*} <th>{$LANG.CONTACT_REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=contact loop=$item} <tr> {*<td><input type="checkbox" /></td>c*} <td>{$item[contact]->contact_id}</td> <td>{$item[contact]->contact_first_name}</td> {*<td>{$item[contact]->company_name}</td>*} <td>{$item[contact]->contact_surname}</td> <td>{$item[contact]->contact_title}</td> <td>{$item[contact]->contact_mobile}</td> <td>{$item[contact]->contact_update_time}</td> {*<td>{$item[contact]->contact_country}</td>*} <td>{$item[contact]->contact_remark}</td> <td> <!-- Icons --> <a href="javascript:del('contact.php?method=delete&contact_id={$item[contact]->contact_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="contact.php?method=updateForward&contact_id={$item[contact]->contact_id}" title="{$LANG.UPDATE}"> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="contact.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <fieldset><!--class="text-input medium-input datepicker"--> <input type="hidden" name="contact_id" value="{$contactObj->contact_id}"> {*<p> <label>{$LANG.CONTACT_NAME}</label> <select class="text-input small-input" name="contact_list_id" id="contact_list_id"> {section name=contact loop=$contact_list} {$selected=""} {if $contact_list[contact]->contact_id == $contactObj->contact_id} {$selected="selected=\"selected\""} {/if} <option value="{$contact_list[contact]->contact_list_id}" {$selected}>{$contact_list[contact]->contact_list_name}</option> {/section} </select> </p>*} <p> <label>{$LANG.CONTACT_NAME}</label> {section name=contact loop=$contact_list} {section name=contactlist loop=$contactList} {$checked=""} {if $contact_list[contact]->contact_list_id ==$contactList[contactlist]} {$checked="checked=\"checked\""} {break} {/if} {/section} {$contact_list[contact]->contact_list_name}<input type="checkbox" {$checked} name="contact_list_id[]" id="contact_list_id" value="{$contact_list[contact]->contact_list_id}"/>&nbsp; {/section} </p> <p> <label>{$LANG.CONTACT_FIRST_NAME}</label> <input class="text-input small-input"type="text" name="contact_first_name" id="contact_first_name" value="{$contactObj->contact_first_name}"/> </p> <p> <label>{$LANG.CONTACT_SURNAME}</label> <input class="text-input small-input"type="text" name="contact_surname" id="contact_list_name" value="{$contactObj->contact_surname}"/> </p> {*<p> <label>{$LANG.CONTACT_TITLE}</label> <input class="text-input small-input"type="text" name="contact_title" id="contact_title" value="{$contactObj->contact_title}"/> <select name="contact_title" id="contact_title" class="text-input small-input" > {if $contactObj->contact_title == 'Mr.'} <option value="Mr." selected="seklected">Mr.</option> {else} <option value="Mr.">Mr.</option> {/if} {if $contactObj->contact_title == 'Miss.'} <option value="Miss." selected="seklected">Miss.</option> {else} <option value="Miss.">Miss.</option> {/if} {if $contactObj->contact_title == 'Mrs.'} <option value="Mrs." selected="seklected">Mrs.</option> {else} <option value="Mrs.">Mrs.</option> {/if} </select> </p>*} <p> <label>{$LANG.CONTACT_EMAIL}</label> <input class="text-input small-input"type="text" name="contact_email" id="contact_email" value="{$contactObj->contact_email}"/> </p> <p> <label>{$LANG.CONTACT_MOBILE}</label> <input class="text-input small-input"type="text" name="contact_mobile" id="contact_mobile" value="{$contactObj->contact_mobile}"/> </p> {* <p> <label>{$LANG.CONTACT_PHONE}</label> <input class="text-input small-input"type="hidden" name="contact_phone" id="contact_phone" value="0"/> </p> <p> <label>{$LANG.CONTACT_COUNTRY}</label> <input class="text-input small-input"type="hidden" name="contact_country" id="contact_country" value="0"/> </p> <p> <label>{$LANG.CONTACT_STATE}</label> <input class="text-input small-input"type="hidden" name="contact_state" id="contact_state" value="{$contactObj->contact_state}"/> </p> <p> <label>{$LANG.CONTACT_CITY}</label> <input class="text-input small-input"type="hidden" name="contact_city" id="contact_city" value="{$contactObj->contact_city}"/> </p> *} <p> <label>{$LANG.CONTACT_BIRTH_DATE}</label> <input class="text-input small-input"type="text" name="contact_birth_date" id="contact_birth_date" value="{$contactObj->contact_birth_date}"/> </p> <p> <label>{$LANG.CONTACT_ADDRESS}</label> <input class="text-input small-input"type="text" name="contact_address" id="contact_address" value="{$contactObj->contact_address}"/> </p> {*<p> <label>{$LANG.CONTACT_CREATE_TIME}</label> {if $method=='update'} <input class="text-input small-input" type="text" readonly="true" name="contact_create_time" id="contact_create_time" value="{$contactObj->contact_create_time}"/> {else} <input class="text-input small-input"type="text" name="contact_create_time" id="contact_create_time" value="{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}"/> {/if} </p>*} <p> <label>{$LANG.CONTACT_REMARK}</label> <textarea name="contact_remark" id="contact_remark" cols="50" rows="10">{$contactObj->contact_remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/contact.tpl
Smarty
asf20
9,317
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <!-- <li><a href="#tab2" class="tab">{$lang_method}</a></li>--> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {*<th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.CATEGORY_NAME}</th> <th>{$LANG.CHARGE_PRICE}</th> <th>{$LANG.CHARGE_COUNT}</th> <th>{$LANG.CHARGE_START_DATE}</th> <th>{$LANG.CHARGE_END_DATE}</th> </tr> </thead> <tbody> {section name=charge loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[charge]->charge_id}</td> <td>{$item[charge]->category_name}</td> <td>{$item[charge]->charge_price}</td> <td>{$item[charge]->charge_count}</td> <td>{$item[charge]->charge_start_date}</td> <td>{$item[charge]->charge_end_date}</td> <!-- <td> <a href="javascript:del('category.php?method=delete&category_id={$item[category]->category_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="category.php?method=updateForward&category_id={$item[category]->category_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td>--> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="category.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.VIDEO_CATEGORY_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input class="text-input medium-input" type="hidden" id="category_id" name="category_id" value="{$categoryObj->category_id}"/><!-- Classes for input-notification: success, error, information, attention --> </p> <p> <label>{$LANG.CATEGORY_NAME}</label> <input class="text-input medium-input" type="text" id="category_name" name="category_name" value="{$categoryObj->category_name}"/><!-- Classes for input-notification: success, error, information, attention --> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="category_remark" cols="59" rows="10">{$categoryObj->remark}</textarea> </p> <p> <input class="button" name="submit" type="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/charge.tpl
Smarty
asf20
4,908
$(document).ready(function(){ //Sidebar Accordion Menu: $("#main-nav li ul").hide(); // Hide all sub menus $("#main-nav li a.current").parent().find("ul").slideToggle("slow"); // Slide down the current menu item's sub menu $("#main-nav li a.nav-top-item").click( // When a top menu item is clicked... function () { $(this).parent().siblings().find("ul").slideUp("normal"); // Slide up all sub menus except the one clicked $(this).next().slideToggle("normal"); // Slide down the clicked sub menu return false; } ); $("#main-nav li a.no-submenu").click( // When a menu item with no sub menu is clicked... function () { window.location.href=(this.href); // Just open the link instead of a sub menu return false; } ); // Sidebar Accordion Menu Hover Effect: $("#main-nav li .nav-top-item").hover( function () { $(this).stop().animate({ paddingRight: "25px" }, 200); }, function () { $(this).stop().animate({ paddingRight: "15px" }); } ); //Minimize Content Box $(".content-box-header h3").css({ "cursor":"s-resize" }); // Give the h3 in Content Box Header a different cursor $(".closed-box .content-box-content").hide(); // Hide the content of the header if it has the class "closed" $(".closed-box .content-box-tabs").hide(); // Hide the tabs in the header if it has the class "closed" $(".content-box-header h3").click( // When the h3 is clicked... function () { $(this).parent().next().toggle(); // Toggle the Content Box $(this).parent().parent().toggleClass("closed-box"); // Toggle the class "closed-box" on the content box $(this).parent().find(".content-box-tabs").toggle(); // Toggle the tabs } ); // Content box tabs: $('.content-box .content-box-content div.tab-content').hide(); // Hide the content divs $('ul.content-box-tabs li a.default-tab').addClass('current'); // Add the class "current" to the default tab $('.content-box-content div.default-tab').show(); // Show the div with class "default-tab" $('.content-box ul.content-box-tabs li a').click( // When a tab is clicked... function() { $(this).parent().siblings().find("a").removeClass('current'); // Remove "current" class from all tabs $(this).addClass('current'); // Add class "current" to clicked tab var currentTab = $(this).attr('href'); // Set variable "currentTab" to the value of href of clicked tab $(currentTab).siblings().hide(); // Hide all content divs $(currentTab).show(); // Show the content div with the id equal to the id of clicked tab return false; } ); //Close button: $(".close").click( function () { $(this).parent().fadeTo(400, 0, function () { // Links with the class "close" will close parent $(this).slideUp(400); }); return false; } ); // Alternating table rows: $('tbody tr:even').addClass("alt-row"); // Add class "alt-row" to even table rows // Check all checkboxes when the one in a table head is checked: $('.check-all').click( function(){ $(this).parent().parent().parent().parent().find("input[type='checkbox']").attr('checked', $(this).is(':checked')); } ); // Initialise Facebox Modal window: $('a[rel*=modal]').facebox(); // Applies modal window to any link with attribute rel="modal" // Initialise jQuery WYSIWYG: $(".wysiwyg").wysiwyg(); // Applies WYSIWYG editor to any textarea with the class "wysiwyg" });
zysms
trunk/zysms/admin/theme/default/js/simpla.jquery.configuration.js
JavaScript
asf20
3,599
/** * WYSIWYG - jQuery plugin 0.5 * * Copyright (c) 2008-2009 Juan M Martinez * http://plugins.jquery.com/project/jWYSIWYG * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * $Id: $ */ (function( $ ) { $.fn.document = function() { var element = this[0]; if ( element.nodeName.toLowerCase() == 'iframe' ) return element.contentWindow.document; /* return ( $.browser.msie ) ? document.frames[element.id].document : element.contentWindow.document // contentDocument; */ else return $(this); }; $.fn.documentSelection = function() { var element = this[0]; if ( element.contentWindow.document.selection ) return element.contentWindow.document.selection.createRange().text; else return element.contentWindow.getSelection().toString(); }; $.fn.wysiwyg = function( options ) { if ( arguments.length > 0 && arguments[0].constructor == String ) { var action = arguments[0].toString(); var params = []; for ( var i = 1; i < arguments.length; i++ ) params[i - 1] = arguments[i]; if ( action in Wysiwyg ) { return this.each(function() { $.data(this, 'wysiwyg') .designMode(); Wysiwyg[action].apply(this, params); }); } else return this; } var controls = {}; /** * If the user set custom controls, we catch it, and merge with the * defaults controls later. */ if ( options && options.controls ) { var controls = options.controls; delete options.controls; } var options = $.extend({ html : '<'+'?xml version="1.0" encoding="UTF-8"?'+'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">STYLE_SHEET</head><body style="font-family: Arial, Helvetica, sans-serif !important; font-size: 13px; height: 100%; line-height: 1.5em !important;">INITIAL_CONTENT</body></html>', css : {}, debug : false, autoSave : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11 rmUnwantedBr : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15 brIE : true, controls : {}, messages : {} }, options); options.messages = $.extend(true, options.messages, Wysiwyg.MSGS_EN); options.controls = $.extend(true, options.controls, Wysiwyg.TOOLBAR); for ( var control in controls ) { if ( control in options.controls ) $.extend(options.controls[control], controls[control]); else options.controls[control] = controls[control]; } // not break the chain return this.each(function() { Wysiwyg(this, options); }); }; function Wysiwyg( element, options ) { return this instanceof Wysiwyg ? this.init(element, options) : new Wysiwyg(element, options); } $.extend(Wysiwyg, { insertImage : function( szURL, attributes ) { var self = $.data(this, 'wysiwyg'); if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 ) { if ( attributes ) { self.editorDoc.execCommand('insertImage', false, '#jwysiwyg#'); var img = self.getElementByAttributeValue('img', 'src', '#jwysiwyg#'); if ( img ) { img.src = szURL; for ( var attribute in attributes ) { img.setAttribute(attribute, attributes[attribute]); } } } else { self.editorDoc.execCommand('insertImage', false, szURL); } } }, createLink : function( szURL ) { var self = $.data(this, 'wysiwyg'); if ( self.constructor == Wysiwyg && szURL && szURL.length > 0 ) { var selection = $(self.editor).documentSelection(); if ( selection.length > 0 ) { self.editorDoc.execCommand('unlink', false, []); self.editorDoc.execCommand('createLink', false, szURL); } else if ( self.options.messages.nonSelection ) alert(self.options.messages.nonSelection); } }, setContent : function( newContent ) { var self = $.data(this, 'wysiwyg'); self.setContent( newContent ); self.saveContent(); }, clear : function() { var self = $.data(this, 'wysiwyg'); self.setContent(''); self.saveContent(); }, MSGS_EN : { nonSelection : 'select the text you wish to link' }, TOOLBAR : { bold : { visible : true, tags : ['b', 'strong'], css : { fontWeight : 'bold' } }, italic : { visible : true, tags : ['i', 'em'], css : { fontStyle : 'italic' } }, strikeThrough : { visible : false, tags : ['s', 'strike'], css : { textDecoration : 'line-through' } }, underline : { visible : false, tags : ['u'], css : { textDecoration : 'underline' } }, separator00 : { visible : false, separator : true }, justifyLeft : { visible : false, css : { textAlign : 'left' } }, justifyCenter : { visible : false, tags : ['center'], css : { textAlign : 'center' } }, justifyRight : { visible : false, css : { textAlign : 'right' } }, justifyFull : { visible : false, css : { textAlign : 'justify' } }, separator01 : { visible : false, separator : true }, indent : { visible : false }, outdent : { visible : false }, separator02 : { visible : false, separator : true }, subscript : { visible : false, tags : ['sub'] }, superscript : { visible : false, tags : ['sup'] }, separator03 : { visible : false, separator : true }, undo : { visible : false }, redo : { visible : false }, separator04 : { visible : false, separator : true }, insertOrderedList : { visible : false, tags : ['ol'] }, insertUnorderedList : { visible : false, tags : ['ul'] }, insertHorizontalRule : { visible : false, tags : ['hr'] }, separator05 : { separator : true }, createLink : { visible : true, exec : function() { var selection = $(this.editor).documentSelection(); if ( selection.length > 0 ) { if ( $.browser.msie ) this.editorDoc.execCommand('createLink', true, null); else { var szURL = prompt('URL', 'http://'); if ( szURL && szURL.length > 0 ) { this.editorDoc.execCommand('unlink', false, []); this.editorDoc.execCommand('createLink', false, szURL); } } } else if ( this.options.messages.nonSelection ) alert(this.options.messages.nonSelection); }, tags : ['a'] }, insertImage : { visible : true, exec : function() { if ( $.browser.msie ) this.editorDoc.execCommand('insertImage', true, null); else { var szURL = prompt('URL', 'http://'); if ( szURL && szURL.length > 0 ) this.editorDoc.execCommand('insertImage', false, szURL); } }, tags : ['img'] }, separator06 : { separator : true }, h1mozilla : { visible : true && $.browser.mozilla, className : 'h1', command : 'heading', arguments : ['h1'], tags : ['h1'] }, h2mozilla : { visible : true && $.browser.mozilla, className : 'h2', command : 'heading', arguments : ['h2'], tags : ['h2'] }, h3mozilla : { visible : true && $.browser.mozilla, className : 'h3', command : 'heading', arguments : ['h3'], tags : ['h3'] }, h1 : { visible : true && !( $.browser.mozilla ), className : 'h1', command : 'formatBlock', arguments : ['Heading 1'], tags : ['h1'] }, h2 : { visible : true && !( $.browser.mozilla ), className : 'h2', command : 'formatBlock', arguments : ['Heading 2'], tags : ['h2'] }, h3 : { visible : true && !( $.browser.mozilla ), className : 'h3', command : 'formatBlock', arguments : ['Heading 3'], tags : ['h3'] }, separator07 : { visible : false, separator : true }, cut : { visible : false }, copy : { visible : false }, paste : { visible : false }, separator08 : { separator : true && !( $.browser.msie ) }, increaseFontSize : { visible : true && !( $.browser.msie ), tags : ['big'] }, decreaseFontSize : { visible : true && !( $.browser.msie ), tags : ['small'] }, separator09 : { separator : true }, html : { visible : false, exec : function() { if ( this.viewHTML ) { this.setContent( $(this.original).val() ); $(this.original).hide(); } else { this.saveContent(); $(this.original).show(); } this.viewHTML = !( this.viewHTML ); } }, removeFormat : { visible : true, exec : function() { this.editorDoc.execCommand('removeFormat', false, []); this.editorDoc.execCommand('unlink', false, []); } } } }); $.extend(Wysiwyg.prototype, { original : null, options : {}, element : null, editor : null, init : function( element, options ) { var self = this; this.editor = element; this.options = options || {}; $.data(element, 'wysiwyg', this); var newX = element.width || element.clientWidth; var newY = element.height || element.clientHeight; if ( element.nodeName.toLowerCase() == 'textarea' ) { this.original = element; if ( newX == 0 && element.cols ) newX = ( element.cols * 8 ) + 21; if ( newY == 0 && element.rows ) newY = ( element.rows * 16 ) + 16; var editor = this.editor = $('<iframe></iframe>').css({ minHeight : ( newY - 6 ).toString() + 'px', width : ( newX - 8 ).toString() + 'px' }).attr('id', $(element).attr('id') + 'IFrame'); if ( $.browser.msie ) { this.editor .css('height', ( newY ).toString() + 'px'); /** var editor = $('<span></span>').css({ width : ( newX - 6 ).toString() + 'px', height : ( newY - 8 ).toString() + 'px' }).attr('id', $(element).attr('id') + 'IFrame'); editor.outerHTML = this.editor.outerHTML; */ } } var panel = this.panel = $('<ul></ul>').addClass('panel'); this.appendControls(); this.element = $('<div></div>').css({ width : ( newX > 0 ) ? ( newX ).toString() + 'px' : '100%' }).addClass('wysiwyg') .append(panel) .append( $('<div><!-- --></div>').css({ clear : 'both' }) ) .append(editor); $(element) // .css('display', 'none') .hide() .before(this.element); this.viewHTML = false; this.initialHeight = newY - 8; /** * @link http://code.google.com/p/jwysiwyg/issues/detail?id=52 */ this.initialContent = $(element).val(); this.initFrame(); if ( this.initialContent.length == 0 ) this.setContent(''); if ( this.options.autoSave ) $('form').submit(function() { self.saveContent(); }); $('form').bind('reset', function() { self.setContent( self.initialContent ); self.saveContent(); }); }, initFrame : function() { var self = this; var style = ''; /** * @link http://code.google.com/p/jwysiwyg/issues/detail?id=14 */ if ( this.options.css && this.options.css.constructor == String ) style = '<link rel="stylesheet" type="text/css" media="screen" href="' + this.options.css + '" />'; this.editorDoc = $(this.editor).document(); this.editorDoc_designMode = false; try { this.editorDoc.designMode = 'on'; this.editorDoc_designMode = true; } catch ( e ) { // Will fail on Gecko if the editor is placed in an hidden container element // The design mode will be set ones the editor is focused $(this.editorDoc).focus(function() { self.designMode(); }); } this.editorDoc.open(); this.editorDoc.write( this.options.html .replace(/INITIAL_CONTENT/, this.initialContent) .replace(/STYLE_SHEET/, style) ); this.editorDoc.close(); this.editorDoc.contentEditable = 'true'; if ( $.browser.msie ) { /** * Remove the horrible border it has on IE. */ setTimeout(function() { $(self.editorDoc.body).css('border', 'none'); }, 0); } $(this.editorDoc).click(function( event ) { self.checkTargets( event.target ? event.target : event.srcElement); }); /** * @link http://code.google.com/p/jwysiwyg/issues/detail?id=20 */ $(this.original).focus(function() { $(self.editorDoc.body).focus(); }); if ( this.options.autoSave ) { /** * @link http://code.google.com/p/jwysiwyg/issues/detail?id=11 */ $(this.editorDoc).keydown(function() { self.saveContent(); }) .keyup(function() { self.saveContent(); }) .mousedown(function() { self.saveContent(); }); } if ( this.options.css ) { setTimeout(function() { if ( self.options.css.constructor == String ) { /** * $(self.editorDoc) * .find('head') * .append( * $('<link rel="stylesheet" type="text/css" media="screen" />') * .attr('href', self.options.css) * ); */ } else $(self.editorDoc).find('body').css(self.options.css); }, 0); } $(this.editorDoc).keydown(function( event ) { if ( $.browser.msie && self.options.brIE && event.keyCode == 13 ) { var rng = self.getRange(); rng.pasteHTML('<br />'); rng.collapse(false); rng.select(); return false; } }); }, designMode : function() { if ( !( this.editorDoc_designMode ) ) { try { this.editorDoc.designMode = 'on'; this.editorDoc_designMode = true; } catch ( e ) {} } }, getSelection : function() { return ( window.getSelection ) ? window.getSelection() : document.selection; }, getRange : function() { var selection = this.getSelection(); if ( !( selection ) ) return null; return ( selection.rangeCount > 0 ) ? selection.getRangeAt(0) : selection.createRange(); }, getContent : function() { return $( $(this.editor).document() ).find('body').html(); }, setContent : function( newContent ) { $( $(this.editor).document() ).find('body').html(newContent); }, saveContent : function() { if ( this.original ) { var content = this.getContent(); if ( this.options.rmUnwantedBr ) content = ( content.substr(-4) == '<br>' ) ? content.substr(0, content.length - 4) : content; $(this.original).val(content); } }, appendMenu : function( cmd, args, className, fn ) { var self = this; var args = args || []; $('<li></li>').append( $('<a><!-- --></a>').addClass(className || cmd) ).mousedown(function() { if ( fn ) fn.apply(self); else self.editorDoc.execCommand(cmd, false, args); if ( self.options.autoSave ) self.saveContent(); }).appendTo( this.panel ); }, appendMenuSeparator : function() { $('<li class="separator"></li>').appendTo( this.panel ); }, appendControls : function() { for ( var name in this.options.controls ) { var control = this.options.controls[name]; if ( control.separator ) { if ( control.visible !== false ) this.appendMenuSeparator(); } else if ( control.visible ) { this.appendMenu( control.command || name, control.arguments || [], control.className || control.command || name || 'empty', control.exec ); } } }, checkTargets : function( element ) { for ( var name in this.options.controls ) { var control = this.options.controls[name]; var className = control.className || control.command || name || 'empty'; $('.' + className, this.panel).removeClass('active'); if ( control.tags ) { var elm = element; do { if ( elm.nodeType != 1 ) break; if ( $.inArray(elm.tagName.toLowerCase(), control.tags) != -1 ) $('.' + className, this.panel).addClass('active'); } while ( elm = elm.parentNode ); } if ( control.css ) { var elm = $(element); do { if ( elm[0].nodeType != 1 ) break; for ( var cssProperty in control.css ) if ( elm.css(cssProperty).toString().toLowerCase() == control.css[cssProperty] ) $('.' + className, this.panel).addClass('active'); } while ( elm = elm.parent() ); } } }, getElementByAttributeValue : function( tagName, attributeName, attributeValue ) { var elements = this.editorDoc.getElementsByTagName(tagName); for ( var i = 0; i < elements.length; i++ ) { var value = elements[i].getAttribute(attributeName); if ( $.browser.msie ) { /** IE add full path, so I check by the last chars. */ value = value.substr(value.length - attributeValue.length); } if ( value == attributeValue ) return elements[i]; } return false; } }); })(jQuery);
zysms
trunk/zysms/admin/theme/default/js/jquery.wysiwyg.js
JavaScript
asf20
22,193
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $ * $Rev: 2446 $ * * Version 2.1.1 */ (function($){ /** * The bgiframe is chainable and applies the iframe hack to get * around zIndex issues in IE6. It will only apply itself in IE6 * and adds a class to the iframe called 'bgiframe'. The iframe * is appeneded as the first child of the matched element(s) * with a tabIndex and zIndex of -1. * * By default the plugin will take borders, sized with pixel units, * into account. If a different unit is used for the border's width, * then you will need to use the top and left settings as explained below. * * NOTICE: This plugin has been reported to cause perfromance problems * when used on elements that change properties (like width, height and * opacity) a lot in IE6. Most of these problems have been caused by * the expressions used to calculate the elements width, height and * borders. Some have reported it is due to the opacity filter. All * these settings can be changed if needed as explained below. * * @example $('div').bgiframe(); * @before <div><p>Paragraph</p></div> * @result <div><iframe class="bgiframe".../><p>Paragraph</p></div> * * @param Map settings Optional settings to configure the iframe. * @option String|Number top The iframe must be offset to the top * by the width of the top border. This should be a negative * number representing the border-top-width. If a number is * is used here, pixels will be assumed. Otherwise, be sure * to specify a unit. An expression could also be used. * By default the value is "auto" which will use an expression * to get the border-top-width if it is in pixels. * @option String|Number left The iframe must be offset to the left * by the width of the left border. This should be a negative * number representing the border-left-width. If a number is * is used here, pixels will be assumed. Otherwise, be sure * to specify a unit. An expression could also be used. * By default the value is "auto" which will use an expression * to get the border-left-width if it is in pixels. * @option String|Number width This is the width of the iframe. If * a number is used here, pixels will be assume. Otherwise, be sure * to specify a unit. An experssion could also be used. * By default the value is "auto" which will use an experssion * to get the offsetWidth. * @option String|Number height This is the height of the iframe. If * a number is used here, pixels will be assume. Otherwise, be sure * to specify a unit. An experssion could also be used. * By default the value is "auto" which will use an experssion * to get the offsetHeight. * @option Boolean opacity This is a boolean representing whether or not * to use opacity. If set to true, the opacity of 0 is applied. If * set to false, the opacity filter is not applied. Default: true. * @option String src This setting is provided so that one could change * the src of the iframe to whatever they need. * Default: "javascript:false;" * * @name bgiframe * @type jQuery * @cat Plugins/bgiframe * @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) */ $.fn.bgIframe = $.fn.bgiframe = function(s) { // This is only for IE6 if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) { s = $.extend({ top : 'auto', // auto == .currentStyle.borderTopWidth left : 'auto', // auto == .currentStyle.borderLeftWidth width : 'auto', // auto == offsetWidth height : 'auto', // auto == offsetHeight opacity : true, src : 'javascript:false;' }, s || {}); var prop = function(n){return n&&n.constructor==Number?n+'px':n;}, html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+ 'style="display:block;position:absolute;z-index:-1;'+ (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+ 'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+ 'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+ 'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+ 'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+ '"/>'; return this.each(function() { if ( $('> iframe.bgiframe', this).length == 0 ) this.insertBefore( document.createElement(html), this.firstChild ); }); } return this; }; })(jQuery);
zysms
trunk/zysms/admin/theme/default/js/jquery.bgiframe.js
JavaScript
asf20
4,879
(function(D) { D.fn .extend( { renderCalendar : function(P) { var X = function(Y) { return document.createElement(Y) }; P = D.extend( {}, D.fn.datePicker.defaults, P); if (P.showHeader != D.dpConst.SHOW_HEADER_NONE) { var M = D(X("tr")); for ( var S = Date.firstDayOfWeek; S < Date.firstDayOfWeek + 7; S++) { var H = S % 7; var R = Date.dayNames[H]; M .append(jQuery(X("th")) .attr( { scope : "col", abbr : R, title : R, "class" : (H == 0 || H == 6 ? "weekend" : "weekday") }) .html( P.showHeader == D.dpConst.SHOW_HEADER_SHORT ? R .substr(0, 1) : R)) } } var E = D(X("table")).attr( { cellspacing : 2, className : "jCalendar" }).append( (P.showHeader != D.dpConst.SHOW_HEADER_NONE ? D( X("thead")).append(M) : X("thead"))); var F = D(X("tbody")); var U = (new Date()).zeroTime(); var W = P.month == undefined ? U.getMonth() : P.month; var N = P.year || U.getFullYear(); var K = new Date(N, W, 1); var J = Date.firstDayOfWeek - K.getDay() + 1; if (J > 1) { J -= 7 } var O = Math.ceil(((-1 * J + 1) + K.getDaysInMonth()) / 7); K.addDays(J - 1); var V = function() { if (P.hoverClass) { D(this).addClass(P.hoverClass) } }; var G = function() { if (P.hoverClass) { D(this).removeClass(P.hoverClass) } }; var L = 0; while (L++ < O) { var Q = jQuery(X("tr")); for ( var S = 0; S < 7; S++) { var I = K.getMonth() == W; var T = D(X("td")) .text(K.getDate() + "") .attr( "className", (I ? "current-month " : "other-month ") + (K.isWeekend() ? "weekend " : "weekday ") + (I && K.getTime() == U .getTime() ? "today " : "")).hover(V, G); if (P.renderCallback) { P.renderCallback(T, K, W, N) } Q.append(T); K.addDays(1) } F.append(Q) } E.append(F); return this.each(function() { D(this).empty().append(E) }) }, datePicker : function(E) { if (!D.event._dpCache) { D.event._dpCache = [] } E = D.extend( {}, D.fn.datePicker.defaults, E); return this.each(function() { var G = D(this); var I = true; if (!this._dpId) { this._dpId = D.event.guid++; D.event._dpCache[this._dpId] = new A(this); I = false } if (E.inline) { E.createButton = false; E.displayClose = false; E.closeOnSelect = false; G.empty() } var F = D.event._dpCache[this._dpId]; F.init(E); if (!I && E.createButton) { F.button = D( '<a href="#" class="dp-choose-date" title="' + D.dpText.TEXT_CHOOSE_DATE + '">' + D.dpText.TEXT_CHOOSE_DATE + "</a>").bind("click", function() { G.dpDisplay(this); this.blur(); return false }); G.after(F.button) } if (!I && G.is(":text")) { G.bind("dateSelected", function(K, J, L) { this.value = J.asString() }).bind("change", function() { if (this.value != "") { var J = Date.fromString(this.value); if (J) { F.setSelected(J, true, true) } } }); if (E.clickInput) { G.bind("click", function() { G.dpDisplay() }) } var H = Date.fromString(this.value); if (this.value != "" && H) { F.setSelected(H, true, true) } } G.addClass("dp-applied") }) }, dpSetDisabled : function(E) { return B.call(this, "setDisabled", E) }, dpSetStartDate : function(E) { return B.call(this, "setStartDate", E) }, dpSetEndDate : function(E) { return B.call(this, "setEndDate", E) }, dpGetSelected : function() { var E = C(this[0]); if (E) { return E.getSelected() } return null }, dpSetSelected : function(G, F, E) { if (F == undefined) { F = true } if (E == undefined) { E = true } return B.call(this, "setSelected", Date.fromString(G), F, E, true) }, dpSetDisplayedMonth : function(E, F) { return B.call(this, "setDisplayedMonth", Number(E), Number(F), true) }, dpDisplay : function(E) { return B.call(this, "display", E) }, dpSetRenderCallback : function(E) { return B.call(this, "setRenderCallback", E) }, dpSetPosition : function(E, F) { return B.call(this, "setPosition", E, F) }, dpSetOffset : function(E, F) { return B.call(this, "setOffset", E, F) }, dpClose : function() { return B.call(this, "_closeCalendar", false, this[0]) }, _dpDestroy : function() { } }); var B = function(G, F, E, I, H) { return this.each(function() { var J = C(this); if (J) { J[G](F, E, I, H) } }) }; function A(E) { this.ele = E; this.displayedMonth = null; this.displayedYear = null; this.startDate = null; this.endDate = null; this.showYearNavigation = null; this.closeOnSelect = null; this.displayClose = null; this.selectMultiple = null; this.verticalPosition = null; this.horizontalPosition = null; this.verticalOffset = null; this.horizontalOffset = null; this.button = null; this.renderCallback = []; this.selectedDates = {}; this.inline = null; this.context = "#dp-popup" } D .extend( A.prototype, { init : function(E) { this.setStartDate(E.startDate); this.setEndDate(E.endDate); this.setDisplayedMonth(Number(E.month), Number(E.year)); this.setRenderCallback(E.renderCallback); this.showYearNavigation = E.showYearNavigation; this.closeOnSelect = E.closeOnSelect; this.displayClose = E.displayClose; this.selectMultiple = E.selectMultiple; this.verticalPosition = E.verticalPosition; this.horizontalPosition = E.horizontalPosition; this.hoverClass = E.hoverClass; this .setOffset(E.verticalOffset, E.horizontalOffset); this.inline = E.inline; if (this.inline) { this.context = this.ele; this.display() } }, setStartDate : function(E) { if (E) { this.startDate = Date.fromString(E) } if (!this.startDate) { this.startDate = (new Date()).zeroTime() } this.setDisplayedMonth(this.displayedMonth, this.displayedYear) }, setEndDate : function(E) { if (E) { this.endDate = Date.fromString(E) } if (!this.endDate) { this.endDate = (new Date("12/31/2999")) } if (this.endDate.getTime() < this.startDate .getTime()) { this.endDate = this.startDate } this.setDisplayedMonth(this.displayedMonth, this.displayedYear) }, setPosition : function(E, F) { this.verticalPosition = E; this.horizontalPosition = F }, setOffset : function(E, F) { this.verticalOffset = parseInt(E) || 0; this.horizontalOffset = parseInt(F) || 0 }, setDisabled : function(E) { $e = D(this.ele); $e[E ? "addClass" : "removeClass"]("dp-disabled"); if (this.button) { $but = D(this.button); $but[E ? "addClass" : "removeClass"] ("dp-disabled"); $but.attr("title", E ? "" : D.dpText.TEXT_CHOOSE_DATE) } if ($e.is(":text")) { $e.attr("disabled", E ? "disabled" : "") } }, setDisplayedMonth : function(E, L, I) { if (this.startDate == undefined || this.endDate == undefined) { return } var H = new Date(this.startDate.getTime()); H.setDate(1); var K = new Date(this.endDate.getTime()); K.setDate(1); var G; if ((!E && !L) || (isNaN(E) && isNaN(L))) { G = new Date().zeroTime(); G.setDate(1) } else { if (isNaN(E)) { G = new Date(L, this.displayedMonth, 1) } else { if (isNaN(L)) { G = new Date(this.displayedYear, E, 1) } else { G = new Date(L, E, 1) } } } if (G.getTime() < H.getTime()) { G = H } else { if (G.getTime() > K.getTime()) { G = K } } var F = this.displayedMonth; var J = this.displayedYear; this.displayedMonth = G.getMonth(); this.displayedYear = G.getFullYear(); if (I && (this.displayedMonth != F || this.displayedYear != J)) { this._rerenderCalendar(); D(this.ele).trigger( "dpMonthChanged", [ this.displayedMonth, this.displayedYear ]) } }, setSelected : function(K, E, F, H) { if (E == this.isSelected(K)) { return } if (this.selectMultiple == false) { this.selectedDates = {}; D("td.selected", this.context).removeClass( "selected") } if (F && this.displayedMonth != K.getMonth()) { this.setDisplayedMonth(K.getMonth(), K .getFullYear(), true) } this.selectedDates[K.toString()] = E; var I = "td."; I += K.getMonth() == this.displayedMonth ? "current-month" : "other-month"; I += ':contains("' + K.getDate() + '")'; var J; D(I, this.ele).each( function() { if (D(this).text() == K.getDate()) { J = D(this); J[E ? "addClass" : "removeClass"] ("selected") } }); if (H) { var G = this.isSelected(K); $e = D(this.ele); $e.trigger("dateSelected", [ K, J, G ]); $e.trigger("change") } }, isSelected : function(E) { return this.selectedDates[E.toString()] }, getSelected : function() { var E = []; for (s in this.selectedDates) { if (this.selectedDates[s] == true) { E.push(Date.parse(s)) } } return E }, display : function(E) { if (D(this.ele).is(".dp-disabled")) { return } E = E || this.ele; var L = this; var H = D(E); var K = H.offset(); var M; var N; var G; var I; if (L.inline) { M = D(this.ele); N = { id : "calendar-" + this.ele._dpId, className : "dp-popup dp-popup-inline" }; I = {} } else { M = D("body"); N = { id : "dp-popup", className : "dp-popup" }; I = { top : K.top + L.verticalOffset, left : K.left + L.horizontalOffset }; var J = function(Q) { var O = Q.target; var P = D("#dp-popup")[0]; while (true) { if (O == P) { return true } else { if (O == document) { L._closeCalendar(); return false } else { O = D(O).parent()[0] } } } }; this._checkMouse = J; this._closeCalendar(true) } M .append(D("<div></div>") .attr(N) .css(I) .append( D("<h2></h2>"), D( '<div class="dp-nav-prev"></div>') .append( D( '<a class="dp-nav-prev-year" href="#" title="' + D.dpText.TEXT_PREV_YEAR + '">&lt;&lt;</a>') .bind( "click", function() { return L._displayNewMonth .call( L, this, 0, -1) }), D( '<a class="dp-nav-prev-month" href="#" title="' + D.dpText.TEXT_PREV_MONTH + '">&lt;</a>') .bind( "click", function() { return L._displayNewMonth .call( L, this, -1, 0) })), D( '<div class="dp-nav-next"></div>') .append( D( '<a class="dp-nav-next-year" href="#" title="' + D.dpText.TEXT_NEXT_YEAR + '">&gt;&gt;</a>') .bind( "click", function() { return L._displayNewMonth .call( L, this, 0, 1) }), D( '<a class="dp-nav-next-month" href="#" title="' + D.dpText.TEXT_NEXT_MONTH + '">&gt;</a>') .bind( "click", function() { return L._displayNewMonth .call( L, this, 1, 0) })), D("<div></div>").attr( "className", "dp-calendar")) .bgIframe()); var F = this.inline ? D(".dp-popup", this.context) : D("#dp-popup"); if (this.showYearNavigation == false) { D(".dp-nav-prev-year, .dp-nav-next-year", L.context).css("display", "none") } if (this.displayClose) { F.append(D( '<a href="#" id="dp-close">' + D.dpText.TEXT_CLOSE + "</a>") .bind("click", function() { L._closeCalendar(); return false })) } L._renderCalendar(); D(this.ele).trigger("dpDisplayed", F); if (!L.inline) { if (this.verticalPosition == D.dpConst.POS_BOTTOM) { F.css("top", K.top + H.height() - F.height() + L.verticalOffset) } if (this.horizontalPosition == D.dpConst.POS_RIGHT) { F.css("left", K.left + H.width() - F.width() + L.horizontalOffset) } D(document).bind("mousedown", this._checkMouse) } }, setRenderCallback : function(E) { if (E == null) { return } if (E && typeof (E) == "function") { E = [ E ] } this.renderCallback = this.renderCallback.concat(E) }, cellRender : function(J, E, H, G) { var K = this.dpController; var I = new Date(E.getTime()); J.bind("click", function() { var L = D(this); if (!L.is(".disabled")) { K.setSelected(I, !L.is(".selected") || !K.selectMultiple, false, true); if (K.closeOnSelect) { K._closeCalendar() } } }); if (K.isSelected(I)) { J.addClass("selected") } for ( var F = 0; F < K.renderCallback.length; F++) { K.renderCallback[F].apply(this, arguments) } }, _displayNewMonth : function(F, E, G) { if (!D(F).is(".disabled")) { this.setDisplayedMonth(this.displayedMonth + E, this.displayedYear + G, true) } F.blur(); return false }, _rerenderCalendar : function() { this._clearCalendar(); this._renderCalendar() }, _renderCalendar : function() { D("h2", this.context).html( Date.monthNames[this.displayedMonth] + " " + this.displayedYear); D(".dp-calendar", this.context).renderCalendar( { month : this.displayedMonth, year : this.displayedYear, renderCallback : this.cellRender, dpController : this, hoverClass : this.hoverClass }); if (this.displayedYear == this.startDate .getFullYear() && this.displayedMonth == this.startDate .getMonth()) { D(".dp-nav-prev-year", this.context).addClass( "disabled"); D(".dp-nav-prev-month", this.context).addClass( "disabled"); D(".dp-calendar td.other-month", this.context) .each(function() { var H = D(this); if (Number(H.text()) > 20) { H.addClass("disabled") } }); var G = this.startDate.getDate(); D(".dp-calendar td.current-month", this.context) .each(function() { var H = D(this); if (Number(H.text()) < G) { H.addClass("disabled") } }) } else { D(".dp-nav-prev-year", this.context) .removeClass("disabled"); D(".dp-nav-prev-month", this.context) .removeClass("disabled"); var G = this.startDate.getDate(); if (G > 20) { var F = new Date(this.startDate.getTime()); F.addMonths(1); if (this.displayedYear == F.getFullYear() && this.displayedMonth == F .getMonth()) { D("dp-calendar td.other-month", this.context).each(function() { var H = D(this); if (Number(H.text()) < G) { H.addClass("disabled") } }) } } } if (this.displayedYear == this.endDate .getFullYear() && this.displayedMonth == this.endDate .getMonth()) { D(".dp-nav-next-year", this.context).addClass( "disabled"); D(".dp-nav-next-month", this.context).addClass( "disabled"); D(".dp-calendar td.other-month", this.context) .each(function() { var H = D(this); if (Number(H.text()) < 14) { H.addClass("disabled") } }); var G = this.endDate.getDate(); D(".dp-calendar td.current-month", this.context) .each(function() { var H = D(this); if (Number(H.text()) > G) { H.addClass("disabled") } }) } else { D(".dp-nav-next-year", this.context) .removeClass("disabled"); D(".dp-nav-next-month", this.context) .removeClass("disabled"); var G = this.endDate.getDate(); if (G < 13) { var E = new Date(this.endDate.getTime()); E.addMonths(-1); if (this.displayedYear == E.getFullYear() && this.displayedMonth == E .getMonth()) { D(".dp-calendar td.other-month", this.context).each(function() { var H = D(this); if (Number(H.text()) > G) { H.addClass("disabled") } }) } } } }, _closeCalendar : function(E, F) { if (!F || F == this.ele) { D(document).unbind("mousedown", this._checkMouse); this._clearCalendar(); D("#dp-popup a").unbind(); D("#dp-popup").empty().remove(); if (!E) { D(this.ele).trigger("dpClosed", [ this.getSelected() ]) } } }, _clearCalendar : function() { D(".dp-calendar td", this.context).unbind(); D(".dp-calendar", this.context).empty() } }); D.dpConst = { SHOW_HEADER_NONE : 0, SHOW_HEADER_SHORT : 1, SHOW_HEADER_LONG : 2, POS_TOP : 0, POS_BOTTOM : 1, POS_LEFT : 0, POS_RIGHT : 1 }; D.dpText = { TEXT_PREV_YEAR : "Previous year", TEXT_PREV_MONTH : "Previous month", TEXT_NEXT_YEAR : "Next year", TEXT_NEXT_MONTH : "Next month", TEXT_CLOSE : "Close", TEXT_CHOOSE_DATE : "Choose date" }; D.dpVersion = "$Id: jquery.datePicker.js 15 2008-12-17 04:40:18Z kelvin.luck $"; D.fn.datePicker.defaults = { month : undefined, year : undefined, showHeader : D.dpConst.SHOW_HEADER_SHORT, startDate : undefined, endDate : undefined, inline : false, renderCallback : null, createButton : true, showYearNavigation : true, closeOnSelect : true, displayClose : false, selectMultiple : false, clickInput : false, verticalPosition : D.dpConst.POS_TOP, horizontalPosition : D.dpConst.POS_LEFT, verticalOffset : 0, horizontalOffset : 0, hoverClass : "dp-hover" }; function C(E) { if (E._dpId) { return D.event._dpCache[E._dpId] } return false } if (D.fn.bgIframe == undefined) { D.fn.bgIframe = function() { return this } } D(window).bind("unload", function() { var F = D.event._dpCache || []; for ( var E in F) { D(F[E].ele)._dpDestroy() } }) })(jQuery);
zysms
trunk/zysms/admin/theme/default/js/jquery.datePicker.min-2.1.2.js
JavaScript
asf20
21,826
/** * -------------------------------------------------------------------- * jQuery-Plugin "daterangepicker.jQuery.js" * by Scott Jehl, scott@filamentgroup.com * http://www.filamentgroup.com * reference article: http://www.filamentgroup.com/lab/update_date_range_picker_with_jquery_ui/ * demo page: http://www.filamentgroup.com/examples/daterangepicker/ * Download by http://www.codefans.net * Copyright (c) 2008 Filament Group, Inc * Dual licensed under the MIT (filamentgroup.com/examples/mit-license.txt) and GPL (filamentgroup.com/examples/gpl-license.txt) licenses. * * Dependencies: jquery, jquery UI datepicker, date.js library (included at bottom), jQuery UI CSS Framework * Changelog: * 10.23.2008 initial Version * 11.12.2008 changed dateFormat option to allow custom date formatting (credit: http://alexgoldstone.com/) * 01.04.09 updated markup to new jQuery UI CSS Framework * 01.19.2008 changed presets hash to support different text * -------------------------------------------------------------------- */ jQuery.fn.daterangepicker = function(settings){ var rangeInput = jQuery(this); //defaults var options = jQuery.extend({ presetRanges: [ {text: 'Today', dateStart: 'today', dateEnd: 'today' }, {text: 'Last 7 days', dateStart: 'today-7days', dateEnd: 'today' }, {text: 'Month to date', dateStart: function(){ return Date.parse('today').moveToFirstDayOfMonth(); }, dateEnd: 'today' }, {text: 'Year to date', dateStart: function(){ var x= Date.parse('today'); x.setMonth(0); x.setDate(1); return x; }, dateEnd: 'today' }, //extras: {text: 'The previous Month', dateStart: function(){ return Date.parse('1 month ago').moveToFirstDayOfMonth(); }, dateEnd: function(){ return Date.parse('1 month ago').moveToLastDayOfMonth(); } } //{text: 'Tomorrow', dateStart: 'Tomorrow', dateEnd: 'Tomorrow' }, //{text: 'Ad Campaign', dateStart: '03/07/08', dateEnd: 'Today' }, //{text: 'Last 30 Days', dateStart: 'Today-30', dateEnd: 'Today' }, //{text: 'Next 30 Days', dateStart: 'Today', dateEnd: 'Today+30' }, //{text: 'Our Ad Campaign', dateStart: '03/07/08', dateEnd: '07/08/08' } ], //presetRanges: array of objects for each menu preset. //Each obj must have text, dateStart, dateEnd. dateStart, dateEnd accept date.js string or a function which returns a date object presets: { specificDate: 'Specific Date', allDatesBefore: 'All Dates Before', allDatesAfter: 'All Dates After', dateRange: 'Date Range' }, rangeStartTitle: 'Start date', rangeEndTitle: 'End date', nextLinkText: 'Next', prevLinkText: 'Prev', doneButtonText: 'Done', earliestDate: Date.parse('-15years'), //earliest date allowed latestDate: Date.parse('+15years'), //latest date allowed rangeSplitter: '-', //string to use between dates in single input dateFormat: 'm/d/yy', // date formatting. Available formats: http://docs.jquery.com/UI/Datepicker/%24.datepicker.formatDate closeOnSelect: true, //if a complete selection is made, close the menu arrows: false, posX: rangeInput.offset().left, // x position posY: rangeInput.offset().top + rangeInput.outerHeight(), // y position appendTo: 'body', onClose: function(){}, onOpen: function(){}, onChange: function(){}, datepickerOptions: null //object containing native UI datepicker API options }, settings); //custom datepicker options, extended by options var datepickerOptions = { onSelect: function() { if(rp.find('.ui-daterangepicker-specificDate').is('.ui-state-active')){ rp.find('.range-end').datepicker('setDate', rp.find('.range-start').datepicker('getDate') ); } var rangeA = fDate( rp.find('.range-start').datepicker('getDate') ); var rangeB = fDate( rp.find('.range-end').datepicker('getDate') ); //send back to input or inputs if(rangeInput.length == 2){ rangeInput.eq(0).val(rangeA); rangeInput.eq(1).val(rangeB); } else{ rangeInput.val((rangeA != rangeB) ? rangeA+' '+ options.rangeSplitter +' '+rangeB : rangeA); } //if closeOnSelect is true if(options.closeOnSelect){ if(!rp.find('li.ui-state-active').is('.ui-daterangepicker-dateRange') && !rp.is(':animated') ){ hideRP(); } } options.onChange(); }, defaultDate: +0 }; //change event fires both when a calendar is updated or a change event on the input is triggered rangeInput.change(options.onChange); //datepicker options from options options.datepickerOptions = (settings) ? jQuery.extend(datepickerOptions, settings.datepickerOptions) : datepickerOptions; //Capture Dates from input(s) var inputDateA, inputDateB = Date.parse('today'); var inputDateAtemp, inputDateBtemp; if(rangeInput.size() == 2){ inputDateAtemp = Date.parse( rangeInput.eq(0).val() ); inputDateBtemp = Date.parse( rangeInput.eq(1).val() ); if(inputDateAtemp == null){inputDateAtemp = inputDateBtemp;} if(inputDateBtemp == null){inputDateBtemp = inputDateAtemp;} } else { inputDateAtemp = Date.parse( rangeInput.val().split(options.rangeSplitter)[0] ); inputDateBtemp = Date.parse( rangeInput.val().split(options.rangeSplitter)[1] ); if(inputDateBtemp == null){inputDateBtemp = inputDateAtemp;} //if one date, set both } if(inputDateAtemp != null){inputDateA = inputDateAtemp;} if(inputDateBtemp != null){inputDateB = inputDateBtemp;} //build picker and var rp = jQuery('<div class="ui-daterangepicker ui-widget ui-helper-clearfix ui-widget-content ui-corner-all"></div>'); var rpPresets = (function(){ var ul = jQuery('<ul class="ui-widget-content"></ul>').appendTo(rp); jQuery.each(options.presetRanges,function(){ jQuery('<li class="ui-daterangepicker-'+ this.text.replace(/ /g, '') +' ui-corner-all"><a href="#">'+ this.text +'</a></li>') .data('dateStart', this.dateStart) .data('dateEnd', this.dateEnd) .appendTo(ul); }); var x=0; jQuery.each(options.presets, function(key, value) { jQuery('<li class="ui-daterangepicker-'+ key +' preset_'+ x +' ui-helper-clearfix ui-corner-all"><span class="ui-icon ui-icon-triangle-1-e"></span><a href="#">'+ value +'</a></li>') .appendTo(ul); x++; }); ul.find('li').hover( function(){ jQuery(this).addClass('ui-state-hover'); }, function(){ jQuery(this).removeClass('ui-state-hover'); }) .click(function(){ rp.find('.ui-state-active').removeClass('ui-state-active'); jQuery(this).addClass('ui-state-active').clickActions(rp, rpPickers, doneBtn); return false; }); return ul; })(); //function to format a date string function fDate(date){ if(!date.getDate()){return '';} var day = date.getDate(); var month = date.getMonth(); var year = date.getFullYear(); month++; // adjust javascript month var dateFormat = options.dateFormat; return jQuery.datepicker.formatDate( dateFormat, date ); } jQuery.fn.restoreDateFromData = function(){ if(jQuery(this).data('saveDate')){ jQuery(this).datepicker('setDate', jQuery(this).data('saveDate')).removeData('saveDate'); } return this; } jQuery.fn.saveDateToData = function(){ if(!jQuery(this).data('saveDate')){ jQuery(this).data('saveDate', jQuery(this).datepicker('getDate') ); } return this; } //show, hide, or toggle rangepicker function showRP(){ if(rp.data('state') == 'closed'){ rp.data('state', 'open'); rp.fadeIn(300); options.onOpen(); } } function hideRP(){ if(rp.data('state') == 'open'){ rp.data('state', 'closed'); rp.fadeOut(300); options.onClose(); } } function toggleRP(){ if( rp.data('state') == 'open' ){ hideRP(); } else { showRP(); } } rp.data('state', 'closed'); //preset menu click events jQuery.fn.clickActions = function(rp, rpPickers, doneBtn){ if(jQuery(this).is('.ui-daterangepicker-specificDate')){ doneBtn.hide(); rpPickers.show(); rp.find('.title-start').text( options.presets.specificDate ); rp.find('.range-start').restoreDateFromData().show(400); rp.find('.range-end').restoreDateFromData().hide(400); setTimeout(function(){doneBtn.fadeIn();}, 400); } else if(jQuery(this).is('.ui-daterangepicker-allDatesBefore')){ doneBtn.hide(); rpPickers.show(); rp.find('.title-end').text( options.presets.allDatesBefore ); rp.find('.range-start').saveDateToData().datepicker('setDate', options.earliestDate).hide(400); rp.find('.range-end').restoreDateFromData().show(400); setTimeout(function(){doneBtn.fadeIn();}, 400); } else if(jQuery(this).is('.ui-daterangepicker-allDatesAfter')){ doneBtn.hide(); rpPickers.show(); rp.find('.title-start').text( options.presets.allDatesAfter ); rp.find('.range-start').restoreDateFromData().show(400); rp.find('.range-end').saveDateToData().datepicker('setDate', options.latestDate).hide(400); setTimeout(function(){doneBtn.fadeIn();}, 400); } else if(jQuery(this).is('.ui-daterangepicker-dateRange')){ doneBtn.hide(); rpPickers.show(); rp.find('.title-start').text(options.rangeStartTitle); rp.find('.title-end').text(options.rangeEndTitle); rp.find('.range-start').restoreDateFromData().show(400); rp.find('.range-end').restoreDateFromData().show(400); setTimeout(function(){doneBtn.fadeIn();}, 400); } else { //custom date range doneBtn.hide(); rp.find('.range-start, .range-end').hide(400, function(){ rpPickers.hide(); }); var dateStart = (typeof jQuery(this).data('dateStart') == 'string') ? Date.parse(jQuery(this).data('dateStart')) : jQuery(this).data('dateStart')(); var dateEnd = (typeof jQuery(this).data('dateEnd') == 'string') ? Date.parse(jQuery(this).data('dateEnd')) : jQuery(this).data('dateEnd')(); rp.find('.range-start').datepicker('setDate', dateStart).find('.ui-datepicker-current-day').trigger('click'); rp.find('.range-end').datepicker('setDate', dateEnd).find('.ui-datepicker-current-day').trigger('click'); } return false; } //picker divs var rpPickers = jQuery('<div class="ranges ui-widget-header ui-corner-all ui-helper-clearfix"><div class="range-start"><span class="title-start">Start Date</span></div><div class="range-end"><span class="title-end">End Date</span></div></div>').appendTo(rp); rpPickers.find('.range-start, .range-end').datepicker(options.datepickerOptions); rpPickers.find('.range-start').datepicker('setDate', inputDateA); rpPickers.find('.range-end').datepicker('setDate', inputDateB); var doneBtn = jQuery('<button class="btnDone ui-state-default ui-corner-all">'+ options.doneButtonText +'</button>') .click(function(){ rp.find('.ui-datepicker-current-day').trigger('click'); hideRP(); }) .hover( function(){ jQuery(this).addClass('ui-state-hover'); }, function(){ jQuery(this).removeClass('ui-state-hover'); } ) .appendTo(rpPickers); //inputs toggle rangepicker visibility jQuery(this).click(function(){ toggleRP(); return false; }); //hide em all rpPickers.css('display', 'none').find('.range-start, .range-end, .btnDone').css('display', 'none'); //inject rp jQuery(options.appendTo).append(rp); //wrap and position rp.wrap('<div class="ui-daterangepickercontain"></div>'); if(options.posX){ rp.parent().css('left', options.posX); } if(options.posY){ rp.parent().css('top', options.posY); } //add arrows (only available on one input) if(options.arrows && rangeInput.size()==1){ var prevLink = jQuery('<a href="#" class="ui-daterangepicker-prev ui-corner-all" title="'+ options.prevLinkText +'"><span class="ui-icon ui-icon-circle-triangle-w">'+ options.prevLinkText +'</span></a>'); var nextLink = jQuery('<a href="#" class="ui-daterangepicker-next ui-corner-all" title="'+ options.nextLinkText +'"><span class="ui-icon ui-icon-circle-triangle-e">'+ options.nextLinkText +'</span></a>'); jQuery(this) .addClass('ui-rangepicker-input ui-widget-content') .wrap('<div class="ui-daterangepicker-arrows ui-widget ui-widget-header ui-helper-clearfix ui-corner-all"></div>') .before( prevLink ) .before( nextLink ) .parent().find('a').click(function(){ var dateA = rpPickers.find('.range-start').datepicker('getDate'); var dateB = rpPickers.find('.range-end').datepicker('getDate'); var diff = Math.abs( new TimeSpan(dateA - dateB).getTotalMilliseconds() ) + 86400000; //difference plus one day if(jQuery(this).is('.ui-daterangepicker-prev')){ diff = -diff; } rpPickers.find('.range-start, .range-end ').each(function(){ var thisDate = jQuery(this).datepicker( "getDate"); if(thisDate == null){return false;} jQuery(this).datepicker( "setDate", thisDate.add({milliseconds: diff}) ).find('.ui-datepicker-current-day').trigger('click'); }); return false; }) .hover( function(){ jQuery(this).addClass('ui-state-hover'); }, function(){ jQuery(this).removeClass('ui-state-hover'); }) ; } jQuery(document).click(function(){ if (rp.is(':visible')) { hideRP(); } }); rp.click(function(){return false;}).hide(); return this; } /** * Version: 1.0 Alpha-1 * Build Date: 13-Nov-2007 * Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved. * License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. * Website: http://www.datejs.com/ or http://www.coolite.com/datejs/ */ Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}}; Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}} return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}} return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}} return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);} if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;} var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);} if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);} if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);} if(x.hour||x.hours){this.addHours(x.hour||x.hours);} if(x.month||x.months){this.addMonths(x.month||x.months);} if(x.year||x.years){this.addYears(x.year||x.years);} if(x.day||x.days){this.addDays(x.day||x.days);} return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");} return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;} if(!x.second&&x.second!==0){x.second=-1;} if(!x.minute&&x.minute!==0){x.minute=-1;} if(!x.hour&&x.hour!==0){x.hour=-1;} if(!x.day&&x.day!==0){x.day=-1;} if(!x.month&&x.month!==0){x.month=-1;} if(!x.year&&x.year!==0){x.year=-1;} if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());} if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());} if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());} if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());} if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());} if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());} if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());} if(x.timezone){this.setTimezone(x.timezone);} if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);} return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;} var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}} return w;};Date.prototype.isDST=function(){return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();}; Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;} return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);} var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;} return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);} var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";} return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}}; (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;} break;} return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];} rx.push(r[0]);s=r[1];} return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];} return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];} throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));} return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;} if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;} try{r=(px[i].call(this,s));}catch(e){r=null;} if(r){return r;}} throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;} try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);} rx.push(r[0]);s=r[1];} return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];} return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;} rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;} s=q[1];} if(!r){throw new $P.Exception(s);} if(q){throw new $P.Exception(q[1]);} if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}} return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;} rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;} if(!last&&q[1].length===0){last=true;} if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}} p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}} if(rx[1].length<best[1].length){best=rx;} if(best[1].length===0){break;}} if(best[0].length===0){return best;} if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);} best[1]=q[1];} return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);} return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];} if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);} var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}} return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}} this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");} var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});} return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;} for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}} if(this.now){return new Date();} var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);} if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;} if(!this.unit){this.unit="day";} if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;} if(this.unit=="week"){this.unit="day";this.value=this.value*7;} this[this.unit+"s"]=this.value*orient;} return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;} if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();} if(this.month&&!this.day){this.day=1;} return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));} fn=_C[keys]=_.any.apply(null,px);} return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));} return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){} return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;} try{r=Date.Grammar.start.call({},s);}catch(e){return null;} return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;} return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);}; /** * @version: 1.0 Alpha-1 * @author: Coolite Inc. http://www.coolite.com/ * @date: 2008-04-13 * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved. * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/. * @website: http://www.datejs.com/ */ /* * TimeSpan(milliseconds); * TimeSpan(days, hours, minutes, seconds); * TimeSpan(days, hours, minutes, seconds, milliseconds); */ var TimeSpan = function (days, hours, minutes, seconds, milliseconds) { var attrs = "days hours minutes seconds milliseconds".split(/\s+/); var gFn = function (attr) { return function () { return this[attr]; }; }; var sFn = function (attr) { return function (val) { this[attr] = val; return this; }; }; for (var i = 0; i < attrs.length ; i++) { var $a = attrs[i], $b = $a.slice(0, 1).toUpperCase() + $a.slice(1); TimeSpan.prototype[$a] = 0; TimeSpan.prototype["get" + $b] = gFn($a); TimeSpan.prototype["set" + $b] = sFn($a); } if (arguments.length == 4) { this.setDays(days); this.setHours(hours); this.setMinutes(minutes); this.setSeconds(seconds); } else if (arguments.length == 5) { this.setDays(days); this.setHours(hours); this.setMinutes(minutes); this.setSeconds(seconds); this.setMilliseconds(milliseconds); } else if (arguments.length == 1 && typeof days == "number") { var orient = (days < 0) ? -1 : +1; this.setMilliseconds(Math.abs(days)); this.setDays(Math.floor(this.getMilliseconds() / 86400000) * orient); this.setMilliseconds(this.getMilliseconds() % 86400000); this.setHours(Math.floor(this.getMilliseconds() / 3600000) * orient); this.setMilliseconds(this.getMilliseconds() % 3600000); this.setMinutes(Math.floor(this.getMilliseconds() / 60000) * orient); this.setMilliseconds(this.getMilliseconds() % 60000); this.setSeconds(Math.floor(this.getMilliseconds() / 1000) * orient); this.setMilliseconds(this.getMilliseconds() % 1000); this.setMilliseconds(this.getMilliseconds() * orient); } this.getTotalMilliseconds = function () { return (this.getDays() * 86400000) + (this.getHours() * 3600000) + (this.getMinutes() * 60000) + (this.getSeconds() * 1000); }; this.compareTo = function (time) { var t1 = new Date(1970, 1, 1, this.getHours(), this.getMinutes(), this.getSeconds()), t2; if (time === null) { t2 = new Date(1970, 1, 1, 0, 0, 0); } else { t2 = new Date(1970, 1, 1, time.getHours(), time.getMinutes(), time.getSeconds()); } return (t1 < t2) ? -1 : (t1 > t2) ? 1 : 0; }; this.equals = function (time) { return (this.compareTo(time) === 0); }; this.add = function (time) { return (time === null) ? this : this.addSeconds(time.getTotalMilliseconds() / 1000); }; this.subtract = function (time) { return (time === null) ? this : this.addSeconds(-time.getTotalMilliseconds() / 1000); }; this.addDays = function (n) { return new TimeSpan(this.getTotalMilliseconds() + (n * 86400000)); }; this.addHours = function (n) { return new TimeSpan(this.getTotalMilliseconds() + (n * 3600000)); }; this.addMinutes = function (n) { return new TimeSpan(this.getTotalMilliseconds() + (n * 60000)); }; this.addSeconds = function (n) { return new TimeSpan(this.getTotalMilliseconds() + (n * 1000)); }; this.addMilliseconds = function (n) { return new TimeSpan(this.getTotalMilliseconds() + n); }; this.get12HourHour = function () { return (this.getHours() > 12) ? this.getHours() - 12 : (this.getHours() === 0) ? 12 : this.getHours(); }; this.getDesignator = function () { return (this.getHours() < 12) ? Date.CultureInfo.amDesignator : Date.CultureInfo.pmDesignator; }; this.toString = function (format) { this._toString = function () { if (this.getDays() !== null && this.getDays() > 0) { return this.getDays() + "." + this.getHours() + ":" + this.p(this.getMinutes()) + ":" + this.p(this.getSeconds()); } else { return this.getHours() + ":" + this.p(this.getMinutes()) + ":" + this.p(this.getSeconds()); } }; this.p = function (s) { return (s.toString().length < 2) ? "0" + s : s; }; var me = this; return format ? format.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g, function (format) { switch (format) { case "d": return me.getDays(); case "dd": return me.p(me.getDays()); case "H": return me.getHours(); case "HH": return me.p(me.getHours()); case "h": return me.get12HourHour(); case "hh": return me.p(me.get12HourHour()); case "m": return me.getMinutes(); case "mm": return me.p(me.getMinutes()); case "s": return me.getSeconds(); case "ss": return me.p(me.getSeconds()); case "t": return ((me.getHours() < 12) ? Date.CultureInfo.amDesignator : Date.CultureInfo.pmDesignator).substring(0, 1); case "tt": return (me.getHours() < 12) ? Date.CultureInfo.amDesignator : Date.CultureInfo.pmDesignator; } } ) : this._toString(); }; return this; }; /** * Gets the time of day for this date instances. * @return {TimeSpan} TimeSpan */ Date.prototype.getTimeOfDay = function () { return new TimeSpan(0, this.getHours(), this.getMinutes(), this.getSeconds(), this.getMilliseconds()); }; /* * TimePeriod(startDate, endDate); * TimePeriod(years, months, days, hours, minutes, seconds, milliseconds); */ var TimePeriod = function (years, months, days, hours, minutes, seconds, milliseconds) { var attrs = "years months days hours minutes seconds milliseconds".split(/\s+/); var gFn = function (attr) { return function () { return this[attr]; }; }; var sFn = function (attr) { return function (val) { this[attr] = val; return this; }; }; for (var i = 0; i < attrs.length ; i++) { var $a = attrs[i], $b = $a.slice(0, 1).toUpperCase() + $a.slice(1); TimePeriod.prototype[$a] = 0; TimePeriod.prototype["get" + $b] = gFn($a); TimePeriod.prototype["set" + $b] = sFn($a); } if (arguments.length == 7) { this.years = years; this.months = months; this.setDays(days); this.setHours(hours); this.setMinutes(minutes); this.setSeconds(seconds); this.setMilliseconds(milliseconds); } else if (arguments.length == 2 && arguments[0] instanceof Date && arguments[1] instanceof Date) { // startDate and endDate as arguments var d1 = years.clone(); var d2 = months.clone(); var temp = d1.clone(); var orient = (d1 > d2) ? -1 : +1; this.years = d2.getFullYear() - d1.getFullYear(); temp.addYears(this.years); if (orient == +1) { if (temp > d2) { if (this.years !== 0) { this.years--; } } } else { if (temp < d2) { if (this.years !== 0) { this.years++; } } } d1.addYears(this.years); if (orient == +1) { while (d1 < d2 && d1.clone().addDays(Date.getDaysInMonth(d1.getYear(), d1.getMonth()) ) < d2) { d1.addMonths(1); this.months++; } } else { while (d1 > d2 && d1.clone().addDays(-d1.getDaysInMonth()) > d2) { d1.addMonths(-1); this.months--; } } var diff = d2 - d1; if (diff !== 0) { var ts = new TimeSpan(diff); this.setDays(ts.getDays()); this.setHours(ts.getHours()); this.setMinutes(ts.getMinutes()); this.setSeconds(ts.getSeconds()); this.setMilliseconds(ts.getMilliseconds()); } } return this; };
zysms
trunk/zysms/admin/theme/default/js/jquery/daterangepicker.jQuery.js
JavaScript
asf20
47,722
/* * Date prototype extensions. Doesn't depend on any * other code. Doens't overwrite existing methods. * * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods * * Copyright (c) 2006 Jörn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) * * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - * I've added my name to these methods so you know who to blame if they are broken! * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * An Array of day names starting with Sunday. * * @example dayNames[0] * @result 'Sunday' * * @name dayNames * @type Array * @cat Plugins/Methods/Date */ Date.dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; /** * An Array of abbreviated day names starting with Sun. * * @example abbrDayNames[0] * @result 'Sun' * * @name abbrDayNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; /** * An Array of month names starting with Janurary. * * @example monthNames[0] * @result 'January' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; /** * An Array of abbreviated month names starting with Jan. * * @example abbrMonthNames[0] * @result 'Jan' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; /** * The first day of the week for this locale. * * @name firstDayOfWeek * @type Number * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.firstDayOfWeek = 1; /** * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.format = 'dd/mm/yyyy'; //Date.format = 'mm/dd/yyyy'; //Date.format = 'yyyy-mm-dd'; //Date.format = 'dd mmm yy'; /** * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fullYearStart = '20'; (function() { /** * Adds a given method under the given name * to the Date prototype if it doesn't * currently exist. * * @private */ function add(name, method) { if( !Date.prototype[name] ) { Date.prototype[name] = method; } }; /** * Checks if the year is a leap year. * * @example var dtm = new Date("01/12/2008"); * dtm.isLeapYear(); * @result true * * @name isLeapYear * @type Boolean * @cat Plugins/Methods/Date */ add("isLeapYear", function() { var y = this.getFullYear(); return (y%4==0 && y%100!=0) || y%400==0; }); /** * Checks if the day is a weekend day (Sat or Sun). * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekend(); * @result false * * @name isWeekend * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekend", function() { return this.getDay()==0 || this.getDay()==6; }); /** * Check if the day is a day of the week (Mon-Fri) * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekDay(); * @result false * * @name isWeekDay * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekDay", function() { return !this.isWeekend(); }); /** * Gets the number of days in the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getDaysInMonth(); * @result 31 * * @name getDaysInMonth * @type Number * @cat Plugins/Methods/Date */ add("getDaysInMonth", function() { return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; }); /** * Gets the name of the day. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(); * @result 'Saturday' * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(true); * @result 'Sat' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getDayName", function(abbreviated) { return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; }); /** * Gets the name of the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(); * @result 'Janurary' * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(true); * @result 'Jan' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getMonthName", function(abbreviated) { return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; }); /** * Get the number of the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayOfYear(); * @result 11 * * @name getDayOfYear * @type Number * @cat Plugins/Methods/Date */ add("getDayOfYear", function() { var tmpdtm = new Date("1/1/" + this.getFullYear()); return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); }); /** * Get the number of the week of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getWeekOfYear(); * @result 2 * * @name getWeekOfYear * @type Number * @cat Plugins/Methods/Date */ add("getWeekOfYear", function() { return Math.ceil(this.getDayOfYear() / 7); }); /** * Set the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.setDayOfYear(1); * dtm.toString(); * @result 'Tue Jan 01 2008 00:00:00' * * @name setDayOfYear * @type Date * @cat Plugins/Methods/Date */ add("setDayOfYear", function(day) { this.setMonth(0); this.setDate(day); return this; }); /** * Add a number of years to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addYears(1); * dtm.toString(); * @result 'Mon Jan 12 2009 00:00:00' * * @name addYears * @type Date * @cat Plugins/Methods/Date */ add("addYears", function(num) { this.setFullYear(this.getFullYear() + num); return this; }); /** * Add a number of months to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMonths(1); * dtm.toString(); * @result 'Tue Feb 12 2008 00:00:00' * * @name addMonths * @type Date * @cat Plugins/Methods/Date */ add("addMonths", function(num) { var tmpdtm = this.getDate(); this.setMonth(this.getMonth() + num); if (tmpdtm > this.getDate()) this.addDays(-this.getDate()); return this; }); /** * Add a number of days to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addDays(1); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addDays * @type Date * @cat Plugins/Methods/Date */ add("addDays", function(num) { //this.setDate(this.getDate() + num); this.setTime(this.getTime() + (num*86400000) ); return this; }); /** * Add a number of hours to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addHours(24); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addHours * @type Date * @cat Plugins/Methods/Date */ add("addHours", function(num) { this.setHours(this.getHours() + num); return this; }); /** * Add a number of minutes to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMinutes(60); * dtm.toString(); * @result 'Sat Jan 12 2008 01:00:00' * * @name addMinutes * @type Date * @cat Plugins/Methods/Date */ add("addMinutes", function(num) { this.setMinutes(this.getMinutes() + num); return this; }); /** * Add a number of seconds to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addSeconds(60); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name addSeconds * @type Date * @cat Plugins/Methods/Date */ add("addSeconds", function(num) { this.setSeconds(this.getSeconds() + num); return this; }); /** * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. * * @example var dtm = new Date(); * dtm.zeroTime(); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name zeroTime * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("zeroTime", function() { this.setMilliseconds(0); this.setSeconds(0); this.setMinutes(0); this.setHours(0); return this; }); /** * Returns a string representation of the date object according to Date.format. * (Date.toString may be used in other places so I purposefully didn't overwrite it) * * @example var dtm = new Date("01/12/2008"); * dtm.asString(); * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' * * @name asString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("asString", function(format) { var r = format || Date.format; if (r.split('mm').length>1) { // ugly workaround to make sure we don't replace the m's in e.g. noveMber r = r.split('mmmm').join(this.getMonthName(false)) .split('mmm').join(this.getMonthName(true)) .split('mm').join(_zeroPad(this.getMonth()+1)) } else { r = r.split('m').join(this.getMonth()+1); } r = r.split('yyyy').join(this.getFullYear()) .split('yy').join((this.getFullYear() + '').substring(2)) .split('dd').join(_zeroPad(this.getDate())) .split('d').join(this.getDate()); return r; }); /** * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) * * @example var dtm = Date.fromString("12/01/2008"); * dtm.toString(); * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' * * @name fromString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fromString = function(s) { var f = Date.format; var d = new Date('01/01/1970'); if (s == '') return d; s = s.toLowerCase(); var matcher = ''; var order = []; var r = /(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g; var results; while ((results = r.exec(f)) != null) { switch (results[1]) { case 'd': case 'dd': case 'm': case 'mm': case 'yy': case 'yyyy': matcher += '(\\d+\\d?\\d?\\d?)+'; order.push(results[1].substr(0, 1)); break; case 'mmm': matcher += '([a-z]{3})'; order.push('M'); break; } if (results[2]) { matcher += results[2]; } } var dm = new RegExp(matcher); var result = s.match(dm); for (var i=0; i<order.length; i++) { var res = result[i+1]; switch(order[i]) { case 'd': d.setDate(res); break; case 'm': d.setMonth(Number(res)-1); break; case 'M': for (var j=0; j<Date.abbrMonthNames.length; j++) { if (Date.abbrMonthNames[j].toLowerCase() == res) break; } d.setMonth(j); break; case 'y': d.setYear(res); break; } } return d; }; // utility method var _zeroPad = function(num) { var s = '0'+num; return s.substring(s.length-2) //return ('0'+num).substring(-2); // doesn't work on IE :( }; })();
zysms
trunk/zysms/admin/theme/default/js/date.js
JavaScript
asf20
12,229
/* * Facebox (for jQuery) * version: 1.2 (05/05/2008) * @requires jQuery v1.2 or later * * Examples at http://famspam.com/facebox/ * * Licensed under the MIT: * http://www.opensource.org/licenses/mit-license.php * * Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ] * * Usage: * * jQuery(document).ready(function() { * jQuery('a[rel*=facebox]').facebox() * }) * * <a href="#terms" rel="facebox">Terms</a> * Loads the #terms div in the box * * <a href="terms.html" rel="facebox">Terms</a> * Loads the terms.html page in the box * * <a href="terms.png" rel="facebox">Terms</a> * Loads the terms.png image in the box * * * You can also use it programmatically: * * jQuery.facebox('some html') * * The above will open a facebox with "some html" as the content. * * jQuery.facebox(function($) { * $.get('blah.html', function(data) { $.facebox(data) }) * }) * * The above will show a loading screen before the passed function is called, * allowing for a better ajaxy experience. * * The facebox function can also display an ajax page or image: * * jQuery.facebox({ ajax: 'remote.html' }) * jQuery.facebox({ image: 'dude.jpg' }) * * Want to close the facebox? Trigger the 'close.facebox' document event: * * jQuery(document).trigger('close.facebox') * * Facebox also has a bunch of other hooks: * * loading.facebox * beforeReveal.facebox * reveal.facebox (aliased as 'afterReveal.facebox') * init.facebox * * Simply bind a function to any of these hooks: * * $(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... }) * */ (function($) { $.facebox = function(data, klass) { $.facebox.loading() if (data.ajax) fillFaceboxFromAjax(data.ajax) else if (data.image) fillFaceboxFromImage(data.image) else if (data.div) fillFaceboxFromHref(data.div) else if ($.isFunction(data)) data.call($) else $.facebox.reveal(data, klass) } /* * Public, $.facebox methods */ $.extend($.facebox, { settings: { opacity : 0, overlay : true, loadingImage : 'theme/default/image/loading.gif', closeImage : 'theme/default/image/closelabel.gif', imageTypes : [ 'png', 'jpg', 'jpeg', 'gif' ], faceboxHtml : '\ <div id="facebox" style="display:none;"> \ <div class="popup"> \ <table> \ <tbody> \ <tr> \ <td class="tl"/><td class="b"/><td class="tr"/> \ </tr> \ <tr> \ <td class="b"/> \ <td class="body"> \ <div class="content"> \ </div> \ <div class="footer"> \ <a href="#" class="close"> \ <img src="resources/images/closelabel.gif" title="close" class="close_image" /> \ </a> \ </div> \ </td> \ <td class="b"/> \ </tr> \ <tr> \ <td class="bl"/><td class="b"/><td class="br"/> \ </tr> \ </tbody> \ </table> \ </div> \ </div>' }, loading: function() { init() if ($('#facebox .loading').length == 1) return true showOverlay() $('#facebox .content').empty() $('#facebox .body').children().hide().end(). append('<div class="loading"><img src="'+$.facebox.settings.loadingImage+'"/></div>') $('#facebox').css({ top: getPageScroll()[1] + (getPageHeight() / 10), left: 385.5 }).show() $(document).bind('keydown.facebox', function(e) { if (e.keyCode == 27) $.facebox.close() return true }) $(document).trigger('loading.facebox') }, reveal: function(data, klass) { $(document).trigger('beforeReveal.facebox') if (klass) $('#facebox .content').addClass(klass) $('#facebox .content').append(data) $('#facebox .loading').remove() $('#facebox .body').children().fadeIn('normal') $('#facebox').css('left', $(window).width() / 2 - ($('#facebox table').width() / 2)) $(document).trigger('reveal.facebox').trigger('afterReveal.facebox') }, close: function() { $(document).trigger('close.facebox') return false } }) /* * Public, $.fn methods */ $.fn.facebox = function(settings) { init(settings) function clickHandler() { $.facebox.loading(true) // support for rel="facebox.inline_popup" syntax, to add a class // also supports deprecated "facebox[.inline_popup]" syntax var klass = this.rel.match(/facebox\[?\.(\w+)\]?/) if (klass) klass = klass[1] fillFaceboxFromHref(this.href, klass) return false } return this.click(clickHandler) } /* * Private methods */ // called one time to setup facebox on this page function init(settings) { if ($.facebox.settings.inited) return true else $.facebox.settings.inited = true $(document).trigger('init.facebox') makeCompatible() var imageTypes = $.facebox.settings.imageTypes.join('|') $.facebox.settings.imageTypesRegexp = new RegExp('\.' + imageTypes + '$', 'i') if (settings) $.extend($.facebox.settings, settings) $('body').append($.facebox.settings.faceboxHtml) var preload = [ new Image(), new Image() ] preload[0].src = $.facebox.settings.closeImage preload[1].src = $.facebox.settings.loadingImage $('#facebox').find('.b:first, .bl, .br, .tl, .tr').each(function() { preload.push(new Image()) preload.slice(-1).src = $(this).css('background-image').replace(/url\((.+)\)/, '$1') }) $('#facebox .close').click($.facebox.close) $('#facebox .close_image').attr('src', $.facebox.settings.closeImage) } // getPageScroll() by quirksmode.com function getPageScroll() { var xScroll, yScroll; if (self.pageYOffset) { yScroll = self.pageYOffset; xScroll = self.pageXOffset; } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict yScroll = document.documentElement.scrollTop; xScroll = document.documentElement.scrollLeft; } else if (document.body) {// all other Explorers yScroll = document.body.scrollTop; xScroll = document.body.scrollLeft; } return new Array(xScroll,yScroll) } // Adapted from getPageSize() by quirksmode.com function getPageHeight() { var windowHeight if (self.innerHeight) { // all except Explorer windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowHeight = document.body.clientHeight; } return windowHeight } // Backwards compatibility function makeCompatible() { var $s = $.facebox.settings $s.loadingImage = $s.loading_image || $s.loadingImage $s.closeImage = $s.close_image || $s.closeImage $s.imageTypes = $s.image_types || $s.imageTypes $s.faceboxHtml = $s.facebox_html || $s.faceboxHtml } // Figures out what you want to display and displays it // formats are: // div: #id // image: blah.extension // ajax: anything else function fillFaceboxFromHref(href, klass) { // div if (href.match(/#/)) { var url = window.location.href.split('#')[0] var target = href.replace(url,'') $.facebox.reveal($(target).clone().show(), klass) // image } else if (href.match($.facebox.settings.imageTypesRegexp)) { fillFaceboxFromImage(href, klass) // ajax } else { fillFaceboxFromAjax(href, klass) } } function fillFaceboxFromImage(href, klass) { var image = new Image() image.onload = function() { $.facebox.reveal('<div class="image"><img src="' + image.src + '" /></div>', klass) } image.src = href } function fillFaceboxFromAjax(href, klass) { $.get(href, function(data) { $.facebox.reveal(data, klass) }) } function skipOverlay() { return $.facebox.settings.overlay == false || $.facebox.settings.opacity === null } function showOverlay() { if (skipOverlay()) return if ($('facebox_overlay').length == 0) $("body").append('<div id="facebox_overlay" class="facebox_hide"></div>') $('#facebox_overlay').hide().addClass("facebox_overlayBG") .css('opacity', $.facebox.settings.opacity) .click(function() { $(document).trigger('close.facebox') }) .fadeIn(200) return false } function hideOverlay() { if (skipOverlay()) return $('#facebox_overlay').fadeOut(200, function(){ $("#facebox_overlay").removeClass("facebox_overlayBG") $("#facebox_overlay").addClass("facebox_hide") $("#facebox_overlay").remove() }) return false } /* * Bindings */ $(document).bind('close.facebox', function() { $(document).unbind('keydown.facebox') $('#facebox').fadeOut(function() { $('#facebox .content').removeClass().addClass('content') hideOverlay() $('#facebox .loading').remove() }) }) })(jQuery);
zysms
trunk/zysms/admin/theme/default/js/facebox.js
JavaScript
asf20
9,322
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {*<th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.VIDEO_NAME}</th> <th>{$LANG.USER_LOGIN_NAME}</th> <th>{$LANG.VIDEO_COUNT}</th> <th>{$LANG.DEPARTMENT_NAME}</th> </tr> </thead> <tbody> {section name=history loop=$history} <tr> {*<td><input type="checkbox" /></td>*} <td>{$history[history]->view_id}</td> <td>{$history[history]->video_title}</td> <td>{$history[history]->user_login_name}</td> <td>{$history[history]->user_count}</td> {if $history[history]->department_name == ''} <td>{$LANG.MANAGER}</td> {else} <td>{$history[history]->department_name}</td> {/if} </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/index.tpl
Smarty
asf20
2,566
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.COMPANY_NAME}</th> <th>{$LANG.CONTACT_LIST_NAME}</th> {* <th>{$LANG.ANGENT_ID}</th>*} <th>{$LANG.CONTACT_LIST_COUNT}</th> {*<th>{$LANG.CONTACT_LIST_CREATE_TIME}</th>*} <th>{$LANG.CONTACT_LIST_UPDATE_TIME}</th> <th>{$LANG.CONTACT_LIST_remark}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=contact loop=$item} <tr> {*<td><input type="checkbox" /></td>c*} <td>{$item[contact]->contact_list_id}</td> <td>{$item[contact]->company_name}</td> <td>{$item[contact]->contact_list_name}</td> {*<td>{$item[contact]->angent_id}</td>*} <td>{$item[contact]->contact_list_count}</td> {*<td>{$item[contact]->contact_list_create_time}</td>*} <td>{$item[contact]->contact_list_update_time}</td> <td>{$item[contact]->contact_list_remark}</td> <td> <!-- Icons --> <a href="javascript:del('contact_list.php?method=delete&contact_list_id={$item[contact]->contact_list_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="contact_list.php?method=updateForward&contact_list_id={$item[contact]->contact_list_id}&company_id={$item[contact]->company_id}" title="{$LANG.UPDATE}"> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="contact_list.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <fieldset><!--class="text-input medium-input datepicker"--> <input type="hidden" name="contact_list_id" value="{$contactObj->contact_list_id}"> <p> <label>{$LANG.CONTACT_LIST_NAME}</label> <input class="text-input small-input"type="text" name="contact_list_name" id="contact_list_name" value="{$contactObj->contact_list_name}"/> </p> {* <p> <label>{$LANG.ANGENT_ID}</label> <input class="text-input small-input"type="text" name="angent_id" id="angent_id" value="{$contactObj->angent_id}"/> </p> <p> <label>{$LANG.CONTACT_LIST_CREATE_TIME}</label> {if $method=='update'} <input class="text-input small-input" type="text" readonly="true" name="contact_list_create_time" id="contact_list_create_time" value="{$contactObj->contact_list_create_time}"/> {else} <input class="text-input small-input"type="text" name="contact_list_create_time" id="contact_list_create_time" value="{$smarty.now|date_format:'%Y-%m-%d'}"/> {/if} </p>*} <p> <label>{$LANG.CONTACT_LIST_remark}</label> <textarea name="contact_list_remark" id="contact_list_remark" cols="50" rows="10">{$contactObj->contact_list_remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/contact_list.tpl
Smarty
asf20
5,508
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.PAGE_TITLE}</th> <th>{$LANG.PAGE_CONTENT}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=page_arr loop=$page_arr} <tr> {*<td><input type="checkbox" /></td>c*} <td>{$page_arr[page_arr]->page_id}</td> <td>{$page_arr[page_arr]->page_title}</td> <td>{$page_arr[page_arr]->page_content}</td> <td> <!-- Icons --> <a href="javascript:del('page.php?method=delete&page_id={$page_arr[page_arr]->page_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="page.php?method=updateForward&page_id={$page_arr[page_arr]->page_id}" title="{$LANG.UPDATE}"> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <script type="text/javascript"> $("document").ready(function(){ $("#submit").click(function(){ <!--title--> if($("#page_title").val()==''){ alert('Please enter the video title.'); $("#page_title").focus(); return false; } <!--content--> var content=CKEDITOR.instances.content.getData() if(content == ''){ alert('Please enter the content.'); return false; } }); }); </script> <div class="tab-content" id="tab2"> <form action="page.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.COMPANY_MANAGER_INFOMATION} </div> </div> <p> <label>{$LANG.PAGE_TITLE}</label> <input class="text-input small-input" type="text" id="page_title" name="page_title" value="{$pages->page_title}"/> </p> <p> <label>{$LANG.PAGE_CONTENT}</label> <textarea name="content" id="content" class="ckeditor" value="{$pages->page_content}">{$pages->page_content}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/page.tpl
Smarty
asf20
4,655
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.COMPANY_NAME}</th> <th>{$LANG.COMPANY_ADDRESS}</th> <th>{$LANG.COMPANY_PHONE}</th> <th>{$LANG.BALANCE}</th> <th>{$LANG.REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=company loop=$item} <tr> {*<td><input type="checkbox" /></td>c*} <td>{$item[company]->company_id}</td> <td>{$item[company]->company_name}</td> <td>{$item[company]->company_address}</td> <td>{$item[company]->company_phone}</td> <td>{$item[company]->balance}</td> <td>{$item[company]->company_remark}</td> <td> <!-- Icons --> {* <a href="javascript:del('company.php?method=delete&company_id={$item[company]->company_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> *} <a href="company.php?method=updateForward&company_id={$item[company]->company_id}&user_id={$item[company]->user_id}" title="{$LANG.UPDATE}"> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> <a href="company.php?method=setApi&company_id={$item[company]->company_id}&user_id={$item[company]->user_id}" title="{$LANG.SET_API}"> <img src="{$admin_image}/icons/setting.png" alt="{$LANG.SET_API}" /></a> <a href="../customer/login.php?group=2&login_by_params=1&method=check&company_id={$item[company]->company_id}" target="_blank" title="{$LANG.LOGIN_AS_CUSTOMER}"> <img src="{$admin_image}/icons/customer_login.png" alt="{$LANG.LOGIN_AS_CUSTOMER}" /></a> <a href="javascript:tofill({$item[company]->company_id});" title="{$LANG.FILL}" id="tofill"> <img src="{$admin_image}/icons/symbol_addition.png" alt="{$LANG.FILL}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="company.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.COMPANY_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <label>{$LANG.COMPANY_NAME}</label> <input class="text-input medium-input" type="text" id="company_name" name="company_name" value="{$companyObj->company_name}" /> </p> <input class="text-input medium-input" type="hidden" id="company_id" name="company_id" value="{$companyObj->company_id}" /> {*<p> <label>{$LANG.VIDEO_PAGCKAGE_NAME}</label> {section name=package loop=$package} {section name=package_content loop=$package_content} {$checked=""} {if $package[package]->package_id==$package_content[$smarty.section.package_content.iteration-1]} {$checked="checked=\"checked\""} {break} {/if} {/section} <input type="checkbox" id="package" name="package[]" {$checked} value="{$package[package]->package_id}">{$package[package]->package_name} {/section} </p>*} <p> <label>{$LANG.COMPANY_ADDRESS}</label> <input class="text-input medium-input datepicker" type="text" id="company_address" name="company_address" value="{$companyObj->company_address}"/> </p> <p> <label>{$LANG.COMPANY_PHONE}</label> <input class="text-input small-input" type="text" id="company_phone" name="company_phone" value="{$companyObj->company_phone}"/> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="company_remark" id="company_remark" cols="50" rows="10">{$companyObj->company_remark}</textarea> </p> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.COMPANY_MANAGER_INFOMATION} </div> </div> <input type="hidden" id="user_id" name="user_id" value="{$companyObj->user_id}"> <p> <label>{$LANG.USER_LOGIN_NAME}</label> {if $method=='update'} <input class="text-input small-input" type="text" readOnly="false" id="user_login_name" name="user_login_name" value="{$companyObj->user_login_name}" /> {else} <input class="text-input small-input" type="text" id="user_login_name" name="user_login_name" value="{$companyObj->user_login_name}" /> {/if} </p> <p> <label>{$LANG.USER_LOGIN_PASSWORD}</label> <input class="text-input small-input" type="password" id="user_login_password" name="user_login_password" value="{$companyObj->user_login_password}"/> </p> <p> <label>{$LANG.USER_LOGIN_PASSWORD_CONFIRM}</label> <input class="text-input small-input" type="password" id="user_repeat_password" name="user_repeat_password" value="{$companyObj->user_login_password}"/> </p> <p> <label>{$LANG.USER_REAL_NAME}</label> <input class="text-input small-input" type="text" id="user_real_name" name="user_real_name" value="{$companyObj->user_real_name}"/> </p> <p> <label>{$LANG.USER_EMAIL}</label> <input class="text-input small-input" type="text" id="user_email" name="user_email" value="{$companyObj->user_email}"/> </p> <p> <label>固定电话</label> <input class="text-input small-input" type="text" id="user_phone" name="user_phone" value="{$companyObj->user_phone}"/> </p> <p> <label>移动</label> <input class="text-input small-input" type="text" id="user_mobile" name="user_mobile" value="{$companyObj->user_mobile}"/> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="user_remark" id="user_remark" cols="50" rows="10">{$companyObj->user_remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> <div id="fillbox" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal" --> <h3>Fill</h3> <form action="company.php?method=fill" method="post"> <fieldset> <h4>请输入金额:</h4> <input class="text-input small-input" type="text" id="bulance" name="bulance"/> </fieldset> <fieldset> <h4>信用卡类型:</h4> <select name="cc_type" id="cc_type" class="text-input small-input" > <option value="1">VISA</option> <option value="2">Master Card</option> </select> </fieldset> <fieldset> <h4>信用卡帐号:</h4> <input class="text-input small-input" type="text" id="cc_number" name="cc_number"/> </fieldset> <fieldset> <h4>姓名:</h4> <input class="text-input small-input" type="text" id="cc_name" name="cc_name"/> </fieldset> <fieldset> <h4>有效期:</h4> <input class="text-input small-input" type="text" id="cc_expirydate" name="cc_expirydate"/> </fieldset> <fieldset> <h4>银行账号:</h4> <input class="text-input small-input" type="text" id="dd_bsbnumber" name="dd_bsbnumber"/> </fieldset> <fieldset> <h4>银行卡号:</h4> <input class="text-input small-input" type="text" id="dd_accountnumber" name="dd_accountnumber"/> </fieldset> <fieldset> <h4>银行卡名称:</h4> <input class="text-input small-input" type="text" id="dd_accountname" name="dd_accountname"/> </fieldset> <fieldset> <h4>默认付款方式:</h4> <select name="defaultpay" id="defaultpay" class="text-input small-input" > <option value="1">Bank Tracnsfer</option> <option value="2">Credit Card</option> <option value="3">Derect Debit</option> </select> </fieldset> <fieldset> <input class="button" type="hidden" id="s_company_id" name="company_id" value="1" /> <input class="button" type="submit" name="submit" id="submit" value="Add" /> </fieldset> </form> </div> <!-- End #messages --> {include file="$admin_theme/include/foot.tpl"} <script type="text/javascript"> function tofill(company_id){ jQuery("#s_company_id").attr("value",company_id); jQuery.facebox({ div: '#fillbox' }); } </script>
zysms
trunk/zysms/admin/theme/default/company.tpl
Smarty
asf20
11,320
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.CREDIT_NAME}</th> <th>{$LANG.CREDIT_VOLUME}</th> <th>{$LANG.CREDIT_PRICE}</th> <th>{$LANG.CREDIT_CURRENCY}</th> <th>{$LANG.CREDIT_STATUS}</th> <th>{$LANG.CREDIT_SORT}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=credit loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[credit]->credit_id}</td> <td>{$item[credit]->credit_name}</td> <td>{$item[credit]->credit_volume}</td> <td>{$item[credit]->credit_price}</td> <td>{$item[credit]->credit_currency}</td> <td> {if $item[credit]->credit_status==2} {$LANG.ENABLE} {/if} {if $item[credit]->credit_status==1} {$LANG.DISABLE} {/if} </td> <td>{$item[credit]->credit_sort}</td> <td> <!-- Icons --> <a href="javascript:del('credit.php?method=delete&credit_id={$item[credit]->credit_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="credit.php?method=updateForward&credit_id={$item[credit]->credit_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <script type="text/javascript"> $(document).ready(function(){ $("#submit").click(function(){ /*<!--username--> if($("#admin_login_name").val()==''){ alert('Please enter the user name'); $("#admin_login_name").focus(); return false; } <!--password--> if($("#admin_login_password1").val().length <'6' || $("#admin_login_password1").val().length >'16'){ alert('Please enter your password length between 6-16.'); $("#admin_login_password1").focus(); return false; } <!--password--> if($("#admin_login_password2").val().length <'6' || $("#admin_login_password2").val().length >'16'){ alert('Please enter your password length between 6-16.'); $("#admin_login_password2").focus(); return false; } if($("#admin_login_password1").val() != $("#admin_login_password2").val()){ alert('Requires the same password twice'); $("#admin_login_password1").focus(); return false; } <!--remark--> if($("#admin_remark").val()==''){ alert('Please enter the remark'); $("#admin_remark").focus(); return false; } });*/ }); </script> <div class="tab-content" id="tab2"> <form action="credit.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post" onsubmit="return CheckLogin()"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.CREDIT_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <label>{$LANG.CREDIT_NAME}</label> <input class="text-input medium-input" type="text" id="credit_name" name="credit_name" value="{$obj->credit_name}"/> </p> <p> <label>{$LANG.CREDIT_VOLUME}</label> <input class="text-input medium-input" type="text" id="credit_volume" name="credit_volume" value="{$obj->credit_volume}"/> </p> <p> <label>{$LANG.CREDIT_PRICE}</label> <input class="text-input small-input" type="text" id="credit_price" name="credit_price" value="{$obj->credit_price}"/> </p> <p> <label>{$LANG.CREDIT_CURRENCY}</label> <input class="text-input small-input" type="text" id="credit_currency" name="credit_currency" value="{$obj->credit_currency}"/> </p> <p> <label>{$LANG.CREDIT_STATUS}</label> <select id="credit_status" name="credit_status"> <option>{$LANG.PLEASE_SELECT}</option> <option value="2" {if $obj->credit_status==2}selected="selected"{/if}>{$LANG.ENABLE}</option> <option value="1" {if $obj->credit_status==1}selected="selected"{/if}>{$LANG.DISABLE}</option> </select> </p> <p> <label>{$LANG.CREDIT_SORT}</label> <input class="text-input small-input" type="text" id="credit_sort" name="credit_sort" value="{$obj->credit_sort}"/> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="credit_remark" id="credit_remark" cols="59" rows="10">{$obj->credit_remark}</textarea> </p> <p> <input type="hidden" name="credit_id" value="{$obj->credit_id}" /> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"} {literal} <SCRIPT language="javascript"> function CheckLogin(){ var form=document.form; if(((form.login_password1.value.length<3)||(form.login_password1.value.length>8))&&(form.login_password1.value!="")) { alert("密码必须是3-8位的字母或数字!"); form.login_password1.focus(); return false; } else if(form.login_password1.value!=form.login_password2.value) { alert("两次输入的密码不同!"); form.login_password2.focus(); return false; } else if(form.login_password.value=="") { alert("登录密码不能为空!"); form.login_password1.focus(); return false; } else return true; } </SCRIPT> {/literal}
zysms
trunk/zysms/admin/theme/default/credit.tpl
Smarty
asf20
8,328
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ADMIN_ID}</th> <th>{$LANG.ADMIN_LOGIN_NAME}</th> <th>{$LANG.ADMIN_REAL_NAME}</th> <th>{$LANG.ADMIN_REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=admin loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[admin]->admin_id}</td> <td>{$item[admin]->admin_login_name}</td> <td>{$item[admin]->admin_real_name}</td> <td>{$item[admin]->admin_remark}</td> <td> <!-- Icons --> <a href="javascript:del('admin.php?method=delete&admin_id={$item[admin]->admin_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="admin.php?method=updateForward&admin_id={$item[admin]->admin_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <script type="text/javascript"> $(document).ready(function(){ $("#submit").click(function(){ <!--username--> if($("#admin_login_name").val()==''){ alert('Please enter the user name'); $("#admin_login_name").focus(); return false; } <!--password--> if($("#admin_login_password1").val().length <'6' || $("#admin_login_password1").val().length >'16'){ alert('Please enter your password length between 6-16.'); $("#admin_login_password1").focus(); return false; } <!--password--> if($("#admin_login_password2").val().length <'6' || $("#admin_login_password2").val().length >'16'){ alert('Please enter your password length between 6-16.'); $("#admin_login_password2").focus(); return false; } if($("#admin_login_password1").val() != $("#admin_login_password2").val()){ alert('Requires the same password twice'); $("#admin_login_password1").focus(); return false; } <!--remark--> if($("#admin_remark").val()==''){ alert('Please enter the remark'); $("#admin_remark").focus(); return false; } }); }); </script> <div class="tab-content" id="tab2"> <form action="admin.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post" onsubmit="return CheckLogin()"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.ADMIN_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> {if $login_name_error_message} <div class="notification error png_bg"> <a href="#" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$login_name_error_message} </div> </div> {/if} <p> <input class="text-input medium-input" type="hidden" id="admin_id" name="admin_id" value="{$adminObj->admin_id}"/> </p> <p> <label>{$LANG.ADMIN_LOGIN_NAME}</label> {if $method=='update'} <input class="text-input medium-input" type="text" disabled="false" id="admin_login_name" name="admin_login_name" value="{$adminObj->admin_login_name}"/> {else} <input class="text-input medium-input" type="text" id="admin_login_name" name="admin_login_name" value="{$adminObj->admin_login_name}"/> {/if} </p> {if $password_error_message} <div class="notification error png_bg"> <a href="#" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$password_error_message} </div> </div> {/if} <p> <label>{$LANG.ADMIN_LOGIN_PASSWORD}</label> <input class="text-input medium-input" type="password" id="admin_login_password" name="admin_login_password" value="{$adminObj->admin_login_password}"/> </p> <p> <label>{$LANG.ADMIN_REPEAT_PASSWORD}</label> <input class="text-input medium-input" type="password" id="admin_repeat_password" name="admin_repeat_password" value="{$adminObj->admin_login_password}"/> </p> <p> <label>{$LANG.USER_REAL_NAME}</label> <input class="text-input medium-input" type="text" id="admin_real_name" name="admin_real_name" value="{$adminObj->admin_real_name}"/> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="admin_remark" id="admin_remark" cols="59" rows="10">{$adminObj->admin_remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"} {literal} <SCRIPT language="javascript"> function CheckLogin(){ var form=document.form; if(((form.login_password1.value.length<3)||(form.login_password1.value.length>8))&&(form.login_password1.value!="")) { alert("密码必须是3-8位的字母或数字!"); form.login_password1.focus(); return false; } else if(form.login_password1.value!=form.login_password2.value) { alert("两次输入的密码不同!"); form.login_password2.focus(); return false; } else if(form.login_password.value=="") { alert("登录密码不能为空!"); form.login_password1.focus(); return false; } else return true; } </SCRIPT> {/literal}
zysms
trunk/zysms/admin/theme/default/admin.tpl
Smarty
asf20
8,341
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset={$CHARSET}" /> <title>Welcome to {$LANG.WEBSITE_NAME}</title> <!-- CSS --> <!-- Reset Stylesheet --> <link rel="stylesheet" href="{$admin_css}/reset.css" type="text/css" media="screen" /> <!-- Main Stylesheet --> <link rel="stylesheet" href="{$admin_css}/style.css" type="text/css" media="screen" /> <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid --> <link rel="stylesheet" href="{$admin_css}/invalid.css" type="text/css" media="screen" /> <link rel="stylesheet" href="{$admin_css}/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" /> <!-- Javascripts --> <!-- jQuery --> <script type="text/javascript" src="{$admin_js}/jquery-1.3.2.min.js"></script> <!-- jQuery Configuration --> <script type="text/javascript" src="{$admin_js}/simpla.jquery.configuration.js"></script> <!-- Facebox jQuery Plugin --> <script type="text/javascript" src="{$admin_js}/facebox.js"></script> <!-- jQuery WYSIWYG Plugin --> <script type="text/javascript" src="{$admin_js}/jquery.wysiwyg.js"></script> <!-- jQuery Datepicker Plugin --> <script type="text/javascript" src="{$admin_js}/jquery-ui-1.8.16.custom.min.js"></script> <!--[if IE]><script type="text/javascript" src="{$admin_js}/jquery.bgiframe.js"></script><![endif]--> <!-- Internet Explorer .png-fix --> <!--[if IE 6]> <script type="text/javascript" src="{$admin_js}/DD_belatedPNG.js"></script> <script type="text/javascript"> DD_belatedPNG.fix('.png_bg, img, li'); </script> <![endif]--> {include file="$admin_theme/include/js.tpl"} </head> <body id="login"> <div id="login-wrapper" class="png_bg"> <div id="login-top"> <h1>Simpla Admin</h1> <!-- Logo (221px width) --> <img id="logo" src="{$admin_image}/logo.png" alt="Simpla Admin logo" /> </div> <!-- End #logn-top --> <div id="login-content"> <form action="login.php?method=check" method="post"> {if $login_name_error_message} <div class="notification error png_bg"> <a href="#" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$login_name_error_message} </div> </div> {else} <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div>{$LANG.USER_LOGIN_INFOMATION}</div> </div> {/if} <p> <label>账号</label> <input class="text-input" type="text" name="admin_login_name" id="admin_login_name"/> </p> <div class="clear"></div> <p> <label>密码</label> <input class="text-input" type="password" name="admin_login_password" id="admin_login_password"/> </p> <div class="clear"></div> <p id="remember-password"> <input type="checkbox" />Remember me </p> <div class="clear"></div> <p> <input type="hidden" name="group" value="1" /> <input class="button" type="submit" value="Sign In" name="submit"/> </p> </form> </div> <!-- End #login-content --> </div> <!-- End #login-wrapper --> </body> </html>
zysms
trunk/zysms/admin/theme/default/admin_login.tpl
Smarty
asf20
3,786
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <script type="text/javascript"> $(document).ready(function(){ $("#submit").click(function(){ if($("#category_name").val() == ''){ alert('Please fill out the category name'); $("#category_name").focus(); return false; } if($("#category_remark")== ''){ alert('Please fill out the Remarks'); $("#category_remark").focus(); return false; } return true; }); }); </script> <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.CATEGORY_NAME}</th> <th>{$LANG.VIDEO_SORT}</th> <th>{$LANG.REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=category loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[category]->category_id}</td> <td>{$item[category]->category_name}</td> <td>{$item[category]->category_sort}</td> <td>{$item[category]->remark}</td> <td> <!-- Icons --> <a href="javascript:del('category.php?method=delete&category_id={$item[category]->category_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="category.php?method=updateForward&category_id={$item[category]->category_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="category.php?method={if $method!='update'}add{else}update{/if}" name="form" method="post"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.VIDEO_CATEGORY_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input class="text-input medium-input" type="hidden" id="category_id" name="category_id" value="{$categoryObj->category_id}"/><!-- Classes for input-notification: success, error, information, attention --> </p> <p> <label>{$LANG.CATEGORY_NAME}</label> <input class="text-input medium-input" type="text" id="category_name" name="category_name" value="{$categoryObj->category_name}"/><!-- Classes for input-notification: success, error, information, attention --> </p> <p> <label>{$LANG.REMARK}</label> <textarea id="category_remark" name="category_remark" cols="59" rows="10">{$categoryObj->remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/category.tpl
Smarty
asf20
5,240
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {*<th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.VIDEO_PAGCKAGE_NAME}</th> <th>{$LANG.VIDEO_PAGCKAGE_PRICE}</th> <th>{$LANG.REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=package loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[package]->package_id}</td> <td>{$item[package]->package_name}</td> <td>{$item[package]->package_price}</td> <td>{$item[package]->remark}</td> <td> <!-- Icons --> <a href="javascript:del('package.php?method=delete&package_id={$item[package]->package_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="package.php?method=updateForward&package_id={$item[package]->package_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <script type="text/javascript"> $(document).ready(function(){ <!--视频包名--> $("#submit").click(function(){ if($("#package_name").val()==''){ alert('Please enter the package name.'); $("#package_name").focus(); return false; } <!--视频类别--> $count=$("input:checked").length; if($count == 0){ alert('Please select video category name.'); return false; } <!--视频价格--> if($("#package_price").val() == ''){ alert('Please enter a video package price.'); $("#package_price").focus(); return false; }else if(isNaN($("#package_price").val())){ alert('Please enter the number.'); $("#package_price").focus(); return false; } <!--视频备注--> if($("#package_remark").val() == ''){ alert('Please enter a video package remark.'); $("#package_remark").focus(); return false; } }); }); </script> <div class="tab-content" id="tab2"> <form action="package.php?method={if $method!='update'}add{else}update{/if}" name="myform" method="post"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.VIDEO_PACKAGE_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input class="text-input medium-input" type="hidden" id="package_id" name="package_id" value="{$packageObj->package_id}"/><!-- Classes for input-notification: success, error, information, attention --> </p> <p> <label>{$LANG.VIDEO_PAGCKAGE_NAME}</label> <input class="text-input medium-input" type="text" id="package_name" name="package_name" value="{$packageObj->package_name}"/> </p> <p> <label>{$LANG.CATEGORY_NAME}</label> {section name=category loop=$category} {section name=package_content loop=$package_content} {$checked=""} {if {$category[category]->category_id}=={$package_content[package_content]->category_id}} {$checked="checked=\"checked\""} {break} {/if} {/section} <input type="checkbox" id="package_category" name="package_category[]" {$checked} value="{$category[category]->category_id}">{$category[category]->category_name} {/section} </p> <p> <label>{$LANG.VIDEO_PAGCKAGE_PRICE}</label> <input class="text-input medium-input"type="text" id="package_price" name="package_price" value="{$packageObj->package_price}"/> </p> <p> <label>{$LANG.REMARK}</label> <textarea name="package_remark" id="package_remark" cols="59" rows="10">{$packageObj->remark}</textarea> </p> <p> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/package.tpl
Smarty
asf20
6,656
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> {* <th>{$LANG.API_USERNAME}</th> <th>{$LANG.API_PASSWORD}</th>*} <th>{$LANG.API_ID}</th> <th>{$LANG.API_STATUS}</th> <th>{$LANG.SENDER_NAME}</th> <th>{$LANG.SENDER_STATUS}</th> <th>{$LANG.MOTIVATION}</td> {* <th>{$LANG.USERAPI_REMARK}</th>*} <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=company loop=$item} <tr> {*<td><input type="checkbox" /></td>c*} <td>{$item[company]->userapi_id}</td> {*<td>{$item[company]->api_username}</td> <td>{$item[company]->api_password}</td>*} <td>{$item[company]->api_id}</td> <td> {if $item[company]->api_status==2} {$LANG.ENABLE} {/if} {if $item[company]->api_status==1} {$LANG.DISABLE} {/if} </td> <td>{if $item[company]->api_type==1} {$item[company]->sender_name} {/if} {if $item[company]->api_type==0} {$LANG.SYSTEM_DEFAULT} {/if}</td> <td> {if $item[company]->sender_status==1} {$LANG.DISABLE} {/if} {if $item[company]->sender_status==2} {$LANG.ENABLE} {/if} {if $item[company]->sender_status==3} {$LANG.DELETE} {/if} {if $item[company]->sender_status==4} {$LANG.SUBJECT_TO_AUDIT} {/if} </td> <td width="300" style="text-overflow:ellipsis">{$item[company]->sender_motivation}</td> {*<td>{$item[company]->userapi_remark}</td>*} <td> <!-- Icons --> <a href="javascript:del('company.php?method=deleteApi&userapi_id={$item[company]->userapi_id}&company_id={$item[company]->company_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="company.php?method=updateAPIForward&userapi_id={$item[company]->userapi_id}" title="{$LANG.UPDATE}"> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <div class="tab-content" id="tab2"> <form action="company.php?method={if $method!='update'}addUserAPI{else}updateUserAPI{/if}" name="form" method="post"> <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.USERAPI_INFOMATION} </div> </div> <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <label>{$LANG.API_USERNAME}</label> <input class="text-input medium-input" type="text" id="api_username" name="api_username" value="{$companyObj->api_username}" /> </p> <p> <label>{$LANG.API_PASSWORD}</label> <input class="text-input medium-input datepicker" type="text" id="api_password" name="api_password" value="{$companyObj->api_password}"/> </p> <p> <label>{$LANG.API_ID}</label> <input class="text-input small-input" type="text" id="api_id" name="api_id" value="{$companyObj->api_id}"/> </p> <p> <label>{$LANG.SENDER_NAME}</label> <input class="text-input small-input" type="text" id="sender_name" name="sender_name" value="{$companyObj->sender_name}"/> </p> <p> <label>{$LANG.MOTIVATION}</label> <textarea name="sender_motivation" id="sender_motivation" cols="50" rows="10">{$companyObj->sender_motivation}</textarea> </p> <p> <label>{$LANG.SENDER_STATUS}</label> <select id="sender_status" name="sender_status"> <option>{$LANG.PLEASE_SELECT}</option> <option value="1" {if $companyObj->sender_status==1}selected="selected"{/if}>{$LANG.DISABLE}</option> <option value="2" {if $companyObj->sender_status==2}selected="selected"{/if}>{$LANG.ENABLE}</option> <option value="3" {if $companyObj->sender_status==3}selected="selected"{/if}>{$LANG.DELETE}</option> <option value="4" {if $companyObj->sender_status==4}selected="selected"{/if}>{$LANG.SUBJECT_TO_AUDIT}</option> </select> </p> <p> <label>{$LANG.API_STATUS}</label> <select id="api_status" name="api_status"> <option>{$LANG.PLEASE_SELECT}</option> <option value="2" {if $companyObj->api_status==2}selected="selected"{/if}>{$LANG.ENABLE}</option> <option value="1" {if $companyObj->api_status==1}selected="selected"{/if}>{$LANG.DISABLE}</option> </select> </p> <p> <label>{$LANG.USERAPI_REMARK}</label> <textarea name="userapi_remark" id="userapi_remark" cols="50" rows="10">{$companyObj->userapi_remark}</textarea> </p> <p> <input type="hidden" id="company_id" name="company_id" value="{$companyObj->company_id}" /> <input type="hidden" id="userapi_id" name="userapi_id" value="{$companyObj->userapi_id}" /> <input class="button" name="submit" id="submit" type="submit" value="{$LANG.SUBMIT}" /> {if $method=='update'} <input class="button" name="return" id="return" type="button" value="{$LANG.RETURN}" onclick="javascript:history.go(-1);"/> {/if} </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/userapi.tpl
Smarty
asf20
7,855
<div id="footer"> <small> <!-- Remove this notice or replace it with whatever you want --> &#169; Copyright 2011 Health360 | Powered by <a href="http://www.webnova.com.au">WebNova</a> | <a href="#">Top</a> </small> </div><!-- End #footer --> </div> <!-- End #main-content --> </div> </body> </html>
zysms
trunk/zysms/admin/theme/default/include/foot.tpl
Smarty
asf20
342
<div id="body-wrapper"> <!-- Wrapper for the radial gradient background --> <div id="sidebar"> <div id="sidebar-wrapper"> <!-- Sidebar with logo and menu --> <h1 id="sidebar-title"><a href="#" title="{$LANG.WEBSITE_NAME}">{$LANG.WEBSITE_NAME}</a></h1> <!-- Logo (221px wide) --> <a href="#"><img id="logo" src="{$admin_image}/logo.png" alt="{$LANG.WEBSITE_NAME}" /></a> <div id="profile-links"><a href="{$LANGUAGE_PATH}?language=english">{$LANG.ENGLISH}</a> | <a href="{$LANGUAGE_PATH}?language=chinese">{$LANG.CHINESE}</a></div> <!-- Sidebar Profile links --> <div id="profile-links"> <a href="login.php?method=out" title="{$LANG.SIGN_OUT}">{$LANG.SIGN_OUT}</a> </div> <ul id="main-nav"> <!-- Accordion Menu --> {$admin_menu} </ul> <!-- End #main-nav --> <div id="messages" style="display: none"> <!-- Messages are shown when a link with these attributes are clicked: href="#messages" rel="modal" --> <h3>3 Messages</h3> <p> <strong>17th May 2009</strong> by Admin<br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <p> <strong>2nd May 2009</strong> by Jane Doe<br /> Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus, at luctus turpis elit sit amet quam. Vivamus pretium ornare est. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <p> <strong>25th April 2009</strong> by Admin<br /> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue. <small><a href="#" class="remove-link" title="Remove message">Remove</a></small> </p> <form action="#" method="post"> <h4>New Message</h4> <fieldset> <textarea class="textarea" name="textfield" cols="79" rows="5"></textarea> </fieldset> <fieldset> <select name="dropdown" class="small-input"> <option value="option1">Send to...</option> <option value="option2">Everyone</option> <option value="option3">Admin</option> <option value="option4">Jane Doe</option> </select> <input class="button" type="submit" value="Send" /> </fieldset> </form> </div> <!-- End #messages --> </div></div> <!-- End #sidebar -->
zysms
trunk/zysms/admin/theme/default/include/left.tpl
Smarty
asf20
2,663
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset={$CHARSET}" /> <title>Welcome to {$LANG.WEBSITE_NAME}</title> <!-- CSS --> <!-- Reset Stylesheet --> <link rel="stylesheet" href="{$admin_css}/reset.css" type="text/css" media="screen" /> <!-- Main Stylesheet --> <link rel="stylesheet" href="{$admin_css}/style.css" type="text/css" media="screen" /> <!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid --> <link rel="stylesheet" href="{$admin_css}/invalid.css" type="text/css" media="screen" /> <link rel="stylesheet" href="{$admin_css}/smoothness/jquery-ui-1.8.16.custom.css" type="text/css" media="screen" /> <!-- Javascripts --> <!-- jQuery --> <script type="text/javascript" src="{$admin_js}/jquery-1.3.2.min.js"></script> <!-- jQuery Configuration --> <script type="text/javascript" src="{$admin_js}/simpla.jquery.configuration.js"></script> <!-- Facebox jQuery Plugin --> <script type="text/javascript" src="{$admin_js}/facebox.js"></script> <!-- jQuery WYSIWYG Plugin --> <script type="text/javascript" src="{$admin_js}/jquery.wysiwyg.js"></script> <!-- jQuery Datepicker Plugin --> <script type="text/javascript" src="{$admin_js}/jquery-ui-1.8.16.custom.min.js"></script> <!--[if IE]><script type="text/javascript" src="{$admin_js}/jquery.bgiframe.js"></script><![endif]--> <!-- Internet Explorer .png-fix --> <!--[if IE 6]> <script type="text/javascript" src="{$admin_js}/DD_belatedPNG.js"></script> <script type="text/javascript"> DD_belatedPNG.fix('.png_bg, img, li'); </script> <![endif]--> <script type="text/javascript" src="{$ROOT_URL}/include/ckeditor/ckeditor.js"></script> <script type="text/javascript"> window.onload = function()    {     CKEDITOR.replace('content');    }; </script> {include file="$admin_theme/include/js.tpl"} </head> <body> <div id="body-wrapper"> <!-- Wrapper for the radial gradient background -->
zysms
trunk/zysms/admin/theme/default/include/top.tpl
Smarty
asf20
2,368
<script type="text/javascript"> {if $method=='add' || $method=='update'} $(document).ready(function () { $(".tab").click(); $("#video_date").datepicker(); }); {/if} $(document).ready(function () { $("#contact_birth_date").datepicker({ dateFormat:'yy-mm-dd', }); //contact list $("#contact_list_create_time").datepicker({ dateFormat:'yy-mm-dd', }); }); function del(url){ if(!confirm("{$LANG.DELETE_THIS_RECORD}")){ return; }else{ window.location=url; } } </script>
zysms
trunk/zysms/admin/theme/default/include/js.tpl
Smarty
asf20
520
<!-- Page Head --> <h2>{$LANG.WELCOME} {$admin->admin_login_name}</h2> <p id="page-intro">{$LANG.WHAT_WOULD_YOU_LIKE_TO_DO}</p> <ul class="shortcut-buttons-set"> <li><a class="shortcut-button" href="company.php?method=addForward"><span> <img src="{$admin_image}/icons/pencil_48.png" alt="icon" /><br /> {$LANG.Creat_NEW_USER} </span></a></li> <li><a class="shortcut-button" href="contact.php"><span> <img src="{$admin_image}/icons/paper_content_pencil_48.png" alt="icon" /><br /> {$LANG.CREAT_AN_CONTACT} </span></a></li> <li><a class="shortcut-button" href="credit.php"><span> <img src="{$admin_image}/icons/image_add_48.png" alt="icon" /><br /> {$LANG.MANAGE_CREDIT} </span></a></li> <li><a class="shortcut-button" href="admin.php"><span> <img src="{$admin_image}/icons/clock_48.png" alt="icon" /><br /> {$LANG.MANAGE_ADMIN} </span></a></li> <!--<li><a class="shortcut-button" href="#messages" rel="modal"><span> <img src="{$admin_image}/icons/comment_48.png" alt="icon" /><br /> Open Modal </span></a></li>--> </ul><!-- End .shortcut-buttons-set --> <div class="clear"></div> <!-- End .clear -->
zysms
trunk/zysms/admin/theme/default/include/pageheader.tpl
Smarty
asf20
1,277
{include file="$admin_theme/include/top.tpl"} {include file="$admin_theme/include/left.tpl"} <div id="main-content"> <!-- Main Content Section with everything --> {include file="$admin_theme/include/pageheader.tpl"} <script type="text/javascript"> <!--jQuery 验证--> $(document).ready(function(){ <!--当点击submit时触发以下事件--> $("#submit").click(function(){ <!--视频标题--> if($("#video_title").val() == ''){ alert('Please fill in the name of the title.'); $("#video_title").focus(); return false; } <!--视频类别--> if($("#category").val() =='Please select'){ alert('Please select the category name.'); $("#category").focus(); return false; } <!--content--> var content=CKEDITOR.instances.content.getData() if(content == ''){ alert('Please enter the content.'); return false; } <!--视频标签--> if($("#video_tags").val()==''){ alert('Please fill out the video tag.'); $("#video_tags").focus(); return false; } <!--视频上传时间--> if($("#video_date").val()==''){ alert('Please fill out the video upload time.'); $("#video_date").focus(); return false; } <!--视频上传文件--> if($("#video_file").val()==''){ alert('Please fill out the video upload file.'); $("#video_file").focus(); return false; } <!--图片上传文件--> if($("#video_imagefile").val()==''){ alert('Please fill out the video upload image file.'); $("#video_imagefile").focus(); return false; } <!--视频备注--> if($("#video_remark").val()==''){ alert('Please fill out the video upload image file.'); $("#video_remark").focus(); return false; } }); }); </script> {if $method=='add' || $method=='update'} {literal} <script language="JavaScript"> $(document).ready(function () { $(".tab").click(); }); </script> {/literal} {/if} <div class="content-box"><!-- Start Content Box --> <div class="content-box-header"> <ul class="content-box-tabs"> <li><a href="#tab1" class="default-tab">{$LANG.LIST}</a></li> <!-- href must be unique and match the id of target div --> <li><a href="#tab2" class="tab">{$lang_method}</a></li> </ul> <div class="clear"></div> </div> <!-- End .content-box-header --> <div class="content-box-content"> <div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab --> <table> <thead> <tr> {* <th><input class="check-all" type="checkbox" /></th>*} <th>{$LANG.ID}</th> <th>{$LANG.VIDEO_TITLE}</th> <th>{$LANG.VIDEO_CONTENT}</th> <th>{$LANG.VIDEO_DATE}</th> <th>{$LANG.VIDEO_REMARK}</th> <th>{$LANG.OPERATE}</th> </tr> </thead> <tbody> {section name=video loop=$item} <tr> {*<td><input type="checkbox" /></td>*} <td>{$item[video]->video_id}</td> <td>{$item[video]->video_title}</td> <td>{$item[video]->video_content}</td> <td>{$item[video]->video_date}</td> <td>{$item[video]->remark}</td> <td> <!-- Icons --> <a href="javascript:del('video_manager.php?method=delete&video_id={$item[video]->video_id}')" title="{$LANG.DELETE}"> <img src="{$admin_image}/icons/cross.png" alt="{$LANG.DELETE}" /></a> <a href="video_manager.php?method=updateForward&video_id={$item[video]->video_id}" title="{$LANG.UPDATE}""> <img src="{$admin_image}/icons/hammer_screwdriver.png" alt="{$LANG.UPDATE}" /></a> </td> </tr> {/section} </tbody> <tfoot> <tr> <td colspan="6"> {* <div class="bulk-actions align-left"> <select name="dropdown"> <option value="option1">Choose an action...</option> <option value="option2">Edit</option> <option value="option3">Delete</option> </select> <a class="button" href="#">Apply to selected</a> </div> *} <div class="pagination">{$nextpage}</div> <!-- End .pagination --> <div class="clear"></div> </td> </tr> </tfoot> </table> </div> <!-- End #tab1 --> <!--{literal} <script type="text/javascript"> $(document).ready(function(){ $("#video_date").daterangepicker({arrows:true}); }); </script> {/literal}--> <div class="tab-content" id="tab2"> <form action="video_manager.php?method={if $method!='update'}add{else}update{/if}" name="upForm" method="post" enctype="multipart/form-data"> {if $ERROR_VIDEO_MESSAGE} <div class="notification error png_bg"> <a href="#" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$ERROR_VIDEO_MESSAGE} </div> </div> {else} <div class="notification information png_bg"> <a href="javascirpt:void(0);" class="close"><img src="{$admin_image}/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a> <div> {$LANG.VIDEO_VIDEO_INFOMATION} </div> </div> {/if} <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns --> <p> <input class="text-input medium-input" type="hidden" id="video_id" name="video_id" value="{$videoObj->video_id}"/> </p> <p> <label>{$LANG.VIDEO_TITLE}</label> <input class="text-input medium-input" type="text" id="video_title" name="video_title" value="{$videoObj->video_title}"/> </p> <p> <label>{$LANG.VIDEO_CATEGORIES}</label> <select id="category" name="category"> <option>Please select</option> {section name=category loop=$category} {if {$category[category]->category_id}=={$videoObj->category_id} } <option value="{$category[category]->category_id}" selected="selected">{$category[category]->category_name}</option> {else} <option value="{$category[category]->category_id}">{$category[category]->category_name}</option> {/if} {/section} </select> </p> <p> <label>{$LANG.VIDEO_CONTENT}</label> <textarea name="content" id="content" class="ckeditor">{$videoObj->video_content}</textarea> <!--<label>{$LANG.VIDEO_COUNT}</label>--> <input class="text-input medium-input" type="hidden" id="video_count" name="video_count" value="{$videoObj->video_count}"/> </p> <p> <label>{$LANG.VIDEO_TAGS}</label> <input class="text-input medium-input" type="text" id="video_tags" name="video_tags" value="{$videoObj->video_tags}"/> </p> <p> <label>{$LANG.VIDEO_DATE}</label> <input class="text-input medium-input" type="text" id="video_date" name="video_date" value="{$videoObj->video_date}"/> </p> <p> <label>{$LANG.UPLOAD_VIDEO}</label> <input class ="text-input medium-input" type="file" id ="video_file" name="video_file" size="48" value="{$videoObj->video_urlpath}"> </p> <p> <label>{$LANG.UPLOAD_IMAGE}</label> <input class ="text-input medium-input" type="file" id ="video_imagefile" name="video_imagefile" size="48" value="{$videoObj->video_urlpath}"> </p> <p> <label>{$LANG.REMARK}</label> <textarea id="video_remark" name="video_remark" cols="59" rows="10">{$videoObj->remark}</textarea> </p> <p> <input class="button" name="submit" type="submit" id="submit" value="{$LANG.SUBMIT}" /> </p> </fieldset> <div class="clear"></div><!-- End .clear --> </form> </div> <!-- End #tab2 --> </div> <!-- End .content-box-content --> </div> <!-- End .content-box --> <div class="clear"></div> {include file="$admin_theme/include/foot.tpl"}
zysms
trunk/zysms/admin/theme/default/video_manager.tpl
Smarty
asf20
8,734
/******************************** Basic Structure ********************************/ html { font-size: 100%; height: 100%; margin-bottom: 1px; /* Always show a scrollbar to avoid jumping when the scrollbar appears */ } body { font-family: Arial, Helvetica, sans-serif; color: #555; background: #f0f0f0 url('../image/bg-body.gif') top left repeat-y; font-size: 12px; } #body-wrapper { background: url('../image/bg-radial-gradient.gif') fixed 230px top no-repeat; } /******************************** Elements styling ********************************/ h1, h2, h3, h4, h5, h6 { font-family: Helvetica, Arial, sans-serif; color: #222; font-weight: bold; } h1 { font-family: Calibri, Helvetica, Arial, sans-serif; font-size: 31px; font-weight: bold; color: #fff; position: absolute; top: -1000px; /* Remove this line and delete the logo (in the HTML) if you don't want an image as a logo */ } h2 { font-size: 26px; padding: 0 0 10px 0; } h3 { font-size: 17px; padding: 0 0 10px 0; } h4 { font-size: 16px; padding: 0 0 5px 0; } h5 { font-size: 14px; padding: 0 0 5px 0; } h6 { font-size: 12px; padding: 0 0 5px 0; } a { color: #57a000; text-decoration: none; } a:hover { color: #000; } a:active { color: #777; } a:focus { outline: 1px; } strong { font-weight: bold; color: #333; } small { font-size: 0.85em; } pre { font-family: monospace; } p { padding: 5px 0 10px 0; line-height: 1.6em; } /******************************** General Classes ********************************/ .clear { clear: both; } .align-left { float: left; } .align-right { float: right; } /************ Button ************/ .button { font-family: Verdana, Arial, sans-serif; display: inline-block; background: #459300 url('../image/bg-button-green.gif') top left repeat-x !important; border: 1px solid #459300 !important; padding: 4px 7px 4px 7px !important; color: #fff !important; font-size: 11px !important; cursor: pointer; } .button:hover { text-decoration: underline; } .button:active { padding: 5px 7px 3px 7px !important; } a.remove-link { color: #bb0000; } a.remove-link:hover { color: #000; } /******************************** Sidebar ********************************/ #sidebar { background: url('../image/bg-sidebar.gif') top left no-repeat; width: 230px; height: 100%; position: absolute; left: 0; top: 0; color: #888; font-size: 11px; } #sidebar #sidebar-wrapper { margin: 0 0 0 9px; } #sidebar a, #sidebar a:active { color:#ccc; } #sidebar a:hover { color:#fff; } #sidebar #sidebar-title { margin: 40px 0 40px 15px; } #sidebar #logo { margin: 40px 0 40px 0; } #sidebar #profile-links { padding: 0 15px 20px 15px; text-align: right; line-height: 1.5em; } /************ Sidebar Accordion Menu ************/ #sidebar #main-nav { width: 206px; padding: 0; margin: 0 0 0 15px; font-family: Helvetica, Arial, sans-serif; } #sidebar #main-nav li { list-style: none; padding-bottom: 10px; text-align: right; } #sidebar #main-nav li a.nav-top-item { background: transparent url('../image/bg-menu-item-green.gif') right center no-repeat; /* Background image for default color scheme - green */ padding: 10px 15px; color: #fff; font-size: 14px; cursor: pointer; display: block; text-decoration: none; } #sidebar #main-nav li a.current { background-image: url('../image/bg-menu-item-current.gif') !important; color: #333; font-weight: bold; } #sidebar #main-nav li a.current:hover { color: #333; } #sidebar #main-nav ul { padding: 0; font-size: 12px; margin: 0; } #sidebar #main-nav ul li { list-style: none; margin: 0; text-align: right; padding: 0; } #sidebar #main-nav ul li a { padding: 8px 15px; display: block; color: #aaa; font-size: 13px; line-height: 1.2em; } #sidebar #main-nav ul li a:hover, #sidebar #main-nav ul li a.current, #sidebar #main-nav ul li a.current:hover { color: #fff; } #sidebar #main-nav ul li a.current { background: transparent url('../image/menu-current-arrow.gif') right center no-repeat !important; } /************ Messages ************/ #messages p, #messages form { border-top: 1px solid #ddd; padding: 10px 0; } #messages h4 { padding: 10px 0; } #messages fieldset { margin: 0; } #messages textarea { margin: 0 0 15px 0; } /******************************** Main Content ********************************/ /************ Layout ************/ #main-content { margin: 0 30px 0 260px; padding: 40px 0 0 0; } .column-left { width: 48%; float: left; } .column-right { width: 48%; float: right; } #page-intro { font-size: 17px; padding: 0 0 20px 0; } #footer { border-top: 1px solid #ccc; margin: 40px 0 0 0; padding: 20px 0; font-size: 12px; } /************ Lists ************/ #main-content ul, #main-content ol { padding: 10px 0; } /* Unordered List */ #main-content ul li { background: url('../image/icons/bullet_black.png') center left no-repeat; padding: 4px 0 4px 20px; } /* Ordered List */ #main-content ol { padding: 0 0 0 24px; } #main-content ol li { list-style: decimal; padding: 4px 0; } /*************** Content Box ***************/ .content-box { border: 1px solid #ccc; margin: 0 0 20px 0; background: #fff; } .content-box-header { background: #e5e5e5 url('../image/bg-content-box.gif') top left repeat-x; margin-top: 1px; height: 40px; } .content-box-header h3 { padding: 12px 15px 10px; float: left; } ul.content-box-tabs { float: right; padding: 12px 15px 0 0 !important; margin: 0 !important; } ul.content-box-tabs li { float: left; margin: 0; padding: 0 !important; background-image: none !important; } ul.content-box-tabs li a { color: #333; padding: 8px 10px; display: block; margin: 1px; border-bottom: 0; } ul.content-box-tabs li a:hover { color: #57a000; } ul.content-box-tabs li a.current { background: #fff; border: 1px solid #ccc; border-bottom: 0; margin: 0; } .content-box-content { padding: 20px; font-size: 13px; border-top: 1px solid #ccc; } /************ Table ************/ #main-content table { width: 100%; border-collapse: collapse; } #main-content table thead th { font-weight: bold; font-size: 15px; border-bottom: 1px solid #ddd; } #main-content tbody { border-bottom: 1px solid #ddd; } #main-content tbody tr { background: #fff; } #main-content tbody tr.alt-row { background: #f3f3f3; } #main-content table td, #main-content table th { padding: 10px; line-height: 1.3em; } #main-content table tfoot td .bulk-actions { padding: 15px 0 5px 0; } #main-content table tfoot td .bulk-actions select { padding: 4px; border: 1px solid #ccc; } /*************** Pagination ***************/ #main-content .pagination { text-align: right; padding: 20px 0 5px 0; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; } .pagination a { margin: 0 5px 0 0; padding: 3px 6px; } .pagination a.number { border: 1px solid #ddd; } .pagination a.current { background: #469400 url('../image/bg-button-green.gif') top left repeat-x !important; border-color: #459300 !important; color: #fff !important; } .pagination a.current:hover { text-decoration: underline; } /************ Shortcut Buttons ************/ .shortcut-button { border: 1px solid #ccc; background: #f7f7f7 url('../image/shortcut-button-bg.gif') top left no-repeat; display: block; width: 120px; margin: 0 0 20px 0; } .shortcut-button span { border: 1px solid #fff; display:block; padding: 15px 10px 15px 10px; text-align: center; color: #555; font-size: 13px; line-height: 1.3em; } .shortcut-button span img { margin-bottom: 10px; } .shortcut-button:hover { background: #fff; } .shortcut-button span:hover { color: #57a000; } ul.shortcut-buttons-set li { float: left; margin: 0 15px 0 0; padding: 0 !important; background: 0; } /*************** Forms ***************/ form label { display: block; padding: 0 0 10px; font-weight: bold; } form fieldset legend { font-weight: bold; margin-bottom: 10px; padding-top: 10px; } form p small { font-size: 0.75em; color: #777; } form input.text-input, form select, form textarea, form .wysiwyg { padding: 6px; font-size: 13px; background: #fff url('../image/bg-form-field.gif') top left repeat-x; border: 1px solid #d5d5d5; color: #333; } form .small-input { width: 25% !important; } form .medium-input { width: 50% !important; } form .large-input { width: 97.5% !important; font-size: 16px !important; padding: 8px !important; } form textarea { /* width: 97.5% !important;*/ font-family: Arial, Helvetica, sans-serif; } form select { padding: 4px; background: #fff; } form input[type="checkbox"], form input[type="radio"] { padding: 0; background: none; border: 0; } /*************** Notifications ***************/ .notification { position: relative; margin: 0 0 15px 0; padding: 0; border: 1px solid; background-position: 10px 11px !important; background-repeat: no-repeat !important; font-size: 13px; width: 99.8%; } .attention { background: #fffbcc url('../image/icons/exclamation.png') 10px 11px no-repeat; border-color: #e6db55; color: #666452; } .information { background: #dbe3ff url('../image/icons/information.png'); border-color: #a2b4ee; color: #585b66; } .success { background: #d5ffce url('../image/icons/tick_circle.png'); border-color: #9adf8f; color: #556652; } .error { background: #ffcece url('../image/icons/cross_circle.png'); border-color: #df8f8f; color: #665252; } .notification div { display:block; font-style:normal; padding: 10px 10px 10px 36px; line-height: 1.5em; } .notification .close { color:#990000; font-size:9px; position:absolute; right:5px; top:5px; } /* Notification for form inputs */ .input-notification { background-position: left 2px; background-repeat: no-repeat; padding: 2px 0 2px 22px; background-color: transparent; margin: 0 0 0 5px; } /* Notification for login page */ #login-wrapper #login-content .notification { border: 0; background-color: #141414; color: #fff !important; } /******************************** Login Page ********************************/ body#login { color: #fff; background: #222 url('../image/bg-login.gif'); } #login-wrapper { background: url('../image/bg-login-top.png') top left repeat-x; } #login-wrapper #login-top { width: 100%; padding: 110px 0 80px 0; text-align: center; } #login-wrapper #login-content { text-align: left; width: 300px; margin:0 auto; } #login-wrapper #login-content label { color: #fff; font-weight: normal; font-size: 14px; font-family: Helvetica, Arial, sans-serif; float: left; width: 70px; padding: 0; } #login-wrapper #login-content input { width: 200px; float: right; margin: 0 0 20px 0; border: 0; background: #fff; } #login-wrapper #login-content p { padding: 0; } #login-wrapper #login-content p#remember-password { float: right; } #login-wrapper #login-content p#remember-password input { float: none; width: auto; border: 0; background: none; margin: 0 10px 0 0; } #login-wrapper #login-content p .button { width: auto; margin-top: 20px; } /******************************** jQuery plugins styles ********************************/ /*************** Facebox ***************/ #facebox .b { background:url(../image/b.png); } #facebox .tl { background:url(../image/tl.png); } #facebox .tr { background:url(../image/tr.png); } #facebox .bl { background:url(../image/bl.png); } #facebox .br { background:url(../image/br.png); } #facebox { position: absolute; top: 0; left: 0; z-index: 100; text-align: left; } #facebox .popup { position: relative; } #facebox table { border-collapse: collapse; } #facebox td { border-bottom: 0; padding: 0; } #facebox .body { padding: 10px; background: #fff; width: 370px; } #facebox .loading { text-align: center; } #facebox .image { text-align: center; } #facebox img { border: 0; margin: 0; } #facebox .footer { border-top: 1px solid #DDDDDD; padding-top: 5px; margin-top: 10px; text-align: right; } #facebox .tl, #facebox .tr, #facebox .bl, #facebox .br { height: 10px; width: 10px; overflow: hidden; padding: 0; } #facebox_overlay { position: fixed; top: 0px; left: 0px; height:100%; width:100%; } .facebox_hide { z-index:-100; } .facebox_overlayBG { background-color: #000; z-index: 99; } /*************** jQuery WYSIWYG ***************/ div.wysiwyg { border: 1px solid #cccccc; padding: 5px; background-color: #ffffff; width: 97.5% !important; } div.wysiwyg * { margin: 0; padding: 0; } div.wysiwyg ul.panel { border-bottom: 1px solid #cccccc; float: left; width: 100%; padding: 0 0 5px 0; } div.wysiwyg ul.panel li { list-style-type: none; float: left; margin: 0 2px; padding: 0 !important; background: #ffffff; background-image: none !important;} div.wysiwyg ul.panel li.separator { height: 16px; margin: 0 4px; border-left: 1px solid #cccccc; } div.wysiwyg ul.panel li a { display: block; padding: 0 !important; width: 16px; height: 16px; background: url('../image/icons/jquery.wysiwyg.gif') no-repeat -64px -80px; border: 0; cursor: pointer; padding: 1px; } div.wysiwyg ul.panel li a:hover, div.wysiwyg ul.panel li a.active { } div.wysiwyg ul.panel li a.active { background-color: #f9f9f9; border: 1px solid #cccccc; border-left-color: #aaaaaa; border-top-color: #aaaaaa; padding: 0; } div.wysiwyg ul.panel li a.bold { background-position: 0 -16px; } div.wysiwyg ul.panel li a.italic { background-position: -16px -16px; } div.wysiwyg ul.panel li a.strikeThrough { background-position: -32px -16px; } div.wysiwyg ul.panel li a.underline { background-position: -48px -16px; } div.wysiwyg ul.panel li a.justifyLeft { background-position: 0 0; } div.wysiwyg ul.panel li a.justifyCenter { background-position: -16px 0; } div.wysiwyg ul.panel li a.justifyRight { background-position: -32px 0; } div.wysiwyg ul.panel li a.justifyFull { background-position: -48px 0; } div.wysiwyg ul.panel li a.indent { background-position: -64px 0; } div.wysiwyg ul.panel li a.outdent { background-position: -80px 0; } div.wysiwyg ul.panel li a.subscript { background-position: -64px -16px; } div.wysiwyg ul.panel li a.superscript { background-position: -80px -16px; } div.wysiwyg ul.panel li a.undo { background-position: 0 -64px; } div.wysiwyg ul.panel li a.redo { background-position: -16px -64px; } div.wysiwyg ul.panel li a.insertOrderedList { background-position: -32px -48px; } div.wysiwyg ul.panel li a.insertUnorderedList { background-position: -16px -48px; } div.wysiwyg ul.panel li a.insertHorizontalRule { background-position: 0 -48px; } div.wysiwyg ul.panel li a.h1 { background-position: 0 -32px; } div.wysiwyg ul.panel li a.h2 { background-position: -16px -32px; } div.wysiwyg ul.panel li a.h3 { background-position: -32px -32px; } div.wysiwyg ul.panel li a.h4 { background-position: -48px -32px; } div.wysiwyg ul.panel li a.h5 { background-position: -64px -32px; } div.wysiwyg ul.panel li a.h6 { background-position: -80px -32px; } div.wysiwyg ul.panel li a.cut { background-position: -32px -64px; } div.wysiwyg ul.panel li a.copy { background-position: -48px -64px; } div.wysiwyg ul.panel li a.paste { background-position: -64px -64px; } div.wysiwyg ul.panel li a.increaseFontSize { background-position: -16px -80px; } div.wysiwyg ul.panel li a.decreaseFontSize { background-position: -32px -80px; } div.wysiwyg ul.panel li a.createLink { background-position: -80px -48px; } div.wysiwyg ul.panel li a.insertImage { background-position: -80px -80px; } div.wysiwyg ul.panel li a.html { background-position: -48px -48px; } div.wysiwyg ul.panel li a.removeFormat { background-position: -80px -64px; } div.wysiwyg ul.panel li a.empty { background-position: -64px -80px; } div.wysiwyg iframe { border: 0; margin: 5px 0 0 0; clear: left; width: 97.5% !important; }
zysms
trunk/zysms/admin/theme/default/css/style.css
CSS
asf20
21,966
.button, #main-content table tfoot td .bulk-actions select, .pagination a.number, form input.text-input, form textarea, form .wysiwyg, form select, .dp-popup { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .content-box, .content-box-header, ul.content-box-tabs li a.current, .shortcut-button, .notification { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; } .content-box-header { -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .closed-box .content-box-header { -moz-border-radius-bottomleft: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-left-radius: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } ul.content-box-tabs li a.current { -moz-border-radius-bottomleft: 0; -moz-border-radius-bottomright: 0; -webkit-border-bottom-left-radius: 0; -webkit-border-bottom-right-radius: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; } .shortcut-button span { -moz-border-radius: 7px; -webkit-border-radius: 7px; border-radius: 7px; } div.wysiwyg ul.panel li a { opacity: 0.6; } div.wysiwyg ul.panel li a:hover, div.wysiwyg ul.panel li a.active { opacity: 0.99; }
zysms
trunk/zysms/admin/theme/default/css/invalid.css
CSS
asf20
1,861
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, /* Eric Meyer's Reset Stylesheet: http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */ small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } /* remember to define focus styles! */ :focus { outline: 0; } body { line-height: 1; color: black; background: white; } ol, ul { list-style: none; } /* tables still need 'cellspacing="0"' in the markup */ table { border-collapse: separate; border-spacing: 0; } caption, th, td { text-align: left; font-weight: normal; } blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; }
zysms
trunk/zysms/admin/theme/default/css/reset.css
CSS
asf20
1,079
/*styles for jquery ui daterangepicker plugin */ .ui-daterangepickercontain { position: absolute; z-index: 999; } .ui-daterangepickercontain .ui-daterangepicker { float: left; padding: 5px !important; width: auto; display: inline; background-image: none !important; clear: left; } .ui-daterangepicker ul, .ui-daterangepicker .ranges, .ui-daterangepicker .range-start, .ui-daterangepicker .range-end { float: left; padding: 0; margin: 0; } .ui-daterangepicker .ranges { width: auto; position: relative; padding: 5px 5px 40px 0; margin-left: 10px; } .ui-daterangepicker .range-start, .ui-daterangepicker .range-end { margin-left: 5px; } .ui-daterangepicker button.btnDone { margin: 0 5px 5px 0; position: absolute; bottom: 0; right: 0; clear: both; cursor: pointer; font-size: 1.1em; } .ui-daterangepicker ul { width: 17.6em; background: none; border: 0; } .ui-daterangepicker li { list-style: none; padding: 1px; cursor: pointer; margin: 1px 0; } .ui-daterangepicker li.ui-state-hover, .ui-daterangepicker li.ui-state-active { padding: 0; } .ui-daterangepicker li.preset_0 { margin-top: 1.5em !important; } .ui-daterangepicker .ui-widget-content a { text-decoration: none !important; } .ui-daterangepicker li a { font-weight: normal; margin: .3em .5em; display: block; } .ui-daterangepicker li span { float: right; margin: .3em .2em; } .ui-daterangepicker .title-start, .ui-daterangepicker .title-end { display: block; margin: 0 0 .2em; font-size: 1em; padding: 0 4px 2px; } .ui-daterangepicker .ui-datepicker-inline { font-size: 1em; } .ui-daterangepicker-arrows { padding: 2px; width: 204px; position: relative; } .ui-daterangepicker-arrows input.ui-rangepicker-input { width: 158px; margin: 0 2px 0 20px; padding: 2px; height: 1.1em; } .ui-daterangepicker-arrows .ui-daterangepicker-prev, .ui-daterangepicker-arrows .ui-daterangepicker-next { position: absolute; top: 2px; padding: 1px; } .ui-daterangepicker-arrows .ui-daterangepicker-prev { left: 2px; } .ui-daterangepicker-arrows .ui-daterangepicker-next { right: 2px; } .ui-daterangepicker-arrows .ui-daterangepicker-prev:hover, .ui-daterangepicker-arrows .ui-daterangepicker-next:hover, .ui-daterangepicker-arrows .ui-daterangepicker-prev:focus, .ui-daterangepicker-arrows .ui-daterangepicker-next:focus { padding: 0; }
zysms
trunk/zysms/admin/theme/default/css/ui.daterangepicker.css
CSS
asf20
2,438
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: template.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/template.php
PHP
asf20
252
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require('../include/init.php'); $view_file="credit.tpl"; $method = $_GET['method']; $login=new login(); /* $news=$login->checkLogined(); if(!$news==true) { header("location:login.php"); } */ if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "credit.tpl"; } if ($method === 'update') { $method = 'update'; update(); $lang_method = $_LANG['UPDATE']; $view_file = "credit.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "credit.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "credit.tpl"; } if($method==='updateForward'){ $method = 'update'; selectID(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "credit.tpl"; } /* * 获取管理员信息 * */ function getContent(){ $credit = new credit(); if(isset($_POST['submit'])){ $credit->credit_id=$_POST['credit_id']; $credit->credit_name=$_POST['credit_name']; $credit->credit_volume=$_POST['credit_volume']; $credit->credit_price = $_POST['credit_price']; $credit->credit_currency=$_POST['credit_currency']; $credit->credit_sort=$_POST['credit_sort']; $credit->credit_status=$_POST['credit_status']; $credit->credit_remark=$_POST['credit_remark']; }else{ $credit->credit_id=$_GET['credit_id']; } return $credit; } /* * 查询钱包信息 * */ function select() { $credit = new credit(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; //$rs =$credit->queryCredit(); $total =$credit->countCredit(); //$totle =mysql_num_rows($rs); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item = $credit->queryCredit(); global $smarty; $smarty ->assign("item", $item); $smarty ->assign("obj", $credit); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } /* * 根据ID查询钱包信息 * */ function selectID() { $credit = getContent(); $creditObj = $credit->queryCreditId(); global $smarty; $smarty ->assign("obj",$creditObj); } /* * * 添加用户信息 */ function add(){ $credit = getContent(); $message=$credit->addCredit(); if($message[0]=="") { header("location:credit.php"); } else { global $smarty; global $_LANG; if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } /* * 删除用户信息 * */ function delete() { $credit = getContent(); $credit->deleteCredit(); header("location:credit.php"); } /* * 修改用户类 * */ function update() { $credit = getContent(); $message=$credit->updateCredit(); if($message[0]=="") { header("location:credit.php"); } else { global $smarty; global $_LANG; if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } $smarty->assign("method",$method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/credit.php
PHP
asf20
3,982
<?php /* * Created on 2011-10-12 *====================================== *Author: Allen *Project:health360 *File: login.php *Date: 2011-10-12 *====================================== *TODO *@param @type @var @note */ require('../include/init.php'); //是否登陆 if(isset($_SESSION['user']['admin'])){ header("location:index.php"); } $view_file="admin_login.tpl"; $method = $_GET['method']; if ($method === 'check') { checkLogin(); $lang_method = $_LANG['ADD']; $view_file = "admin_login.tpl"; } if($method === 'out') { out(); } /* * 获取管理员信息 * */ function getAdminContent(){ $login = new login(); if(isset($_POST['submit'])){ if(isset($_POST['admin_login_name'])){ $login->admin_login_name=$_POST['admin_login_name']; } if(isset($_POST['admin_login_password'])){ $login->admin_login_password=$_POST['admin_login_password']; } if(isset($_POST['group'])){ $login->group=$_POST['group']; } }else{ $login->admin_id=$_GET['admin_id']; } return $login; } function checkLogin() { $login = getAdminContent(); $message=$login->check(); global $smarty; global $_LANG; if($message[0]=="") { $smarty ->assign("user",$_SESSION['user']); header("location:index.php"); } else { if($message[0]==1){ $smarty ->assign("login_name_error_message",$_LANG['ERROR_USER_PASSWORD_MESSAGE']); }else if($message[0]==2){ $smarty ->assign("password_error_message",$_LANG['ERROR_PASSWORD_MESSAGE']); } } } /*退出后台*/ function out() { unset($_SESSION['user']['admin']); header("location:login.php"); } $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/login.php
PHP
asf20
1,825
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $method = $_GET['method']; global $view_file; if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'update') { $method = 'update'; contactUpdate(); $lang_method = $_LANG['UPDATE']; $view_file = "contact_list.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "contact_list.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "contact_list.tpl"; } if ($method === 'updateForward') { $method = 'update'; selectSingleContactList(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "contact_list.tpl"; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "contact_list.tpl"; } /** * 获取表单修改信息 */ function getField() { $contact = new contact(); if (isset ($_POST['submit'])) { $contact->contact_list_id=$_POST['contact_list_id']; $contact->contact_list_name=$_POST['contact_list_name']; $contact->contact_list_count=0; $contact->agent_id=0; if(empty($_SESSION['user']['admin']->company_id)){ $contact->company_id=0; $contact->department_id=0; $contact->user_id=0; } $contact->contact_list_create_time=date('Y-m-d H:i:m'); $contact->contact_list_update_time=date('Y-m-d H:i:m'); $contact->contact_list_remark=$_POST['contact_list_remark']; }else{ $contact->contact_list_id=$_GET['contact_list_id']; } return $contact; } /** * 添加公司信息 */ function add() { $contact = getField(); $company_id=$contact->addContact(); header("location:contact_list.php"); } /*查询所有公司*/ function select() { $contact = new contact(); if(isset($_GET['page'])) { $pages = $_GET['page']; } else { $pages = 1; } $GLOBALS['pages'] = $pages; $page = new page($pages); $GLOBALS['page']=$page; $total =$contact->countContact(); $GLOBALS['page']->pageft($total,$GLOBALS['displaypg']); $item=$contact->queryAdminContact(); global $smarty; $smarty->assign("item", $item); $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); } /*删除一条记录*/ function delete(){ $contact = getField(); $contact->deleteContact(); header("location:contact_list.php"); } /*查询单个contact list记录*/ function selectSingleContactList(){ $contact = getField(); $contactObj=$contact->ADepartmentInquires(); global $smarty; $smarty ->assign("contactObj",$contactObj); } /* * 修改一条联系人列表记录 * */ function contactUpdate(){ $contact = getField(); $contact->updateContact(); header("location:contact_list.php"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/contact_list.php
PHP
asf20
3,332
<?php /* * Created on 2011-8-28 *====================================== *Author: Allen *Project:health360 *File: index.php *Date: 2011-8-28 *====================================== */ require('../include/init.php'); $method = $_GET['method']; $login=new login(); $news=$login->checkLogined(); if (empty ($method)) { $lang_method = $_LANG['ADD']; $method = 'select'; } if ($method === 'select') { select(); $lang_method = $_LANG['ADD']; $view_file = "category.tpl"; } if ($method === 'update') { $method = 'update'; update(); $lang_method = $_LANG['UPDATE']; $view_file = "category.tpl"; } if ($method === 'delete') { delete(); $lang_method = $_LANG['ADD']; } if ($method === 'add') { add(); $lang_method = $_LANG['ADD']; $view_file = "category.tpl"; } if ($method === 'addForward') { $lang_method = $_LANG['ADD']; $method='add'; select(); $view_file = "category.tpl"; } if($method==='updateForward'){ $method = 'update'; selectID(); select(); $lang_method = $_LANG['UPDATE']; $view_file = "category.tpl"; } /* * 获取表单信息 * * */ function getFormContent() { $category = new category(); if(isset($_POST['submit'])) { if (isset($_POST['category_id'])) { $category ->category_id = $_POST['category_id']; } if (isset($_POST['category_name'])) { $category->category_name = $_POST['category_name']; } if (isset($_POST['category_remark'])) { $category->category_remark = $_POST['category_remark']; } $category->category_parent_id = 0; $category->category_sort = 10; } else { $category->category_id=$_GET['category_id']; } return $category; } /** * 添加视频分类信息 */ function add() { $category = getFormContent(); $category->addCategory(); header("location:category.php"); } /* * 查询视频分类信息 * */ function select() { $category = new category(); $item = $category->queryCategory(); global $smarty; $smarty ->assign("item", $item); } /* * 根据ID查询视频分类信息 * */ function selectID() { $category = getFormContent(); $categoryObj = $category->queryCategoryID(); global $smarty; $smarty ->assign("categoryObj", $categoryObj); } /* * 删除视频分类信息 * */ function delete() { $category = getFormContent(); $category ->deleteCategory(); header("location:category.php"); } /* * 修改视频分类 * */ function update() { $category = getFormContent(); $category ->updateCategory(); header("location:category.php"); } $smarty->assign("method", $method); $smarty->assign("lang_method", $lang_method); //分页 // $smarty->assign("nextpage",$GLOBALS['page']->getPagenav()); $smarty->display(admin_display($view_file)); ?>
zysms
trunk/zysms/admin/category.php
PHP
asf20
2,973
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: payment.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/admin/payment.php
PHP
asf20
251
<?php /* * Created on 2011-9-5 *====================================== *Author: Allen *Project:health360 *File: company.php *Date: 2011-9-5 *====================================== *TODO *@param @type @var @note */ require ('../include/init.php'); $result = array ( "status" => "fail", "message" => "" ); $method = $_REQUEST['method']; if (empty ($method)) { $result["status"] = "fail"; $result["message"] = "no method"; } if ($method == "sendMessages") { $result = sendMessages($result); } function sendMessages($result) { $start_time = date(TIME_FORMAT); $api_class = new api_class(); $api_class->mobile = $_REQUEST['mobile']; $api_class->username = $_REQUEST['username']; $api_class->password = $_REQUEST['password']; $api_class->api_id = $_REQUEST['api_id']; $api_class->text = $_REQUEST['text']; //先根据短信内容计算credit. if ($api_class->text != "") { //根据短信内容计算花费的credit. $api_class->cost = countCharacters($api_class->text); if (preg_match('/[\x80-\xff]./', $api_class->text)) { //中文,全部专程unicode码 $api_class->text=getUnicode($api_class->text); $unicode=1; }else{ //是英文的话再把空格转换下. $api_class->text = str_replace(' ', '%20', $_REQUEST['text']); $message->message_content = ereg_replace(Chr(10), '%0A',$message->message_content); $message->message_content = ereg_replace(Chr(13), '',$message->message_content); } } $api = $api_class->checkAPI(); if (!$api) { $result["status"] = "fail"; $result["message"] = "params error"; } else { $mobile_arr = explode(",", $api_class->mobile); //print_r($mobile_arr); if ($api->balance < count($mobile_arr) * $api_class->cost) { $result["status"] = "fail"; $result["message"] = "no enough bulance"; } else { $success_list = ""; //成功列表 $fail_list = ""; //失败列表 $success_count = 0; //成功发送次数 $fail_count = 0; //失败发送次数 //循环发送短信 for ($i = 0; $i < count($mobile_arr); $i++) { if ($mobile_arr[$i] == "") { continue; } $mobile_arr[$i] = formatMobile($mobile_arr[$i]); $url = "http://api.clickatell.com/http/sendmsg?user=" . $api->api_username . "&password=" . $api->api_password . "&api_id=" . $api->api_id . "&to=" . $mobile_arr[$i] . "&text=" . $api_class->text . "&concat=" . $api_class->cost; if ($api->api_type == 1) { $url .= "&from=" . $api->sender_name; } //如果短信内容包含中文,需要加unicode=1 if ($unicode==1) { $url .= "&unicode=1"; } //echo $url . "<br />"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $content= curl_exec($ch); curl_close($ch); //判断返回的内容是否包含ID if (strpos($content, "ID:") !== false) { //发送成功 if ($success_count == 0) { $success_list = "[" . $mobile_arr[$i] . "]"; } else { $success_list .= ",[" . $mobile_arr[$i] . "]"; } $success_count++; } else { //发送失败 $message->sms_record_remark = $content; if ($fail_count == 0) { $fail_list = "[" . $mobile_arr[$i] . "]"; } else { $fail_list .= ",[" . $mobile_arr[$i] . "]"; } $fail_count++; } } $message = new message(); $message->api_id = $api->api_id; $message->sms_record_time = date(TIME_FORMAT); $message->sms_success_list = $success_list; $message->sms_fail_list = $fail_list; $message->sms_success_count = $success_count; $message->sms_fail_count = $fail_count; $message->sms_content = $api_class->text; $message->user_id = $api->user_id; $message->company_id = $api->company_id; $message->department_id = $api->department_id; $end_time = date(TIME_FORMAT); $message->sms_record_remark .= "start at " . $start_time . "; end at " . $end_time; $company = new company(); $company->company_id = $api->company_id; $company->deductBalance($message->sms_success_count * $api_class->cost); $message->sendMessage(); $result["status"] = "success"; $result["message"] = "success:" . $success_count . ",fail:" . $fail_count; } } return $result; } $callBack = $_REQUEST['callbackFunction']; if ($callBack != "") { $return = $callBack . "(" . json_encode($result) . ")"; } else { $return = json_encode($result); } /* function formatMobile($mobile){ echo $mobile; $paten=^\d{11}$; die(); }*/ // $return = json_encode($result); //while (@ob_end_clean()); // header('Cache-Control: no-cache'); //header('Content-type: application/json'); print_r($return); function countCharacters($text) { $length = mb_strlen($text); $credit = 1; if (preg_match('/[\x80-\xff]./', $text)) { //中文计算短信条数的方法 if ($length <= 70) { $credit = 1; } else if ($length > 70 && $length <= 134) { $credit = 2; } else if ($length > 134 && $length <= 201) { $credit = 3; } else if ($length > 201&& $length <= 268) { $credit = 4; } else if ($length > 268) { $credit = 5;//最长335 } } else { //英文计算短信条数的方法 if ($length <= 160) { $credit = 1; } else if ($length > 160 && $length <= 306) { $credit = 2; } else if ($length > 306 && $length <= 459) { $credit = 3; } else if ($length > 459 && $length <= 612) { $credit = 4; } else if ($length > 612) { $credit = 5; } } return $credit; } function formatMobile($mobile) { $length = mb_strlen($mobile); $aus = substr($mobile, 0, 2); $tt = substr($mobile, 1, $length); if ($aus == "04") { $mobile = "61" . substr($mobile, 1, $length -1); } return $mobile; } function getUnicode($word){ $word0 = iconv('gbk', 'utf-8', $word); $word1 = iconv('utf-8', 'gbk', $word0); $word = ($word1 == $word) ? $word0 : $word; // 拆分汉字 preg_match_all('#(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+)#s', $word, $array, PREG_PATTERN_ORDER); foreach ($array[0] as $cc) { if(preg_match('/[\x80-\xff]./', $cc)){ $arr = str_split($cc); $bin_str = ''; foreach ($arr as $value) { $bin_str .= decbin(ord($value)); } $bin_str = preg_replace('/^.{4}(.{4}).{2}(.{6}).{2}(.{6})$/','$1$2$3', $bin_str); $return[] = dechex(bindec($bin_str)); //echo $cc."是中文"."<br />"; }else{ //$return[] =bindec($cc); $arr = str_split($cc); $bin_str = ''; foreach ($arr as $value) { $bin_str .= decbin(ord($value)); } $str=dechex(bindec($bin_str)); if(strlen($str)<4){ for($i=strlen($str);$i<4;$i++){ $str="0".$str; } } $return[] = $str; //echo $cc."不是中文"."<br />"; } } return implode('', $return); } ?>
zysms
trunk/zysms/api/sendMessage.php
PHP
asf20
7,109
<?php /** * Author:Arthur * Date:2013-2-20 * File Name:receiveDetails.php * Email:kingarthurx@sina.cn */ session_start(); /* 取得当前project所在的根目录 */ define('ROOT_PATH', str_replace('api/receiveValidation.php', '', str_replace('\\', '/', __FILE__))); require(ROOT_PATH . 'config/config.php'); /* 载入MYSQL,初始化 */ require(ROOT_PATH . 'include/class/mysql_class.php'); $mysql=new MYSQL($db_host,$db_user, $db_pass, $db_name); $GLOBALS['mysql']=$mysql; require (ROOT_PATH . 'include/class/receiveValidation_class.php'); /*八优API*/ require(ROOT_PATH . 'include/class/BayouSmsSender.php'); /*短信发送*/ require(ROOT_PATH . 'include/class/message_class.php'); /*短信发送*/ require(ROOT_PATH . 'include/class/reply_history_class.php'); $method = $_REQUEST['method']; if (empty($method)) { $method = 'info'; } if($method == 'info'){ info(); } if($method == 'sendsms'){ $valid=userValidation(); if($valid == 'ok'){ $info = sendsms(); if(!empty($info)){ print_r($info); } }else{ echo $valid; } } if($method == 'getReply'){ $valid=userValidation(); if($valid == 'ok'){ $text = getReply(); if(!empty($text)){ print_r($text); } }else{ echo $valid; } } /** * 获取信息,为属性设置值 */ function getField(){ $receiveValidation = new receiveValidation(); $receiveValidation->user_login_name=$_REQUEST['username']; $receiveValidation->user_login_password=$_REQUEST['password']; $receiveValidation->mobile=$_REQUEST['mobiles']; $receiveValidation->msgcount = $_REQUEST['msgcount']; $receiveValidation->encodetype = $_REQUEST['encodetype']; /** * 把短信内容进行两次URL编码转换 */ $receiveValidation->content=urlEncode(urlEncode(mb_convert_encoding($_REQUEST['message'], 'gb2312' ,'utf-8'))); return $receiveValidation; } /** * 验证用户名密码是否存在 */ function userValidation(){ $receiveValidation = getField(); $arr = $receiveValidation ->findUser(); if(!empty($arr->user_login_name)){ $arrx = $receiveValidation ->findUserPassword(); if(empty($arrx)){ return "密码不正确!"; }else{ $receiveValidation->company_id = $arrx->company_id; $apiArr = $receiveValidation ->findUserApi(); for($i = 0; $i < count($apiArr); $i++){ if(empty($apiArr[$i]->userapi_id)){ return "API不存在,请申请API!"; }else{ $_SESSION['usercustomer']=$arrx; $_SESSION['api']=$apiArr; } } } }else{ return "用户名不存在!"; } return "ok"; } /** * 发送短信 */ function sendsms(){ /** * 设置属性 */ $smstype = $_REQUEST['smstype']; if(empty($smstype)){ $smstype =0; } $timerflag = $_REQUEST['timerflag']; if(empty($timerflag)){ $timerflag=0; } $timervalue = $_REQUEST['timervalue']; $timertype = $_REQUEST['timertype']; if(empty($timertype)){ $timertype=0; } $timerid = $_REQUEST['timerid']; if(empty($timerid)){ $timerid=0; } $extno = $_REQUEST['extno']; $start_time=date(TIME_FORMAT); $success_list="";//成功列表 $fail_list="";//失败列表 $success_count=0;//成功发送次数 $fail_count=0;//失败发送次数 $receiveValidation = getField(); //先拿到号码 $mobileArr = explode(",",$receiveValidation->mobile); /** * 200发一次短信,并且去掉重复号码 */ for($i=0;$i<count(array_unique($mobileArr));$i++){ //短信按照200一截进行批量发送. if(trim($mobileArr[$i])!=""){ if($i%200==0){ if(count($mobileArr)>1){ $mobile_list=$mobileArr[$i].","; continue ; }else{ $mobile_list=$mobileArr[$i]; } }else if($i%200!=199&&$i<count($mobileArr)-1){ $mobile_list.=$mobileArr[$i].","; continue ; }else{ $mobile_list.=$mobileArr[$i]; } }else{ continue ; } /** * 获取短信长度,扣除相应的短信条数 */ $count = countCharacters($receiveValidation->content); if($count == "5"){ $reText = "短讯长度最多是5条内容!"; }else{ /** * 短信发送成功后,给对象中设置值,扣除相应的短信条数 */ $receiveValidation->company_id=$_SESSION['usercustomer']->company_id; /*短信發送數*/ $receiveValidation->balance=count(array_unique($mobileArr)) * $count; $arr = $receiveValidation->findInfo(); /*判断短信发送条数*/ if($receiveValidation->balance > $arr->balance){ $balance = "对不起,余额不够发送短信,只能够发送".$arr->balance."条短信!"; }else{ //根据获取的短信内容和联系人列表,发送短信 if($receiveValidation->content==""||trim($receiveValidation->content)==""){ $txts ="短信內容不能為空!"; }else{ //根据短信内容计算花费的credit. $message->cost=countCharacters($receiveValidation->content); if (preg_match('/[\x80-\xff]./', $receiveValidation->content)) { /** * 把短信内容进行两次URL编码转换 */ $receiveValidation->content = urlEncode(urlEncode(mb_convert_encoding($receiveValidation->content, 'gb2312' ,'utf-8'))); //$unicode=1; }else{ //是英文的话再把空格转换下. $receiveValidation->content = str_replace(' ', '%20',$receiveValidation->content); $receiveValidation->content = @ereg_replace(Chr(10), '%0A',$receiveValidation->content); $receiveValidation->content = @ereg_replace(Chr(13), '',$receiveValidation->content); } } $url = "http://sms.c8686.com/Api/BayouSmsApiEx.aspx"; $params="func=sendsms&username=".$_SESSION['api'][0]->api_username."&password=".$_SESSION['api'][0]->api_password."&mobiles=".$mobile_list."&message=".$receiveValidation->content."&smstype=$smstype&timerflag=$timerflag&timervalue=$timervalue&timertype=$timertype&timerid=$timerid&extno=$extno"; $method="POST"; $my_header=""; /** * 实例化 八优api 调用use_curl函数 发送短信 */ $BayouSmsSender = new BayouSmsSender(); $content =$BayouSmsSender->use_curl($url, $params, $method, $my_header);//返回的内容是一个数组 /** * 数组内的内容格式,是xml,需要解析,解析后,放入list */ //执行完成后需要做判断 //判断返回结果里是否包含回车,换行. //然后再根据回车换行进行数组分割. //最后判断每个号码的发送情况.从而生成success list和fail list. //$result_list=explode(Chr(10),$content['body']); $xml_string = $content['body']; $xml = simplexml_load_string($xml_string); //对象转换成数组,方便引用 $result_list = (array)$xml; //判断返回的内容errorcode 是否成功 if($result_list['errorcode']==0){ //发送成功 if($success_count==0){ $success_list=$mobile_list; }else{ $success_list.=",".$mobile_list; } $credit = $receiveValidation->updateInfo($arr->balance); $mobileArr = explode(",",$success_list); $success_count++; $alert="发送成功"; }else{ //发送失败 if($fail_count==0){ $fail_list=$mobile_list; }else{ $fail_list.=",".$mobile_list; } $mobileArr = explode(",",$fail_list); $fail_count++; $alert="发送失败"; } } } } /** * 记录每条短信的发送状态,如果短信数量支持发送,才记录到数据库当中 */ if($receiveValidation->balance <= $arr->balance){ $message = new Message(); for($k = 0; $k<count($mobileArr); $k++){ $message->api_id=$_SESSION['api'][0]->api_id; $message->sms_record_time=date(TIME_FORMAT); $message->sms_success_list=$mobileArr[$k]; $message->sms_fail_list=$fail_list; $message->sms_success_count=$success_count; $message->sms_fail_count=$fail_count; $message->sms_content=mb_convert_encoding(URLDecode(URLDecode($receiveValidation->content)),'utf-8','gb2312'); $message->user_id=$_SESSION['usercustomer']->user_id; $message->company_id=$_SESSION['usercustomer']->company_id; $message->department_id=$_SESSION['usercustomer']->department_id; $end_time=date(TIME_FORMAT); $message->sms_record_remark.=" start at ".$start_time."; end at ".$end_time; $message->sendMessage(); } } /*查询余额*/ $balances = $receiveValidation->findInfo(); /*設置返回信息*/ if(empty($reText)){ $reText=0; } $txt = $balance; if(empty($balance)){ $txt = $alert.",".$txts; } if($alert == "发送成功"){ $succeed=0; //0 为发送成功 }else{ $succeed=1; //1为发送失败 } /** * 返回信息 * balance : 剩余短信数 * sendFlashCount :发送短讯数量 * sendTime : 发送时间 * flashContent : 发送内容 * mobiles : 发送号码 * errordescription : 错误内容描述 * reText : 发送短讯最长长度 * succeed : 短信发送成功是否状态 */ $text["body"]='[{"balance":"'.$balances->balance.'"},{"sendFlashCount":"'.$receiveValidation->balance.'"},{"sendTime":"'.date(TIME_FORMAT).'"},{"flashContent":"'.mb_convert_encoding(URLDecode(URLDecode($receiveValidation->content)),'utf-8','gb2312').'"},{"mobiles":"'.$receiveValidation->mobile.'"},{"errordescription":"'.$txt.'"},{"reText":"'.$reText.'"},{"succeed":"'.$succeed.'"}]'; return array('body'=>$text["body"]); } /** * 计算消息内容数量 */ function countCharacters($text) { $length = mb_strlen($text); $credit = 1; if (preg_match('/[\x80-\xff]./', $text)) { //中文计算短信条数的方法 if ($length <= 66) { $credit = 1; } else if ($length > 66 && $length <= 132) { $credit = 2; } else if ($length > 132 && $length <= 198) { $credit = 3; } else if ($length > 198&& $length <= 264) { $credit = 4; } else if ($length > 264) { $credit = 5;//最长335 } } else { //英文计算短信条数的方法 if ($length <= 132) { $credit = 1; } else if ($length > 132 && $length <= 264) { $credit = 2; } else if ($length > 264 && $length <= 396) { $credit = 3; } else if ($length > 396 && $length <= 528) { $credit = 4; } else if ($length > 528) { $credit = 5; } } return $credit; } /** * 编码转换 */ function getUnicode($word){ $word0 = iconv('gbk', 'utf-8', $word); $word1 = iconv('utf-8', 'gbk', $word0); $word = ($word1 == $word) ? $word0 : $word; // 拆分汉字 preg_match_all('#(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+)#s', $word, $array, PREG_PATTERN_ORDER); foreach ($array[0] as $cc) { if(preg_match('/[\x80-\xff]./', $cc)){ $arr = str_split($cc); $bin_str = ''; foreach ($arr as $value) { $bin_str .= decbin(ord($value)); } $bin_str = preg_replace('/^.{4}(.{4}).{2}(.{6}).{2}(.{6})$/','$1$2$3', $bin_str); $return[] = dechex(bindec($bin_str)); //echo $cc."是中文"."<br />"; }else{ //$return[] =bindec($cc); $arr = str_split($cc); $bin_str = ''; foreach ($arr as $value) { $bin_str .= decbin(ord($value)); } $str=dechex(bindec($bin_str)); if(strlen($str)<4){ for($i=strlen($str);$i<4;$i++){ $str="0".$str; } } $return[] = $str; //echo $cc."不是中文"."<br />"; } } return implode('', $return); } /*提示不可缺少的参数*/ function info(){ echo "请在url上加上method=sendsms,才能发送短信!"; } /** * 获取回复短信内容 */ function getReply(){ $receiveValidation = getField(); $receiveValidation->company_id = $_SESSION['usercustomer']->company_id; $count = getServerReply($receiveValidation->msgcount,$receiveValidation->encodetype); if($count == '1'){ $smsarr = $receiveValidation->getReply(); }else if($count == '2'){ $tString = "未有新回复的短讯!"; } $txt=""; for($i = 0; $i < count($smsarr); $i++){ if(count($smsarr) - $i == 1){ $string = ""; }else{ $string = ","; } /** * mobile:电话号码 * destmobile:回复到号码(发短信出去的号码) * content:短讯内容 * time:回复时间 */ $txt.='[{"mobile":"'.$smsarr[$i]->mobile.'"},{"destmobile":"'.$smsarr[$i]->destmobile.'"},{"content":"'.$smsarr[$i]->content.'"},{"time":"'.$smsarr[$i]->time.'"}]'.$string; } /*返回提示*/ if(empty($txt)){ $reply['ret']=$tString; }else{ $reply['ret']=$txt; } return array('body'=>$reply["ret"]); } /** * 获取八优服务器内回复的内容 */ function getServerReply($msgcount,$encodetype){ $reply = new Reply(); $replyArr = $reply->getUserApi($_SESSION['usercustomer']->company_id); if(!empty($replyArr->api_username)){ //获取回复短信URL $url="http://sms.c8686.com/Api/BayouSmsApiEx.aspx?func=getreply&username=".$replyArr->api_username."&password=".$replyArr->api_password."&msgcount=$msgcount&encodetype=$encodetype"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); $content= curl_exec($ch); curl_close($ch); }else{ $str = "请申请API或检查您的账号密码是否正确."; return $str; } //解析平常的xml文件 //$xml = simplexml_load_string($xml_string); //解析带有cdata 的xml 文件 $xml = simplexml_load_string($content, 'SimpleXMLElement', LIBXML_NOCDATA); if(count($xml->reply->msg) > 0){ for($i = 0; $i < count($xml->reply->msg); $i++){ $reply->company_id = $_SESSION['usercustomer']->company_id; $reply->clientid = $replyArr->api_username; $reply->mobile = trim($xml->reply->msg[$i]->mobile); $reply->destmobile = $xml->reply->msg[$i]->destmobile; $reply->content = $xml->reply->msg[$i]->content; $reply->time = $xml->reply->msg[$i]->time; $reply->msg_type = 2; /** * 获取的回复内容插入到本地数据库 */ $reply ->insertReply(); } return "1"; //如果返回为1,说明有获取到新的回复短讯 }else{ return "2"; //如果返回为2,说明回复的短讯已经获取 } }
zysms
trunk/zysms/api/receiveValidation.php
PHP
asf20
14,407
<?php $method=$_REQUEST["method"]; $username=$_REQUEST["username"]; $password=$_REQUEST["password"]; $mobile=$_REQUEST["mobile"]; $api_id=$_REQUEST["api_id"]; $text=$_REQUEST["text"]; /* $method="sendMessages"; $username="abc"; $password="123456"; $mobile="8613855585327"; $api_id="8"; $text="12312312312321"; */ $post_data = array( 'method' => $method, 'username' => $username, 'password' =>$password, 'mobile' => $mobile, 'api_id' => $api_id, 'text' =>$text ); //$url="http://sms.webnova.com.au/api/sendMessage.php"; $url="http://localhost:8080/zy-sms/api/sendMessage.php"; $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url ); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,0); // 我们在POST数据哦! curl_setopt($ch, CURLOPT_POST, 1); // 把post的变量加上 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $output = curl_exec($ch); //调试使用 if ($output === FALSE) { $output="cURL Error: " . curl_error($ch); } curl_close($ch); if($output==null){ echo json_encode("error"); }else{ echo ($output); } ?>
zysms
trunk/zysms/api/webnova_sms_api_lib.php
PHP
asf20
1,141
<?php /** * Author:Arthur * Date:2013-2-20 * File Name:ZySmsSender.php * Email:kingarthurx@sina.cn */ class ZySmsSender{ /** * 发送短信URL * http://192.168.1.88:8080/zy-bysms/Api/receiveValidation.php?method=sendsms&username=zhengff&password=123456 * &mobiles=18055538313&message=%E5%8F%91&smstype=0&timerflag=0&timervalue=&timertype=0&timerid=0 */ /** * 脚本执行时间。-1表示采用PHP的默认值。 * * @access private * @var integer $time_limit */ var $time_limit = -1; /** * 在多少秒之内,如果连接不可用,脚本就停止连接。-1表示采用PHP的默认值。 * * @access private * @var integer $connect_timeout */ var $connect_timeout = -1; /** * 连接后,限定多少秒超时。-1表示采用PHP的默认值。此项仅当采用CURL库时启用。 * * @access private * @var integer $stream_timeout */ var $stream_timeout = -1; /** * 是否使用CURL库来连接。false表示采用fsockopen进行连接。 * * @access private * @var boolean $use_curl */ var $use_curl = false; //调用例子,在最下面,仅供参考调用 public function sendsms($username,$password,$mobiles,$msg) { $apidata="method=sendsms&username=$username&password=$password&mobiles=$mobiles&message=$msg&smstype=0&timerflag=0&timervalue=&timertype=0&timerid=0"; $apiurl = "http://192.168.1.88:8080/zy-bysms/Api/receiveValidation.php"; $ret= $this->request($apiurl,$apidata); if($ret && strpos($ret["body"],'{"succeed":"0"}')>0) { $result=array('status'=>'1','msg'=>'成功','body'=>$ret["body"]); return $result; } else { $result=array('status'=>'0','msg'=>'失败','body'=>$ret["body"]); return $result; } } /** * 构造函数 * * @access public * @param integer $time_limit * @param integer $connect_timeout * @param integer $stream_timeout * @param boolean $use_curl * @return void */ function __construct($time_limit = -1, $connect_timeout = -1, $stream_timeout = -1, $use_curl = false) { //$this->transport($time_limit, $connect_timeout, $stream_timeout, $use_curl); $this->time_limit = $time_limit; $this->connect_timeout = $connect_timeout; $this->stream_timeout = $stream_timeout; $this->use_curl = $use_curl; } /** * 请求远程服务器 * * @access public * @param string $url 远程服务器的URL * @param mix $params 查询参数,形如bar=foo&foo=bar;或者是一维关联数组,形如array('a'=>'aa',...) * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 重大错误程序直接停止运行,否则返回false。 */ function request($url, $params = '', $method = 'POST', $my_header = '') { $fsock_exists = function_exists('fsockopen'); $curl_exists = function_exists('curl_init'); if (!$fsock_exists && !$curl_exists) { die('No method available!'); } if (!$url) { die('Invalid url!'); } if ($this->time_limit > -1)//如果为0,不限制执行时间 { set_time_limit($this->time_limit); } $method = $method === 'GET' ? $method : 'POST'; $response = ''; $temp_str = ''; /* 格式化将要发要送的参数 */ if ($params && is_array($params)) { foreach ($params AS $key => $value) { $temp_str .= '&' . $key . '=' . $value; } $params = preg_replace('/^&/', '', $temp_str); } /* 如果fsockopen存在,且用户不指定使用curl,则调用use_socket函数 */ if ($fsock_exists && !$this->use_curl) { $response = $this->use_socket($url, $params, $method, $my_header); } /* 只要上述条件中的任一个不成立,流程就转向这里,这时如果curl模块可用,就调用use_curl函数 */ elseif ($curl_exists) { $response = $this->use_curl($url, $params, $method, $my_header); } /* 空响应或者传输过程中发生错误,程序将返回false */ if (!$response) { return false; } return $response; } /** * 使用fsockopen进行连接 * * @access private * @param string $url 远程服务器的URL * @param string $params 查询参数,形如bar=foo&foo=bar * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 否则返回false。 */ function use_socket($url, $params, $method, $my_header) { $query = ''; $auth = ''; $content_type = ''; $content_length = ''; $request_body = ''; $request = ''; $http_response = ''; $temp_str = ''; $error = ''; $errstr = ''; $crlf = $this->generate_crlf(); if ($method === 'GET') { $query = $params ? "?$params" : ''; } else { $request_body = $params; $content_type = 'Content-Type: application/x-www-form-urlencoded' . $crlf; $content_length = 'Content-Length: ' . strlen($request_body) . $crlf . $crlf; } $url_parts = $this->parse_raw_url($url); $path = $url_parts['path'] . $query; if (!empty($url_parts['user'])) { $auth = 'Authorization: Basic ' . base64_encode($url_parts['user'] . ':' . $url_parts['pass']) . $crlf; } /* 格式化自定义头部信息 */ if ($my_header && is_array($my_header)) { foreach ($my_header AS $key => $value) { $temp_str .= $key . ': ' . $value . $crlf; } $my_header = $temp_str; } /* 构造HTTP请求头部 */ $request = "$method $path HTTP/1.0$crlf" . 'Host: ' . $url_parts['host'] . $crlf . $auth . $my_header . $content_type . $content_length . $request_body; if ($this->connect_timeout > -1) { $fp = @fsockopen($url_parts['host'], $url_parts['port'], $error, $errstr, $connect_timeout); } else { $fp = @fsockopen($url_parts['host'], $url_parts['port'], $error, $errstr); } if (!$fp) { return false;//打开失败 } if (!@fwrite($fp, $request)) { return false;//写入失败 } while (!feof($fp)) { $http_response .= fgets($fp); } if (!$http_response) { return false;//空响应 } $separator = '/\r\n\r\n|\n\n|\r\r/'; list($http_header, $http_body) = preg_split($separator, $http_response, 2); $http_response = array('header' => $http_header,//header肯定有值 'body' => $http_body);//body可能为空 @fclose($fp); return $http_response; } /** * 使用curl进行连接 * * @access private * @param string $url 远程服务器的URL * @param string $params 查询参数,形如bar=foo&foo=bar * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 失败返回false。 */ function use_curl($url, $params, $method, $my_header) { /* 开始一个新会话 */ $curl_session = curl_init(); /* 基本设置 */ curl_setopt($curl_session, CURLOPT_FORBID_REUSE, true); // 处理完后,关闭连接,释放资源 curl_setopt($curl_session, CURLOPT_HEADER, true);//结果中包含头部信息 curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true);//把结果返回,而非直接输出 curl_setopt($curl_session, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);//采用1.0版的HTTP协议 $url_parts = $this->parse_raw_url($url); /* 设置验证策略 */ if (!empty($url_parts['user'])) { $auth = $url_parts['user'] . ':' . $url_parts['pass']; curl_setopt($curl_session, CURLOPT_USERPWD, $auth); curl_setopt($curl_session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); } $header = array(); /* 设置主机 */ $header[] = 'Host: ' . $url_parts['host']; /* 格式化自定义头部信息 */ if ($my_header && is_array($my_header)) { foreach ($my_header AS $key => $value) { $header[] = $key . ': ' . $value; } } if ($method === 'GET') { curl_setopt($curl_session, CURLOPT_HTTPGET, true); $url .= $params ? '?' . $params : ''; } else { curl_setopt($curl_session, CURLOPT_POST, true); $header[] = 'Content-Type: application/x-www-form-urlencoded'; $header[] = 'Content-Length: ' . strlen($params); curl_setopt($curl_session, CURLOPT_POSTFIELDS, $params); } /* 设置请求地址 */ curl_setopt($curl_session, CURLOPT_URL, $url); /* 设置头部信息 */ curl_setopt($curl_session, CURLOPT_HTTPHEADER, $header); if ($this->connect_timeout > -1) { curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, $this->connect_timeout); } if ($this->stream_timeout > -1) { curl_setopt($curl_session, CURLOPT_TIMEOUT, $this->stream_timeout); } /* 发送请求 */ $http_response = curl_exec($curl_session); if (curl_errno($curl_session) != 0) { return false; } $separator = '/\r\n\r\n|\n\n|\r\r/'; list($http_header, $http_body) = preg_split($separator, $http_response, 2); $http_response = array('header' => $http_header,//肯定有值 'body' => $http_body); //可能为空 curl_close($curl_session); return $http_response; } /** * Similar to PHP's builtin parse_url() function, but makes sure what the schema, * path and port keys are set to http, /, 80 respectively if they're missing * * @access private * @param string $raw_url Raw URL to be split into an array * @author http://www.cpaint.net/ * @return array */ function parse_raw_url($raw_url) { $retval = array(); $raw_url = (string) $raw_url; // make sure parse_url() recognizes the URL correctly. if (strpos($raw_url, '://') === false) { $raw_url = 'http://' . $raw_url; } // split request into array $retval = parse_url($raw_url); // make sure a path key exists if (!isset($retval['path'])) { $retval['path'] = '/'; } // set port to 80 if none exists if (!isset($retval['port'])) { $retval['port'] = '80'; } return $retval; } /** * 产生一个换行符,不同的操作系统会有不同的换行符 * * @access private * @return string 用双引号引用的换行符 */ function generate_crlf() { $crlf = ''; if (strtoupper(substr(PHP_OS, 0, 3) === 'WIN')) { $crlf = "\r\n"; } elseif (strtoupper(substr(PHP_OS, 0, 3) === 'MAC')) { $crlf = "\r"; } else { $crlf = "\n"; } return $crlf; } } //call example 调用实例 // $sender=new ZySmsSender(); //$msg="这是个测试短信,短信内容"; //$result=$sender->sendsms("zhengff","123456","13162550089,13162550089",$msg); //echo $result['status']; // echo $result['msg'];
zysms
trunk/zysms/api/ZySmsSender.php
PHP
asf20
13,633
<?php define('ROOT_PATH', str_replace('api/test.php', '', str_replace('\\', '/', __FILE__))); require(ROOT_PATH . 'api/ZySmsSender.php'); echo ROOT_PATH . 'api/ZySmsSender.php <br />'; $ZySmsSender = new ZySmsSender(); //$result = $ZySmsSender->sendsms("zhengff","123456","18055538313","测试短信发送中"); $apidata="method=sendsms&username=zhengff&password=123456&mobiles=18055538313&message=中文测试短讯,看到请无视&smstype=0&timerflag=0&timervalue=&timertype=0&timerid=0"; $apiurl = "http://192.168.1.88:8080/zy-bysms/Api/receiveValidation.php"; $method="POST"; $my_header=""; $result = $ZySmsSender->use_curl($apiurl, $apidata, $method, $my_header); print_r($result);
zysms
trunk/zysms/api/test.php
PHP
asf20
714
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title></title> <link href="css/css.css" rel="stylesheet" type="text/css" /> <link href="css/sys.css" rel="stylesheet" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <script language="JavaScript"> <!-- function IsSelect(form){ for (var i=0;i<form.elements.length;i++){ var e = form.elements[i]; if (e.Name != 'allSelect'&&e.disabled==false){ e.checked = form.allSelect.checked; } } } --> </script> </head> <body> <div id="top_one"> <div id="top_two"> <div id="top_three"> <p class="top_p">欢迎光临2future网站.您好, <a href="../main/login.php" style="text-decoration:none;display:inline; color:#6A0000;">[登录</a> | <a href="../main/register.php" style="text-decoration:none;display:inline; color:#6A0000;">免费注册]</a> </p> <div id="top_geduan" style="margin:0; padding:0;"> <ul id="top_ul"> <li id="top_li"><a href="index.php" style="color:#404040;text-decoration:none;">课程报名</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li"><a href="portal.php" style="color:#404040;text-decoration:none;">学生账户</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li2"><a href="../bbs/" style="color:#404040;text-decoration:none;">问题论坛</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li2"><a href="../library/" style="color:#404040;text-decoration:none;">图书馆</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li2"><a href="../main/aap.php" style="color:#404040;text-decoration:none;">大学补习主页</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li2"><a href="../main/hr.php" style="color:#404040;text-decoration:none;">诚聘英才</a></li> <li style="clear:none !important;display:block;float:left;height:21px;padding:3px 0 0 6px;">|</li> <li id="top_li2"><a href="../ielts/" style="color:#404040;text-decoration:none;">未来雅思</a></li> </ul> </div> </div> </div> </div> <div style="clear:both;"></div><div id="wrap"> <div id="header"> <div id="logo"><img src="images/logo.gif" /></div> <div id="nav"></div> </div> <div id="navlist"><img src="images/block_h2.png" width="950" height="42" /></div> <div id="content"> <div id="left"> <!-- 老师管理的位置,管理通告,管理下载课件 --> <div id="left_top_black">用户管理</div> <div id="left_bottom_black"> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_alluser2.php">网站注册用户列表</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_alluser.php">课程注册用户列表</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="find_user.php">查找网站注册用户</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_finduser.php">查找报名用户</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_complaint.php">用户投诉建议</a> </div> </div> <div id="left_top_black">课程与老师管理</div> <div id="left_bottom_black"> <div style=" border: #9E8AA2 solid 1px; padding:2px; text-align:center;margin-bottom:5px; margin-top:5px;margin-right:5px; "> <a href="manage_course03.php">报名情况</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_teacher03.php">老师的列表</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_subject12.php">添加老师权限</a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "><a href="manage_subject12.php">报名管理构架图<font color="#FF0000">(可编辑)</font></a> </div> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "> <a href="manage_teacher01.php">管理科目通告</a> </div> </div> <div id="left_top_black">新闻管理</div> <div id="left_bottom_black"> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "><a href="manage_newlist.php">AAP新闻列表</a></div> </div> <div id="left_top_black">微音基金</div> <div id="left_bottom_black"> <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "><a href="manage_weiyin.php">申请列表</a></div> </div> <!-- <div style="border:#666 solid 1px; padding:2px; text-align:center;margin-bottom:5px;margin-right:5px; "><a href="manage_subject11.php">架构图</a></div> --> </div> <div id="middle3" > <div id="middle_top_blue">报名列表[<a href="manage_portal_user03.php">账户管理:manage_portal_user03.php</a>]</div> <div id="middle_bottom_blue"> <table width="100%" cellpadding="1" cellspacing="1" bgcolor="#dedede"> <form action="update_review_email.php" method="post" name="myForm" id="myForm"> <tr align="center"> <td></td> <td>身份</td> <td><strong>name</strong></td> <td><strong>email</strong></td> <td><strong>Telephone</strong></td> <td><strong>报名科目</strong></td> <td><strong>状态</strong></td> <td><strong>报名时间</strong></td> <td><strong>开通时间</strong></td> <td><strong>到期时间</strong></td> <td><strong>到期设置</strong></td> <td><strong>其他操作</strong></td> </tr> <tr bgcolor="#ffffff" height="25px"> <td><input name="undate_id[]" type="checkbox" id="selectBox" value="17236" /></td> <td> <font color="#3333FF">会员</font> </td> <td>aarontest</td> <td>collins.melbourne@gmail.com</td> <td id="tel">8613855585327</td> <td> SMS testing </td> <td> <font color='#CCCCCC'>未激活</font> </td> <td>2012-05-14</td> <td>0000-00-00</td> <td>0000-00-00</td> <td><a href="manage_portal_time.php?userid=6280&id=17236&subjectid=517">设置时间</a></td> <td><a href="del_signup.php?id=17236&subjectid=517 ">删除</a></td> </tr> <tr bgcolor="#ffffff"><td></td><td colspan="11" align="left">备注:</td></tr> <tr bgcolor="#ffffff" height="25px"> <td><input name="undate_id[]" type="checkbox" id="selectBox" value="17231" /></td> <td> <font color="#3333FF">会员</font> </td> <td>webnova</td> <td>support@webnova.com.au</td> <td id="tel">0430096918</td> <td> SMS testing </td> <td> <font color='#CCCCCC'>未激活</font> </td> <td>2012-05-14</td> <td>0000-00-00</td> <td>0000-00-00</td> <td><a href="manage_portal_time.php?userid=5680&id=17231&subjectid=517">设置时间</a></td> <td><a href="del_signup.php?id=17231&subjectid=517 ">删除</a></td> </tr> <tr bgcolor="#ffffff"><td></td><td colspan="11" align="left">备注:</td></tr> <tr bgcolor="#ffffff" height="25px"> <td><input name="undate_id[]" type="checkbox" id="selectBox" value="17225" /></td> <td> <font color="#3333FF">会员</font> </td> <td>ivy liu</td> <td>ivyliu12345@hotmail.com</td> <td id="tel">0425319155</td> <td> SMS testing </td> <td> <font color='#CCCCCC'>未激活</font> </td> <td>2012-05-14</td> <td>0000-00-00</td> <td>0000-00-00</td> <td><a href="manage_portal_time.php?userid=3110&id=17225&subjectid=517">设置时间</a></td> <td><a href="del_signup.php?id=17225&subjectid=517 ">删除</a></td> </tr> <tr bgcolor="#ffffff"><td></td><td colspan="11" align="left">备注:</td></tr> <tr bgcolor="#ffffff" height="25px"> <td><input name="undate_id[]" type="checkbox" id="selectBox" value="17224" /></td> <td> <font color="#3333FF">会员</font> </td> <td>EmilyHu</td> <td>emilyh@2future.org</td> <td id="tel">0434276021</td> <td> SMS testing </td> <td> <font color='#CCCCCC'>未激活</font> </td> <td>2012-05-14</td> <td>0000-00-00</td> <td>0000-00-00</td> <td><a href="manage_portal_time.php?userid=2464&id=17224&subjectid=517">设置时间</a></td> <td><a href="del_signup.php?id=17224&subjectid=517 ">删除</a></td> </tr> <tr bgcolor="#ffffff"><td></td><td colspan="11" align="left">备注:</td></tr> <tr bgcolor="#ffffff" height="25px"> <td><input name="undate_id[]" type="checkbox" id="selectBox" value="17223" /></td> <td> <font color="#3333FF">会员</font> </td> <td>Tony</td> <td>hainalan@hotmail.com</td> <td id="tel">0433854880</td> <td> SMS testing </td> <td> <font color='#CCCCCC'>未激活</font> </td> <td>2012-05-14</td> <td>0000-00-00</td> <td>0000-00-00</td> <td><a href="manage_portal_time.php?userid=422&id=17223&subjectid=517">设置时间</a></td> <td><a href="del_signup.php?id=17223&subjectid=517 ">删除</a></td> </tr> <tr bgcolor="#ffffff"><td></td><td colspan="11" align="left">备注:</td></tr> <tr height="30px"><td colspan="7" align="left"><input name="allSelect" type="checkbox" id="allSelect" value="" onClick="IsSelect(myForm)" />全选 <input type="submit" value="发送邮件" /><input type="button" onclick="javascript:sendMessage();" value="发送短信" /></td></tr> <tr> <td colspan="10"><textarea name="msg" cols="95" rows="9"></textarea></td> </tr> </form> </table> </div> </div> <hr /> <div id="footer">Copyright (c) <a href="#">2Future</a>. All rights reserved· W3C</div> </div> <script language="javascript"> function xianshi(){ alert('发送邮件通知他(她)!'); } function formatMobile(phone){ if(phone.length==10&&phone.substr(0,1)==0){ phone="61"+phone.substr(1,9); } return phone; } function sendMessage(){ var phone="",phones="",text="",count=-1; text=$("[name='msg']").val(); $("[name='undate_id[]']").each(function(i){ if($(this).attr("checked")=="checked"){ phone=($(this).parent().parent().find("#tel")).html(); phone=formatMobile(phone); phones+=phone+","; count=i; } }); if(count==-1){ alert("请选择要发送短信的学员."); return false; } if(text==null||text==""){ alert("请输入要发送的短信内容."); return false; } $.ajax({ type: "post", url: "http://sms.webnova.com.au/api/webnova_sms_api_lib.php", data:{method:"sendMessages",username:"2future",password:"tony2FUTURE",mobile:phones,api_id:"35",text:text}, dataType: "json", success:my_callback_method }); } function my_callback_method( data ){ alert(data); if( data && typeof(data) == 'object'){ alert(data.status+" "+data.message); } } </script> </body> </html>
zysms
trunk/zysms/api/1.html
HTML
asf20
11,862
<?php /** * Author:Arthur * Date:2013-2-20 * File Name:addReply.php * Email:kingarthurx@sina.cn */ require ('../include/init.php'); /** * 八优后台推送URL *http://sms.maszy.cn/api/addReply.php?clientid={0}&msg={1}&mobile={2}&receivetime={3}&destmobile={4}&msg_type=1 * 获取八优后台推送参数 */ $method = $_GET['method']; global $view_file; if (empty($method)) { $method = 'select'; } if ($method === 'select') { getServerReply(); } /** * 获取八优服务器推送回复短信内容,并插入到本地数据库中。 */ function getServerReply(){ $reply = new Reply(); $replyArr = $reply->getUserApi(); $clientid=$_REQUEST['clientid']; $msg=$_REQUEST['msg']; $mobile = $_REQUEST['mobile']; $receivetime = $_REQUEST['receivetime']; $destmobile = $_REQUEST['destmobile']; $msg_type = $_REQUEST['msg_type']; $reply->company_id = $_SESSION['user']['customer']->company_id; $reply->clientid = $clientid; $reply->mobile = $mobile; $reply->destmobile = $destmobile; $reply->content = $msg; $reply->time = $receivetime; $reply->msg_type = $msg_type; /** * 获取的回复内容插入到本地数据库 */ $reply ->insertReply(); }
zysms
trunk/zysms/api/addReply.php
PHP
asf20
1,235
<?php $result=$_POST["mobile"]; $return = json_encode($result); print_r($return); ?>
zysms
trunk/zysms/api/1.php
PHP
asf20
88
<?php session_start(); /* * Created on 2011-8-30 *====================================== *Author: Allen *Project:health360 *File: mysql_lib.php *Date: 2011-8-30 *====================================== */ class MYSQL { private $row_count; private $row = array (); private $result; private $con; /* * FUNCTION :: MYSQL($p_host, $p_user, $p_passwd, $p_db="mysql") * DESCRIPTION :: * Initialize class with information to access server * No connection will be made at this point. * INPUT :: * p_host : server hostname|IP address * p_user : user name to log into server * p_passwd : passwd for the user * p_db : database to be used * OUTPUT :: * none */ function MYSQL($p_host, $p_user, $p_passwd, $p_db = "mysql") { $this->sql_host = $p_host; $this->sql_user = $p_user; $this->sql_passwd = $p_passwd; $this->sql_db = $p_db; $this->getConnection(); } function getConnection() { // Connect to the Database $this->con = mysql_connect($this->sql_host, $this->sql_user, $this->sql_passwd); if (!$this->con) die('could not connect: ' . mysql_error()); //Select the Database if (!mysql_select_db($this->sql_db, $this->con)) { die('could not select datebase: ' . mysql_error()); } mysql_query("SET NAMES 'utf8'"); } function closed() { mysql_close($this->con); } function insert($sql, $return_id) { mysql_query($sql) or die('could not insert: ' . mysql_error()); if ($return_id) { return mysql_insert_id(); } } function delete($sql) { mysql_query($sql) or die('could not delete: ' . mysql_error()); } function upadte($sql) { mysql_query($sql) or die('could not update: ' . mysql_error()); } /* * 查询所有内容 * */ function select($sql) { $this->result = mysql_query($sql) or die('could not select: ' . mysql_error()); //$this->row_count = mysql_num_rows($this->result); $i = 0; $arr=array(); while ($this->row = mysql_fetch_object($this->result)) { $arr[$i]=$this->row; $i++; } return $arr; } /* * 查询单个内容 * */ function selectId($sql) { $this->result = mysql_query($sql) or die('could not select: ' . mysql_error()); //$this->row_count = mysql_num_rows($this->result); $this->row = mysql_fetch_object($this->result); return $this->row; } } ?>
zysms
trunk/zysms/include/class/mysql_class.php
PHP
asf20
2,417
<?php /** * Author:Arthur * Date:2013-2-20 * File Name:receiveValidation_class.php * Email:kingarthurx@sina.cn */ class receiveValidation{ /** * 用户信息 */ private $user_id; private $company_id; private $department_id; private $user_login_name; private $user_login_password; private $roleid; private $user_real_name; private $user_email; private $user_phone; private $user_mobile; private $user_remark; /** * 发送内容信息 */ private $sms_record_id; private $api_id; private $sms_record_time; private $sms_success_list; private $sms_fail_list; private $sms_success_count; private $sms_fail_count; private $sms_content; private $sms_record_remark; private $mobile; private $content; /** * api信息 */ private $userapi_id; private $api_username; private $api_password; private $api_status; private $sender_name; private $sender_motivation; private $api_type; private $sender_status; private $userapi_remark; /** * info表信息 */ private $balance; /** * 查询回复短信 */ private $msgcount; private $encodetype; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } /** * 查询用户是否存在,返回相应的信息 */ public function findUser(){ $sql="select * from zy_user where user_login_name = '$this->user_login_name'"; $arr = $GLOBALS['mysql']->selectId($sql); return $arr; } /** * 查询用户及密码 */ public function findUserPassword(){ $sql="select * from zy_user where user_login_name = '$this->user_login_name' and user_login_password='$this->user_login_password'"; $arr = $GLOBALS['mysql']->selectId($sql); return $arr; } /** * 查询该公司是否又API存在 */ public function findUserApi(){ $sql="select * from zy_userapi where company_id=$this->company_id"; $arr = $GLOBALS['mysql']->select($sql); return $arr; } /** * 去除相应的短信条数 */ public function updateInfo($balances){ /*减去短讯条数,再更新*/ $balance = $balances - $this->balance; $alter_sql = "update zy_info set `balance` = '$balance' where company_id=".$this->company_id; $GLOBALS['mysql']->upadte($alter_sql); } /** * 查询剩余短信 */ public function findInfo(){ $sql="select balance from zy_info where company_id=".$this->company_id; $arr = $GLOBALS['mysql']->selectId($sql); return $arr; } /** * 查询回复短信 */ public function getReply(){ $sql="select * from zy_sms_reply where company_id=$this->company_id LIMIT 0,$this->msgcount"; $arr = $GLOBALS['mysql']->select($sql); return $arr; } }
zysms
trunk/zysms/include/class/receiveValidation_class.php
PHP
asf20
3,129
<?php class contact { //contact_list 属性 private $contact_list_id; private $contact_list_name; private $contact_list_count; private $company_id; private $department_id; private $user_id; private $agent_id; private $contact_list_create_time; private $contact_list_update_time; private $contact_list_remark; private $contact_list; //contact属性 private $contact_first_name; private $contact_surname; private $contact_email; private $contact_mobile; private $contact_phone; private $contact_title; private $contact_create_time; private $contact_update_time; private $contact_birth_date; private $contact_country; private $contact_state; private $contact_city; private $contact_address; private $contact_remark; private $NotGroupID; //__get()方法来获取私有属性 public function __get($property_name) { if (isset ($this-> $property_name)) { return ($this-> $property_name); } else { return (NULL); } } //__set()方法用来设置私有属性 public function __set($property_name, $value) { $this-> $property_name = $value; } /**************************contact list******************************************/ /* * 增加一个联系人列表 * */ function addContact(){ $sql="insert into zy_contact_list (`contact_list_name`,`contact_list_count`,`company_id`,`department_id`,`user_id`,`agent_id`,`contact_list_create_time`,`contact_list_update_time`,`contact_list_remark`)" . "values('$this->contact_list_name','$this->contact_list_count','$this->company_id','$this->department_id','$this->user_id','$this->agent_id','$this->contact_list_create_time','$this->contact_list_update_time','$this->contact_list_remark')"; $GLOBALS['mysql']->insert($sql,false); } /* * 删除一条联系人列表记录 * */ function deleteContact(){ $sql="delete from zy_contact_list where contact_list_id='$this->contact_list_id'"; $GLOBALS['mysql']->delete($sql); } /* * 查询一条联系人列表记录 * */ function ADepartmentInquires(){ $sql="select zy_contact_list.* from zy_contact_list where contact_list_id='$this->contact_list_id'"; $contact_arr=$GLOBALS['mysql']->selectId($sql); return $contact_arr; } /* * 修改一条联系人列表记录 * */ function updateContact(){ $sql="update zy_contact_list set `contact_list_name`='$this->contact_list_name',`agent_id`='$this->agent_id',`contact_list_remark`='$this->contact_list_remark' where contact_list_id='$this->contact_list_id'"; $GLOBALS['mysql']->upadte($sql); } /* * 查询联系人列表,分页 * */ function queryContact(){ // $sql="select zy_contact_list.* from zy_contact_list where `company_id`='$this->company_id' ORDER BY contact_list_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $SQL="SELECT a.*,(SELECT COUNT(b.`contact_id`) FROM zy_contact b WHERE b.`contact_list` LIKE CONCAT('%[',a.`contact_list_id`,']%')) contact_list_count FROM zy_contact_list a WHERE a.`company_id`='$this->company_id' ORDER BY contact_list_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $contact_arr=$GLOBALS['mysql']->select($SQL); return $contact_arr; } /* * admin查询联系人列表,分页 * */ function queryAdminContact(){ $sql="SELECT * FROM `zy_company`,zy_contact_list WHERE zy_company.`company_id` = zy_contact_list.`company_id` ORDER BY contact_list_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; //这条sql是根据公司ID查询出该公司下所有联系人列表.你上面那个我不太清楚你要公司表里的什么数据.SQL你自己组装下. //$sql="SELECT a.`contact_list_id`,a.`contact_list_name`,(SELECT COUNT(b.`contact_id`) FROM zy_contact b WHERE b.`contact_list` LIKE CONCAT('%[',a.`contact_list_id`,']%')) contact_list_count FROM zy_contact_list a WHERE a.`company_id`='$this->company_id'"; $contact_arr=$GLOBALS['mysql']->select($sql); return $contact_arr; } /* * 查询联系人列表总数,分页 * */ function countContact(){ $sql="select count(contact_list_id) as count from zy_contact_list"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } /** * 查询customer联系人列表总数,分页 * */ function countContactCustomer(){ $sql="select count(contact_list_id) as count from zy_contact_list WHERE `company_id`='$this->company_id'"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } /* * 查询所有联系人列表 * */ function selectContact(){ $sql="select zy_contact_list.* from zy_contact_list "; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /*********************customer contact**************************/ private function getNotGroup(){ /**获取未分组ID*/ $sql="select * from zy_contact_list where company_id=".$_SESSION['user']['customer']->company_id." ORDER BY contact_list_id ASC"; $this->NotGroupID=$GLOBALS['mysql']->select($sql); return $this->NotGroupID; } /** * 如果不选择congtatLIstName,则进未分组 * 增加一条联系人记录 */ function addNotGroup(){ $NotGroupid=$this->getNotGroup(); $NotGroupID=$NotGroupid[0]->contact_list_id; $sql="INSERT INTO `zy_contact` (`contact_first_name`,`contact_surname`,`contact_email`,`contact_mobile`, `contact_phone`,`contact_title`,`contact_create_time`,`contact_update_time`,`contact_birth_date`,`contact_country`, `contact_state`,`contact_city`,`contact_address`,`company_id`,`department_id`,`user_id`,`contact_list`,`contact_remark`) VALUES ('$this->contact_first_name','$this->contact_surname','$this->contact_email','$this->contact_mobile','$this->contact_phone', '$this->contact_title','$this->contact_create_time','$this->contact_update_time','$this->contact_birth_date','$this->contact_country', '$this->contact_state','$this->contact_city','$this->contact_address','$this->company_id','$this->department_id','$this->user_id','[$NotGroupID]','$this->contact_remark')"; $contactId=$GLOBALS['mysql']->insert($sql,true); } /** * 增加一条联系人记录 */ function addContactPerson(){ $set=implode(']|[',$this->contact_list); $sql="INSERT INTO `zy_contact` (`contact_first_name`,`contact_surname`,`contact_email`,`contact_mobile`, `contact_phone`,`contact_title`,`contact_create_time`,`contact_update_time`,`contact_birth_date`,`contact_country`, `contact_state`,`contact_city`,`contact_address`,`company_id`,`department_id`,`user_id`,`contact_list`,`contact_remark`) VALUES ('$this->contact_first_name','$this->contact_surname','$this->contact_email','$this->contact_mobile','$this->contact_phone', '$this->contact_title','$this->contact_create_time','$this->contact_update_time','$this->contact_birth_date','$this->contact_country', '$this->contact_state','$this->contact_city','$this->contact_address','$this->company_id','$this->department_id','$this->user_id','[$set]','$this->contact_remark')"; $contactId=$GLOBALS['mysql']->insert($sql,true); return $contactId; } /** * 取出contact list 中 contact_id * */ // function takeContactId(){ // $sql="select zy_contact_list.contact_id as contactid from zy_contact_list where contact_list_id='$this->contact_list_id'"; // $contactID=$GLOBALS['mysql']->selectId($sql); // return $contactID->contactid; // } /* * 修改contact list 中 contact_list_count 数量 * */ function updateContactListCount($id){ $sql="update zy_contact_list set contact_list_count=contact_list_count+1 where contact_list_id=$id"; $GLOBALS['mysql']->upadte($sql); } /* * 修改一条记录 * */ function updateContactPerson(){ $set=implode(']|[',$this->contact_list); $sql="UPDATE `zy_contact` SET `contact_first_name` = '$this->contact_first_name', `contact_surname` = '$this->contact_surname', `contact_email` = '$this->contact_email', `contact_mobile` = '$this->contact_mobile', `contact_phone` = '$this->contact_phone', `contact_title` = '$this->contact_title', `contact_create_time` = '$this->contact_create_time', `contact_update_time` = '$this->contact_update_time', `contact_birth_date` = '$this->contact_birth_date', `contact_country` = '$this->contact_country', `contact_state` = '$this->contact_state', `contact_city` = '$this->contact_city', `contact_address` = '$this->contact_address', `contact_list` = '[$set]', `contact_remark` = '$this->contact_remark' WHERE `contact_id` = '$this->contact_id'"; $GLOBALS['mysql']->upadte($sql); } /* * 删除一条联系人记录 * */ function deleteContactPerson(){ $sql="delete from zy_contact where contact_id='$this->contact_id'"; $GLOBALS['mysql']->delete($sql); } /* * 查询单个联系人记录 * */ function ADepartmentInquire(){ $sql="select zy_contact.* from zy_contact where contact_id='$this->contact_id' and `company_id`='$this->company_id'"; $contact_arr=$GLOBALS['mysql']->selectId($sql); return $contact_arr; } /* * 查询联系人 * * */ function queryContactPerson(){ $sql="SELECT * FROM zy_contact WHERE zy_contact.`company_id`='$this->company_id' ORDER BY contact_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $contact_arr=$GLOBALS['mysql']->select($sql); return $contact_arr; } /* 查询联系人总数 */ function countContactPerson(){ $sql="select count(zy_contact.contact_id) as count from zy_contact where zy_contact.`company_id`='$this->company_id'"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } /* * 查询所有联系人列表 * */ function selectCustomerContact(){ $sql="select zy_contact_list.* from zy_contact_list where `company_id`='$this->company_id'"; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 根据company_id查询出所有联系人列表及列表下的人数. */ function CountCustomerContact(){ $sql="SELECT a.`contact_list_id`,a.`contact_list_name`,(SELECT COUNT(b.`contact_id`) FROM zy_contact b WHERE b.`contact_list` LIKE CONCAT('%[',a.`contact_list_id`,']%')) contact_list_count FROM zy_contact_list a WHERE a.`company_id`='$this->company_id'"; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /*************************admin contact******************************/ /* 增加一条联系人记录 * */ function addAdminContactPerson(){ $set=implode(']|[',$this->contact_list); $sql="INSERT INTO `zy_contact` (`contact_first_name`,`contact_surname`,`contact_email`,`contact_mobile`, `contact_phone`,`contact_title`,`contact_create_time`,`contact_update_time`,`contact_birth_date`,`contact_country`, `contact_state`,`contact_city`,`contact_address`,`company_id`,`department_id`,`user_id`,`contact_list`,`contact_remark`) VALUES ('$this->contact_first_name','$this->contact_surname','$this->contact_email','$this->contact_mobile','$this->contact_phone', '$this->contact_title','$this->contact_create_time','$this->contact_update_time','$this->contact_birth_date','$this->contact_country', '$this->contact_state','$this->contact_city','$this->contact_address','$this->company_id','$this->department_id','$this->user_id','[$set]','$this->contact_remark')"; $contactId=$GLOBALS['mysql']->insert($sql,true); return $contactId; } /* * 修改一条记录 * */ function updateAdminContactPerson(){ $set=implode(']|[',$this->contact_list); $sql="UPDATE `zy_contact` SET `contact_first_name` = '$this->contact_first_name', `contact_surname` = '$this->contact_surname', `contact_email` = '$this->contact_email', `contact_mobile` = '$this->contact_mobile', `contact_phone` = '$this->contact_phone', `contact_title` = '$this->contact_title', `contact_create_time` = '$this->contact_create_time', `contact_update_time` = '$this->contact_update_time', `contact_birth_date` = '$this->contact_birth_date', `contact_country` = '$this->contact_country', `contact_state` = '$this->contact_state', `contact_city` = '$this->contact_city', `contact_address` = '$this->contact_address', `contact_list` = '[$set]', `contact_remark` = '$this->contact_remark' WHERE `contact_id` = '$this->contact_id'"; $GLOBALS['mysql']->upadte($sql); } /* * 删除一条联系人记录 * */ function deleteAdminContactPerson(){ $sql="delete from zy_contact where contact_id='$this->contact_id'"; $GLOBALS['mysql']->delete($sql); } /** * 查询单个联系人记录 * */ function ADepartmentInquireAdmin(){ $sql="select zy_contact.* from zy_contact where contact_id='$this->contact_id'"; $contact_arr=$GLOBALS['mysql']->selectId($sql); return $contact_arr; } /** * 查询联系人 * */ function queryAdminContactPerson(){ $sql="SELECT * FROM zy_contact ORDER BY contact_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $contact_arr=$GLOBALS['mysql']->select($sql); return $contact_arr; } /** 查询联系人总数 */ function countAdminContactPerson(){ $sql="select count(zy_contact.contact_id) as count from zy_contact"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } /** * 根据contact_list_id查询联系人 * */ function queryContactByContactListId($where,$norepeat){ if($norepeat){ $sql="select * from zy_contact ".$where." group by contact_mobile ORDER BY contact_id" ; }else{ $sql="select * from zy_contact ".$where." ORDER BY contact_id"; } $contact_arr=$GLOBALS['mysql']->select($sql); return $contact_arr; } }
zysms
trunk/zysms/include/class/contact_class.php
PHP
asf20
14,335
<?php /* * Created on 2011-9-6 *====================================== *Author: Allen *Project:health360 *File: company_class.php *Date: 2011-9-6 *====================================== *@company_name 公司名称 *@company_phone 公司电话 *@company_address 公司地址 *@user_id 公司管理员的用户号 *@max_user 公司最大员工数 *@remark 备注项,备用字段 */ class company { //company属性 private $company_id; private $company_name; private $company_phone; private $company_address; private $company_remark; //user 属性 private $user_id; private $department_id; private $user_login_name; private $user_login_password; private $roleid; private $user_real_name; private $user_email; private $user_phone; private $user_mobile; private $user_remark; //userapi 属性 private $usrapi_id; private $api_username; private $api_password; private $api_id; private $api_status; private $userapi_remark; private $sender_name; private $sender_status; private $sender_motivation; private $api_type; //contact_list 属性 private $contact_list_create_time; private $contact_list_update_time; private $contact_list_count; //info 属性; private $balance; private $type; private $number; private $name; private $expirydate; private $bsbnumber; private $accountnumber; private $accountname; private $defaultpay; //__get()方法来获取私有属性 public function __get($property_name) { if (isset ($this-> $property_name)) { return ($this-> $property_name); } else { return (NULL); } } //__set()方法用来设置私有属性 public function __set($property_name, $value) { $this-> $property_name = $value; } /** * 增加一个公司记录的同时,增加 user,department,更新company 开始 * * 新增一条用户信息 */ function addUser($company_id) { $sql = "insert into `zy_user` (`company_id`,`department_id`,`user_login_name`,`user_login_password`,`roleid`,`user_real_name`,`user_email`,`user_phone`,`user_mobile`,`user_remark`)" . " VALUES ('$company_id','$this->department_id','$this->user_login_name','$this->user_login_password','$this->roleid','$this->user_real_name','$this->user_email','$this->user_phone','$this->user_mobile','$this->user_remark')"; $userid=$GLOBALS['mysql']->insert($sql, true); return $userid; } /* * 新增一条公司信息 * */ function addCompany() { $sql = "INSERT INTO `zy_company`(`company_name`,`company_phone`,`company_address`,`company_remark`)" . "VALUES ('$this->company_name','$this->company_phone','$this->company_address','$this->company_remark')"; $company_id=$GLOBALS['mysql']->insert($sql, true); return $company_id; } /** * 添加默认list组 * */ function addContactList($user_id,$company_id,$department_id){ $sql="insert into zy_contact_list (`contact_list_name`,`contact_list_count`,`company_id`,`department_id`,`user_id`,`agent_id`,`contact_list_create_time`,`contact_list_update_time`,`contact_list_remark`)" . " values ('Not Group','$this->contact_list_count','$company_id','$department_id','$user_id','$this->agent_id','$this->contact_list_create_time','$this->contact_list_update_time','Not Group')"; $GLOBALS['mysql']->insert($sql,false); } /** * 添加info表. */ function addPaymentInfo(){ $sql="insert into zy_info (`company_id`) values ('$this->company_id')"; $GLOBALS['mysql']->insert($sql,false); } /** *根据companyid获取余额. */ function getBalanceByCompanyId(){ $SQL="select zy_info.balance from zy_info where company_id='$this->company_id'"; $balance=$GLOBALS['mysql']->selectId($SQL); return $balance->balance; } function deductBalance($success_count){ $sql="UPDATE `zy_info` SET `balance` =balance-$success_count WHERE `company_id` = '$this->company_id'"; $GLOBALS['mysql']->upadte($sql); } function updatePaymentInfo(){ /*查询客户剩余短信数*/ $SQL="select zy_info.balance from zy_info where company_id='$this->company_id'"; $balance=$GLOBALS['mysql']->selectId($SQL); /*修改客户info*/ $sql="UPDATE `zy_info` SET `balance` =$this->balance+$balance->balance, `cc_type` = '$this->type', `cc_number` = '$this->number', `cc_name` = '$this->name', `cc_expirydate` = '$this->expirydate', `dd_bsbnumber` = '$this->bsbnumber', `dd_accountnumber` = '$this->accountnumber', `dd_accountname` = '$this->accountname', `defaultpay` = '$this->defaultpay' WHERE `company_id` = '$this->company_id'"; $GLOBALS['mysql']->upadte($sql); } /* * 向department表中插入company_id * insert department company_id * */ function addDepartmentCompanyId($company_id){ $sql="insert into `zy_department` (`company_id`,`department_name`,`department_parent_id`,`remark`) values ('$company_id','manager','0','The highest authority')"; $department_id=$GLOBALS['mysql']->insert($sql, true); return $department_id; } /* * 更新company表中 user_id * */ function updateCompanyCompanyId($userid,$company_id){ $sql="update `zy_company` set user_id='$userid' where `company_id`='$company_id'"; $GLOBALS['mysql']->upadte($sql); } /** * 更新user表中 department_id * */ function updateUserDepartmentId($company_id,$department_id){ $sql="update `zy_user` set `department_id`='$department_id' where `company_id`='$company_id'"; $GLOBALS['mysql']->upadte($sql); } /* * 增加一个公司记录的同时,增加 user,department,更新company 结束 * */ /** * 查询公司信息 */ function queryCompany(){ // $sql="SELECT * FROM zy_company ORDER BY company_id DESC LIMIT 0, 10"; $sql="select a.*,b.* from zy_company a ,zy_info b where a.company_id=b.company_id ORDER BY a.company_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** *根据ID删除一条公司信息 */ // function deleteCompany(){ // //mysql左连接删除方法如下 // $sql="DELETE zy_user,zy_company FROM zy_company LEFT JOIN zy_user ON zy_user.user_id=zy_company.user_id WHERE zy_company.company_id=$this->company_id"; // $GLOBALS['mysql']->delete($sql); // } /** * 修改公司信息及用户信息 */ function updateCompany(){ //联合修改方法如下 $sql="UPDATE zy_user,zy_company SET `company_name` = '$this->company_name', `company_phone` = '$this->company_phone'," . " `company_address` = '$this->company_address'," . " zy_company.company_remark = '$this->company_remark'," . " zy_user.user_login_password='$this->user_login_password'," . " `user_real_name`='$this->user_real_name',`user_email`='$this->user_email'," . " `user_phone`='$this->user_phone',zy_user.user_mobile='$this->user_mobile',zy_user.user_remark = '$this->user_remark'". " where zy_user.user_id=zy_company.user_id AND zy_company.company_id=$this->company_id"; $GLOBALS['mysql']->upadte($sql); } /* * 查询单个公司信息 * */ function queryCompanyID() { //联合查询方法如下 $sql="SELECT zy_company.*,zy_user.* FROM zy_company,zy_user WHERE zy_company.user_id=zy_user.user_id AND zy_company.company_id=$this->company_id"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } /* * 查询用户所在公司 * */ function queryUserCompany(){ $sql="select * from zy_company,zy_user WHERE zy_company.user_id = zy_user.user_id and zy_user.`user_id`='$this->user_id'"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } /** * 分页查询公司信息 * */ function countCompany() { $sql="select count(company_id) count from zy_company"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj->count; } /** * 查询公司对应的API信息,分页 */ function queryUserApi(){ $sql="select * from zy_userapi where api_status<>3 and company_id=".$this->company_id." ORDER BY api_type desc,userapi_id asc limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 查询公司对应的API信息,无分页 */ function queryUserApiNoPager(){ $sql="select * from zy_userapi where sender_status=2 and company_id=".$this->company_id." ORDER BY api_type asc,userapi_id asc "; $arr=$GLOBALS['mysql']->select($sql); return $arr; } function countUserAPI(){ $sql="select count(company_id) count from zy_userapi where api_status<>3"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj->count; } /** * 查询单条API信息 */ function queryUserApiById(){ $sql="select * from zy_userapi where userapi_id=".$this->userapi_id; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } /** * 修改userapi */ function updateUserAPI(){ $sql="UPDATE `zy_userapi` SET `company_id` = '$this->company_id',`api_username` = '$this->api_username',`api_password` = '$this->api_password',`api_id` = '$this->api_id',`api_status` = '$this->api_status',`sender_name` = '$this->sender_name',`sender_status` = '$this->sender_status',`userapi_remark` = '$this->userapi_remark' WHERE `userapi_id` = $this->userapi_id"; $GLOBALS['mysql']->upadte($sql); } /** * 删除 userapi.将status改为3 */ function deleteUserAPI(){ $sql="UPDATE `zy_userapi` SET `api_status` =3 WHERE `userapi_id` = $this->userapi_id"; $GLOBALS['mysql']->upadte($sql); } /** * 添加 userapi */ function addUserAPI(){ $sql="INSERT INTO `zy_userapi` (`company_id`,`api_username`,`api_password`,`api_id`,`api_status`,`sender_name`,`sender_motivation`,`api_type`,`sender_status`,`userapi_remark`) VALUES ($this->company_id,'$this->api_username','$this->api_password','$this->api_id',$this->api_status,'$this->sender_name','$this->sender_motivation','$this->api_type','$this->sender_status','$this->userapi_remark')"; $GLOBALS['mysql']->insert($sql,false); } /** * 查询公司默认的userapi帐号密码 */ function queryDefaultUserApi(){ $sql="select * from zy_userapi where company_id=$this->company_id and api_type=0 limit 0,1"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } } ?>
zysms
trunk/zysms/include/class/company_class.php
PHP
asf20
10,628
<?php /** * @author * @since 2010-11-12 * @desc 分页 * */ class Page{ /** * @desc(数据库)查询的起始页 * @var int */ private static $firstcount; /** * @desc 页面导航条代码 * @var String */ private static $pagenav; /** * @desc当前页码 * @var int */ private $page; /** * @desc 读取本页URL * @var String */ private $begin_page; private $end_page; private static $server_url; /** * @desc 构造函数。给$page(当前页)和$server_url(URL)赋初值 * @param int $page * @return null */ public function __construct($page){ isset($page)?$this->page=intval($page):$this->page=1; $this->server_url= $_SERVER["REQUEST_URI"]; } /** * @desc 分页计算,$pagenav(页面导航)获得结果 * * @param Int $totle符合要求的数据库表中的总记录数 * @param Int $displaypg 每页显示的记录数 ,默认20条 * @param String $url 默认本页 $_SERVER["REQUEST_URI"] * @return null默认不输出 */ public function pageft($totle,$displaypg,$url=''){ //如果$url使用默认,即空值,则赋值为本页URL: if(!$url){ $url=$this->server_url;} //URL分析: $parse_url=parse_url($url); $url_query=$parse_url["query"]; //单独取出URL的查询字串 if(isset($url_query)){ $params=array(); //因为URL中可能包含了页码信息,我们要把它去掉,以便加入新的页码信息。 //这里用到了正则表达式 // $url_query=preg_replace("(^|&)page=$this->page","",$url_query); //将处理后的URL的查询字串替换原来的URL的查询字串: parse_str($url_query,$params); unset($params['page']); // $url=str_replace($parse_url["query"],$url_query,$url); $url=$parse_url['path'].'?'.http_build_query($params); // 解析后的url路径组合 //在URL后加page查询信息,但待赋值: if(http_build_query($params)){ $url.="&page"; } else{ $url.="page"; } }else { $url.="?page"; } //页码计算: $lastpg=ceil($totle/$displaypg); //最后页,也是总页数 $this->page=min($lastpg,$this->page); $prepg=$this->page-1; //上一页 $nextpg=($this->page==$lastpg ? 0 : $this->page+1); //下一页 $this->firstcount=($this->page-1)*$displaypg; //开始分页导航条代码: // $this->pagenav="显示第 <B>".($totle?($this->firstcount+1):0)."</B>-<B>".min($this->firstcount+$displaypg,$totle)."</B> 条记录,共 $totle 条记录<BR>"; //如果只有一页则跳出函数: if($this->page-4>=1){ $this->begin_page=$this->page-4; }else{ $this->begin_page=1; } if($this->page+4<=$lastpg){ $this->end_page=$this->page+4; }else{ $this->end_page=$lastpg; } //分页前导航 if($lastpg<1) { return false; } { $this->pagenav.="<a href='{$url}=1'>&lt;&lt;</a> "; } if($prepg) { $this->pagenav.="<a href='{$url}=$prepg'>&lt;</a> "; } else { $this->pagenav.="<a href='javascript:void(0);'>&lt;</a> "; } //中间页码 while($this->begin_page <= $this->end_page){ if($this->begin_page == $this->page){ $this->pagenav.=" <a href='{$url}=$this->begin_page' class='current number'>$this->begin_page</a> "; }else{ $this->pagenav.=" <a href='{$url}=$this->begin_page' class='number'>$this->begin_page</a> "; } $this->begin_page++; } //分页后导航 if($nextpg) { $this->pagenav.=" <a href='{$url}=$nextpg'>&gt;</a> "; } else { $this->pagenav.="<a href='javascript:void(0)'>&gt;</a>"; } $this->pagenav.=" <a href='{$url}=$lastpg'>&gt;&gt;</a> "; // //下拉跳转列表,循环列出所有页码: // $this->pagenav.=" 到第 <select name='topage' size='1' onchange='window.location=\"$url=\"+this.value'>\n"; // for($i=1;$i<=$lastpg;$i++){ // if($i==$this->page) // { // $this->pagenav.="<option value='$i' selected>$i</option>\n"; // } // else // { // $this->pagenav.="<option value='$i'>$i</option>\n"; // } // } // $this->pagenav.="</select> 页,共 $lastpg 页"; } /** * @desc 获得(数据库)查询的起始页 * @return $firstcount */ public function getFirstcount(){ return $this->firstcount; } /** * @desc 设置(数据库)查询的起始页 * @param Int $firstcount默认为0 */ public function setFirstcount($firstcount=0){ $this->firstcount=0; } /** * @desc获取导航栏数据 * @return $pagenav */ public function getPagenav(){ return $this->pagenav; } } ?>
zysms
trunk/zysms/include/class/page_class.php
PHP
asf20
4,749
<?php /* * -------------------- * Created on 2011-11-4 * @author arthur * email:15215557835@qq.com * -------------------- */ class department{ private $department_id; private $company_id; private $department_name; private $department_parent_id; private $remark; //获取私有变量 public function __get($allVariables) { if(isset($this->$allVariables)) { return ($this->$allVariables); } else { return (null); } } //设置私有变量 public function __set($allVariables,$value) { $this->$allVariables = $value; } /* * 增加公司部门 * * */ function add_Department(){ //$sql="update zy_department set department_name='$this->department_name',department_parent_id=$this->department_parent_id,remark='$this->remark' where company_id=".$_SESSION['user']['customer']->company_id; $sql="insert into zy_department (`department_name`,`department_parent_id`,`remark`) values ('$this->department_name','$this->department_parent_id','$this->remark')"; $department_id=$GLOBALS['mysql']->insert($sql,true); return $department_id; } function update_Department($department_id){ $sql="update zy_department set company_id=".$_SESSION['user']['customer']->company_id." where department_id=".$department_id ; echo $sql; $GLOBALS['mysql']->upadte($sql); } /* * 删除一条部门信息 * */ function deteleDpartment(){ $sql="delete from zy_department where department_id='$this->department_id' and company_id=".$_SESSION['user']['customer']->company_id; $GLOBALS['mysql']->delete($sql); } /* * 查询部门信息总数 * */ function countDpartmetn(){ $sql="select count(department_id) as count from zy_department where company_id=".$_SESSION['user']['customer']->company_id; $COUNT=$GLOBALS['mysql']->selectId($sql); return $COUNT->count; } /* * 查询公司下的所有部门,并分页 * */ function selectDepartment(){ $sql="SELECT * FROM zy_department where company_id=".$_SESSION['user']['customer']->company_id." ORDER BY department_id ASC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /* * 查询一个部门信息 * */ function ADepartmentInquires(){ $sql="select zy_department.* from zy_department where department_id='$this->department_id'"; $department_arr=$GLOBALS['mysql']->selectId($sql); return $department_arr; } /* * 修改一条部门信息 * */ function updateDepartment(){ $sql="update zy_department set department_name='$this->department_name',department_parent_id=$this->department_parent_id,remark='$this->remark' where company_id=".$_SESSION['user']['customer']->company_id; $GLOBALS['mysql']->upadte($sql); } } ?>
zysms
trunk/zysms/include/class/department_class.php
PHP
asf20
2,998
<?php /* * Created on 2011-9-21 * @author arthur * 2011-9-21 */ class category { private $category_id; private $category_name; private $category_parent_id; private $category_sort; private $category_remark; //获取私有变量 public function __get($allVariables) { if(isset($this->$allVariables)) { return ($this->$allVariables); } else { return (null); } } //设置私有变量 public function __set($allVariables,$value) { $this->$allVariables = $value; } /* * 增加视频分类 * */ function addCategory() { $sql="INSERT INTO `zy_category` (`category_name`,`category_parent_id`,`category_sort`,`remark`) VALUES ('$this->category_name','$this->category_parent_id','$this->category_sort','$this->category_remark')"; $GLOBALS['mysql']->insert($sql,false); } /* * 查询视频分类信息 * */ function queryCategory() { $sql = "SELECT * FROM zy_category ORDER BY category_id DESC LIMIT 0, 10"; // $sql="select * from zy_category limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /* * 根据ID删除视频分类 * * */ function deleteCategory() { $sql = "delete from zy_category where category_id=$this->category_id"; $GLOBALS['mysql']->delete($sql); } /* * * 修改视频分类 * * */ function updateCategory() { $sql ="UPDATE `zy_category` SET `category_name` ='$this->category_name', `category_parent_id` ='$this->category_parent_id', `category_sort` ='$this->category_sort', `remark` ='$this->category_remark' WHERE `category_id`=$this->category_id"; $GLOBALS['mysql']->upadte($sql); } /* * 根据ID查询单个视频分类信息 * */ function queryCategoryID() { $sql = "SELECT * FROM `zy_category` where `category_id`='$this->category_id'"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } /* // * 分页查询公司信息 // * */ // function queryPage() // { // $sql="select * from zy_category"; // $rs = mysql_query($sql); // return $rs; // } } ?>
zysms
trunk/zysms/include/class/category_class.php
PHP
asf20
2,328
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: template_class.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/include/class/template_class.php
PHP
asf20
258
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: message_class.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note * */ class Message{ private $message_content; private $contact_list_id; private $norepeat; private $userapi_id; private $api_id; private $sms_record_time; private $sms_success_list; private $sms_fail_list; private $sms_success_count; private $sms_fail_count; private $sms_content; private $user_id; private $department_id; private $company_id; private $sms_record_remark; private $isentry; private $mobile_list; private $cost; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } /** * 发送短信 */ function sendMessage(){ $sql = "INSERT INTO `zy_sms_record`(`api_id`,`sms_record_time`,`sms_success_list`,`sms_fail_list`,`sms_success_count`,`sms_fail_count`,`sms_content`,`user_id`,`department_id`,`company_id`,`sms_record_remark`) VALUES ('$this->api_id','$this->sms_record_time','$this->sms_success_list','$this->sms_fail_list',$this->sms_success_count,$this->sms_fail_count,'$this->sms_content',$this->user_id,$this->department_id,$this->company_id,'$this->sms_record_remark')"; $GLOBALS['mysql']->insert($sql,false); } /** * 查询短信发送记录 * */ function queryMessageHistory(){ //$sql = "SELECT * FROM zy_sms_record where company_id=$this->company_id ORDER BY sms_record_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $sql="SELECT * FROM `zy_sms_record` LEFT JOIN zy_user ON zy_sms_record.`user_id` = zy_user.`user_id` LEFT JOIN zy_contact ON zy_sms_record.`sms_success_list` = `zy_contact`.`contact_mobile` where zy_sms_record.company_id=$this->company_id ORDER BY zy_sms_record.sms_record_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 查询短信发送记录 * */ function countMessageHistory(){ $sql = "SELECT count(sms_record_id) count FROM zy_sms_record where company_id=$this->company_id"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } } ?>
zysms
trunk/zysms/include/class/message_class.php
PHP
asf20
2,624
<?php /* * -------------------- * Created on 2011-10-20 * @author arthur * email:15215557835@qq.com * -------------------- */ class admin{ private $admin_id; private $admin_login_name; private $admin_login_password; private $admin_real_name; private $admin_remark; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } /* *添加用户 * */ function addAdmin(){ $sql = "select count(admin_id) as a from zy_admin where admin_login_name='$this->admin_login_name'"; $count=$GLOBALS['mysql']->selectId($sql,false); if($count->a>0){ $message=array(1); return $message; } if($this->admin_login_password) { $sql = "insert into zy_admin(`admin_login_name`,`admin_login_password`,`admin_real_name`,`admin_remark`) " . "values('$this->admin_login_name','$this->admin_login_password','$this->admin_real_name','$this->admin_remark')"; $GLOBALS['mysql']->insert($sql,false); } else { $message=array(2); return $message; } } /* * 根据Id号删除用户 * */ function deleteAdmin(){ $sql = "delete from zy_admin where admin_id='$this->admin_id'"; $GLOBALS['mysql']->delete($sql); } /* * 修改用户信息 * */ function updateAdmin(){ if($this->admin_login_password) { $sql = "update zy_admin set admin_login_password='$this->admin_login_password',admin_real_name='$this->admin_real_name',admin_remark='$this->admin_remark' where admin_id='$this->admin_id'"; $GLOBALS['mysql']->upadte($sql); }else{ $message=array(2); return $message; } } /* * 查询所有用户信息 * */ function queryAdmin(){ $sql = "SELECT * FROM zy_admin ORDER BY admin_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /* * 根据Id号查询单个用户信息 * */ function queryAdminId(){ $sql = "select * from zy_admin where admin_id='$this->admin_id'"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } /* * 分页查询公司信息 * */ function queryPage() { $sql="select * from zy_admin"; $rs = mysql_query($sql); return $rs; } function countAdmin(){ $sql="SELECT COUNT(admin_id) as count FROM `zy_admin`"; $arr=$GLOBALS['mysql']->selectId($sql); return $arr->count; } } ?>
zysms
trunk/zysms/include/class/admin_class.php
PHP
asf20
2,779
<?php /* * -------------------- * Created on 2011-10-20 * @author arthur * email:15215557835@qq.com * -------------------- */ class login{ private $admin_login_name; private $admin_login_password; /*前台属性*/ private $company_id; private $department_name; private $user_login_name; private $user_login_password; private $user_id; private $roleid; private $user_real_name; private $user_email; private $user_phone; private $user_mobile; private $user_remark; private $group; private $login_by_params; //获取私有变量 public function __get($allVariables) { if(isset($this->$allVariables)) { return ($this->$allVariables); } else { return (null); } } //设置私有变量 public function __set($allVariables,$value) { $this->$allVariables = $value; } /*检查后台用户是否存在*/ function check() { /* $_POST['group']==1 admin; $_SESSION['user']['admin'] * group=2 customer $_SESSION['user']['customer'] * * login_by_params='no' 当login_by_params等于'1'的时候无须验证帐号密码匹配,根据ID号直接登录 * $sql="select * from zy_user where admin_login_name='$this->admin_login_name' and admin_login_password='$this->admin_login_password'"; $sql="select * from zy_user where user_id=".$this->company_id; */ if($this->group == '1' ){ $sql="select * from zy_admin where admin_login_name='$this->admin_login_name' and admin_login_password='$this->admin_login_password'"; $arr=$GLOBALS['mysql']->selectId($sql); } else if($this->group == '2' ){ if($this->login_by_params==1){ $sql="select * from zy_user where company_id=".$this->company_id; }else{ $sql="select * from zy_user where user_login_name='$this->user_login_name' and user_login_password='$this->user_login_password'"; } $arr=$GLOBALS['mysql']->selectId($sql); } if(empty($arr)) { $message=array(1); return $message; } else { if($this->group == '1' ){ $_SESSION['user']['admin']=$arr; }else if($this->group == '2' ){ $_SESSION['user']['customer']=$arr; } header("location:index.php"); } } //判断用户是否已经登陆 function checkLogined($path){ if(!isset($_SESSION['user'][$path])){ //如果未登陆返回登录页 header("location:login.php"); }else{ global $smarty; $smarty->assign("user",$_SESSION['user']); return true; } } /* * 查询账户信息 * */ function queryAccount() { if($_SESSION['user']->tid == 0) { $sql="SELECT * from zy_user where zy_user.user_id=".$_SESSION['user']->user_id; }else{ $sql="select * from zy_user,zy_department,zy_company " . "where zy_user.tid=zy_department.tid " . "and zy_department.company_id=zy_company.company_id " . "and zy_user.user_id=".$_SESSION['user']->user_id; } $account=$GLOBALS['mysql']->select($sql); return $account; } //判断前台用户是否存在 function web_check() { $sql="select * from zy_user where `user_login_name`='$this->user_login_name' and `user_login_password`='$this->user_login_password'"; $arr=$GLOBALS['mysql']->selectId($sql); if(!empty($arr)) { if($arr->tid==0){ $tsql="select zy_company.* ,zy_user.* from zy_company,zy_user where zy_company.user_id=zy_user.user_id and zy_user.user_id=$arr->user_id"; }else{ $tsql="select zy_company.*,zy_department.* ,zy_user.* from zy_company,zy_user,zy_department where zy_department.tid=zy_user.tid and zy_user.user_id=$arr->user_id"; } $tarr=$GLOBALS['mysql']->selectId($tsql); $_SESSION['user']=$tarr; // header("location:myaccount.php"); } } /* * 判断前台用户是否已经登陆 * */ function checkLogin() { if(!isset($_SESSION['user'])) { //如果未登陆 header("location:index.php"); }else{ global $smarty; $smarty->assign("user",$_SESSION['user']); return true; } } /* * 修改前台用户 * */ function updateUser() { $sql="update zy_user set `user_login_password`='$this->user_login_password'," . "`user_real_name`='$this->user_real_name'," . "`user_email`='$this->user_email'," . "`user_phone`='$this->user_phone' where `user_id`='$this->user_id'"; $GLOBALS['mysql']->upadte($sql); } } ?>
zysms
trunk/zysms/include/class/login_class.php
PHP
asf20
4,629
<?php /** * Author:Arthur * Date:2013-1-31 * File Name:reply_history_class.php * Email:kingarthurx@sina.cn */ class Reply{ private $replyID; //主键ID private $clientid; //八优账号 private $company_id; //公司ID private $mobile; //回复电话 private $destmobile; //发短信出去的号码 private $content; //短信回复内容 private $time; //回复时间 private $msg_type; //回复类型 //__get()方法来获取私有属性 public function __get($property_name) { if (isset ($this-> $property_name)) { return ($this-> $property_name); } else { return (NULL); } } //__set()方法用来设置私有属性 public function __set($property_name, $value) { $this-> $property_name = $value; } /** * 查询回复记录 */ public function selectReply(){ $sql = "SELECT DISTINCT `zy_contact`.`contact_surname`,`zy_contact`.`contact_first_name`,zy_sms_reply.* FROM zy_sms_reply LEFT JOIN `zy_contact` ON zy_sms_reply.company_id = `zy_contact`.`company_id` AND zy_sms_reply.`mobile` = `zy_contact`.`contact_mobile` where `zy_sms_reply`.`company_id`=$this->company_id ORDER BY replyID DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 插入从八优服务器上取出的回复数据 */ public function insertReply(){ $sql="INSERT INTO `zy_sms_reply`(`company_id`,`clientid`,`mobile`,`destmobile`,`content`,`time`,`msg_type`) VALUES ($this->company_id,$this->clientid, $this->mobile,$this->destmobile,'$this->content','$this->time',$this->msg_type)"; $GLOBALS['mysql']->insert($sql,false); } /** * 查询短信回复记录 */ public function countReplyMessageHistory(){ $sql = "SELECT count(replyID) count FROM zy_sms_reply where company_id=$this->company_id"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } /** * 获取用户API 拿到用户名和密码 */ public function getUserApi($str){ if(!empty($str)){ $sql = "select * from zy_userapi where company_id=".$str; }else{ $sql = "select * from zy_userapi where company_id=".$_SESSION['user']['customer']->company_id; } $arr=$GLOBALS['mysql']->selectId($sql); return $arr; } }
zysms
trunk/zysms/include/class/reply_history_class.php
PHP
asf20
2,340
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: payment_class.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ class payment{ } ?>
zysms
trunk/zysms/include/class/payment_class.php
PHP
asf20
282
<?php /* * -------------------- * Created on 2011-11-4 * @author arthur * email:15215557835@qq.com * -------------------- */ class user{ private $user_id; private $company_id; private $department_id; private $user_login_name; private $user_login_passowrd; private $roleid; private $user_real_name; private $user_email; private $user_phone; private $user_mobile; private $user_remark; //获取私有变量 public function __get($allVariables) { if(isset($this->$allVariables)) { return ($this->$allVariables); } else { return (null); } } //设置私有变量 public function __set($allVariables,$value) { $this->$allVariables = $value; } /* * 增加公司部门职员 * * */ function addDepartment(){ $sql="insert into zy_user (`department_id`,`user_login_name`,`user_login_password`,`roleid`,`user_real_name`,`user_email`,`user_phone`,`user_mobile`,`user_remark`)" . " values ('$this->department_id','$this->user_login_name','$this->user_login_password','$this->roleid','$this->user_real_name','$this->user_email','$this->user_phone','$this->user_mobile','$this->user_remark')"; $user_id=$GLOBALS['mysql']->insert($sql,true); return $user_id; } function update_User($user_id){ $sql="update zy_user set company_id=".$_SESSION['user']['customer']->company_id." where user_id=".$user_id ; $GLOBALS['mysql']->upadte($sql); } /* * 删除一条职员信息 * */ function deleteUser(){ $sql="delete from zy_user where user_id='$this->user_id' and company_id=".$_SESSION['user']['customer']->company_id; $GLOBALS['mysql']->delete($sql); } /* * 查询职员信息总数 * */ function countUser(){ $sql="select count(user_id) as count from zy_user where company_id=".$_SESSION['user']['customer']->company_id; $COUNT=$GLOBALS['mysql']->selectId($sql); return $COUNT->count; } /* * 查询公司下的所有user,并分页 * */ function selectUser(){ $sql="SELECT * FROM zy_user where company_id=".$_SESSION['user']['customer']->company_id." ORDER BY user_id ASC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /* * 查询该公司下所有部门 * */ function selectDepartment(){ $sql="select zy_department.* from zy_department where company_id=".$_SESSION['user']['customer']->company_id; $department_arr=$GLOBALS['mysql']->select($sql); return $department_arr; } /* * 查询一个职员信息 * */ function AUserInquires(){ $sql="select zy_user.* from zy_user where user_id='$this->user_id'"; $department_arr=$GLOBALS['mysql']->selectId($sql); return $department_arr; } /* * 修改一条部门信息 * */ function updateUser(){ $sql="update zy_user set `department_id`='$this->department_id',`user_login_name`='$this->user_login_name',`user_login_password`='$this->user_login_password',`roleid`='$this->roleid',`user_real_name`='$this->user_real_name',`user_email`='$this->user_email',`user_phone`='$this->user_phone',`user_mobile`='$this->user_mobile',`user_remark`='$this->user_remark' where user_id='$this->user_id'"; $GLOBALS['mysql']->upadte($sql); } } ?>
zysms
trunk/zysms/include/class/user_class.php
PHP
asf20
3,493
<?php /** * Author:Arthur * Date:2013-2-20 * File Name:send_statistics_class.php * Email:kingarthurx@sina.cn */ class statistics{ private $message_content; private $contact_list_id; private $norepeat; private $userapi_id; private $api_id; private $sms_record_time; private $sms_success_list; private $sms_fail_list; private $sms_success_count; private $sms_fail_count; private $sms_content; private $user_id; private $department_id; private $company_id; private $sms_record_remark; private $isentry; private $mobile_list; private $cost; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } /** * 查询短信发送记录 * */ function queryMessageHistory(){ $sql="SELECT sms_record_id,api_id,zy_sms_record.sms_record_time,sms_content,zy_user.`user_real_name`,COUNT(sms_success_list) AS quantity FROM `zy_sms_record` LEFT JOIN zy_user ON zy_sms_record.`user_id` = zy_user.`user_id` WHERE zy_sms_record.company_id=$this->company_id GROUP BY DATE_FORMAT(zy_sms_record.sms_record_time, '%Y-%m-%d %H') DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 查询短信发送记录 * */ function countMessageHistory(){ $sql = "SELECT COUNT(*) as count FROM ( SELECT COUNT(sms_success_list) AS quantity, sms_record_time FROM `zy_sms_record` LEFT JOIN zy_user ON zy_sms_record.`user_id` = zy_user.`user_id` WHERE zy_sms_record.company_id=$this->company_id GROUP BY DATE_FORMAT(zy_sms_record.sms_record_time, '%Y-%m-%d %H')) AS ss"; $count=$GLOBALS['mysql']->selectId($sql); return $count->count; } }
zysms
trunk/zysms/include/class/send_statistics_class.php
PHP
asf20
2,023
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: buy_class.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/include/class/buy_class.php
PHP
asf20
253
<?php class api_class{ private $mobile; private $username; private $password; private $api_id; private $text; private $cost; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } function checkAPI(){ $sql="SELECT a.`company_id`,a.`department_id`,a.`user_id`,b.api_username,b.api_password,b.api_id,b.api_type,b.sender_name,c.balance FROM zy_user a,zy_userapi b,zy_info c WHERE a.`user_login_name`='$this->username' AND a.`user_login_password`='$this->password' AND b.`company_id`=a.`company_id` AND b.`company_id`=c.`company_id` AND b.`userapi_id`='$this->api_id' AND b.`api_status`=2"; $arr=$GLOBALS['mysql']->selectId($sql); return $arr; } }
zysms
trunk/zysms/include/class/api_class.php
PHP
asf20
976
<?php /* * Created on 2011-9-21 * @author arthur * 2011-9-21 */ class charge { private $category_id; private $charge_price; private $company_id; private $charge_start_date; private $charge_end_date; private $charge_count; //获取私有变量 public function __get($allVariables) { if(isset($this->$allVariables)) { return ($this->$allVariables); } else { return (null); } } //设置私有变量 public function __set($allVariables,$value) { $this->$allVariables = $value; } /* * 查询视频分类信息 * */ function queryCharge() { $sql="SELECT * FROM zy_charge,zy_category WHERE zy_charge.category_id = zy_category.category_id ORDER BY charge_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg']; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /* * 购买视频 * */ function purchase(){ $sql="insert into zy_charge (`company_id`,`category_id`,`charge_start_date`,`charge_count`,`charge_end_date`,`charge_price`) values ($this->company_id,$this->category_id,'$this->charge_start_date',$this->charge_count,'$this->charge_end_date',$this->charge_price)"; $GLOBALS['mysql']->insert($sql,false); } /* * 查询公司购买视频记录 * */ function queryCompanyID(){ $sql="select * from zy_charge where company_id=$this->company_id"; $chargeArr=$GLOBALS['mysql']->select($sql); return $chargeArr; } /* *更新购买记录数 * * */ function updateCount(){ $sql="update zy_charge set charge_count=$this->charge_count"; $GLOBALS['mysql']->upadte($sql); } /* * 分页查询公司信息 * */ function queryPage() { $sql="select * from zy_category"; $rs = mysql_query($sql); return $rs; } } ?>
zysms
trunk/zysms/include/class/charge_history_class.php
PHP
asf20
1,986
<?php /* * -------------------- * Created on 2011-10-20 * @author arthur * email:15215557835@qq.com * -------------------- */ class credit{ private $credit_id; private $credit_name; private $credit_volume; private $credit_price; private $credit_currency='AUD'; private $credit_sort=0; private $credit_status;//钱包状态 1:停用,2:启用,3:删除 private $credit_remark; /* * 获取私有变量 * */ public function __get($allVariables){ if(isset($this->$allVariables)){ return $this->$allVariables; } else { return null; } } /* * 设置私有变量 * */ public function __set($allVariables,$value){ $this->$allVariables = $value; } /* *添加钱包 * */ function addCredit(){ $sql = "INSERT INTO `zy_credit`(`credit_name`,`credit_volume`,`credit_price`,`credit_currency`,`credit_status`,`credit_sort`,`credit_remark`)VALUES ('$this->credit_name','$this->credit_volume',$this->credit_price,'$this->credit_currency',$this->credit_status,$this->credit_sort,'$this->credit_remark')"; $GLOBALS['mysql']->insert($sql,false); } /* * 根据Id号删除钱包.其实就是修改钱包状态 * */ function deleteCredit(){ $sql = "update zy_credit set credit_status=3 where credit_id='$this->credit_id'"; $GLOBALS['mysql']->delete($sql); } /* * 修改钱包 * */ function updateCredit(){ $sql = "update zy_credit set credit_name='$this->credit_name',credit_volume='$this->credit_volume',credit_price='$this->credit_price',credit_currency='$this->credit_currency',credit_status='$this->credit_status',credit_sort='$this->credit_sort',credit_remark='$this->credit_remark' where credit_id='$this->credit_id'"; $GLOBALS['mysql']->upadte($sql); } /** * 查询所有钱包 * */ function queryCredit(){ $sql = "SELECT * FROM zy_credit where credit_status<>3 ORDER BY credit_id DESC limit ".($GLOBALS['pages']-1)*$GLOBALS['displaypg'].",".$GLOBALS['displaypg'];; $arr=$GLOBALS['mysql']->select($sql); return $arr; } /** * 根据Id号查询单个钱包信息 * */ function queryCreditId(){ $sql = "select * from zy_credit where credit_id='$this->credit_id'"; $obj=$GLOBALS['mysql']->selectId($sql); return $obj; } function countCredit(){ $sql="select count(credit_id) count from zy_credit where credit_status<>3"; $arr=$GLOBALS['mysql']->selectId($sql); return $arr->count; } } ?>
zysms
trunk/zysms/include/class/credit_class.php
PHP
asf20
2,548
<?php /* * Created on 2012-4-20 *====================================== *Author: Administrator *Project:zy-sms *File: send_history_class.php *Date: 2012-4-20 *====================================== *TODO *@param @type @var @note */ ?>
zysms
trunk/zysms/include/class/send_history_class.php
PHP
asf20
262
<?php class BayouSmsSender { /** * 脚本执行时间。-1表示采用PHP的默认值。 * * @access private * @var integer $time_limit */ var $time_limit = -1; /** * 在多少秒之内,如果连接不可用,脚本就停止连接。-1表示采用PHP的默认值。 * * @access private * @var integer $connect_timeout */ var $connect_timeout = -1; /** * 连接后,限定多少秒超时。-1表示采用PHP的默认值。此项仅当采用CURL库时启用。 * * @access private * @var integer $stream_timeout */ var $stream_timeout = -1; /** * 是否使用CURL库来连接。false表示采用fsockopen进行连接。 * * @access private * @var boolean $use_curl */ var $use_curl = false; //调用例子,在最下面,仅供参考调用 public function sendsms($username,$password,$mobiles,$msg) { if(is_array($mobile_number)) { $mobile_number = implode(",",$mobile_number); } $content = urlEncode(urlEncode(mb_convert_encoding($msg, 'gb2312' ,'utf-8'))); $apidata="func=sendsms&username=$username&password=$password&mobiles=$mobiles&message=$content&smstype=0&timerflag=0&timervalue=&timertype=0&timerid=0"; $apiurl = "http://sms.c8686.com/Api/BayouSmsApiEx.aspx"; $ret= $this->request($apiurl,$apidata); $ret["body"]=mb_convert_encoding($ret["body"], 'utf-8' ,'gb2312'); if($ret && strpos($ret["body"],"<errorcode>0</errorcode>")>0) { $result=array('status'=>'1','msg'=>'成功','body'=>$ret["body"]); return $result; } else { $result=array('status'=>'0','msg'=>'失败','body'=>$ret["body"]); return $result; } } /** * 构造函数 * * @access public * @param integer $time_limit * @param integer $connect_timeout * @param integer $stream_timeout * @param boolean $use_curl * @return void */ function __construct($time_limit = -1, $connect_timeout = -1, $stream_timeout = -1, $use_curl = false) { //$this->transport($time_limit, $connect_timeout, $stream_timeout, $use_curl); $this->time_limit = $time_limit; $this->connect_timeout = $connect_timeout; $this->stream_timeout = $stream_timeout; $this->use_curl = $use_curl; } /** * 请求远程服务器 * * @access public * @param string $url 远程服务器的URL * @param mix $params 查询参数,形如bar=foo&foo=bar;或者是一维关联数组,形如array('a'=>'aa',...) * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 重大错误程序直接停止运行,否则返回false。 */ function request($url, $params = '', $method = 'POST', $my_header = '') { $fsock_exists = function_exists('fsockopen'); $curl_exists = function_exists('curl_init'); if (!$fsock_exists && !$curl_exists) { die('No method available!'); } if (!$url) { die('Invalid url!'); } if ($this->time_limit > -1)//如果为0,不限制执行时间 { set_time_limit($this->time_limit); } $method = $method === 'GET' ? $method : 'POST'; $response = ''; $temp_str = ''; /* 格式化将要发要送的参数 */ if ($params && is_array($params)) { foreach ($params AS $key => $value) { $temp_str .= '&' . $key . '=' . $value; } $params = preg_replace('/^&/', '', $temp_str); } /* 如果fsockopen存在,且用户不指定使用curl,则调用use_socket函数 */ if ($fsock_exists && !$this->use_curl) { $response = $this->use_socket($url, $params, $method, $my_header); } /* 只要上述条件中的任一个不成立,流程就转向这里,这时如果curl模块可用,就调用use_curl函数 */ elseif ($curl_exists) { $response = $this->use_curl($url, $params, $method, $my_header); } /* 空响应或者传输过程中发生错误,程序将返回false */ if (!$response) { return false; } return $response; } /** * 使用fsockopen进行连接 * * @access private * @param string $url 远程服务器的URL * @param string $params 查询参数,形如bar=foo&foo=bar * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 否则返回false。 */ function use_socket($url, $params, $method, $my_header) { $query = ''; $auth = ''; $content_type = ''; $content_length = ''; $request_body = ''; $request = ''; $http_response = ''; $temp_str = ''; $error = ''; $errstr = ''; $crlf = $this->generate_crlf(); if ($method === 'GET') { $query = $params ? "?$params" : ''; } else { $request_body = $params; $content_type = 'Content-Type: application/x-www-form-urlencoded' . $crlf; $content_length = 'Content-Length: ' . strlen($request_body) . $crlf . $crlf; } $url_parts = $this->parse_raw_url($url); $path = $url_parts['path'] . $query; if (!empty($url_parts['user'])) { $auth = 'Authorization: Basic ' . base64_encode($url_parts['user'] . ':' . $url_parts['pass']) . $crlf; } /* 格式化自定义头部信息 */ if ($my_header && is_array($my_header)) { foreach ($my_header AS $key => $value) { $temp_str .= $key . ': ' . $value . $crlf; } $my_header = $temp_str; } /* 构造HTTP请求头部 */ $request = "$method $path HTTP/1.0$crlf" . 'Host: ' . $url_parts['host'] . $crlf . $auth . $my_header . $content_type . $content_length . $request_body; if ($this->connect_timeout > -1) { $fp = @fsockopen($url_parts['host'], $url_parts['port'], $error, $errstr, $connect_timeout); } else { $fp = @fsockopen($url_parts['host'], $url_parts['port'], $error, $errstr); } if (!$fp) { return false;//打开失败 } if (!@fwrite($fp, $request)) { return false;//写入失败 } while (!feof($fp)) { $http_response .= fgets($fp); } if (!$http_response) { return false;//空响应 } $separator = '/\r\n\r\n|\n\n|\r\r/'; list($http_header, $http_body) = preg_split($separator, $http_response, 2); $http_response = array('header' => $http_header,//header肯定有值 'body' => $http_body);//body可能为空 @fclose($fp); return $http_response; } /** * 使用curl进行连接 * * @access private * @param string $url 远程服务器的URL * @param string $params 查询参数,形如bar=foo&foo=bar * @param string $method 请求方式,是POST还是GET * @param array $my_header 用户要发送的头部信息,为一维关联数组,形如array('a'=>'aa',...) * @return array 成功返回一维关联数组,形如array('header'=>'bar', 'body'=>'foo'), * 失败返回false。 */ function use_curl($url, $params, $method, $my_header) { /* 开始一个新会话 */ $curl_session = curl_init(); /* 基本设置 */ curl_setopt($curl_session, CURLOPT_FORBID_REUSE, true); // 处理完后,关闭连接,释放资源 curl_setopt($curl_session, CURLOPT_HEADER, true);//结果中包含头部信息 curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true);//把结果返回,而非直接输出 curl_setopt($curl_session, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);//采用1.0版的HTTP协议 $url_parts = $this->parse_raw_url($url); /* 设置验证策略 */ if (!empty($url_parts['user'])) { $auth = $url_parts['user'] . ':' . $url_parts['pass']; curl_setopt($curl_session, CURLOPT_USERPWD, $auth); curl_setopt($curl_session, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); } $header = array(); /* 设置主机 */ $header[] = 'Host: ' . $url_parts['host']; /* 格式化自定义头部信息 */ if ($my_header && is_array($my_header)) { foreach ($my_header AS $key => $value) { $header[] = $key . ': ' . $value; } } if ($method === 'GET') { curl_setopt($curl_session, CURLOPT_HTTPGET, true); $url .= $params ? '?' . $params : ''; } else { curl_setopt($curl_session, CURLOPT_POST, true); $header[] = 'Content-Type: application/x-www-form-urlencoded'; $header[] = 'Content-Length: ' . strlen($params); curl_setopt($curl_session, CURLOPT_POSTFIELDS, $params); } /* 设置请求地址 */ curl_setopt($curl_session, CURLOPT_URL, $url); /* 设置头部信息 */ curl_setopt($curl_session, CURLOPT_HTTPHEADER, $header); if ($this->connect_timeout > -1) { curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, $this->connect_timeout); } if ($this->stream_timeout > -1) { curl_setopt($curl_session, CURLOPT_TIMEOUT, $this->stream_timeout); } /* 发送请求 */ $http_response = curl_exec($curl_session); if (curl_errno($curl_session) != 0) { return false; } $separator = '/\r\n\r\n|\n\n|\r\r/'; list($http_header, $http_body) = preg_split($separator, $http_response, 2); $http_response = array('header' => $http_header,//肯定有值 'body' => $http_body); //可能为空 curl_close($curl_session); return $http_response; } /** * Similar to PHP's builtin parse_url() function, but makes sure what the schema, * path and port keys are set to http, /, 80 respectively if they're missing * * @access private * @param string $raw_url Raw URL to be split into an array * @author http://www.cpaint.net/ * @return array */ function parse_raw_url($raw_url) { $retval = array(); $raw_url = (string) $raw_url; // make sure parse_url() recognizes the URL correctly. if (strpos($raw_url, '://') === false) { $raw_url = 'http://' . $raw_url; } // split request into array $retval = parse_url($raw_url); // make sure a path key exists if (!isset($retval['path'])) { $retval['path'] = '/'; } // set port to 80 if none exists if (!isset($retval['port'])) { $retval['port'] = '80'; } return $retval; } /** * 产生一个换行符,不同的操作系统会有不同的换行符 * * @access private * @return string 用双引号引用的换行符 */ function generate_crlf() { $crlf = ''; if (strtoupper(substr(PHP_OS, 0, 3) === 'WIN')) { $crlf = "\r\n"; } elseif (strtoupper(substr(PHP_OS, 0, 3) === 'MAC')) { $crlf = "\r"; } else { $crlf = "\n"; } return $crlf; } } //call example 调用实例 // $sender=new BayouSmsSender(); //$msg="这是个测试短信,短信内容要从非GB2312Z转化到GB2312,我们假设在UTF8环境下运行"; //$result=$sender->sendsms("800008","90bed51510b09ad5d325d8d174fa616c","13162550089,13162550089",$msg); //echo $result['status']; // echo $result['msg']; ?>
zysms
trunk/zysms/include/class/BayouSmsSender.php
PHP
asf20
13,636
<?php /* * Created on 2011-8-28 *====================================== *Author: Allen *Project:health360 *File: init.php *Date: 2011-8-28 *====================================== */ /*项目开发阶段使用*/ //error_reporting(E_ALL & ~E_NOTICE); /*项目上线时不报告 NOTICE错误*/ //error_reporting(E_ALL); error_reporting(0); if (__FILE__ == '') { die('Fatal error code: 0'); } session_start(); /* 取得当前project所在的根目录 */ define('ROOT_PATH', str_replace('include/init.php', '', str_replace('\\', '/', __FILE__))); require(ROOT_PATH . 'config/config.php'); /* 载入MYSQL,初始化 */ require(ROOT_PATH . 'include/class/mysql_class.php'); $mysql=new MYSQL($db_host,$db_user, $db_pass, $db_name); $GLOBALS['mysql']=$mysql; /*分页参数*/ $displaypg =9; $GLOBALS['displaypg']=$displaypg; /* 主题选择 */ //此项目暂不实现该功能 if(empty($web_theme_name)) { $_SESSION['web_theme_name']=WEB_THEME_NAME; } if(empty($admin_theme_name)) { $_SESSION['admin_theme_name']=ADMIN_THEME_NAME; } if(empty($theme_path)) { $_SESSION['theme_path']=THEME_PATH; } require(ROOT_PATH . 'include/lib/common_lib.php'); /*后台主题路径*/ define('ADMIN_THEME',get_admin_theme()); /*后台CSS样式路径*/ define('ADMIN_STYLE',get_admin_theme()."/css"); /*后台image路径*/ define('ADMIN_IMAGE',get_admin_theme()."/image"); /*后台JS路径*/ define('ADMIN_JS',get_admin_theme()."/js"); /*前台台主题路径*/ define('WEB_THEME',get_web_theme()); /*前台CSS路径*/ define('WEB_CSS',get_web_theme()."/css"); /*前台image路径*/ define('WEB_IMAGE',get_web_theme()."/img"); /*前台JS路径 */ define('WEB_JS',get_web_theme()."/js"); /*语言包路径 */ define('LANGUAGE_PATH',ROOT_URL."/language/language.php"); /* 初始化设置 */ @ini_set('memory_limit', '64M'); @ini_set('session.cache_expire', 180); @ini_set('session.use_trans_sid', 0); @ini_set('session.use_cookies', 1); @ini_set('session.auto_start', 0); @ini_set('display_errors', 1); if (DIRECTORY_SEPARATOR == '\\') { @ini_set('include_path', '.;' . ROOT_PATH); } else { @ini_set('include_path', '.:' . ROOT_PATH); } if (defined('DEBUG_MODE') == false) { define('DEBUG_MODE', 0); } if (PHP_VERSION >= '5.1' && !empty($timezone)) { date_default_timezone_set($timezone); } $php_self = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; if ('/' == substr($php_self, -1)) { $php_self .= 'index.php'; } define('PHP_SELF', $php_self); /* 限定语言项 */ $lang_array = array('english','chinese'); if(isset($_GET["language"])){ $language=$_GET["language"]; if (in_array($language,$lang_array)) { $_SESSION['language']=$language; } else{ $_SESSION['language'] = 'chinese';// 默认语言为英文 } }else if(!isset($_SESSION["language"])){ $_SESSION['language'] = 'chinese';// 默认语言为英文 } /* 载入语言文件 */ require(ROOT_PATH . 'language/' .$_SESSION['language'].'/'.ADMIN_PATH. '/common.php'); /* 载入Smarty木板引擎 */ require(ROOT_PATH . 'smarty/Smarty.class.php'); $smarty = new Smarty; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; $smarty->assign("web_theme_name",$_SESSION['web_theme_name']); $smarty->assign("admin_theme_name",$_SESSION['admin_theme_name']); $smarty->assign("theme_path",$_SESSION['theme_path']); //$smarty->assign("admin_theme",ADMIN_THEME); $smarty->assign("admin_css",ADMIN_STYLE); $smarty->assign("admin_image",ADMIN_IMAGE); $smarty->assign("admin_js",ADMIN_JS); //$smarty->assign("web_theme",WEB_THEME); $smarty->assign("web_css",WEB_CSS); $smarty->assign("web_image",WEB_IMAGE); $smarty->assign("web_js",WEB_JS); $smarty->assign("LANG",$_LANG); $smarty->assign("CHARSET",CHARSET); $smarty->assign("language",$_SESSION['language']); $smarty->assign("LANGUAGE_PATH",LANGUAGE_PATH); $smarty->assign("ROOT_URL",ROOT_URL); $smarty->assign("admin_theme",$_SESSION['theme_path'].'/'.$_SESSION['admin_theme_name']); $smarty->assign("web_theme",$_SESSION['theme_path'].'/'.$_SESSION['web_theme_name']); /* 后台导航设置*/ /** * @param links_array( $title , $url , $submenu[0,1] , $menu_parent_id , $child_array ) * @param child_array( $title , $url , $subment[0,1] , $menu_parent_id , $child_id ) */ /* admin后台 */ $admin_link=array( //array($_LANG['MY_WORK '],"index.php",0,0,""), array($_LANG['SMS_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['SEND_MESSAGE'],"message.php",0,2,1), array($_LANG['MANAGE_TEMPLATE'],"template.php",0,2,1), array($_LANG['SEND_HISTORY'],"send_history.php",0,2,1), )), array($_LANG['COMPANY_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['MANAGE_COMPANY'],"company.php",0,2,1), )), array($_LANG['CONTACT_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['MANAGE_CONTACT'],"contact.php",0,2,1), array($_LANG['MANAGE_CONTACT_LIST'],"contact_list.php",0,2,2), )), array($_LANG['BILLING_MANAGEMENT'],"javascript:void(0);",1,1,array( array($_LANG['MANAGE_CREDIT'],"credit.php",0,1,2), array($_LANG['COMPANY_CHARGE'],"charge.php",0,1,2), )), array($_LANG['SYSTEM_MANAGEMENT'],"javascript:void(0);",1,3,array( array($_LANG['MANAGE_ADMIN'],"admin.php",0,2,1), array($_LANG['MANAGE_PAYMENTS'],"payment.php",0,2,1), )), ); /* Customer后台 */ $customer_link=array( //array($_LANG['MY_WORK '],"index.php",0,0,""), array($_LANG['SMS_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['SEND_MESSAGE'],"sendMessage.php",0,2,1), array($_LANG['MANAGE_TEMPLATE'],"template.php",0,2,1), array($_LANG['SEND_HISTORY'],"send_history.php",0,2,1), array($_LANG['SEND_STATISTICS'],"send_statistics.php",0,2,1), array($_LANG['REPLY_HISTORY'],"reply_history.php",0,2,1), array($_LANG['MANAGER_API'],"userapi.php",0,2,1), )), array($_LANG['COMPANY_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['MANAGE_COMPANY'],"company.php",0,2,1), //array($_LANG['MANAGE_PAYMENT'],"payment.php",0,2,1), array($_LANG['MANAGE_DEPARTMENT'],"department.php",0,2,1), array($_LANG['MANAGE_USER'],"user.php",0,2,1), )), array($_LANG['CONTACT_MANAGEMENT'],"javascript:void(0);",1,2,array( array($_LANG['MANAGE_CONTACT'],"contact.php",0,2,1), array($_LANG['MANAGE_CONTACT_LIST'],"contact_list.php",0,2,2), array($_LANG['MANAGE_CONTACT_IMPORT'],"contact_import.php",0,2,3), )), array($_LANG['BILLING_MANAGEMENT'],"javascript:void(0);",1,1,array( array($_LANG['BUY'],"buy.php",0,1,1), array($_LANG['COMPANY_CHARGE'],"charge.php",0,1,2), )), ); /* 载入相关类 */ /* 添加部门 */ require(ROOT_PATH . 'include/class/company_class.php'); /*添加部门*/ require(ROOT_PATH . 'include/class/department_class.php'); /*添加职员*/ require(ROOT_PATH . 'include/class/user_class.php'); /*分页类*/ require(ROOT_PATH . 'include/class/page_class.php'); /*消费记录*/ require(ROOT_PATH . 'include/class/charge_history_class.php'); /*管理员设置*/ require(ROOT_PATH . 'include/class/admin_class.php'); /*用户判断*/ require(ROOT_PATH . 'include/class/login_class.php'); /*添加钱包*/ require(ROOT_PATH . 'include/class/credit_class.php'); /*联系人列表*/ require(ROOT_PATH . 'include/class/contact_class.php'); /*短信发送*/ require(ROOT_PATH . 'include/class/message_class.php'); /*API*/ require(ROOT_PATH . 'include/class/api_class.php'); /*八优API*/ require(ROOT_PATH . 'include/class/BayouSmsSender.php'); /*短信回复*/ require(ROOT_PATH . 'include/class/reply_history_class.php'); /*发送短信统计*/ require(ROOT_PATH . 'include/class/send_statistics_class.php'); /*系统对外接口验证,并发送信息*/ require(ROOT_PATH . 'include/class/receiveValidation_class.php'); if(!isset($_SESSION['token'])){ $token = mt_rand(0, 1000000); $_SESSION['token'] = $token; } $currentPage=explode("/",curPageURL()); if($currentPage[count($currentPage)-1]!="login.php"&&$currentPage[count($currentPage)-2]!="api") { $login=new login(); $news=$login->checkLogined($currentPage[count($currentPage)-2]); if(!$news==true) { header("location:login.php"); }else if($currentPage[count($currentPage)-2]=='customer'){ //显示账户余额 $company=new Company(); $company->company_id=$_SESSION['user']['customer']->company_id; $balance=$company->getBalanceByCompanyId(); $smarty->assign("balance",$balance); } } //根据用户角色显示导航 $smarty->assign("admin_menu",get_menu($admin_link)); $smarty->assign("customer_menu",get_menu($customer_link)); ?>
zysms
trunk/zysms/include/init.php
PHP
asf20
8,819
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @media print { .cke_path { display: none; } } .cke_skin_kama .cke_path { display: inline-block; float: left; margin-top: 5px; } .cke_skin_kama .cke_rtl .cke_path { float: right; } .cke_shared .cke_skin_kama .cke_path { _width: 100%; margin: 0 0 5px; } .cke_skin_kama .cke_path a, .cke_skin_kama .cke_path .cke_empty { display: inline-block; float: left; padding: 1px 4px 0; color: #60676a; cursor: default; } .cke_skin_kama .cke_path .cke_empty { visibility: hidden; } .cke_skin_kama .cke_rtl .cke_path a, .cke_skin_kama .cke_rtl .cke_path cke_empty { float: right; } .cke_skin_kama .cke_path a:hover, .cke_skin_kama .cke_path a:focus, .cke_skin_kama .cke_path a:active /* IE */ { background-color: #dff1ff; padding: 1px 4px 0; outline: none; color : #000; } /* IE double float-right workaround */ .cke_skin_kama .cke_browser_ie .cke_rtl .cke_path a, .cke_skin_kama .cke_browser_ie .cke_rtl .cke_path .cke_empty { float: none; } .cke_skin_kama .cke_path .cke_label { display: none; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/elementspath.css
CSS
asf20
1,236
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @import url("reset.css"); @import url("mainui.css"); @import url("panel.css"); @import url("toolbar.css"); @import url("menu.css"); @import url("richcombo.css"); @import url("elementspath.css"); @import url("icons.css"); @import url("presets.css"); /* Restore the container visibility */ html .cke_skin_kama { visibility: inherit; } html.cke_skin_kama_container { visibility: visible; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/editor.css
CSS
asf20
562
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /* Restore the dialog visibility */ body .cke_dialog { visibility: visible; } /* Force Gecko to consider table as positioned */ .cke_skin_kama table.cke_dialog.cke_browser_gecko { display:block; } .cke_skin_kama .cke_dialog_body { z-index: 1; border: solid 1px #ddd; padding: 5px; background-color: #fff; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; /* 'cke_dialog' element has been fixed positioned in all but IE6, while we need it to be positioned to hold e.g. close button. */ position: relative; _position: static; } .cke_skin_kama .cke_dialog_tl, .cke_skin_kama .cke_dialog_tr, .cke_skin_kama .cke_dialog_tc, .cke_skin_kama .cke_dialog_bl, .cke_skin_kama .cke_dialog_br, .cke_skin_kama .cke_dialog_bc, .cke_skin_kama .cke_dialog_ml, .cke_skin_kama .cke_dialog_mr { display:none; } .cke_skin_kama .cke_dialog_title { font-weight: bold; font-size: 14px; padding: 3px 3px 8px; cursor: move; position: relative; border-bottom: 1px solid #eee; } .cke_skin_kama .cke_browser_iequirks .cke_dialog_title, .cke_skin_kama .cke_browser_ie6 .cke_dialog_title, .cke_skin_kama .cke_browser_ie7 .cke_dialog_title { margin-bottom: 22px; } .cke_skin_kama .cke_browser_iequirks.cke_single_page .cke_dialog_title, .cke_skin_kama .cke_browser_ie6.cke_single_page .cke_dialog_title, .cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_title { margin-bottom: 10px; } .cke_skin_kama .cke_dialog_contents { background-color: #ebebeb; border: solid 1px #fff; border-bottom: none; overflow: auto; padding: 17px 10px 5px 10px; -moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px; border-top-left-radius: 5px; border-top-right-radius: 5px; margin-top: 22px; } .cke_skin_kama .cke_dialog_footer { text-align: right; background-color: #ebebeb; border: solid 1px #fff; border-bottom: none; -moz-border-radius-bottomleft: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } .cke_skin_kama .cke_rtl .cke_dialog_footer { text-align: left; } .cke_skin_kama .cke_dialog_footer .cke_resizer { margin-top: 20px; } .cke_skin_kama .cke_browser_iequirks .cke_dialog_footer .cke_resizer, .cke_skin_kama .cke_browser_ie6 .cke_dialog_footer .cke_resizer { margin-top: 27px; } /* tabs */ .cke_skin_kama .cke_dialog_tabs { height: 23px; display: inline-block; _display: block; margin-left:10px; margin-right:10px; margin-top: 11px; position: absolute; z-index: 2; } .cke_skin_kama .cke_browser_iequirks .cke_dialog_tabs, .cke_skin_kama .cke_browser_ie6 .cke_dialog_tabs, .cke_skin_kama .cke_browser_ie7 .cke_dialog_tabs { top: 33px; } .cke_skin_kama .cke_rtl .cke_dialog_tabs { right: 10px; } .cke_skin_kama a.cke_dialog_tab, .cke_skin_kama a:link.cke_dialog_tab, .cke_skin_kama a:active.cke_dialog_tab, .cke_skin_kama a:hover.cke_dialog_tab, .cke_skin_kama a:visited.cke_dialog_tab { background-image: url(images/sprites.png); background-repeat: repeat-x; background-position: 0 -1323px; background-color: #ebebeb; height: 14px; padding: 4px 8px; display: inline-block; cursor: pointer; } /* Gecko 1.8 layout workaround. */ .cke_skin_kama .cke_browser_gecko18 a.cke_dialog_tab, .cke_skin_kama .cke_browser_gecko18 a:link.cke_dialog_tab, .cke_skin_kama .cke_browser_gecko18 a:active.cke_dialog_tab, .cke_skin_kama .cke_browser_gecko18 a:hover.cke_dialog_tab, .cke_skin_kama .cke_browser_gecko18 a:visited.cke_dialog_tab { display: inline; position: relative; top: 6px; } .cke_skin_kama a:hover.cke_dialog_tab { background-color: #f1f1e3; } .cke_skin_kama .cke_hc a:hover.cke_dialog_tab { padding: 2px 6px !important; border-width: 3px; } .cke_skin_kama a.cke_dialog_tab_selected, .cke_skin_kama a:link.cke_dialog_tab_selected, .cke_skin_kama a:active.cke_dialog_tab_selected, .cke_skin_kama a:hover.cke_dialog_tab_selected, .cke_skin_kama a:visited.cke_dialog_tab_selected { background-position: 0 -1279px; cursor: default; } .cke_skin_kama .cke_hc a.cke_dialog_tab_selected, .cke_skin_kama .cke_hc a:link.cke_dialog_tab_selected, .cke_skin_kama .cke_hc a:active.cke_dialog_tab_selected, .cke_skin_kama .cke_hc a:hover.cke_dialog_tab_selected, .cke_skin_kama .cke_hc a:visited.cke_dialog_tab_selected { padding: 2px 6px !important; border-width: 3px; } /* single_page */ .cke_skin_kama .cke_single_page .cke_dialog_tabs { display: none; } .cke_skin_kama .cke_single_page .cke_dialog_contents { padding-top: 5px; margin-top: 10px; } /* IE7 + IE quirks */ .cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_contents { margin-top: 0px; position: relative; margin-bottom: -22px; } .cke_skin_kama .cke_dialog_ui_vbox table, .cke_skin_kama .cke_dialog_ui_hbox table { margin: auto; } .cke_skin_kama .cke_dialog_ui_vbox_child { padding: 5px 0px; } .cke_skin_kama input.cke_dialog_ui_input_text, .cke_skin_kama input.cke_dialog_ui_input_password { background-color: white; border: none; padding: 0px; width: 100%; height: 14px; } .cke_skin_kama div.cke_dialog_ui_input_text, .cke_skin_kama div.cke_dialog_ui_input_password { background-color: white; border: 1px solid #a0a0a0; padding: 1px 0px; /* IE6/Quirks - make sure the content does not overflow (#7321) */ _width: 99.9%; } /* Opera/IE doesn't leave enough padding in text input for cursor to blink in RTL. (#6087) */ .cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_ie.cke_rtl input.cke_dialog_ui_input_password, .cke_skin_kama .cke_browser_opera.cke_rtl input.cke_dialog_ui_input_password { padding-right: 2px; } /* Compensate the padding added above on container. */ .cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_password, .cke_skin_kama .cke_browser_opera.cke_rtl div.cke_dialog_ui_input_password { padding-left: 2px; } .cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_vbox_child, .cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_child, .cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_first, .cke_skin_kama .cke_browser_ie.cke_rtl .cke_dialog_ui_hbox_last { padding-right: 2px !important; } .cke_skin_kama .cke_browser_ie.cke_rtl div.cke_dialog_ui_input_text { padding-right: 1px; } .cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_gecko.cke_hc div.cke_dialog_ui_input_password { border-width: 0px; } .cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_text, .cke_skin_kama .cke_browser_gecko18.cke_hc div.cke_dialog_ui_input_password { border-width: 1px; } .cke_skin_kama textarea.cke_dialog_ui_input_textarea { background-color: white; border: none; padding: 0px; width: 100%; /* * IE6 BUG: Scrollbars in textareas can overflow even if the outer DIV is set to overflow:hidden. * So leave 1% width for the scrollbar. In most situations the 1% isn't noticeable by users. */ _width: 99%; overflow: auto; resize: none; } .cke_skin_kama div.cke_dialog_ui_input_textarea { background-color: white; border: 1px solid #a0a0a0; padding: 1px 0px; } .cke_skin_kama div.cke_disabled .cke_dialog_ui_labeled_content * { background-color : #a0a0a0; cursor : default; } /* RTL + IE6: Input overflows dialog element. (#7321) */ .cke_skin_kama .cke_rtl .cke_dialog_ui_labeled_content { _width: 95%; } .cke_skin_kama .cke_dialog_ui_hbox { width: 100%; } .cke_skin_kama .cke_dialog_ui_hbox_first, .cke_skin_kama .cke_dialog_ui_hbox_child, .cke_skin_kama .cke_dialog_ui_hbox_last { vertical-align: top; } .cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_first, .cke_skin_kama .cke_ltr .cke_dialog_ui_hbox_child { padding-right: 10px; } .cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_first, .cke_skin_kama .cke_rtl .cke_dialog_ui_hbox_child { padding-left: 10px; } /* button */ .cke_skin_kama a.cke_dialog_ui_button { border-collapse: separate; cursor: default; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; background: transparent url(images/sprites.png) repeat-x scroll 0 -1069px; _background: none; padding: 5px 0; text-align: center; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button { padding: 0; } /* IE6 buttons. */ .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span { width: 70px; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span { width: 100px; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button span { padding: 5px 15px; text-align: center; color: #3b3b1f; background: #53D9F0 none; display: inline-block; cursor: default; } /* END IE6 buttons. */ .cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button span.cke_dialog_ui_button { margin: 0; } .cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button { display:inline-block; padding-top: 3px; padding-bottom: 2px; margin: 2px 0; } .cke_skin_kama a.cke_dialog_ui_button_ok span, .cke_skin_kama a.cke_dialog_ui_button_cancel span { width:60px; padding-right: 20px; padding-left: 20px; } .cke_skin_kama a.cke_dialog_ui_button_ok { background-position: 0 -1143px; } .cke_skin_kama a.cke_dialog_ui_button_ok span { background: transparent url(images/sprites.png) no-repeat scroll right -1219px; } .cke_skin_kama .cke_rtl a.cke_dialog_ui_button_ok span { background-position: left -1219px; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span, .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span { background-color: #B8E834; margin-right: 0; } .cke_skin_kama a.cke_dialog_ui_button_cancel { background-position: 0 -1104px; } .cke_skin_kama a.cke_dialog_ui_button_cancel span { background: transparent url(images/sprites.png) no-repeat scroll right -1245px; } .cke_skin_kama .cke_rtl a.cke_dialog_ui_button_cancel span { background-position: left -1245px; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span, .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span { background-color: #F65D20; } .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_cancel span, .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_cancel span, .cke_skin_kama .cke_browser_iequirks a.cke_dialog_ui_button_ok span, .cke_skin_kama .cke_browser_ie6 a.cke_dialog_ui_button_ok span { background-image: none; } .cke_skin_kama span.cke_dialog_ui_button { padding: 2px 10px; text-align: center; color: #222; display: inline-block; cursor: default; min-width: 60px; +margin: 2px 0; /* IE7 */ } /* Gecko 1.8 does not support display: inline-block */ .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button { display: block; } .cke_skin_kama a.cke_dialog_ui_button span.cke_disabled { border: #898980 1px solid; color: #5e5e55; background-color: #c5c5b3; } .cke_skin_kama a:hover.cke_dialog_ui_button, .cke_skin_kama a:focus.cke_dialog_ui_button, .cke_skin_kama a:active.cke_dialog_ui_button { background-position: 0 -1179px; } .cke_skin_kama .cke_hc a:hover.cke_dialog_ui_button, .cke_skin_kama .cke_hc a:focus.cke_dialog_ui_button, .cke_skin_kama .cke_hc a:active.cke_dialog_ui_button { border-width: 2px; } /* Skip hover effect on IE6 */ .cke_skin_kama .cke_browser_iequirks a:hover.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_iequirks a:focus.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_iequirks a:active.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_ie6 a:hover.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_ie6 a:focus.cke_dialog_ui_button span, .cke_skin_kama .cke_browser_ie6 a:active.cke_dialog_ui_button span { background-image: none; background: #F7A922; } .cke_skin_kama .cke_dialog_footer_buttons { display: inline-table; margin-right: 12px; margin-left: 12px; width: auto; position: relative; } /* IE7 needs position static #6806 */ .cke_skin_kama .cke_browser_ie7 .cke_dialog_footer_buttons { position: static; } /* Gecko 1.8 does not support for display: inline-table */ .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons { display: inline; } .cke_skin_kama .cke_dialog_footer_buttons span.cke_dialog_ui_button { margin: 7px 0; text-align: center; } /* Firefox2 buttons */ .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons a.cke_dialog_ui_button { display: block; padding: 0; } .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons span.cke_dialog_ui_button { padding-bottom: 5px; padding-top: 6px; margin-bottom: 0; } .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_ok .cke_dialog_ui_button { background-position: right -1214px; } .cke_skin_kama .cke_browser_gecko18 .cke_dialog_footer_buttons .cke_dialog_ui_button_cancel .cke_dialog_ui_button { background-position: right -1242px; } /* END Firefox2 buttons */ .cke_skin_kama .cke_browser_ie9.cke_rtl .cke_dialog_footer_buttons td { padding-left: 2px; } .cke_skin_kama strong { font-weight: bold; } /* close_button */ .cke_skin_kama .cke_dialog .cke_dialog_body .cke_dialog_close_button { background-image: url(images/sprites.png); background-repeat: no-repeat; background-position: 0 -1022px; position: absolute; cursor: pointer; text-align: center; height: 20px; width: 20px; top: 5px; /* IE 6 */ _background-image: url(images/sprites_ie6.png); } .cke_skin_kama .cke_dialog_close_button span { display: none; } .cke_skin_kama .cke_dialog_close_button:hover { background-position: 0 -1045px; } .cke_skin_kama .cke_ltr .cke_dialog_close_button { right: 10px; } .cke_skin_kama .cke_browser_ie8.cke_rtl .cke_dialog_close_button { left: 8px; } .cke_skin_kama .cke_rtl .cke_dialog_close_button { left: 10px; } .cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button { left: 16px; top: 0; } /*.cke_skin_kama .cke_browser_ie6.cke_rtl .cke_dialog_close_button { left: 16px; }*/ /* IE7 + IE quirks */ .cke_skin_kama .cke_browser_ie7.cke_rtl .cke_dialog_close_button { position: absolute; left: 10px; top: 5px; } /* IE7 + IE quirks */ .cke_skin_kama .cke_browser_ie7.cke_single_page .cke_dialog_footer { margin-top: 22px; } .cke_skin_kama .cke_browser_ie6 .cke_dialog_close_button, .cke_skin_kama .cke_browser_iequirks .cke_dialog_close_button { top: 7px; } /* IE7 + IE quirks */ .cke_skin_kama .cke_browser_ie7.cke_ltr .cke_dialog_close_button { margin-top: 0; } .cke_skin_kama .cke_dialog_ui_input_select { border: 1px solid #a0a0a0; background-color: white; } .cke_skin_kama .cke_dialog_ui_input_file { width: 100%; height: 25px; } /* * Some utility CSS classes for dialog authors. */ .cke_skin_kama .cke_dialog .cke_dark_background { background-color: #eaead1; } .cke_skin_kama .cke_dialog .cke_hand { cursor: pointer; } .cke_skin_kama .cke_dialog .cke_centered { text-align: center; } .cke_skin_kama .cke_dialog a.cke_btn_reset { float: right; background-position: 0 -32px; background-image: url(images/mini.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: 1px none; font-size: 1px; } .cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_reset { float: left; } .cke_skin_kama .cke_dialog a.cke_btn_locked, .cke_skin_kama .cke_dialog a.cke_btn_unlocked { float: left; background-position: 0 0; background-image: url(images/mini.gif); width: 16px; height: 16px; background-repeat: no-repeat; border: none 1px; font-size: 1px; } .cke_skin_kama .cke_dialog a.cke_btn_locked .cke_icon { display:none; } .cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_locked, .cke_skin_kama .cke_rtl .cke_dialog a.cke_btn_unlocked { float: right; } .cke_skin_kama .cke_dialog a.cke_btn_unlocked { background-position: 0 -16px; background-image: url(images/mini.gif); } .cke_skin_kama .cke_dialog .cke_btn_over { border: outset 1px; cursor: pointer; } .cke_skin_kama .cke_dialog .ImagePreviewBox { border : 2px ridge black; overflow : scroll; height : 200px; width : 300px; padding : 2px; background-color : white; } .cke_skin_kama .cke_dialog .ImagePreviewBox table td { white-space: normal; } /* Fix iframedialog's height doesn't stretch to 100% #4863.*/ .cke_skin_kama .cke_browser_iequirks .cke_dialog_page_contents { _position: absolute; } .cke_skin_kama .cke_dialog .ImagePreviewLoader { position: absolute; white-space : normal; overflow : hidden; height : 160px; width : 230px; margin : 2px; padding : 2px; opacity : 0.9; filter : alpha(opacity=90); background-color : #e4e4e4; } .cke_skin_kama .cke_dialog .FlashPreviewBox { white-space : normal; border : 2px ridge black; overflow : auto; height : 160px; width : 390px; padding : 2px; background-color : white; } .cke_skin_kama .cke_dialog .cke_pastetext { width: 346px; height: 170px; } .cke_skin_kama .cke_dialog .cke_pastetext textarea { width: 340px; height: 170px; resize: none; } .cke_skin_kama .cke_dialog iframe.cke_pasteframe { width: 346px; height: 130px; background-color: white; border: 1px solid black; } .cke_skin_kama .cke_dialog .cke_dark_background { text-align : center; background-color: #eaead1; font-size : 14px; } .cke_skin_kama .cke_dialog .cke_light_background { text-align : center; background-color: #ffffbe; } .cke_skin_kama .cke_dialog .cke_hand { cursor: pointer; } .cke_skin_kama .cke_disabled { color: #a0a0a0; } /* High Contrast Mode */ .cke_skin_kama .cke_hc .cke_dialog_title, .cke_skin_kama .cke_hc .cke_dialog_tabs, .cke_skin_kama .cke_hc .cke_dialog_contents, .cke_skin_kama .cke_hc .cke_dialog_footer { border-left: 1px solid; border-right: 1px solid; } .cke_skin_kama .cke_hc .cke_dialog_title { border-top: 1px solid; } .cke_skin_kama .cke_hc .cke_dialog_footer { border-bottom: 1px solid; } .cke_skin_kama .cke_hc .cke_dialog_close_button span { display: inline; cursor: pointer; font-weight: bold; position: relative; top: 3px; } .cke_skin_kama .cke_dialog_body .cke_label { display: none; } .cke_skin_kama .cke_dialog_body label.cke_required { font-weight: bold; } .cke_skin_kama .cke_hc .cke_dialog_body .cke_label { display: inline; cursor: inherit; } .cke_skin_kama .cke_hc a.cke_btn_locked, .cke_skin_kama .cke_hc a.cke_btn_unlocked, .cke_skin_kama .cke_hc a.cke_btn_reset { border-style: solid; float: left; width: auto; height: auto; padding: 0 2px; } .cke_skin_kama .cke_rtl.cke_hc a.cke_btn_locked, .cke_skin_kama .cke_rtl.cke_hc a.cke_btn_unlocked, .cke_skin_kama .cke_rtl.cke_hc a.cke_btn_reset { float: right; } .cke_skin_kama .cke_hc a.cke_btn_locked .cke_icon { display:inline; } .cke_skin_kama a.cke_smile img { /* IE6 does not support transparent borders */ border: 2px solid #eaead1; } .cke_skin_kama a.cke_smile:focus img, .cke_skin_kama a.cke_smile:active img, .cke_skin_kama a.cke_smile:hover img { border-color: #C7C78F; } .cke_skin_kama .cke_hc .cke_dialog_tabs a, .cke_skin_kama .cke_hc .cke_dialog_footer a { opacity: 1.0; filter: alpha(opacity=100); border: 1px solid white; } .cke_skin_kama .cke_hc .ImagePreviewBox { width: 260px; } /** * Styles specific to "cellProperties" dialog. */ .cke_skin_kama .cke_dialog_contents a.colorChooser { display:block; margin-top:6px; margin-left: 10px; width: 80px; } .cke_skin_kama .cke_rtl .cke_dialog_contents a.colorChooser { margin-right: 10px; } /* Compensate focus outline for some input elements. (#6200) */ .cke_skin_kama .cke_browser_gecko .cke_dialog_ui_checkbox_input:focus, .cke_skin_kama .cke_browser_gecko .cke_dialog_ui_radio_input:focus, .cke_skin_kama .cke_browser_opera .cke_dialog_ui_checkbox_input:focus, .cke_skin_kama .cke_browser_opera .cke_dialog_ui_radio_input:focus, .cke_skin_kama .cke_browser_gecko .cke_dialog_ui_input_select:focus, .cke_skin_kama .cke_browser_gecko .cke_btn_over, .cke_skin_kama .cke_browser_opera .cke_btn_over, .cke_skin_kama .cke_browser_ie .cke_btn_over { outline: 1px dotted #696969; } /* IE<8 instead doesn't support CSS outline property, emulated with dotted border. */ /* Predefined border to avoid visual size change impact. */ .cke_skin_kama .cke_browser_ie .cke_dialog_ui_checkbox_input, .cke_skin_kama .cke_browser_ie .cke_dialog_ui_ratio_input, .cke_skin_kama .cke_browser_ie .cke_btn_reset, .cke_skin_kama .cke_browser_ie .cke_btn_locked, .cke_skin_kama .cke_browser_ie .cke_btn_unlocked { *border: 1px solid transparent !important; /* Emulating border-color: transparent in IE6.*/ -border: 1px solid red !important; -filter: chroma(color=red); } .cke_skin_kama .cke_browser_ie .cke_dialog_ui_focused, .cke_skin_kama .cke_browser_ie .cke_btn_over { *border: 1px dotted #696969 !important; } .cke_skin_kama .cke_iframe_shim { display:block; position:absolute; top:0; left:0; z-index:-1; filter:alpha(opacity=0); width:100%; height:100%; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/dialog.css
CSS
asf20
22,383
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /* "Source" button label */ .cke_skin_kama .cke_button_source .cke_label { display: inline; } /* "Styles" panel size */ .cke_skin_kama .cke_styles_panel { width: 150px; height: 170px; } /* "Format" panel size */ .cke_skin_kama .cke_format_panel { width: 150px; height: 170px; } /* "Font" panel size */ .cke_skin_kama .cke_font_panel { width: 150px; height: 170px; } /* "Font Size" panel size */ .cke_skin_kama .cke_fontSize_panel { height: 170px; } /* "Font Size" combo width */ .cke_skin_kama .cke_fontSize .cke_text { width: 25px; } /* "Font Size" combo width (IE Quirks) */ .cke_skin_kama .cke_browser_iequirks .cke_fontSize .cke_text { width: 32px; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/presets.css
CSS
asf20
866
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ .cke_skin_kama .cke_button_source .cke_icon { background-position: 0 0; } .cke_skin_kama .cke_button_docProps .cke_icon { background-position: 0 -16px; } .cke_skin_kama .cke_button_newpage .cke_icon { background-position: 0 -48px; } .cke_skin_kama .cke_button_preview .cke_icon { background-position: 0 -64px; } .cke_skin_kama .cke_button_cut .cke_icon { background-position: 0 -96px; } .cke_skin_kama .cke_button_copy .cke_icon { background-position: 0 -112px; } .cke_skin_kama .cke_button_paste .cke_icon { background-position: 0 -128px; } .cke_skin_kama .cke_button_pastetext .cke_icon { background-position: 0 -144px; } .cke_skin_kama .cke_button_find .cke_icon { background-position: 0 -240px; } .cke_skin_kama .cke_button_replace .cke_icon { background-position: 0 -256px; } .cke_skin_kama .cke_button_selectAll .cke_icon { background-position: 0 -272px; } .cke_skin_kama .cke_button_removeFormat .cke_icon { background-position: 0 -288px; } .cke_skin_kama .cke_button_bold .cke_icon { background-position: 0 -304px; } .cke_skin_kama .cke_button_italic .cke_icon { background-position: 0 -320px; } .cke_skin_kama .cke_button_underline .cke_icon { background-position: 0 -336px; } .cke_skin_kama .cke_button_strike .cke_icon { background-position: 0 -352px; } .cke_skin_kama .cke_button_subscript .cke_icon { background-position: 0 -368px; } .cke_skin_kama .cke_button_superscript .cke_icon { background-position: 0 -384px; } .cke_skin_kama .cke_button_table .cke_icon { background-position: 0 -608px; } .cke_skin_kama .cke_button_horizontalrule .cke_icon { background-position: 0 -624px; } .cke_skin_kama .cke_button_smiley .cke_icon { background-position: 0 -640px; } .cke_skin_kama .cke_button_link .cke_icon { background-position: 0 -528px; } .cke_skin_kama .cke_button_unlink .cke_icon { background-position: 0 -544px; } .cke_skin_kama .cke_button_anchor .cke_icon { background-position: 0 -560px; } .cke_skin_kama .cke_button_image .cke_icon { background-position: 0 -576px; } .cke_skin_kama .cke_button_flash .cke_icon { background-position: 0 -592px; } .cke_skin_kama .cke_button_specialchar .cke_icon { background-position: 0 -656px; } .cke_skin_kama .cke_button_pagebreak .cke_icon { background-position: 0 -672px; } .cke_skin_kama .cke_button_print .cke_icon { background-position: 0 -176px; } .cke_skin_kama .cke_button_checkspell .cke_icon, .cke_skin_kama .cke_button_scayt .cke_icon { background-position: 0 -192px; } .cke_skin_kama .cke_button_pagebreak .cke_icon { background-position: 0 -672px; } .cke_skin_kama .cke_button_textcolor .cke_icon { background-position: 0 -704px; } .cke_skin_kama .cke_button_bgcolor .cke_icon { background-position: 0 -720px; } .cke_skin_kama .cke_button_form .cke_icon { background-position: 0 -752px; } .cke_skin_kama .cke_button_checkbox .cke_icon { background-position: 0 -768px; } .cke_skin_kama .cke_button_radio .cke_icon { background-position: 0 -784px; } .cke_skin_kama .cke_button_textfield .cke_icon { background-position: 0 -800px; } .cke_skin_kama .cke_button_textarea .cke_icon { background-position: 0 -816px; } .cke_skin_kama .cke_button_showblocks .cke_icon { background-position: 0 -1136px; } .cke_skin_kama .cke_button_select .cke_icon { background-position: 0 -832px; } .cke_skin_kama .cke_button_button .cke_icon { background-position: 0 -848px; } .cke_skin_kama .cke_button_imagebutton .cke_icon { background-position: 0 -864px; } .cke_skin_kama .cke_button_hiddenfield .cke_icon { background-position: 0 -880px; } .cke_skin_kama .cke_button_undo .cke_icon { background-position: 0 -208px; } .cke_skin_kama .cke_rtl .cke_button_undo .cke_icon { background-position: 0 -224px; } .cke_skin_kama .cke_button_redo .cke_icon { background-position: 0 -224px; } .cke_skin_kama .cke_rtl .cke_button_redo .cke_icon { background-position: 0 -208px; } .cke_skin_kama .cke_button_templates .cke_icon { background-position: 0 -80px; } .cke_skin_kama .cke_button_numberedlist .cke_icon { background-position: 0 -400px; } .cke_skin_kama .cke_button_bulletedlist .cke_icon { background-position: 0 -416px; } .cke_skin_kama .cke_mixed_dir_content .cke_button_numberedlist .cke_icon { background-position: 0 -1217px; } .cke_skin_kama .cke_mixed_dir_content .cke_button_bulletedlist .cke_icon { background-position: 0 -1233px; } .cke_skin_kama .cke_button_outdent .cke_icon { background-position: 0 -432px; } .cke_skin_kama .cke_button_indent .cke_icon { background-position: 0 -448px; } .cke_skin_kama .cke_mixed_dir_content .cke_button_indent .cke_icon { background-position: 0 -1265px; } .cke_skin_kama .cke_mixed_dir_content .cke_button_outdent .cke_icon { background-position: 0 -1249px; } .cke_skin_kama .cke_button_justifyleft .cke_icon { background-position: 0 -464px; } .cke_skin_kama .cke_button_justifycenter .cke_icon { background-position: 0 -480px; } .cke_skin_kama .cke_button_justifyright .cke_icon { background-position: 0 -496px; } .cke_skin_kama .cke_button_justifyblock .cke_icon { background-position: 0 -512px; } .cke_skin_kama .cke_button_blockquote .cke_icon { background-position: 0 -1152px; } .cke_skin_kama .cke_button_creatediv .cke_icon { background-position: 0 -1168px; } .cke_skin_kama .cke_button_editdiv .cke_icon { background-position: 0 -1184px; } .cke_skin_kama .cke_button_removediv .cke_icon { background-position: 0 -1200px; } .cke_skin_kama .cke_button_flash .cke_icon { background-position: 0 -592px; } .cke_skin_kama .cke_button_pastefromword .cke_icon { background-position: 0 -160px; } .cke_skin_kama .cke_button_save .cke_icon { background-position: 0 -32px; } .cke_skin_kama .cke_button_about .cke_icon { background-position: 0 -736px; } .cke_skin_kama .cke_button_maximize .cke_icon { background-position: 0 -1040px; } .cke_skin_kama .cke_button_editdiv .cke_icon { background-position: 0 -1184px; } .cke_skin_kama .cke_button_bidirtl .cke_icon { background-position: 0 -1072px; } .cke_skin_kama .cke_button_bidiltr .cke_icon { background-position: 0 -1056px; } .cke_skin_kama .cke_button_iframe .cke_icon { background-position: 0 -1279px; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/icons.css
CSS
asf20
6,698
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ .cke_skin_kama .cke_panel { border: 1px solid #8f8f73; background-color: #fff; width: 120px; height: 100px; overflow: hidden; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; } .cke_skin_kama .cke_contextmenu { margin: 0; } /* Ideally we would use "inherit here"... but you know... IE :( */ .cke_skin_kama .cke_panel iframe { width: 100%; height: 100%; } /* * All the following styles are to be used inside the iframe that holds panel * contents. We don't use the cke_skin_default there to avoid the reset to be * active. * This is not an issue as we'll never have two skins running inside the same * panel iframe. */ html.cke_skin_kama_container { overflow: auto; overflow-x: hidden; } body.cke_panel_frame { overflow: auto; } .cke_panel_frame .cke_label { display: none; } ul.cke_panel_list { list-style-type: none; margin: 3px; padding: 0px; white-space: nowrap; } li.cke_panel_listItem { margin: 0px; } .cke_panel_listItem a { padding: 2px; display: block; border: 1px solid #fff; color: inherit !important; text-decoration: none; overflow: hidden; text-overflow: ellipsis; } /* IE6 */ * html .cke_panel_listItem a { width : 100%; /* IE is not able to inherit the color, so we must force it to black */ color: #000; } /* IE7 */ *:first-child+html .cke_panel_listItem a { /* IE is not able to inherit the color, so we must force it to black */ color: #000; } .cke_panel_listItem.cke_selected a { border: 1px solid #ccc; background-color: #e9f5ff; } .cke_panel_listItem a:hover, .cke_panel_listItem a:focus, .cke_panel_listItem a:active { border-color: #316ac5; background-color: #dff1ff; } .cke_hc .cke_panel_listItem.cke_selected a, .cke_hc .cke_panel_listItem a:hover, .cke_hc .cke_panel_listItem a:focus, .cke_hc .cke_panel_listItem a:active { border-width: 3px; padding: 0px; } .cke_panel_grouptitle { font-size: 11px; font-family: 'Microsoft Sans Serif' , Tahoma, Arial, Verdana, Sans-Serif; font-weight: bold; white-space: nowrap; background-color: #dcdcdc; color: #000; margin:0px; padding:3px; } .cke_panel_listItem p, .cke_panel_listItem h1, .cke_panel_listItem h2, .cke_panel_listItem h3, .cke_panel_listItem h4, .cke_panel_listItem h5, .cke_panel_listItem h6, .cke_panel_listItem pre { margin-top: 3px; margin-bottom: 3px; } .cke_skin_kama .cke_button_textcolor_panel, .cke_skin_kama .cke_button_bgcolor_panel { width: 150px; height: 135px; } .cke_colorblock { padding: 3px; font-size: 11px; font-family: 'Microsoft Sans Serif', Tahoma, Arial, Verdana, Sans-Serif; } .cke_colorblock, .cke_colorblock a { text-decoration: none; color: #000; } span.cke_colorbox { width: 10px; height: 10px; border: #808080 1px solid; float: left; } .cke_rtl span.cke_colorbox { float: right; } a.cke_colorbox { border: #fff 1px solid; padding: 2px; float: left; } .cke_rtl a.cke_colorbox { float: right; } a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox { border: #316ac5 1px solid; background-color: #dff1ff; } a.cke_colorauto, a.cke_colormore { border: #fff 1px solid; padding: 2px; display: block; cursor: pointer; } a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore { border: #316ac5 1px solid; background-color: #dff1ff; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/panel.css
CSS
asf20
3,732
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @media print { /* For printing, we simply hide the toolbar */ .cke_skin_kama .cke_toolbox { display: none; } } .cke_skin_kama .cke_browser_webkit .cke_toolbox, .cke_skin_kama .cke_browser_webkit .cke_toolbox > span { white-space: normal; } .cke_skin_kama .cke_toolbox { clear: both; /* Define the padding-bottom otherwise the collapser button will not be clickable #4932*/ padding-bottom: 1px; } .cke_skin_kama a.cke_toolbox_collapser, .cke_skin_kama a:hover.cke_toolbox_collapser { /* arrowtop.gif */ background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-position: 3px -1366px; /* +3px +4px */ background-repeat: no-repeat; width: 11px; height: 11px; float: right; border: 1px outset #D3D3D3; margin: 11px 0 2px; cursor: pointer; } .cke_skin_kama .cke_rtl a.cke_toolbox_collapser, .cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser { float: left; } .cke_skin_kama a.cke_toolbox_collapser span { display: none; } .cke_skin_kama .cke_hc a.cke_toolbox_collapser span { font-size: 10px; font-weight: bold; font-family: Arial; display: inline; } .cke_skin_kama a.cke_toolbox_collapser_min, .cke_skin_kama a:hover.cke_toolbox_collapser_min { /* arrowleft.gif*/ background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-position: 4px -1387px; /* +4px +3px */ background-repeat: no-repeat; margin: 2px 4px; } .cke_skin_kama .cke_rtl a.cke_toolbox_collapser_min, .cke_skin_kama .cke_rtl a:hover.cke_toolbox_collapser_min { /* arrowright.gif*/ background-position: 4px -1408px; /* +2px +3px */ } .cke_skin_kama .cke_separator { display: inline-block; border-left: solid 1px #D3D3D3; margin: 3px 2px 0; height: 16px; /* These are for IE < 8, but it's ok for the others */ vertical-align: top; } .cke_skin_kama .cke_break { font-size: 0; clear: left; } .cke_skin_kama .cke_rtl .cke_break { clear: right; } .cke_skin_kama .cke_toolbar_start { display: none; } .cke_skin_kama .cke_toolgroup { -moz-border-radius:5px; -webkit-border-radius: 5px; border-radius: 5px; background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-repeat: repeat-x; background-position: 0 -500px; float: left; margin-right: 6px; margin-bottom: 5px; padding: 2px; display: inline; } .cke_skin_kama .cke_rtl .cke_toolgroup { float: right; margin-right: 0; margin-left: 6px; } .cke_skin_kama .cke_button a, .cke_skin_kama .cke_button a:hover, .cke_skin_kama .cke_button a:focus, .cke_skin_kama .cke_button a:active, .cke_skin_kama .cke_button a.cke_off { border-radius: 3px; outline: none; padding: 2px 4px; height: 18px; display: inline-block; cursor: default; } .cke_skin_kama .cke_button a, .cke_skin_kama .cke_button a.cke_off { filter: alpha(opacity=70); /* IE */ opacity: 0.70; /* Safari, Opera and Mozilla */ -moz-border-radius: 3px; -webkit-border-radius: 3px; } .cke_skin_kama .cke_hc .cke_button a, .cke_skin_kama .cke_hc .cke_button a.cke_off { opacity: 1.0; filter: alpha(opacity=100); border: 1px solid white; } .cke_skin_kama .cke_button a.cke_on { background-color: #a3d7ff; filter: alpha(opacity=100); /* IE */ opacity: 1; /* Safari, Opera and Mozilla */ padding: 2px 4px; } .cke_skin_kama .cke_hc .cke_button a.cke_on { padding: 0 2px !important; border-width: 3px; } .cke_skin_kama .cke_button a.cke_disabled * { filter: alpha(opacity=30); /* IE */ opacity: 0.3; /* Safari, Opera and Mozilla */ } /* IE with zoom != 100% will distort the icons otherwise #4821 */ .cke_skin_kama .cke_browser_ie .cke_button a.cke_disabled *, .cke_skin_kama .cke_browser_ie a:hover.cke_button .cke_disabled * { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30); } .cke_skin_kama .cke_browser_ie .cke_rtl .cke_button a.cke_disabled *, .cke_skin_kama .cke_browser_ie .cke_rtl a:hover.cke_button .cke_disabled * { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=30); } .cke_skin_kama .cke_browser_ie6 .cke_button a.cke_disabled *, .cke_skin_kama .cke_browser_ie6 a:hover.cke_button .cke_disabled *, .cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix a.cke_disabled * { filter: alpha(opacity=30); } .cke_skin_kama .cke_hc .cke_button a.cke_disabled *, .cke_skin_kama .cke_browser_ie.cke_hc a:hover.cke_button .cke_disabled * { filter: alpha(opacity=60); opacity: 0.6; } .cke_skin_kama .cke_button a:hover.cke_on, .cke_skin_kama .cke_button a:focus.cke_on, .cke_skin_kama .cke_button a:active.cke_on, /* IE */ .cke_skin_kama .cke_button a:hover.cke_off, .cke_skin_kama .cke_button a:focus.cke_off, .cke_skin_kama .cke_button a:active.cke_off /* IE */ { filter: alpha(opacity=100); /* IE */ opacity: 1; /* Safari, Opera and Mozilla */ padding: 2px 4px; } .cke_skin_kama .cke_button a:hover, .cke_skin_kama .cke_button a:focus, .cke_skin_kama .cke_button a:active /* IE */ { background-color: #dff1ff; } .cke_skin_kama .cke_button a:hover.cke_on, .cke_skin_kama .cke_button a:focus.cke_on, .cke_skin_kama .cke_button a:active.cke_on /* IE */ { background-color: #86caff; } .cke_skin_kama .cke_hc .cke_button a:hover, .cke_skin_kama .cke_hc .cke_button a:focus, .cke_skin_kama .cke_hc .cke_button a:active /* IE */ { padding: 0 2px !important; border-width: 3px; } .cke_skin_kama .cke_button .cke_icon { background-image: url(icons.png); background-position: 100px; background-repeat: no-repeat; margin-top: 1px; width: 16px; height: 16px; display: inline-block; cursor: default; } .cke_skin_kama .cke_rtl .cke_button .cke_icon { background-image: url(icons_rtl.png); } /* IE with zoom != 100% will distort the icons otherwise #4821 */ .cke_skin_kama .cke_browser_ie .cke_button .cke_icon { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'); } .cke_skin_kama .cke_browser_ie .cke_rtl .cke_button .cke_icon { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'); } .cke_skin_kama .cke_browser_ie6 .cke_button .cke_icon, .cke_skin_kama .cke_browser_ie6 .cke_rtl .cke_button .cke_icon, .cke_skin_kama .cke_browser_ie .cke_button.cke_noalphafix .cke_icon, .cke_skin_kama .cke_browser_ie .cke_rtl .cke_button.cke_noalphafix .cke_icon { filter: ; } .cke_skin_kama .cke_button .cke_label { cursor: default; display: none; padding-left: 3px; line-height: 18px; vertical-align: middle; } .cke_skin_kama .cke_hc .cke_button .cke_label { padding: 0; display: inline-block; } .cke_skin_kama .cke_hc .cke_button .cke_icon { display: none; } .cke_skin_kama .cke_accessibility { position: absolute; display: block; width: 0; height: 0; overflow: hidden; } .cke_skin_kama .cke_button .cke_buttonarrow { display: inline-block; height: 17px; width: 8px; background-position: 2px -1469px; /* (+2, -5) */ background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-repeat: no-repeat; cursor: default; } /* IE with zoom != 100% will distort the icons otherwise #4821 */ .cke_skin_kama .cke_browser_ie .cke_button .cke_buttonarrow { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'); } .cke_skin_kama .cke_browser_ie6 .cke_button .cke_buttonarrow { filter: ; } /*** Firefox 2 ***/ .cke_skin_kama .cke_browser_gecko .cke_toolbar, .cke_skin_kama .cke_browser_gecko .cke_button a, .cke_skin_kama .cke_browser_gecko .cke_button a.cke_off, .cke_skin_kama .cke_browser_gecko .cke_button .cke_icon, .cke_skin_kama .cke_browser_gecko .cke_button .cke_buttonarrow, .cke_skin_kama .cke_browser_gecko .cke_separator, .cke_skin_kama .cke_browser_gecko .cke_toolbar_start { display: block; float: left; } .cke_skin_kama .cke_browser_gecko.cke_hc .cke_button .cke_icon { display: none; } .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button a, .cke_skin_kama .cke_browser_gecko .cke_rtl.cke_button a.cke_off, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_icon, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_buttonarrow, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_separator, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_toolbar_start { float: right; } .cke_skin_kama .cke_browser_gecko .cke_button .cke_label, .cke_skin_kama .cke_browser_gecko .cke_break { float: left; } .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_button .cke_label, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_break { float: right; } /*** WebKit ***/ /* We have originally used display:inline-block+float for cke_toolbar and it worked well in all browsers, except IE+RTL. We had to change it to inline and remove the float. This change didn't play well with Safari. */ .cke_skin_kama .cke_browser_webkit .cke_toolbar { float: left; } .cke_skin_kama .cke_browser_webkit .cke_rtl .cke_toolbar { float: right; } /*** Mixed Fixes ***/ .cke_skin_kama .cke_browser_ie .cke_button .cke_label { line-height: 16px; } /* Fix cursor shape consistency on toolbar combos (#4031) */ .cke_skin_kama .cke_browser_ie .cke_rcombo, .cke_skin_kama .cke_browser_ie .cke_rcombo * { cursor: default; } .cke_skin_kama .cke_browser_ie .cke_toolbox { padding-bottom: 5px; _padding-bottom: 6px; } .cke_shared .cke_skin_kama .cke_browser_ie .cke_toolbox { padding-bottom: 0; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/toolbar.css
CSS
asf20
9,963
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ .cke_skin_kama { display: block; } /* Main editor only settings. */ span.cke_skin_kama { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; border: 1px solid #D3D3D3; padding: 5px; } .cke_skin_kama span.cke_browser_webkit, .cke_skin_kama span.cke_browser_gecko18 { display: block; } .cke_skin_kama .cke_wrapper { -moz-border-radius: 5px; -webkit-border-radius: 5px; -webkit-touch-callout: none; border-radius: 5px; background-color: #d3d3d3; background-image: url(images/sprites.png); background-repeat: repeat-x; background-position: 0 -1950px; display: block; /* IE Quirks: editor chrome overflow horizontally without an explicit width. */ _display: inline-block; padding: 5px; /*background-color: Red;*/ } .cke_shared .cke_skin_kama .cke_wrapper { padding-bottom: 0; } .cke_skin_kama .cke_browser_ie6 .cke_wrapper, .cke_skin_kama .cke_browser_iequirks .cke_wrapper { background-image: none; } .cke_skin_kama .cke_editor { display: inline-table; width: 100%; } .cke_skin_kama .cke_browser_ie .cke_editor, .cke_skin_kama .cke_browser_webkit .cke_editor { display: table; /* #6684, #8342 */ } .cke_skin_kama .ltr .cke_browser_ie iframe { margin-right: -10px; } .cke_skin_kama .rtl .cke_browser_ie iframe { margin-left: -10px; } .cke_skin_kama .cke_browser_opera .cke_editor.cke_skin_kama .cke_resizer { display: table; } .cke_skin_kama .cke_contents { margin: 5px; } .cke_skin_kama .cke_hc .cke_contents { border: 1px solid black; } .cke_skin_kama .cke_contents iframe { background-color: #fff; } .cke_skin_kama .cke_focus { outline: auto 5px -webkit-focus-ring-color; } .cke_skin_kama textarea.cke_source { font-family: 'Courier New' , Monospace; font-size: small; background-color: #fff; white-space: pre; } .cke_skin_kama .cke_browser_iequirks textarea.cke_source { /* For IE6+Quirks only */ _white-space: normal; } .cke_skin_kama .cke_resizer { width: 12px; height: 12px; margin-top: 9px; display: block; float: right; /* resizer.gif*/ background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-position: 0 -1428px; background-repeat: no-repeat; cursor: se-resize; } /* Adobe AIR doesn't support *-resize cursor shape. */ .cke_skin_kama .cke_browser_air .cke_resizer, .cke_skin_kama .cke_browser_air .cke_rtl .cke_resizer { cursor: move; } .cke_skin_kama .cke_resizer_rtl { cursor: sw-resize; /* resizer_rtl.gif*/ background-position: 0 -1455px; float: left; } .cke_skin_kama .cke_resizer_horizontal, .cke_skin_kama .cke_rtl .cke_resizer_horizontal { cursor: e-resize; } .cke_skin_kama .cke_resizer_vertical, .cke_skin_kama .cke_rtl .cke_resizer_vertical { cursor: n-resize; } .cke_skin_kama .cke_maximized .cke_resizer { display: none; } .cke_skin_kama .cke_browser_ie6 .cke_contents textarea, .cke_skin_kama .cke_browser_ie7 .cke_contents textarea { position: absolute; } .cke_skin_kama .cke_browser_ie.cke_browser_quirks .cke_contents iframe { position: absolute; top: 0; } .cke_skin_kama .cke_browser_ie6 .cke_editor, .cke_skin_kama .cke_browser_ie7 .cke_editor { display: inline-block; } .cke_skin_kama .cke_browser_ie6 .cke_editor, .cke_shared .cke_skin_kama .cke_browser_ie7 .cke_wrapper { padding-bottom: 5px; } /* All voice labels are not displayed. */ .cke_skin_kama .cke_voice_label { display: none; } .cke_skin_kama legend.cke_voice_label { display: none; } .cke_skin_kama .cke_browser_ie legend.cke_voice_label { position: absolute; display: block; width: 0; height: 0; overflow: hidden; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/mainui.css
CSS
asf20
3,923
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /* Special Combo */ .cke_skin_kama .cke_rcombo { display: inline; } .cke_skin_kama .cke_rtl .cke_rcombo { } .cke_skin_kama .cke_rcombopanel { border: 1px solid #8F8F73; -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0; height: auto; _height: 100px; } /* IE6 workaround, shouldn't be here */ .cke_skin_kama .cke_browser_iequirks .cke_rcombopanel, .cke_skin_kama .cke_browser_ie6 .cke_rcombopanel { /* width: 150px;*/ } .cke_skin_kama .cke_rcombo a, .cke_skin_kama .cke_rcombo a:active, .cke_skin_kama .cke_rcombo a:hover { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-repeat: repeat-x; background-position: 0 -100px; border-bottom:1px solid #DAD9D9; border-right:1px solid #DAD9D9; float:left; padding: 2px; height: 21px; margin-right: 6px; margin-bottom: 5px; } .cke_skin_kama .cke_rtl .cke_rcombo a, .cke_skin_kama .cke_rtl .cke_rcombo a:active, .cke_skin_kama .cke_rtl .cke_rcombo a:hover { float:right; margin-right: 0; margin-left: 6px; } .cke_skin_kama .cke_hc .cke_rcombo a { filter: alpha(opacity=100); /* IE */ opacity: 1.0; /* Safari, Opera and Mozilla */ } .cke_skin_kama .cke_rcombo .cke_label { display: none; line-height: 26px; vertical-align: top; margin-right: 5px; filter: alpha(opacity=70); /* IE */ opacity: 0.70; /* Safari, Opera and Mozilla */ /* background-color: #f1f1e3; Because of IE6+ClearType */ } .cke_skin_kama .cke_rtl .cke_rcombo .cke_label { margin-right: 0; margin-left: 5px; } .cke_skin_kama .cke_rcombo .cke_inline_label { line-height: 21px; font-style: italic; color: #666666; } .cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton { vertical-align: top; } .cke_skin_kama .cke_hc .cke_rcombo .cke_label { filter: alpha(opacity=100); opacity: 1.0; } .cke_skin_kama .cke_rcombo .cke_text { filter: alpha(opacity=70); /* IE */ opacity: 0.70; /* Safari, Opera and Mozilla */ height: 21px; line-height: 21px; width:60px; text-overflow: ellipsis; overflow: hidden; display: inline-block; margin: 0 2px 0 4px; cursor: default; } .cke_skin_kama .cke_rtl .cke_rcombo .cke_text { margin: 0 4px 0 2px; } .cke_skin_kama .cke_rcombo .cke_openbutton { display: inline-block; } .cke_skin_kama .cke_rcombo .cke_openbutton .cke_icon { display: inline-block; background-image: url(images/sprites.png); _background-image: url(images/sprites_ie6.png); background-position: 0 -68px; background-repeat: no-repeat; width: 17px; height: 19px; margin: 1px 2px; } .cke_skin_kama .cke_hc .cke_rcombo .cke_openbutton .cke_icon { background: none; } .cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_openbutton { margin-bottom: 0; } .cke_skin_kama .cke_rcombo .cke_off a:hover .cke_text, .cke_skin_kama .cke_rcombo .cke_off a:focus .cke_text, .cke_skin_kama .cke_rcombo .cke_off a:active .cke_text, .cke_skin_kama .cke_rcombo .cke_on .cke_text { border-color: #316ac5; filter: alpha(opacity=100); /* IE */ opacity: 1; /* Safari, Opera and Mozilla */ } .cke_skin_kama .cke_rcombo .cke_off a:hover .cke_openbutton, .cke_skin_kama .cke_rcombo .cke_off a:focus .cke_openbutton, .cke_skin_kama .cke_rcombo .cke_off a:active .cke_openbutton, .cke_skin_kama .cke_rcombo .cke_on .cke_openbutton { border-color: #316ac5; background-color: #dff1ff; } .cke_skin_kama .cke_rcombo .cke_on .cke_text { -moz-border-radius-bottomleft: 0px; -webkit-border-bottom-left-radius: 0px; border-bottom-left-radius: 0px; } .cke_skin_kama .cke_rcombo .cke_on .cke_openbutton { -moz-border-radius-bottomright: 0px; -webkit-border-bottom-right-radius: 0px; border-bottom-right-radius: 0px; } .cke_skin_kama .cke_rcombo .cke_disabled .cke_label { filter: alpha(opacity=30); /* IE */ opacity: 0.3; /* Safari, Opera and Mozilla */ } .cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_label { filter: alpha(opacity=70); opacity: 0.7; } .cke_skin_kama .cke_rcombo .cke_disabled .cke_text, .cke_skin_kama .cke_rcombo .cke_disabled .cke_openbutton { filter: alpha(opacity=50); /* IE */ opacity: 0.5; /* Safari, Opera and Mozilla */ } /* IE with zoom != 100% will distort the icons otherwise #4821 */ .cke_skin_kama .cke_browser_ie .cke_rcombo .cke_disabled .cke_openbutton { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale'), alpha(opacity=50); } .cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_disabled .cke_openbutton { filter: alpha(opacity=50); } .cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_text, .cke_skin_kama .cke_hc .cke_rcombo .cke_disabled .cke_openbutton { filter: alpha(opacity=80); opacity: 0.8; } .cke_skin_kama .cke_rcombo .cke_disabled .cke_text { color: #fff; } /* RTL */ .cke_skin_kama .cke_rtl .cke_rcombo span { /* _zoom: 1;*/ } .cke_skin_kama .cke_rtl .cke_rcombo .cke_text { /* _float: left;*/ } /* Firefox 2 & WebKit Section */ .cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_openbutton, .cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_openbutton { display: block; float: left; } .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_text { /* float: right;*/ } .cke_skin_kama .cke_browser_gecko .cke_rcombo .cke_label, .cke_skin_kama .cke_browser_webkit .cke_rcombo .cke_label { /*display: block;*/ float: left; } .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_label, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_gecko .cke_rtl .cke_rcombo .cke_openbutton, .cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_label, .cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_webkit .cke_rtl .cke_rcombo .cke_openbutton { float: right; } .cke_skin_kama .cke_browser_ie7 .cke_rcombo .cke_text { line-height: 18px; } .cke_skin_kama .cke_browser_ie6 .cke_rcombo .cke_text, .cke_skin_kama .cke_browser_iequirks .cke_rcombo .cke_text { height: auto; line-height: 17px; } .cke_skin_kama .cke_rtl .cke_rcombo .cke_font .cke_text, .cke_skin_kama .cke_rtl .cke_rcombo .cke_fontSize .cke_text { direction: ltr; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/richcombo.css
CSS
asf20
6,786
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Reset and Default Values */ .cke_skin_kama *, .cke_skin_kama a:hover, .cke_skin_kama a:link, .cke_skin_kama a:visited, .cke_skin_kama a:active { margin: 0; padding: 0; border: 0; background: transparent; text-decoration: none; font: normal normal normal 100% Sans-Serif; width: auto; height: auto; border-collapse: collapse; text-align: left; vertical-align: baseline; white-space: nowrap; cursor: auto; color: #000; float: none; font-size: 12px; font-family: Arial,Helvetica,Tahoma,Verdana,Sans-Serif; } .cke_skin_kama .cke_rtl *, .cke_skin_kama .cke_rtl a:hover, .cke_skin_kama .cke_rtl a:link, .cke_skin_kama .cke_rtl a:visited, .cke_skin_kama .cke_rtl a:active, .cke_rtl .cke_skin_kama *, .cke_rtl .cke_skin_kama a:hover, .cke_rtl .cke_skin_kama a:link, .cke_rtl .cke_skin_kama a:visited, .cke_rtl .cke_skin_kama a:active { text-align: right; } .cke_skin_kama iframe { vertical-align: inherit; /** For IE */ } .cke_skin_kama textarea { white-space: pre; } .cke_skin_kama .cke_browser_gecko textarea { cursor: text; } .cke_skin_kama .cke_browser_gecko textarea[disabled] { cursor: default; } .cke_skin_kama input[type="text"], .cke_skin_kama input[type="password"] { cursor: text; } .cke_skin_kama input[type="text"][disabled], .cke_skin_kama input[type="password"][disabled] { cursor: default; } .cke_skin_kama fieldset { padding: 10px; border: 2px groove #E0DFE3; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/reset.css
CSS
asf20
1,651
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Styles for the "templates" plugin. */ .cke_skin_kama .cke_tpl_list { border: #dcdcdc 2px solid; background-color: #ffffff; overflow-y: auto; overflow-x: hidden; width: 100%; height: 220px; } .cke_skin_kama .cke_tpl_item { margin: 5px; padding: 7px; border: #eeeeee 1px solid; *width: 88%; } .cke_skin_kama .cke_tpl_preview { border-collapse: separate; text-indent:0; width: 100%; } .cke_skin_kama .cke_tpl_preview td { padding: 2px; vertical-align: middle; } .cke_skin_kama .cke_tpl_preview .cke_tpl_preview_img { width: 100px; } .cke_skin_kama .cke_tpl_preview span { white-space: normal; } .cke_skin_kama .cke_tpl_title { font-weight: bold; } .cke_skin_kama .cke_tpl_list a:active .cke_tpl_item, .cke_skin_kama .cke_tpl_list a:hover .cke_tpl_item, .cke_skin_kama .cke_tpl_list a:focus .cke_tpl_item { border: #ff9933 1px solid; background-color: #fffacd; } .cke_skin_kama .cke_tpl_list a:active *, .cke_skin_kama .cke_tpl_list a:hover *, .cke_skin_kama .cke_tpl_list a:focus * { cursor: pointer; } /* IE6 contextual selectors childs won't get :hover transition until, the hover style of the link itself contains certain CSS declarations.*/ .cke_skin_kama .cke_browser_ie6 .cke_tpl_list a:active, .cke_skin_kama .cke_browser_ie6 .cke_tpl_list a:hover, .cke_skin_kama .cke_browser_ie6 .cke_tpl_list a:focus { background-position: 0 0; } .cke_skin_kama .cke_hc .cke_tpl_list a:active .cke_tpl_item, .cke_skin_kama .cke_hc .cke_tpl_list a:hover .cke_tpl_item, .cke_skin_kama .cke_hc .cke_tpl_list a:focus .cke_tpl_item { border-width: 3px; } .cke_skin_kama .cke_tpl_empty, .cke_tpl_loading { text-align: center; padding: 5px; }
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/templates.css
CSS
asf20
1,903
/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.skins.add( 'kama', (function() { var uiColorStylesheetId = 'cke_ui_color'; return { editor : { css : [ 'editor.css' ] }, dialog : { css : [ 'dialog.css' ] }, richcombo : { canGroup: false }, templates : { css : [ 'templates.css' ] }, margins : [ 0, 0, 0, 0 ], init : function( editor ) { if ( editor.config.width && !isNaN( editor.config.width ) ) editor.config.width -= 12; var uiColorMenus = []; var uiColorRegex = /\$color/g; var uiColorMenuCss = "/* UI Color Support */\ .cke_skin_kama .cke_menuitem .cke_icon_wrapper\ {\ background-color: $color !important;\ border-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,\ .cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,\ .cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper\ {\ background-color: $color !important;\ border-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuitem a:hover .cke_label,\ .cke_skin_kama .cke_menuitem a:focus .cke_label,\ .cke_skin_kama .cke_menuitem a:active .cke_label\ {\ background-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,\ .cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,\ .cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label\ {\ background-color: transparent !important;\ }\ \ .cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,\ .cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,\ .cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper\ {\ background-color: $color !important;\ border-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper\ {\ background-color: $color !important;\ border-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuseparator\ {\ background-color: $color !important;\ }\ \ .cke_skin_kama .cke_menuitem a:hover,\ .cke_skin_kama .cke_menuitem a:focus,\ .cke_skin_kama .cke_menuitem a:active\ {\ background-color: $color !important;\ }"; // We have to split CSS declarations for webkit. if ( CKEDITOR.env.webkit ) { uiColorMenuCss = uiColorMenuCss.split( '}' ).slice( 0, -1 ); for ( var i = 0 ; i < uiColorMenuCss.length ; i++ ) uiColorMenuCss[ i ] = uiColorMenuCss[ i ].split( '{' ); } function getStylesheet( document ) { var node = document.getById( uiColorStylesheetId ); if ( !node ) { node = document.getHead().append( 'style' ); node.setAttribute( "id", uiColorStylesheetId ); node.setAttribute( "type", "text/css" ); } return node; } function updateStylesheets( styleNodes, styleContent, replace ) { var r, i, content; for ( var id = 0 ; id < styleNodes.length ; id++ ) { if ( CKEDITOR.env.webkit ) { for ( i = 0 ; i < styleContent.length ; i++ ) { content = styleContent[ i ][ 1 ]; for ( r = 0 ; r < replace.length ; r++ ) content = content.replace( replace[ r ][ 0 ], replace[ r ][ 1 ] ); styleNodes[ id ].$.sheet.addRule( styleContent[ i ][ 0 ], content ); } } else { content = styleContent; for ( r = 0 ; r < replace.length ; r++ ) content = content.replace( replace[ r ][ 0 ], replace[ r ][ 1 ] ); if ( CKEDITOR.env.ie ) styleNodes[ id ].$.styleSheet.cssText += content; else styleNodes[ id ].$.innerHTML += content; } } } var uiColorRegexp = /\$color/g; CKEDITOR.tools.extend( editor, { uiColor: null, getUiColor : function() { return this.uiColor; }, setUiColor : function( color ) { var cssContent, uiStyle = getStylesheet( CKEDITOR.document ), cssId = '.' + editor.id; var cssSelectors = [ cssId + " .cke_wrapper", cssId + "_dialog .cke_dialog_contents", cssId + "_dialog a.cke_dialog_tab", cssId + "_dialog .cke_dialog_footer" ].join( ',' ); var cssProperties = "background-color: $color !important;"; if ( CKEDITOR.env.webkit ) cssContent = [ [ cssSelectors, cssProperties ] ]; else cssContent = cssSelectors + '{' + cssProperties + '}'; return ( this.setUiColor = function( color ) { var replace = [ [ uiColorRegexp, color ] ]; editor.uiColor = color; // Update general style. updateStylesheets( [ uiStyle ], cssContent, replace ); // Update menu styles. updateStylesheets( uiColorMenus, uiColorMenuCss, replace ); })( color ); } }); editor.on( 'menuShow', function( event ) { var panel = event.data[ 0 ]; var iframe = panel.element.getElementsByTag( 'iframe' ).getItem( 0 ).getFrameDocument(); // Add stylesheet if missing. if ( !iframe.getById( 'cke_ui_color' ) ) { var node = getStylesheet( iframe ); uiColorMenus.push( node ); var color = editor.getUiColor(); // Set uiColor for new menu. if ( color ) updateStylesheets( [ node ], uiColorMenuCss, [ [ uiColorRegexp, color ] ] ); } }); // Apply UI color if specified in config. if ( editor.config.uiColor ) editor.setUiColor( editor.config.uiColor ); } }; })() ); (function() { CKEDITOR.dialog ? dialogSetup() : CKEDITOR.on( 'dialogPluginReady', dialogSetup ); function dialogSetup() { CKEDITOR.dialog.on( 'resize', function( evt ) { var data = evt.data, width = data.width, height = data.height, dialog = data.dialog, contents = dialog.parts.contents; if ( data.skin != 'kama' ) return; contents.setStyles( { width : width + 'px', height : height + 'px' }); }); } })(); /** * The base user interface color to be used by the editor. Not all skins are * compatible with this setting. * @name CKEDITOR.config.uiColor * @type String * @default '' (empty) * @example * // Using a color code. * config.uiColor = '#AADC6E'; * @example * // Using an HTML color name. * config.uiColor = 'Gold'; */
zysms
trunk/zysms/include/ckeditor/_source/skins/kama/skin.js
JavaScript
asf20
6,434