function MakeCreateUserChildOfSelect($info, $selected = 0){ echo _FORM::SelectBegin(PAGES_CHILDOF); echo _FORM::Option("root", 0, $selected==0); $count = sizeof($info); for($i=0; $i<$count; $i++){ echo _FORM::Option( $info[$i]->getTitle(), $info[$i]->getPageID(), $selected==$info[$i]->getPageID()); } echo _FORM::SelectEnd(); }
public function absoluteContent() { ?> <h2><?php echo $this->crossInfo[_ADMINPAGE::USERS_LIST]->getUsername(); ?>'s "<?php echo $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getTitle(); ?>" Page Content</h2> <?php if (isset($this->crossInfo[RESULTS])){ echo $this->crossInfo[RESULTS]; } ?> <?php echo FormTextfieldWriter::EchoFormLayoutTemplate( URL_PAGE_ADMIN."?".ACTION."="._ADMINPAGE::PAGES_WRITE."&".PAGES_PAGEID."=".$this->crossInfo[_ADMINPAGE::PAGES_INFO]->getPageID(), ACTION_UPDATE, _HTML::I_2._FORM::Hidden(PAGES_PAGEID, $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getPageID()), _HTML::I_3."Page Title: "._FORM::Text(PAGES_TITLE, $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getTitle(), 40, 255), PAGES_CONTENT, 70,// cols 20,// rows $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getContent(), "Update Page"); ?> <?php if (_SESSION::GetIsMaster() || $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getUserID() == _SESSION::GetUserID()){ ?> <h2><?php echo $this->crossInfo[_ADMINPAGE::USERS_LIST]->getUsername(); ?>'s "<?php echo $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getTitle(); ?>" Page Rights</h2><?php echo _HTML::I_1."<div id='_rightscontainer'>"; echo _HTML::I_2._FORM::_FormBegin("updatepage", URL_PAGE_ADMIN."?".ACTION."="._ADMINPAGE::PAGES_WRITE); echo _HTML::I_3._FORM::Hidden(ACTION_GO, ACTION_RIGHTS); echo _HTML::I_3._FORM::Hidden(PAGES_PAGEID, $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getPageID()); $count = sizeof($this->crossInfo[_ADMINPAGE::RIGHTS_LIST]); $rightslist = ""; $first = true; for($i=0; $i<$count; $i++){ if ($this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][USERS_USERNAME] != _SESSION::GUEST && $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][USERS_USERID] != _SESSION::GetUserID()){ if ($first){ $first = false; } else { $rightslist .= "&"; } $rightslist .= $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][USERS_USERID]; echo _HTML::I_3."<div id='_rightindividual'>"; echo _HTML::I_4."<div style='"._CSS::FloatLeftWidth(200)."'>"; echo _HTML::I_5.$this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][USERS_USERNAME].": "; echo _HTML::I_4."</div>"; echo _HTML::I_4."<div style='"._CSS::FloatLeftWidth(200)."'>"; echo _HTML::I_5._FORM::SelectBegin($this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][USERS_USERID]); if ($this->crossInfo[_ADMINPAGE::PAGES_INFO]->getIsPrivate()){ echo _HTML::I_6._FORM::Option("None", 0, $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == 0); echo _HTML::I_6._FORM::Option("Can See", PAGERIGHTS_USERRIGHT_SEE, $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == PAGERIGHTS_USERRIGHT_SEE); } echo _HTML::I_6._FORM::Option("Can Comment", PAGERIGHTS_USERRIGHT_COMMENT, $this->crossInfo[_ADMINPAGE::PAGES_INFO]->getIsPrivate() ? $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == PAGERIGHTS_USERRIGHT_COMMENT : ($this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == 0 || $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == PAGERIGHTS_USERRIGHT_SEE || $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == PAGERIGHTS_USERRIGHT_COMMENT) ); echo _HTML::I_6._FORM::Option("Can Write", PAGERIGHTS_USERRIGHT_WRITE, $this->crossInfo[_ADMINPAGE::RIGHTS_LIST][$i][PAGERIGHTS_USERRIGHT] == PAGERIGHTS_USERRIGHT_WRITE); echo _HTML::I_5._FORM::SelectEnd(); echo _HTML::I_4."</div>"; echo _HTML::I_3."</div>"; } } echo _HTML::I_2._FORM::Hidden(_ADMINPAGE::RIGHTS_LIST, $rightslist); echo _HTML::I_2._FORM::Submit("Update Rights"); echo _HTML::I_2._FORM::_FormEnd(); echo _HTML::I_1._HTML::DIV_E; } }