• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

php 仿Comsenz安装效果代码打包提供下载_php实例

php 搞代码 3年前 (2022-01-25) 12次浏览 已收录 0个评论

最终的效果如下:

step.inc.php 安装步骤效果类:

 <BR>/** <BR>* step.inc.php 安装步骤效果类 * <BR>* 从Comsenz产品的数据表安装效果中提取出主要代码,以供大家学习 <BR>* @author tianxin <BR>* @version 1.0.0 * <BR>*/ <BR>class StepClass { <BR>function show_header() { <BR>define('SHOW_HEADER', TRUE); <BR>$step = 1; <BR>$version = 'beta1.0'; <BR>$release = '20100223'; <BR>$install_lang = '简体中文UTF8版'; <BR>$title = '仿Comsenz安装'; <BR>$charset = 'uft-8'; <BR>echo <<<EOT <BR> <BR> <BR> <BR><meta http-equiv="Content-Type" content="text/html; charset=$charset" /> <BR><title>$title</title> <BR><link rel="stylesheet" href="style.css" type="text/css" media="all" /> <BR><script type="text/javascript"> <BR>function $(id) { <BR>return document.getElementById(id); <BR>} <BR>function showmessage(message) { <BR>$('notice').value += message + "\\r\\n"; <BR>} <BR></script> <BR><meta content="Comsenz Inc." name="Copyright" /> <BR> <BR><div class="container"> <BR><div class="header"> <BR><h1>$title</h1> <BR><span>$version $install_lang $release</span> <BR>EOT; <BR>$step > 0 && $this->show_step($step); <BR>} <BR>function show_step($step) { <BR>$laststep = 4; <BR>$title = '仿Comsenz安装'; <BR>$comment = '正在执行操作'; <BR>$stepclass = array(); <BR>for($i = 1; $i <= $laststep; $i++) { <BR>$stepclass[$i] = $i == $step ? 'current' : ($i < $step ? '' : 'unactivated'); <BR>} <BR>$stepclass[$laststep] .= ' last'; <BR>echo <<<EOT <BR><div class="setup step{$step}"> <BR><h2>$title</h2> <BR><p>$comment</p> <BR>




  • 1

  • 2

  • 3

  • 4






EOT;
}
function show_install() {
?>
<script type=”text/javascript”>
function showmessage(message) {
document.getElementById(‘notice’).value += message + “\r\n”;
}
function initinput() {
window.location=’http://www.php.net&#8217;;
}
</script>






<?php
}
function runquery() {
for($i=1;$i<=15;$i++)
{
$this->showjsmessage(‘执行操作’.’ ‘.$i.’ … ‘.’成功’);
//模拟每执行完一个动作的延时
sleep(1);
}
}
function showjsmessage($message) {
echo ‘<script type=”text/javascript”>showmessage(\”.addslashes($message).’ \’);</script>’.”\r\n”;
flush();
ob_flush();
}
function show_footer($quit = true) {
echo <<<EOT






EOT;
$quit && exit();
}
}


调用方法:

 <BR>header('Content-Type: text/html; charset=utf-8'); <BR>include('step.inc.php'); <BR>$step=new StepClass(); <BR>//显示页面头部 <BR>$step->show_header(); <BR>//显示操作进度 <BR>$step->show_install(); <BR>//运行操作 <BR>$step->runquery(); <BR>echo '<script type="text/javascript">document.getElementById("laststep").disabled=false;document.getElementById("laststep").value = \'执行<p style="color:transparent">2本文来源gao!daima.com搞$代!码网</p><span>搞代gaodaima码</span>完所有操作,进入下一步\';</script>'."\r\n"; <BR>//显示页面尾部 <BR>$step->show_footer(); <BR>


完整的demo:stepdemo.rar


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:php 仿Comsenz安装效果代码打包提供下载_php实例

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址