-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyrevtutorial.php
114 lines (102 loc) · 3.84 KB
/
myrevtutorial.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
$docroot = $_SERVER['DOCUMENT_ROOT'];
require_once $docroot."/includes/config.php";
require_once $docroot."/includes/functions.php";
$stitle = 'MyREV Tutorial';
$widthcut = 900;
if($screenwidth>=$widthcut){
$numpix = 13;
$filmod = '';
}else{
$numpix = 15;
$filmod = 'mobile';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>MyREV Tutorial</title>
<link rel="stylesheet" type="text/css" href="/includes/style<?=$colors[0]?>.css?v='.$fileversion.'" />
<style>
#pix{
max-width: 90%;
margin:0 auto;
text-align:center;
}
.tutpic{
max-width: 100%;
border:1px solid <?=$colors[3]?>;
}
</style>
</head>
<body style="font-family:<?=$fontfamily?>, times new roman; font-size:<?=$fontsize?>em; line-height:<?=$lineheight?>em;width:99%;">
<div style="text-align:center;padding:7px 0;">
<h3 style="display:inline-block;width:70%;text-align:center;margin:0;"><?=$stitle?></h3>
<span style="float:right;cursor:pointer;" onclick="olClose('');"><img src="/i/redx.png" style="width:20px;" alt="" /></span>
</div>
<?if($screenwidth>=$widthcut){?>
<div style="float:left;height:100%;min-width:30px;cursor:pointer;" onclick="changepic(-1)">
<img src="/i/mnu_prev<?=$colors[0]?>.png" alt="" style="position:absolute;padding:50px 0;width:1.8em;top:40%;" />
</div>
<div style="float:right;height:100%;min-width:30px;cursor:pointer;" onclick="changepic(1)">
<img src="/i/mnu_next<?=$colors[0]?>.png" alt="" style="position:absolute;padding:50px 0;width:1.8em;top:40%;" />
</div>
<div id="pix">
<img id="tutpic" class="tutpic" src="/i/myrevtutorial/tutorial1<?=$filmod?>.png" alt="tutorial">
</div>
<div style="position:absolute;bottom:0;width:100%;text-align:center;margin:9px auto;">
<?=drawdots($numpix)?>
<input type="button" name="btnclos" value="Done" class="gobackbutton" style="cursor:pointer;width:80px;margin-top:8px;" onclick="olClose('');">
</div>
<?}else{?>
<div id="pix">
<img id="tutpic" class="tutpic" src="/i/myrevtutorial/tutorial1<?=$filmod?>.png" alt="tutorial">
</div>
<div style="position:absolute;bottom:0;width:100%;text-align:center;margin:9px auto;">
<?=drawdots($numpix)?>
<input type="image" src="/i/mnu_prev<?=$colors[0]?>.png" alt="" style="width:2em;padding-right:14px;margin-bottom:-11px;" onclick="changepic(-1)" />
<input type="button" name="btnclos" value="Done" class="gobackbutton" style="cursor:pointer;width:80px;margin-top:8px;" onclick="olClose('');">
<input type="image" src="/i/mnu_next<?=$colors[0]?>.png" alt="" style="width:2em;padding-left:14px;margin-bottom:-11px;" onclick="changepic(1)" />
</div>
<?}?>
<script>
function $(el) {return parent.document.getElementById(el);}
function $$(el){return document.getElementById(el);}
function olClose(locn) {
var msg = '';
if(msg) {if(confirm(msg)) return;}
parent.rlbfadeout();
}
var numpix=<?=$numpix?>;
var filmod='<?=$filmod?>';
var picidx = 1;
function changepic(idx){
picidx+= idx;
if(picidx==0) picidx = numpix;
if(picidx==(numpix+1)) picidx = 1;
$$('tutpic').src = '/i/myrevtutorial/tutorial'+picidx+filmod+'.png';
for(ni=1;ni<=numpix;ni++){
$$('rad'+ni).disabled= ((ni!=picidx)?true:false);
$$('rad'+ni).checked = ((ni==picidx)?true:false);
}
var vdim = window.innerHeight;
$$('tutpic').style.maxHeight = (vdim-130)+'px';
}
function resizeme(){
var vdim = window.innerHeight;
$$('pix').style.height = (vdim-50)+'px';
$$('tutpic').style.maxHeight = (vdim-130)+'px';
}
window.onload=function(){resizeme();}
window.onresize=function(){resizeme();}
</script>
</body>
</html>
<?
function drawdots($num){
$ret='';
for($ni=1;$ni<=$num;$ni++){
$ret.= (($ni>1)?' ':'').'<input type="radio" name="rad'.$ni.'" id="rad'.$ni.'" value="1"'.(($ni==1)?' checked':' disabled').' />';
}
return $ret.'<br />';
}