GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
tedkulp (author)
Tue Mar 28 09:59:27 -0800 2006
commit  3e3bdd122dacfedc4bc8a44f389dc02f26b9570a
tree    bd7b82631cab5cd58611dddd10b192c7a365f5bb
parent  60d59d1699f999b5a9c8f1b27808eb4abfead75f
cmsmadesimple-2-0 / admin / footer.php
100644 72 lines (60 sloc) 1.715 kb
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
<?php
$themeObject->DisplayMainDivEnd();
$themeObject->OutputFooterJavascript();
$themeObject->DisplayFooter();
 
if ($gCms->config["debug"] == true)
{
  echo '<div id="DebugFooter">';
  global $sql_queries;
  echo "<div>".$sql_queries."</div>\n";
  foreach ($gCms->errors as $error)
  {
    echo $error;
  }
  echo '</div> <!-- end DebugFooter -->';
}
 
?>
 
</body>
</html>
 
<?php
 
#Pull the stuff out of the buffer...
$htmlresult = '';
if (!(isset($USE_OUTPUT_BUFFERING) && $USE_OUTPUT_BUFFERING == false))
{
  $htmlresult = @ob_get_contents();
  @ob_end_clean();
}
 
#Do any header replacements (this is for WYSIWYG stuff)
$footertext = '';
$formtext = '';
$bodytext = '';
 
$userid = get_userid();
$wysiwyg = get_preference($userid, 'wysiwyg');
 
foreach($gCms->modules as $key=>$value)
{
  if ($gCms->modules[$key]['installed'] == true &&
    $gCms->modules[$key]['active'] == true &&
    $gCms->modules[$key]['object']->IsWYSIWYG()
    )
  {
    $loadit=false;
    if ($gCms->modules[$key]['object']->WYSIWYGActive()) {
      $loadit=true;
    } else {
     if (get_preference(get_userid(), 'wysiwyg')==$gCms->modules[$key]['object']->GetName()) {
       $loadit=true;
     }
    }
    if ($loadit) {
     $bodytext.=$gCms->modules[$key]['object']->WYSIWYGGenerateBody();
     $footertext.=$gCms->modules[$key]['object']->WYSIWYGGenerateHeader($htmlresult);
     $formtext.=$gCms->modules[$key]['object']->WYSIWYGPageForm();
    }
  }
}
 
$htmlresult = str_replace('<!-- THIS IS WHERE HEADER STUFF SHOULD GO -->', $footertext, $htmlresult);
$htmlresult = str_replace('##FORMSUBMITSTUFFGOESHERE##', ' '.$formtext, $htmlresult);
$htmlresult = str_replace('##BODYSUBMITSTUFFGOESHERE##', ' '.$bodytext, $htmlresult);
 
echo $htmlresult;
 
# vim:ts=4 sw=4 noet
?>