<thead>
  <tr>
    <th>Added</th>
    <th>Hint</th>
    <th>Manage</th>
  </tr>
</thead>
<tbody>
';
$hints = db_select_all('hints', array('id', 'added', 'body'), array('challenge' => $_GET['id']));
foreach ($hints as $hint) {
    echo '
  <tr>
      <td>', date_time($hint['added']), '</td>
      <td>', htmlspecialchars($hint['body']), '</td>
      <td><a href="edit_hint.php?id=', htmlspecialchars(short_description($hint['id'], 100)), '" class="btn btn-xs btn-primary">Edit</a></td>
  </tr>
  ';
}
echo '
</tbody>
</table>

<a href="new_hint.php?id=', htmlspecialchars($_GET['id']), '" class="btn btn-sm btn-warning">Add a new hint</a>
';
section_subhead('Delete challenge: ' . $challenge['title']);
form_start(CONFIG_SITE_ADMIN_RELPATH . 'actions/edit_challenge');
form_input_checkbox('Delete confirmation');
form_hidden('action', 'delete');
form_hidden('id', $_GET['id']);
message_inline_red('Warning! This will also delete all submissions, all hints and all files associated with challenge!');
Exemple #2
0
      <thead>
        <tr>
          <th>Title</th>
          <th>Description</th>
          <th class="center">Points</th>
          <th class="center">Visibility</th>
          <th class="center">Manage</th>
        </tr>
      </thead>
      <tbody>
    ';
        foreach ($challenges as $challenge) {
            echo '
        <tr>
          <td>', htmlspecialchars($challenge['title']), '</td>
          <td>', htmlspecialchars(short_description($challenge['description'], 50)), '</td>
          <td class="center">', number_format($challenge['points']), '</td>
          <td class="center">

            ', get_availability_icons($category['exposed'], $category['available_from'], $category['available_until'], 'Category'), '

            ', get_availability_icons($challenge['exposed'], $challenge['available_from'], $challenge['available_until'], 'Challenge'), '

          </td>
          <td class="center">
            <a href="edit_challenge.php?id=', htmlspecialchars($challenge['id']), '" class="btn btn-xs btn-primary">Edit</a>
            <a href="new_hint.php?id=', htmlspecialchars($challenge['id']), '" class="btn btn-xs btn-warning">Hint</a>
          </td>
        </tr>
        ';
        }
Exemple #3
0
 public function test_short_description_noCut()
 {
     $this->assertEquals('aa', short_description('aa', 2));
 }
" getlink="<?php 
                        echo site_url($activity_feed->link);
                        ?>
" class="backable_link"><?php 
                        echo short_description($activity_feed->description, 80);
                        ?>
</a></p>
                                            <?php 
                    } else {
                        ?>
                                                <p class="desc"><a href="<?php 
                        echo site_url($activity_feed->link);
                        echo !empty($activity_feed->child_id) ? '?child=' . $activity_feed->child_id : '';
                        ?>
" ><?php 
                        echo short_description($activity_feed->description, 80);
                        ?>
  </a></p>
                                            <?php 
                    }
                    ?>
                                        <?php 
                } else {
                    ?>
                                            <p><?php 
                    //echo $activity_feed->description;
                    ?>
</p>
                                        <?php 
                }
                ?>
require '../../include/mellivora.inc.php';
enforce_authentication(CONFIG_UC_MODERATOR);
head('User types');
menu_management();
section_head('Users types');
echo '
    <table id="files" class="table table-striped table-hover">
      <thead>
        <tr>
          <th>Title</th>
          <th>Description</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
    ';
$types = db_query_fetch_all('SELECT * FROM user_types ORDER BY title ASC');
foreach ($types as $type) {
    echo '
    <tr>
        <td>', htmlspecialchars($type['title']), '</td>
        <td>', short_description($type['description'], 50), '</td>
        <td><a href="edit_user_type.php?id=', htmlspecialchars($type['id']), '" class="btn btn-xs btn-primary">Edit</a></td>
    </tr>
    ';
}
echo '
      </tbody>
    </table>
     ';
foot();
    ORDER BY dm.title ASC');
