separate the demo sites

This commit is contained in:
friendica 2012-05-30 03:37:30 -07:00
parent dcf4bf5ec4
commit 211f729622
1 changed files with 28 additions and 5 deletions

View File

@ -26,12 +26,14 @@ function siteinfo_content(&$a) {
$o .= '<p>Friendica is experiencing very rapid growth and we need more public portals - as some of our primary servers are reaching capacity. Friendica is a decentralised and distributed network. Help us share the load. If you can provide a Friendica server for public use, please send the URL to info at friendica dot com. We will include you in our list.</p>';
$r = q("select * from site where url != '' and version != '' order by rand()");
$r = q("select * from site where url != '' and version != '' and not plugins like '%%testdrive%%' order by rand()");
$policy = array ( 'REGISTER_CLOSED' => 'closed', 'REGISTER_OPEN' => 'open', 'REGISTER_APPROVE' => 'requires approval');
$results = false;
if(count($r)) {
$results = true;
$o .= '<table border=1>';
$o .= '<tr>';
$o .= '<td>' . t('Site Name') . '</td>';
@ -56,17 +58,38 @@ function siteinfo_content(&$a) {
$o .= '<td>' . $rr['updated'] . '</td>';
$o .= '</tr>';
}
$o .= '</table>';
}
$r = q("select * from site where url != '' and version = '' order by name asc");
$r = q("select * from site where url != '' and version != '' and plugins like '%%testdrive%%' order by rand()");
if(count($r)) {
$o .= '<p>Sites that could not be verified. May be running older versions.</p>';
$o .= '<tr><td colspan="7" height="100px" ><strong>-- Demo and test sites -- Limited account duration with expiration --</stron></td></tr>';
foreach($r as $rr) {
$o .= '<a href="' . $rr['url'] . '">' . $rr['url'] . '</a><br />';
if(! $rr['version'])
continue;
$o .= '<tr>';
$o .= '<td>' . '<a href="' . $rr['url'] . '"><strong>' . $rr['name'] . '</strong><br />' . $rr['url'] . '</a>' . '</td>';
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
$o .= '<td>' . $rr['info'] . '</td>';
$o .= '<td>' . $rr['version'] . '</td>';
$o .= '<td>' . str_replace(',',', ',$rr['plugins']) . '</td>';
$o .= '<td>' . '<a href="' . $rr['admin_profile'] . '">' . $rr['admin_name'] . '</a>' . '</td>';
$o .= '<td>' . $rr['updated'] . '</td>';
$o .= '</tr>';
}
}
if($results)
$o .= '</table>';
// $r = q("select * from site where url != '' and version = '' order by name asc");
// if(count($r)) {
// $o .= '<p>Sites that could not be verified. May be running older versions.</p>';
// foreach($r as $rr) {
// $o .= '<a href="' . $rr['url'] . '">' . $rr['url'] . '</a><br />';
// }
// }