public function construct() { // get the fname and lname of the mod__person_id $r = aql::value("person{fname,lname}", $this->mod__person_id); $this->addProperty('modified_by'); $this->modified_by = $r['fname'] . ' ' . $r['lname']; $this->addProperty('message'); $this->message = $this->getMessage(); }
/** * Makes sure this account only has one app by this name * @param string $val */ public function validate_name($val) { $t = $this->getPrimaryTable(); $n = static::getAccountFieldName(); $acct_id = $this->{$n} ?: ($this->isInsert() ? null : aql::value("{$t}.{$n}", $this->getID())); $clause = array('name' => $val); if ($acct_id) { $clause[$n] = $acct_id; } if (static::count($clause)) { $this->addError('duplicate_app_name'); } }
$p->seo['city'] = $venue['city']; if ($venue['state']) { $p->seo['state'] = $venue['state']; } $p->seo['geo-region'] = 'US-' . $venue['state']; $p->seo['zipcode'] = $venue['zipcode']; } // Reset Placename is market neighborhood is set. if ($venue['market_nbhd_id']) { $market_nbhd_id = $venue['market_nbhd_id']; } if ($p->vars['market_nbhd_id']) { $market_nbhd_id = $p->vars['market_nbhd_id']; } if ($market_nbhd_id) { $p->seo['placename'] = aql::value('market_nbhd.name', $market_nbhd_id); } if ($ct_category_id) { $ct_category = aql::profile('ct_category', $ct_category_id); $category_name = $ct_category['name']; if ($ct_category['ct_holiday_id']) { $ct_holiday_id = $ct_category['ct_holiday_id']; } } if ($ct_holiday_id) { $ct_holiday = aql::profile('ct_holiday', $ct_holiday_id); $holiday_name = $ct_holiday['name']; $holiday1 = $ct_holiday['holiday1']; $holiday2 = $ct_holiday['holiday2']; $holiday3 = $ct_holiday['holiday3']; $holiday4 = $ct_holiday['holiday4'];
?> </td> <td class="column" valign="middle"><?php echo aql::value('dup_phrase_data.phrase', $o['phrase2__dup_phrase_data_id']); ?> </td> <td class="column" valign="middle"><?php echo aql::value('dup_modifier.phrase', $o['dup_modifier_id']); ?> </td> <td class="column" valign="middle"><?php echo $o['total_volume']; ?> </td> <td class="column" valign="middle"><?php echo aql::value('website.name', $o['website_id']); ?> </td> <td class="column" valign="middle"><?php echo $o['category']; ?> </td> <td class="column" valign="middle"><?php echo $o['market_name']; ?> </td> <td class="column" valign="middle"><?php echo $o['page']; ?> </td> <td class="column" valign="middle" style="text-align:center;"><input class="assign" type="button" group_ide="<?php
<?php global $seo_field_array; $website_id = aql::value("website_page.website_id", $_POST['website_page_id']); if ($_POST['val'] == 1) { $data = array('website_id' => $website_id, 'website_page_id' => $_POST['website_page_id'], 'on_website' => 1, 'uri' => $_POST['uri']); foreach ($seo_field_array as $type => $arr) { foreach ($arr as $field => $max) { $data['field'] = $field; $rs = aql::select("website_uri_data { id as uri_id where website_id = " . $website_id . " and uri = '" . $data['uri'] . "' and field='" . $field . "' }"); if (!is_numeric($rs[0]['uri_id'])) { $data['field'] = $field; aql::insert('website_uri_data', $data); } } } aql::update('website_page', array('url_specific' => $_POST['val']), $_POST['website_page_id']); //sql("update website_uri_data set on_website = 1 where uri = '".$_POST['uri']."' and website_id = ".$website_id); $aql = "website_uri_data { where uri = '" . $_POST['uri'] . "' and website_id = " . $website_id . "}"; $rs = aql::select($aql); if ($rs) { foreach ($rs as $r) { $website_uri_data = array('on_website' => '1'); $rs = aql::update('website_uri_data', $website_uri_data, $r['website_uri_data_id']); } } ?> <input type="hidden" id="uri_enabled" value="<?php echo $_POST['uri']; ?> " />
?> <div class="tab"><a field="<?php echo $field; ?> " class="tab_click"><?php echo ucwords(str_replace('_', ' ', str_replace('meta_', '', str_replace('og:', '', $field)))); ?> </a></div> <?php } ?> <div class="clear"></div> </div> <div id="seo_fields"> <?php $opt_phrase = aql::value("website_page.opt_phrase", $page['website_page_ide']); ?> <div class="seo_field"> <fieldset> <legend class="legend">Opt Phrase</legend> <h3><?php echo $opt_phrase ? $opt_phrase : 'Not Set'; ?> </h3> </fieldset> </div> <?php foreach ($seo_field_array['html'] as $field => $max) { $rs = aql::select("website_page_data { draft, value where field = '{$field}' and website_page_ide = '{$page['website_page_ide']}' }"); ?> <div class="seo_field">
} if (!$params) { $error = sprintf('Invalid gallery token: <strong>%s</strong>. Could not get params to generate gallery.', $_POST['_token']); throw new Exception($error); } $gallery = vf::gallery($params); $folder = $gallery->initFolder(true); $items = $folder->items; } else { $items = $gallery->folder->items; if (!$items) { $items = $gallery->items; } } if ($gallery->db_field && $gallery->db_row_id) { $items = array(array('_id' => aql::value($gallery->db_field, $gallery->db_row_id))); if (!$items[0]['_id']) { $items = array(); } } $empty = count($items) == 0; ?> <div class="vf-gallery has-floats <?php echo $empty ? 'vf-gallery-empty' : ''; ?> " id="<?php echo $gallery->identifier; ?> " token="<?php echo $gallery->_token;
<input type="text" style="width:850px;" field="<?php echo $_POST['field']; ?> " page_ide="<?php echo $_POST['website_page_ide']; ?> " value="<?php echo aql::value('website_page.' . $_POST['field'], $_POST['website_page_ide']); ?> " id="input_field" />
/** * Gets an array of vf_item ids from the current object * @return array [id] */ public function getItemIDs() { $items = $this->items ?: $this->folder->items; if ($this->db_field && $this->db_row_id) { $items = array((object) array('id' => \aql::value($this->db_field, $this->db_row_id))); } // if there are no items, return array if (!is_array($items)) { return array(); } $r = array_filter(array_map(function ($i) { return $i->id; }, $items ?: array())); if ($this->limit) { $r = array_slice($r, 0, $this->limit); } return $r; }
<?php $title = "Add Image to Article"; template::inc('skybox', 'top'); $media_item_ide = $_POST['media_item_ide']; $model = 'media_item'; $img = media::get_item($media_item_ide, 240, 300); $blog_article_ide = $_POST['blog_article_ide']; $blog_article_id = decrypt($blog_article_ide, 'blog_article'); $profile = aql::profile('media_item', $media_item_ide); $blog_ide = $_POST['blog_ide']; if (!$blog_ide && $blog_article_id) { $blog_ide = encrypt(aql::value('blog_article.blog_id', $blog_article_id), 'blog'); } $aql = "blog {\t\n\t\t\t\tfull_width,\n\t\t\t\tpartial_width\n\t\t\t\twhere blog.ide = {$blog_ide}\n\t\t\t} "; $rs = aql::select($aql); if ($rs) { $full_width = $rs[0]['full_width']; $partial_width = $rs[0]['partial_width']; } ?> <div class = "has-floats" id = "insert_image_skybox" class = "has-floats"> <input type = "hidden" value = "<?php echo $media_item_ide; ?> " id = "media_item_ide"/> <div class = "col float-left"> <div class="field"> <?php $field = 'caption'; ?>