123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228 |
- {template 'common/header'}
- <div class="upgrade-content">
- <div class="alert we7-page-alert">
- <p><i class="wi wi-info-sign"></i>系统更新后,如果出现样式错误等,请自行更新缓存并“CTRL+F5”强行刷新</p>
- </div>
- <div class="upgrade-heading">
- <img src="./resource/images/logo/logo-lg.png" alt="" class="we7-logo"/>
- <h2 class="upgrade-version">系统当前版本: {IMS_FAMILY}{IMS_VERSION}({IMS_RELEASE_DATE})</h2>
- </div>
- {if !empty($upgrade) && !empty($upgrade['upgrade'])}
- <div>
- <div class="upgrade-info">
- <div class="item">
- <div class="title">需要更新文件</div>
- <div class="count"><span>{php echo count($upgrade['files']) == '0' ? '暂无更新文件' : count($upgrade['files']).'个'} </span> </div>
- <a href="#upgrade-file" data-toggle="modal" >查看</a>
- </div>
- <div class="item">
- <div class="title">需要更新数据库</div>
- <div class="count"><span>{php echo count($upgrade['database']) == '0' ? '暂无更新数据库' : count($upgrade['database']).'项'} </span> </div>
- <a href="#upgrade-databases" data-toggle="modal" >查看</a>
- </div>
- <div class="item">
- <div class="title">需要更新脚本</div>
- <div class="count"><span>{php echo count($upgrade['scripts']) == '0' ? '暂无更新脚本' : count($upgrade['scripts']).'项'} </span> </div>
- <a href="#upgrade-scripts" data-toggle="modal" >查看</a>
- </div>
- </div>
- <div class="upgrade-info" ng-if="upgrade && upgrade.upgrade">
- <div class="item">
- <div class="title">更新协议事项</div>
- <div class="we7-form">
- <div class="upgrade-agree">
- <input id='agreement_0' type="checkbox" name='agreement_0' autocomplete="off" />
- <label for="agreement_0">更新时请注意备份网站数据和相关数据库文件!不强制要求用户跟随官方意愿进行更新尝试!</label>
- </div>
- <div class="upgrade-agree">
- <input id='agreement_1' type="checkbox" name='agreement_1' autocomplete="off"/>
- <label for="agreement_1">已经做好了相关文件的备份工作,认同官方的更新行为并自愿承担更新所存在的风险</label>
- </div>
- <div class="upgrade-agree">
- <input id='agreement_2' type="checkbox" name='agreement_2' autocomplete="off"/>
- <label for="agreement_2">认同“购买系统商业授权后进行商业化运营”的协议</label>
- </div>
- </div>
- </div>
- </div>
- <div class="text-center we7-margin-top">
- <input type="button" name="" id="forward" value="一键更新" class="btn btn-primary we7-margin-right" ng-click="submit()"/>
- <input name="rollback" type="button" value="撤回更新" class="btn btn-default" data-toggle="modal" data-target="#rollback-panel" />
- </div>
- </div>
- {else}
- <form action="" method="post" >
- <div class="upgrade-new">
- 当前版本为最新版本,您可以点击此按钮, 立即检查是否有新版本。
- </div>
- <div class="text-center">
- <input name="submit" type="submit" value="立即检查新版本" class="btn btn-primary we7-margin-right" />
- <input name="rollback" type="button" value="撤回更新" class="btn btn-default" data-toggle="modal" data-target="#rollback-panel" />
- <input type="hidden" name="token" value="{$_W['token']}" />
- </div>
- </form>{/if}
-
- <div class="panel we7-panel">
- <div class="panel-heading">
- 更新通知
- </div>
- <div class="panel-body we7-padding">
- <ul class="list-unstyled">
- <script type="text/javascript" src="http://cloud.zhifun.cc/app/api.php?mod=js&bid=10"></script>
- </ul>
- </div>
- </div>
- </div>
- <div class="modal fade" id="upgrade-file" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog we7-modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">×</span>
- <span class="sr-only">Close</span>
- </button>
- <h4 class="modal-title">更新文件</h4>
- </div>
- <div class="modal-body">
- {if !empty($upgrade['files'])}
- <div class="upgrade-modal-box">
- {loop $upgrade['files'] $line}
- <p><span style="display:inline-block; width:30px;">{if is_file(IA_ROOT . $line)}M{else}A{/if}</span>{$line}</p>
- {/loop}
- </div>
- {else}
- <div class="we7-empty-blcok">
- 暂无更新文件
- </div>
- {/if}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="upgrade-databases" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog we7-modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">×</span>
- <span class="sr-only">Close</span>
- </button>
- <h4 class="modal-title">更新数据库</h4>
- </div>
- <div class="modal-body color-dark">
- {if !empty($upgrade['database'])}
- <div class="upgrade-modal-box" >
- {loop $upgrade['database'] $line}
- <div class="" >
- <div class="col-sm-2">表名:</div>
- <div class="col-sm-4">{$line['tablename']}</div>
- {if !empty($line['new'])}
- <div class="col-sm-6">New</div>
- {else}
- <div class="col-sm-6" >
- {if !empty($line['fields'])}fields: {$line['fields']}; {/if}{if !empty($line['indexes'])}indexes: {$line['indexes']}{/if}
- </div>
- {/if}
- </div>
- {/loop}
- </div>
- {else}
- <div class="we7-empty-blcok" >
- 暂无更新数据库
- </div>
- {/if}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="upgrade-scripts" tabindex="-1" role="dialog" aria-hidden="true">
- <div class="modal-dialog we7-modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal">
- <span aria-hidden="true">×</span>
- <span class="sr-only">Close</span>
- </button>
- <h4 class="modal-title">更新脚本</h4>
- </div>
- <div class="modal-body color-dark">
- {if !empty($upgrade['scripts'])}
- <div class="upgrade-modal-box">
- {loop $upgrade['scripts'] $line}
- <p >
- <span style="display:inline-block; width:100px;">{$line['release']}</span>{$line['message']}
- </p>
- {/loop}
- </div>
- {else}
- <div class="we7-empty-blcok">
- 暂无更新脚本
- </div>
- {/if}
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
- </div>
- </div>
- </div>
- </div>
- <div class="modal fade" id="rollback-panel" tabindex="-1" role="dialog" aria-labelledby="rollback-label">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <h4 class="modal-title">更新回滚列表</h4>
- </div>
- <div class="modal-body">
- <div class="alert alert-danger">
- 如果要恢复更早的记录请直接查看 <b>/data/patch/</b> 目录
- </div>
- <div class="alert alert-success">
- 恢复时,请手动将此目录中的文件上传至网站即可(选中全部文件和目录直接上传)
- </div>
- {if !empty($patchs)}
- <table class="table">
- <tr>
- <th style="width: 200px">日期</th>
- <th >路径</th>
- </tr>
- {loop $patchs $path}
- <tr>
- <td>{php echo date('Y-m-d')} {php echo substr($path, 0, 2)}:{php echo substr($path, 2, 2)}</td>
- <td>{$path}</td>
- </tr>
- {/loop}
- </table>
- {else}
- 今天暂无更新
- {/if}
- </div>
- </div>
- </div>
- </div>
- </div>
- {if !empty($upgrade) && !empty($upgrade['upgrade'])}
- <script type="text/javascript">
- $('#forward').click(function(){
- var a = $("#agreement_0").is(':checked');
- var b = $("#agreement_1").is(':checked');
- var c = $("#agreement_2").is(':checked');
- if(a && b && c) {
- if(confirm('更新将直接覆盖本地文件, 请注意备份文件和数据. \n\n**另注意** 更新过程中不要关闭此浏览器窗口.')) {
- location.href = '{url "cloud/process"}';
- }
- } else {
- util.message("抱歉,更新前请仔细阅读更新协议!", '', 'error');
- return false;
- }
- });
- </script>
- {/if}
- {template 'common/footer'}
|