public function run() { for (;;) { $li_url = new LiUrlAction(); $uuid = new UuidAction(); $next_id = $uuid->getUuid('li_url'); $li_url_list = $li_url->getLiUrlList($next_id); add_all($li_url_list, 'li_url'); $uuid->setUuid('li_url', $next_id + 1); //sleep(config('sleep_time')); } }
public function run() { for (;;) { $img_url = new ImgUrlAction(); $next_url = $img_url->getNextUrl(); if ($next_url === NULL) { exit; } $img_url_list = $img_url->getImgUrlListByLiId($next_url); $img_url->upNextUrl(); if ($img_url_list === FALSE) { continue; } add_all($img_url_list, 'img_url'); //sleep(config('sleep_time')); } }
function frame_user_js($departmentid, $TO_ID = 'TO_ID', $TO_NAME = 'TO_NAME') { ?> <STYLE>.menulines { } </STYLE> <SCRIPT> <!-- var menu_enter=""; function borderize_on(e) { color="#708DDF"; source3=event.srcElement if(source3.className=="menulines" && source3!=menu_enter) source3.style.backgroundColor=color; } function borderize_on1(e) { for (i=0; i<document.all.length; i++) { document.all(i).style.borderColor=""; document.all(i).style.backgroundColor=""; document.all(i).style.color=""; document.all(i).style.fontWeight=""; } color="#003FBF"; source3=event.srcElement if(source3.className=="menulines") { source3.style.borderColor="black"; source3.style.backgroundColor=color; source3.style.color="white"; source3.style.fontWeight="bold"; } menu_enter=source3; } function borderize_off(e) { source4=event.srcElement if(source4.className=="menulines" && source4!=menu_enter) {source4.style.backgroundColor=""; source4.style.borderColor=""; } } //--> </SCRIPT> <SCRIPT language=JavaScript> var parent_window = parent.dialogArguments; function add_user(user_id,user_name) { TO_VAL=parent_window.form1.<?php echo $TO_ID; ?> .value; if(TO_VAL.indexOf(","+user_id+",")<0 && TO_VAL.indexOf(user_id+",")!=0) { parent_window.form1.<?php echo $TO_ID; ?> .value += user_id+","; parent_window.form1.<?php echo $TO_NAME; ?> .value += user_name+","; } } function add_user_one(user_id,user_name) { TO_VAL=parent_window.form1.<?php echo $TO_ID; ?> .value; if(TO_VAL.indexOf(","+user_id+",")<0 && TO_VAL.indexOf(user_id+",")!=0) { parent_window.form1.<?php echo $TO_ID; ?> .value = user_id; parent_window.form1.<?php echo $TO_NAME; ?> .value = user_name; } } </SCRIPT> <?php add_all($departmentid); }
private function _set_filter() { // filter? $value = Url::GetRequest('filter', null); // parents? $parents = $this->Model ? $this->Model->get_first_parent() : false; if (!empty($parents)) { $parent = $parents['key']; $parent_params = $parents['value']; AppModel::RelationNameParams($parent, $parent_params); $parents = add_all(AppModel::FindAllAssoc_options($parent)); } else { $parents = $parent = false; } // short filter? if ($short = is_numeric($value)) { if ($parent) { Globe::Load($parent, 'model'); $field = array_get($parent_params, 'foreignKey', AppInflector::tableize($parent) . '_id'); if ($value != false) { $where = "{$field}={$value}"; } else { $where = null; } } else { $field = $where = null; } } else { if (!empty($value)) { preg_match_all('/\\s*([^=]+)\\s*/', $value, $parts); // explode & trim! $field = array_shift($parts[0]); $value = implode('=', $parts[0]); $where = "{$field}='{$value}'"; } else { $field = $where = null; } } $this->assign('filter', $this->filter = (object) array('short' => $short, 'where' => $where, 'field' => $field, 'value' => $value, 'parent' => $parent, 'parents' => $parents)); }