keyshot6渲染教程,点击相机中的top\front\right视图时模型消失不见,咋破?

Faint Print or no Image on the 2330d and 2330dn Printer | Dell 中国
知识库
Faint Print or no Image on the 2330d and 2330dn Printer
Article Summary:
How to troubleshoot faint print or no image on the 2330d and 2330dn printer
Select the "Print Quality" tab
Check that "Normal" quality is selected and the "Toner Darkness" option is set to "Use Printer Settings"
On the printer front panel press the Menu key
Press the Right Arrow until "Settings" is displayed
Press the Tick/Select key to select
Select "Quality Menu"
Select "Toner Darkness"
The default toner darkness setting is 8, use the Left or Right Arrow key to adjust then Tick/Select to submit
Remove the toner cartridge
Hold the cartridge over a sheet of paper to catch any loose toner, gently shake the cartridge to redistribute the toner
Reinsert the toner cartridge
If a new or known good toner cartridge is available fit this to the printer.
Switch the printer off
Open the front door, remove the toner cartridge and drum
Locate the drum and toner contacts on the right of the toner bay Check for damage, wipe away any loose toner
Locate the contacts on the underside of the toner cartridge
Check for damage, wipe away any loose toner
Locate the contacts on the right side of the imaging drum
Check for damage, wipe away any loose toner
Reinsert the toner and drum, close the cover, switch the printer on
If a new or known good imaging drum is available fit this to the printer.
Switch the printer off
Open the front door, remove the toner cartridge and drum
Locate the developer drive and imaging drum drive on the left side of the toner bay
Partially close the front cover, when the cover is lifted the drive cogs should move out to meet the toner and drum
Lower the front cover, the drive cogs should retractIf damage is found, .
If you require further assistance or wish to give us feedback, please engage our technical team on .
Quick Tips content is self-published by the Dell Support Professionals who resolve issues daily. In order to achieve a speedy publication, Quick Tips may represent only partial solutions or work-arounds that are still in development or pending further proof of successfully resolving an issue. As such Quick Tips have not been reviewed, validated or approved by Dell and should be used with appropriate caution. Dell shall not be liable for any loss, including but not limited to loss of data, loss of profit or loss of revenue, which customers may incur by following any procedure or advice set out in the Quick Tips.
文章ID: SLN288423
上次修改日期&#6/ PM
评价此文章
准确性
有用性
易理解性
这篇文章对您有帮助吗?
向我们发送反馈
反馈包含无效字符,不接受以下特殊字符:&&() \
请提供星级评级
请提供星级评级
请提供星级评级
请告知我们此信息是否解决了您的问题
反馈包含无效字符,不接受以下特殊字符:&&() \
剩余字符数。
浏览器不支持的功能
FireFox不支持为此功能使用安全连接(https)。要获得最佳体验,我们建议使用Internet Explorer或Chrome。This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use.
CodePlex is going read-only starting November 6th.
This project has moved.
For the latest updates, please .
DroidExplorer.0.8.8.6.x86 Unable to locate Android SDK directory
Coordinator
can you re-run the installer with &/l& that will enable logging and then post the log file here (or email to me camalot at gmail). the log file is created (bug) but empty if that switch doesn't exist. &did you install the SDK using the installer originally
or used the zip? If you installed it, was there a value to the SDK populated in the text box?
Coordinator
i just tested the x86 installer on an XP SP3 Virtual Machine that I freshly installed the Android SDK. It picked up the SDK without any issues.
Thank you for your prompt reply!
1. I re-ran the installer DroidExplorer.0.8.8.6.x86.exe &/I& as you indicated w log is huge so I will email it to you rather than posting here.
2. After the installer failed to identify my currently installed Android SDK installation, I chose to download SDK via the DroidExplorer.0.8.8.6.x86.exe installer, but did not re-install it over concerns that 3 existing and working apps that use Android SDK
may be impacted.
3. Are you able to indicate what exact files the installer is looking for in the SDK directory? I have the minimal defaults + Tools, Platform Tools, AVD Manager.exe, SDK Manager.exe. Otherwise I am clueless why my currently installed and functioning SDK is
not being recognized.
Thank you.
Coordinator
Coordinator
I would like to report I now have Droid Explorer installed and working.
Per your advice, I
1. opened the Android SDK Manager,
2. installed Android 4.1 (API 16)--&SDK Platform,
3. ran the Droid Explorer installer and installed successfully.
Thank you for your excellent assistance!
CATALYST2012 wrote:
I would like to report I now have Droid Explorer installed and working.
Per your advice, I
1. opened the Android SDK Manager,
2. installed Android 4.1 (API 16)--&SDK Platform,
3. ran the Droid Explorer installer and installed successfully.
Thank you for your excellent assistance!
I can confirm that I was having the same problem you've reported when I've tried to install the 0.8.8.7 version of Droid Explorer, and finally after installing
SDK platform&[Android 4.1 (API 16)]&&the showing error :&&Unable to identify the specified path as a valid Android SDK directory&
doesn't appair again and I got it installed successfully.
I'm using Windows 7 64bit
Coordinator
I am going to try and remove this requirement in the future. I have to make sure that nothing is actually using the platform stuff before i can remove the requirement though.
Coordinator
I followed the recommendation to install at least one platform. &By default, without me doing anything, it already has the Android 4.2 (API17) SDK platform installed. &So I added the &Android 4.1.2 (API16)& as well.
Screenshot
/fmQkm.png
But still the same issue, so for some reason, it did not work for me. &Are there any registry keys that need to be set or checked? &Thank you.
More progress: The key is to avoid the ADT version of the SDK (which is kind of hard since Google pushes that as the first option on the Downloads page).
Open the section called &Use an existing IDE&.
then &Download the SDK Tools for Windows&
You'll get a file called&installer_r21-windows.exe
Run that and it installs to:&C:\Program Files (x86)\Android\android-sdk\
The Android SDK Manager will start after installation.
Download one of the SDK platforms. &I chose &Android 4.2 (API 17)&.
After that, run the DroidExplorer installer and it installs fine. &But run it and there is a new error.
Could not find a part of the path
'C:\Users\Clevo\AppData\Roaming\DroidExplorer\a...\[Default].png'
Screenshot:&/m6zsb.png and&
/iLtjc.png
I've tried deleting
C:\Users\&username&\AppData\Roaming\DroidExplorer\Data\DroidExplorer.config
but it did not help.
I looked in the&C:\Users\Clevo\AppData\Roaming\DroidExplorer\ directory and I see two directories Data\ and logs\
There are a total of 2 files in the entire&DroidExplorer\ :
C:\Users\Clevo\AppData\Roaming\DroidExplorer\Data\DroidExplorer.config
C:\Users\Clevo\AppData\Roaming\DroidExplorer\logs\DroidExplorer.log
There is no directory called assets\ so I created it, then
I just created a simple png file with mspaint.
C:\Users\Clevo\AppData\Roaming\DroidExplorer\assets\[DEFAULT].png
After that it ran and I could connect to it, but I can't browse anything. &I have enabled 'USB Debugging' already.
This is a Galaxy Note 2.
final screenshot:&/x5bRw.png
Thank you very much for your help.
EDIT: PS: It looks like only the directory assets\ has to be created.
PPS: Tried 0.8.8.7 beta but still same issue, can't browse the filesystem but connects file.
This is a complete train wreck.&
If the correct download isn't available (and obvious) via the download link, remove the bloody link, please.
If you need something installed before running the installer, PLEASE TELL US HOW because:
... installing the confounded windows sdk installer as described above still gives the same error. To make the installer function correctly i had to (a) install only for me and (b) install the entire 4.2 SDK IN ADDITION TO the SDK tools.
This application was wonderful when i first installed it, but since it's become a PITA. I spent nearly two hours today on what should have been a 3 minute upgrade. &
Thanks for your work in the past. &
Same here! I'm working more than 2 hours to install droid explorer. all SDK have been installed but it still couldn't find it!!! which file it's looking for to locate the SDK locatiom!?!!
copy aapt.exe to your AppData\Local\Android\android-sdk\platform-tools folder
Droid Explorer is looking for that file, by default android adk does not have that file there anymore,
I got my copy from the Android\android-sdk\build-tools\17.0.0
carl1961 is right. copy aapt.exe from build-tools\17.0.0 folder to platform-tools folder.
Win 7 x64; DroidExplorer.0.8.8.11.x64. My phone is a Galaxy Nexus. Drivers are already installed, and I can easily use ADB and Fastboot.
I, too, receive the error message: &Unable to identify the specified path as a valid Android SDK directory&. However, I have not installed the SDK, so that isn't a surprise. I don't need the (huge) SDK; presumably I only need the contents of the SDK
platform-tools folder (plus perhaps the aapt.exe file). I created an AppData\Local\Android\android-sdk\platform-tools folder, and placed all of the SDK files for that folder there, together with aapt.exe. It didn't help.
I would like to layer Droid Explorer on top of my existing structure (hopefully without messing anything up). Can this be done? Presumably I have the correct files in an appropriate
it's merely a question of getting Droid Explorer to recognize
them during its installation process.
I have found out a way to fix this.........( ERROR )---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Here
is the layout how you should have it what you should do---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sdk path: C:\Development\adt-bundle-windows-x86_64----------That is the recommended spot where it worked for me.
copy any png image with name [DEFUALT].png to: C:\Users\Bailey Shrum\AppData\Roaming\DroidExplorer\assets
copy the aapt.exe from: C:\Development\adt-bundle-windows-x86_64-\sdk\build-tools\android-4.4 (to) C:\Users\Bailey Shrum\AppData\Local\Android\android-sdk\platform-tools.
Then open sdk manger and download&
-android sdk build-tools rev 19 & 17
-download sdk platforms: android 4.1.2 (api 16) sdk platform, android 4.2.2 (api 17) sdk platform, android 4.3 (api 18) sdk platform & android 4.4.2 (api 19) sdk platform.
The copy aapt.exe from: C:\Development\adt-bundle-windows-x86_64-\sdk\build-tools\17.0.0 (to) C:\Development\adt-bundle-windows-x86_64-\sdk\platform-tools
Then when you load the program it should work. It took me a couple of tries to fix this and before you do this install Droid Explorer after you move the sdk folder to: C:\Development\adt-bundle-windows-x86_64- and when it say select sdk path redirect
it to: C:\Development\adt-bundle-windows-x86_64-\sdk
I hope that this fixes your problem with droid root not working. I fyou have any questions email me at:
baileystephen wrote:
I have found out a way to fix this.........( ERROR )---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Here
is the layout how you should have it what you should do---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Sdk path: C:\Development\adt-bundle-windows-x86_64----------That is the recommended spot where it worked for me.
copy any png image with name [DEFUALT].png to: C:\Users\Bailey Shrum\AppData\Roaming\DroidExplorer\assets
copy the aapt.exe from: C:\Development\adt-bundle-windows-x86_64-\sdk\build-tools\android-4.4 (to) C:\Users\Bailey Shrum\AppData\Local\Android\android-sdk\platform-tools.
Then open sdk manger and download&
-android sdk build-tools rev 19 & 17
-download sdk platforms: android 4.1.2 (api 16) sdk platform, android 4.2.2 (api 17) sdk platform, android 4.3 (api 18) sdk platform & android 4.4.2 (api 19) sdk platform.
The copy aapt.exe from: C:\Development\adt-bundle-windows-x86_64-\sdk\build-tools\17.0.0 (to) C:\Development\adt-bundle-windows-x86_64-\sdk\platform-tools
Then when you load the program it should work. It took me a couple of tries to fix this and before you do this install Droid Explorer after you move the sdk folder to: C:\Development\adt-bundle-windows-x86_64- and when it say select sdk path redirect
it to: C:\Development\adt-bundle-windows-x86_64-\sdk
I hope that this fixes your problem with droid root not working. I fyou have any questions email me at:
Oh! .. Finally some smart one did the job .. Thank you very much .. worked with copying the aapt.exe file to the platform tools directory
Coordinator
Have you installed the latest version? it handles the sdk tools better than any previous version.
Coordinator
If you are having this issue you should look at the following Questions and Answers on Android Enthusiasts.
i just copied the aapt.exe from build-tools to platform-tools and now it's starting up!
Text Formatting
# Header 1
## Header 2
*italics* (or _italics_)
**bold** (or __bold__)
* Unordered List
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp * SubItem
1. Ordered List
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 1. SubItem
> Lorem ipsum
dolor sitamet
non. Lectus at
nam nunc...
`Inline Code`
if (foo==bar)
&nbsp&nbsp&nbsp&nbsp&nbsp&nbspbar++
References
[Link Text](URL)
![Image](URL)/ jingjia_pro
项目语言:None
权限:read-only(如需更高权限请先加入项目)
jingjia_pro/
Index: ftp.php
===================================================================
--- ftp.php (revision 0)
+++ ftp.php (revision 2)
@@ -0,0 +1,193 @@
+ * 远程操作常用函数
+ * 通过FTP同步图片到远程服务器
+ * @param string $path 图片路径(upload/store/goods/4)
+ * @param string $file 图片名称(含年月日/03f625d923bfb1caed68b.jpg)
+ * @param boolean $ifdel 是否删除本地图片,目前淘宝导入的图片上传到远程时,不会删除本地图片
+ * @return string 远程图片路径部分
+function remote_ftp($path, $file, $ifdel = true){
+ ftpcmd('upload', $path.'/'.$file);
+ $img_ext = explode(',', GOODS_IMAGES_EXT);
+ foreach ($img_ext as $val) {
if(!ftpcmd('error')) ftpcmd('upload', $path.'/'.str_ireplace('.', $val . '.', $file));
+ if(!ftpcmd('error')) {
if ($ifdel){
@unlink(BASE_PATH.'/'.$path.'/'.$file);
foreach ($img_ext as $val) {
@unlink(BASE_PATH.'/'.$path.'/'.str_ireplace('.', $val . '.', $file));
return C('ftp_access_url').'/'.$
+function ftpcmd($cmd, $arg1 = '') {
+ import('libraries.ftp');
+ static $
+ $ftpon = C('ftp_open');
+ if(!$ftpon) {
return $cmd == 'error' ? -101 : 0;
+ } elseif($ftp == null) {
$ftp = & NcFtp::instance();
+ if(!$ftp-&enabled) {
return $ftp-&error();
+ } elseif($ftp-&enabled && !$ftp-&connectid) {
$ftp-&connect();
+ switch ($cmd) {
case 'upload' : return $ftp-&upload(BASE_PATH.'/'.$arg1, $arg1);
case 'delete' : return $ftp-&ftp_delete($arg1);
case 'close'
: return $ftp-&ftp_close();
case 'error'
: return $ftp-&error();
case 'object' : return $
+function getremotefile($file) {
+ @set_time_limit(0);
+ $file = $file.'?'.time().rand();
+ $str = @implode('', @file($file));
+ if(!$str) {
$str = dfsockopen($file);
+ return $
+function dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE, $encodetype
= 'URLENCODE', $allowcurl = TRUE) {
+ return _dfsockopen($url, $limit, $post, $cookie, $bysocket, $ip, $timeout, $block, $encodetype, $allowcurl);
+function _dfsockopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE, $encodetype
= 'URLENCODE', $allowcurl = TRUE) {
+ $return = '';
+ $matches = parse_url($url);
+ $scheme = $matches['scheme'];
+ $host = $matches['host'];
+ $path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
+ $port = !empty($matches['port']) ? $matches['port'] : 80;
+ if(function_exists('curl_init') && function_exists('curl_exec') && $allowcurl) {
$ch = curl_init();
$ip && curl_setopt($ch, CURLOPT_HTTPHEADER, array(&Host: &.$host));
curl_setopt($ch, CURLOPT_URL, $scheme.'://'.($ip ? $ip : $host).':'.$port.$path);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if($post) {
curl_setopt($ch, CURLOPT_POST, 1);
if($encodetype == 'URLENCODE') {
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
parse_str($post, $postarray);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postarray);
if($cookie) {
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
$data = curl_exec($ch);
$status = curl_getinfo($ch);
$errno = curl_errno($ch);
curl_close($ch);
if($errno || $status['http_code'] != 200) {
return !$limit ? $data : substr($data, 0, $limit);
+ if($post) {
$out = &POST $path HTTP/1.0\r\n&;
$header = &Accept: */*\r\n&;
$header .= &Accept-Language: zh-cn\r\n&;
$boundary = $encodetype == 'URLENCODE' ? '' : '; boundary='.trim(substr(trim($post), 2, strpos(trim($post), &\n&) - 2));
$header .= $encodetype == 'URLENCODE' ? &Content-Type: application/x-www-form-urlencoded\r\n& : &Content-Type: multipart/form-data$boundary\r\n&;
$header .= &User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n&;
$header .= &Host: $host:$port\r\n&;
$header .= 'Content-Length: '.strlen($post).&\r\n&;
$header .= &Connection: Close\r\n&;
$header .= &Cache-Control: no-cache\r\n&;
$header .= &Cookie: $cookie\r\n\r\n&;
$out .= $header.$
+ } else {
$out = &GET $path HTTP/1.0\r\n&;
$header = &Accept: */*\r\n&;
$header .= &Accept-Language: zh-cn\r\n&;
$header .= &User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n&;
$header .= &Host: $host:$port\r\n&;
$header .= &Connection: Close\r\n&;
$header .= &Cookie: $cookie\r\n\r\n&;
+ $fpflag = 0;
+ if(!$fp = @fsocketopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout)) {
$context = array(
'http' =& array(
'method' =& $post ? 'POST' : 'GET',
'header' =& $header,
'content' =& $post,
'timeout' =& $timeout,
$context = stream_context_create($context);
$fp = @fopen($scheme.'://'.($ip ? $ip : $host).':'.$port.$path, 'b', false, $context);
$fpflag = 1;
+ if(!$fp) {
return '';
+ } else {
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
@fwrite($fp, $out);
$status = stream_get_meta_data($fp);
if(!$status['timed_out']) {
while (!feof($fp) && !$fpflag) {
if(($header = @fgets($fp)) && ($header == &\r\n& ||
$header == &\n&)) {
while(!feof($fp) && !$stop) {
$data = fread($fp, ($limit == 0 || $limit & 8192 ? 8192 : $limit));
$return .= $
if($limit) {
$limit -= strlen($data);
$stop = $limit &= 0;
@fclose($fp);
+function fsocketopen($hostname, $port = 80, &$errno, &$errstr, $timeout = 15) {
+ $fp = '';
+ if(function_exists('fsockopen')) {
$fp = @fsockopen($hostname, $port, $errno, $errstr, $timeout);
+ } elseif(function_exists('pfsockopen')) {
$fp = @pfsockopen($hostname, $port, $errno, $errstr, $timeout);
+ } elseif(function_exists('stream_socket_client')) {
$fp = @stream_socket_client($hostname.':'.$port, $errno, $errstr, $timeout);
+ return $
Index: adv.php
===================================================================
--- adv.php (revision 0)
+++ adv.php (revision 2)
@@ -0,0 +1,106 @@
+ * 取广告内容
+ * @param unknown_type $ap_id
+ * @param unknown_type $type html,js,array
+function advshow($ap_id, $type = 'js'){
+ if($ap_id & 1)
$ap_info = Model('adv')-&getApById($ap_id);
if (!$ap_info)
+ $list = $ap_info['adv_list'];unset($ap_info['adv_list']);
+ extract($ap_info);
+ if($is_use !== '1'){
+ $adv_list = array();
+ $adv_info = array();//异步调用的数组格式
+ foreach ((array)$list as $k=&$v){
if($v['adv_start_date'] & $time && $v['adv_end_date'] & $time && $v['is_allow'] == '1'){
$adv_list[] = $v;
if(empty($adv_list)){
if($ap_class == '1'){//文字广告
$content .= &&a href=''&&;
$content .= $default_
$content .= &&/a&&;
$content .= &&a href='' title='&.$ap_name.&'&&;
$content .= &&img style='width:{$width}height:{$height}px' border='0' src='&;
$content .= UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$default_
$content .= &' alt=''/&&;
$content .= &&/a&&;
$adv_info['adv_title'] = $ap_
$adv_info['adv_img'] = UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$default_
$adv_info['adv_url'] = '';
$select = 0;
if($ap_display == '1'){//多广告展示
$select = array_rand($adv_list);
$adv_select = $adv_list[$select];
extract($adv_select);
//图片广告
if($ap_class == '0'){
$pic_content = unserialize($adv_content);
= $pic_content['adv_pic'];
= $pic_content['adv_pic_url'];
$content .= &&a href='http://&.$pic_content['adv_pic_url'].&' target='_blank' title='&.$adv_title.&'&&;
$content .= &&img style='width:{$width}height:{$height}px' border='0' src='&;
$content .= UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$
$content .= &' alt='&.$adv_title.&'/&&;
$content .= &&/a&&;
$adv_info['adv_title'] = $adv_
$adv_info['adv_img'] = UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$
$adv_info['adv_url'] = 'http://'.$pic_content['adv_pic_url'];
//文字广告
if($ap_class == '1'){
$word_content = unserialize($adv_content);
= $word_content['adv_word'];
= $word_content['adv_word_url'];
$content .= &&a href='http://&.$pic_content['adv_word_url'].&' target='_blank'&&;
$content .= $
$content .= &&/a&&;
//Flash广告
if($ap_class == '3'){
$flash_content = unserialize($adv_content);
= $flash_content['flash_swf'];
= $flash_content['flash_url'];
$content .= &&a href='http://&.$url.&' target='_blank'&&button style='width:&.$width.& height:&.$height.& border: padding:0; background:' disabled&&object id='FlashID' classid='clsid:D27CDB6E-AE6D-11cf-96B8-' width='&.$width.&' height='&.$height.&'&&;
$content .= &&param name='movie' value='&;
$content .= UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$
$content .= &' /&&param name='quality' value='high' /&&param name='wmode' value='opaque' /&&param name='swfversion' value='9.0.45.0' /&&!-- 此 param 标签提示使用 Flash Player 6.0 r65 和更高版本的用户下载最新版本的 Flash Player。如果您不想让用户看到该提示,请将其删除。 --&&param name='expressinstall' value='&;
$content .= RESOURCE_SITE_URL.&/js/expressInstall.swf'/&&!-- 下一个对象标签用于非 IE 浏览器。所以使用 IECC 将其从 IE 隐藏。 --&&!--[if !IE]&--&&object type='application/x-shockwave-flash' data='&;
$content .= UPLOAD_SITE_URL.&/&.ATTACH_ADV.&/&.$
$content .= &' width='&.$width.&' height='&.$height.&'&&!--&![endif]--&&param name='quality' value='high' /&&param name='wmode' value='opaque' /&&param name='swfversion' value='9.0.45.0' /&&param name='expressinstall' value='&;
$content .= RESOURCE_SITE_URL.&/js/expressInstall.swf'/&&!-- 浏览器将以下替代内容显示给使用 Flash Player 6.0 和更低版本的用户。 --&&div&&h4&此页面上的内容需要较新版本的 Adobe Flash Player。&/h4&&p&&a href='/go/getflashplayer'&&img src='/images/shared/download_buttons/get_flash_player.gif' alt='获取 Adobe Flash Player' width='112' height='33' /&&/a&&/p&&/div&&!--[if !IE]&--&&/object&&!--&![endif]--&&/object&&/button&&/a&&;
+ if ($type == 'array' && $ap_class == '0'){
return $adv_
+ if ($type == 'js'){
$content = &document.write(\&&.$content.&\&);&;
+ return $
Index: statistics.php
===================================================================
--- statistics.php (revision 0)
+++ statistics.php (revision 2)
@@ -0,0 +1,163 @@
+ * 获得折线图统计图数据
+ * param $statarr 图表需要的设置项
+function getStatData_LineLabels($stat_arr){
+ //图表区、图形区和通用图表配置选项
+ $stat_arr['chart']['type'] = 'line';
+ //图表序列颜色数组
+ $stat_arr['colors']?'':$stat_arr['colors'] = array('#058DC7', '#ED561B', '#8bbc21', '#0d233a');
+ //去除版权信息
+ $stat_arr['credits']['enabled'] =
+ //导出功能选项
+ $stat_arr['exporting']['enabled'] =
+ //标题如果为字符串则使用默认样式
+ is_string($stat_arr['title'])?$stat_arr['title'] = array('text'=&&&b&{$stat_arr['title']}&/b&&,'x'=&-20):'';
+ //子标题如果为字符串则使用默认样式
+ is_string($stat_arr['subtitle'])?$stat_arr['subtitle'] = array('text'=&&&b&{$stat_arr['subtitle']}&/b&&,'x'=&-20):'';
+ //Y轴如果为字符串则使用默认样式
+ if(is_string($stat_arr['yAxis'])){
$text = $stat_arr['yAxis'];
unset($stat_arr['yAxis']);
$stat_arr['yAxis']['title']['text'] = $
+ return json_encode($stat_arr);
+ * 获得Column2D统计图数据
+function getStatData_Column2D($stat_arr){
//图表区、图形区和通用图表配置选项
+ $stat_arr['chart']['type'] = 'column';
+ //去除版权信息
+ $stat_arr['credits']['enabled'] =
+ //导出功能选项
+ $stat_arr['exporting']['enabled'] =
+ //标题如果为字符串则使用默认样式
+ is_string($stat_arr['title'])?$stat_arr['title'] = array('text'=&&&b&{$stat_arr['title']}&/b&&,'x'=&-20):'';
+ //子标题如果为字符串则使用默认样式
+ is_string($stat_arr['subtitle'])?$stat_arr['subtitle'] = array('text'=&&&b&{$stat_arr['subtitle']}&/b&&,'x'=&-20):'';
+ //Y轴如果为字符串则使用默认样式
+ if(is_string($stat_arr['yAxis'])){
$text = $stat_arr['yAxis'];
unset($stat_arr['yAxis']);
$stat_arr['yAxis']['title']['text'] = $
+ //柱形的颜色数组
+ $color = array('#7a96a4','#cba952','#667b16','#a26642','#;,'#c04f51','#5c315e','#445a2b','#adae50','#14638a','#b56367','#a399bb','#070dfa','#47ff07','#f809b7');
+ foreach ($stat_arr['series'] as $series_k=&$series_v){
foreach ($series_v['data'] as $data_k=&$data_v){
$data_v['color'] = $color[$data_k];
$series_v['data'][$data_k] = $data_v;
$stat_arr['series'][$series_k]['data'] = $series_v['data'];
+ //print_r($stat_arr);
+ return json_encode($stat_arr);
+ * 获得Basicbar统计图数据
+function getStatData_Basicbar($stat_arr){
//图表区、图形区和通用图表配置选项
+ $stat_arr['chart']['type'] = 'bar';
+ //去除版权信息
+ $stat_arr['credits']['enabled'] =
+ //导出功能选项
+ $stat_arr['exporting']['enabled'] =
+ //显示datalabel
+ $stat_arr['plotOptions']['bar']['dataLabels']['enabled'] =
+ //标题如果为字符串则使用默认样式
+ is_string($stat_arr['title'])?$stat_arr['title'] = array('text'=&&&b&{$stat_arr['title']}&/b&&,'x'=&-20):'';
+ //子标题如果为字符串则使用默认样式
+ is_string($stat_arr['subtitle'])?$stat_arr['subtitle'] = array('text'=&&&b&{$stat_arr['subtitle']}&/b&&,'x'=&-20):'';
+ //Y轴如果为字符串则使用默认样式
+ if(is_string($stat_arr['yAxis'])){
$text = $stat_arr['yAxis'];
unset($stat_arr['yAxis']);
$stat_arr['yAxis']['title']['text'] = $
+ //柱形的颜色数组
+ $color = array('#7a96a4','#cba952','#667b16','#a26642','#;,'#c04f51','#5c315e','#445a2b','#adae50','#14638a','#b56367','#a399bb','#070dfa','#47ff07','#f809b7');
+ foreach ($stat_arr['series'] as $series_k=&$series_v){
foreach ($series_v['data'] as $data_k=&$data_v){
if (!$data_v['color']){
$data_v['color'] = $color[$data_k%15];
$series_v['data'][$data_k] = $data_v;
$stat_arr['series'][$series_k]['data'] = $series_v['data'];
+ //print_r($stat_arr);
+ return json_encode($stat_arr);
+ * 计算环比
+function getHb($updata, $currentdata){
+ if($updata != 0){
$mtomrate = round(($currentdata - $updata)/$updata*100, 2).'%';
+ } else {
$mtomrate = '-';
+ return $
+ * 计算同比
+function getTb($updata, $currentdata){
+ if($updata != 0){
$ytoyrate = round(($currentdata - $updata)/$updata*100, 2).'%';
+ } else {
$ytoyrate = '-';
+ return $
+ * 地图统计图
+function getStatData_Map($stat_arr){
//$color_arr = array('#f63a3a','#ff5858','#ff9191','#ffc3c3','#ffd5d5');
$color_arr = array('#fd0b07','#ff9191','#f7ba17','#fef406','#25aae2');
$stat_arrnew = array();
foreach ($stat_arr as $k=&$v){
$stat_arrnew[] = array('cha'=&$v['cha'],'name'=&$v['name'],'des'=&$v['des'],'color'=&$color_arr[$v['level']]);
return json_encode($stat_arrnew);
+ * 获得饼形图数据
+function getStatData_Pie($data){
+ $stat_arr['chart']['type'] = 'pie';
+ $stat_arr['credits']['enabled'] =
+ $stat_arr['title']['text'] = $data['title'];
+ $stat_arr['tooltip']['pointFormat'] = '{series.name}: &b&{point.y}&/b&';
+ $stat_arr['plotOptions']['pie'] = array(
'allowPointSelect'=&true,
'cursor'=&'pointer',
'dataLabels'=&array(
'enabled'=&$data['label_show'],
'color'=&'#;,
'connectorColor'=&'#;,
'format'=&'&b&{point.name}&/b&: {point.percentage:.1f} %'
+ $stat_arr['series'][0]['name'] = $data['name'];
+ $stat_arr['series'][0]['data'] = array();
+ foreach ($data['series'] as $k=&$v){
$stat_arr['series'][0]['data'][] = array($v['p_name'],$v['allnum']);
+ //exit(json_encode($stat_arr));
+ return json_encode($stat_arr);
\ No newline at end of file
Index: goods.php
===================================================================
--- goods.php (revision 0)
+++ goods.php (revision 2)
@@ -0,0 +1,248 @@
+ * 商品图片统一调用函数
+ * @package
专业团队 提供售后服务
+ * 取得商品缩略图的完整URL路径,接收商品信息数组,返回所需的商品缩略图的完整URL
+ * @param array $goods 商品信息数组
+ * @param string $type 缩略图类型
值为60,240,360,1280
+ * @return string
+function thumb($goods = array(), $type = ''){
$type_array = explode(',_', ltrim(GOODS_IMAGES_EXT, '_'));
if (!in_array($type, $type_array)) {
$type = '240';
if (empty($goods)){
return UPLOAD_SITE_URL.'/'.defaultGoodsImage($type);
if (array_key_exists('apic_cover', $goods)) {
$goods['goods_image'] = $goods['apic_cover'];
if (empty($goods['goods_image'])) {
return UPLOAD_SITE_URL.'/'.defaultGoodsImage($type);
$search_array = explode(',', GOODS_IMAGES_EXT);
$file = str_ireplace($search_array,'',$goods['goods_image']);
$fname = basename($file);
//取店铺ID
if (preg_match('/^(\d+_)/',$fname)){
$store_id = substr($fname,0,strpos($fname,'_'));
$store_id = $goods['store_id'];
$file = $type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file);
if (!file_exists(BASE_UPLOAD_PATH.'/'.ATTACH_GOODS.'/'.$store_id.'/'.$file)){
return UPLOAD_SITE_URL.'/'.defaultGoodsImage($type);
$thumb_host = UPLOAD_SITE_URL.'/'.ATTACH_GOODS;
return $thumb_host.'/'.$store_id.'/'.$
+ * 取得商品缩略图的完整URL路径,接收图片名称与店铺ID
+ * @param string $file 图片名称
+ * @param string $type 缩略图尺寸类型,值为60,240,360,1280
+ * @param mixed $store_id 店铺ID 如果传入,则返回图片完整URL,如果为假,返回系统默认图
+ * @return string
+function cthumb($file, $type = '', $store_id = false) {
$type_array = explode(',_', ltrim(GOODS_IMAGES_EXT, '_'));
if (!in_array($type, $type_array)) {
$type = '240';
if (empty($file)) {
return UPLOAD_SITE_URL . '/' . defaultGoodsImage ( $type );
$search_array = explode(',', GOODS_IMAGES_EXT);
$file = str_ireplace($search_array,'',$file);
$fname = basename($file);
// 取店铺ID
if ($store_id === false || !is_numeric($store_id)) {
$store_id = substr ( $fname, 0, strpos ( $fname, '_' ) );
// 本地存储时,增加判断文件是否存在,用默认图代替
if ( !file_exists(BASE_UPLOAD_PATH . '/' . ATTACH_GOODS . '/' . $store_id . '/' . ($type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file)) )) {
return UPLOAD_SITE_URL.'/'.defaultGoodsImage($type);
$thumb_host = UPLOAD_SITE_URL . '/' . ATTACH_GOODS;
return $thumb_host . '/' . $store_id . '/' . ($type == '' ? $file : str_ireplace('.', '_' . $type . '.', $file));
+ * 商品二维码
+ * @param array $goods_info
+ * @return string
+function goodsQRCode($goods_info) {
if (!file_exists(BASE_UPLOAD_PATH. '/' . ATTACH_STORE . '/' . $goods_info['store_id'] . '/' . $goods_info['goods_id'] . '.png' )) {
return UPLOAD_SITE_URL.DS.ATTACH_STORE.DS.'default_qrcode.png';
return UPLOAD_SITE_URL.DS.ATTACH_STORE.DS.$goods_info['store_id'].DS.$goods_info['goods_id'].'.png';
+ * 商品二维码
+ * @param array $goods_info
+ * @return string
+function storeQRCode($store_id) {
if (!file_exists(BASE_UPLOAD_PATH. '/' . ATTACH_STORE . '/' . $store_id . '/' . $store_id . '_store.png' )) {
return UPLOAD_SITE_URL.DS.ATTACH_STORE.DS.'default_qrcode.png';
return UPLOAD_SITE_URL.DS.ATTACH_STORE.DS.$store_id.DS.$store_id.'_store.png';
+ * 取得抢购缩略图的完整URL路径
+ * @param string $imgurl 商品名称
+ * @param string $type 缩略图类型
值为small,mid,max
+ * @return string
+function gthumb($image_name = '', $type = ''){
+ if (!in_array($type, array('small','mid','max'))) $type = 'small';
+ if (empty($image_name)){
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
list($base_name, $ext) = explode('.', $image_name);
list($store_id) = explode('_', $base_name);
$file_path = ATTACH_GROUPBUY.DS.$store_id.DS.$base_name.'_'.$type.'.'.$
if(!file_exists(BASE_UPLOAD_PATH.DS.$file_path)) {
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
+ return UPLOAD_SITE_URL.DS.$file_
+ * 取得买家缩略图的完整URL路径
+ * @param string $imgurl 商品名称
+ * @param string $type 缩略图类型
值为240,1024
+ * @return string
+function snsThumb($image_name = '', $type = ''){
+ if (!in_array($type, array('240','1024'))) $type = '240';
+ if (empty($image_name)){
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
list($member_id) = explode('_', $image_name);
$file_path = ATTACH_MALBUM.DS.$member_id.DS.str_ireplace('.', '_'.$type.'.', $image_name);
if(!file_exists(BASE_UPLOAD_PATH.DS.$file_path)) {
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
+ return UPLOAD_SITE_URL.DS.$file_
+ * 取得积分商品缩略图的完整URL路径
+ * @param string $imgurl 商品名称
+ * @param string $type 缩略图类型
+ * @return string
+function pointprodThumb($image_name = '', $type = ''){
+ if (!in_array($type, array('small','mid'))) $type = '';
+ if (empty($image_name)){
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
if($type) {
$file_path = ATTACH_POINTPROD.DS.str_ireplace('.', '_'.$type.'.', $image_name);
$file_path = ATTACH_POINTPROD.DS.$image_
if(!file_exists(BASE_UPLOAD_PATH.DS.$file_path)) {
return UPLOAD_SITE_URL.'/'.defaultGoodsImage('240');
+ return UPLOAD_SITE_URL.DS.$file_
+ * 取得品牌图片
+ * @param string $image_name
+ * @return string
+function brandImage($image_name = '') {
if ($image_name != '') {
return UPLOAD_SITE_URL.'/'.ATTACH_BRAND.'/'.$image_
return UPLOAD_SITE_URL.'/'.ATTACH_COMMON.'/default_brand_image.gif';
+* 取得订单状态文字输出形式
+* @param array $order_info 订单数组
+* @return string $order_state 描述输出
+function orderState($order_info) {
switch ($order_info['order_state']) {
case ORDER_STATE_CANCEL:
$order_state = L('order_state_cancel');
case ORDER_STATE_NEW:
$order_state = L('order_state_new');
case ORDER_STATE_PAY:
$order_state = L('order_state_pay');
case ORDER_STATE_SEND:
$order_state = L('order_state_send');
case ORDER_STATE_SUCCESS:
$order_state = L('order_state_success');
return $order_
+ * 取得订单支付类型文字输出形式
+ * @param array $payment_code
+ * @return string
+function orderPaymentName($payment_code) {
return str_replace(
array('offline','online','alipay','tenpay','chinabank','predeposit','wxpay'),
array('货到付款','在线付款','支付宝','财付通','网银在线','站内余额支付','微信支付'),
$payment_code);
+ * 取得订单商品销售类型文字输出形式
+ * @param array $goods_type
+ * @return string 描述输出
+function orderGoodsType($goods_type) {
return str_replace(
array('1','2','3','4','5'),
array('','抢购','限时折扣','优惠套装','赠品'),
$goods_type);
+ * 取得结算文字输出形式
+ * @param array $bill_state
+ * @return string 描述输出
+function billState($bill_state) {
return str_replace(
array('1','2','3','4'),
array('已出账','商家已确认','平台已审核','结算完成'),
$bill_state);
Index: datehelper.php
===================================================================
--- datehelper.php (revision 0)
+++ datehelper.php (revision 2)
@@ -0,0 +1,64 @@
+ * 获得系统年份数组
+function getSystemYearArr(){
$year_arr = array('2010'=&'2010','2011'=&'2011','2012'=&'2012','2013'=&'2013','2014'=&'2014','2015'=&'2015','2016'=&'2016','2017'=&'2017','2018'=&'2018','2019'=&'2019','2020'=&'2020');
return $year_
+ * 获得系统月份数组
+function getSystemMonthArr(){
+ $month_arr = array('1'=&'01','2'=&'02','3'=&'03','4'=&'04','5'=&'05','6'=&'06','7'=&'07','8'=&'08','9'=&'09','10'=&'10','11'=&'11','12'=&'12');
+ return $month_
+ * 获得系统周数组
+function getSystemWeekArr(){
+ $week_arr = array('1'=&'周一','2'=&'周二','3'=&'周三','4'=&'周四','5'=&'周五','6'=&'周六','7'=&'周日');
+ return $week_
+ * 获取某月的最后一天
+function getMonthLastDay($year, $month){
$t = mktime(0, 0, 0, $month + 1, 1, $year);
$t = $t - 60 * 60 * 24;
return $t;
+ * 获得系统某月的周数组,第一周不足的需要补足
+function getMonthWeekArr($current_year, $current_month){
+ //该月第一天
+ $firstday = strtotime($current_year.'-'.$current_month.'-01');
+ //该月的第一周有几天
+ $firstweekday = (7 - date('N',$firstday) +1);
+ //计算该月第一个周一的时间
+ $starttime = $firstday--$firstweekday);
+ //该月的最后一天
+ $lastday = strtotime($current_year.'-'.$current_month.'-01'.& +1 month -1 day&);
+ //该月的最后一周有几天
+ $lastweekday = date('N',$lastday);
+ //该月的最后一个周末的时间
+ $endtime = $lastday-3600*24*($lastweekday%7);
+ $step = ;//步长值
+ $week_arr = array();
+ for ($i=$ $i&$ $i= $i+){
$week_arr[] = array('key'=&date('Y-m-d',$i).'|'.date('Y-m-d',$i+), 'val'=&date('Y-m-d',$i).'~'.date('Y-m-d',$i+));
+ return $week_
+ * 获取本周的开始时间和结束时间
+function getWeek_SdateAndEdate($current_time){
$current_time = strtotime(date('Y-m-d',$current_time));
+ $return_arr['sdate'] = date('Y-m-d', $current_time-86400*(date('N',$current_time) - 1));
+ $return_arr['edate'] = date('Y-m-d', $current_time+86400*(7- date('N',$current_time)));
+ return $return_
\ No newline at end of file
Index: rec_position.php
===================================================================
--- rec_position.php (revision 0)
+++ rec_position.php (revision 2)
@@ -0,0 +1,60 @@
+ * 调用推荐位
+ * @param unknown_type $rec_id
+ * @return string
+function rec_position($rec_id = null){
+ if (!is_numeric($rec_id))
+ $string = '';
if (C('cache_open')) {
$info = rkcache(&rec_position/{$rec_id}&, function($rec_id) {
$rec_id = substr($rec_id, strlen('rec_position/'));
return Model('rec_position')-&find($rec_id);
$file = BASE_DATA_PATH.'/cache/rec_position/'.$rec_id.'.php';
if (file_exists($file)) {
$info = require($file);
$info = Model('rec_position')-&find($rec_id);
write_file($file,$info);
+ $info['content'] = unserialize($info['content']);
+ if ($info['content']['target'] == 2) $target = 'target=&_blank&';else $target = '';
+ if ($info['pic_type'] == 0){//文字
foreach ((array)$info['content']['body'] as $v) {
$href = '';
if ($v['url'] != '') $href = &href=\&{$v['url']}\&&;
$string .= &&li&&a {$target} {$href}&{$v['title']}&/a&&/li&&;
$string = &&ul&{$string}&/ul&&;
+ }else{//图片
$width = $height = '';
if (is_numeric($info['content']['width'])) $width = &width=\&{$info['content']['width']}\&&;
if (is_numeric($info['content']['height'])) $height = &height=\&{$info['content']['height']}\&&;
if (is_array($info['content']['body'])) {
if (count($info['content']['body']) & 1) {
foreach ($info['content']['body'] as $v) {
if ($info['pic_type'] == 1) $v['title'] = UPLOAD_SITE_URL.'/'.$v['title'];
$href = '';
if ($v['url'] != '') $href = &href=\&{$v['url']}\&&;
$string .= &&li&&a {$target} {$href}&&img {$width} {$height} src=\&{$v['title']}\&&&/a&&/li&&;
$string = &&ul&{$string}&/ul&&;
$v = $info['content']['body'][0];
if ($info['pic_type'] == 1) $v['title'] = UPLOAD_SITE_URL.'/'.$v['title'];
$href = '';
if ($v['url'] != '') $href = &href=\&{$v['url']}\&&;
$string .= &&a {$target} {$href}&&img {$width} {$height} src=\&{$v['title']}\&&&/a&&;
+ return $
Index: build.php
===================================================================
--- build.php (revision 0)
+++ build.php (revision 2)
@@ -0,0 +1,113 @@
+ * 压缩框架
+ * 压缩框架文件
+function build(){
+ $args = func_get_args();
+ extract($args[0]);
+ $compile = '';
+ $list = array(
BASE_PATH.'/framework/core/runtime.php',
BASE_PATH.'/framework/core/base.php',
BASE_PATH.'/framework/core/model.php',
BASE_PATH.'/framework/cache/cache.php',
BASE_PATH.'/framework/cache/cache.file.php',
BASE_PATH.'/framework/db/'.strtolower($dbdriver).'.php',
BASE_PATH.'/framework/function/goods.php',
BASE_PATH.'/framework/libraries/email.php',
BASE_PATH.'/framework/libraries/language.php',
BASE_PATH.'/framework/libraries/log.php',
BASE_PATH.'/framework/libraries/page.php',
BASE_PATH.'/framework/libraries/security.php',
BASE_PATH.'/framework/libraries/validate.php',
BASE_PATH.'/framework/libraries/upload.php',
BASE_PATH.'/framework/function/core.php',
BASE_PATH.'/framework/tpl/nc.php',
BASE_PATH.'/control/control.php',
BASE_PATH.'/language/'.$lang_type.'/core_lang_index.php',
BASE_PATH.'/classes/process.class.php'
+ if (!empty($cache_type) && strtolower($cache_type) != 'file'){
$list[] = BASE_PATH.'/framework/cache/cache.'.strtolower($cache_type).'.php';
+ foreach ($list as $file) {
if (file_exists($file)) {
$compile .= compile($file);
exit(str_replace(BASE_PATH,'',$file).& isn't exists!&);
+ //加载核心语言包
+// $lang_file = BASE_PATH.'/language/'.$lang_type.'/core_lang_index.php';
+// if (!file_exists($lang_file)){
exit(str_replace(BASE_PATH,'',$lang_file).& isn't exists!&);
+ $compile .= compile($lang_file);
+ $compile .= &\nLanguage::appendLanguage(\$lang);&;
+ $compile .= &\nBase::run();&;
+ file_put_contents(RUNCOREPATH,compress_code(&&?php &.$compile));
+ * 过滤掉不需要压缩的内容
+ * @param string $filename 待压缩文件
+ * @return string
+function compile($filename) {
$content = file_get_contents($filename);
//过滤不需要编译的内容
$content = preg_replace('/\/\/\[NC_SKIPBUILD\](.*?)\/\/\[\/NC_SKIPBUILD\]/s', '', $content);
$content = substr(trim($content), 5);
if ('?&' == substr($content, -2))
$content = substr($content, 0, -2);
+ * 压缩PHP代码
+ * @param string $content 压缩内容
+ * @return string
+function compress_code($content) {
$strip_str = '';
//分析php源码
$tokens = token_get_all($content);
$last_space =
for ($i = 0, $j = count($tokens); $i & $j; $i++) {
if (is_string($tokens[$i])) {
$last_space =
$strip_str .= $tokens[$i];
switch ($tokens[$i][0]) {
//过滤各种PHP注释
case T_COMMENT:
case T_DOC_COMMENT:
//过滤空格
case T_WHITESPACE:
if (!$last_space) {
$strip_str .= ' ';
$last_space =
$last_space =
$strip_str .= $tokens[$i][1];
return $strip_
Index: thumb.php
===================================================================
--- thumb.php (revision 0)
+++ thumb.php (revision 2)
@@ -0,0 +1,73 @@
+function get_height($image) {
+ $size = getimagesize($image);
+ $height = $size[1];
+ return $
+function get_width($image) {
+ $size = getimagesize($image);
+ $width = $size[0];
+ return $
+function resize_thumb($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){
+ $newImageWidth = ceil($width * $scale);
+ $newImageHeight = ceil($height * $scale);
+ if (C('thumb.cut_type') == 'im'){
$exec_str = rtrim(C('thumb.impath'),'/').'/convert -quality 100 -crop '.$width.'x'.$height.'+'.$start_width.'+'.$start_height.' -resize '.$newImageWidth.'x'.$newImageHeight.' '.$image.' '.$thumb_image_
exec($exec_str);
list($imagewidth, $imageheight, $imageType) = getimagesize($image);
$imageType = image_type_to_mime_type($imageType);
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
$white = imagecolorallocate($newImage, 255, 255, 255);
imagefill($newImage, 0, 0, $white);
switch($imageType) {
case &image/gif&:
$source=imagecreatefromgif($image);
case &image/pjpeg&:
case &image/jpeg&:
case &image/jpg&:
$source=imagecreatefromjpeg($image);
case &image/png&:
case &image/x-png&:
$source=imagecreatefrompng($image);
$dst_w = $dst_h = 0;
if ($newImageWidth & $width) {
$dst_w = ($newImageWidth - $width)/2;
if ($newImageHeight & $height) {
$dst_h = ($newImageHeight - $height)/2;
if ($dst_w & 0) {
imagecopyresampled($newImage,$source,$dst_w,$dst_h,$start_width,$start_height,$width,$height,$width,$height);
imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);
switch($imageType) {
case &image/gif&:
imagegif($newImage,$thumb_image_name);
case &image/pjpeg&:
case &image/jpeg&:
case &image/jpg&:
imagejpeg($newImage,$thumb_image_name,100);
case &image/png&:
case &image/x-png&:
imagepng($newImage,$thumb_image_name);
+ return $thumb_image_
\ No newline at end of file
Index: index.html
===================================================================
--- index.html (revision 0)
+++ index.html (revision 2)
@@ -0,0 +1 @@
\ No newline at end of file
Index: htmlawed.php
===================================================================
--- htmlawed.php (revision 0)
+++ htmlawed.php (revision 2)
@@ -0,0 +1,699 @@
+htmLawed 1.2.beta.5, 12 March 2014
+Copyright Santosh Patnaik
+Dual licensed with LGPL 3 and GPL 2+
+A PHP Labware internal utility - http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/beta
+See htmLawed_README.txt/htm
+function htmLawed($t, $C=1, $S=array()){
+$C = is_array($C) ? $C : array();
+if(!empty($C['valid_xhtml'])){
+ $C['elements'] = empty($C['elements']) ? '*-acronym-big-center-dir-font-isindex-s-strike-tt' : $C['elements'];
+ $C['make_tag_strict'] = isset($C['make_tag_strict']) ? $C['make_tag_strict'] : 2;
+ $C['xml:lang'] = isset($C['xml:lang']) ? $C['xml:lang'] : 2;
+// config eles
+$e = array('a'=&1, 'abbr'=&1, 'acronym'=&1, 'address'=&1, 'applet'=&1, 'area'=&1, 'article'=&1, 'aside'=&1, 'audio'=&1, 'b'=&1, 'bdi'=&1, 'bdo'=&1, 'big'=&1, 'blockquote'=&1, 'br'=&1, 'button'=&1, 'canvas'=&1, 'caption'=&1, 'center'=&1, 'cite'=&1, 'code'=&1, 'col'=&1, 'colgroup'=&1, 'command'=&1, 'data'=&1, 'datalist'=&1, 'dd'=&1, 'del'=&1, 'details'=&1, 'dfn'=&1, 'dir'=&1, 'div'=&1, 'dl'=&1, 'dt'=&1, 'em'=&1, 'embed'=&1, 'fieldset'=&1, 'figcaption'=&1, 'figure'=&1, 'font'=&1, 'footer'=&1, 'form'=&1, 'h1'=&1, 'h2'=&1, 'h3'=&1, 'h4'=&1, 'h5'=&1, 'h6'=&1, 'header'=&1, 'hgroup'=&1, 'hr'=&1, 'i'=&1, 'iframe'=&1, 'img'=&1, 'input'=&1, 'ins'=&1, 'isindex'=&1, 'kbd'=&1, 'keygen'=&1, 'label'=&1, 'legend'=&1, 'li'=&1, 'link'=&1, 'main'=&1, 'map'=&1, 'mark'=&1, 'menu'=&1, 'meta'=&1, 'meter'=&1, 'nav'=&1, 'noscript'=&1, 'object'=&1, 'ol'=&1, 'optgroup'=&1, 'option'=&1, 'output'=&1, 'p'=&1, 'param'=&1, 'pre'=&1, 'progress'=&1, 'q'=&1, 'rb'=&1, 'rbc'=&1, 'rp'=&1, 'rt'=&1, 'rtc'=&1, 'ruby'=&1, 's'=&1, 'samp'=&1, 'script'=&1, 'section'=&1, 'select'=&1, 'small'=&1, 'source'=&1, 'span'=&1, 'strike'=&1, 'strong'=&1, 'style'=&1, 'sub'=&1, 'summary'=&1, 'sup'=&1, 'table'=&1, 'tbody'=&1, 'td'=&1, 'textarea'=&1, 'tfoot'=&1, 'th'=&1, 'thead'=&1, 'time'=&1, 'tr'=&1, 'track'=&1, 'tt'=&1, 'u'=&1, 'ul'=&1, 'var'=&1, 'video'=&1, 'wbr'=&1); // 118 incl. deprecated & some Ruby
+if(!empty($C['safe'])){
+ unset($e['applet'], $e['canvas'], $e['iframe'], $e['script']);
+$x = !empty($C['elements']) ? str_replace(array(&\n&, &\r&, &\t&, ' '), '', $C['elements']) : '*';
+if($x == '-*'){$e = array();}
+elseif(strpos($x, '*') === false){$e = array_flip(explode(',', $x));}
+ if(isset($x[1])){
preg_match_all('`(?:^|-|\+)[^\-+]+?(?=-|\+|$)`', $x, $m, PREG_SET_ORDER);
for($i=count($m); --$i&=0;){$m[$i] = $m[$i][0];}
foreach($m as $v){
if($v[0] == '+'){$e[substr($v, 1)] = 1;}
if($v[0] == '-' && isset($e[($v = substr($v, 1))]) && !in_array('+'. $v, $m)){unset($e[$v]);}
+$C['elements'] =& $e;
+// config attrs
+$x = !empty($C['deny_attribute']) ? str_replace(array(&\n&, &\r&, &\t&, ' '), '', $C['deny_attribute']) : '';
+$x = array_flip((isset($x[0]) && $x[0] == '*') ? explode('-', $x) : explode(',', $x. (!empty($C['safe']) ? ',on*' : '')));
+if(isset($x['on*'])){
+ unset($x['on*']);
+ $x += array('onabort'=&1, 'onblur'=&1, 'oncanplay'=&1, 'oncanplaythrough'=&1, 'onchange'=&1, 'onclick'=&1, 'oncontextmenu'=&1, 'oncuechange'=&1, 'ondblclick'=&1, 'ondrag'=&1, 'ondragend'=&1, 'ondragenter'=&1, 'ondragleave'=&1, 'ondragover'=&1, 'ondragstart'=&1, 'ondrop'=&1, 'ondurationchange'=&1, 'onemptied'=&1, 'onended'=&1, 'onerror'=&1, 'onfocus'=&1, 'oninput'=&1, 'oninvalid'=&1, 'onkeydown'=&1, 'onkeypress'=&1, 'onkeyup'=&1, 'onload'=&1, 'onloadeddata'=&1, 'onloadedmetadata'=&1, 'onloadstart'=&1, 'onmousedown'=&1, 'onmousemove'=&1, 'onmouseout'=&1, 'onmouseover'=&1, 'onmouseup'=&1, 'onmousewheel'=&1, 'onpause'=&1, 'onplay'=&1, 'onplaying'=&1, 'onprogress'=&1, 'onratechange'=&1, 'onreadystatechange'=&1, 'onreset'=&1, 'onscroll'=&1, 'onseeked'=&1, 'onseeking'=&1, 'onselect'=&1, 'onshow'=&1, 'onstalled'=&1, 'onsubmit'=&1, 'onsuspend'=&1, 'ontimeupdate'=&1, 'onvolumechange'=&1, 'onwaiting'=&1);
+$C['deny_attribute'] = $x;
+// config URL
+$x = (isset($C['schemes'][2]) && strpos($C['schemes'], ':')) ? strtolower($C['schemes']) : 'href: aim, feed, file, ftp, gopher, http, https, irc, mailto, news, nntp, sftp, ssh, *:file, http, https';
+$C['schemes'] = array();
+foreach(explode(';', str_replace(array(' ', &\t&, &\r&, &\n&), '', $x)) as $v){
+ $x = $x2 = list($x, $x2) = explode(':', $v, 2);
+ if($x2){$C['schemes'][$x] = array_flip(explode(',', $x2));}
+if(!isset($C['schemes']['*'])){$C['schemes']['*'] = array('file'=&1, 'http'=&1, 'https'=&1,);}
+if(!empty($C['safe']) && empty($C['schemes']['style'])){$C['schemes']['style'] = array('!'=&1);}
+$C['abs_url'] = isset($C['abs_url']) ? $C['abs_url'] : 0;
+if(!isset($C['base_url']) or !preg_match('`^[a-zA-Z\d.+\-]+://[^/]+/(.+?/)?$`', $C['base_url'])){
+ $C['base_url'] = $C['abs_url'] = 0;
+// config rest
+$C['and_mark'] = empty($C['and_mark']) ? 0 : 1;
+$C['anti_link_spam'] = (isset($C['anti_link_spam']) && is_array($C['anti_link_spam']) && count($C['anti_link_spam']) == 2 && (empty($C['anti_link_spam'][0]) or hl_regex($C['anti_link_spam'][0])) && (empty($C['anti_link_spam'][1]) or hl_regex($C['anti_link_spam'][1]))) ? $C['anti_link_spam'] : 0;
+$C['anti_mail_spam'] = isset($C['anti_mail_spam']) ? $C['anti_mail_spam'] : 0;
+$C['balance'] = isset($C['balance']) ? (bool)$C['balance'] : 1;
+$C['cdata'] = isset($C['cdata']) ? $C['cdata'] : (empty($C['safe']) ? 3 : 0);
+$C['clean_ms_char'] = empty($C['clean_ms_char']) ? 0 : $C['clean_ms_char'];
+$C['comment'] = isset($C['comment']) ? $C['comment'] : (empty($C['safe']) ? 3 : 0);
+$C['css_expression'] = empty($C['css_expression']) ? 0 : 1;
+$C['direct_list_nest'] = empty($C['direct_list_nest']) ? 0 : 1;
+$C['hexdec_entity'] = isset($C['hexdec_entity']) ? $C['hexdec_entity'] : 1;
+$C['hook'] = (!empty($C['hook']) && function_exists($C['hook'])) ? $C['hook'] : 0;
+$C['hook_tag'] = (!empty($C['hook_tag']) && function_exists($C['hook_tag'])) ? $C['hook_tag'] : 0;
+$C['keep_bad'] = isset($C['keep_bad']) ? $C['keep_bad'] : 6;
+$C['lc_std_val'] = isset($C['lc_std_val']) ? (bool)$C['lc_std_val'] : 1;
+$C['make_tag_strict'] = isset($C['make_tag_strict']) ? $C['make_tag_strict'] : 1;
+$C['named_entity'] = isset($C['named_entity']) ? (bool)$C['named_entity'] : 1;
+$C['no_deprecated_attr'] = isset($C['no_deprecated_attr']) ? $C['no_deprecated_attr'] : 1;
+$C['parent'] = isset($C['parent'][0]) ? strtolower($C['parent']) : 'body';
+$C['show_setting'] = !empty($C['show_setting']) ? $C['show_setting'] : 0;
+$C['style_pass'] = empty($C['style_pass']) ? 0 : 1;
+$C['tidy'] = empty($C['tidy']) ? 0 : $C['tidy'];
+$C['unique_ids'] = isset($C['unique_ids']) && (!preg_match('`\W`', $C['unique_ids'])) ? $C['unique_ids'] : 1;
+$C['xml:lang'] = isset($C['xml:lang']) ? $C['xml:lang'] : 0;
+if(isset($GLOBALS['C'])){$reC = $GLOBALS['C'];}
+$GLOBALS['C'] = $C;
+$S = is_array($S) ? $S : hl_spec($S);
+if(isset($GLOBALS['S'])){$reS = $GLOBALS['S'];}
+$GLOBALS['S'] = $S;
+$t = preg_replace('`[\x00-\x08\x0b-\x0c\x0e-\x1f]`', '', $t);
+if($C['clean_ms_char']){
+ $x = array(&\x7f&=&'', &\x80&=&'€', &\x81&=&'', &\x83&=&'ƒ', &\x85&=&'…', &\x86&=&'†', &\x87&=&'‡', &\x88&=&'ˆ', &\x89&=&'‰', &\x8a&=&'Š', &\x8b&=&'‹', &\x8c&=&'Œ', &\x8d&=&'', &\x8e&=&'Ž', &\x8f&=&'', &\x90&=&'', &\x95&=&'•', &\x96&=&'–', &\x97&=&'—', &\x98&=&'˜', &\x99&=&'™', &\x9a&=&'š', &\x9b&=&'›', &\x9c&=&'œ', &\x9d&=&'', &\x9e&=&'ž', &\x9f&=&'Ÿ');
+ $x = $x + ($C['clean_ms_char'] == 1 ? array(&\x82&=&'‚', &\x84&=&'„', &\x91&=&'‘', &\x92&=&'’', &\x93&=&'“', &\x94&=&'”') : array(&\x82&=&'\'', &\x84&=&'&', &\x91&=&'\'', &\x92&=&'\'', &\x93&=&'&', &\x94&=&'&'));
+ $t = strtr($t, $x);
+if($C['cdata'] or $C['comment']){$t = preg_replace_callback('`&!(?:(?:--.*?--)|(?:\[CDATA\[.*?\]\]))&`sm', 'hl_cmtcd', $t);}
+$t = preg_replace_callback('`&([a-zA-Z][a-zA-Z0-9]{1,30}|#(?:[0-9]{1,8}|[Xx][0-9A-Fa-f]{1,7}));`', 'hl_ent', str_replace('&', '&', $t));
+if($C['unique_ids'] && !isset($GLOBALS['hl_Ids'])){$GLOBALS['hl_Ids'] = array();}
+if($C['hook']){$t = $C['hook']($t, $C, $S);}
+if($C['show_setting'] && preg_match('`^[a-z][a-z0-9_]*$`i', $C['show_setting'])){
+ $GLOBALS[$C['show_setting']] = array('config'=&$C, 'spec'=&$S, 'time'=&microtime());
+$t = preg_replace_callback('`&(?:(?:\s|$)|(?:[^&]*(?:&|$)))|&`m', 'hl_tag', $t);
+$t = $C['balance'] ? hl_bal($t, $C['keep_bad'], $C['parent']) : $t;
+$t = (($C['cdata'] or $C['comment']) && strpos($t, &\x01&) !== false) ? str_replace(array(&\x01&, &\x02&, &\x03&, &\x04&, &\x05&), array('', '', '&', '&', '&'), $t) : $t;
+$t = $C['tidy'] ? hl_tidy($t, $C['tidy'], $C['parent']) : $t;
+unset($C, $e);
+if(isset($reC)){$GLOBALS['C'] = $reC;}
+if(isset($reS)){$GLOBALS['S'] = $reS;}
+return $t;
+function hl_attrval($t, $p){
+// check attr val against $S
+$o = 1; $l = strlen($t);
+foreach($p as $k=&$v){
+ switch($k){
case 'maxlen':if($l & $v){$o = 0;}
+ case 'minlen': if($l & $v){$o = 0;}
+ case 'maxval': if((float)($t) & $v){$o = 0;}
+ case 'minval': if((float)($t) & $v){$o = 0;}
+ case 'match': if(!preg_match($v, $t)){$o = 0;}
+ case 'nomatch': if(preg_match($v, $t)){$o = 0;}
+ case 'oneof':
foreach(explode('|', $v) as $n){if($t == $n){$m = 1;}}
+ case 'noneof':
foreach(explode('|', $v) as $n){if($t == $n){$m = 0;}}
+ default:
+ if(!$o){}
+return ($o ? $t : (isset($p['default']) ? $p['default'] : 0));
+function hl_bal($t, $do=1, $in='div'){
+// balance tags
+// by content
+$cB = array('blockquote'=&1, 'form'=&1, 'map'=&1, 'noscript'=&1); // Block
+$cE = array('area'=&1, 'br'=&1, 'col'=&1, 'command'=&1, 'embed'=&1, 'hr'=&1, 'img'=&1, 'input'=&1, 'isindex'=&1, 'keygen'=&1, 'link'=&1, 'meta'=&1, 'param'=&1, 'source'=&1, 'track'=&1, 'wbr'=&1); // Empty
+$cF = array('a'=&1, 'article'=&1, 'aside'=&1, 'audio'=&1, 'button'=&1, 'canvas'=&1, 'del'=&1, 'details'=&1, 'div'=&1, 'dd'=&1, 'fieldset'=&1, 'figure'=&1, 'footer'=&1, 'header'=&1, 'iframe'=&1, 'ins'=&1, 'li'=&1, 'main'=&1, 'menu'=&1, 'nav'=&1, 'noscript'=&1, 'object'=&1, 'section'=&1, 'style'=&1, 'td'=&1, 'th'=&1, 'video'=&1); // F later context-wise dynamic move of ins & del to $cI
+$cI = array('abbr'=&1, 'acronym'=&1, 'address'=&1, 'b'=&1, 'bdi'=&1, 'bdo'=&1, 'big'=&1, 'caption'=&1, 'cite'=&1, 'code'=&1, 'data'=&1, 'datalist'=&1, 'dfn'=&1, 'dt'=&1, 'em'=&1, 'figcaption'=&1, 'font'=&1, 'h1'=&1, 'h2'=&1, 'h3'=&1, 'h4'=&1, 'h5'=&1, 'h6'=&1, 'hgroup'=&1, 'i'=&1, 'kbd'=&1, 'label'=&1, 'legend'=&1, 'mark'=&1, 'meter'=&1, 'output'=&1, 'p'=&1, 'pre'=&1, 'progress'=&1, 'q'=&1, 'rb'=&1, 'rt'=&1, 's'=&1, 'samp'=&1, 'small'=&1, 'span'=&1, 'stri

我要回帖

更多关于 keyshot渲染有噪点 的文章

 

随机推荐