2009-06-09 20:33:06 -07:00
< ? php defined ( " SYSPATH " ) or die ( " No direct script access. " ) ?>
< html >
< head >
< title >< ? = t ( " Gallery3 Upgrader " ) ?> </title>
</ head >
< style >
body {
background : #eee;
font - family : Trebuchet MS ;
font - size : 1.1 em ;
}
2009-06-10 21:05:24 -07:00
h1 {
font - size : 1.4 em ;
}
2009-06-09 20:33:06 -07:00
div #outer {
width : 650 px ;
background : white ;
border : 1 px solid #999;
margin : 0 auto ;
padding : - 10 px ;
}
div #inner {
padding : 0 1 em 0 1 em ;
margin : 0 px ;
}
div #footer {
border - top : 1 px solid #ccc;
margin : 1 em ;
}
td . name {
text - align : left ;
padding - left : 30 px ;
}
td {
text - align : center ;
border - bottom : 1 px solid #eee;
}
tr . current td {
color : #999;
font - style : italic ;
}
2009-06-09 21:26:37 -07:00
tr . current td . gallery {
color : #00d;
}
2009-06-09 20:33:06 -07:00
tr . upgradeable td {
font - weight : bold ;
}
2009-06-09 21:26:37 -07:00
tr . upgradeable td . gallery {
color : #00d;
}
2009-06-09 20:33:06 -07:00
table {
width : 600 px ;
margin - bottom : 10 px ;
}
p {
font - size : . 9 em ;
}
ul {
font - size : . 9 em ;
list - style : none ;
}
li {
display : inline ;
}
li : before {
content : " \00 BB \002 0 " ;
}
div . button {
margin : 0 auto ;
width : 120 px ;
text - align : center ;
border : 1 px solid #999;
background : #eee;
}
2009-06-09 21:26:37 -07:00
div . button a {
text - decoration : none ;
}
2009-06-09 20:33:06 -07:00
div . button : hover {
background : #ccc;
}
2009-06-09 21:26:37 -07:00
div #confirmation {
position : fixed ;
top : 400 px ;
left : 325 px ;
background : blue ;
z - index : 1000 ;
margin : 10 px ;
text - align : center ;
}
div #confirmation div {
margin : 2 px ;
padding : 20 px ;
border : 2 px solid #999;
background : white ;
}
. gray_on_done {
opacity : < ? = $done ? " 0.5 " : " 1 " ?> ;
}
2009-06-10 21:05:24 -07:00
pre {
display : inline ;
margin : 0 px ;
padding : 0 px ;
}
2009-06-09 20:33:06 -07:00
</ style >
< body >
< div id = " outer " >
< img src = " <?= url::file( " modules / gallery / images / gallery . png " ) ?> " />
< div id = " inner " >
2009-06-10 21:05:24 -07:00
< ? if ( $can_upgrade ) : ?>
2009-06-09 21:26:37 -07:00
< ? if ( $done ) : ?>
< div id = " confirmation " >
< div >
< h1 > < ? = t ( " That's it! " ) ?> </h1>
< p >
< ? = t ( " Your <a href= \" %url \" >Gallery</a> is up to date. " ,
array ( " url " => url :: site ( " albums/1 " ))) ?>
</ p >
</ div >
</ div >
< ? endif ?>
< p class = " gray_on_done " >
2009-06-09 20:33:06 -07:00
< ? = t ( " Welcome to the Gallery upgrader. One click and you're done! " ) ?>
</ p >
< table >
2009-06-09 21:26:37 -07:00
< tr class = " gray_on_done " >
2009-06-09 20:33:06 -07:00
< th > < ? = t ( " Module name " ) ?> </th>
< th > < ? = t ( " Installed version " ) ?> </th>
< th > < ? = t ( " Available version " ) ?> </th>
</ tr >
2009-06-09 21:26:37 -07:00
< ? foreach ( $available as $id => $module ) : ?>
2009-06-09 20:33:06 -07:00
< ? if ( $module -> active ) : ?>
< tr class = " <?= $module->version == $module->code_version ? " current " : " upgradeable " ?> " >
2009-06-09 21:26:37 -07:00
< td class = " name <?= $id ?> " >
2009-06-09 20:33:06 -07:00
< ? = $module -> name ?>
</ td >
< td >
< ? = $module -> version ?>
</ td >
< td >
< ? = $module -> code_version ?>
</ td >
</ tr >
< ? else : ?>
< ? @ $inactive ++ ?>
< ? endif ?>
< ? endforeach ?>
</ table >
2009-06-09 21:26:37 -07:00
< div class = " button gray_on_done " >
2009-06-09 20:33:06 -07:00
< a href = " <?= url::site( " upgrader / upgrade " ) ?> " >
< ? = t ( " Upgrade all " ) ?>
</ a >
</ div >
< ? if ( @ $inactive ) : ?>
2009-06-09 21:26:37 -07:00
< p class = " gray_on_done " >
2009-06-09 20:33:06 -07:00
< ? = t ( " The following modules are inactive and don't require an upgrade. " ) ?>
</ p >
2009-06-09 21:26:37 -07:00
< ul class = " gray_on_done " >
< ? foreach ( $available as $module ) : ?>
2009-06-09 20:33:06 -07:00
< ? if ( ! $module -> active ) : ?>
< li >
< ? = $module -> name ?>
</ li >
< ? endif ?>
< ? endforeach ?>
</ p >
< ? endif ?>
2009-06-10 21:05:24 -07:00
< ? else : // can_upgrade ?>
< h1 > < ? = t ( " Who are you? " ) ?> </h1>
< p >
< ? = t ( " You're not logged in as an administrator, so we have to verify you to make sure it's ok for you to do an upgrade. To prove you can run an upgrade, create a file called %name in your <b>gallery3/var/tmp</b> directory. " , array ( " name " => " <br/><b> $upgrade_token </b> " )) ?>
</ p >
< a href = " <?= url::site( " upgrader ? " ) ?> " >< ? = t ( " Ok, I've done that " ) ?> </a>
< ? endif // can_upgrade ?>
2009-06-09 20:33:06 -07:00
</ div >
< div id = " footer " >
< p >
< i >
< ? = t ( " Did something go wrong? Try the <a href= \" %faq_url \" >FAQ</a> or ask in the <a href= \" %forums_url \" >Gallery forums</a>.</i> " ,
array ( " faq_url " => " http://codex.gallery2.org/Gallery3:FAQ " ,
" forums_url " => " http://gallery.menalto.com/forum " )) ?>
</ i >
</ p >
</ div >
</ div >
</ body >
</ html >