244 <!-- Global options --> |
244 <!-- Global options --> |
245 |
245 |
246 <tr><th colspan="2">Global site options</th></tr> |
246 <tr><th colspan="2">Global site options</th></tr> |
247 <tr><th colspan="2" class="subhead">These options control the entire site.</th></tr> |
247 <tr><th colspan="2" class="subhead">These options control the entire site.</th></tr> |
248 |
248 |
249 <tr><td class="row1" style="width: 50%;">Site name:</td> <td class="row1" style="width: 50%;"><input type="text" name="site_name" size="30" value="<?php echo getConfig('site_name'); ?>" /></td></tr> |
249 <tr><td class="row1" style="width: 50%;">Site name:</td> <td class="row1" style="width: 50%;"><input type="text" name="site_name" size="30" value="<?php echo htmlspecialchars(getConfig('site_name')); ?>" /></td></tr> |
250 <tr><td class="row2">Site description:</td> <td class="row2"><input type="text" name="site_desc" size="30" value="<?php echo getConfig('site_desc'); ?>" /></td></tr> |
250 <tr><td class="row2">Site description:</td> <td class="row2"><input type="text" name="site_desc" size="30" value="<?php echo htmlspecialchars(getConfig('site_desc')); ?>" /></td></tr> |
251 <tr><td class="row1">Main page:</td> <td class="row1"><?php echo $template->pagename_field('main_page', str_replace('_', ' ', getConfig('main_page'))); ?></td></tr> |
251 <tr><td class="row1">Main page:</td> <td class="row1"><?php echo $template->pagename_field('main_page', htmlspecialchars(str_replace('_', ' ', getConfig('main_page')))); ?></td></tr> |
252 <tr><td class="row2">Copyright notice shown on pages:</td><td class="row2"><input type="text" name="copyright" size="30" value="<?php echo getConfig('copyright_notice'); ?>" /></td></tr> |
252 <tr><td class="row2">Copyright notice shown on pages:</td><td class="row2"><input type="text" name="copyright" size="30" value="<?php echo htmlspecialchars(getConfig('copyright_notice')); ?>" /></td></tr> |
253 <tr><td class="row1" colspan="2">Hint: If you're using Windows, you can make a "©" symbol by holding ALT and pressing 0169 on the numeric keypad.</td></tr> |
253 <tr><td class="row1" colspan="2">Hint: If you're using Windows, you can make a "©" symbol by holding ALT and pressing 0169 on the numeric keypad.</td></tr> |
254 <tr><td class="row2">Contact e-mail<br /><small>All e-mail sent from this site will appear to have come from the address shown here.</small></td><td class="row2"><input name="contact_email" type="text" size="40" value="<?php echo htmlspecialchars(getConfig('contact_email')); ?>" /></td></tr> |
254 <tr><td class="row2">Contact e-mail<br /><small>All e-mail sent from this site will appear to have come from the address shown here.</small></td><td class="row2"><input name="contact_email" type="text" size="40" value="<?php echo htmlspecialchars(getConfig('contact_email')); ?>" /></td></tr> |
255 |
255 |
256 <!-- Wiki mode --> |
256 <!-- Wiki mode --> |
257 |
257 |
1473 if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. <a href="#" onclick="ajaxPage(\''.$paths->nslist['Admin'].'PageManager\'); return false;">Back</a>'; return false; } |
1473 if(!isset($paths->pages[$paths->nslist[$_POST['namespace']].$_POST['urlname']])) { echo 'The page you searched for cannot be found. <a href="#" onclick="ajaxPage(\''.$paths->nslist['Admin'].'PageManager\'); return false;">Back</a>'; return false; } |
1474 } |
1474 } |
1475 |
1475 |
1476 if(isset($_POST['page_id']) && isset($_POST['namespace']) && !isset($_POST['cancel'])) |
1476 if(isset($_POST['page_id']) && isset($_POST['namespace']) && !isset($_POST['cancel'])) |
1477 { |
1477 { |
1478 $cpage = $paths->pages[$paths->nslist[$_POST['namespace']].$_POST['old_page_id']]; |
1478 $cpage = $paths->pages[$paths->nslist[$_POST['old_namespace']].$_POST['old_page_id']]; |
1479 if(isset($_POST['submit'])) |
1479 if(isset($_POST['submit'])) |
1480 { |
1480 { |
1481 switch(true) |
1481 switch(true) |
1482 { |
1482 { |
1483 case true: |
1483 case true: |
1490 'visible'=>isset($_POST['visible']) ? '1' : '0', |
1490 'visible'=>isset($_POST['visible']) ? '1' : '0', |
1491 'comments_on'=>isset($_POST['comments_on']) ? '1' : '0', |
1491 'comments_on'=>isset($_POST['comments_on']) ? '1' : '0', |
1492 'protected'=>isset($_POST['protected']) ? '1' : '0' |
1492 'protected'=>isset($_POST['protected']) ? '1' : '0' |
1493 ); |
1493 ); |
1494 |
1494 |
1495 $updating_urlname_or_namespace = ( $page_info['namespace'] != $cpage['namespace'] || $page_info['urlname'] != $cpage['urlname'] ); |
1495 $updating_urlname_or_namespace = ( $page_info['namespace'] != $cpage['namespace'] || $page_info['urlname'] != $cpage['urlname_nons'] ); |
1496 |
1496 |
1497 if ( !isset($paths->nslist[ $page_info['namespace'] ]) ) |
1497 if ( !isset($paths->nslist[ $page_info['namespace'] ]) ) |
1498 { |
1498 { |
1499 echo '<div class="error-box">The namespace you selected is not properly registered.</div>'; |
1499 echo '<div class="error-box">The namespace you selected is not properly registered.</div>'; |
1500 break; |
1500 break; |
1513 } |
1513 } |
1514 $q = substr($q, 0, strlen($q)-1); |
1514 $q = substr($q, 0, strlen($q)-1); |
1515 // Build the WHERE statements |
1515 // Build the WHERE statements |
1516 $q .= ' WHERE '; |
1516 $q .= ' WHERE '; |
1517 $k = array_keys($cpage); |
1517 $k = array_keys($cpage); |
|
1518 if ( !isset($cpage) ) |
|
1519 die('no cpage'); |
1518 foreach($k as $c) |
1520 foreach($k as $c) |
1519 { |
1521 { |
1520 if($c != 'urlname_nons' && $c != 'urlname' && $c != 'really_protected') |
1522 if($c != 'urlname_nons' && $c != 'urlname' && $c != 'really_protected') |
1521 { |
1523 { |
1522 $q .= $c.'=\''.$db->escape($cpage[$c]).'\' AND '; |
1524 $q .= $c.'=\''.$db->escape($cpage[$c]).'\' AND '; |