/** * render Add Blog dialog */ public function render() { if ($_REQUEST['akID']) { $akID = $_REQUEST['akID']; if ($_REQUEST['akID']) { if ($_REQUEST['akID'] == 'same_tags') { $key = CollectionAttributeKey::getByHandle('tags'); $akID = $key->getAttributeKeyID(); } } $html = '<fieldset>'; $db = loader::db(); $r = $db->execute("SELECT * FROM atSelectOptions WHERE akID = ?", array($akID)); while ($row = $r->fetchrow()) { $id = $row['ID']; $options[$id] = $row['value']; } if (is_array($options)) { foreach ($options as $key => $option) { $html .= '<input type="checkbox" name="fields[]" value="' . $option . '">' . $option . '<br/>'; } } $html .= '</fieldset>'; //print json_encode($options); print $html; exit; } }
/** * Removes old entries for the supplied type */ protected function removeExpired($type) { $lifetime = '5184000'; // 60 days do { if ($type == UVTYPE_CHANGE_PASSWORD) { $lifetime = USER_CHANGE_PASSWORD_URL_LIFETIME; break; } if ($type == UVTYPE_LOGIN_FOREVER) { $lifetime = USER_FOREVER_COOKIE_LIFETIME; break; } break; } while (false); $db = loader::db(); $db->query('DELETE FROM UserValidationHashes WHERE type = ? AND uDateGenerated <= ?', array($type, $lifetime)); }
<div id="type_results"> <center class="ajax_block_loader" style="display: none;"><img src="<?php echo Loader::helper('concrete/urls')->getBlockTypeAssetsURL($bt, 'ajax-loader.gif'); ?> " alt="loading"/></center> </div> <?php echo $fm->hidden('ccID', $c->getCollectionID()); if ($fields) { $field_array = explode(',', $fields); ?> <fieldset class="existing_fields"> <?php if ($akID && $akID != 'same_tags') { $html = ''; $db = loader::db(); $r = $db->execute("SELECT * FROM atSelectOptions WHERE akID = {$akID}"); while ($row = $r->fetchrow()) { $id = $row['ID']; $options[$id] = $row['value']; } foreach ($options as $key => $option) { $html .= '<input type="checkbox" name="fields[]" value="' . $option . '"'; if (in_array($option, $field_array)) { $html .= 'checked=checked'; } $html .= '>' . $option . '<br/>'; } echo $html; } ?>