echo '
    <table id="dynamic_menus" class="table table-striped table-hover">
      <thead>
        <tr>
          <th>Title</th>
          <th>Links to</th>
          <th>visibility</th>
          <th>Min user class</th>
          <th>Manage</th>
        </tr>
      </thead>
      <tbody>
    ';
foreach ($menu_items as $item) {
    echo '
    <tr>
        <td>', htmlspecialchars($item['title']), '</td>
        <td>', $item['link_title'] ? '<a href="' . CONFIG_SITE_URL . 'content?show=' . htmlspecialchars($item['permalink']) . '">' . htmlspecialchars($item['link_title']) . '</a>' : '<a href="' . htmlspecialchars($item['url']) . '">' . short_description($item['url'], 20) . '</a>', '
        </td>
        <td>', visibility_enum_to_name($item['visibility']), '</td>
        <td>', user_class_name($item['min_user_class']), '</td>
        <td><a href="' . CONFIG_SITE_ADMIN_URL . 'edit_dynamic_menu_item?id=', $item['id'], '" class="btn btn-xs btn-primary">Edit</a></td>
    </tr>
    ';
}
echo '
      </tbody>
    </table>
     ';
foot();
echo " has <strong>" . $searchnumrows . "</strong> results</p>";
if ($searchnumrows == 0) {
    echo "<h2>No Results</h2>";
} else {
    echo "Page " . $validpage . " of " . $numpages;
    echo "<p>";
    // figure out which records to display
    $offset = ($validpage - 1) * $pagesize;
    $pagesql = $query . " ORDER BY dateposted DESC LIMIT " . $offset . ", " . $pagesize . ";";
    echo $pagesql;
    //	$pageres = mysql_query($pagesql);
    //	$pagenumrows = mysql_num_rows($pageres);
    $pageres = $db->query($pagesql);
    $pagenumrows = $pageres->rowCount();
    //	while($pagerow = mysql_fetch_assoc($pageres)) {
    foreach ($pageres as $pagerow) {
        echo "<h2><a href='viewstory.php?id=" . $pagerow['id'] . "'>" . $pagerow['subject'] . "</a></h2>";
        echo "Posted on " . date('D jS F Y', strtotime($pagerow['date']));
        short_description($pagerow['body']);
    }
    echo "<p>";
    echo "<strong>Pages: </strong>";
    for ($i = 1; $i <= $numpages; $i++) {
        if ($i == $validpage) {
            echo "<strong>&bull;" . $i . "&bull;</strong> ";
        } else {
            echo "<a href='search.php?term=" . $_GET['term'] . "&page=" . $i . "'>" . $i . "</a>" . " ";
        }
    }
}
require "footer.php";
Exemple #8
0
    ?>
</a>
				</h2>
			</div>
			<p>[By <?php 
    the_author();
    ?>
 on <?php 
    the_time('F d, Y');
    ?>
 with <?php 
    comments_popup_link('No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post');
    ?>
]</p>
			<p><?php 
    short_description(20);
    ?>
...<a href="<?php 
    the_permalink();
    ?>
">[read more]</a></p>
			
		<?php 
}
?>
			
		</div>
		<div class="column3">
			<div class="title">
				<h2>Mauris vulputate</h2>
			</div>
      <thead>
        <tr>
          <th>#</th>
          <th>Name</th>
          <th>URI</th>
          <th>Session Administrator Account Email</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
    ';
$types = db_query_fetch_all('SELECT * FROM instances ORDER BY id ASC');
foreach ($types as $type) {
    $user = db_select_one('users', array('*'), array('id' => $type['authoratativeAccountID']));
    echo '
    <tr>
        <td>', htmlspecialchars($type['id']), '</td>
        <td>', short_description($type['name'], 50), '</td>
         <td>', short_description($type['instanceURI'], 50), '</td>
         <td>', short_description($user['email'], 50), '</td>
        <td><a href="actions/edit_instance.php?action=view&id=', htmlspecialchars($type['id']), '" class="btn btn-xs btn-warning">View</a>
        <a href="edit_instance.php?action=edit&id=', htmlspecialchars($type['id']), '" class="btn btn-xs btn-primary">Edit</a>
        </td>
    </tr>
    ';
}
echo '
      </tbody>
    </table>
     ';
foot();