query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
0c264b76ae296f9778a305d59183e62c
Fetch the results of the query in to an object of this classname
[ { "docid": "3a8df7425a806c9c85f5e2320f2ff9d1", "score": "0.6377447", "text": "public function fetchInto( $className );", "title": "" } ]
[ { "docid": "23eea2741687996ced33b6e1bb6d2df5", "score": "0.728809", "text": "public function fetchObject() {\n\n return mysql_fetch_object($this->getResultId());\n }", "title": "" }, { "docid": "cea0bd42ed3d0971039e1179d2aa0c40", "score": "0.70803654", "text": "public function fetch()\n\t{\n\t\treturn $this->results;\n\t}", "title": "" }, { "docid": "2c92a2acbf43911b6176fdce4d1f3369", "score": "0.7065113", "text": "protected function _get()\n\t{\n\t\t// execute the query\n\t\t$ret = $this->_instance->query($this->__toString());\n\t\t\n\t\t// let the mapper convert the data into objects\n\t\t$ret = $this->mapper->extract($ret, $this->mapped_objects, $this->alias_paths, $this->main_object);\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "120fa4f4fca4ca6eb77b7dd31dcaceca", "score": "0.6856475", "text": "public function _fetch_object()\n {\n return mysqli_fetch_object($this->result_id);\n }", "title": "" }, { "docid": "d3deee40592fdd7dcda7a81118e2f356", "score": "0.68191695", "text": "public function fetchResults()\n {\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "367c63435383aff4007029c72715aeb0", "score": "0.6780647", "text": "public function fetch()\n\t{\n\t\treturn $this->getResult()->fetch();\n\t}", "title": "" }, { "docid": "bfb6b6921f6bdc5f86de70192f2904aa", "score": "0.6780476", "text": "public function fetchObject($result, $class = 'stdClass') {\n\n\t\tif ($this->name == 'mysqli') {\n\t\t\treturn $class != 'stdClass' ? mysqli_fetch_object($result, $class) : mysqli_fetch_object($result);\n\t\t}\n\n\t\treturn $class != 'stdClass' ? mysql_fetch_object($result, $class) : mysql_fetch_object($result);\n\t}", "title": "" }, { "docid": "99310ecb1a281b293f1ee71093e113de", "score": "0.6751102", "text": "public function fetchObject($result)\n {\n return mysql_fetch_object($result);\n }", "title": "" }, { "docid": "75dbdd0cffab2f300c746412226a9b0f", "score": "0.67138016", "text": "public function fetch() {\n $this->retrieveRecordset();\n \n $class = $this->base_class;\n $data = $class::$connection->fetchOne($this->cursor);\n if (!$data) {\n $this->is_empty = true;\n return null;\n }\n\n return new $class($data);\n }", "title": "" }, { "docid": "1feb22327fb1993e071ded651885ca0b", "score": "0.6710185", "text": "public function fetch()\n {\n $request = \"SELECT * FROM \" . $this->table_name;\n $request.= !empty($this->find_request['where']) ? \" \" . $this->find_request['where'] : \"\";\n $request.= !empty($this->find_request['groupBy']) ? \" \" . $this->find_request['groupBy'] : \"\";\n $request.= !empty($this->find_request['order']) ? \" \" . $this->find_request['order'] : \"\";\n $request.= !empty($this->find_request['limit']) ? \" \" . $this->find_request['limit'] : \"\";\n \n $query = $this->db->prepare($request);\n \n if (!empty($this->find_request['params'])) {\n foreach($this->find_request['params'] as $key=>&$value) {\n $query->bindParam($key,$value);\n }\n }\n \n $this->find_request = null;\n \n $query->execute();\n $query->setFetchMode(PDO::FETCH_OBJ);\n \n if ($query->rowCount() > 0) {\n $data = array();\n \n while ($result = $query->fetch()) {\n $Record = new $this->class_name($this->db);\n $Record->hydrate($result);\n \n $data[] = $Record;\n }\n \n return $data;\n }\n else {\n return array();\n }\n }", "title": "" }, { "docid": "e445d13b2948fe35bcd7ad0f75920237", "score": "0.6697942", "text": "public abstract function fetch($result);", "title": "" }, { "docid": "c90391e53c7019a04dd7013ca59544dd", "score": "0.6686508", "text": "function fetch_object() {\n switch(DbConfig::TYPE) {\n case 'mysql':\n $object = mysql_fetch_object($this->res);\n break;\n case 'pgsql':\n $object = pg_fetch_object($this->res);\n break;\n }\n\t\t\treturn($object);\n\t\t}", "title": "" }, { "docid": "0f0b3bcb5ece6ef75af0c66bb7a6b0de", "score": "0.66397876", "text": "protected function get_results_from_query() {\n $this->open_connection();\n $result = $this->conn->prepare($this->query);\n $result->execute();\n $this->rows = $result->fetchAll(PDO::FETCH_ASSOC);\n $result->closeCursor();\n $this->close_connection();\n \n }", "title": "" }, { "docid": "c5734735598db92fe945a6ca61402c77", "score": "0.662534", "text": "private function fetchObjects() {\n $dl = DataList::create($this->objectName);\n\n foreach ($this->joins as $join) {\n $table = $this->aliases[$join['alias']]; // gets the base table name\n $table = self::get_table_name($table); // gets the versioned table name\n $joinFunction = $join['type'] == self::JOIN_TYPE_INNER ? 'innerJoin' : 'leftJoin';\n $clause = $this->replaceTableNamesWithAliases($join['clause']);\n $dl = $dl->$joinFunction($table, $clause, $join['alias']);\n }\n\n $dl = $dl->where($this->replaceTableNamesWithAliases(implode(\"\\n\", $this->wheres)));\n\n $dl = $dl->sort($this->replaceTableNamesWithAliases(implode(\", \", $this->sorts)));\n\n if ($this->limit || $this->offset) {\n $dl = $dl->limit($this->limit, $this->offset);\n }\n\n return $dl;\n }", "title": "" }, { "docid": "3bc96d562601543cd102e1f88984bba8", "score": "0.6623468", "text": "protected function get_results_from_query(){\n $this->open_conexion();\n $this->resultados = $this->conexion->query($this->query);\n while($this->rows[] = $this->resultados->fetch_assoc());\n $this->resultados->close();\n $this->close_conexion();\n\n }", "title": "" }, { "docid": "8ae8e13db9f6e385fd8da5aa7192578c", "score": "0.65024227", "text": "public function object() {\n $this->firstTime();\n return $this->result->fetch_object();\n }", "title": "" }, { "docid": "53cac90bc7c4b1db2f96a47dec6878d4", "score": "0.6502253", "text": "public function fetch_object($query)\r\n\t{\r\n\t\t$this->result = pg_fetch_object($query);\r\n\t\treturn $this->result;\r\n\t}", "title": "" }, { "docid": "f5a476d9d146d374a786e3e319605f2d", "score": "0.64893556", "text": "public function fetch() {\n return $this->result->fetch();\n }", "title": "" }, { "docid": "def82615f0931b65dbf5870ef9fcd461", "score": "0.64798814", "text": "protected function fetchData()\r\n {\r\n $this->addScopes();\r\n $criteria = $this->getCriteria();\r\n if (($pagination = $this->getPagination()) !== false) {\r\n $pagination->setItemCount($this->getTotalItemCount());\r\n $pagination->applyLimit($criteria);\r\n }\r\n if (($sort = $this->getSort()) !== false)\r\n $sort->applyOrder($criteria);\r\n // Use together() for query?\r\n if ($this->joinAll) {\r\n return CActiveRecord::model($this->modelClass)->with($criteria->with)->together()->findAll($criteria);\r\n } else {\r\n return CActiveRecord::model($this->modelClass)->findAll($criteria);\r\n }\r\n }", "title": "" }, { "docid": "c74bfea6537f07a6b929af259aa245b4", "score": "0.64790505", "text": "static function fetch($result_statement, $class = null) {\n if ($class) {\n $result_statement->setFetchMode(PDO::FETCH_CLASS, $class);\n return $result_statement->fetch(PDO::FETCH_CLASS);\n }\n return $result_statement->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "f0bb722ee38756677eb81bf664c3cfef", "score": "0.647877", "text": "public function fetch()\n {\n return $this->m->fetch();\n }", "title": "" }, { "docid": "ce5f74fd080f244e80ebb76138d71954", "score": "0.64732736", "text": "function &fetchObject(&$resource, $class_name, $params=NULL) { return mysql_fetch_object($resource, $class_name, $params); }", "title": "" }, { "docid": "9c9c6da35e520d8eb3f5d71788884959", "score": "0.6465322", "text": "public function fetch() {\n\t\treturn self::getInstance()->prepare->fetch(self::getInstance()->getFetchMode());\n\t}", "title": "" }, { "docid": "6aa990242f1556eb584580b323b08b25", "score": "0.64598686", "text": "function &fetchObject(&$resource, $class_name, $params=NULL) { return mysqli_fetch_object($resource, $class_name, $params); }", "title": "" }, { "docid": "c15e0725aca5187cf45592603b863d71", "score": "0.64511657", "text": "public function fetch(): array\n {\n $this->setRetrieveOneDocument(false);\n return $this->getResults();\n }", "title": "" }, { "docid": "842bc4c52e5302a03fcf72410034fbd7", "score": "0.64171386", "text": "public function loadObject($class_name = \"stdClass\"){\n $object = $this->stmt->fetchObject($class_name);\n return $object;\n }", "title": "" }, { "docid": "33c9a547e9b118e8780c4a2eb305ee40", "score": "0.6416529", "text": "function getResults() {\n\t\t\n\t\t// get paginated result set object\n\t\t$rs = owa_coreAPI::supportClassFactory('base', 'paginatedResultSet');\n\t\t\n\t\t$bm = $this->chooseBaseEntity();\n\t\t\t\t\n\t\tif ($bm) {\n\t\t\t\n\t\t\t$bname = $bm->getName();\n\t\t\n\t\t\towa_coreAPI::debug(\"Using $bname as base entity for making result set.\");\n\t\n\t\t\t// set constraints\n\t\t\t$this->applyJoins();\n\t\t\towa_coreAPI::debug('about to apply constraints');\n\t\t\t$this->applyConstraints();\n\t\t\towa_coreAPI::debug('about to apply selects');\n\t\t\t$this->applySelects();\n\t\t\n\t\t\t// set from table\n\t\t\tif ( $this->segment ) {\n\t\t\t\t$this->db->selectFrom( $this->generateSegmentQuery( $bm ), $bm->getTableAlias() );\n\t\t\t} else {\n\t\t\t\t$this->db->selectFrom($bm->getTableName(), $bm->getTableAlias());\n\t\t\t}\n\t\t\n\t\t\t// generate aggregate results\n\t\t\t$results = $this->db->getOneRow();\n\t\t\t// merge into result set\n\t\t\tif ($results) {\n\t\t\t\t$rs->aggregates = array_merge($this->applyMetaDataToSingleResultRow($results), $rs->aggregates);\n\t\t\t}\n\t\t\t\n\t\t\t// setup dimensional query\n\t\t\tif (!empty($this->dimensions)) {\n\t\t\t\t\n\t\t\t\t$this->applyJoins();\n\t\t\t\t// apply dimensional SQL\n\t\t\t\t$this->applyDimensions();\n\t\t\t\t\n\t\t\t\t$this->applySelects();\n\t\t\t\t\n\t\t\t\t// set from table\n\t\t\t\tif ( $this->segment ) {\n\t\t\t\t\t$this->db->selectFrom( $this->generateSegmentQuery( $bm ), $bm->getTableAlias() );\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->selectFrom($bm->getTableName(), $bm->getTableAlias());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// pass limit to db object if one exists\n\t\t\t\tif (!empty($this->limit)) {\n\t\t\t\t\t$rs->setLimit($this->limit);\n\t\t\t\t}\n\t\t\t\t// pass limit to db object if one exists\n\t\t\t\tif (!empty($this->page)) {\n\t\t\t\t\t$rs->setPage($this->page);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->applyConstraints();\n\t\t\t\t\n\t\t\t\tif (array_key_exists('orderby', $this->params)) {\n\t\t\t\t\t$sorts = $this->params['orderby'];\n\t\t\t\t\t// apply sort by\n\t\t\t\t\tif ($sorts) {\n\t\t\t\t\t\t$this->applySorts();\n\t\t\t\t\t\tforeach ($sorts as $sort) {\n\t\t\t\t\t\t\t//$this->db->orderBy($sort[0], $sort[1]);\n\t\t\t\t\t\t\t$rs->sortColumn = $sort[0];\n\t\t\t\t\t\t\tif (isset($sort[1])){\n\t\t\t\t\t\t\t\t$rs->sortOrder = strtolower($sort[1]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$rs->sortOrder = 'asc';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t// add labels\n\t\t\t\t$rs->setLabels($this->getLabels());\t\n\t\t\t\n\t\t\t\t// generate dimensonal results\n\t\t\t\t$results = $rs->generate($this->db);\n\t\t\t\t\n\t\t\t\t$rs->resultsRows = $this->applyMetaDataToResults($results);\n\t\t\t}\n\t\t\t\n\t\t\t// add labels\n\t\t\t$rs->setLabels($this->getLabels());\n\t\t\t\n\t\t\t// add period info\n\t\t\t\n\t\t\t$rs->setPeriodInfo($this->params['period']->getAllInfo());\n\t\t\t\n\t\t\t$rs = $this->computeCalculatedMetrics($rs);\n\t\t\t\n\t\t\t// add urls\n\t\t\t$urls = $this->makeResultSetUrls();\n\t\t\t$rs->self = $urls['self'];\n\t\t\t\n\t\t\tif ($rs->more) {\n\t\t\t\n\t\t\t\t$rs->next = $urls['next'];\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->page >=2) {\n\t\t\t\t$rs->previous = $urls['previous'];\n\t\t\t}\n\t\t\t\n\t\t\t$rs->createResultSetHash();\n\t\t}\n\t\t\n\t\t$rs->errors = $this->errors;\n\t\t\n\t\t$rs->setRelatedDimensions( $this->getAllRelatedDimensions( $bm ) );\n\t\t$rs->setRelatedMetrics( $this->getAllRelatedMetrics( $bm ) );\n\t\t\t\t\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "537b3bd74036b346a67c4136edf480a6", "score": "0.6414537", "text": "function FetchObject()\n\t{\n\t\tif(!$this->Result)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$Return = Array();\n\n\t\t\twhile($Object = mysql_fetch_object($this->Result))\n\t\t\t{\n\t\t\t\t$Return[] = $Object;\n\t\t\t}\n\n\t\t\tif(count($Return) < 1)\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $Return;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1a7e4b94e5f050b20e281664623ae3e5", "score": "0.64017946", "text": "protected function get_results_from_query()\n {\n $this->open_connection(); \n $stm = $this->conn->prepare($this->query);\n $stm->execute() ;\n $this->rows= array(\"cuerpo\"=> $stm->fetchAll()); \n \t var_dump($this->rows);\n $this->close_connection();\n \n }", "title": "" }, { "docid": "2b7d619f7222d185afe862c60f89ccd2", "score": "0.63788056", "text": "protected function _fetch_object($class_name = 'stdClass')\n {\n return (object)$this->_fetch_assoc();\n }", "title": "" }, { "docid": "854c9034293287c1bb0df3409795145a", "score": "0.63783604", "text": "function stmt_fetch_object() {\n\t\t$metadata = mysqli_stmt_result_metadata($this->stmt);\n\n\t\t$fieldNames = array(&$this->stmt);\n\n\t\t$obj = new stdClass();\n\t\twhile($field = mysqli_fetch_field($metadata)) {\n\t\t\t$fieldName = $field->name;\n\t\t\t$fieldNames[] = &$obj->$fieldName;\n\t\t}\n\n\t\tcall_user_func_array('mysqli_stmt_bind_result', $fieldNames);\n\n\t\t$result_obj = array();\n\t\tmysqli_stmt_execute($this->stmt);\n\t\t$i = 0;\n\t\twhile(mysqli_stmt_fetch($this->stmt)) {\n\t\t\t$row = new stdClass();\n\n\t\t\t// Can not use $result_obj[] = $obj directly, seems has something to do with array reference, not sure about that.\n\t\t\tforeach ($obj as $prop => $value) {\n\t\t\t\t$row->$prop = $value;\n\t\t\t}\n\t\t\t$result_obj[] = $row;\n\t\t}\n\n\t\treturn $result_obj;\n\t}", "title": "" }, { "docid": "4afedc7b104301004f59749a98d09c9b", "score": "0.6373076", "text": "public function fetch();", "title": "" }, { "docid": "4afedc7b104301004f59749a98d09c9b", "score": "0.6373076", "text": "public function fetch();", "title": "" }, { "docid": "4afedc7b104301004f59749a98d09c9b", "score": "0.6373076", "text": "public function fetch();", "title": "" }, { "docid": "f8ab3c70674dc1f608a2f8893af442df", "score": "0.63699156", "text": "protected function fetchData()\n {\n $criteria=clone $this->getCriteria();\n\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t\t$pagination->route = 'search';\n\t\t}\n\n\n\t\t$qb = $this->_em->getRepository('\\Rendes\\Modules\\Groups\\Entities\\Group')->createQueryBuilder('c');\n if(!empty($criteria->params)){\n $params = array_pop($criteria->params);\n $qb = $qb->where('c.'.$params['key'].$params['type'].':'.$params['key']);\n foreach($criteria->params as $params){\n $qb = $qb->andWhere('c.'.$params['key'].$params['type'].':'.$params['key']);\n }\n\n $criteria = $this->getCriteria();\n foreach($criteria->params as $params){\n $qb = $qb->setParameter($params['key'], $params['value']);\n }\n }\n\t\tif($criteria->limit > 0){\n\t\t\t$qb->setMaxResults($criteria->limit);\n\t\t}\n\n\t\tif($criteria->offset > 0){\n\t\t\t$qb->setFirstResult($criteria->offset);\n\t\t}\n\n $query = $qb->getQuery();\n $this->data = $query->getArrayResult();\n return $this->data;\n }", "title": "" }, { "docid": "c1cf755396ff90ce0de83b899b9d7bac", "score": "0.6360125", "text": "public function load()\n {\n\n if ($this->result)\n $this->data = $this->result->getAll();\n else\n $this->data = [];\n\n }", "title": "" }, { "docid": "8ca60cd3f1e40e38cfa31594d6b8d2c0", "score": "0.63489574", "text": "protected function get_results_from_query() {\n\t\t$this->abrir_conexion();\n\t\t$this->result = pg_query($this->query);\n\n\t\twhile ($this->rows[] = pg_fetch_array($this->result)){\n\t\t\t//array_pop($this->rows);\n\t\t}\n\t\tarray_pop($this->rows); //ELIMINA EL ULTIMO RESULTADO 'null'\n\t\t$this->cerrar_conexion();\n\t}", "title": "" }, { "docid": "488a2e213af400783fd7ab885437a59d", "score": "0.63423", "text": "function Read(array $query)\n {\n\n\n //Results fetched\n $results = [];\n\n $connection = $this->connection;\n\n $connection->connect();\n\n $collection = $connection->client()->objects;\n\n $query[\"_type\"] = $this->type;\n\n $cursor = $collection->find($query);\n\n foreach ($cursor as $k=>$v)\n {\n $object = new $v[\"_type\"]();\n\n $results[strval($v[\"_id\"])]= $object->ObjectFromArray($v);\n }\n\n\n\n return $results;\n }", "title": "" }, { "docid": "55ac0e0ec927bfa308dd84c5a5c35d0e", "score": "0.6338174", "text": "public function fetchAllToObject( $result = NULL ) {\r\n $_object_array = array();\r\n while( $res = $this->fetchObject( $result ) ) {\r\n $_object_array[] = $res;\r\n }\r\n return $_object_array;\r\n }", "title": "" }, { "docid": "03b146d765bc19b2436a9fe43b75df14", "score": "0.63367975", "text": "abstract public function getResults();", "title": "" }, { "docid": "9b62ee3aadda4ee078859f58f0c9d509", "score": "0.63353145", "text": "public function fetchObject($class_name = 'stdClass', array $ctor_args = array()) {\n\t\t$obj = $this->fetch(PDO::FETCH_OBJ);\n\t\tif($class_name == 'stdClass') {\n\t\t\t$res = $obj;\n\t\t}\n\t\telse {\n\t\t\t$res = $this->populateObject($obj, $class_name, $ctor_args);\n\t\t}\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "6e05a13847b0f3d501497045d77d339b", "score": "0.6327879", "text": "public function fetch() {\n\n //echo $this->getResultId();\n\n return mysql_fetch_row($this->getResultId());\n }", "title": "" }, { "docid": "efa46d945f5cb2d8b0a59839eec4773e", "score": "0.6326123", "text": "public function fetch()\n\t{\n\t\t$this->data = $this->qb->getQuery()\n\t\t\t->getScalarResult();\n\n\t\t// Detect mapping type. It will affect the hydrated column names.\n\t\t$this->detectMappingType();\n\n\t\t// Create mapping index\n\t\t$data = array();\n\t\t$i = 0;\n\t\tforeach ($this->data as & $row) {\n\t\t\t$data[$i] = array();\n\t\t\tforeach ($this->mapping as $alias => $column) {\n\t\t\t\t$data[$i][$alias] = & $row[$this->getHydratedColumnName($column)];\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $this->data = $data;\n\t}", "title": "" }, { "docid": "a78f0648247f008fdee59b3bca50ca9c", "score": "0.63204", "text": "public function fetchData() {\n $this->buildQuery();\n \n $query=$this->query;\n $query->limit($this->limit);\n $query->offset($this->offset);\n return $query->execute()->setRowClass('DatagridRow');\n }", "title": "" }, { "docid": "6ca5554f899a995ab32a5abd53373119", "score": "0.63007456", "text": "abstract public function fetchObject();", "title": "" }, { "docid": "2e0c33365d17fcb357b850dafe215117", "score": "0.63006836", "text": "public function showObj()\n { \n \n while ($res=pg_fetch_object($this->consulta))\n {\n $this->result[] = $res;\n }\n\n return $this->result;\n \n }", "title": "" }, { "docid": "634eea45f8288fa1f093fb9132fcace8", "score": "0.62959015", "text": "function fetch_object($resultset=0)\n {\n // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion\n if (! is_object($resultset)) { $resultset=$this->results; }\n if (!$resultset) {\n syslog(LOG_ERR , $this->lastquery);\n }\n return mysqli_fetch_object($resultset);\n }", "title": "" }, { "docid": "ce1ab3a2dd4cf4593a052167d98385d4", "score": "0.6293854", "text": "public function fetch() {\r\n\t\treturn $this->fCon->fetch($this->AsSQL());\r\n\t}", "title": "" }, { "docid": "ce1ab3a2dd4cf4593a052167d98385d4", "score": "0.6293854", "text": "public function fetch() {\r\n\t\treturn $this->fCon->fetch($this->AsSQL());\r\n\t}", "title": "" }, { "docid": "5bf9f20fe252066a1fbe679104ffd008", "score": "0.6286025", "text": "public function fetchObject() {\n return parent::fetchJsonDataAsObject($this->response);\n }", "title": "" }, { "docid": "9616aba9a817ec25116c6257442ff2fe", "score": "0.62845784", "text": "function fetchObject($resultSet);", "title": "" }, { "docid": "062c6980ecb509596ce9afcac7c057e9", "score": "0.6283382", "text": "public function results(){\n return Sql::getResults();\n }", "title": "" }, { "docid": "2ff25a0061d7e3dbf0777948af33dc76", "score": "0.62488604", "text": "public function resultAll()\n {\n $this->execute();\n return $this->query->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "5d652f320862589ae76ad681d3379b41", "score": "0.6247789", "text": "function & fetch($sql) {\r\n return new DataAccessResult($this,mysql_query($sql,$this->db));\r\n }", "title": "" }, { "docid": "640624c41ae38f038cf30540a2422d94", "score": "0.6247176", "text": "public function loadObjectList($class_name = \"stdClass\"){\n $objectList = array();\n while($object = $this->stmt->fetchObject($class_name)){\n $objectList[] = $object;\n }\n $this->countRows = count($objectList);\n return $objectList;\n }", "title": "" }, { "docid": "197710808d10ac221b799fc93d82d6bb", "score": "0.62434155", "text": "public function fetch()\n\t{\n\t\t// update 11/2010: should have put another error check here, IF was the operative word in the preceding comment\n\t\tif(is_object($this->query_result))\n\t\t{\n\t\t\treturn $this->query_result->fetch_assoc();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "567c5f0660f541d4a3afd9347c7372b1", "score": "0.62239164", "text": "protected function fetchData() {\n if (($pagination = $this->getPagination()) !== false) {\n $pagination->setItemCount($this->getTotalItemCount());\n\n $this->_criteria->setLimit($pagination->getLimit());\n $this->_criteria->setOffset($pagination->getOffset());\n }\n\n if (($sort = $this->getSort()) !== false && ($order = $sort->getOrderBy()) != '') {\n $sort = array();\n foreach ($this->getSortDirections($order) as $name => $descending) {\n $sort[$name] = $descending ? EMongoCriteria::SORT_DESC : EMongoCriteria::SORT_ASC;\n }\n $this->_criteria->setSort($sort);\n }\n return $this->model->findAll($this->_criteria)->toArray();\n }", "title": "" }, { "docid": "6883f88ac9849c8e73d2982e76254d83", "score": "0.6215816", "text": "private function loadResults ()\n {\n $sql = 'SELECT ' . $this->sql['columns'] . ' FROM ' . $this->sql['tables'] . ' WHERE ' . $this->sql['joins'] . ' AND `' . $this->base . '`.id = ' . $this->recordData->id;\n $this->data = DB::select(DB::raw($sql))[0];\n\n //adding check for encrypted column. if decryption fails then set to some logical value\n foreach ( $this->encryptedColumns as $item ) {\n try {\n $this->data->{$item} = Crypt::decrypt($this->data->{$item});\n } catch ( Exception $e ) {\n $this->data->{$item} = 'Invalid Account Number';\n }\n }\n\n //post process the source record\n foreach ( $this->sourceColumns as $column ) {\n $sourceId = str_replace(last(explode('.', $column)), explode('_', last(explode('.', $column)))[0] . '_id', $column);\n $sourceRecord = RecordManagement::getSourceColumnValue($this->data->{$column}, $this->data->{$sourceId});\n\n $this->data->{$column} = 'Object-' . $sourceRecord[0];\n $this->data->{$sourceId} = 'Record-' . $sourceRecord[1];\n }\n }", "title": "" }, { "docid": "c23fbcdaa2fc696b48c134490c3c524d", "score": "0.6214772", "text": "public function findObject() {\n try {\n $stmt = $this->pdo->prepare(sprintf(\"select * from %s\", $this->table));\n $stmt->execute();\n $data = array();\n while ($row = $stmt->fetchObject(\"stdClass\")) {\n $data[] = $row;\n }\n\n return $data;\n } catch (\\PDOException $exc) {\n echo $exc->getMessage();\n echo '<br><pre>';\n echo $exc->getTraceAsString();\n }\n }", "title": "" }, { "docid": "3c9dfbc2001bf1aac04b51510a612f77", "score": "0.62146896", "text": "public function get() \n {\n $this->sql();\n return $this->_results;\n }", "title": "" }, { "docid": "96bee04f1d2ef8185928d2988290be52", "score": "0.6212662", "text": "public static function fetch() {}", "title": "" }, { "docid": "32fb75ba3d147148f65d8b0bf34dc0d5", "score": "0.621252", "text": "public function fetch()\n {\n $this->sp->init();\n return $this->parse($this->sp->get_items());\n }", "title": "" }, { "docid": "410e4248918fd83092d2f499451d795c", "score": "0.62087387", "text": "public function fetchRecords() {\n \treturn self::all();\n }", "title": "" }, { "docid": "1a41ee771a95a37878b2e736bbe008b4", "score": "0.6203539", "text": "public function fetch() {}", "title": "" }, { "docid": "67554fba3652b3766d73dd0a8491d136", "score": "0.6200279", "text": "protected function fetch()\n {\n $connection = $this->table->getSchema()->getConnection();\n $query = Query::factory($this->query, $connection);\n $tableName = $connection->quoteIdentifier($this->table->getName());\n $sql = \"SELECT {$tableName}.*\";\n\n if (count($this->columns)) {\n $sql .= \", \" . implode(\", \", $this->columns);\n }\n\n if ($this->filterLink) {\n $linkTable = $connection->quoteIdentifier($this->filterLink['table']);\n $sql .= \" FROM {$linkTable} LEFT JOIN {$tableName} ON {$this->filterLink['cond']}\";\n } else {\n $sql .= \" FROM {$tableName}\";\n }\n\n foreach ($this->links as $link) {\n $linkTable = $connection->quoteIdentifier($link['table']);\n $sql .= \" LEFT JOIN {$linkTable} ON {$link['cond']}\";\n }\n\n $sql .= $query->getSql();\n\n if ($this->orderBy) {\n $orders = [];\n foreach ($this->orderBy as $key => $value) {\n if (is_numeric($key)) {\n $orders[] = $connection->quoteIdentifier($value) . \" ASC\";\n } else {\n $value = strtoupper($value);\n $value = in_array($value, [ \"ASC\", \"DESC\" ]) ? $value : \"ASC\";\n $orders[] = $connection->quoteIdentifier($key) . \" {$value}\";\n }\n }\n $sql .= \" ORDER BY \" . implode(\", \", $orders);\n }\n\n if ($this->limitValue && $this->offsetValue) {\n $sql .= \" LIMIT {$this->offsetValue}, {$this->limitValue}\";\n } else if ($this->limitValue) {\n $sql .= \" LIMIT {$this->limitValue}\";\n } else if ($this->offsetValue) {\n $sql .= \" LIMIT {$this->offsetValue}, 100000000\";\n }\n\n $rows = $this->table->getSchema()->fetchAll($sql, $query->getBindValues());\n $this->rows = [];\n foreach ($rows as $row) {\n $this->rows[] = new Row($this->table, $row, true);\n }\n $this->count = count($this->rows);\n }", "title": "" }, { "docid": "6e6f0fb66d48949c342a38985ae3824b", "score": "0.6187252", "text": "public function loadAll(){\n return $results\n }", "title": "" }, { "docid": "51652fccdabc08bbb2755856be541b50", "score": "0.6184072", "text": "public function getResults()\n {\n return $this->get();\n }", "title": "" }, { "docid": "51652fccdabc08bbb2755856be541b50", "score": "0.6184072", "text": "public function getResults()\n {\n return $this->get();\n }", "title": "" }, { "docid": "51652fccdabc08bbb2755856be541b50", "score": "0.6184072", "text": "public function getResults()\n {\n return $this->get();\n }", "title": "" }, { "docid": "fc1e65815147d0ee49b1a6b72e168cb5", "score": "0.6160625", "text": "protected function loadResult($array = false) {\n if ($array === false) {\n // Only fetch 1 record\n $this->db->limit(1);\n }\n\n if (!isset($this->dbApplied['select'])) {\n // Select all columns by default\n foreach ($this->tableColumns as $name => $row) {\n if (($column = $this->db->realColumn($name, false)) != $name)\n $this->db->select(\"$this->tableName.$column as $name\");\n else\n $this->db->select(\"$this->tableName.$name\");\n }\n }\n\n if (!empty($this->loadWith)) {\n foreach ($this->loadWith as $alias => $object) {\n // Join each object into the results\n if (is_string($alias)) {\n // Use alias\n $this->with($alias);\n }\n else {\n // Use object\n $this->with($object);\n }\n }\n }\n\n if (!isset($this->dbApplied['orderby']) && !empty($this->sorting)) {\n $sorting = array();\n foreach ($this->sorting as $column => $direction) {\n if (strpos($column, '.') === false) {\n // Keeps sorting working properly when using JOINs on\n // tables with columns of the same name\n $column = $this->tableName .'.'. $column;\n }\n \n $sorting[$column] = $direction;\n }\n\n // Apply the user-defined sorting\n $this->db->orderby($sorting);\n }\n\n // Load the result\n $result = $this->db->get($this->tableName);\n\n if ($array === true) {\n // Return an iterated result\n return new AetherORMIterator($this, $result);\n }\n\n if ($result->count() === 1) {\n // Load object values\n $this->loadValues($result->result(false)->current());\n }\n else {\n // Clear the object, nothing was found\n $this->clear();\n }\n\n return $this;\n }", "title": "" }, { "docid": "b026523feeb55e4e115e0f34d8397e2f", "score": "0.6151335", "text": "public function resultset(){\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "819f7df9e5580a55d9e26a468f76466f", "score": "0.6150369", "text": "public static function find_all() {\n global $database;\n $sql=\"SELECT * FROM \".self::$table_name;\n $result_set = $database->query($sql);\n $object_array = array();\n while ($row = $database->fetch_array($result_set)) {\n $object_array[] = self::instantiate($row);\n }\n return $object_array;\n }", "title": "" }, { "docid": "beef2528f64250723026142b7fb332a4", "score": "0.6149535", "text": "public function getResultSet();", "title": "" }, { "docid": "a027ae4d4fe77e3d767c95ea15bc9a83", "score": "0.61492777", "text": "public function fetch()\n {\n return $this->execute(true);\n }", "title": "" }, { "docid": "be856b81c7a77c27b0fb1c5abbcc3b4d", "score": "0.61460644", "text": "private function _load()\n {\n // Query the database to get the required results\n $result = \\DB::select('*')->from('report_query')->where('id', $this->id)->as_object()->execute();\n \n // Parse results from database into the query object\n $this->query = $result[0]->query;\n $this->query_hash = $result[0]->query_hash;\n $this->database_id = $result[0]->database_id;\n $this->result = unserialize($result[0]->result);\n $this->request_date = $result[0]->request_date;\n $this->completion_date = $result[0]->completion_date;\n $this->completion_seconds = $result[0]->completion_seconds;\n $this->status = $result[0]->status;\n \n return $this;\n }", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.614153", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.614153", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.614153", "text": "public function getResults();", "title": "" }, { "docid": "6879f873c3730af07b49d372a20f87ec", "score": "0.614153", "text": "public function getResults();", "title": "" }, { "docid": "f500ff44828c2b5e2c3ac7e10007a1b7", "score": "0.61386335", "text": "protected static function processQueryToObjects($query){\n\t\t$classname = get_called_class();\n\t\t$objs = SQL::query($query, array($classname, 'constructFromRecord'));\n\t\t$objs = static::markLoaded($objs);\n\t\t\n\t\treturn $objs;\n\t}", "title": "" }, { "docid": "99b77726b0d48fc6aeefc3198709eb58", "score": "0.6135891", "text": "public function results(){\n\t\treturn $this->_results; \n\t}", "title": "" }, { "docid": "82e2263c85c83d2faa40689f74bc3331", "score": "0.61234313", "text": "public function query($query){\n $laMarche = $this->connect();\n $result = $laMarche->query($query);\n \n while( $row = $result->fetch_object() ){\n $results[] = $row;\n }\n \n // View results\n print_r($results);\n \n // Free result.\n $result->close();\n \n return $results;\n }", "title": "" }, { "docid": "c699d8de32037232f9117eefd60fbc07", "score": "0.61202174", "text": "public function fetchAll() {}", "title": "" }, { "docid": "201cad77d0bf788fbfe847bb82b89fbb", "score": "0.611732", "text": "public function fetchAllInto( $className );", "title": "" }, { "docid": "da782204918a5193442326021dfc9afa", "score": "0.6114815", "text": "public function loadById($id){\n return $results\n }", "title": "" }, { "docid": "43ecd0a2734542a2d0aac4649749c1a9", "score": "0.61106503", "text": "public function fetch()\n {\n return $this;\n }", "title": "" }, { "docid": "7b070eabd67ea755c2206acb6519711b", "score": "0.6100761", "text": "public function fetchBySQL($sql=\"\") {\n global $db;\n $result_set = $db->queryFill($sql);\n\n\t\t\t$object_array = array();\n\n\t\t\tforeach ($result_set as $row) {\n\t\t\t\t$object_array[]\t= $this->instantiate($row, $this);\n\t\t\t}\n\n return $object_array;\n\t\t}", "title": "" }, { "docid": "94a7584c23594bd9560eadddf119f077", "score": "0.6083712", "text": "public function results(){\n\t\treturn $this->results;\n\t}", "title": "" }, { "docid": "44ca29a0539122be30e8eca942ba98dc", "score": "0.60817087", "text": "public function fetch()\n {\n return parent::fetch();\n }", "title": "" }, { "docid": "909dd16adf6b9182e6e77d1126693dcd", "score": "0.6081234", "text": "public function getResults()\n\t{\n\t\treturn $this->query->first();\n\t}", "title": "" }, { "docid": "ff17c6e1a3d498f281edc0ca6e9f0693", "score": "0.6069974", "text": "public function getAllResult()\n {\n $this->executeQuery();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "fe0b25c594e543b1b1595dcb3048287d", "score": "0.6068068", "text": "private function _fetch($query,$printQuery='0'){\n\t\t$db = Model::getInst();\n\t\treturn $db->fetchAll($query,$printQuery);\n\t}", "title": "" }, { "docid": "7b44d08fef92b69605941734e8ea6bb4", "score": "0.60497993", "text": "public function get()\n {\n return $this->results;\n }", "title": "" }, { "docid": "bffaa028e2c0f501f5354309ed0d78ad", "score": "0.60428506", "text": "protected function _retrieveQueriedData() {\r\n\r\n return new Collection($_GET);\r\n\r\n }", "title": "" }, { "docid": "a3f744e3f18f0e234aa8bf2e16fc3ee1", "score": "0.6039879", "text": "public function fetch()\r\n {\r\n // Events! :)\r\n return $this->events = $this->search();\r\n }", "title": "" }, { "docid": "7b3ec34aff70ba923a8e13bda661c2ca", "score": "0.6036835", "text": "public function getResultObject() {\r\n\t\treturn pg_fetch_object($this->getResult());\r\n\t}", "title": "" }, { "docid": "d5ed25dbf3acced9c790db738dde6d92", "score": "0.60262656", "text": "function fetch_object(&$result){\n\t\t\t$fetchType = PDO::FETCH_OBJ;\n\t\t\treturn (isset($result)) ? $result->fetchAll($fetchType): \"\";\n\t\t}", "title": "" }, { "docid": "573684ed74d7e5b47c35275e8b9717fd", "score": "0.6022635", "text": "public static function get()\n { \n return static::$storedStatement->fetchAll(PDO::FETCH_CLASS, static::class);\n }", "title": "" }, { "docid": "40224c39ae11ea3e8fee0f7181d80a55", "score": "0.6019422", "text": "public function get(){\n\t\t$sql = $this->builder->getSelectQuery();\n\t\t$bindParams = $this->connector->bindParams()->getBindParams();\n\n\t\tif(self::$queryLogStatus){\n\t\t\tself::$queryLogs[] = array(\n\t\t\t\t'sql' => $sql,\n\t\t\t\t'bind_params' => $bindParams\n\t\t\t);\n\t\t}\n\n\t\t$this->connector->exec($sql)->get_result();\n\t\t$result = array();\n\t\twhile ($row = $this->connector->fetch()) {\n\t\t\tarray_push($result, $row);\n\t\t}\n\t\treturn new Collection($result);\n\t}", "title": "" }, { "docid": "372a588c1cbb1ea2bbe64dda8bc418cf", "score": "0.60180604", "text": "function fetch()\n\t\t{\n\t\t\t//check if result has content\n\t\t\tif($this->dbresults === false)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//return results\n\t\t\treturn mysqli_fetch_assoc($this->dbresults);\n\t\t\t\n\t\t}", "title": "" } ]
3b51aa8412da5a2dfbae85f9a5fc38cf
Set the CID map instance.
[ { "docid": "46452b8f2f3fd260c8e9f15f5336ecaa", "score": "0.6753228", "text": "public function setCidMap(\\SetaPDF_Core_Font_Cmap $cidMap) {}", "title": "" } ]
[ { "docid": "bcb2d50bf80b1ddfcf0658e599a37e3d", "score": "0.6026427", "text": "public function setMap($map) {\n\t\t$maps = $this->static->maps();\n\t\t$this->map = $maps[$map];\n\t}", "title": "" }, { "docid": "a5b4987d7309238b0dfd234798b559fa", "score": "0.60220295", "text": "protected function _createCidToGidMap() {}", "title": "" }, { "docid": "87b8d023a78e8961242feb23af6262a7", "score": "0.59463465", "text": "public function getCidMap() {}", "title": "" }, { "docid": "01af58b2959d16da7bed2ae7fb9cb7ed", "score": "0.5895022", "text": "public function setIdentityMap(IdentityMapInterface $map)\n {\n $this->identityMap = $map;\n return $this;\n }", "title": "" }, { "docid": "a87f4d5e818a95bc3829346290b000b8", "score": "0.58457315", "text": "public function setMap($map) {\n $map = \n $this->map = $map;\n }", "title": "" }, { "docid": "5acffd9518483b620257f973a3367073", "score": "0.58374166", "text": "public function setCacheId(string $cid);", "title": "" }, { "docid": "96badf14465304e6fa547c956d792ca5", "score": "0.5462735", "text": "public function getCidToGidMap() {}", "title": "" }, { "docid": "bc35a34b8da2399e4d0da0586e317607", "score": "0.5417723", "text": "public function setMap( $value ) {\n $this->map = $value;\n return $this;\n }", "title": "" }, { "docid": "f56e27226f249e1adec028c847465667", "score": "0.53854483", "text": "function __construct() {\n $this->map = array();\n }", "title": "" }, { "docid": "2110bf581286e3a99100158d24441ce8", "score": "0.5349941", "text": "protected static function _ensureCMapInstance(&$cmap) {}", "title": "" }, { "docid": "c46d6bf4dcbdc9d947c4e0480841c560", "score": "0.53296494", "text": "public function setMap(array $map);", "title": "" }, { "docid": "90ae0a19581dee728ab7a29576ad1443", "score": "0.53233165", "text": "function __set($name, $value) {\n $this->nmap[$name]=$value;\n }", "title": "" }, { "docid": "90ae0a19581dee728ab7a29576ad1443", "score": "0.53233165", "text": "function __set($name, $value) {\n $this->nmap[$name]=$value;\n }", "title": "" }, { "docid": "4a5292434b958c5167f9e0913ca508ec", "score": "0.52624106", "text": "public function setMap($value)\n {\n $this->map = $value;\n }", "title": "" }, { "docid": "636554fb50d779e0b2eb485190b2d9b1", "score": "0.5243592", "text": "function __construct() {\n\t\t$this->map_data = array();\n\t}", "title": "" }, { "docid": "ee6575ba1fa79223303220b44ba7c6fd", "score": "0.5243231", "text": "public function init() {\n\t\t$this->id = \"imagemap\" . t3lib_div::shortMD5(rand(1, 100000));\n\t\t$this->jsFiles = array();\n\t\t$this->cssFiles = array();\n\t}", "title": "" }, { "docid": "212e82b66a15acb82dd7614e41af4b06", "score": "0.5196365", "text": "public function setID($cid) { if($cid == faq_build_clean_input($cid,\"id\")) $this->category_id = $cid; }", "title": "" }, { "docid": "eb394706a59dac8fca7face0ca70a67c", "score": "0.5196332", "text": "public function _construct()\n {\n $this->_init('signifymap/config', 'id');\n }", "title": "" }, { "docid": "1dd25833eb51776b5896ebd1a655635f", "score": "0.51559556", "text": "public function set_id($setid){\n $this->id = $setid;\n }", "title": "" }, { "docid": "0d43cfa0896cc9ed1eabf2c4ba331f3e", "score": "0.5154765", "text": "public function setMap(array $map) : void\n {\n $this->map = $map;\n }", "title": "" }, { "docid": "01de34607f702aaa5202006fe2aff499", "score": "0.5121046", "text": "public function setMap(array $map)\n {\n $this->map = $map;\n }", "title": "" }, { "docid": "10cc15c9c97bde92cd9bbb8fc46bc317", "score": "0.51018757", "text": "public function set($id, $instance);", "title": "" }, { "docid": "caf2c800c8aa6415febf260fa4ac5f49", "score": "0.5091136", "text": "public function initMap()\n\t{\n\t\t$params =array();\n\t\t$this->add_VcMap($params);\n\t}", "title": "" }, { "docid": "0d2461c42e7f80b8b2ce48885e7761c7", "score": "0.5064272", "text": "protected function _createCidSet() {}", "title": "" }, { "docid": "efe6534d195fff353e356459ca3d7e9f", "score": "0.50501734", "text": "public function set_cidade($cidade) : void\n {\n try {\n $this->cidade = Validador::Cidade()::validar_id($cidade);\n } catch (Exception $e) {\n $this->cidade = Validador::Cidade()::filtrar_id($cidade);\n }\n }", "title": "" }, { "docid": "2e1d9c3929cf569aff25592681ad24d3", "score": "0.50350106", "text": "public function generateMap()\n {\n $map = array();\n $database = $this->binding->getDatabase()->getData();\n\n foreach ($database->classes as $class) {\n $map[$class->name] = $class->clusters;\n }\n\n $this->map = $map;\n $this->cache->save($this->getCacheKey(), $map);\n }", "title": "" }, { "docid": "4d73d2fde26bdab19ef22ecf70c7ac9b", "score": "0.50224215", "text": "public function __construct($map= []) {\n $this->map= $map;\n }", "title": "" }, { "docid": "646a17ccb64a7c11b4a1c7783257b61f", "score": "0.5005632", "text": "public function setMaconomyId(string $key): void\n {\n $this->data['instancekeyField'] = $key;\n }", "title": "" }, { "docid": "50a2f837030c9822ff09a9a52e5d624a", "score": "0.5001929", "text": "protected function setMap( $map_file )\n {\n $handle = file_get_contents( get_template_directory_uri() . '/includes/gravityforms/' . $map_file );\n $this->map = json_decode( $handle, true );\n }", "title": "" }, { "docid": "318145dd3c6fce8a05a0527315ad4384", "score": "0.4980427", "text": "public function offsetSet($key, $clz)\n {\n $this->mapping[$key] = is_subclass_of($clz, Model::class) ? $clz : null;\n }", "title": "" }, { "docid": "4eae7024529a8ea8f8b9e3b1c14c7150", "score": "0.49679244", "text": "public function setMaps($value)\n {\n $this->maps = $value;\n }", "title": "" }, { "docid": "0d148b5f634917a76032bf4365effd23", "score": "0.49592167", "text": "public function __construct() {\n $this->_map = [];\n $this->_keys = [];\n }", "title": "" }, { "docid": "15c875345343ca2c1b0eb6e6f14f4ef3", "score": "0.4936332", "text": "public function setToMap($cacheKey, $data, array $options);", "title": "" }, { "docid": "0353c460c5e0586228b03d0eb514975d", "score": "0.4935771", "text": "public function setMapScript(string $script): self\n {\n return $this->setParam('map_script', $script);\n }", "title": "" }, { "docid": "b5cfb85b34cb9e19fd1ec33cea7dea78", "score": "0.49276578", "text": "public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(empty($this->id)) $this->id=\"map-canvas\";\n\n\t\tif(empty($this->container)) $this->container=\"div\";\n\n\t\tif(empty($this->markerIcon)) $this->markerIcon=\"\";\n\n\t\tif(empty($this->fitBound)) $this->fitBound=FALSE;\n\n\t\tif(empty($this->isCluster)) $this->isCluster=FALSE;\n\n\t\tif(!empty($this->style))\n\t\t{\n\t\t\tif(!is_array($this->style))\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\".$this->style.\"\\\"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->inline_style=\" style=\\\"\";\n\t\t\t\tforeach($this->style as $attribute=>$value)\n\t\t\t\t{\n\t\t\t\t\t$this->line_style .= $attribute.':'.$value.\";\";\n\t\t\t\t}\n\t\t\t\t$this->inline_style.=\"\\\"\";\n\t\t\t}\n\n\t\t}\n\n\t\tif(!empty($this->address))\n\t\t{\n\t\t\tif(!is_array($this->address))\n\t\t\t{\n\t\t\t\t$address=$this->getGeo($this->address);\n\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach($this->address as $adr)\n\t\t\t\t{\n\t\t\t\t\t$address=$this->getGeo($adr);\n\t\t\t\t\tif($address!=FALSE) array_push($this->markers, $address);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "259f133a6032751c94b91afa2fb5b83c", "score": "0.4921315", "text": "function setPID($pid) {\n\t\t$this->_pid = $pid;\n\t}", "title": "" }, { "docid": "c8859cd53c4791b86851371931da3ff6", "score": "0.49210644", "text": "function setCertId($value)\n {\n $this->_props['CertId'] = $value;\n }", "title": "" }, { "docid": "9801cacff5d00099d841270ce87aac17", "score": "0.48773324", "text": "public function setMapClass($class)\n\t{\n\t\t$this->_class = $class;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "25e35f81e9602913839ff2b47dc1a7ea", "score": "0.48677406", "text": "public function __construct($map = null) {\n // check if map is not set\n if (!$map) {\n // default to a standard-sized Tetris map\n $map = new Map(10, 18);\n }\n\n // remember the map\n $this->map = $map;\n }", "title": "" }, { "docid": "1a12bddadbd2226986f3a9e50744a5f6", "score": "0.48387736", "text": "public function __set($key, $value)\n {\n $this->offsetSet($id, $value);\n }", "title": "" }, { "docid": "02800c26d064185f443da2ee70c412e7", "score": "0.48382282", "text": "function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"ID set to \".$this->_id;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6669f344d6eb50a38e3db79726debf91", "score": "0.48156255", "text": "public function __construct(Mappable $map)\n {\n $this->map = $map;\n }", "title": "" }, { "docid": "ab25336d1ec29913ec09629a30e75ff9", "score": "0.48039097", "text": "public function setDivId($googleMapId) \n {\n $this->googleMapId = $googleMapId;\n }", "title": "" }, { "docid": "cb43011488a9f74e94292e4104935690", "score": "0.48009005", "text": "public function __construct($ID=\"\"){\r\n parent::__construct(\"geocode_cache\",$ID);\r\n $this->_set_object_name('Geocode Cache Entry');\r\n $this->_set_has_groups(false);\r\n }", "title": "" }, { "docid": "be46d415d1188f8b1d46c67759ed394d", "score": "0.47984925", "text": "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "title": "" }, { "docid": "51325431ddc44f4da743305257a4d74c", "score": "0.47964224", "text": "function setId($id) {\r\n $this->_id = $id;\r\n }", "title": "" }, { "docid": "f02a040d3e2dde2653dbea39c794fa78", "score": "0.47702762", "text": "public function setIdArea($id) {\n $this->_id = $id; \n }", "title": "" }, { "docid": "6c13a26625f18a7a18ebf5118c99bf56", "score": "0.4763469", "text": "public function offsetSet($id, $value)\n {\n parent::offsetSet($id, $value);\n }", "title": "" }, { "docid": "9fa1e7cc917c8a7f3eeb8134a2105a7e", "score": "0.47557443", "text": "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "title": "" }, { "docid": "d141b8c8f71532e45289a5bc36948cc9", "score": "0.47437224", "text": "function __construct() {\r\n\t\tfor($x=1; $x <= $this->map['width']; $x++):\r\n\t\t\tfor($y=1; $y <= $this->map['height']; $y++):\r\n\t\t\t\t$this->map['tiles'][$x][$y]['init'] = true;\r\n\t\t\tendfor;\r\n\t\tendfor;\t\t\r\n\t}", "title": "" }, { "docid": "2bdcf62f1f45b978b700b8f028692809", "score": "0.4714044", "text": "public function __construct()\n {\n $this->CI = &get_instance();\n\n $airports = $this->CI->airports->all();\n $flights = $this->CI->flights->all();\n $graph = array();\n foreach ($airports as $row)\n {\n foreach ($airports as $col)\n $graph[$row->id][$col->id] = $row->id == $col->id ? 1 : null;\n } \n foreach ($flights as $flight) {\n $row = $flight->departure_airport_id;\n $col = $flight->arrival_airport_id;\n $graph[$row][$col] []= $flight->id;\n }\n $this->map = $graph;\n }", "title": "" }, { "docid": "61c7ff8d79fad1586bcd88295eafe93b", "score": "0.47128078", "text": "public function setIdentity($value);", "title": "" }, { "docid": "b4529a098ac6f25878226d24f72bd001", "score": "0.4710017", "text": "public function setId($id){\n $this->_id = $id;\n }", "title": "" }, { "docid": "72ac6bf8990b817ba9e5c74d9ee92f94", "score": "0.47059786", "text": "public function setCenter()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof Coordinate)) {\n $this->center = $args[0];\n } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {\n $this->center->setLatitude($args[0]);\n $this->center->setLongitude($args[1]);\n\n if (isset($args[2]) && is_bool($args[2])) {\n $this->center->setNoWrap($args[2]);\n }\n } else {\n throw MapException::invalidCenter();\n }\n }", "title": "" }, { "docid": "081ad617b11ac46c483864863fce29a3", "score": "0.47054645", "text": "final function setClassroom_id($value) {\n\t\treturn $this->setClassroomId($value);\n\t}", "title": "" }, { "docid": "87cd77fd35af7c38d173c7794e19c6de", "score": "0.47014037", "text": "public function __set($key, $value)\n {\n\n $this->pool[$key] = $value;\n\n }", "title": "" }, { "docid": "b5f2445d7acaa14b636da85cf9334e94", "score": "0.4692458", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "title": "" }, { "docid": "e6d24a507fc9b82ee651730d7c0dca90", "score": "0.46916807", "text": "public function map($map = null) {\n\t\tif ($map !== null) {\n\t\t\t$this->_map = $map;\n\t\t\treturn $this;\n\t\t}\n\t\treturn $this->_map;\n\t}", "title": "" }, { "docid": "08da3a16e06338dd036abc5b193a795b", "score": "0.46904543", "text": "private function setmapMode(){\n\n\t\t$this->mapMode = array(\n\t\t\t'befe'=>\t$this->settings['mapMode'], /* bad content from outside ... so use properly */\n\t\t\t'isbe'=>\tstristr($this->settings['mapMode'],'backend') !== false,\n\t\t);\n\t}", "title": "" }, { "docid": "4a52d4be4e351a088ebba99dd74fbd65", "score": "0.46881124", "text": "function __construct() {\n parent::__construct();\n\n $array = JRequest::getVar('cid', 0, '', 'array');\n $this->setId((string) $array[0]);\n }", "title": "" }, { "docid": "e5632b7b87664b0bd2b795a0dadc11c2", "score": "0.4687395", "text": "function __construct($cid = NULL) {\r\n\t\t\tif ($cid > 0) {\r\n\t\t\t\t$this->cid = $cid;\r\n\t\t\t} else {\r\n\t\t\t\t$this->cid = isset($_SESSION['CID']) ? $_SESSION['CID'] : NULL;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "093fbddd959a9e43e0931f33c15949d6", "score": "0.46862438", "text": "public function setIconMaps(array $map)\n {\n $this->iconMap = $map;\n return $this;\n }", "title": "" }, { "docid": "b63b9cb38f31bb1f9b85a38a79d578e2", "score": "0.46776515", "text": "public function __set($key, $value)\n\t{\n\t\t$this->container[$key] = $value;\n\t}", "title": "" }, { "docid": "e17beb0290e1f6995b40c8a0b9c92099", "score": "0.46751308", "text": "function __construct()\n {\n parent::__construct();\n\n $array = JRequest::getVar('cid', array(0), '', 'array');\n $this->setId($array[0]);\n }", "title": "" }, { "docid": "781c5206491059c0478217514254fc48", "score": "0.46730527", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t\t$this->_data = null;\n\t\t$this->_courses = array();\n\t}", "title": "" }, { "docid": "acb7413f7aa877982ff48523d9ee3439", "score": "0.46699014", "text": "public function setclient_id($value);", "title": "" }, { "docid": "53b1eebf852099c3e0493b48e6309b77", "score": "0.46660775", "text": "public function setID($id){\n $this->ID = $id;\n }", "title": "" }, { "docid": "e5711a7731bc50ddcd796e4830149d46", "score": "0.46556985", "text": "public static function setIdentity($identity) {\n self::$_identity = $identity;\n }", "title": "" }, { "docid": "06aea8992804238b1e90f7b227969dbc", "score": "0.4652657", "text": "private function initContainerId()\n {\n if ($this->containerId === null) {\n $procFile = sprintf('/proc/%d/cpuset', $this->processId);\n if (is_readable($procFile)) {\n if (preg_match(\"#([a-f0-9]{64})#\", trim(file_get_contents($procFile)), $cid)) {\n $this->containerId = $cid[0];\n return;\n }\n }\n $this->containerId = '';\n }\n }", "title": "" }, { "docid": "a347c00a9628dcdbd188f8e9aeb9956a", "score": "0.46354517", "text": "function setCcs($ccs) {\n\t\t$this->setData('ccs', $ccs);\n\t}", "title": "" }, { "docid": "7641812072f2d16362f805d3a596b687", "score": "0.46302608", "text": "public function __construct(HashMap $map)\n {\n parent::__construct($map);\n }", "title": "" }, { "docid": "318f16a4d865c3ced88d18a8b7adb4af", "score": "0.4629686", "text": "function __construct() {\r\n parent::__construct();\r\n\r\n $array = JRequest::getVar('cid', 0, '', 'array');\r\n $this->setId((int) $array[0]);\r\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.46285665", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "1b2952f1b13ef63cda8c8942b3c2f246", "score": "0.46252263", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$array = JRequest::getVar('cid', 0, '', 'array');\n\t\t$this->setId((int)$array[0]);\n\t}", "title": "" }, { "docid": "7b9466f421dc838b7feb69167fc3ef53", "score": "0.4623112", "text": "public function setInstance($instanceId, Multiton $instance)\n {\n self::$instances[get_called_class()][$instanceId] = $instance;\n }", "title": "" }, { "docid": "63758827a49708f16a8c169d5eddd02a", "score": "0.4617605", "text": "function setControllerMap(mvcControllerMap $inParamValue) {\n\t\treturn $this->setParam(self::PARAM_DISTRIBUTOR_CONTROLLER_MAP, $inParamValue);\n\t}", "title": "" }, { "docid": "0b133697d68dddfee69fe5fbca6bb883", "score": "0.46152592", "text": "protected function setInternalIdentifier($id)\n {\n $this->_id = $id;\n }", "title": "" }, { "docid": "f6c4249e27f56dfbf9a9d6f6205688bb", "score": "0.46108285", "text": "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "title": "" }, { "docid": "46259d1787969da30ad1a1c647763201", "score": "0.46093255", "text": "function __construct()\r\n {\r\n parent::__construct();\r\n\r\n $array = JRequest::getVar('cid', 0, '', 'array');\r\n $this->setId((int)$array[0]);\r\n }", "title": "" }, { "docid": "2a1ac2b8890cbf6f231b2eb9fcbf1572", "score": "0.46067372", "text": "public function setID($id) {\n $this->id = $id; \n }", "title": "" }, { "docid": "0044e89139b88e1bad6f62a12ef82e37", "score": "0.46032998", "text": "public function setIdentity(?IdentitySet $value): void {\n $this->getBackingStore()->set('identity', $value);\n }", "title": "" }, { "docid": "1ef4dd41fb38f1fa9d10d934d8110480", "score": "0.4602784", "text": "function setId($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "d1261189b693db94796667a8c014f58b", "score": "0.45965895", "text": "public function setPid(int $pid){\n $this->pid = $pid;\n }", "title": "" }, { "docid": "0e344ac760a1299063633a8a4b9a0843", "score": "0.4596395", "text": "public function populate($map) {\n /* Set all properties from the map. We do array_keys + get_object_vars so that we aren't assigning the values to an\n * unused iterator variable (e.g. foreach($this as $key => $value) where $value is never used). */\n foreach (array_keys(get_object_vars($this)) as $key) {\n if (isset($map[$key])) {\n $this->$key = $map[$key];\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "4da7ddb2daa3515c5e484cd5aa5b09c5", "score": "0.4591843", "text": "final public function set($key,$value):Main\\Map\n {\n $this->checkAllowed('set')->checkBefore(false,$value);\n $return = $this->onPrepareThis('set');\n $key = $this->onPrepareKey($key);\n $value = $this->onPrepareValueSet($value);\n Base\\Arrs::setRef($key,$value,$return->arr(),$this->isSensitive());\n\n return $return->checkAfter();\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45903075", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45903075", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45892128", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45890212", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45890212", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "7a32c424ef9f49ae70035381780f7a78", "score": "0.45886594", "text": "function setCiudad ($ciudad) {\r\n $this->cicudad = $ciudad;\r\n }", "title": "" }, { "docid": "be0763057e5dc95051b383840a645233", "score": "0.45881504", "text": "public function setCircleID($value)\n {\n return $this->set('CircleID', $value);\n }", "title": "" }, { "docid": "d28ef5c0c87a9b5ded7cc1108a02bbd2", "score": "0.45879832", "text": "private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }", "title": "" }, { "docid": "160ebbbd4ef144442a8e0eb40bfd4b06", "score": "0.45786595", "text": "public function setID($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "b2b87a5ec9c7f1c8b31509d643f63d5a", "score": "0.45774934", "text": "public function __construct()\n {\n \n $this->entityName = MapMarker::MAPMARKER_ENTITY_NAME;\n $this->modelClass = \"\\MapMarkers\\Model\\MapMarker\";\n $this->dataItem = MapMarker::MAPMARKER_DATA_ENTITY;\n }", "title": "" }, { "docid": "218601f595efe699b9d92c3bf804fef8", "score": "0.45687452", "text": "public function set($typeId, $class);", "title": "" }, { "docid": "608f6a8b35b2166daf43038bb3f8e006", "score": "0.45678484", "text": "public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}", "title": "" }, { "docid": "712569785656dcc178eb1f561422647c", "score": "0.45675725", "text": "public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}", "title": "" }, { "docid": "776ff600ca9310afe3104df599b4ee39", "score": "0.45623598", "text": "protected function _setIdentity($id, $entity) {\r\n\t\tif (!$this->_hasIdentity($id)) {\r\n\t\t\t$this->_identityMap[$id] = $entity;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "168742992f686c4f31d8ce8d5dcfac5d", "score": "0.45617944", "text": "public function set($object, $mapping);", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "63d338cf85af230fe9f2d477642c4b14", "score": "0.0", "text": "public function store($Vacancyid)\n {\n //$jobseeker = DB::table('jobseekers')\n // ->select('id')->where('name','madina')->first()->id;\n $user = Auth::user();\n $vacancy = Vacancy::find($Vacancyid);\n // Create new Todolist record\n $application = new Application;\n\n // Assign name and description from input\n $application->email = \\Input::get('email');\n $application->motivation_letter = \\Input::get('motivation_letter');\n \n // Assign category_id and user_id from their records\n $application->vacancy()->associate($vacancy);\n $application->user()->associate($user);\n //$application->job_seeker()->associate($jobseeker);\n \n // Save Todolist record in database\n $application->save();\n\n // Redirect to lists.show function\n return \\Redirect::route('showApplication', $application->id);\n }", "title": "" } ]
[ { "docid": "643f51843534c99b002271c413f71061", "score": "0.7149016", "text": "public function store()\n {\n $this->storage->set($this);\n\n }", "title": "" }, { "docid": "aba977442c12d8193d7ce12cb2a46e96", "score": "0.669261", "text": "public function store ()\n {\n $this->_update_login ();\n $this->_pre_store ();\n\n if ($this->exists ())\n {\n $this->_update ();\n }\n else\n {\n $this->_create ();\n }\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "9181113e9ca478f57b376bb60189432a", "score": "0.639531", "text": "public function store()\n\t{\n\t\t//\n\t\t$inputs = Input::all();\n\t\t$validator = Validator::make($inputs , \\App\\Resource::$rules);\n\n\t\tif($validator->passes()){\n\t\t\t$destinationPath = 'pictures/'; // upload path\n\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t$fileName = rand(11111,99999). '_' . time() . '.'.$extension; // renameing image\n\t\t\tImage::make(Input::file('image')->getRealPath())->resize(300, null,function($constrain){\n\t\t\t\t$constrain->aspectRatio();\n\t\t\t})->save($destinationPath . $fileName);\n\t\t\t// Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t$inputs['image'] = $fileName;\n\t\t\t\\App\\Resource::create($inputs);\n\t\t\treturn Redirect::to('/');\n\n\t\t}\n\n\t\treturn Redirect::back()\n\t\t\t->withInput(Input::all())\n\t\t\t->withErrors($validator);\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "bd7a2528e89d1c3f43656fa9d3a11bc3", "score": "0.63575023", "text": "public function store(StoreResourceRequest $request): JsonResponse\n {\n $resource = new Resource;\n $resource->fill($request->all());\n if ($request->has('url')) {\n $resource->url = $request->file('url')->store('articles', 'article');\n }\n $resource->saveOrFail();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "af1871e1a1f1d758082bcf4ebeab10eb", "score": "0.6356851", "text": "public function saveStorage()\n {\n $this->storage->save($this->getProduct());\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
060b10fe932e17b90218b75f3361d9c1
optional, gets called from within class.phpmailer.php if not already loaded / send mails to trainers on trial time in order of days 30 when joins in this is made in the join page AUTO MAILS: >28after1day >26after3days >22after7days >15after14days >8after21days >3after26days >2after27days >1after28days
[ { "docid": "7e37ca31a7526ad133fe3a3613d8dfab", "score": "0.0", "text": "function get_sys_message($name, $lang)\n{\n $_db=new mysql_db();\n $_db->query(\"select * from sys_message where name='\".$name.\"' AND lang='\".$lang.\"'\");\n $_db->move_next();\n $msg['text']=$_db->f('text');\n $msg['from_email']=$_db->f('from_email');\n $msg['from_name']=$_db->f('from_name');\n $msg['subject']=$_db->f('subject');\n return $msg;\n}", "title": "" } ]
[ { "docid": "c03e403ccb65e78d0d4f138f69478c90", "score": "0.6366638", "text": "public function send(){\n $controller = new App_Controller();\n\n //grab notifications and reminders into single email\n $all_notifications = array_merge($this->pending_notifications, $this->reminders);\n \n //grab the pending notifications and reminders, load HTML template\n if(!empty($all_notifications)){\n\n foreach($all_notifications as $notification){\n\n //trim\n if(!$notification->tipo == \"follow-up\")\n $notification->prioridade = priority_label($notification->prioridade);\n\n if(empty($notification->usu_email)) continue;\n\n \n //send to view\n $data_to_view = array(\"config\" => $this->settings[\"client_config\"], \"content\" => $notification);\n switch($notification->time_period){\n case \"past\":\n $html = $controller->load_view(getcwd() . \"/lib/App/View/emails/notifications/email-notification-past\", $data_to_view);\n break;\n\n case \"future\":\n default:\n $html = $controller->load_view(getcwd() . \"/lib/App/View/emails/notifications/email-notification-future\", $data_to_view);\n break;\n } \n \n //safe switch\n //if($this->settings[\"disable_send\"] == true) return false;\n\n //...and fire \n $mail = new App_PHPMailer();\n $mail->isSMTP();\n $mail->SMTPDebug = $this->settings[\"debug\"] == true ? 2 : 0; //2 verbose client + serverside\n $mail->Host = $this->settings[\"client_config\"][\"D001_SMTP_host\"];\n $mail->CharSet = \"UTF-8\";\n $mail->Port = $this->settings[\"client_config\"][\"D001_SMTP_port\"]; //Set the SMTP port number - likely to be 25, 465 or 587\n $mail->SMTPAuth = true; //Whether to use SMTP authentication\n $mail->Username = $this->settings[\"client_config\"][\"D001_SMTP_email\"]; //Username to use for SMTP authentication\n $mail->Password = $this->settings[\"client_config\"][\"D001_SMTP_password\"]; //Password to use for SMTP authentication\n\n $mail->setFrom($this->settings[\"client_config\"][\"D001_SMTP_email\"], $this->settings[\"client_config\"][\"D001_Empresa\"]);\n $mail->addAddress($notification->usu_email, !empty($notification->usu_nome) ? $notification->usu_nome : false);\n //$mail->addAddress(\"[email protected]\");\n $mail->Subject = $this->settings[\"client_config\"][\"D001_Empresa\"] . ' - Lembrete';\n $mail->isHTML(true);\n $mail->Body = $html;\n\n $send = $mail->send();\n\n //update the status\n if($send || true){\n $this->register_notification_sent($notification->referencia, $notification->tipo);\n }\n \n }\n\n } \n else{\n \n if($this->settings[\"debug\"] == true){\n echo json_encode(array(\"return\" => 404, \"message\" => \"No notifications to be sent for the time period setting\"));\n }\n \n return false;\n } \n\n }", "title": "" }, { "docid": "923ffb4f42869991140c8e09ec9783ac", "score": "0.6235266", "text": "public function check_fifteen_minutes_tickets(){\n \t$this->load->model(\"portalmodel\");\n \t\n \t$fifteen_minutes = date('Y-m-d H:i:s', strtotime('-15 minutes'));\n \t\n \t$arrEmails = array();\n \t// also add [email protected] as email\n\t\t$arrEmails[] = \"[email protected]\";\n \t\n \t// high priority and not assigned to any tech\n \t$where = \"priority=2 AND assigned_to='' AND created_on<='\".$fifteen_minutes.\"'\";\n \t$tickets = $this->portalmodel->select_where('', '', 'task', $where);\n \tif(!empty($tickets)){\n \t\tforeach ($tickets as $eachticket){\n \t\t\t$taskid = $eachticket->taskid;\n \t\t\t\n \t\t\t// get the account manager id\n\t \t\t$where_project = \"id='\".$eachticket->projectid.\"'\";\n\t\t $prj = $this->portalmodel->select_where('','','project', $where_project);\n\t\t\t\t$accountmanager_id = $prj[0]->accountmanager;\n\t\t\t\t\n\t\t\t\tif(!empty($accountmanager_id)){\n\t\t\t\t\t$tolist = $this->portalmodel->select_where('','','user', \"id='\".$accountmanager_id.\"'\");\n\t\t\t\t\tif (!empty($tolist)) {\n\t\t\t foreach ($tolist as $d){ \n\t\t\t \t$arrEmails[] = $d->email;\n\t\t\t \t// send to business email\n\t\t\t\t \tif(isset($d->business_email) && !empty($d->business_email)){\n\t\t\t\t \t\t$arrEmails[] = $d->business_email;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now send email\n\t \t\t$subject = \"High Priority Ticket not Assigned to any Tech!\";\n\t \t\t$message = 'Hi,\n\t \t\t\t\t\t<br/><br/>\n\t \t\t\t\t\tThe Ticket ID of <b>' . $taskid . '</b> is High Priority and is still not assigned to any Tech.\n\t \t\t\t\t\tPlease respond to ticket immediately.<br/>\n\t\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t\tThank you,<br/>\n\t\t\t\t\t\t\t- Synergy IT Team';\n\t \t\tforeach ($arrEmails as $eachEmail){\n\t \t\t\t$email=$this->email($eachEmail, $subject, $message);\n\t \t\t}\n \t\t}\n \t}\n \t\n \texit;\n }", "title": "" }, { "docid": "4821668ac04d50c03619e6c36e538c5f", "score": "0.618751", "text": "function email_daily_results($changes_ary)\n {\n \n $f3=Base::instance();\n $uselog=$f3->get('uselog');\n $api_logger = new MyLog('api.log');\n //require_once 'vendor/swiftmailer/swiftmailer/lib/swift_required.php';\n $text = \"Daily Attendance System Cron Job\";\n $subject = 'Daily Attendance System Cron Job';\n $from='[email protected]';\n $to = '[email protected]';\n //$bcclist = $options->find(\"optionname='emailbcc'\");\n $docdir = $f3->get('BASE').\"docs/\";\n $letters=parse_ini_file($docdir.'letters.ini', true);\n if (!$letters) {\n $email_logger->write(\"In email letters Failed parse_ini\\n\");\n return print(\"Failed parse_ini\\n\");\n }\n // Use PHP Mail instead of Swift\n /********$transport = Swift_SmtpTransport::newInstance('mail.u3a.world', 25);\n $transport->setUsername('[email protected]');\n $transport->setPassword('Leyisnot70');\n $swift = Swift_Mailer::newInstance($transport);\n $message = new Swift_Message($subject); *****/\n $ht0= $letters['header']['css'];\n krumo($ht0);\n $cid =$letters['daily_cron_events']['letter'];\n $api_logger->write(\"In email_daily_results sending #251 \".var_export($cid, true), $uselog);\n $now =date(\"Y-m-d\");\n $cid3 = str_replace(\"*|today|*\", $now, $cid);\n $cid4 = str_replace(\"*|deactivates|*\", $changes_ary['deactivates'], $cid3);\n $cid5 = str_replace(\"*|updates|*\", $changes_ary['updates'], $cid4);\n $cid = str_replace(\"*|adds|*\", $changes_ary['adds'], $cid5);\n $htp1 = $letters['pstyle']['p1']; // get the replacement inline css for <p1> tags\n $htp2 = $letters['pstyle']['p2'];\n $cid=str_replace(\"<p1>\", $htp1, $cid);\n $cid=str_replace(\"<p2>\", $htp2, $cid);\n $html = $ht0.$cid;\n /*** $message->setFrom($from);\n $message->setBody($html, 'text/html');\n $message->setTo($to);\n $api_logger->write( \"In joiner_email email adding Bcc as \" . var_export($bcc,true), $uselog);\n $message->setBcc($bcc);\n\n $message->addPart($text, 'text/plain');\n $api_logger->write( \"In email_daily_results sending #268 \".var_export($message,true), $uselog);\n if ($recipients = $swift->send($message, $failures)) {\n $api_logger->write( \"In email_daily_results succesfully sent \", $uselog);\n //$email_logger->write( \"In joiner_email email \".$html, $uselog);\n return 0;\n } else {\n $api_logger->write( \"In email_daily_results UNsuccesfully sent with error \".print_r($failures,true), $uselog);\n $api_logger->write( \"In email_daily_results UNsuccesfully sent with recipients\".print_r($recipients,true), $uselog);\n\n echo \"There was an error:\\n\";\n return print_r($failures);\n \n }\n **/\n $headers = 'MIME-Version: 1.0'.\"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1'.\"\\r\\n\";\n $headers .= 'From: '.$from.\"\\r\\n\".'Reply-To: [email protected]'.\"\\r\\n\".'X-Mailer: PHP/'.phpversion();\n $api_logger->write(\"In email_daily_results sending #288 \".var_export($html, true), $uselog);\n mail($to, $subject, $html, $headers);\n }", "title": "" }, { "docid": "ffd3a9835a03df80dfc6e4f0caeecd77", "score": "0.61700517", "text": "private function mail_for_downtime(){\n\t\t$config['priority'] = 1;\n\t\t$this->load->library('email');\t\n\t\t$this->email->initialize($config);\t\n\t\t$this->email->from('[email protected]', 'chetandalal.com');\n\t\t$this->email->to('[email protected]');\t\t\n\t\n\t\t$this->email->subject('Downtime user payment ');\n\t\t$template_email=\"\n\t\t\t\t<p>Name :\".$this->session->userdata('firstname').\" </p>\n\t\t\t\t<p>User Id : \".$this->session->userdata('user_id').\" </p>\n\t\t\t\t<p>email : \".$this->session->userdata('email').\" </p>\n\t\t\";\n\t\t$this->email->message($template_email);\t\t\n\t\t$this->email->send();\t\t\n\t\t//echo $this->email->print_debugger(); \n\t}", "title": "" }, { "docid": "1aeb65f1bf1e6175f0fbe6b3a14e2c61", "score": "0.6136893", "text": "public function sendBookingInfo($email , $name , $resName , $country , $city , $persons , $phoneCous , $bookingNumber , $time , $date) {\n $mail = new PHPMailer(true);\n $mail->IsSMTP(); // set mailer to use SMTP\n $mail->From = $this->senderMail;\n $mail->FromName = $this->senderMail;\n $mail->Host = $this->host;\n $mail->SMTPSecure= $this->smtpSecure;\n $mail->Port = $this->port;\n $mail->SMTPAuth = $this->smtpAuth;\n $mail->Username = $this->senderMail; // SMTP username\n $mail->Password = $this->password;\n $mail->AddAddress($email , $email);\n $mail->AddReplyTo($this->infoMail);\n $mail->WordWrap = 50; // set word wrap\n $mail->IsHTML(true); // set email format to HTML\n $mail->Subject = \"Booking Information\";\n $mail->Body = \"\n <!DOCTYPE html>\n <html lang='en'>\n <head>\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>\n </head>\n <body>\n Hi $name , <br>\n Thanks for Booking With Fnbtime <br>\n This is all reservation details\n Booking Number : $bookingNumber <br>\n Restaurant is : $resName <br>\n Country-city : $country $city <br>\n Guest : $persons <br>\n Phone Number : $phoneCous <br>\n Date : $date <span> </span> $time <br>\n We confirm to you less than 24 hours \n You Can check The status of reservation \n <a href='https://www.fnbtime.com/client.php'>Click Here</a> <br>\n Regards, <br>\n <strong><a href='https://www.fnbtime.com'>Fnbtime</a> Team</strong>\n </body>\n </html>\";\n if(!$mail->Send()){\n echo 'there\\'s some problem please try again';\n die();\n }\n }", "title": "" }, { "docid": "d08979de369f50a56c90a30424be54dd", "score": "0.6133691", "text": "public function notificamail($email,$nombres,$apellidos,$nochesReserva,$periodo_desde,$periodo_hasta,$countAdult,$countNino,$calendarRegistro,$valorTotalReserva,$totalHuespedCobro) {\n \n /*Notifica al correo electronico*/\n $notificationMail = new PHPMailer();\n //Propiedades del mensaje \n $notificationMail->IsSMTP();\n $notificationMail->SMTPAuth = true;\n $notificationMail->SMTPSecure = \"tls\";\n $notificationMail->Port = 587;\n $notificationMail->Host = 'mx1.hostinger.co';\n $notificationMail->Username = \"[email protected]\";\t\n $notificationMail->Password = \"vitreotienda\";\n $notificationMail->SMTPDebug = 1;\n $notificationMail->From = \"[email protected]\";\n $notificationMail->FromName = \"Freya Hotel\";\n //$mail->SetFrom('[email protected]', 'Info Multas');\n $notificationMail->AddAddress($email);\n \n $notificationMail->Subject = \"Reserva Realizada [#\".$calendarRegistro.\"]\";\n //Cuerpo del mensaje\n $body = \" <html>\"\n . \"<body>\"\n . \"<p style='font-family: Verdana; color: #000;'>\"\n . \"Hola, Es un gusto saber que pronto podrás disfrutar de esta maravillosa experiencia. Estas son algunas de las \n recomendaciones para que la pases excelente: 1- Recuerda que estarás en una zona de reserva natural, con diversidad \n de aves y clima 2- Te vas a encontrar con un clima fresco en el día y frío en la noche, ven preparado 3- Desconéctate \n de la rutina y conéctate con la naturaleza 4- Prepárate para liberarte del stress del día a día y recargar \n baterías para lo que viene 5- Lo mas importante disfruta de la experiencia ¡Tu reserva fue exitosa!<br /><br />\"\n . \"<B>Detalles de tú Reserva</B><br /><br />\"\n . \"Huésped(es): \".$nombres.\" \".$apellidos.\"<br />\n #Reserva: \".$calendarRegistro.\"<br />\n Entrada: \".$periodo_desde.\"<br />\n Salida: \".$periodo_hasta.\"<br />\n Número de noches: \".$nochesReserva.\"<br />\n Huéspedes: Adultos: \".$countAdult.\", Niños: \".$countNino.\"<br />\n Huéspedes a Cobrar: \".$totalHuespedCobro.\"<br />\n Valor a Pagar: $\".number_format($valorTotalReserva,0,\",\",\".\").\"<br /><br />\"\n . \"El check in es a las \".$this->config->item('checkin').\" y el check out a las \".$this->config->item('checkout').\". Estamos ubicados en La Tulia a 15 minutos del municipio de \"\n . \"Roldanillo-Valle, te podemos enviar ubicación exacta antes de tu estadía. Puedes disfrutar de servicio adicional \"\n . \"de restaurante, vinos, cocteles, ademas puedes rentar caballos y practicar parapente. \"\n . \"Pronto uno de nuestros asesores te contactara para hacer la confirmación, debes hacer la consignación de tu reserva en las siguientes 48 horas del registro para evitar cancelación. Bancolombia Alexis \"\n . \"Mendoza -Cuenta de ahorro 30100274134- <B>POR FAVOR ENVIAR COPIA DE CONSIGNACION AL EMAIL O WHATSAPP CON NOMBRE Y NUMERO \"\n . \"DE RESERVA</B>. Tenemos servicio de datafono en el lugar. Gracias por tu reserva.<br />\"\n . \"</p>\"\n . \"</body>\"\n . \"</html>\";\n \n $notificationMail->Body = $body;\n $notificationMail->IsHTML(true);\n $notificationMail->CharSet = 'UTF-8';\n\n //enviar el correo\n if (($notificationMail->Send()) == TRUE){\n\n return TRUE;\n\n } else {\n\n return FALSE;\n\n }\n \n }", "title": "" }, { "docid": "f3093ba98f6332f3e6e326d690818646", "score": "0.6109737", "text": "function bookingToBeElapsedAlertToAgents()\n {\n $bookingElapsingDate = date(\"Y-m-d\", strtotime(\"+1 week\"));\n $emailSubject = \" Expiry due date:\".date(\"d-m-Y\", strtotime(\"+1 week\"));\n $whereCls = \"\n b.status != 'confirmed' \n AND b.status != 'rejected' \n AND b.status != 'elapsed' \n AND b.data_scadenza = CAST('\".$bookingElapsingDate.\"' AS DATE)\n \";\n $bookingsTobeElapsed = $this->mbackoffice->exportCSVBookingsToBeElapsedAlert($whereCls);\n if($bookingsTobeElapsed)\n {\n $this->load->library('email');\n foreach ($bookingsTobeElapsed as $singbk) {\n \n $elapsedDate = $bookingElapsingDate;\n $agencyBusinessName = ucwords($singbk['businessname']);\n $bookId = $singbk['id_book'];\n $campusName = $singbk['nome_centri'];\n $dateIn = $singbk['arrival_date'];\n $dateOut = $singbk['departure_date'];\n if(validateDate($dateIn, 'Y-m-d'))\n $dateIn = date(\"d-m-Y\", strtotime ($dateIn));\n if(validateDate($dateOut, 'Y-m-d'))\n $dateOut = date(\"d-m-Y\", strtotime ($dateOut));\n if(validateDate($elapsedDate, 'Y-m-d'))\n $elapsedDate = date(\"d-m-Y\", strtotime ($elapsedDate));\n \n $numberOfWeeks = $singbk['weeks'];\n $stdCount = $singbk['std_count'];\n $glCount = $singbk['gl_count'];\n $accountManagerName = ucwords($singbk['account_manager_firstname'] . \" \" .$singbk['account_manager_familyname']);\n $accountManagerEmail = $singbk['account_manager_email'];\n $agentEmail = $singbk['agent_email'];\n // send email\n $this->email->clear();\n $emailTemplate = getEmailTemplate(5);\n $this->email->set_newline(\"\\r\\n\");\n $this->email->from($emailTemplate->emt_from_email, \"Plus-ed.com\");\n $this->email->to($agentEmail);\n $this->email->cc($accountManagerEmail.\",[email protected]\");\n $this->email->subject($emailTemplate->emt_title . $emailSubject);\n $strParam = array(\n '{AGENCY_NAME}' => $agencyBusinessName,\n '{ELAPSED_DATE}' => $elapsedDate,\n '{GROUP_ID}' => $bookId,\n '{CAMPUS}' => $campusName,\n '{DATE_IN}' => $dateIn,\n '{DATE_OUT}' => $dateOut,\n '{NO_OF_WEEKS}' => $numberOfWeeks,\n '{STD_COUNT}' => $stdCount,\n '{GL_COUNT}' => $glCount,\n '{ACCOUNT_MANAGER_NAME}' => $accountManagerName,\n '{ACCOUNT_MANAGER_EMAIL}' => $accountManagerEmail\n );\n $txtMessageStr = mergeContent($strParam,$emailTemplate->emt_text);\n $this->email->message($txtMessageStr);\n //echo $txtMessageStr;\n if ($_SERVER['HTTP_HOST'] != \"localhost\" && $_SERVER['HTTP_HOST'] != \"192.168.43.47\") {\n $this->email->send();\n }\n }\n }\n die();\n }", "title": "" }, { "docid": "5e2ace5a4c165eee45a582e58293ef96", "score": "0.61076844", "text": "public function send(){\n\t// * Fungsi ini untuk cron job di SERVER\n\t// * di SET setiap hari jam 23.45 dan 23.50\n\t// * untuk mengganti schedule Cron Job perlu dilakukan perubahan pada function ini,\n\t// * dan pada Library -> sendmail.php -> function mail_stock dan mail_stock_fg\n\t\n\t\n\t\n\t\t// echo '<meta http-equiv=\"refresh\" content=\"60\">';\n\n\t\tif (date('d-m-Y H:i') >= date('d-m-Y 23:40') AND date('d-m-Y H:i') <= date('d-m-Y 23:48')) {\n\t\t\t$this->mail_mt();\n\t\t} else if (date('d-m-Y H:i') >= date('d-m-Y 23:40') AND date('d-m-Y H:i') <= date('d-m-Y 23:56') ) {\n\t\t\t$this->mail_fg();\n\t\t} else {\n\t\t\techo date('d-m-Y H:i:s');\n\t\t}\n\t}", "title": "" }, { "docid": "581fc7ac7f0014331a1f4836a84b2f05", "score": "0.6064981", "text": "function check_send_mail()\n\t{\n\t\tglobal $holydays;\n\t\t$today=time();\n\t\t//FÜR TEST\n\t\t//$today=mktime(17,30,00,10,04,2013);\n\t\tif (date(\"N\", $today)<6 && !in_array(date(\"d.m.Y\", $today), $holydays))\n\t\t{\n\t\t\t//WENN MONTAG ODER NACH FEIERTAG\n\t\t\tif (date(\"N\", $today)==1 || in_array( date(\"d.m.Y\",$today-(24*3600)), $holydays))\n\t\t\t{\n\t\t\t\t//nach 17 UHR\n\t\t\t\tif (date(\"G\", $today)>=17)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "cdd640b22f81ad47eeb23caecf36f657", "score": "0.6060621", "text": "function runNewsletterCron() {\n $objNewsLetter = new NewsLetter();\n \n $objTemplate = new EmailTemplate();\n \n $objCore = new Core();\n// $this->varLimit = \"0\" . \",\" . NEWSLETTER_SEND_LIMIT;\n $this->varLimit = \"0\" . \",\" . 80;\n $this->arrNewsletter = $objNewsLetter->newsLetterSendList($varWhr, $this->varLimit);\n //echo $this->arrNewsletter; die;\n\n foreach ($this->arrNewsletter AS $valNewsletter) {\n\n if ($valNewsletter['NewsLetterType'] == 'template') {\n $content = '<img src=\"' . $objCore->getImageUrl($valNewsletter['Template'], 'newsletter') . '\" />';\n } else {\n $content = $valNewsletter['Content'];\n }\n $title = $valNewsletter['Title'];\n \n\n $this->arrRows = $objNewsLetter->getNewsletterRecipientList($valNewsletter['pkNewsLetterID']);\n \n \n\n foreach ($this->arrRows as $k => $arrRow) {\n if ($arrRow['SendTo'] == \"customer\") {\n $varToUser = $arrRow['CustomerEmail'];\n $varUserName = trim(strip_tags($arrRow['CustomerFirstName']));\n } else if ($arrRow['SendTo'] == \"wholesaler\") {\n $varToUser = $arrRow['CompanyEmail'];\n $varUserName = trim(strip_tags($arrRow['CompanyName']));\n }\n \n if($arrRow['CompanyEmail']=='')\n {\n \tcontinue;\n }\n\n $fromUserName = SITE_NAME;\n $varSiteName = SITE_NAME;\n $varWhereTemplate = \" EmailTemplateTitle= 'SendNewsletterEmail' AND EmailTemplateStatus = 'Active' \";\n $arrMailTemplate = $objTemplate->getTemplateInfo($varWhereTemplate);\n $varOutput = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateDescription']));\n $varSubject = html_entity_decode(stripcslashes($arrMailTemplate[0]['EmailTemplateSubject']));\n $varPathImage = '<img src=\"' . SITE_ROOT_URL . 'common/images/logo.png\" />';\n $varSubject = str_replace('{SITE_NAME}', SITE_NAME, html_entity_decode(stripcslashes($arrMailTemplate['0']['EmailTemplateSubject'])));\n $varKeyword = array('{IMAGE_PATH}', '{SITE_NAME}', '{USERNAME}','{TITLE}', '{MESSAGE}');\n\n $varKeywordValues = array($varPathImage, SITE_NAME, $varUserName,$title, html_entity_decode($content));\n\n $varOutPutValues = str_replace($varKeyword, $varKeywordValues, $varOutput);\n// Calling mail function\n//pre($varOutPutValues);\n $objCore->sendMail($varToUser, $fromUserName, $varSubject, $varOutPutValues);\n $objNewsLetter->updateLetterSendList($valNewsletter['pkNewsLetterID']);\n $objNewsLetter->updateNewsletterRecipientList($valNewsletter['pkNewsLetterID']);\n//return $arrAddID;\n }\n }\n// pre(\"y\");\n }", "title": "" }, { "docid": "ca431817a800a4f04d5a7424896ca48f", "score": "0.60521144", "text": "function agentEmailOnBookingElapsed(){\n //log_message('error', 'Start: Running cron to send booking elapsed alert to agents');\n $this -> mbackoffice -> elapsedBookingsToElapse();\n //log_message('error', 'Finish: Running cron to send booking elapsed alert to agents');\n }", "title": "" }, { "docid": "ef51d2f6574f670a52547eb9c0a2f597", "score": "0.602666", "text": "public function check_seventy_two_hours_tickets(){\n \t$this->load->model(\"portalmodel\");\n \t\n \t$seventy_two_hours = date('Y-m-d H:i:s', strtotime('-72 hours'));\n \t\n \t$arrEmails = array();\n \t// also add [email protected] as email\n\t\t$arrEmails[] = \"[email protected]\";\n \t\n \t// high priority and not assigned to any tech\n \t$where = \"(priority=1 OR priority=3) AND assigned_to='' AND created_on<='\".$seventy_two_hours.\"'\";\n \t$tickets = $this->portalmodel->select_where('', '', 'task', $where);\n \tif(!empty($tickets)){\n \t\tforeach ($tickets as $eachticket){\n \t\t\t$taskid = $eachticket->taskid;\n \t\t\t\n \t\t\t// get the account manager id\n\t \t\t$where_project = \"id='\".$eachticket->projectid.\"'\";\n\t\t $prj = $this->portalmodel->select_where('','','project', $where_project);\n\t\t\t\t$accountmanager_id = $prj[0]->accountmanager;\n\t\t\t\t\n\t\t\t\tif(!empty($accountmanager_id)){\n\t\t\t\t\t$tolist = $this->portalmodel->select_where('','','user', \"id='\".$accountmanager_id.\"'\");\n\t\t\t\t\tif (!empty($tolist)) {\n\t\t\t foreach ($tolist as $d){ \n\t\t\t \t$arrEmails[] = $d->email;\n\t\t\t \t// send to business email\n\t\t\t\t \tif(isset($d->business_email) && !empty($d->business_email)){\n\t\t\t\t \t\t$arrEmails[] = $d->business_email;\n\t\t\t\t \t}\n\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// now send email\n\t \t\t$subject = \"Ticket not Assigned to any Tech!\";\n\t \t\t$message = 'Hi,\n\t \t\t\t\t\t<br/><br/>\n\t \t\t\t\t\tThe Ticket ID of <b>' . $taskid . '</b> is still not assigned to any Tech.\n\t \t\t\t\t\tPlease respond to ticket as soon as possible.<br/>\n\t\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\t\tThank you,<br/>\n\t\t\t\t\t\t\t- Synergy IT Team';\n\t \t\tforeach ($arrEmails as $eachEmail){\n\t \t\t\t$email=$this->email($eachEmail, $subject, $message);\n\t \t\t}\n \t\t}\n \t}\n \t\n \texit;\n }", "title": "" }, { "docid": "fe3badcaf825b412804a095506b0e515", "score": "0.60062253", "text": "function sendAuctionEmails() {\n\t\t$time = time();\n\t\t$toDate = date('Y-m-d H:i:s', $time);\n\t\t$lastTime = $time - (2592000*2); // 60*60*24*30*2\n\t\t$fromDate = date('Y-m-d H:i:s', $lastTime);\n\n /* Get the collection */\n $orders = Mage::getModel('sales/order')->getCollection()\n ->addAttributeToSelect('customer_id')\n ->addAttributeToFilter ('created_at', array (\n 'from' => $fromDate,\n 'to' => $toDate\n ) )\n ->addAttributeToFilter ( 'status', array (\n 'eq' => Mage_Sales_Model_Order::STATE_COMPLETE\n ) );\n\n $cusstomers=$this->getAllCusstomersIds();\n\n\t\tforeach ($orders as $order) {\n\t\t\tif(($key = array_search($order->getCustomerId(), $cusstomers)) !== false) {\n\t\t\t\tunset($cusstomers[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$sendcusstomers = Mage::getModel('backorder/backorder')\n\t\t->getCollection()\n\t\t->addFieldToFilter ('send_time', array (\n\t\t\t\t'from' => $fromDate,\n\t\t\t\t'to' => $toDate\n\t\t) )\n\t\t->addFieldToSelect('customer_id');\n\n\t\tforeach ($sendcusstomers as $sendcusstomer) {\n\t\t\tif(($key = array_search($sendcusstomer->getCustomerId(), $cusstomers)) !== false) {\n\t\t\t\tunset($cusstomers[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$sender = Mage::getModel('core/email_template');\n\t\tforeach($cusstomers as $custId) {\n\t\t\t$customer_data = Mage::getModel('customer/customer')->load($custId);\n\t\t\t$email = $customer_data->getSubscriberEmail();\n\t\t\t$name = $customer_data->getSubscriberFullName();\n\n\t\t\t$backorderModel = Mage::getModel('backorder/backorder');\n\n\t\t\t$backorderModel\n\t\t\t->setCustomerId($custId)\n\t\t\t->save();\n\n\t\t\t$sender->emulateDesign($customer_data->getStoreId());\n\t\t\t$successSend = $sender->send($email, $name, array('subject'=>'We havent heard from you for a while','customer' => $customer_data));\n\t\t\t$sender->revertDesign();\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "967ae52d9aa0c171386590e1df0320e3", "score": "0.6005984", "text": "private static function sendEmails()\r\n {\r\n $emailServiceSendingEmails = Preference::getValue('emailServiceSendingEmails', 5, '0');\r\n\r\n // Comprobación para casos de errores o caídas del servidor, y no dejen bloquedo el envío de emails\r\n // si en 5 minutos no se ha liberado la variable, damos por hecho que se ha bloqueado y la liberamos\r\n $update = \\DateTime::createFromFormat('Y-m-d H:i:s', $emailServiceSendingEmails->updated_at);\r\n if($emailServiceSendingEmails->value_018 == '1' && date('U') - $update->getTimestamp() > 300)\r\n Preference::setValue('emailServiceSendingEmails', 5, '0');\r\n\r\n\r\n //en el caso que el estado de envio esté activo, eso siginifica que hay una petición en curso y está haciendo la petición\r\n //a la base de datos y esta sustrayendo los ids, para posteriormente cambiar el estado de envíos, solo en ese momento\r\n //cambiaremos el estado de envío de emails para poder aceptar más peticiones, de esa manera nos aseguramos que no hayan\r\n //varias peticiones concurrentes del gestor de colas.\r\n if($emailServiceSendingEmails->value_018 == '1')\r\n exit;\r\n else\r\n Preference::setValue('emailServiceSendingEmails', 5, '1');\r\n\r\n // TODO investigar porque hay emais que se quedan en proceso y no llegan a ser enviados\r\n // consultamos emails que se quedan en sin enviar\r\n EmailSendQueue::getStuckMailings();\r\n\r\n // consultamos la cola de envíos que estén por enviar, solicitamos los primero N envíos según el itervalo configurado\r\n // solo de aquellos envíos que estén en estado: 0 = waiting to be sent\r\n $mailings = EmailSendQueue::getMailings((int)Preference::getValue('emailServiceIntervalProcess', 5)->value_018, 0);\r\n\r\n $mailingIds = $mailings->pluck('id_047')->toArray();\r\n\r\n if(count($mailings) > 0)\r\n {\r\n // cambiamos el estado de EmailSendQueue para que se puedan hacer peticiones\r\n EmailSendQueue::whereIn('id_047', $mailingIds)->update([\r\n // status_id_047 = 1 in process\r\n 'status_id_047' => 1\r\n ]);\r\n\r\n // desbloqueo de proceso de obtención de emails para ser enviados y se puedan hacer peticiones\r\n Preference::setValue('emailServiceSendingEmails', 5, '0');\r\n\r\n $successfulIds =[];\r\n\r\n foreach ($mailings as $mailing)\r\n {\r\n // Creamos el historico de envío con antelación para obtener el ID del histórico de envío y contabilizarlo\r\n $emailSendHistory = EmailSendHistory::create([\r\n 'send_queue_id_048' => $mailing->id_047,\r\n 'campaign_id_048' => $mailing->campaign_id_047,\r\n 'contact_id_048' => $mailing->contact_id_047,\r\n 'create_048' => $mailing->create_047,\r\n 'sent_048' => date('U'),\r\n 'viewed_048' => 0\r\n ]);\r\n\r\n $dataEmail = [\r\n 'replyTo' => empty($mailing->reply_to_013)? null : $mailing->reply_to_013,\r\n 'email' => $mailing->email_041,\r\n 'html' => $mailing->header_044 . $mailing->body_044 . $mailing->footer_044,\r\n 'text' => $mailing->text_044,\r\n 'subject' => $mailing->subject_044,\r\n 'contactKey' => Crypt::encrypt($mailing->id_041),\r\n 'company' => isset($mailing->company_041)? $mailing->company_041 : '',\r\n 'name' => isset($mailing->name_041)? $mailing->name_041 : '',\r\n 'surname' => isset($mailing->surname_041)? $mailing->surname_041 : '',\r\n 'birthDate' => isset($mailing->birth_date_041)? date(config('pulsar.datePattern'), $mailing->birth_date_041) : '',\r\n 'campaign' => Crypt::encrypt($mailing->id_044),\r\n 'historyId' => Crypt::encrypt($emailSendHistory->id_048) // data to set statics\r\n ];\r\n\r\n // config SMTP account\r\n config(['mail.host' => $mailing->outgoing_server_013]);\r\n config(['mail.port' => $mailing->outgoing_port_013]);\r\n config(['mail.from' => ['address' => $mailing->email_013, 'name' => $mailing->name_013]]);\r\n config(['mail.encryption' => $mailing->outgoing_secure_013 == 'null'? null : $mailing->outgoing_secure_013]);\r\n config(['mail.username' => $mailing->outgoing_user_013]);\r\n config(['mail.password' => Crypt::decrypt($mailing->outgoing_pass_013)]);\r\n\r\n // exec mailing\r\n try\r\n {\r\n $response = EmailServices::SendEmail($dataEmail);\r\n\r\n if($response)\r\n {\r\n // delete message from queue\r\n EmailSendQueue::where('id_047', $mailing->id_047)->delete();\r\n }\r\n else\r\n {\r\n // error de envío, eliminamos el histórico antes creado\r\n EmailSendHistory::destroy($emailSendHistory->id_048);\r\n }\r\n }\r\n catch (\\Exception $e)\r\n {\r\n // delete message from queue\r\n EmailSendQueue::where('id_047', $mailing->id_047)->delete();\r\n Contact::where('email_041', $mailing->email_041)->delete();\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // desbloqueo de proceso de obtención de emails para ser enviados y se puedan hacer peticiones\r\n Preference::setValue('emailServiceSendingEmails', 5, '0');\r\n }\r\n }", "title": "" }, { "docid": "67632c714aba5a0900dfa82d9a8c8957", "score": "0.59535944", "text": "function mail_task_offer($recid=''){\n\n\t\t$this->session_check_admin();\n\n\t\t\t\n\n\t\tApp::import(\"Model\", \"SystemVersion\");\n\n\t\t$this->SystemVersion = & new SystemVersion();\n\n\t\t\t\n\n\t\t$projectid = $this->Session->read(\"sessionprojectid\");\n\n\t\tif(empty($projectid)){\n\n\t\t\t$projectid='0';\n\n\t\t}\n\n\t\t\t\n\n\t\t$projectDetails=$this->getprojectdetails($projectid);\n\n\t\t$this->set('fromemail',$projectDetails['Sponsor']['email']);\n\n\t\t\t\n\n\t\tif($recid!=''){\n\n\t\t\t$this->CommunicationTask->id = $recid;\n\n\t\t\t$this->set('taskrecid', $recid);\n\n\t\t\t$this->data = $this->CommunicationTask->read();\n\n\t\t\t$this->data['CommunicationTask']['task_startdate']=date(\"m-d-Y\", strtotime($this->data['CommunicationTask']['task_startdate']));\n\n\t\t\t\t\n\n\t\t\tif($this->data['CommunicationTask']['task_end_by_date']!=\"\" && $this->data['CommunicationTask']['task_end']==\"by_date\"){\n\n\t\t\t\t$this->data['CommunicationTask']['task_end_by_date']=date(\"m-d-Y\", strtotime($this->data['CommunicationTask']['task_end_by_date']));\n\n\t\t\t}\n\n\t\t\tif($this->data['CommunicationTask']['company_type']==\"\" && $this->data['CommunicationTask']['contact_type']==\"\"){\n\n\t\t\t\t$is_contactdisabled=\"1\";\n\n\t\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t}else{\n\n\t\t\t\t$is_contactdisabled=\"0\";\n\n\t\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t}\n\n\t\t\t$sel_email_temp=$this->data['CommunicationTask']['email_template_id'];\n\n\t\t\t$sel_subscription_types=$this->data['CommunicationTask']['subscription_type'];\n\n\t\t\t$sel_member_types=$this->data['CommunicationTask']['member_type'];\n\n\t\t\t$sel_donation_levels=$this->data['CommunicationTask']['donation_level'];\n\n\t\t\t$sel_days_since=$this->data['CommunicationTask']['member_days_since'];\n\n\t\t\t$sel_country=$this->data['CommunicationTask']['member_country'];\n\n\t\t\t$sel_state=$this->data['CommunicationTask']['member_state'];\n\n\t\t\t$sel_event=$this->data['CommunicationTask']['event_id'];\n\n\t\t\t$sel_event_rsvp=$this->data['CommunicationTask']['event_rsvp_type'];\n\n\t\t\t$sel_comment_typeid=$this->data['CommunicationTask']['relatesto_commenttype_id'];\n\n\t\t\t$sel_social_networks=$this->data['CommunicationTask']['social_network_members'];\n\n\t\t\t$sel_non_networks=$this->data['CommunicationTask']['non_network_members'];\n\n\t\t\t$sel_companytypeid=$this->data['CommunicationTask']['company_type'];\n\n\t\t\t$sel_contactypeid=$this->data['CommunicationTask']['contact_type'];\n\n\t\t\t$sel_recur_pattern=$this->data['CommunicationTask']['recur_pattern'];\n\n\t\t\t$selectedtemplatetype = $this->data['CommunicationTask']['email_template_type'];\n\n\t\t\t$sel_category= $this->data['CommunicationTask']['category_id'];\n\n\t\t\t$sel_sub_category = $this->data['CommunicationTask']['sub_category_id'];\n\n\t\t\t$sel_nonprofittype = $this->data['CommunicationTask']['non_profit_type_id'];\n\n\t\t\t$sel_offer = $this->data['CommunicationTask']['offer_id'];\n\n\t\t\t$email_from = $this->data['CommunicationTask']['email_from'];\n\n\t\t}else{\n\n\t\t\t$sel_email_temp=\"\";\n\n\t\t\t$sel_subscription_types=\"0\";\n\n\t\t\t$sel_member_types=\"\";\n\n\t\t\t$sel_donation_levels=\"\";\n\n\t\t\t$sel_days_since=\"\";\n\n\t\t\t$sel_country=\"254\";\n\n\t\t\t$sel_state=\"\";\n\n\t\t\t$sel_event=\"\";\n\n\t\t\t$sel_event_rsvp=\"\";\n\n\t\t\t$sel_comment_typeid=\"0\";\n\n\t\t\t$sel_social_networks=\"\";\n\n\t\t\t$sel_non_networks=\"\";\n\n\t\t\t$sel_companytypeid=\"\";\n\n\t\t\t$sel_contactypeid=\"\";\n\n\t\t\t$sel_recur_pattern=\"--Select--\";\n\n\t\t\t$is_contactdisabled=\"0\";\n\n\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t$selectedtemplatetype = '0';\n\n\t\t\t$sel_category='';\n\n\t\t\t$sel_sub_category ='0';\n\n\t\t\t$sel_nonprofittype ='';\n\n\t\t\t$sel_offer ='';\n\n\t\t\t$email_from ='';\n\n\t\t\t$sdate = '';\n\n\t\t}\n\n\t\t$this->set('sel_email_temp',$sel_email_temp);\n\n\t\t$this->set('email_from',$email_from);\n\n\t\t$this->set('sel_subscription_types',$sel_subscription_types);\n\n\t\t$this->set('sel_member_types',$sel_member_types);\n\n\t\t$this->set('sel_donation_levels',$sel_donation_levels);\n\n\t\t$this->set('sel_days_since',$sel_days_since);\n\n\t\t$this->set('sel_country',$sel_country);\n\n\t\t$this->set('sel_state',$sel_state);\n\n\t\t$this->set('sel_event',$sel_event);\n\n\t\t$this->set('sel_event_rsvp',$sel_event_rsvp);\n\n\t\t$this->set('sel_comment_typeid',$sel_comment_typeid);\n\n\t\t$this->set('sel_social_networks',$sel_social_networks);\n\n\t\t$this->set('sel_non_networks',$sel_non_networks);\n\n\t\t$this->set('sel_companytypeid',$sel_companytypeid);\n\n\t\t$this->set('sel_contactypeid',$sel_contactypeid);\n\n\t\t$this->set('sel_recur_pattern',$sel_recur_pattern);\n\n\t\t$this->set('is_contactdisabled',$is_contactdisabled);\n\n\t\t$this->set('is_memebrdisabled',$is_memebrdisabled);\n\n\t\t$this->set('sel_category',$sel_category);\n\n\t\t$this->set('sel_sub_category',$sel_sub_category);\n\n\t\t$this->set('sel_nonprofittype', $sel_nonprofittype);\n\n\t\t$this->set('sel_offer',$sel_offer);\n\n\t\t$this->set('sdate',$sdate);\n\n\t\t$this->set('selectedtemplatetype',$selectedtemplatetype);\n\n\t\t# set help condition\n\n\t\t// Set memeber types array\n\n\t\t$this->set('member_types',$this->getMemberTypes());\n\n\t\t//Set donation levles array\n\n\t\t$this->set('donation_levels',$this->getDonationLevelsListByProject($projectid));\n\n\t\t// Set Subscription Type array\n\n\t\t$this->set('subscription_types',$this->getSubscriptionTypesArray());\n\n\t\t// Set Dasy Since array\n\n\t\t$this->set('days_since',$this->getDaysSinceArray());\n\n\t\t// Set Event RSVP array\n\n\t\t$this->set('event_rsvp',$this->getEventRSVPArray());\n\n\t\t//Set Social Naetworks Array\n\n\t\t$this->set('social_networks',$this->getSocialNetworkArray());\n\n\t\t//Set Recur Pattern Array\n\n\t\t$this->set('recur_pattern',$this->getRecurPatternkArray());\n\n\t\t//Get Event Drop Down\n\n\t\t$this->getEventDropDownListByProjetcID($projectid);\n\n\t\t//Get Company Type Drop Down\n\n\t\t$this->companytypedropdown($projectid);\n\n\t\t//Get Company Type Drop Down\n\n\t\t// $contacttypedropdown =$this->contacttypedropdown($projectid);\n\n\t\t//$this->set('contacttypedropdown',$contacttypedropdown);\n\n\t\t##country drop down\n\n\t\t$this->countrydroupdown();\n\n\t\t$this->statedroupdown();\n\n\t\t$this->set(\"templatetypedropdown\",array(0=>'Member',1=>'Player',2=>'Prospects',3=>'Offers'));\n\n\t\t$this->set('categorydropdown',$this->getCategoryDropdown());\n\n\t\t$this->set('subcategorydropdown',$this->getSubCategoryDropdown($sel_category));\n\n\t\t$this->nonprofittypedropdown();\n\n\t\t$this->offertypetempdropdown();\n\n\t\t$this->customtemplatelisting();\n\n\t\t$companytypestatusdropdown = $this->getCompanyTypeStatusDropdown();\n\n\n\n\t\t$this->set(\"companytypestatusdropdown\", $companytypestatusdropdown);\n\n\t\t//$this->set(\"selectedcompanytypestatus\", '');\n\n\t\t$this->contacttypedropdown(0);\n\n\t}", "title": "" }, { "docid": "aabe1f80485e3499f5bf79290ae2bf0b", "score": "0.59384036", "text": "public function expired_send_mail()\r\n {\r\n /* get user meta */\r\n $meta = get_user_meta($this->ID);\r\n /* get the sent mail flag */\r\n $sent_mail_flag = $meta['sent-mail'][0] == 'sent' ? false : true;\r\n /* if mail was not sent then send an email */\r\n if(!$sent_mail_flag) :\r\n $emailaddress = $this->user->email;\r\n $to = $emailaddress;\r\n \t$email = new spinal_send_mail();\r\n $options = get_option('email-options');\r\n $message = $options['expired-membership'];\r\n $title = 'Renew Your Membership on '.get_bloginfo( 'name' );\r\n //$sent = $email->send($to, $title, $message);\r\n if($sent) :\r\n update_user_meta( $this->ID, 'sent-mail', 'sent');\r\n endif;\r\n endif;\r\n }", "title": "" }, { "docid": "0d54321c8ca2eb32fb237a08d9254891", "score": "0.5917447", "text": "public function send_client_pendent_status($useremail, $username, $day_to_block) {\r\n //$mail->addReplyTo('[email protected]', 'First Last');\r\n //Set who the message is to be sent to\r\n $this->mail->clearAddresses();\r\n $this->mail->addAddress($useremail, $username);\r\n $this->mail->clearCCs();\r\n //$this->mail->addCC($GLOBALS['sistem_config']->SYSTEM_EMAIL, $GLOBALS['sistem_config']->SYSTEM_USER_LOGIN);\r\n //$this->mail->addCC($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n $this->mail->addReplyTo($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n\r\n //Set the subject line\r\n //$this->mail->Subject = 'DUMBU Assinatura aprovada com sucesso!';\r\n $this->mail->Subject = 'DUMBU Pendente por pagamento!';\r\n\r\n //Read an HTML message body from an external file, convert referenced images to embedded,\r\n //convert HTML into a basic plain-text alternative body\r\n $username = urlencode($username); \r\n $day_to_block = urlencode($day_to_block); \r\n //$this->mail->msgHTML(file_get_contents(\"http://localhost/dumbu/worker/resources/emails/login_error.php?username=$username&instaname=$instaname&instapass=$instapass\"), dirname(__FILE__));\r\n //echo \"http://\" . $_SERVER['SERVER_NAME'] . \"<br><br>\";\r\n $lang = $GLOBALS['sistem_config']->LANGUAGE;\r\n $this->mail->msgHTML(@file_get_contents(\"http://\" . $_SERVER['SERVER_NAME'] . \"/leads/worker/resources/$lang/emails/pendent_status.php?username=$username&day_to_block=$day_to_block\"), dirname(__FILE__));\r\n\r\n //Replace the plain text body with one created manually\r\n $this->mail->Subject = 'DUMBU Pendente por pagamento!';\r\n\r\n //Attach an image file\r\n //$mail->addAttachment('images/phpmailer_mini.png');\r\n $this->mail->AddEmbeddedImage(realpath('../src/assets/img/email_pendent.png'), \"logo_pendent\", \"email_pendent.png\", \"base64\", \"image/png\");\r\n //send the message, check for errors\r\n if (!$this->mail->send()) {\r\n $result['success'] = false;\r\n $result['message'] = \"Mailer Error: \" . $this->mail->ErrorInfo;\r\n } else {\r\n $result['success'] = true;\r\n $result['message'] = \"Message sent!\" . $this->mail->ErrorInfo;\r\n }\r\n $this->mail->smtpClose();\r\n return $result;\r\n }", "title": "" }, { "docid": "fb80fc63cb0c8ffa66312ab0789196ff", "score": "0.58896863", "text": "function kirimemail($type=\"\", $email=\"\", $p1=\"\", $p2=\"\", $p3=\"\", $p4=\"\"){\r\n\t\t$ci =& get_instance();\r\n\t\t$ci->load->library('My_PHPMailer');\r\n\t\t\t\t\r\n\t\t$html = \"\";\r\n\t\t$subject = \"\";\r\n\t\tswitch($type){\r\n\t\t\tcase \"email_news\":\r\n\t\t\t\t$subject = \"Roger's Newsletter Notification\";\r\n\t\t\t\t$html = \"\r\n\t\t\t\t\t<center><img src='http://www.rogersalon.com/__assets/images/logo-email.png' /></center>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<h1>\".$p1.\"</h1>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t\".$p2.\"\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<a href='http://www.rogersalon.com/#news'>Continue</a>\r\n\t\t\t\t\";\r\n\t\t\tbreak;\r\n\t\t\tcase \"email_reservasi\":\r\n\t\t\t\t$subject = \"Rogers Reservation Notification\";\r\n\t\t\t\t$html = \"\r\n\t\t\t\t\t<h1>Roger's Reservasi Untuk Cabang \".$p1.\"</h1>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<table width='100%'>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td width='20%'>Nama</td>\r\n\t\t\t\t\t\t\t<td width='5%'>:</td>\r\n\t\t\t\t\t\t\t<td width='75%'>\".$p2['nama'].\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>ID Member</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".$p2['id_member'].\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>No. Handphone</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".$p2['phone'].\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>Email</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".$p2['email'].\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>Tanggal</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".date('d-m-Y',strtotime($p2['tgl'])).\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>Layanan</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".$p3.\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td>Request Tambahan</td>\r\n\t\t\t\t\t\t\t<td>:</td>\r\n\t\t\t\t\t\t\t<td>\".$p2['request'].\"</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\t<br/>\r\n\t\t\t\t\tSilahkan Mengkonfirmasi Ke Customer terkait Terima Kasih.\r\n\t\t\t\t\t\r\n\t\t\t\t\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\t\t\r\n\t\ttry{\r\n\t\t\t$mail = new PHPMailer();\r\n\t\t\t$email_body = $html;\r\n\t\t\t\r\n\t\t\tif($ci->config->item('SMTP')) $mail->IsSMTP();\r\n\t\t\t$mail->SMTPAuth = $ci->config->item('SMTPAuth'); \r\n\t\t\t$mail->SMTPSecure = \"ssl\";\r\n\t\t\t$mail->Port = $ci->config->item('Port'); \r\n\t\t\t$mail->Host = $ci->config->item('Host'); \r\n\t\t\t$mail->Username = $ci->config->item('Username'); \r\n\t\t\t$mail->Password = $ci->config->item('Password'); \r\n\t\t\t\r\n\t\t\t$mail->From = $ci->config->item('EmaiFrom');\r\n\t\t\t$mail->AddReplyTo($ci->config->item('EmaiFrom'), $ci->config->item('EmaiFromName'));\r\n\t\t\t$mail->SetFrom = $ci->config->item('EmaiFrom');\r\n\t\t\t$mail->FromName = $ci->config->item('EmaiFromName');\t\t\t\r\n\t\t\t$mail->AddAddress($email);\r\n\t\t\t\r\n\t\t\t$mail->Subject = $subject;\r\n\t\t\t$mail->AltBody = \"To view the message, please use an HTML compatible email viewer!\"; \r\n\t\t\t$mail->WordWrap = 100; \r\n\t\t\t$mail->MsgHTML($email_body);\r\n\t\t\t$mail->IsHTML(true);\t\t\t\r\n\t\t\t$mail->SMTPDebug = 1;\r\n\t\t\t\r\n\t\t\tif($mail->Send()){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else{\r\n\t\t\t\t//return 0;\r\n\t\t\t\techo $mail->ErrorInfo;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (phpmailerException $e) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t//*/\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c0f4ae917df3bbc4b10cbe79cef899c2", "score": "0.58853966", "text": "public function sendSmtpEmail($type, $surname, $name, $email, $referral = null, $password = null, $rank = null) {\r\n $mail = new PHPMailer;\r\n\r\n if ($type == \"coach_register\") {\r\n $message = file_get_contents('css/email_templates/coach_register.html');\r\n $message = str_replace('%NAME%', $name, $message);\r\n $message = str_replace('%SURNAME%', $surname, $message);\r\n $message = str_replace('%PASSWORD%', $password, $message);\r\n $message = str_replace('%URL_SITE%', 'http://www.hoopdrillz.com/', $message);\r\n $message = str_replace('%URL_COACH%', 'http://www.hoopdrillz.com/coach', $message);\r\n $message = str_replace('%URL_REFERRAL%', 'http://prelaunch.hoopdrillz.com/'.$referral, $message);\r\n $mail->Subject = $this->f3->get('eml_template_coach_reg_subject');\r\n /*\r\n $message = $this->f3->get('eml_template_coach_reg_line1');\r\n $message .= $this->f3->get('eml_template_coach_reg_line2').$name.'<br>';\r\n $message .= $this->f3->get('eml_template_coach_reg_line3').$surname.'<br>';\r\n $message .= $this->f3->get('eml_template_coach_reg_line4').$coach_referral.'<br>';\r\n $message .= $this->f3->get('eml_template_coach_reg_line5').$password.'<br><br>';\r\n $message .= $this->f3->get('eml_template_coach_reg_line6').'<br>';\r\n */\r\n } elseif ($type == \"coach_recover\") {\r\n $mail->Subject = $this->f3->get('eml_template_coach_recover_subject');\r\n $message = $this->f3->get('eml_template_coach_rec_line1').$surname.' '.$name.',<br><br>';;\r\n $message .= $this->f3->get('eml_template_coach_rec_line2');\r\n $message .= $this->f3->get('eml_template_coach_rec_line3').$password.'<br><br>';\r\n $message .= $this->f3->get('eml_template_coach_rec_line4');\r\n $message .= $this->f3->get('eml_template_coach_rec_line5');\r\n } elseif ($type == \"admin_recover\") {\r\n $mail->Subject = $this->f3->get('eml_template_admin_recover_subject');\r\n $message = $this->f3->get('eml_template_admin_rec_line1').$surname.' '.$name.',<br><br>';;\r\n $message .= $this->f3->get('eml_template_admin_rec_line2');\r\n $message .= $this->f3->get('eml_template_admin_rec_line3').$password.'<br><br>';\r\n $message .= $this->f3->get('eml_template_admin_rec_line4');\r\n $message .= $this->f3->get('eml_template_admin_rec_line5');\r\n } elseif ($type == \"user_register\") {\r\n $mail->Subject = $this->f3->get('eml_template_user_register_subject');\r\n $message = file_get_contents('css/email_templates/user_register.html');\r\n $message = str_replace('%WAIT_RANK%', $rank, $message);\r\n $message = str_replace('%URL_REFERRAL%', 'http://prelaunch.hoopdrillz.com/'.$referral, $message);\r\n }\r\n\r\n\r\n $mail->SMTPDebug = $this->f3->get('smtpdebug');\r\n $mail->isSMTP();\r\n $mail->Debugoutput = 'html';\r\n $mail->Host = $this->f3->get('smtpsrv');\r\n $mail->SMTPAuth = true;\r\n $mail->Username = $this->f3->get('smtpuser');\r\n $mail->Password = $this->f3->get('smtppass');\r\n $mail->SMTPSecure = $this->f3->get('smtpsecure');\r\n $mail->Port = $this->f3->get('smtpport');\r\n $mail->setFrom($this->f3->get('smtpfrom'), $this->f3->get('smtpfromname'));\r\n $mail->addAddress($email, $surname.', '.$name);\r\n $mail->isHTML(true);\r\n\r\n $mail->Body = $message;\r\n $mail->AltBody = $message;\r\n\r\n if(!$mail->send()) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n\r\n }", "title": "" }, { "docid": "1a4cd980b40402e54135617727e4c041", "score": "0.58839035", "text": "public static function sendEmailsTest($paramenters)\r\n {\r\n $campaign = EmailCampaign::builder()->where('id_044', $paramenters['id'])->first();\r\n $testGroup = Preference::getValue('emailServiceTestGroup', 5);\r\n $contacts = Contact::getRecords(['group_id_042' => (int)$testGroup->value_018, 'groupBy' => 'id_041']);\r\n\r\n if(count($contacts) > 0)\r\n {\r\n foreach ($contacts as $contact)\r\n {\r\n if($contact->email_041 != null)\r\n {\r\n $dataEmail = [\r\n 'replyTo' => empty($campaign->reply_to_013)? null : $campaign->reply_to_013,\r\n 'email' => $contact->email_041,\r\n 'html' => $campaign->header_044 . $campaign->body_044 . $campaign->footer_044,\r\n 'text' => $campaign->text_044,\r\n 'subject' => $campaign->subject_044,\r\n 'contactKey' => Crypt::encrypt($contact->id_041),\r\n 'company' => isset($contact->company_041)? $contact->company_041 : '',\r\n 'name' => isset($contact->name_041)? $contact->name_041 : '',\r\n 'surname' => isset($contact->surname_041)? $contact->surname_041 : '',\r\n 'birthDate' => isset($contact->birth_date_041)? date(config('pulsar.datePattern'), $contact->birth_date_041) : '',\r\n 'campaign' => Crypt::encrypt($campaign->id_044),\r\n 'historyId' => '0' // data to set statics, set 0 to not count visit\r\n ];\r\n\r\n // config SMTP account\r\n config(['mail.host' => $campaign->outgoing_server_013]);\r\n config(['mail.port' => $campaign->outgoing_port_013]);\r\n config(['mail.from' => ['address' => $campaign->email_013, 'name' => $campaign->name_013]]);\r\n config(['mail.encryption' => $campaign->outgoing_secure_013 == 'null'? null : $campaign->outgoing_secure_013]);\r\n config(['mail.username' => $campaign->outgoing_user_013]);\r\n config(['mail.password' => Crypt::decrypt($campaign->outgoing_pass_013)]);\r\n\r\n EmailServices::sendEmail($dataEmail);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ec9bbc3004d139abd9e0e2f92abc4437", "score": "0.58816135", "text": "public function sendImmediateEmail();", "title": "" }, { "docid": "477726a44706f426e60c3d5e55ba108d", "score": "0.58479255", "text": "function sendNoticeAll(){\n \tglobal $mosConfig_mailfrom, $mosConfig_sitename, $mosConfig_live_site, $mosConfig_absolute_path, $mainframe;\n\t\t$database=$this->_db;\n\t\t$datesend = mosGetParam($_REQUEST, \"datesend\", 0);\n\t\t$start = mosGetParam($_REQUEST, \"start_date\", \"\");\n\n\t\t$filter = \" WHERE amount > 0 \";\n\t\tif($datesend==\"1\" && $start)\n\t\t\t$filter .= \" and last_pay < {$start} 00:00:00\";\n\n\n\t\t$database->setQuery(\"SELECT * FROM #__bid_balance LEFT JOIN #__users u ON auctioneer = u.id {$filter}\");\n\t\t$userList = $database->loadObjectList();\n\t\t$nr=0;\n\t\tforeach ($userList as $k => $user)\n\t\t{\n\t\t\t$email = $user->email;\n\t\t\t$info = $this->getAuctioneerInfo($user->auctioneer,$user->currency);\n\n\t\t\trequire_once( $mainframe->getPath( 'front_html',\"com_bids\" ) );\n\t\t\t$smarty = HTML_Auction::LoadSmarty();\n\t\t\t$smarty->assign(\"info\", $info);\n\t\t\t$html_mail = $smarty->fetch($smarty->template_dir.\"/t_plugin_mail.tpl\");\n\n\t\t\t$subj = \"Auction Payment Notification\";\n\t\t\t$first_delimiter = strpos($html_mail,\"##\");\n\t\t\tif($first_delimiter){\n\t\t\t\t$snd_delimiter = strpos($html_mail,\"##\",$first_delimiter+2);\n\t\t\t\tif($snd_delimiter) $subj = substr($html_mail, $first_delimiter+2, $snd_delimiter- $first_delimiter-2);\n\t\t\t}\n\n\t\t\t$start = strpos($html_mail,\"<html>\");\n\t\t\t$html_mail = substr($html_mail, $start);\n $nr++;\n\t\t\t$database->setQuery(\"UPDATE #__bid_balance SET sent_message = '1' WHERE auctioneer = '\".$user->auctioneer.\"' AND currency = '\".$user->currency.\"' \");\n\t\t\t$database->query();\n\t\t\tmosMail($mosConfig_mailfrom, $mosConfig_sitename , $email, $subj, $html_mail, true);\n\t\t}\n\n\t\t$msg = \"$nr Messages sent!\";\n\t\tmosRedirect(\"index2.php?option=com_bids&task=paymentitemsconfig&itemname=\".$this->itemname.\"&action=list\", $msg);\n }", "title": "" }, { "docid": "3cde899a4230b558c38e8412e06f4088", "score": "0.58399016", "text": "function Manual_Mailer($owner)\n{ \nini_set(\"smtp\", \"mail.peoriachristian.org\");\nini_set(\"smtp_port\", \"25\");\n$MailTo = $_REQUEST['MailTo'];\n$MailSubject = $_REQUEST['MailSubject'];\n$MailHeader = 'From: [email protected]';\n$SuccessMsg = 'Your request for information has been forwarded to the Service Department.';\n$FailureMsg = 'There has been a problem forwarding your request to the Service Department.\n\t\t\tPlease resend your message. We apologize for this \n\t\t\tinconvenience.';\n$IncompleteMsg = 'You left out some required data. <strong>Please click the Back button\n\t\t\ton your browser to return to the \n\t\t\tInformation Request Form.</strong> Then complete all required data and resubmit the form.\n\t\t\tIt seems you did not complete the following: ';\n\n$Data = 'Someone just posted a service request.'.\n\t\t'Here is what the requester submitted:'.\"\\r\\n\\r\\n\".\n\t\t'###############Start of Record##################'. \"\\r\\n\\r\\n\";\nfunction ListAll($aVal, $aKey, &$List)\n{\n\tglobal $Incomplete;\n\tif(($aVal == '') && (stristr($_POST['Required'],$aKey)))\n\t{\n\t\t$Incomplete = $Incomplete.$aKey.', ';\n\t}\n\t$List = $List.$aKey.' = '.$aVal.\"\\r\\n\";\n}//endfunction\n\n$Success = array_walk($_POST, 'ListAll', &$Data);\nif($Success)\n{\n\tif($Incomplete == '')\n\t{\n\t\t\n\t\techo \"$MailTo , $MailSubject , $Data , $MailHeader\";\n//\t\tif(mail($MailTo,$MailSubject,$Data,$MailHeader))\n//\t\t{\n//\t\t\techo \"<p>$SuccessMsg</p>\";\n//\t\t\techo $Incomplete;\n//\t\t}\n//\t\telse\n//\t\t{\n//\t\t\techo \"<p>$FailureMsg (mail failure)</p>\";\n//\t\t}//endif\n\t}\n\telse\n\t{\n\t\techo \"<p>$IncompleteMsg <br><br> $Incomplete</p>\";\n\t}//endif\n}\nelse\n{\t\n\techo \"<p>$FailureMsg (array_walk failure)</p>\";\n}//endif\n\n \n \n}", "title": "" }, { "docid": "35fbaf549c6f1f6456d26104145463f5", "score": "0.58229816", "text": "function sendMailer($email_to,\n $email_from,\n $email_reply,\n $email_name,\n $email_cc,\n $email_cc_name,\n $email_bcc,\n $email_bcc_name,\n $subject,\n $message,\n $is_test = false){\n global $DOPBSP;\n \n $php_mailer = new PHPMailer();\n \n $php_mailer->CharSet = 'utf-8';\n $php_mailer->isMail();\n \n /*\n * Add email address.\n */\n $php_mailer->addAddress($email_to);\n \n /*\n * Add Cc addresses.\n */\n $emails_cc = explode(',', $email_cc);\n $emails_cc_name = explode(',', $email_cc_name);\n \n for ($i=0; $i<count($emails_cc); $i++){\n $php_mailer->addCC($emails_cc[$i], isset($emails_cc_name[$i]) ? $emails_cc_name[$i]:'');\n }\n \n /*\n * Add Bcc addresses.\n */\n $emails_bcc = explode(',', $email_bcc);\n $emails_bcc_name = explode(',', $email_bcc_name);\n \n for ($i=0; $i<count($emails_bcc); $i++){\n $php_mailer->addBCC($emails_bcc[$i], isset($emails_bcc_name[$i]) ? $emails_bcc_name[$i]:'');\n }\n \n $php_mailer->From = $email_from;\n $php_mailer->FromName = $email_name;\n $php_mailer->addReplyTo($email_reply);\n $php_mailer->isHTML(true);\n\n $php_mailer->Subject = $subject;\n $php_mailer->Body = $message;\n\n if (!$php_mailer->send()){\n if ($is_test){\n echo $DOPBSP->text('SETTINGS_NOTIFICATIONS_TEST_ERROR').'<br />';\n echo 'Mailer error: '.$php_mailer->ErrorInfo.'<br />';\n echo $php_mailer->ErrorInfo;\n die();\n }\n else{\n $this->sendWPMail($email_to,\n $email_from,\n $email_reply,\n $email_name,\n $email_cc,\n $email_cc_name,\n $email_bcc,\n $email_bcc_name,\n $subject,\n $message);\n }\n }\n else{\n if ($is_test){\n echo 'success';\n die();\n }\n }\n }", "title": "" }, { "docid": "ccd234dd4d7079bb5a36ba5cc6d8caee", "score": "0.581591", "text": "public function sendSecond()\n {\n $when = Carbon\\Carbon::now()->addMinutes(1);\n \\Mail::to($this->author->email)->later($when, new OrderShippedSecond($this));//->send(new OrderShipped($ordersAll));//$this\n // \\Mail::to(array_merge($this->getRecepients(), $this->getRequiredRecepients()))->later($when, new OrderShippedSecond($this));//no new OrderShippedSecond\n }", "title": "" }, { "docid": "537bcf2258d17bda1e33ac6b79c1d73a", "score": "0.57933587", "text": "public function cron_schedule_email()\n\t{\n\t\tset_time_limit(0);\n\t\t$this->loadModel('AdminClientMarketingEmailUser');\n\t\t$this->loadModel('AdminClientMarketingEmail');\n\t\t\n\t\t$this->AdminClientMarketingEmailUser->bindModel(array('belongsTo'=>array('User'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('id','email', 'first_name', 'last_name')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ImportedUser'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'className'=>'ImportedUser',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'foreignKey'=>'imported_user_id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('id','email', 'first_name', 'last_name')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),false);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->AdminClientMarketingEmail->bindModel(array('hasMany'=>array('AdminClientMarketingEmailUser'=>array(\n\t\t\t\t\t\t\t'conditions'=>array('status != ' =>'sent')\n\t\t\t\t\t\t)\n\t\t\t\t\t\t)),false);\n\t\t\n\t\t\t\t\t\t\n\t\t$conditions = array('AdminClientMarketingEmail.schedule_date != '=>'','AdminClientMarketingEmail.type'=>'schedule','AdminClientMarketingEmail.schedule_date <= '=>date('Y-m-d'),'AdminClientMarketingEmail.schedule_time <= '.intval(date('h')), 'AdminClientMarketingEmail.schedule_time_type'=>date('A'));\n\t\t\n\t\t$email_schedules = $this->AdminClientMarketingEmail->find('all',array('conditions'=>$conditions,'recursive'=>2));\n\t\t\n\t\t\t\n\t\t//echo date('Y-m-d');\n\t\t//new DateTime (date('Y-m-d'))\n\t/*\t$log = $this->AdminClientMarketingEmail->getDataSource()->getLog(false, false);\n\t\tdebug($log);\n\t\tpr($conditions); pr($email_schedules); die;*/\n\t\tif(!empty($email_schedules))\n\t\t{\n\t\t\t\n\t\t\tforeach($email_schedules as $email_send)\n\t\t\t{\n\t\t\t\t$from_email = $email_send['AdminClientMarketingEmail']['from_email'];\n\t\t\t\t$from_name = $email_send['AdminClientMarketingEmail']['from_name'];\n\t\t\t\t$subject = $email_send['AdminClientMarketingEmail']['subject'];\n\t\t\t\tif(!empty($email_send['AdminClientMarketingEmailUser']))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tforeach($email_send['AdminClientMarketingEmailUser'] as $email_user)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$user_info = array();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($email_user['user_id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$user_info = $email_user['User'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$user_info = $email_user['ImportedUser'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$unique_code = String::uuid().'-'.time();\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$email = new CakeEmail('smtp'); \n\t\t\t\t\t\t\t$email->from(array($from_email=>$from_name));\n\t\t\t\t\t\t\tif(isset($email_send['AdminClientMarketingEmail']['reply_to']) && !empty($email_send['AdminClientMarketingEmail']['reply_to']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$email->replyTo($email_send['AdminClientMarketingEmail']['reply_to']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$email->to($email_user['user_email']);\n\t\t\t\t\t\t\t$email->subject($subject);\n\t\t\t\t\t\t\t$email->emailFormat('html');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$msg = $email_send['AdminClientMarketingEmail']['content'];\n\t\t\t\t\t\t\t$token = array('{user_first_name}','{user_last_name}' );\n\t\t\t\t\t\t\t$token_value = array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$user_info['first_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t$user_info['last_name'],\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif(isset($email_send['AdminClientMarketingEmail']['attachment']) && file_exists(EMAILATTACHMENT.$email_send['AdminClientMarketingEmail']['attachment']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$attachment = $email_send['AdminClientMarketingEmail']['attachment'];\n\t\t\t\t\t\t\t\t$attachment_new = APP.WEBROOT_DIR.DS.'files'.DS.'email_attachment'.DS.$attachment;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$path_parts = pathinfo($attachment_new);\n\t\t\t\t\t\t\t\t$email->attachments(array(\n\t\t\t\t\t\t\t\t\t$path_parts['basename'] => $attachment_new,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$msg = str_replace($token, $token_value, $msg);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$code_array = json_encode(array('unique_args' => array('code' => $unique_code)));\n\t\t\t\t\t\t\t$email->addHeaders(array('X-SMTPAPI' => $code_array));\n\t\t\t\t\t\t\tif ($email->send($msg)) {\n\t\t\t\t\t\t\t\t$status = 'sent';\n\t\t\t\t\t\t\t\t$error = '';\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$status = 'not sent';\n\t\t\t\t\t\t\t\t$error = $this->Email->smtpError;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$status='sent';\n\t\t\t\t\t\t\t$error='';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception $e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$status = 'not sent';\n\t\t\t\t\t\t\t$error = $e->getMessage();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$emailUserData['admin_client_marketing_email_id'] = $email_send['AdminClientMarketingEmail']['id'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($email_user['user_id']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$emailUserData['user_id'] = $email_user['User']['id'];\n\t\t\t\t\t\t\t$emailUserData['imported_user_id'] = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$emailUserData['user_id'] = '';\n\t\t\t\t\t\t\t$emailUserData['imported_user_id'] = $email_user['ImportedUser']['id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$emailUserData['user_email'] = $email_user['user_email'];\t\t\t\t\t\t\n\t\t\t\t\t\t$emailUserData['status'] = $status;\n\t\t\t\t\t\t$emailUserData['tracking_id'] = $unique_code;\n\t\t\t\t\t\t$emailUserData['track_status'] = $status;\n\t\t\t\t\t\t$emailUserData['error_text'] = $error;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->AdminClientMarketingEmailUser->create();\n\t\t\t\t\t\t$this->AdminClientMarketingEmailUser->save($emailUserData);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($email_send['AdminClientMarketingEmail']['is_repeat']!=1)\n\t\t\t\t{\n\t\t\t\t\t$this->AdminClientMarketingEmail->id = $email_send['AdminClientMarketingEmail']['id'];\n\t\t\t\t\t$this->AdminClientMarketingEmail->saveField('type','send');\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t$date = new DateTime($email_send['AdminClientMarketingEmail']['schedule_date']);\n\t\t\t\t\t$interval = new DateInterval('P1M');\n\n\t\t\t\t\t$date->add($interval);\n\n\t\t\t\t\t$this->AdminClientMarketingEmail->id = $email_send['AdminClientMarketingEmail']['id'];\n\t\t\t\t\t$this->AdminClientMarketingEmail->saveField('schedule_date', $date->format('Y-m-d'));\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\n\t\t}\n\t\texit();\n\t}", "title": "" }, { "docid": "f9dfbbb1cc83796de103bf3397f13649", "score": "0.5782485", "text": "function eshopbox_ac_send_email() { \n\t\t\t\t$cart_settings = json_decode(get_option('eshopbox_ac_settings'));\t\t\t\t\n\t\t\t\t$cart_abandon_cut_off_time_cron = ($cart_settings[0]->cart_time) * 60;\t\t\t\t\t\t\t\n\t\t\t\tglobal $wpdb, $eshopbox;\n\t\t\t\n\t\t\t\t//Grab the cart abandoned cut-off time from database.\n\t\t\t\t$cart_settings = json_decode(get_option('eshopbox_ac_settings'));\n\t\t\t\n\t\t\t\t$cart_abandon_cut_off_time = ($cart_settings[0]->cart_time) * 60;\n\t\t\t\n\t\t\t\t//Fetch all active templates present in the system\n\t\t\t\t$query = \"SELECT wpet . *\n\t\t\t\tFROM `\".$wpdb->prefix.\"ac_email_templates` AS wpet\n\t\t\t\tWHERE wpet.is_active = '1'\n\t\t\t\tORDER BY `day_or_hour` DESC, `frequency` ASC \";\n\t\t\t\t$results = $wpdb->get_results( $query );\n \n //$hour_seconds = 10; // 60 * 60\n //$day_seconds = 86400;\n\t\t\t\t$hour_seconds = 3600; // 60 * 60\n\t\t\t\t$day_seconds = 86400; // 24 * 60 * 60\n //$hour_seconds = 3;\n \n \n\t\t\t\tforeach ($results as $key => $value)\n\t\t\t\t{ \n\t\t\t\t\tif ($value->day_or_hour == 'Days')\n\t\t\t\t\t{\n\t\t\t\t\t\t$time_to_send_template_after = $value->frequency * $day_seconds;\n\t\t\t\t\t}\n\t\t\t\t\telseif ($value->day_or_hour == 'Hours')\n\t\t\t\t\t{\n\t\t\t\t\t\t$time_to_send_template_after = $value->frequency * $hour_seconds;\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t$carts = $this->get_carts($time_to_send_template_after, $cart_abandon_cut_off_time);\n\t\t\t\t\t$email_frequency = $value->frequency;\n\t\t\t\t\t\n\t\t\t\t\t$template_id = $value->id;\t\t\t\t\t\n\t\t\t\t\tforeach ($carts as $key => $value )\n\t\t\t\t\t{ \n\t\t\t\t\t\t$cart_info_db_field = json_decode($value->abandoned_cart_info);\n\t\t\t\t\t\tif (count($cart_info_db_field->cart) > 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$cart_update_time = $value->abandoned_cart_time;\n // echo \"new user\".$new_user.'@@'.$value->user_id.'@@'.$cart_update_time.'@@@'.$template_id.'@@@@'.$value->id;\n\t\t\t\t\t\t\t$new_user = $this->check_sent_history($value->user_id, $cart_update_time, $template_id, $value->id );\n if ( $new_user == true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cart_info_db = $value->abandoned_cart_info;\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t$query_sent = \"INSERT INTO `\".$wpdb->prefix.\"ac_sent_history` (template_id, abandoned_order_id, sent_time, sent_email_id)\n\t\t\t\t\t\t\t\tVALUES ('\".$template_id.\"', '\".$value->id.\"', '\".current_time('mysql').\"', '\".$value->user_email.\"' )\";\n\t\t\t\n\t\t\t\t\t\t\t\tmysql_query($query_sent);\n\t\t\t\n\t\t\t\t\t\t\t\t$query_id = \"SELECT * FROM `\".$wpdb->prefix.\"ac_sent_history` WHERE template_id='\".$template_id.\"' AND abandoned_order_id='\".$value->id.\"'\n\t\t\t\t\t\t\t\tORDER BY id DESC\n\t\t\t\t\t\t\t\tLIMIT 1 \";\n\t\t\t\n\t\t\t\t\t\t\t\t$results_sent = $wpdb->get_results( $query_id );\n\t\t\t\n\t\t\t\t\t\t\t\t$email_sent_id = $results_sent[0]->id;\n\t\t\t\t\t\t\t\t$user_id=$value->user_id;\n\t\t\t\t\t\t\t\t$user_email = $value->user_email;\n\t\t\t\n\t\t\t\t\t\t\t\t//echo $email_body.\"<hr>\";\n $_SESSION['abondoned_cart']='true';\n $_SESSION['userid']=$user_id;\n\n // $_SESSION['username']=$user_name;\n //update_user_meta($currentid, '_eshopbox_persistent_cart_old', $new_persistent_cart);\n \n //wp_mail( '[email protected]','lubu test','hi lubu', $headers );\n \n\t\t\t\t\t\t\t\t$email=new WC_Emails();\n //wp_mail( $user_email, $email_subject, $email_body, $headers );\n\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "47fb1647784c0c2d5000107555f686fc", "score": "0.57583255", "text": "public function SurveyInvitationEmailer() \r\n\t{\r\n\t\tlist ($emailCountSuccess, $emailCountFail) = SurveyScheduler::emailInvitations();\r\n\t\t// Set email-sending success/fail count message\r\n\t\tif ($emailCountSuccess + $emailCountFail > 0) {\r\n\t\t\t$GLOBALS['redcapCronJobReturnMsg'] = \"$emailCountSuccess survey invitations sent successfully, \" .\r\n\t\t\t\t\t\t\t\t\t\t\t\t \"\\n$emailCountFail survey invitations failed to send\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b90bd0152c5c880f2d6aa50617a1c0c8", "score": "0.57111025", "text": "function withdrawjoblisting_mail($username, $jobdetails,$applicantlist)\n {\n //Applicantlist contains all emails of users that applied at that job\n\n date_default_timezone_set('Asia/Singapore');\n $datetime = date('d/m/Y, h:i:sa');\n\n //Email for employer withdrawing\n $sender = $GLOBALS['sender'];\n $conn = $GLOBALS['conn'];\n $usertable = $GLOBALS['usertable'];\n $joblist = $GLOBALS['joblist'];\n\n $query = \"SELECT fullname,email FROM $usertable WHERE username='$username'\";\n $row = mysqli_fetch_assoc($conn->query($query));\n $email = $row['email'];\n $fullname = $row['fullname'];\n\n if ($email != $jobdetails['email'])\n {\n $email = $email.', '.$jobdetails['email'];\n }\n\n $to = $email;\n $subject = 'Job Listing Withdrawal';\n $message =\n \"Hi \".$fullname.\",\\r\\n\\r\\n\n You have withdrawn the following job listing:\\r\\n\n Company: \".$jobdetails['company'].\"\n Position: \".$jobdetails['position'].\"\n Withdrawal Date: \".$datetime.\" Asia/Singapore\\r\\n\\r\\n\n Thank you for using our service!\\r\\n\\r\\n\n Jobhunters Team\";\n $headers = 'From: ' .$sender. \"\\r\\n\" .\n 'Reply-To: '.$sender. \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n mail($to, $subject, $message, $headers,'-f'.$sender);\n\n //Email for all users that applied for the job\n if ($applicantlist->num_rows>0)\n {\n $email = '';\n while($row=mysqli_fetch_assoc($applicantlist))\n {\n $email .= $row['email'].\", \";\n }\n $email = substr($email, 0, -2);\n\n $to = $email;\n $subject = 'Job Listing Withdrawal';\n $message =\n \"Hi User,\\r\\n\\r\\n\n The following job listing have been withdrawn:\\r\\n\n Company: \".$jobdetails['company'].\"\\r\\n\n Position: \".$jobdetails['position'].\"\\r\\n\n Withdrawal Date: \".$datetime.\" Asia/Singapore\\r\\n\\r\\n\n Please take note that the position is no longer accepting applicants.\\r\\n\n Thank you for using our service!\\r\\n\\r\\n\n Jobhunters Team\";\n $headers = 'From: ' .$sender. \"\\r\\n\" .\n 'Reply-To: '.$sender. \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n mail($to, $subject, $message, $headers,'-f'.$sender);\n }\n }", "title": "" }, { "docid": "1978d531dceb13ec7ad0bcbbd1f5fa1a", "score": "0.5708049", "text": "function sendEmail($param, $param2){\n //true is real server false is via mailtrap\n if($param2){\n try {\n //Server settings live server\n $param->SMTPDebug = 0; // Enable verbose debug output\n $param->isSMTP(); // Set mailer to use SMTP\n $param->Host = 'mail.rabbitmacht.co.za'; // Specify main and backup SMTP servers\n $param->SMTPAuth = true; // Enable SMTP authentication\n $param->Username = '[email protected]';// SMTP username\n $param->Password = 'n.NhF3G1vgI='; // SMTP password\n $param->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted\n $param->Port = 465; // TCP port to connect to\n\n //Recipients\n $param->setFrom('[email protected]', 'lyndon');\n $param->addAddress($this->email, 'A guy from earth'); // Add a recipient\n $param->addReplyTo('[email protected]', 'Information');\n\n // Content\n $param->isHTML(true); // Set email format to HTML\n $param->Subject = 'Hotel Booking';\n $param->Body = \n \"Hi \".$this->firstname.\" \".$this->surname. \" <br> \n Please see details of your booking below <br>\n Hotel name: <b>\".$this->selectedHotel->name.\"</b> <br>\n From : \".$this->indate.\" to : \".$this->outdate. \"<br>\n The cost of the total stay is \". $this->totalCost . \"<br>\n Please deposit funds into the following account<br>\n Hotel Booking, Standard Bank, 5409098790, 1092, Cheque <br>\n Using reference Number \" .$this->refNumber.\"<br>\n Any further queries you have can be directed to <br>\n [email protected]<br>\n Thanks for your bussiness and we look forward to hearning back from you<br>\n <br>The Hotel Bookings Team\";\n $param->AltBody = 'This is the body in plain text for non-HTML mail clients';\n $param->send();\n echo 'Message has been sent';\n } catch (Exception $e) {\n echo \"Message could not be sent. Mailer Error: {$param->ErrorInfo}\";\n }\n }else{\n //\n try {\n //Server settings\n $param->SMTPDebug = 0; // Enable verbose debug output\n $param->isSMTP(); // Set mailer to use SMTP\n $param->Host = 'smtp.mailtrap.io'; // Specify main and backup SMTP servers\n $param->SMTPAuth = true; // Enable SMTP authentication\n $param->Username = '058c8c10955c23'; // SMTP username\n $param->Password = 'a66e65a4ae45ce'; // SMTP password\n $param->SMTPSecure = 'TLS'; // Enable TLS encryption, `ssl` also accepted\n $param->Port = 2525; // TCP port to connect to\n\n //Recipients\n $param->setFrom('[email protected]', 'lyndon');\n $param->addAddress('[email protected]', 'a good guy'); // Add a recipient\n $param->addReplyTo('[email protected]', 'Information');\n\n // Content\n $param->isHTML(true); // Set email format to HTML\n $param->Subject = 'Hotel Booking';\n $param->Body = \n \"Hi \".$this->firstname.\" \".$this->surname. \" <br> \n Please see details of your booking below <br>\n Hotel name: <b>\".$this->selectedHotel->name.\"</b> <br>\n From : \".$this->indate.\" to : \".$this->outdate. \"<br>\n The cost of the total stay is \". $this->totalCost . \"<br>\n Please deposit funds into the following account<br>\n Hotel Booking, Standard Bank, 5409098790, 1092, Cheque <br>\n Using reference Number \" .$this->refNumber.\"<br>\n Any further queries you have can be directed to <br>\n [email protected]<br>\n Thanks for your bussiness and we look forward to hearning back from you<br>\n <br>The Hotel Bookings Team\";\n $param->AltBody = 'This is the body in plain text for non-HTML mail clients';\n $param->send();\n echo 'Message has been sent';\n } catch (Exception $e) {\n echo \"Message could not be sent. Mailer Error: {$param->ErrorInfo}\";\n }\n }//end if my server or mailtrap\n }", "title": "" }, { "docid": "215a75d35bf0aea471db9796c8ad0f00", "score": "0.5703417", "text": "public function plusOneWeek($vars, $cronId) {\n\t\terror_reporting(E_ALL);\n\t\t$sPlugAboutCron = new Settings::$VIEWER_TYPE;\n\t\tSettings::setVar('inc_dir', Settings::getVar('ROOT') . 'include/'); # TODO: why removing the slash before 'include'?\n\t\t//print Settings::getVar('inc_dir').\"phpMailer/class.phpmailer.php\\n\\n\";\n\t\t//$f = new file(Settings::getVar('inc_dir').\"phpMailer/class.phpmailer.php\");\n\t\t//print \"\\n-->\".$f->IsWritable().\"<--\\n\"; \n\t\trequire(Settings::getVar('inc_dir') . \"phpMailer/class.phpmailer.php\");\n\n\t\t$mail = new PHPMailer();\n\t\t$sPlugAboutCron->AddData(\"base_url_http\", Settings::getVar('base_url_http'));\n\t\t$sPlugAboutCron->AddData(\"theme_dir\", Settings::getVar('theme_dir'));\n\t\t$sPlugAboutCron->AddData(\"theme_dir_http\", Settings::getVar('theme_dir_http'));\n\t\t$sPlugAboutCron->AddData(\"vars\", json_decode($vars, true));\n\t\t\n\t\t$vars = json_decode(stripslashes($vars), true);\n\t\t// get user Infos from the login\n\t\t$thisUser = self::getUserInfos($vars[\"login\"]);\n\n\t\tif ( !is_null($thisUser[\"email\"]) ) {\n\t\t\t//print_r($thisUser);\n\t\t\t$sPlugAboutCron->AddData(\"prenom\", $thisUser[\"prenom\"]);\n\t\t\t$sPlugAboutCron->AddData(\"nom\", $thisUser[\"nom\"]);\n\t\t\t$sPlugAboutCron->AddData(\"email\", $thisUser[\"email\"]);\n\t\t\t$sPlugAboutCron->AddData(\"login\", $thisUser[\"login\"]);\n\t\t\ti18n::setLocale($thisUser[\"lang\"]);\n\t\t\t$body = $sPlugAboutCron->fetch('plusOneWeek.tpl', 'plugins/users/mails/');\n\t\t\t\n\t\t\t$mail->From = Settings::getVar('From');\n\t\t\t$mail->FromName = Settings::getVar('FromName');\n\t\t\t$mail->Mailer = Settings::getVar('Mailer');\n\t\t\t$mail->Host = Settings::getVar('Host');\n\t\t\t$mail->Subject = i18n::_(\"Membre de Public-Storm depuis plus d'une semaine !\");\n\t\t\t$mail->AltBody = i18n::_(\"To view the message, please use an HTML compatible email viewer!\");\n\t\t\t$mail->CharSet = 'utf-8';\n\t\t\t$mail->MsgHTML($body);\n\t\t\t$mail->AddAddress($thisUser[\"email\"], $thisUser[\"prenom\"].\" \".$thisUser[\"nom\"]);\n\t\t\t//$mail->AddAddress(Settings::getVar('From'), $thisUser[\"prenom\"].\" \".$thisUser[\"nom\"]);\n\t\t\t\n\t\t\t//print $body.$thisUser[\"email\"]; exit;\n\t\t\ttry {\n\t\t\t\tif( DEV ) {\n\t\t\t\t\tprint i18n::L(\"DEV mode: on => no mail sent\").\"<br />\\n\";\n\t\t\t\t} elseif ( @$mail->Send() ) {\n\t\t\t\t\t//print $cronId.\"<----------\";\n\t\t\t\t\tprint i18n::L(\"Mail sent\").\"<br />\\n\";\n\t\t\t\t\taboutcron::removeAction($cronId);\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tprint i18n::L(\"Failed to send mail\").\"<br />\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\taboutcron::removeAction($cronId);\n\t\t\tprint i18n::L(\"Email was not found ; We had removed the cron from the list.\").\"<br />\\n\";\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9d070188ebf6aa646ecb581afc2e73d4", "score": "0.5701127", "text": "public function plusTwoWeeks($vars, $cronId) {\n\t\terror_reporting(E_ALL);\n\t\t$sPlugAboutCron = new Settings::$VIEWER_TYPE;\n\t\tSettings::setVar('inc_dir', Settings::getVar('ROOT') . 'include/'); # TODO: why removing the slash before 'include'?\n\t\t//print Settings::getVar('inc_dir').\"phpMailer/class.phpmailer.php\\n\\n\";\n\t\t//$f = new file(Settings::getVar('inc_dir').\"phpMailer/class.phpmailer.php\");\n\t\t//print \"\\n-->\".$f->IsWritable().\"<--\\n\"; \n\t\trequire(Settings::getVar('inc_dir') . \"phpMailer/class.phpmailer.php\");\n\n\t\t$mail = new PHPMailer();\n\t\t$sPlugAboutCron->AddData(\"base_url_http\", Settings::getVar('base_url_http'));\n\t\t$sPlugAboutCron->AddData(\"theme_dir\", Settings::getVar('theme_dir'));\n\t\t$sPlugAboutCron->AddData(\"theme_dir_http\", Settings::getVar('theme_dir_http'));\n\t\t$sPlugAboutCron->AddData(\"vars\", json_decode($vars, true));\n\t\t\n\t\t$vars = json_decode(stripslashes($vars), true);\n\t\t// get user Infos from the login\n\t\t$thisUser = self::getUserInfos($vars[\"login\"]);\n\n\t\tif ( !is_null($thisUser[\"email\"]) ) {\n\t\t\t//print_r($thisUser);\n\t\t\t$sPlugAboutCron->AddData(\"prenom\", $thisUser[\"prenom\"]);\n\t\t\t$sPlugAboutCron->AddData(\"nom\", $thisUser[\"nom\"]);\n\t\t\t$sPlugAboutCron->AddData(\"email\", $thisUser[\"email\"]);\n\t\t\t$sPlugAboutCron->AddData(\"login\", $thisUser[\"login\"]);\n\t\t\ti18n::setLocale($thisUser[\"lang\"]);\n\t\t\t$body = $sPlugAboutCron->fetch('plusTwoWeeks.tpl', 'plugins/users/mails/');\n\t\t\t\n\t\t\t$mail->From = Settings::getVar('From');\n\t\t\t$mail->FromName = Settings::getVar('FromName');\n\t\t\t$mail->Mailer = Settings::getVar('Mailer');\n\t\t\t$mail->Host = Settings::getVar('Host');\n\t\t\t$mail->Subject = i18n::_(\"Membre de Public-Storm depuis plus de 2 semaines !\");\n\t\t\t$mail->AltBody = i18n::_(\"To view the message, please use an HTML compatible email viewer!\");\n\t\t\t$mail->CharSet = 'utf-8';\n\t\t\t$mail->MsgHTML($body);\n\t\t\t$mail->AddAddress($thisUser[\"email\"], $thisUser[\"prenom\"].\" \".$thisUser[\"nom\"]);\n\t\t\t$mail->AddAddress(Settings::getVar('From'), $thisUser[\"prenom\"].\" \".$thisUser[\"nom\"]);\n\t\t\t//$mail->AddAddress(Settings::getVar('From'), $thisUser[\"prenom\"].\" \".$thisUser[\"nom\"]);\n\t\t\t\n\t\t\t//print $body.$thisUser[\"email\"]; exit;\n\t\t\ttry {\n\t\t\t\tif( DEV ) {\n\t\t\t\t\tprint i18n::L(\"DEV mode: on => no mail sent\").\"<br />\\n\";\n\t\t\t\t} elseif ( @$mail->Send() ) {\n\t\t\t\t\t//print $cronId.\"<----------\";\n\t\t\t\t\tprint i18n::L(\"Mail sent\").\"<br />\\n\";\n\t\t\t\t\taboutcron::removeAction($cronId);\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tprint i18n::L(\"Failed to send mail\").\"<br />\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\taboutcron::removeAction($cronId);\n\t\t\tprint i18n::L(\"Email was not found ; We had removed the cron from the list.\").\"<br />\\n\";\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1a33d7ddf80a47c88c057f2cb7e0a71a", "score": "0.5679704", "text": "function check_paid_records_mailservice() {\n $db = GetGlobal('db');\t\t\n\t $today = date('Y-m-d');\n\t $i = 0; \n\t $j = 0;\n\t $my_rengoto = 'http://lockmy.networlds.org/pricelist.php';\n\t $paysubject = '%0 expired';\n\t $paymessage = '%0 expired. Please renew to continue its functionality. %1';\n\t \n\t $sSQL2 = \"select appname,apptype,enable,apppass,timezone,expire,gracedays,tmzid,linkexpire,linkrenew,silence,insdate,paydate,,paydays,isfree,usemail,ownermail,ccmail,subject,message,altsubject,altmessage from applications where active=1\";// and enable=1\";\n\t //echo $sSQL2;\n\t $resultset = $db->Execute($sSQL2,2); \t \t \n\t \n\t if (!empty($resultset)) {\n\t \n\t foreach ($resultset as $i=>$rec) {\n\t \n\t $i+=1;\n\t \n\t\t $appname = $rec['appname'];\n\t\t $apptype = $rec['apptype'];\n\t\t $enable = $rec['enable']; \t\t \t\t \n\t\t $apppass = $rec['apppass'];\n\t\t $tz = $rec['timezone'];\n\t\t $expire = $$rec['expire'];\n\t\t $gracedays = $rec['gracedays'];\t\t\n\t\t $tmzid = $rec['tmzid'];\n\t\t $expgoto = $rec['linkexpire'];\n\t\t $rengoto = $rec['linkrenew'];\n\t\t $silence = $rec['silence'];\n\t\t $insdate = $rec['insdate'];\n\t\t $paydate = $rec['paydate'];\n\t\t $paydays = $rec['paydays'];\t\t \t\t \n\t\t $isfree = $rec['isfree'];\t\t \t\t \t\t \n\t\t $usemail = $rec['usemail'];\n\t\t $ownermail = $rec['ownermail'];\n\t\t $ccmail = $rec['ccmail'];\t\t \n\t\t $subject = $rec['subject'];\n\t\t $message = $rec['message'];\n\t\t $altsubject = $rec['altsubject'];\t\t \n\t\t $altmessage = $rec['altmessage'];\t \t \n\t \n if (!$isfree) {\t \t\n $tmz = isset($tmzid) ? $tmzid : $this->tmz_id;\t \n\t $tmz_today = $this->make_gmt_date(null,$tmz); \n\t\n\t if ($paydate)\n $expres = $this->date_diff($tmz_today,$paydate) + $this->freedays + $paydays;\n\t elseif ($insdate) \t \n\t $expres = $this->date_diff($tmz_today,$insdate) + $this->freedays + $paydays;\n\t //else\n\t //return ;\t \n\t\t\t \n\t if ($expres<=0) {\n\t\t \n\t\t $j+=1; \n\t \n\t\t $tokens = array(0=>$appname,1=>$my_rengoto);\t \n\t \n\t if (($this->gracedays) && ($this->gracedays>abs($expres))) {\n\t\t //into grace period..days left\n\t\t $status = ($this->gracedays - abs($expres)) * 1;//plus 1... when 1-1=0\n \t\t\t\t $tokens[] = $status;\t\t\t\t \n ////////////////////////////////////////////////// send grace mail\n\t\t\t\t $this->notify_mail($tokens,$apptype,null,$paysubject,$paymessage);\t\n\t\t }\n\t /*elseif (($gracedays) && ($gracedays==abs($expres))) {\n\t\t\t //into grace period..days left,,zero problem\n\t\t\t $status = 1;\n \t\t\t\t $tokens[] = '0';//days... //$status;\t\t\t\t \n ////////////////////////////////////////////////// send grace mail\n\t\t\t\t $this->notify_mail($tokens,$apptype,null,$paysubject,$paymessage);\t\t\t\t \t\t\t\t \t\t\t\t\t \n\t\t }*/\t\t \n\t\t else {\n\t\t\t //out of grace period or no grace period\n \t\t $status = -1;\t\t\t\t \n\t\t\t\t ////////////////////////////////////////////////// send expired mail\n\t\t\t\t $this->notify_mail($tokens,$apptype,null,$paysubject,$paymessage);\t\t\t\t\t \n\t\t } \n\t\t }//free\n }//expres\n\t }//foreach\n\t }//empty\n\t $ret = $i . ' record(s) readed. '. $j .' records(s) to be paid.';\n\t return ($ret);\n }", "title": "" }, { "docid": "c25489721b22d32b4bb460d44c73e57e", "score": "0.5653831", "text": "function mail_task_prospect($recid=''){\n\n\t\t$this->session_check_admin();\n\n\t\t\t\n\n\t\tApp::import(\"Model\", \"SystemVersion\");\n\n\t\t$this->SystemVersion = & new SystemVersion();\n\n\t\t\t\n\n\t\t$projectid = $this->Session->read(\"sessionprojectid\");\n\n\t\tif(empty($projectid)){\n\n\t\t\t$projectid='0';\n\n\t\t}\n\n\t\t$projectDetails=$this->getprojectdetails($projectid);\n\n\t\t\t\n\n\t\tif($recid!=''){\n\n\t\t\t$this->CommunicationTask->id = $recid;\n\n\t\t\t$this->set('taskrecid', $recid);\n\n\t\t\t$this->data = $this->CommunicationTask->read();\n\n\t\t\t$this->data['CommunicationTask']['task_startdate']=date(\"m-d-Y\", strtotime($this->data['CommunicationTask']['task_startdate']));\n\n\t\t\t\t\n\n\t\t\tif($this->data['CommunicationTask']['task_end_by_date']!=\"\" && $this->data['CommunicationTask']['task_end']==\"by_date\"){\n\n\t\t\t\t$this->data['CommunicationTask']['task_end_by_date']=date(\"m-d-Y\", strtotime($this->data['CommunicationTask']['task_end_by_date']));\n\n\t\t\t}\n\n\n\n\t\t\tif($this->data['CommunicationTask']['company_type']==\"\" && $this->data['CommunicationTask']['contact_type']==\"\"){\n\n\t\t\t\t$is_contactdisabled=\"1\";\n\n\t\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t}else{\n\n\t\t\t\t$is_contactdisabled=\"0\";\n\n\t\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t}\n\n\t\t\t$sel_email_temp=$this->data['CommunicationTask']['email_template_id'];\n\n\t\t\t$sel_subscription_types=$this->data['CommunicationTask']['subscription_type'];\n\n\t\t\t$sel_member_types=$this->data['CommunicationTask']['member_type'];\n\n\t\t\t$sel_donation_levels=$this->data['CommunicationTask']['donation_level'];\n\n\t\t\t$sel_days_since=$this->data['CommunicationTask']['member_days_since'];\n\n\t\t\t$sel_country=$this->data['CommunicationTask']['member_country'];\n\n\t\t\t$sel_state=$this->data['CommunicationTask']['member_state'];\n\n\t\t\t$sel_event=$this->data['CommunicationTask']['event_id'];\n\n\t\t\t$sel_event_rsvp=$this->data['CommunicationTask']['event_rsvp_type'];\n\n\t\t\t$sel_comment_typeid=$this->data['CommunicationTask']['relatesto_commenttype_id'];\n\n\t\t\t$sel_social_networks=$this->data['CommunicationTask']['social_network_members'];\n\n\t\t\t$sel_non_networks=$this->data['CommunicationTask']['non_network_members'];\n\n\t\t\t$sel_companytypeid=$this->data['CommunicationTask']['company_type'];\n\n\t\t\t$sel_contactypeid=$this->data['CommunicationTask']['contact_type'];\n\n\t\t\t$sel_recur_pattern=$this->data['CommunicationTask']['recur_pattern'];\n\n\t\t\t$selectedtemplatetype = $this->data['CommunicationTask']['email_template_type'];\n\n\t\t\t$sel_category = $this->data['CommunicationTask']['category_id'];\n\n\t\t\t$sel_sub_category = $this->data['CommunicationTask']['sub_category_id'];\n\n\t\t\t$sel_nonprofittype = $this->data['CommunicationTask']['non_profit_type_id'];\n\n\t\t\t$sel_offer = $this->data['CommunicationTask']['offer_id'];\n\n\t\t\t$email_from = $this->data['CommunicationTask']['email_from'];\n\n\t\t\t\t\n\n\t\t}else{\n\n\t\t\t$sel_email_temp=\"\";\n\n\t\t\t$sel_subscription_types=\"0\";\n\n\t\t\t$sel_member_types=\"\";\n\n\t\t\t$sel_donation_levels=\"\";\n\n\t\t\t$sel_days_since=\"\";\n\n\t\t\t$sel_country=\"254\";\n\n\t\t\t$sel_state=\"\";\n\n\t\t\t$sel_event=\"\";\n\n\t\t\t$sel_event_rsvp=\"\";\n\n\t\t\t$sel_comment_typeid=\"0\";\n\n\t\t\t$sel_social_networks=\"\";\n\n\t\t\t$sel_non_networks=\"\";\n\n\t\t\t$sel_companytypeid=\"\";\n\n\t\t\t$sel_contactypeid=\"\";\n\n\t\t\t$sel_recur_pattern=\"--Select--\";\n\n\t\t\t$is_contactdisabled=\"0\";\n\n\t\t\t$is_memebrdisabled=\"0\";\n\n\t\t\t$selectedtemplatetype = '0';\n\n\t\t\t$sel_category='';\n\n\t\t\t$sel_sub_category ='0';\n\n\t\t\t$sel_nonprofittype ='';\n\n\t\t\t$sel_offer ='';\n\n\t\t\t$email_from ='';\n\n\t\t\t$sdate = '';\n\n\t\t}\n\n\t\t$this->set('sel_email_temp',$sel_email_temp);\n\n\t\t$this->set('email_from',$email_from);\n\n\t\t$this->set('sel_subscription_types',$sel_subscription_types);\n\n\t\t$this->set('sel_member_types',$sel_member_types);\n\n\t\t$this->set('sel_donation_levels',$sel_donation_levels);\n\n\t\t$this->set('sel_days_since',$sel_days_since);\n\n\t\t$this->set('sel_country',$sel_country);\n\n\t\t$this->set('sel_state',$sel_state);\n\n\t\t$this->set('sel_event',$sel_event);\n\n\t\t$this->set('sel_event_rsvp',$sel_event_rsvp);\n\n\t\t$this->set('sel_comment_typeid',$sel_comment_typeid);\n\n\t\t$this->set('sel_social_networks',$sel_social_networks);\n\n\t\t$this->set('sel_non_networks',$sel_non_networks);\n\n\t\t$this->set('sel_companytypeid',$sel_companytypeid);\n\n\t\t$this->set('sel_contactypeid',$sel_contactypeid);\n\n\t\t$this->set('sel_recur_pattern',$sel_recur_pattern);\n\n\t\t$this->set('is_contactdisabled',$is_contactdisabled);\n\n\t\t$this->set('is_memebrdisabled',$is_memebrdisabled);\n\n\t\t$this->set('sel_category',$sel_category);\n\n\t\t$this->set('sel_sub_category',$sel_sub_category);\n\n\t\t$this->set('sel_nonprofittype', $sel_nonprofittype);\n\n\t\t$this->set('sel_offer',$sel_offer);\n\n\t\t$this->set('sdate',$sdate);\n\n\t\t$this->set('selectedtemplatetype',$selectedtemplatetype);\n\n\t\t# set help condition\n\n\t\t// Set memeber types array\n\n\t\t$this->set('member_types',$this->getMemberTypes());\n\n\t\t//Set donation levles array\n\n\t\t$this->set('donation_levels',$this->getDonationLevelsListByProject($projectid));\n\n\t\t// Set Subscription Type array\n\n\t\t$this->set('subscription_types',$this->getSubscriptionTypesArray());\n\n\t\t// Set Dasy Since array\n\n\t\t$this->set('days_since',$this->getDaysSinceArray());\n\n\t\t// Set Event RSVP array\n\n\t\t$this->set('event_rsvp',$this->getEventRSVPArray());\n\n\t\t//Set Social Naetworks Array\n\n\t\t$this->set('social_networks',$this->getSocialNetworkArray());\n\n\t\t//Set Recur Pattern Array\n\n\t\t$this->set('recur_pattern',$this->getRecurPatternkArray());\n\n\t\t//Get Event Drop Down\n\n\t\t$this->getEventDropDownListByProjetcID($projectid);\n\n\t\t//Get Company Type Drop Down\n\n\t\t$this->companytypedropdown($projectid);\n\n\t\t//Get Company Type Drop Down\n\n\t\t// $contacttypedropdown =$this->contacttypedropdown($projectid);\n\n\t\t//$this->set('contacttypedropdown',$contacttypedropdown);\n\n\t\t##country drop down\n\n\t\t$this->countrydroupdown();\n\n\t\t$this->statedroupdown();\n\n\t\t$this->set(\"templatetypedropdown\",array(0=>'Member',1=>'Player',2=>'Prospects',3=>'Offers'));\n\n\t\t$this->set('categorydropdown',$this->getCategoryDropdown());\n\n\t\t$this->set('subcategorydropdown',$this->getSubCategoryDropdown($sel_category));\n\n\t\t$this->nonprofittypedropdown();\n\n\t\t$this->offertypetempdropdown();\n\n\t\t$this->customtemplatelisting();\n\n\t\t$companytypestatusdropdown = $this->getCompanyTypeStatusDropdown();\n\n\n\n\t\t$this->set(\"companytypestatusdropdown\", $companytypestatusdropdown);\n\n\t\t//$this->set(\"selectedcompanytypestatus\", '');\n\n\t\t$this->contacttypedropdown(0);\n\n\t}", "title": "" }, { "docid": "a00af1af4cebc5b5acc7645353d4c1db", "score": "0.5651008", "text": "function sendmail()\n {\n\n // Initialize vairables\n $formMarkers = array();\n $this->load_static_markers($formMarkers);\n\n // Handle file uploads\n $files = $this->get_files();\n foreach ($files as $k => $v) {\n // Assign typo3temp file name to file array\n if ((bool)$files[$k]['t3_tmp_name'] = GeneralUtility::upload_to_tempfile($v['tmp_name'])) {\n $formMarkers['###' . strtoupper($k) . '_VAL###'] = $v['name'];\n }\n }\n\n // Set markers from form\n foreach ($this->piVars as $k => $v) {\n if (is_array($v)) {\n while (list ($m, $n) = each($v)) {\n if (is_array($n)) {\n $formMarkers['###' . strtoupper($m) . '_VAL###'] = implode(', ', $n);\n } else {\n $formMarkers['###' . strtoupper($m) . '_VAL###'] = ($k == 'textarea') ? $n : $n;\n }\n }\n }\n }\n\n // Get recipient option value marker\n if ($this->localconf['typeofRecipient'] == 1) {\n $lines = explode(\"\\n\", $this->localconf['dynamicRecipient']);\n $tmp = explode(';', $lines[($this->piVars['select']['multi_recipient'] - 1)]);\n $tmp = array(trim($tmp[0]));\n $formMarkers['###MULTI_RECIPIENT_OPTVAL_VAL###'] = implode(', ', $tmp);\n }\n\n // Handle 'Store Values'\n $queries = array();\n // Get Default Values config\n $SVConfig = $this->parse_config($this->localconf['storeValues']);\n foreach ($SVConfig as $svc) {\n switch ($svc['method']) {\n case 'db':\n $subparts = $this->trim_explode(':', $svc['pparm'], false, 3);\n $this->array_append($this->trim_explode(',', $subparts[1]),\n $queries[$svc['proc']][$subparts[0]][$subparts[2]]['fields']);\n $this->array_append($this->trim_explode(',', $svc['fields']),\n $queries[$svc['proc']][$subparts[0]][$subparts[2]]['markers']);\n break;\n default:\n }\n }\n // Store values to database\n $sql = $this->execQueries($queries, $formMarkers);\n\n // Get recipient\n if ($this->localconf['typeofRecipient'] == 1) {\n $lines = explode(\"\\n\", $this->localconf['dynamicRecipient']);\n $To = explode(';', $lines[($this->piVars['select']['multi_recipient'] - 1)]);\n $To = array(trim($To[1]));\n } else {\n $To = $this->trim_explode(\"\\n\", $this->localconf['staticRecipient'], true);\n }\n\n // Get subject\n $this->localconf['userSubjectPrefix'] = $this->cObj->substituteMarkerArray($this->localconf['userSubjectPrefix'],\n $formMarkers);\n $this->localconf['staticSubject'] = $this->cObj->substituteMarkerArray($this->localconf['staticSubject'], $formMarkers);\n $Subject = ($this->localconf['overrideSubject'] == 1) ? trim($this->localconf['userSubjectPrefix'] . ' ' . $this->piVars['text']['subject']) : $this->localconf['staticSubject'];\n\n // Get From headers\n if ($this->localconf['overrideFromHeader'] == 1) {\n if (!empty($this->piVars['text']['surname'])) {\n $FromName = $this->localconf['overrideNameFormat'] == 0 ? $this->piVars['text']['name'] . ' ' . $this->piVars['text']['surname'] : $this->piVars['text']['surname'] . ', ' . $this->piVars['text']['name'];\n } else {\n $FromName = $this->piVars['text']['name'];\n }\n $FromMail = $this->piVars['text']['email'];\n } else {\n $FromName = $this->localconf['fromName'];\n $FromMail = $this->localconf['fromMail'];\n }\n\n // Get Reply-To headers\n if ($this->localconf['overrideReplyToHeader'] == 1) {\n if (!empty($this->piVars['text']['surname'])) {\n $ReplyToName = $this->localconf['overrideNameFormat'] == 0 ? $this->piVars['text']['name'] . ' ' . $this->piVars['text']['surname'] : $this->piVars['text']['surname'] . ', ' . $this->piVars['text']['name'];\n } else {\n $ReplyToName = $this->piVars['text']['name'];\n }\n $ReplyToMail = $this->piVars['text']['email'];\n } else {\n $ReplyToName = $this->localconf['replyToName'];\n $ReplyToMail = $this->localconf['replyToMail'];\n }\n\n // Get Cc header email addresses\n $Cc = $this->trim_explode(\"\\n\", $this->localconf['Cc'], true);\n\n // Get Bcc header email addresses\n $Bcc = $this->trim_explode(\"\\n\", $this->localconf['Bcc'], true);\n\n // Get Content-Transfer-Encoding header\n switch ($this->localconf['contentTransferEncoding']) {\n case 0:\n $ContentTransferEncoding = '8bit';\n break;\n case 1:\n $ContentTransferEncoding = '7bit';\n break;\n case 2:\n $ContentTransferEncoding = 'base64';\n break;\n case 3:\n $ContentTransferEncoding = 'binary';\n break;\n case 4:\n $ContentTransferEncoding = 'quoted-printable';\n break;\n default:\n $ContentTransferEncoding = '8bit';\n break;\n }\n\n // Get Content-Type header\n switch ($this->localconf['contentType']) {\n case 0:\n $ContentType = 'text/plain';\n break;\n case 1:\n $ContentType = 'text/html';\n break;\n default:\n $ContentType = 'text/plain';\n break;\n }\n\n // Get Charset header\n $charset = (empty($this->localconf['charset'])) ? $GLOBALS['TSFE']->metaCharset : $this->localconf['charset'];\n\n // Compile message\n if ($this->localconf['contentType'] == 1) {\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL###\");\n $altBody = $this->cObj->substituteMarkerArray($subpart,\n ($this->localconf['testmode'] == 1 ? array_map('htmlspecialchars', $formMarkers) : $formMarkers));\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL_HTML###\");\n $body = $this->cObj->substituteMarkerArray($subpart,\n array_map(array('tx_pilmailform_pi1', 'format_HTML_mail'), $formMarkers));\n } else {\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL###\");\n $body = $this->cObj->substituteMarkerArray($subpart,\n ($this->localconf['testmode'] == 1 ? array_map('htmlspecialchars', $formMarkers) : $formMarkers));\n $altBody = null;\n }\n\n // Remove any left over markers\n $body = preg_replace(\"/###.*?###/\", '', $body);\n $altBody = preg_replace(\"/###.*?###/\", '', $altBody);\n\n // Init phpmailer class\n $mailer = new PHPMailer();\n\n // Set phpmailer config\n $mailer->SetLanguage('en',\n ExtensionManagementUtility::extPath('pil_mailform') . 'phpmailer/language/');\n switch ($this->localconf['useMailer']) {\n case 0:\n $mailer->Mailer = 'mail';\n break;\n case 1:\n $mailer->Mailer = 'sendmail';\n $mailer->Sendmail = empty($this->localconf['sendmailPath']) ? '/usr/sbin/sendmail' : $this->localconf['sendmailPath'];\n break;\n case 2:\n $mailer->Mailer = 'smtp';\n $mailer->Host = empty($this->localconf['smtpHost']) ? 'localhost' : $this->localconf['smtpHost'];\n $mailer->Port = empty($this->localconf['smtpPort']) ? '25' : $this->localconf['smtpPort'];\n if ($this->localconf['smtpAuth'] == 1) {\n $mailer->SMTPAuth = true;\n $mailer->Username = $this->localconf['smtpUser'];\n $mailer->Password = $this->localconf['smtpPasswd'];\n }\n break;\n case -1:\n $mailer->Mailer = false;\n break;\n default:\n $mailer->Mailer = 'mail';\n break;\n }\n $mailer->IsHTML(($this->localconf['contentType'] == 0) ? false : true);\n $mailer->Encoding = $ContentTransferEncoding;\n $mailer->ContentType = $ContentType;\n $mailer->CharSet = $charset;\n\n // Set \"To:\" header\n foreach ($To as $to) {\n $mailer->addAddress($to);\n }\n\n // Set \"From:\" header\n $mailer->From = $FromMail;\n $mailer->FromName = $FromName;\n\n // Set \"Reply-To:\" header\n $mailer->AddReplyTo($ReplyToMail, $ReplyToName);\n\n // Set \"Cc:\" header\n foreach ($Cc as $cc) {\n $mailer->addCC($cc);\n }\n\n // Set \"Bcc:\" header\n foreach ($Bcc as $bcc) {\n $mailer->addBCC($bcc);\n }\n\n // Set \"Subject:\" header\n $mailer->Subject = $Subject;\n\n // Set mail body\n $mailer->Body = $body;\n $mailer->AltBody = $altBody;\n\n // Set attachments from uploaded files\n foreach ($files as $v) {\n $mailer->AddAttachment($v['t3_tmp_name'], $v['name'], 'base64', $v['type']);\n }\n\n if ($this->localconf['testmode'] == 1) {\n\n if (!empty($mailer->AltBody)) {\n $mailer->ContentType = \"multipart/alternative\";\n }\n $mailer->error_count = 0; // reset errors\n $mailer->SetMessageType();\n $mailSrc = htmlspecialchars($mailer->CreateHeader());\n $mailSrc .= \"\\nSubject: \" . $Subject . \"\\n\" . $mailer->CreateBody();\n $mailSrc = $mailer->Mailer == 'disabled' ? '' : $mailSrc;\n\n $content = '\n\t\t\t\t<h2>TMailform is in testmode</h2><hr />\n\t\t\t\t<p style=\"font-weight: bold;\">Generated (valid) SQL queries if any:</p><pre>' . implode('<br />', $sql) . '</pre><hr />\n <p style=\"font-weight: bold;\">Mail headers and body if any:</p>\n\t\t\t\t<pre>' . $mailSrc . '</pre><hr />';\n\n // Send mail\n } elseif ($mailer->Mailer) {\n if ($mailer->Send()) {\n if (($this->localconf['copyToUser'] == 1) || ($this->localconf['copyToUser'] == 2 && !empty($this->piVars['checkbox']['user_copy']))) {\n // If user email is valid - Compile message\n if ($this->check_email($this->piVars['text']['email'])) {\n // Compile message\n if ($this->localconf['contentType'] == 1) {\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL_USERCOPY###\");\n $altBody = $this->cObj->substituteMarkerArray($subpart, $formMarkers);\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL_USERCOPY_HTML###\");\n $body = $this->cObj->substituteMarkerArray($subpart,\n array_map(array('tx_pilmailform_pi1', 'format_HTML_mail'), $formMarkers));\n } else {\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_MAIL_USERCOPY###\");\n $body = $this->cObj->substituteMarkerArray($subpart, $formMarkers);\n $altBody = null;\n }\n // Remove any left over markers\n $body = preg_replace(\"/###.*?###/\", '', $body);\n $altBody = preg_replace(\"/###.*?###/\", '', $altBody);\n // Set mailer options\n $mailer->clearAllRecipients();\n $mailer->addAddress($this->piVars['text']['email']);\n // Set header from recipient in user copy\n if ($this->localconf['discloseRecipient'] == 1) {\n $mailer->From = $To[0];\n $mailer->FromName = $To[0];\n $mailer->AddReplyTo($To[0], '');\n }\n $mailer->Subject = (empty($this->localconf['userCopySubject'])) ? $Subject : $this->cObj->substituteMarkerArray($this->localconf['userCopySubject'],\n $formMarkers);\n $mailer->Body = $body;\n $mailer->AltBody = $altBody;\n $mailer->ClearAttachments();\n $mailer->Send();\n }\n }\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_THANKS###\");\n $content = $this->cObj->substituteMarkerArray($subpart, $formMarkers);\n } else {\n $this->error_handler('Mail send error: ' . $mailer->ErrorInfo);\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_ERROR###\");\n $content = $this->cObj->substituteMarkerArray($subpart, $formMarkers);\n $content .= $mailer->ErrorInfo;\n }\n } else {\n $subpart = $this->cObj->getSubpart($this->template, \"###TMAIL_THANKS###\");\n $content = $this->cObj->substituteMarkerArray($subpart, $formMarkers);\n }\n // Clean up uploaded files\n foreach ($files as $v) {\n GeneralUtility::unlink_tempfile($v['t3_tmp_name']);\n }\n\n return $content;\n }", "title": "" }, { "docid": "8ac14380b877ff1cf9a17ffb6cb625d4", "score": "0.56488705", "text": "public static function cronMail()\n {\n // TODO : factoriser la config\n $configuration = require 'config/application.config.php';\n $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array();\n $sm = new \\Zend\\ServiceManager\\ServiceManager(new \\Zend\\Mvc\\Service\\ServiceManagerConfig($smConfig));\n $sm->setService('ApplicationConfig', $configuration);\n $sm->get('ModuleManager')->loadModules();\n $sm->get('Application')->bootstrap();\n\n $mailService = $sm->get('playgrounduser_message');\n $gameService = $sm->get('playgroundgame_quiz_service');\n $options = $sm->get('playgroundgame_module_options');\n\n $from = \"[email protected]\"; // $options->getEmailFromAddress();\n $subject = \"sujet game\"; // $options->getResetEmailSubjectLine();\n\n $to = \"[email protected]\";\n\n $game = $gameService->checkGame('qooqo');\n\n // On recherche les joueurs qui n'ont pas partagé leur qquiz après avoir joué\n // entry join user join game : distinct user et game et game_entry = 0 et updated_at <= jour-1 et > jour - 2\n // $contacts = getQuizUsersNotSharing();\n\n // foreach ($contacts as $contact) {\n // $message = $mailService->createTextMessage('[email protected]', '[email protected]', 'sujetcron', 'playground-user/email/forgot', array());\n $message = $mailService->createTextMessage($from, $to, $subject, 'playground-game/email/share_reminder', array(\n 'game' => $game\n ));\n\n $mailService->send($message);\n // }\n }", "title": "" }, { "docid": "911a045d9943a4e20cb0fe2d459248ea", "score": "0.564564", "text": "function send_mail_homework($user_id,$user_type,$createdate,$clssid)\n\t\t{\n\t\t $year_id=$this->getYear();\n\n\t\t $pcell=\"SELECT p.email FROM edu_parents AS p,edu_enrollment AS e WHERE e.class_id='$clssid' AND e.admit_year='$year_id' AND FIND_IN_SET( e.admission_id,p.admission_id) GROUP BY p.name\";\n\t\t $pcell1=$this->db->query($pcell);\n\t\t $pcel2=$pcell1->result();\n\t\t foreach($pcel2 as $res)\n\t\t { $pamail[]=$res->email;\n\t\t }\n\t\t $sms=\"SELECT h.title,h.hw_details,h.hw_type,h.test_date,s.subject_name FROM edu_homework AS h,edu_subject AS s WHERE h.class_id='$clssid' AND h.year_id='$year_id' AND DATE_FORMAT(h.created_at,'%Y-%m-%d')='$createdate' AND h.subject_id=s.subject_id\";\n\t\t $sms1=$this->db->query($sms);\n\t\t $sms2= $sms1->result();\n\t\t //return $sms2;\n\t\t foreach ($sms2 as $value)\n {\n $hwtitle=$value->title;\n\t\t $hwdetails=$value->hw_details;\n\t\t\t$subname=$value->subject_name;\n\t\t\t$ht=$value->hw_type;\n\t\t\t$tdat=$value->test_date;\n\n\t\t\tif($ht=='HW'){ $type=\"Home Work\" ; }else{ $type=\"Class Test\" ; }\n\n\t\t\t//$message=\"Title : \" .$hwtitle. \",Type : \" .$type. \", Details : \" .$hwdetails .\", Subject : \".$subname.\", \";\n\t\t\t$message= \" <br> Title : \" .$hwtitle. \" <br> Type : \" .$type. \" <br> Details : \" .$hwdetails .\" <br> Subject : \".$subname.\" <br> \";\n\t\t\t$home_work_details[]=$message;\n\t\t }\n\t\t\t//print_r($home_work_details);\n\t\t $hdetails=implode('',$home_work_details);\n\t\t\t $pmail_to=implode(',',$pamail);\n\t\t\t //echo $pmail_to;exit;\n\t\t\t\t\t $to = $pmail_to;\n\t\t\t\t\t $subject=\"HomeWork / ClassTest Details\";\n\t\t\t\t\t $cnotes=$hdetails;\n\t\t\t\t\t $htmlContent = '\n\t\t\t\t\t\t <html>\n\t\t\t\t\t\t <head><title></title>\n\t\t\t\t\t\t </head>\n\t\t\t\t\t\t <body>\n\t\t\t\t\t\t <p style=\"margin-left:50px;\">'.$cnotes.'</p>\n\t\t\t\t\t\t </body>\n\t\t\t\t\t\t </html>';\n\t\t\t\t $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t\t\t\t $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\t\t\t\t // Additional headers\n\n\t\t\t\t $headers .= 'From: Ensyfi<[email protected]>' . \"\\r\\n\";\n //$send= mail($to,$subject,$htmlContent,$headers);\n\t\t\t\t if(mail($to,$subject,$htmlContent,$headers))\n\t\t\t\t {\n $data= array(\"status\"=>\"success\");\n\t\t return $data;\n }\n\n\n\n\t}", "title": "" }, { "docid": "1f3b34c7afc2f32129fbc9cce7847c14", "score": "0.5640311", "text": "public function sendMailOrderPlaced();", "title": "" }, { "docid": "d5fe7f4760ef3106bc1cbebfce3063d0", "score": "0.56343585", "text": "function _reportMailNewTool($idWF) {\n\n \t$ticketnumber = 'VRE-'.rand(1000, 9999);\n\t$subject = 'New tool';\n\t\n\t$message = '\n\t\tTicket ID: '.$ticketnumber.'<br>\n\t\tUser name: '.$_SESSION[\"User\"][\"Name\"].' '.$_SESSION[\"User\"][\"Surname\"].'<br>\n\t\tUser email: '.$_SESSION[\"User\"][\"Email\"].'<br>\n\t\tRequest type: '.$subject.'<br>\n\t\tRequest subject: Creation of new workflow <strong>'.$idWF.'</strong><br>\n\t\tComments: '.$_REQUEST['comments'];\n\t\n\t$messageUser = '\n\t\tCopy of the message sent to our technical team:<br><br>\n\t\tTicket ID: '.$ticketnumber.'<br>\n\t\tUser name: '.$_SESSION[\"User\"][\"Name\"].' '.$_SESSION[\"User\"][\"Surname\"].'<br>\n\t\tUser email: '.$_SESSION[\"User\"][\"Email\"].'<br>\n\t\tRequest type: '.$subject.'<br>\n\t\tRequest subject: Creation of new workflow <strong>'.$idWF.'</strong><br>\n\t\tComments: '.$_REQUEST['comments'].'<br><br>\n\t\tVRE Technical Team';\n\t\n\tif(sendEmail($GLOBALS['ADMINMAIL'], \"[\".$ticketnumber.\"]: \".$subject, $message, $_SESSION[\"User\"][\"Email\"])) {\n\t\tsendEmail($_SESSION[\"User\"][\"Email\"], \"[\".$ticketnumber.\"]: \".$subject, $messageUser, $_SESSION[\"User\"][\"Email\"]);\n\t\n\t} else {\n\t\treturn false;\n\t} \n\n\treturn true;\n}", "title": "" }, { "docid": "1427d19e35c7d43ad3c8bf6c12279ebf", "score": "0.5626525", "text": "public function sendEmail(){\n die();\n ini_set('memory_limit', '-1');\n $this->viewBuilder()->setLayout(FALSE); \n\t$this->loadModel('Users');\n $this->loadModel('Organizations');\n $this->loadModel('OrganizationsNews');\n $this->loadModel('OrganizationsInvestors');\n $this->loadModel('OrganizationsFounders');\n $this->loadModel('PortfolioNews');\n $siteUrl = Configure::read('SITEURL').'/';\n $date = date('Y-m-d');\n $lastweekdate= date(\"Y-m-d\",strtotime(\"-1 week\"));\n $reviewCount=array();\n $day = date('l');\n $CronSettings = $this->CronSettings->find('list',['keyField' => 'id' ,'valueField' => 'service_type'])->where(['week_day'=> $day ])->hydrate(false)->toArray();\n //if(isset($CronSettings) && !empty($CronSettings) && $CronSettings[4]=='NewsEmail') {\n //Wednesday for Tiresisa Thursday for Jiyonce\n if($day=='Wednesday'){\n \n /*\n * get portolio news\n */\n \n \n $previous_week = strtotime(\"-1 week +2 day\");\n $start_week = strtotime(\"last monday midnight\",$previous_week);\n $end_week = strtotime(\"next sunday\",$start_week);\n $start_week = date(\"Y-m-d\",$start_week);\n $end_week = date(\"Y-m-d\",$end_week);\n $getOrganisations= $this->Organizations->find('all')->where(['source'=>'crunchbase','funding_type IN'=>['angel','seed'],'date(`created`) >=' => $start_week,'date(`created`) <=' => $end_week])->order('total_funding_usd DESC')->limit(7)->hydrate(false)->toarray(); \n $getOrganizationsList = $this->Organizations->find('all')->contain(['AllReviews'])->where(['source'=>'crunchbase','date(`created`) >=' => $start_week,'date(`created`) <=' => $end_week])->order(['id'=>'DESC'])->hydrate(false)->toArray();\n\t$getUser = $this->Users->find('all')->where(['role'=>0])->hydrate(false)->toArray();\n $getEmail =[];\n foreach($getUser as $userData){\n $getEmail[] = $userData['username'];\n } \n //$getEmail[]='[email protected]';\n //pr($getEmail);die;\n $user_id = $this->request->session()->read('Auth.Admin.id');\n $getDate = $this->Users->find()->where( [ 'id' => $user_id ] )->hydrate( false )->first();\n $dataformat = $getDate['date_format']; \n if($dataformat==3){\n $dateConvert = date('l d-m-Y');\n }\n else if($dataformat==2){\n $dateConvert = date('l Y-m-d');\n }\n else if($dataformat==1){\n $dateConvert = date('l m-d-Y');\n }\n else {\n $dateConvert = date('l d-m-Y');\n }\n \n $totalReviewCount=array();\n $totalReviewUp=array();\n $totalReviewDown=array();\n \n foreach($getOrganizationsList as $reviewList){\n if(!empty($reviewList['all_reviews'])){\n foreach($reviewList['all_reviews'] as $reviewList ) {\n //pr($reviewList);\n $totalReviewCount[]=$reviewList['review'];\n if($reviewList['review']==0){\n $totalReviewDown[]=$reviewList['review'];\n }\n if($reviewList['review']==1){\n $totalReviewUp[]=$reviewList['review'];\n }\n }\n \n } \n }\n \n $totalOrganisationNo =count($getOrganizationsList);\n $totalReviewNo =count($totalReviewCount);\n $totalReviewUpNo =count($totalReviewUp);\n $totalReviewDownNo =count($totalReviewDown);\n $emailTo=array('[email protected]');\n $mailData = [];\n $mailData['totalOrganisationNo'] = $totalOrganisationNo;\n $mailData['totalReviewNo'] = $totalReviewNo;\n $mailData['totalReviewUpNo'] = $totalReviewUpNo;\n $mailData['totalReviewDownNo'] = $totalReviewDownNo;\n $mailData['organizationlist'] = $getOrganisations;\n $mailData['getDate'] = $dateConvert;\n $mailData['siteUrlLogo'] =$siteUrl;\n $count=1;\n foreach($getOrganisations as $orgDetails){\n $orgInvestors = $this->OrganizationsInvestors->find('all')->where(['organization_id'=>$orgDetails['id']])->order(['number_of_investments'=>'desc'])->hydrate(false)->toArray();\n $investor=array();\n foreach($orgInvestors as $investors){\n $investor[]=$investors['name'];\n }\n //echo implode (\",\",$investor);\n $str1='';\n $str2='';\n $str3='';\n $getOrgNews = $this->OrganizationsNews->find('all')->where(['organization_id'=>$orgDetails['id']])->hydrate(false)->limit(1)->toArray();\n if($count==1){\n if(isset($getOrgNews) && !empty($getOrgNews)){\n $str1='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; border-bottom: 1px solid rgb(224, 224, 224); padding-bottom:30px;\">\n <h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$orgDetails[\"formal_company_name\"].' get total funding of $'.$this->nice_number($orgDetails[\"total_funding_usd\"]).' </h1>\n '.$getOrgNews[0][\"title\"].'\n <a target =\"_blank\" href=\"'.$getOrgNews[0]['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsData1']=$str1; \n }\n else {\n $mailData['newsData1']=\"\";\n }\n }\n if($count==2){\n if(isset($getOrgNews) && !empty($getOrgNews)){\n $str2='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; border-bottom: 1px solid rgb(224, 224, 224); padding-bottom:30px;\">\n <h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$orgDetails[\"formal_company_name\"].' get total funding of $'.$this->nice_number($orgDetails[\"total_funding_usd\"]).' </h1>\n '.$getOrgNews[0][\"title\"].'<a target =\"_blank\" href=\"'.$getOrgNews[0]['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsData2']=$str2; \n }\n else{\n $mailData['newsData2']='';\n }\n }\n if($count==3){\n if(isset($getOrgNews) && !empty($getOrgNews)){\n\n $str3='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; padding-bottom:20px;\"><h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$orgDetails[\"formal_company_name\"].' get total funding of $'.$this->nice_number($orgDetails[\"total_funding_usd\"]).' </h1>'.$getOrgNews[0][\"title\"].'<a target =\"_blank\" href=\"'.$getOrgNews[0]['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsData3']=$str3;\n }else{\n $mailData['newsData3']='';\n }\n }\n $count++;\n }\n //for port folio news\n $getOrgNews = $this->OrganizationsNews->find('all')->where(['type'=>'portfolio'])->group(['formal_company_name'])->limit(3)->hydrate(false)->toArray();\n $countPortfolio=1;\n $strPortfolio1='';\n $strPortfolio2='';\n $strPortfolio3='';\n $strPortfolio4='';\n \n foreach($getOrgNews as $portfolioNews){\n \n \n if($countPortfolio==1){\n \n $strPortfolio1='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; border-bottom: 1px solid rgb(224, 224, 224); padding-bottom:30px;\">\n <h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$portfolioNews[\"formal_company_name\"].' get total funding of $'.$this->nice_number($portfolioNews[\"total_funding_usd\"]).' </h1>\n '.$portfolioNews[\"title\"].'\n <a target =\"_blank\" href=\"'.$portfolioNews['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsDataPortfolio1']=$strPortfolio1; \n \n } \n if($countPortfolio==2){\n \n $strPortfolio2='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; border-bottom: 1px solid rgb(224, 224, 224); padding-bottom:30px;\">\n <h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$portfolioNews[\"formal_company_name\"].' get total funding of $'.$this->nice_number($portfolioNews[\"total_funding_usd\"]).' </h1>\n '.$portfolioNews[\"title\"].'\n <a target =\"_blank\" href=\"'.$portfolioNews['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsDataPortfolio2']=$strPortfolio2; \n \n \n }\n if($countPortfolio==3){\n \n $strPortfolio3='<tr><td valign=\"middle\" width=\"100%\" style=\"text-align: left; font-size: 14px; color: rgb(128, 128, 128); line-height: 22px; font-weight: 400; font-family: Helvetica,Arial,sans-serif; border-bottom: 1px solid rgb(224, 224, 224); padding-bottom:30px;\">\n <h1 height=\"35\" width=\"100%\" style=\"text-align: left; font-family: Helvetica,Arial,sans-serif,Open Sans; color: rgb(52, 75, 97); line-height: 32px; margin: 10px 0px 0px; padding: 0px; font-weight: normal; font-size: 20px;\">'.$portfolioNews[\"formal_company_name\"].' get total funding of $'.$this->nice_number($portfolioNews[\"total_funding_usd\"]).' </h1>\n '.$portfolioNews[\"title\"].'\n <a target =\"_blank\" href=\"'.$portfolioNews['url'].'\" style=\"font-size: 14px;text-decoration: none;font-family: Helvetica,Arial,sans-serif; display: block; border: 1px solid rgb(92, 144, 186); width: 100px; text-align: center; line-height: 29px; border-radius: 3px; margin-top:20px; color: rgb(92, 144, 186);\">Read more</a></td></tr><tr><td width=\"100%\" height=\"5\"></td></tr>';\n $mailData['newsDataPortfolio3']=$strPortfolio3; \n \n \n }\n $countPortfolio++;\n \n }\n \n \n $from_email = Configure::read('from_email');\n $project_name = Configure::read('project_name');\n $mailData['link'] = rand();\n $time_expire = strtotime(\"+15 minutes\",strtotime(date('Y-m-d H:i:s')));\n $token_expire = date('Y-m-d H:i:s',$time_expire);\n $this->set('mailData',$mailData);\n //echo $this->render('/Email/html/leademail'); \n //die;\n \n $email = new Email();\n $email = $email\n ->viewVars($mailData)\n ->template('leademail')\n ->emailFormat('html')->to($getEmail)\n ->subject('Social Start')\n ->from([$from_email => $project_name]);\n \n if($email->send()){\n echo \"mail send\";\n }else{\n echo \"mail not send\";\n \n }\n \n } \n \n die;\n \n \n }", "title": "" }, { "docid": "d1fa0495ef7aa01c344e4144c5efeac5", "score": "0.5614621", "text": "function email ($firstName, $lastName, $email, $phone, $dateTime, $drawblood, $code){\n $mail = new PHPMailer(true); // Passing `true` enables exceptions\ntry {\n //Server settings\n $mail->SMTPDebug = 0; // Enable verbose debug output\n $mail->isSMTP(); \n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n);// Set mailer to use SMTP\n $mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'Oiler123'; // SMTP password\n $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n $mail->Port = 587; // TCP port to connect to\n $mail->SMTPSecure = false;\n //Recipients\n $mail->setFrom('[email protected]', '[email protected]');\n $mail->addReplyTo('[email protected]', '');\n $mail->addAddress($email); // Add a recipient\n \n\n //Attachments\n $mail->addAttachment('attachment/AHAemailannouncement.pdf', 'AHAemailannouncement.pdf') ; // Add attachments\n $mail->isHTML(true); // Set email format to HTML\n $mail-> AddEmbeddedImage('images/OilerWellEmail.png', 'oilerWellLogo', 'OilerWellEmail.png');\n $mail->Subject = 'OilerWell Appointment Confirmation';\n $mail->Body = '<body> <img src=\" cid:oilerWellLogo\" alt=\"OilerWell Logo\" > '\n . '<table rules=\"all\" style=\"border-color: #666;\" cellpadding=\"10\"> '\n . '<tr style=\"background: #eee;\"><td><strong>Name:</strong> </td><td> '. $firstName . ' '. $lastName .' </td></tr> '\n . '<tr><td><strong>Email:</strong> </td><td> '. $email .' </td></tr> '\n . '<tr><td><strong>Phone:</strong> </td><td>' . $phone . '</td></tr>'\n . ' <tr><td><strong>Are you willing to have a PA student draw your blood?</strong> </td><td>' . $drawblood . '</td></tr> '\n . '<tr><td><strong>Appointment Time:</strong> </td><td>' . date_format(date_create($dateTime), 'm/d/Y \\a\\t H:i \\A\\M') . '</td></tr>'\n . ' <tr><td><strong>Confirmation code:</strong> </td><td>' . $code . '</td></tr> '\n . '</table> '\n . '<P><b>*Note:</b> You need to use the confirmation code to View/Change the appointment.</p> '\n . '</body>';\n $mail->AltBody = 'OilerWell Appointment';\n \n $mail->send();\n} \n catch (Exception $e) {\n echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;\n} \n \n}", "title": "" }, { "docid": "cc77f93d5f223781c3238411c8a7d370", "score": "0.55782074", "text": "public function sendnotifications($hash = \"\") {\r\n if ($hash == '9d3bb895f22bf0afa958d68c2a58ded7') {\r\n $mails = array();\r\n $expired_orders = $this->orders_model->get_expired_orders();\r\n if ($expired_orders) {\r\n foreach ($expired_orders as $order) {\r\n $couriers = $this->orders_model->get_biders($order->consignment_id);\r\n foreach ($couriers as $courier) {\r\n $mail = $this->load->view('templates/emailtemplate', array(\r\n 'to' => $courier->email,\r\n 'to_name' => $courier->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => array(\r\n 'title' => 'Order expired',\r\n 'name' => $courier->name,\r\n 'content' => array('Tender ' . $order->public_id . ' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n $owners = $this->orders_model->get_owner($order->consignment_id);\r\n foreach ($owners as $owner) {\r\n $mail = $this->load->view('templates/emailtemplate', array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => array(\r\n 'title' => 'Order expired',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender ' . $order->public_id . ' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n $expiring_orders = $this->orders_model->get_expiring_orders();\r\n if ($expiring_orders) {\r\n foreach ($expiring_orders as $order) {\r\n $owners = $this->orders_model->get_owner($order->consignment_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Order expire soon',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender ' . $order->public_id . ' will expire soon'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n\r\n $expired_tenders = $this->service_requests_model->get_expired_tenders();\r\n if ($expired_tenders) {\r\n foreach ($expired_tenders as $stender) {\r\n $couriers = $this->service_requests_model->get_biders($stender->req_id);\r\n foreach ($couriers as $courier) {\r\n $mail = array(\r\n 'to' => $courier->email,\r\n 'to_name' => $courier->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Service tender expired',\r\n 'name' => $courier->name,\r\n 'content' => array('Tender \\'' . $stender->name . '\\' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n $owners = $this->service_requests_model->get_owners($stender->req_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Service tender expired',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender \\'' . $stender->name . '\\' expired'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n\r\n\r\n $expiring_tenders = $this->service_requests_model->get_expiring_tenders();\r\n if ($expiring_tenders) {\r\n foreach ($expiring_tenders as $tender) {\r\n $owners = $this->service_requests_model->get_owners($tender->req_id);\r\n foreach ($owners as $owner) {\r\n $mail = array(\r\n 'to' => $owner->email,\r\n 'to_name' => $owner->name,\r\n 'subject' => '6connect email notification',\r\n 'message' => $this->load->view('templates/emailtemplate', array(\r\n 'title' => 'Tender expire soon',\r\n 'name' => $owner->name,\r\n 'content' => array('Tender \\'' . $tender->name . '\\' will expire soon'),\r\n 'link_title' => '',\r\n 'link' => ''), TRUE)\r\n );\r\n array_push($mails, $mail);\r\n }\r\n }\r\n }\r\n if ($mails) {\r\n foreach ($expired_orders as $order) {\r\n $this->orders_model->updateOrder(array('inform_expire' => 2), $order->consignment_id);\r\n }\r\n foreach ($expiring_orders as $order) {\r\n $this->orders_model->updateOrder(array('inform_expire' => 1), $order->consignment_id);\r\n }\r\n foreach ($expired_tenders as $tender) {\r\n $this->service_requests_model->updateExpireInfo(array('inform_expire' => 2), $tender->req_id);\r\n }\r\n foreach ($expiring_tenders as $order) {\r\n $this->service_requests_model->updateExpireInfo(array('inform_expire' => 1), $tender->req_id);\r\n }\r\n foreach ($mails as $m) {\r\n send_mail($m['to'], $m['to_name'], $m['subject'], $m['message']);\r\n }\r\n }\r\n } else {\r\n show_404();\r\n }\r\n }", "title": "" }, { "docid": "9ae2bd4c12dc8d58f6690f426b75f3bb", "score": "0.55748016", "text": "function objMailSend($toMail, $intencion, $asunto, $body)\n{\n //creando un obj de PHPMailer\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->CharSet = 'UTF-8';\n $mail->SMTPDebug = 1;\n //destinos\n /*\n * [email protected]\n * [email protected]\n * */\n $contacto = USER_MAIL;\n $pass_contacto = PW_COUNT;\n $para = $toMail; // PARA ENVIAR EL CORREO AL QUE SE ANUNCIA\n //PUede ser segun sea el caso empresa.com.mx\n $mail->Host = HOST_SERVER_MAIL; // mail. o solo dominio - Servidor de Salida. (recomiendo sin mail.)\n $mail->SMTPAuth = true;\n $mail->Username = $contacto; // Correo Electrónico para SMTP [email protected]\n $mail->Password = $pass_contacto; // Contraseña para SMTP\n\n\n //destino\n $mail->From = $contacto; // Correo Electronico para SMTP\n $mail->FromName = 'ProyecTracker | '.$intencion;\n $mail->AddAddress($para); // Dirección a la que llegaran los mensajes\n\n $mail->Port = PORT_SMTP;\n $mail->IsHTML(true);\n $mail->Subject = $asunto;\n $mail->Body = $body;\n return $mail->Send();\n\n $Envio = $mail ->Send();\n $Intentos = 1;\n\n while((!$Envio) && ($Intentos < 5)){\n sleep(5);\n $Envio = $mail ->Send();\n $Intentos += 1;\n }\n\n if($Envio == 'true'){\n $Salida = true;\n }\n else{\n $Salida = $mail->ErrorInfo;\n }\n\n return $Salida;\n}", "title": "" }, { "docid": "8d3291f878fe9e892ec5e721d7ed0136", "score": "0.55711484", "text": "abstract protected function _sendmail();", "title": "" }, { "docid": "7b3600f7a19f4d5d3a168baeb2adbab3", "score": "0.55658686", "text": "public function mail() {\r\n $data = new Userdata();\r\n $mail = new PHPMailer;\r\n //Variablen\r\n $bestellung = $data->getBestellung();\r\n $kundennummer = $data->getKundennummer();\r\n $vorname = $data->getVorname();\r\n $nachname = $data->getNachname();\r\n $empfänger = $data->getEmpfänger();\r\n //function um die Anrede Männlich/Weiblich zu definieren\r\n $geschlecht = $data->getGeschlecht();\r\n if ($geschlecht == 'w'){\r\n $anrede = ' geehrte Frau ';\r\n }\r\n else {\r\n $anrede = ' geehrter Herr ';\r\n }\r\n \r\n $mail->SMTPDebug = 2;\r\n //SMTP Versand definieren\r\n $mail->isSMTP();\r\n //Username, Passwort und Port deklarieren \r\n $mail->Host = 'mail.gmx.net';\r\n $mail->SMTPAuth = true;\r\n $mail->Username = '[email protected]';\r\n $mail->Password = 'shop1234';\r\n $mail->SMTPSecure = 'tls';\r\n $mail->Port = 587;\r\n //Absender/Empfänger und Reply definieren\r\n $mail->setFrom('[email protected]', 'WIFShop');\r\n $mail->addAddress($empfänger, $nachname);\r\n $mail->addReplyTo('[email protected]', 'Kundendienst');\r\n //$mail->addCC('[email protected]');\r\n //$mail->addBCC('[email protected]');\r\n //Betreff und Inhalt \r\n $mail->Subject = 'Ihre Bestellung Nr: - '.$bestellung;\r\n $mail->CharSet = 'utf-8';\r\n $mail->isHTML(true);\r\n $mail->Body = '<img src=\"https://t1.ftcdn.net/jpg/00/46/79/64/500_F_46796494_T2nsU8rxP1NKLBb8a8Egy6TgZiMgf3lz.jpg\" />\r\n <br>\r\n <h1><b>Vielen Dank für Ihre Bestellung bei WIFShop!</b></h1><br>\r\n <hr><br>_<br>\r\n Sehr'.$anrede.$vorname.' '.$nachname.',<br><br>\r\n Wir haben Ihre Bestellung mit der Bestellnummer: '.$bestellung.' erhalten.\r\n ';\r\n //Bestätigung über Versand bzw. ErrorInfo\r\n if(!$mail->send()) {\r\n echo 'Message could not be sent.';\r\n echo 'Mailer Error: ' . $mail->ErrorInfo;\r\n }\r\n else {\r\n\t\t$data->closeDB();\r\n echo 'Message has been sent';\r\n }\r\n}", "title": "" }, { "docid": "ac98a7891a4f9028e751209d1740be3f", "score": "0.5556376", "text": "function mainmail()\n{ \n\tglobal $smarty;\n\n\t$pickup=\"SELECT RECEIVER,USER1,USER2,USER3,USER4,USER5,USER6,USER7,USER8,USER9,USER10 FROM alerts.NP_MAILER WHERE SENT<>'Y' AND (USER1!='' OR USER6!='')\";\n\t$res_pickup=mysql_query($pickup) or logerror1(\"Error in selecting details from alerts.NP_MAILER . \".mysql_error(),$pickup,\"\",\"\");\n\twhile($row_pickup=mysql_fetch_array($res_pickup))\n\t{\n\t\t$id=$row_pickup['RECEIVER'];\n\t\t$checksumu=md5($id).\"i\".$id;\n\t\t$smarty->assign(\"checksum\",$checksumu);\n\t\t$user[0]=$row_pickup['USER1'];\n\t\t$user[1]=$row_pickup['USER2'];\n\t\t$user[2]=$row_pickup['USER3'];\n\t\t$user[3]=$row_pickup['USER4'];\n\t\t$user[4]=$row_pickup['USER5'];\n\t\t$user[5]=$row_pickup['USER6'];\n\t\t$user[6]=$row_pickup['USER7'];\n\t\t$user[7]=$row_pickup['USER8'];\n\t\t$user[8]=$row_pickup['USER9'];\n\t\t$user[9]=$row_pickup['USER10'];\n\n\t\t$name_pick=\"SELECT USERNAME,EMAIL FROM jsadmin.AFFILIATE_DATA WHERE PROFILEID='$id'\";\n//\t\t$res_name_pick=mysql_query($name_pick) or logerror1(\"Error in selecting EMAIL from AFFILIATE_DATA. \".mysql_error(),$name_pick,\"\",\"\");\n\t\tif($res_name_pick=mysql_query($name_pick))\n\t\t{\n\t\t\t$row_name=mysql_fetch_array($res_name_pick);\n\t\t\t$uname=$row_name['USERNAME'];\n\t\t\t$email=$row_name['EMAIL'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlogerror1(\"Error in selecting EMAIL from AFFILIATE_DATA. \".mysql_error(),$name_pick,\"\",\"\");\n\t\t}\n\n\t\tfor($k=0;$k<=9;$k++)\n {\n if(!$user[$k])\n $checksum[$k]=0;\n else\n {\n $checksum[$k]=md5($user[$k] + 5).\"i\".($user[$k] + 5);\n }\n }\n\n for($i=0;$i<=9;$i++)\n {\n if(!$user[$i])\n $profilechecksum[$i]=0;\n else\n $profilechecksum[$i]=md5($user[$i]).\"i\".$user[$i];\n }\n\n\n\t\tfor($i=0;$i<=9;$i++)\n {\n if(!$user[$i])\n {\n $pix[$i]=0;\n $username[$i]=0;\n $age[$i]=0;\n $HEIGHT[$i]=0;\n $CASTE[$i]=0;\n $CITY[$i]=0;\n $OCCUPATION[$i]=0;\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$matches=\"SELECT USERNAME,AGE,HEIGHT,CASTE,OCCUPATION,CITY_RES,HAVEPHOTO,PHOTO_DISPLAY,PRIVACY FROM newjs.JPROFILE WHERE PROFILEID='$user[$i]'\";\n// $matchresult=mysql_query($matches) or logerror1(\"Error in selecting details from newjs.JPROFILE. \".mysql_error(),$matches,\"\",\"\");\n\t\t\t\tif($matchresult=mysql_query($matches))\n {\n\t\t\t\t\t$matchrow= mysql_fetch_array($matchresult);\n\t $pix[$i]=$matchrow['HAVEPHOTO'];\n\t\t\t\t\t$photo_dis[$i]=$matchrow['PHOTO_DISPLAY'];\n\t\t\t\t\t$privacy[$i]=$matchrow['PRIVACY'];\n\t\n\t\t\t\t\tif($pix[$i]=='N'||$photo_dis[$i]=='C'||$photo_dis[$i]=='H'||$photo_dis[$i]=='F'||$privacy[$i]=='R'||$privacy[$i]=='F')\n\t\t\t\t\t{\n\t\t\t\t\t\t$flag[$i]=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$flag[$i]=0;\n\t\t\t\t\t}\n\t\t\t\t\n \t \t$username[$i]=$matchrow['USERNAME'];\n\t \t $age[$i]=$matchrow['AGE'];\n \t \t $height[$i]=$matchrow['HEIGHT'];\n \t \t$caste[$i]=$matchrow['CASTE'];\n\t \t$occupation[$i]=$matchrow['OCCUPATION'];\n \t $city_res[$i]=$matchrow['CITY_RES'];\n\n\t $sql_height=\"SELECT LABEL FROM newjs.HEIGHT WHERE VALUE='$height[$i]'\";\n// \t $result_height=mysql_query($sql_height) or logerror1(\"Error in selecting height. \".mysql_error(),$sql_height,\"\",\"\");\n\t\t\t\t\tif($result_height=mysql_query($sql_height))\n\t\t\t\t\t{\n \t \t$row_height=mysql_fetch_row($result_height);\n\t\t $HEIGHT[$i]=$row_height[0];\n \t \t\tif($HEIGHT[$i]!=\"\")\n \t \t$h[$i]=explode(\"&\",$HEIGHT[$i]);\n\t\t $h1[$i]=$h[$i][0];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlogerror1(\"Error in selecting height. \".mysql_error(),$sql_height,\"\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t $sql_caste=\"SELECT LABEL FROM newjs.CASTE WHERE VALUE='$caste[$i]'\";\n// \t $result_caste=mysql_query($sql_caste) or logerror1(\"Error in selecting CASTE. \".mysql_error(),$sql_caste,\"\",\"\");\n\t\t\t\t\tif($result_caste=mysql_query($sql_caste))\n\t\t\t\t\t{\n \t \t \t$row_caste=mysql_fetch_row($result_caste);\n\t\t $CASTE[$i]=$row_caste[0];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlogerror1(\"Error in selecting CASTE. \".mysql_error(),$sql_caste,\"\",\"\");\n\t\t\t\t\t}\n\n \t\t \t$sql_job=\"SELECT LABEL FROM newjs.OCCUPATION WHERE VALUE='$occupation[$i]'\";\n//\t $result_job=mysql_query($sql_job) or logerror1(\"Error in selecting occupation. \".mysql_error(),$sql_job,\"\",\"\");\n\t\t\t\t\tif($result_job=mysql_query($sql_job))\n\t\t\t\t\t{\n \t \t$row_job=mysql_fetch_row($result_job);\n\t\t $OCCUPATION[$i]=$row_job[0];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tlogerror1(\"Error in selecting occupation. \".mysql_error(),$sql_job,\"\",\"\");\n\t\t\t\t\t}\n\n\t if(is_numeric($city_res))\n \t {\n \t $sql_city=\"SELECT LABEL FROM newjs.CITY_NEW WHERE VALUE='$city_res[$i]'\";\n// \t $result_city=mysql_query($sql_city) or logerror1(\"Error in selecting CITY_USA. \".mysql_error(),$sql_city,\"\",\"\");\n\t\t\t\t\t\tif($result_city=mysql_query($sql_city))\n\t\t\t\t\t\t{\n \t\t$row_city=mysql_fetch_row($result_city);\n\t\t $CITY[$i]=$row_city[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogerror1(\"Error in selecting CITY_USA. \".mysql_error(),$sql_city,\"\",\"\");\n\t\t\t\t\t\t}\n\t }\n\t\t\t\t\telse\n \t {\n \t $sql_city=\"SELECT LABEL FROM newjs.CITY_NEW WHERE VALUE='$city_res[$i]'\";\n// \t $result_city=mysql_query($sql_city) or logerror1(\"Error in selecting CITY_INDIA. \".mysql_error(),$sql_city,\"\",\"\");\n\t\t\t\t\t\tif($result_city=mysql_query($sql_city))\n\t\t\t\t\t\t{\n\t\t $row_city=mysql_fetch_row($result_city);\n\t \t $CITY[$i]=$row_city[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlogerror1(\"Error in selecting CITY_INDIA. \".mysql_error(),$sql_city,\"\",\"\");\n\t\t\t\t\t\t}\n \t }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tlogerror1(\"Error in selecting details from newjs.JPROFILE. \".mysql_error(),$matches,\"\",\"\");\n\t\t\t\t}\n }\n\t\t\tif( $age[$i] != \"\" )\n $data[$i][]=$age[$i];\n if( $HEIGHT[$i] != \"\" )\n $data[$i][]=$h1[$i];\n if( $CASTE[$i] != \"\" )\n $data[$i][]=$CASTE[$i];\n if( $CITY[$i] != \"\" )\n $data[$i][]=$CITY[$i];\n if( $OCCUPATION[$i] != \"\" )\n $data[$i][]=$OCCUPATION[$i];\n if($user[$i]!=0)\n $DATA[$i]=implode(\", \",$data[$i]);\n else\n $DATA[$i]=0;\n unset($data);\n\t\t}\n\t\t$hdr=\"<center>You are receiving this mail because you have been referred through our referral program.<br> Please add [email protected] to your address book to ensure delivery into your inbox.<br> If you are not interested to receive this, click here to <a href=\\\"http://www.jeevansathi.com/unsubscribe/mailer_unsubscribe.php?mail=$email\\\">unsubscribe</a></center>\";\n\n\t\t$smarty->assign(\"hdr\",$hdr);\n $smarty->assign(\"DATA\",$DATA);\n $smarty->assign(\"USERNAME\",$username);\n $smarty->assign(\"FLAG\",$flag);\n $smarty->assign(\"checksum\",$checksum);\n $smarty->assign(\"PROFILECHECKSUM\",$profilechecksum);\n\t\t$smarty->assign(\"user\",$user);\n\t\t$smarty->assign(\"USERNAME_RECEIVER\",$uname);\n\n\t\t$sql_mail=\"SELECT jsadmin.AFFILIATE_DATA.EMAIL,jsadmin.AFFILIATE_MAIN.SOURCE FROM jsadmin.AFFILIATE_DATA , jsadmin.AFFILIATE_MAIN WHERE jsadmin.AFFILIATE_DATA.PROFILEID='$id' AND jsadmin.AFFILIATE_MAIN.ID='$id'\";\n//\t\t$res_sql_mail=mysql_query($sql_mail) or logerror1(\"Error in selecting EMAIL,SOURCE from jsadmin.AFFILIATE_DATA \".mysql_error(),$sql_mail,\"\",\"\");\n\t\tif($res_sql_mail=mysql_query($sql_mail))\n\t\t{\n\t\t\tif($row_mail=mysql_fetch_array($res_sql_mail))\n\t\t\t{\n\t\t\t\t$email=$row_mail['EMAIL'];\n\t\t\t\t$src=$row_mail['SOURCE'];\n\t\t\t\t$smarty->assign(\"source\",$src);\n\t\t\t\t$msg1 = $smarty->fetch(\"match.htm\");\n\t \t $srch=\"href=\\\"\";\n \t \t$repl=\"href=\\\"http://www.jeevansathi.com/g_redirect.php?source=$src&url=\";\n\t\t $msg=str_replace($srch,$repl,$msg1);\n\t\t\t\t$subject = \"Match Alerts from JeevanSathi.com\";\n\t \t $from = \"[email protected]\";\t\n\t\t\n\t\t\t\tif($email)\n\t\t\t\t{\n\t\t\t\t\tsend_email($email,$msg,$subject,$from);\n\t\t\t\t\t$updt=\"UPDATE alerts.NP_MAILER SET SENT='Y' WHERE RECEIVER=$id\";\n\t\t\t\t\tmysql_query($updt) or logerror1(\"Error in updating NP_MAILER table. \".mysql_error(),$updt,\"\",\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlogerror1(\"Error in selecting EMAIL,SOURCE from jsadmin.AFFILIATE_DATA \".mysql_error(),$sql_mail,\"\",\"\");\n\t\t}\n\t}\n\n\t$sql_trunc=\"TRUNCATE TABLE alerts.NP_TEMPLOG\";\n\t$res_sql_trunc=mysql_query($sql_trunc) or logerror1(\"Error in Truncating alerts.NP_TEMPLOG. \".mysql_error(),$sql_trunc,\"\",\"\");\n}", "title": "" }, { "docid": "91fe628f66c966816375a28949dffa5b", "score": "0.5553636", "text": "public function send() {\n\n\t\t$config = Email_Config::getConfig();\n\n\t\trequire_once TECNOTCH_PATH . '/Mailer/lib/phpmailer/PHPMailerAutoload.php';\n \t\t\n \t\t$mail = new \\PHPMailer();\n\t\t//$mail->SMTPDebug = 3; // Enable verbose debug output\n\t\t$mail->isSMTP(); // Set mailer to use SMTP\n\t\t$mail->Host = $config->smtp_host; \t\t\t \t\t // Specify main and backup SMTP servers\n\t\t$mail->SMTPAuth = true; // Enable SMTP authentication\n\t\t$mail->Username = $config->smtp_username; // SMTP username\n\t\t$mail->Password = $config->smtp_password; \t\t // SMTP password\n\t\t$mail->SMTPSecure = 'ssl'; // Enable SSL encryption, `tls` also accepted\n\t\t$mail->Port = $config->smtp_port; \t\t\t // TCP port to connect to\n\t\t$mail->setFrom(key($this->getFrom()), current($this->getFrom()));\n\t\t\n\t\tforeach ($this->getTo() as $email => $name) {\n\t\t\t$mail->addAddress($email, $name); // Add a recipient\n\t\t}\n\t\t\n\t\tif ($this->getReplyTo()) {\n\t\t\t$mail->addReplyTo(key($this->getReplyTo()), current($this->getReplyTo()));\t\n\t\t}\n\t\tif ($this->getCc()) {\n\t\t\tforeach ($this->getCc() as $email => $name) {\n\t\t\t\t$mail->addCC($email, $name); // Add a recipient\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->getBcc()) {\n\t\t\tforeach ($this->getBcc() as $email => $name) {\n\t\t\t\t$mail->addBCC($email, $name); // Add a recipient\n\t\t\t}\n\t\t}\n\t\t\n\t\t$attachments = $this->getAttachments();\n\t\tif (!empty($attachments)) {\n\t\t\tforeach ($attachments as $attachment) {\n\t\t\t\t$mail->addAttachment($attachment['file_path'], $attachment['title']);\n\t\t\t\t//$attachment['type']\n\t\t\t}\n\t\t}\n\n\t\t \n\n\t\t$mail->isHTML(true); // Set email format to HTML\n\t\t$mail->Subject = $this->getSubject();\n\t\t$mail->Body = $this->getBody();\n\t\t$mail->AltBody = strip_tags($this->getBody());\n\t\t$result = $mail->send();\n\n\t\t\\Tecnotch\\Logger::rlog($result);\n\t\t\\Tecnotch\\Logger::rlog(\"Errors: \" . $mail->ErrorInfo);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "fc475da12a5ba696e0fcb0ddff389119", "score": "0.55494153", "text": "function sendEmailMessages(array $work): void\n{\n global $debug;\n\n $client = new \\Postmark\\PostmarkClient(getenv('PM_SERVER_ID'));\n\n // make new arrays for each email address.\n\n $emails = [];\n\n foreach ($work['noTest'] as $noTest) {\n $emails[$noTest['assigned_to_data']['mail']]['noTest'][] = $noTest;\n }\n\n foreach ($work['assign'] as $assign) {\n $emails[$assign['tester_data']['mail']]['assign'][] = $assign;\n }\n\n\n foreach ($emails as $email) {\n\n // if there are not tickets for a particular category, make an\n // empty array element.\n if (!array_key_exists('noTest', $email)) {\n $email['noTest'] = [];\n }\n if (!array_key_exists('assign', $email)) {\n $email['assign'] = [];\n }\n\n $templateData = [\n \"subject_name\" => \"Daily Testing Nag Email\",\n \"notest_header\" => '',\n \"ticket_list_notest\" => [],\n \"assign_header\" => \"\",\n \"ticket_list_assign\" => [],\n \"signature\" => \"The Test Notifier\",\n ];\n\n $to = null;\n\n foreach ($email['noTest'] as $ticket) {\n $to = $ticket['assigned_to_name'] . ' <' .\n $ticket['assigned_to_data']['mail'] . '>';\n $templateData['notest_header'] = 'Tickets that have no tester assigned!';\n $templateData['ticket_list_notest'][] = [\n 'url' => getenv('PLANIO_URL') . '/issues/' . $ticket['id'],\n 'name' => '#' . $ticket['id'] . ': ' . $ticket['subject'],\n ];\n }\n\n foreach ($email['assign'] as $ticket) {\n $to = $ticket['tester_data']['firstname'] . ' ' .\n $ticket['tester_data']['lastname'] . ' <' .\n $ticket['tester_data']['mail'] . '>';\n $templateData['assign_header'] = 'Tickets that are assigned to you for testing';\n $templateData['ticket_list_assign'][] = [\n 'url' => getenv('PLANIO_URL') . '/issues/' . $ticket['id'],\n 'name' => '#' . $ticket['id'] . ': ' . $ticket['subject'],\n ];\n }\n if (!$debug) {\n $sendResult = $client->sendEmailWithTemplate(\n \"[email protected]\",\n $to,\n 9276967,\n $templateData\n );\n } else {\n echo \"Would have sent an email to ${to}\" . PHP_EOL;\n var_dump($templateData);\n }\n }\n}", "title": "" }, { "docid": "d84475019e5dd656a98b7985e0d40aad", "score": "0.55490935", "text": "function ciniki_fatt_cronSendCertExpirationMessages($ciniki, $tnid, $tmsupdate=0x07) {\n\n // Default delivery time, will need to be a setting in the future.\n $delivery_time = '06:00:00';\n\n // Default the outgoing messages into pending for approval before sending\n $message_status = 7;\n\n // Functions required\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'objectMessages');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'sendCertExpirationMessage');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n\n //\n // Load the tenant time zone information\n //\n $rc = ciniki_tenants_intlSettings($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n\n //\n // Get the cert messages\n // Sort by days: if we missed expiration emails, we want the sent the more relavent one, \n // not start at 90 days, then immediately send 60, etc.\n //\n $strsql = \"SELECT id, object, object_id AS cert_id, \"\n . \"days, status, \"\n . \"subject, message, parent_subject, parent_message \"\n . \"FROM ciniki_fatt_messages \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (status = 10 || status = 20) \"\n . \"AND object = 'ciniki.fatt.cert' \"\n . \"ORDER BY cert_id, days ASC \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.fatt', array(\n array('container'=>'certs', 'fname'=>'cert_id', 'fields'=>array('object', 'cert_id')), \n array('container'=>'messages', 'fname'=>'id',\n 'fields'=>array('id', 'days', 'subject', 'status', 'message', 'parent_subject', 'parent_message')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.18', 'msg'=>'Unable to get messages', 'err'=>$rc['err']));\n }\n if( !isset($rc['certs']) ) {\n return array('stat'=>'ok');\n }\n $cert_messages = $rc['certs'];\n\n //\n // Setup the current date in the tenant timezone\n //\n $dt = new DateTime('now', new DateTimeZone($intl_timezone));\n\n //\n // Get the list of cert customers that need to be checked for messages\n //\n $strsql = \"SELECT cc.id, \"\n . \"cc.cert_id, \"\n . \"certs.alt_cert_id, \"\n . \"cc.flags, \"\n . \"cc.customer_id, \"\n . \"cc.offering_id, \"\n . \"cc.date_received, \"\n . \"cc.date_expiry, \"\n . \"DATEDIFF('\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"', cc.date_expiry) AS days_till_expiry, \"\n . \"cc.last_message_day, \"\n . \"cc.next_message_date \"\n . \"FROM ciniki_fatt_cert_customers AS cc \"\n . \"LEFT JOIN ciniki_fatt_certs AS certs ON (\"\n . \"cc.cert_id = certs.id \"\n . \"AND certs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE cc.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND cc.date_expiry <> '0000-00-00' \"\n . \"AND (cc.flags&0x03) = 0x01 \" // Emails aren't marked as finished yet\n . \"AND cc.next_message_date <= '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d H:m:s')) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.fatt', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.19', 'msg'=>'Unable to get cert customer expirations', 'err'=>$rc['err']));\n }\n if( !isset($rc['rows']) || count($rc['rows']) == 0 ) {\n return array('stat'=>'ok');\n }\n $cert_customers = $rc['rows'];\n\n\n //\n // Process the cert customers and check for what messages should be sent\n //\n foreach($cert_customers as $cc) {\n //\n // Check there are cert messages for the customers certification\n //\n if( !isset($cert_messages[$cc['cert_id']]['messages']) ) {\n if( $cc['days_till_expiry'] > 0 ) {\n error_log(\"CRON: No expiration messages for certification \" . $cc['id']);\n if( ($cc['flags']&0x02) == 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], \n array('flags'=>($cc['flags']|=0x02)), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to update customer cert \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n }\n continue;\n }\n\n //\n // Check if a new cert was issued\n //\n if( $cc['alt_cert_id'] > 0 ) {\n $cert_sql = \"AND (\"\n . \"certs.cert_id = '\" . ciniki_core_dbQuote($ciniki, $cc['cert_id']) . \"' \"\n . \"OR certs.cert_id = '\" . ciniki_core_dbQuote($ciniki, $cc['alt_cert_id']) . \"' \"\n . \") \";\n } else {\n $cert_sql = \"AND certs.cert_id = '\" . ciniki_core_dbQuote($ciniki, $cc['cert_id']) . \"' \";\n }\n $strsql = \"SELECT COUNT(certs.id) AS num_certs \"\n . \"FROM ciniki_fatt_cert_customers AS certs \"\n . \"WHERE certs.customer_id = '\" . ciniki_core_dbQuote($ciniki, $cc['customer_id']) . \"' \"\n . \"AND date_received > '\" . ciniki_core_dbQuote($ciniki, $cc['date_received']) . \"' \"\n . $cert_sql\n . \"AND certs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.fatt', 'cert');\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to check for new certs on cert expiration reminder for customer \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n if( isset($rc['cert']['num_certs']) && $rc['cert']['num_certs'] > 0 ) {\n //\n // Stop future emails, and skip this email reminder.\n //\n if( ($cc['flags']&0x02) == 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], \n array('flags'=>($cc['flags']|=0x02)), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to update customer cert \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n continue;\n }\n\n //\n // Check if the customer has registered or passed another course after this expiration date\n //\n $strsql = \"SELECT COUNT(regs.id) AS num_reg \"\n . \"FROM ciniki_fatt_offering_registrations AS regs, ciniki_fatt_offerings AS offerings, ciniki_fatt_course_certs AS certs \"\n . \"WHERE regs.customer_id = '\" . ciniki_core_dbQuote($ciniki, $cc['customer_id']) . \"' \"\n . \"AND regs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND regs.status < 30 \"\n . \"AND regs.offering_id = offerings.id \"\n . \"AND offerings.start_date > UTC_TIMESTAMP() \" \n . \"AND offerings.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND offerings.course_id = certs.course_id \"\n . $cert_sql\n . \"AND certs.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.fatt', 'reg');\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to check registrations for cert expiration reminder for customer \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n if( isset($rc['reg']['num_reg']) && $rc['reg']['num_reg'] > 0 ) {\n //\n // Stop future emails, and skip this email reminder.\n //\n if( ($cc['flags']&0x02) == 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], array('flags'=>($cc['flags']|=0x02)), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to update customer cert \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n continue;\n }\n\n //\n // Double check the flags setting to make sure we are still to send to this customer\n //\n if( ($cc['flags']&0x03) != 0x01 ) {\n continue;\n }\n\n //\n // Go through cert messages and determine which should be sent\n //\n $cur_message_to_send = NULL;\n $next_message_to_send = NULL;\n foreach($cert_messages[$cc['cert_id']]['messages'] as $message ) {\n//error_log('message ' . $cc['id'] . ' days ' . $cc['days_till_expiry'] . ' message ' . $message['days']);\n\n //\n // Check if message could be sent. It must be exactly on the day to send\n // as the number of days till expiry is specified in the email.\n //\n if( $message['days'] == $cc['days_till_expiry'] ) {\n $cur_message_to_send = $message;\n }\n\n //\n // Check if expiry time is still before message days (negative numbers)\n //\n elseif( $message['days'] > $cc['days_till_expiry'] ) {\n $next_message_to_send = $message;\n break;\n }\n \n }\n\n //\n // Send the message\n //\n if( $cur_message_to_send != NULL ) {\n //\n // Check to make sure message hasn't already been sent\n //\n $rc = ciniki_mail_hooks_objectMessages($ciniki, $tnid, \n array('object'=>'ciniki.fatt.message', 'object_id'=>$cur_message_to_send['id'], 'customer_id'=>$cc['customer_id']));\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to get objectMessages for $tnid . (\" . serialize($rc['err']) . \")\");\n }\n elseif( !isset($rc['messages']) || count($rc['messages']) == 0 ) {\n //\n // Add the message to the customer\n //\n if( isset($cur_message_to_send['status']) && $cur_message_to_send['status'] == 20 ) {\n $message_status = 10;\n } else {\n $message_status = 7;\n }\n $rc = ciniki_fatt_sendCertExpirationMessage($ciniki, $tnid, \n array('certcustomer'=>$cc, 'message'=>$cur_message_to_send, 'message_status'=>$message_status), $tmsupdate);\n if( isset($rc['err']['code']) && $rc['err']['code'] == 'ciniki.fatt.33' ) {\n //\n // No emails for customer, mark as finished\n //\n error_log(\"CRON-ERR: No email addresses for customer \" . $cc['customer_id']);\n if( ($cc['flags']&0x02) == 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], \n array('flags'=>($cc['flags']|=0x02)), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to update customer cert \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n }\n elseif( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to send message for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n }\n\n //\n // Set the next send date\n //\n if( $next_message_to_send != NULL ) {\n $days_till_next_message = $next_message_to_send['days'] - $cc['days_till_expiry'];\n if( $days_till_next_message > 0 ) {\n $next_dt = clone $dt;\n $next_dt->add(New DateInterval('P' . $days_till_next_message . 'D'));\n $delivery_time_pieces = explode(':', $delivery_time);\n $next_dt->setTime($delivery_time_pieces[0], $delivery_time_pieces[1]);\n $next_dt->setTimezone(new DateTimeZone('UTC'));\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], \n array('next_message_date'=>$next_dt->format('Y-m-d H:i:s')), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to send message for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n } \n //\n // No more messages to send for the customer, turn off notifications\n //\n else {\n error_log(\"CRON: No more messages for customer \" . $cc['customer_id']);\n if( ($cc['flags']&0x02) == 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.fatt.certcustomer', $cc['id'], \n array('flags'=>($cc['flags']|=0x02)), $tmsupdate);\n if( $rc['stat'] != 'ok' ) {\n error_log(\"CRON-ERR: Unable to update customer cert \" . $cc['id'] . \" for $tnid . (\" . serialize($rc['err']) . \")\");\n continue;\n }\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "fcd58f4ac5b68906a64d00dc33d265bb", "score": "0.5542724", "text": "function custom_phpmailer_init($PHPMailer)\n{\n\t$PHPMailer->IsSMTP();\n\t$PHPMailer->SMTPAuth = true;\n\t$PHPMailer->SMTPSecure = 'tls';\n\t$PHPMailer->Host = 'smtp.mandrillapp.com';\n\t$PHPMailer->Port = 587;\n\t$PHPMailer->Username = '[email protected]';\n\t$PHPMailer->Password = 'euXo2wMZpHMqk_w1FoA9xw';\n}", "title": "" }, { "docid": "98b08669aa08bd02272cab6b2647e323", "score": "0.55332136", "text": "public function startCollectingMail();", "title": "" }, { "docid": "245a7e7288b7bdeacac89d4f8b8c2142", "score": "0.5509716", "text": "private function sendRoommateReminderEmails()\n {\n $query = \"select hms_lottery_reservation.* FROM hms_lottery_reservation\n LEFT OUTER JOIN (SELECT asu_username FROM hms_assignment WHERE term={$this->term}) as foo ON hms_lottery_reservation.asu_username = foo.asu_username\n WHERE foo.asu_username IS NULL\n AND hms_lottery_reservation.term = {$this->term}\n AND hms_lottery_reservation.expires_on > \" . $this->now;\n\n $result = PHPWS_DB::getAll($query);\n\n if (PHPWS_Error::logIfError($result)) {\n throw new DatabaseException($result->toString());\n }\n\n foreach ($result as $row) {\n $student = StudentFactory::getStudentByUsername($row['asu_username'], $this->term);\n $requestor = StudentFactory::getStudentByUsername($row['requestor'], $this->term);\n\n $bed = new HMS_Bed($row['bed_id']);\n $hall_room = $bed->where_am_i();\n HMS_Email::send_lottery_roommate_reminder($row['asu_username'], $student->getName(), $row['expires_on'], $requestor->getName(), $hall_room, $this->academicYear);\n HMS_Activity_Log::log_activity($row['asu_username'], ACTIVITY_LOTTERY_ROOMMATE_REMINDED, UserStatus::getUsername());\n }\n }", "title": "" }, { "docid": "c9659cb08afe0b7bbac9c3eddf5ebd41", "score": "0.550554", "text": "public function sendEmails($incidentData) {\n $mail_arr[0]['name'] = 'HR';\n\t\t\t\t$mail_arr[0]['email'] = defined('LV_HR_'.$incidentData[0]['employee_bu_id'])?constant('LV_HR_'.$incidentData[0]['employee_bu_id']):\"\";\n\t\t\t\t$mail_arr[0]['type'] = 'HR';\n\t\t\t\t$mail_arr[1]['name'] = $incidentData[0]['incidentraisedby'];\n\t\t\t\t$mail_arr[1]['email'] = $incidentData[0]['managementemail'];\n\t\t\t\t$mail_arr[1]['type'] = 'Management';\n\t\t\t\t$mail_arr[2]['name'] = $incidentData[0]['employeename'];\n\t\t\t\t$mail_arr[2]['email'] = $incidentData[0]['employeeemail'];\n\t\t\t\t$mail_arr[2]['type'] = 'Employee';\n\t\t\t\t$mail_arr[3]['name'] = $incidentData[0]['reportingmanagername'];\n\t\t\t\t$mail_arr[3]['email'] = $incidentData[0]['reportingmanageremail'];\n\t\t\t\t$mail_arr[3]['type'] = 'Manager';\n\t\t\t\tfor($ii =0;$ii<count($mail_arr);$ii++)\n\t\t\t\t{\n\t\t\t\t\t$base_url = 'http://'.$this->getRequest()->getHttpHost() . $this->getRequest()->getBaseUrl();\n\t\t\t\t\t$view = $this->getHelper('ViewRenderer')->view;\n\t\t\t\t\t$this->view->emp_name = $mail_arr[$ii]['name'];\n\t\t\t\t\t$this->view->base_url=$base_url;\n\t\t\t\t\t$this->view->type = $mail_arr[$ii]['type'];\n\t\t\t\t\t$this->view->raised_name = $incidentData[0]['incidentraisedby'];\n\t\t\t\t\t$this->view->raised_against = $incidentData[0]['employeename'];\n\t\t\t\t\t$this->view->raised_against_employee_id = $incidentData[0]['employeeId'];\n\t\t\t\t\t$this->view->raised_by = 'Manager';\n\t\t\t\t\t$text = $view->render('mailtemplates/disciplineincident.phtml');\n\t\t\t\t\t$options['subject'] = APPLICATION_NAME.': New Disciplinary Incident Raised';\n\t\t\t\t\t$options['header'] = 'Disciplinary Incident';\n\t\t\t\t\t$options['toEmail'] = $mail_arr[$ii]['email'];\n\t\t\t\t\t$options['toName'] = $mail_arr[$ii]['name'];\n\t\t\t\t\t$options['message'] = $text;\n\n\t\t\t\t\t$options['cron'] = 'yes';\n\t\t\t\t\tif($options['toEmail'] != '')\n\t\t\t\t\tsapp_Global::_sendEmail($options);\n\t\t\t\t}\n\t}", "title": "" }, { "docid": "18dd020f8852eed6f32c18bfc9073331", "score": "0.54961234", "text": "public function send_three_mail()\n {\n $CI = &get_instance();\n $users = $this->Logic_send_job->get_threemail_users();\n foreach ($users as $user_id) {\n $data = $this->Logic_send_job->select_threemail_data(['user_id' => $user_id]);\n $this->Logic_send_job\n ->update_status(['user_id' => $user_id, 'where' => 0, 'status'=>2]);\n $CI->db->trans_begin();\n $this->Logic_send_job\n ->update_status(['user_id' => $user_id, 'where' => 2, 'status'=>1]);\n $send_email = true;\n if(!empty($data)){\n $send_email = $this->send($data);\n }\n if($CI->db->trans_status() === false){\n $CI->db->trans_rollback();\n $this->Logic_send_job\n ->update_status(['user_id' => $user_id, 'where' => 2, 'status'=>0]);\n throw new Exception('update status fail');\n }elseif($send_email == false){\n $CI->db->trans_rollback();\n $this->Logic_send_job\n ->update_status(['user_id' => $user_id, 'where' => 2, 'status'=>0]);\n throw new Exception('send email fail');\n }else{\n $CI->db->trans_commit();\n }\n }\n }", "title": "" }, { "docid": "69bc85b0158823e202517bcaf2953167", "score": "0.5492953", "text": "function _Check_Pedidos_Entrega_Reportes_Gratis(){\n \n $expire_days = 30;\n $first_warning = 20;\n $second_warning = 25;\n $sec_in_a_day = 86400; // 24*60*60\n \n $CI =& get_instance();\n $CI->load->model('Enterprise'); \n $CI->load->library('email'); \n \n //====== Verificar 10 dias antes de vencer =======================\n $day = date('d m Y', date('U') - $first_warning * $sec_in_a_day);\n \n $CI->db->where(\"DATE_FORMAT(creation_time,'%d %m %Y')='$day' AND\n (permi_gr_reports = '2' OR permi_uncomplete_sale = '2' OR permi_delivery = '2')\", null, false);\n $enterprises = $CI->db->get('phppos_enterprises');\n \n foreach($enterprises->result() as $e)\n {\n $managers = $CI->Enterprise->get_enterprise_managers($e->enterprise_id);\n foreach($managers->result() as $m)\n {\n $sub = $CI->Subsidary->get_info($m->subsidary_id);\n $l = \"english\";\n if($sub)\n $l = $sub->language;\n $this->Sent_Letter_To_Person('warning_module_trial_expire', $m->email, $l,\n $m->first_name.' '.$m->last_name, NULL,NULL, 10,NULL,NULL,NULL,NULL);\n \n }\n }\n //===============================================================\n\n //====== Verificar 5 dias antes de vencer =======================\n $day = date('d m Y', date('U') - $second_warning * $sec_in_a_day);\n $CI->db->where(\"DATE_FORMAT(creation_time,'%d %m %Y')='$day' AND\n (permi_gr_reports = '2' OR permi_uncomplete_sale = '2' OR permi_delivery = '2')\", null, false);\n $enterprises = $CI->db->get('phppos_enterprises');\n \n foreach($enterprises->result() as $e)\n {\n $managers = $CI->Enterprise->get_enterprise_managers($e->enterprise_id);\n foreach($managers->result() as $m)\n {\n $sub = $CI->Subsidary->get_info($m->subsidary_id);\n $l = \"english\";\n if($sub)\n $l = $sub->language;\n $this->Sent_Letter_To_Person('warning_module_trial_expire', $m->email, $l,\n $m->first_name.' '.$m->last_name,NULL,NULL,5,NULL,NULL,NULL,NULL);\n \n }\n }\n //===============================================================\n \n //====== Desactivar modulos que estan en trial =======================\n //$day = date('d m Y', date('U') - $expire_days * $sec_in_a_day);\n $day = date('U') - $expire_days * $sec_in_a_day;\n $CI->db->where(\"UNIX_TIMESTAMP(creation_time)<='$day' AND\n (permi_gr_reports = '2' OR permi_uncomplete_sale = '2' OR permi_delivery = '2')\", null, false);\n $enterprises = $CI->db->get('phppos_enterprises');\n \n foreach($enterprises->result() as $e)\n {\n $CI->Enterprise->set_permit_trial_off($e->enterprise_id);\n \n $managers = $CI->Enterprise->get_enterprise_managers($e->enterprise_id);\n foreach($managers->result() as $m)\n {\n $sub = $CI->Subsidary->get_info($m->subsidary_id);\n $l = \"english\";\n if($sub)\n $l = $sub->language;\n $this->Sent_Letter_To_Person('module_trial_expired', $m->email, $l,\n $m->first_name.' '.$m->last_name,NULL,NULL,NULL,NULL,NULL,NULL,NULL);\n }\n }\n //===============================================================\n }", "title": "" }, { "docid": "9838b9ed1deba407581624f35b191b86", "score": "0.54907453", "text": "function sendSMTP($db, $dbr, $email, $subject, $message, $attachments=0,\n $from='', $from_name='', $auction_number='', $txnid='', $template='', $ins_id='',\n $smtps, $inside, $notes, $bcc, $xheaders, $nextID, $isResend=false) {\n if (APPLICATION_ENV === 'docker') {\n $smtps = array(new stdClass());\n $smtps[0]->smtp = 'mailcatcher';//mailcatcher's host @todo make env variable for it\n $smtps[0]->auth = 0;\n $smtps[0]->port = 1025;\n $smtps[0]->encrypt = '';\n $smtps[0]->id = 1;\n\n $message = htmlentities($message, ENT_SUBSTITUTE, 'UTF-8');\n }\n\n $result = true;\n require_once 'PHPMailer/PHPMailerAutoload.php';\n $template_rec = $dbr->getRow(\"select * from template_names where name='$template'\");\n\n // get predefined smtp for email address\n $email_mask = Config::get($db, $dbr, 'email_mask');\n\n /**\n * @description pick up smtp mask according to template\n * @var $template\n * @var $email_mask_smtp\n * @var DB $db, $dbr\n */\n if ($template == \"customer_shop_news\") {\n $email_mask_smtp = Config::get($db, $dbr, 'email_mask_newsletter_smtp');\n } else {\n $email_mask_smtp = Config::get($db, $dbr, 'email_mask_shopmails_smtp');\n }\n\n $masks = explode(',', $email_mask);\n foreach ($masks as $mask) {\n $mask = trim($mask);\n if (stripos($email, $mask) !== false) {\n $smtps = array($email_mask_smtp);\n }\n }\n // get predefined smtp for email address\n\n $nowSend = true;\n if (!$isResend && $template_rec->can_wait && (is_array($auction_number) || (strlen($auction_number)))) {\n $nowSend = false;\n }\n\n if (!is_array($smtps)) $smtps = array($smtps);\n foreach ($smtps as $smtp) {\n if (!$smtp->id) {\n $smtp = $dbr->getRow(\"select * from smtp where id=\" . $smtp);\n }\n $m = new PHPMailer;\n $m->isSMTP();\n global $debug;\n global $conv;\n\n //$debug = true;\n\n $msg = $nextID . ': ' . print_r($smtps, true) . \", $template, $email, <br>Subj=$subject, <br><br>Msg=$message, <br><br>($from_name)$from<br>Attachments:\" . count($attachments) . \"<br>\";\n if ($debug) echo $msg;\n try {\n //\t\t$m->SMTPDebug = 2;\n $m->CharSet = 'utf-8';\n $email = trim($email);\n $email_array = array();\n if (strpos($email, ',') === false) {\n $email_array[] = $email;\n } else {\n $email_array = explode(\",\", $email);\n if (count($email_array)) foreach ($email_array as $k => $r) $email_array[$k] = trim($email_array[$k]);\n $email_array = array_unique($email_array);\n if (count($email_array)) foreach ($email_array as $k => $r) {\n if (!strlen($email_array[$k])) unset($email_array[$k]);\n }\n $email = implode(\", \", $email_array);\n } // email addr\n $message = str_replace(\"\\r\\n\", \"\\r\", $message);\n $message = str_replace(\"\\n\", \"\\r\", $message);\n $m->Subject = $subject;\n if ($attachments == 'html' || $attachments[0] == 'html') {\n # chanes by Peppio 2014-10-04\n $m->isHTML(true);\n #\t\t$m->Body = $message;\n $m->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically\n $m->MsgHTML($message);\n } else {\n $m->Body = $message;\n }\n if (is_array($attachments)) foreach ($attachments as $r) {\n if ( ! is_object($r)) {\n continue;\n }\n file_put_contents('tmp/' . $r->name, $r->data);\n $m->addAttachment('tmp/' . $r->name);\n } // attach\n if (strpos($from, ',')) $from = substr($from, 0, strpos($from, ','));\n $m->From = $from;\n $m->FromName = $from_name;\n //\tprint_r($m);\n $bcc_array = explode(\",\", $bcc);\n if (count($bcc_array)) foreach ($bcc_array as $k => $r) $bcc_array[$k] = trim($bcc_array[$k]);\n $bcc_array = array_unique($bcc_array);\n if (count($bcc_array)) foreach ($bcc_array as $k => $r) {\n if (strlen($bcc_array[$k])) $m->addBCC($bcc_array[$k]);\n }\n if (is_array($xheaders)) foreach ($xheaders as $xheader) {\n list($xname, $xvalue) = explode(':', $xheader->header, 2);\n $m->addCustomHeader($xname, $xvalue);\n }\n if ($_REQUEST['testmode']) {\n $tresult = true;\n } else {\n $m->Host = $smtp->smtp;\n $m->Port = $smtp->port;\n if ($smtp->auth) $m->SMTPAuth = true; else $m->SMTPAuth = false;\n $m->Username = $smtp->login; // SMTP username\n $m->Password = $smtp->pw; // SMTP password\n if (strlen($smtp->encrypt)) $m->SMTPSecure = $smtp->encrypt;\n if ($subject == 'smtptest' || $debug) {\n $m->SMTPDebug = 4;\n $m->Debugoutput = function ($str, $level) {\n global $conv;\n $conv .= 'ERROR!!' . str_replace('SMTP -> get_lines()', '', $str) . print_r($m, true);\n };\n }\n if ($nowSend) {\n if ($template_rec->split) {\n foreach ($email_array as $single_email) {\n $m->addAddress($single_email);\n $tresult = $m->Send();\n $m->ClearAddresses();\n }\n } else {\n foreach ($email_array as $single_email) {\n $m->addAddress($single_email);\n }\n $tresult = $m->Send();\n }\n }\n $m->SMTPDebug = 0;\n }\n if ($debug) print_r($conv);\n if (!$tresult) {\n $result = false;\n if (!strlen($conv)) $conv = 'ErrorInfo!: ' . print_r($m->ErrorInfo, true) . print_r($m, true);\n }\n } catch (phpmailerException $e) {\n $result = false;\n $conv = 'errorMessage: ' . $e->errorMessage(); //Pretty error messages from PHPMailer\n } catch (Exception $e) {\n $result = false;\n $conv = 'getMessage: ' . $e->getMessage(); //Boring error messages from anything else!\n }\n unset($m);\n if (is_array($attachments)) foreach ($attachments as $r) {\n if (is_file('tmp/' . $r->name)) {\n unlink('tmp/' . $r->name);\n }\n }\n\n if ($debug) {\n echo \"<pre>$conv</pre>\";\n }\n\n if ($message == '') $message = $attachments[0]->data;\n $time = ServerTolocal(date(\"Y-m-d H:i:s\"), $timediff);\n if (is_array($auction_number)) {\n foreach ($auction_number as $auction)\n EmailLog::log($db, $dbr, $auction->auction_number, $auction->txnid, $template\n , $email, $from, $smtp->smtp\n , $subject, $message, $notes, $attachments, $nextID, \"'$time'\", ($result ? 0 : 1));\n } elseif (strlen($auction_number))\n EmailLog::log($db, $dbr, $auction_number, $txnid, $template\n , $email, $from, $smtp->smtp, $subject, $message, $notes, $attachments, $nextID, \"'$time'\", ($result ? 0 : 1));\n if ($ins_id) {\n global $loggedUser;\n if (!is_a($loggedUser, 'User')) {\n $timediff = 0;\n $username = 'cron';\n } else {\n $timediff = $loggedUser->get('timezone');\n $username = $loggedUser->get('username');\n }\n Insurance::addLog($db, $dbr, $ins_id,\n $username,\n $time,\n $template, $email, $from, $smtp->smtp);\n } // if insurance\n if ($nextID) {\n $db->query(\"delete from {$template_rec->log_table} where template='' and id=$nextID\");\n }\n } // foreach active SMTP\n return $result;\n}", "title": "" }, { "docid": "d5b17f028bd8551ff5f994af78537357", "score": "0.5486535", "text": "function standardEmail($db, $dbr, $auction, $template, $ins_id=0, $rma_spec_id=0, $nosend=false, $_def_smtp = false)\n{\n if ( ! $db)\n {\n $db = \\label\\DB::getInstance(\\label\\DB::USAGE_WRITE);\n }\n\n if ( ! $dbr)\n {\n $dbr = \\label\\DB::getInstance(\\label\\DB::USAGE_READ);\n }\n\n if (!strlen($template)) return;\n//\tprint_r($auction); echo '$template='.$template.' $ins_id='.$ins_id.' $rma_spec_id='.$rma_spec_id; die();\n global $smarty;\n global $loggedUser;\n global $english;\n global $errormsg;\n global $lang;\n global $debug;\n global $siteURL;\n global $_SERVER_REMOTE_ADDR;\n global $shop_id;\n $dbrr = $dbr;\n $dbr = $db;\n require_once 'lib/Account.php';\n require_once 'lib/Article.php';\n require_once 'lib/SellerInfo.php';\n require_once 'lib/ShippingMethod.php';\n require_once 'lib/Warehouse.php';\n require_once 'lib/Invoice.php';\n require_once 'lib/Offer.php';\n require_once 'lib/op_Order.php';\n require_once 'lib/EmailLog.php';\n require_once 'Mail/SMTP/mailman.class.php';\n $inside = 0;\n $attachments = array();\n\n if (isset($auction->attachments)) $attachments = $auction->attachments;\n if (isset($auction->notes)) $notes = $auction->notes;\n $template_name = $dbr->getRow(\"select * from template_names where name='$template'\");\n $issystem = (int)$template_name->system;\n $ishtml = (int)$template_name->html;\n $header_footer = (int)$template_name->header_footer;\n $default_send_anyway = (int)$template_name->send_anyway;\n $default_send_sms = (int)$template_name->sms;\n if(in_array($ins_id, ['email','sms'], true)) {\n $sendmethod = $ins_id;\n }\n if ($ishtml) {\n if (is_array($attachments) && count($attachments) && $attachments[0] != 'html') {\n array_unshift($attachments, 'html');\n } elseif ($attachments != 'html') {\n $attachments[] = 'html';\n }\n }\n if (PEAR::isError($issystem)) aprint_r($issystem);\n if ($template_name->seller) {\n $shipseller = $dbr->getOne(\"select shipseller from source_seller where id=\" . intval($auction->source_seller_id));\n if ($shipseller) $username4template=$shipseller;\n }\n\tif (!strlen($username4template)) {\n\t\tif ($issystem) {\n\t $username4template = Config::get($db, $dbr, 'aatokenSeller');\n\t } else {\n\t $username4template = is_a($auction, 'Auction') ? $auction->get('username') : $auction->username;\n\t }\n\t}\n $sellerInfo = new SellerInfo($db, $dbr, is_a($auction, 'Auction') ? $auction->get('username') : $auction->username, $lang);\n\n // New send anyway logic\n $template_sendanyway_seller_list = $dbr->getAll(\"SELECT * FROM template_sendanyway_seller WHERE template_id={$template_name->id}\");\n $template_sendanyway_source_seller_list = $dbr->getAll(\"SELECT * FROM template_sendanyway_source_seller WHERE template_id={$template_name->id}\");\n $send_anyway = $default_send_anyway;\n $source_seller_id = is_a($auction, 'Auction') ? $auction->get('source_seller_id') : $auction->source_seller_id;\n $seller_id = !empty($sellerInfo) ? $sellerInfo->data->id : null;\n if(sizeof($template_sendanyway_seller_list) || sizeof($template_sendanyway_source_seller_list)) {\n $send_anyway = 0;\n }\n if(sizeof($template_sendanyway_source_seller_list)) {\n foreach ($template_sendanyway_source_seller_list as $template_sendanyway_source_seller) {\n if ($template_sendanyway_source_seller->source_seller_id == $source_seller_id) {\n $send_anyway = 1;\n break;\n }\n }\n }else{\n foreach($template_sendanyway_seller_list as $template_sendanyway_seller){\n if($template_sendanyway_seller->seller_id == $seller_id){\n $send_anyway = 1;\n break;\n }\n }\n }\n\n // New sms logic\n $template_sendsms_seller_list = $dbr->getAll(\"SELECT * FROM template_sms_seller WHERE template_id={$template_name->id}\");\n $template_sendsms_source_seller_list = $dbr->getAll(\"SELECT * FROM template_sms_source_seller WHERE template_id={$template_name->id}\");\n $send_sms = $default_send_sms;\n $source_seller_id = is_a($auction, 'Auction') ? $auction->get('source_seller_id') : $auction->source_seller_id;\n $seller_id = !empty($sellerInfo) ? $sellerInfo->data->id : null;\n if(sizeof($template_sendsms_seller_list) || sizeof($template_sendsms_source_seller_list)) {\n $send_sms = 0;\n }\n foreach($template_sendsms_seller_list as $template_sendsms_seller){\n if($template_sendsms_seller->seller_id == $seller_id){\n $send_sms = 1;\n break;\n }\n }\n foreach($template_sendsms_source_seller_list as $template_sendsms_source_seller){\n if($template_sendsms_source_seller->source_seller_id == $source_seller_id){\n $send_sms = 1;\n break;\n }\n }\n\n if (is_a($auction, 'Auction')) {\n $purchased = 'Auction';\n $src = '_auction';\n $txnid = $auction->get('txnid');\n if ($txnid == 3) {\n $purchased = 'Shop';\n $src = '';\n } elseif ($txnid > 1) $purchased = 'Fix';\n elseif ($txnid == 1) $purchased = 'Auction';\n elseif ($txnid == 0) {\n if ($auction->get('main_auction_number')) $aunumber = $auction->get('main_auction_number');\n else $aunumber = $auction->get('auction_number');\n $auserv = new Auction($db, $dbr, $aunumber, $txnid);\n if ($server = $auserv->get('server')) {\n $shopname = $dbr->getOne(\"select name from shop where url='$server'\");\n if (strlen($shopname)) {\n $purchased = 'Shop: ' . $shopname;\n $src = '';\n }\n }\n }\n $siteid = $auction->get('siteid');\n $auction->data->tracking_numbers = $auction->tracking_numbers;\n $vars = unserialize($auction->get('details'));\n $vat_info = VAT::get_vat_attribs($db, $dbr, $auction);\n $accounts = Account::listArray($db, $dbr);\n $auction = $auction->data;\n $auction->VAT_account = $accounts[$vat_info->vat_account_number];\n $auction->purchased = $purchased;\n $auction->total_fees = $dbr->getOne(\"select sum(ebay_listing_fee+ebay_commission+additional_listing_fee)\n from auction_calcs where auction_number=\" . $auction->auction_number . \" and txnid=\" . $auction->txnid);\n if ($auction->total_fees == '')\n $auction->total_fees = ($auction->listing_fee ? $auction->listing_fee :\n ($auction->listing_fee1 ? $auction->listing_fee1 : $auction->listing_fee2));\n } else {\n $siteid = $auction->siteid;\n }\n if (!isset($auction->original_username)) $auction->original_username = $auction->username;\n $msg = $_SERVER['HTTP_HOST'] . \" template:$template\\n\";\n $msg .= \"lang:$lang\\n\";\n $locallang = $lang;\n if (!strlen($locallang)) {\n $fget_AType = $dbr->getOne(\"select fget_AType('{$auction->auction_number}', '{$auction->txnid}')\");\n if (PEAR::isError($fget_AType)) {\n aprint_r($fget_AType);\n return 'nolang';\n }\n if ($auction->customer_id) {\n $q = \"select lang from customer{$fget_AType}\n where id='\" . $auction->customer_id . \"'\";\n } else {\n $q = \"select lang from customer{$fget_AType}\n where email='\" . mysql_escape_string((strlen($auction->email) ? $auction->email : $auction->email_invoice)) . \"'\";\n }\n $locallang = $dbr->getOne($q);\n if (PEAR::isError($locallang)) {\n aprint_r($locallang);\n return 'nolang1';\n }\n $msg .= $q . \"\\n\";\n $msg .= \"locallang:$locallang\\n\";\n }\n if (!strlen($locallang)) {\n $msg .= \"Seller: \" . $sellerInfo->get('username') . \"\\n\";\n $locallang = $sellerInfo->get('default_lang');\n $msg .= \"locallang:$locallang\\n\";\n }\n if (!strlen($locallang) && strlen($siteid)) {\n $locallang = Auction::getLang($db, $dbr, $siteid);\n $msg .= \"locallang:$locallang\\n\";\n }\n//\techo $lang.'-'.$locallang; echo $msg; die();\n $english = Auction::getTranslation($db, $dbr, $auction->siteid, $locallang);\n//\tmail('[email protected]', \"standardEmail \".$auction->auction_number, $msg);\n\n $sellerInfo = new SellerInfo($db, $dbr, $auction->username, $locallang);\n $sellerInfo4template = new SellerInfo($db, $dbr, $username4template, $locallang);\n $auction->tracking_list = '';\n if (count($auction->tracking_numbers)) foreach ($auction->tracking_numbers as $number) {\n $meth = new ShippingMethod($db, $dbr, $number->shipping_method);\n $number->shipping_company = str_pad($meth->get('company_name'), 40);\n $number->tracking_url = substitute($meth->get('tracking_url'), array('number' => $number->number, 'zip' => $auction->zip_shipping, 'country_code2' => countryToCountryCode($auction->country_shipping)));\n// $number->tracking_url = str_replace ('[number]', $number->number, $meth->get('tracking_url'));\n $auction->tracking_list .= substitute($sellerInfo4template->getTemplate('tracking_list', $locallang/*SiteToCountryCode($siteid)*/), $number);\n $auction->tracking_list .= \"\\n\\n\";\n }\n if ($auction->no_emails && !(int)$send_anyway) return;\n $auction->currency = siteToSymbol($auction->siteid);\n $auction->email_name = $sellerInfo->get('email_name');\n $auction->Handelsregisterort = $sellerInfo->get('Handelsregisterort');\n $auction->Handelsregisterort_Nummer = $sellerInfo->get('Handelsregisterort_Nummer');\n $auction->brand_name = $sellerInfo->get('brand_name');\n $auction->seller_name = $sellerInfo->get('seller_name');\n $auction->contact_name = $sellerInfo->get('contact_name');\n $auction->street = $sellerInfo->get('street');\n $auction->town = $sellerInfo->get('town');\n $auction->zip = $sellerInfo->get('zip');\n $auction->logistics_email = $sellerInfo->get('logistics_email');\n $auction->logistics_phone = $sellerInfo->get('logistics_phone');\n $auction->country = translate($db, $dbr, CountryCodeToCountry($sellerInfo->get('country')), $locallang, 'country', 'name');\n//\tif ($debug) {echo $sellerInfo->get('country').'-'.CountryCodeToCountry($sellerInfo->get('country')); die($auction->country);}\n $auction->supervisor_email = $sellerInfo->get('supervisor_email');\n $auction->return_address = $sellerInfo->get('return_address');\n $auction->complain_text = substitute($sellerInfo->get('complain_text'), $sellerInfo->data);\n $auction->support_email = $sellerInfo->get('support_email');\n $auction->seller_email = $sellerInfo->get('email');\n $auction->phone = $sellerInfo->get('phone');\n $auction->phone_order = $sellerInfo->get('phone_order');\n $auction->call_center_hours = $sellerInfo->get('call_center_hours');\n $auction->fax = $sellerInfo->get('fax');\n $auction->vat_id = $sellerInfo->get('vat_id');\n $auction->bank = $sellerInfo->get('bank');\n $auction->bank_account = $sellerInfo->get('bank_account');\n $auction->blz = $sellerInfo->get('blz');\n $auction->bic = $sellerInfo->get('bic');\n $auction->bank_giro = $sellerInfo->get('bank_giro');\n $auction->bank_owner = $sellerInfo->get('bank_owner');\n $auction->iban = $sellerInfo->get('iban');\n $auction->swift = $sellerInfo->get('swift');\n $auction->contact_name = $sellerInfo->get('contact_name');\n $auction->seller_web_page = $sellerInfo->get('web_page');\n $auction->winning_bid = 1 * $auction->winning_bid;\n $auction->paid_amount = $dbr->getOne(\"select sum(amount)\n from payment where auction_number=\" . $auction->auction_number . \" and txnid=\" . $auction->txnid);\n if (!PEAR::isError($auction->paid_amount)) {\n $auction->paid_amount = number_format($auction->paid_amount, 2);\n } else {\n $auction->paid_amount = 0;\n }\n if ($auction->auction_number && !is_array($auction->auction_number)) $auction->wwo_ids = $dbr->getAssoc(\"select distinct wwo_id f1, wwo_id f2 from (\n select wwo_order_id from orders\n where auction_number=\" . $auction->auction_number . \" and txnid=\" . $auction->txnid . \"\n union all\n select wwo_order_id from orders\n join auction on auction.auction_number=orders.auction_number and auction.txnid=orders.txnid\n where auction.main_auction_number=\" . $auction->auction_number . \" and auction.main_txnid=\" . $auction->txnid . \"\n )t\n join wwo_article on t.wwo_order_id=wwo_article.id\");\n if (count($auction->wwo_ids)) $auction->wwo_ids_string = ' from WWO ' . implode(', ', $auction->wwo_ids);\n if ($auction->paid_amount > 0)\n $auction->paid_amount_phrase = $english[185] . ' ' . $auction->paid_amount . ' ' . $auction->currency . ' ' . $english[186];\n else\n $auction->paid_amount_phrase = '';\n $invoice = new Invoice($db, $dbr, $auction->invoice_number);\n if ((int)$invoice->get('invoice_number')) {\n $auction->total = number_format($invoice->getTotal(), 2);\n $auction->open_amount = number_format($invoice->get('open_amount'), 2);\n } else {\n $auction->total = 0;\n }\n $key = substr(md5($auction->auction_number . $auction->txnid . $auction->username), 0, 8);\n $key_email = substr(md5($auction->auction_number . $auction->txnid . $auction->username . $auction->email_shipping), 0, 8);\n// LOCK TABLE email_log\n if ((int)$auction->shop_id) {\n//\t\tprint_r($auction); die();\n $srcs = '';\n $srcs .= \"&src[]=\" . $auction->src;\n $customer_shop = $dbr->getRow(\"select * from customer{$auction->src} where id=\" . $auction->auction_number);\n $shop_row = $dbr->getRow(\"select * from shop where id=\" . $auction->shop_id);\n if ((int)$customer_shop->id) {\n if (isset($auction->nextID)) $nextID = $auction->nextID;\n else {\n global $db_host;\n global $db_user;\n global $db_pass;\n global $db_name;\n list($host, $port) = explode(':', $db_host);\n $link = mysqli_connect($host, $db_user, $db_pass, $db_name, $port);\n $r = mysqli_query($link, \"insert into {$template_name->log_table} (template,date,auction_number,txnid) values ('',now(),0,0)\");\n $nextID = mysqli_insert_id($link);\n mysqli_close($link);\n /*\t\t\t\t$db->query(\"insert into email_log (template,date,auction_number,txnid)\n values ('',now(),0,0)\");\n $nextID = mysqli_insert_id();*/\n if (!$nextID) $nextID = $db->getOne(\"select max(id) from {$template_name->log_table} where template='' and auction_number=0 and txnid=0\");\n }\n $auction->newsunassignurl = 'http://' . $shop_row->url\n . '/shop_catalogue.php?news_email=' . $auction->email . $srcs . '&step=1&btn_news_remove=1&email=' . $nextID;\n $auction->newsshowurl = 'http://' . $shop_row->url . '/news_show.php?id=' . $customer_shop->id\n . '&code=' . $customer_shop->code . '&email=' . $nextID;\n $auction->recommendurl = 'http://' . $shop_row->url . '/recommend.php?id=' . $customer_shop->id\n . '&code=' . $customer_shop->code . '&email=' . $nextID;\n }\n }\n $car = $dbr->getRow(\"select cars.*\n from cars\n join route on cars.id=route.car_id\n where route.id=\" . (int)$auction->route_id);\n $auction->siteURL = $siteURL;\n $auction->delivery_confirmation_url = $siteURL . 'order.php?a=' . $auction->auction_number . '&t=' . $auction->txnid . '&k=' . $key . '&route=1';\n#\t$auction->car_url = \"http://{$car->tracking_account}:{$car->tracking_password}@tracking.itakka.at/track/{$car->tracking_imei}\";\n#\t$auction->car_url_tag = \"<a href='http://{$car->tracking_account}:{$car->tracking_password}@tracking.itakka.at/track/{$car->tracking_imei}'>\".$english[215].\"</a>\";\n#\t$auction->car_url_tag_204 = \"<a href='http://{$car->tracking_account}:{$car->tracking_password}@tracking.itakka.at/track/{$car->tracking_imei}'>\".$english[204].\"</a>\";\n $auction->tracking_car_url = $siteURL . \"tracker.php?a=\" . $auction->auction_number . \"&t=\" . $auction->txnid . \"&k=\" . $key_email;\n $auction->car_url_tag = \"<a href='\" . $auction->tracking_car_url . \"'>\" . $english[215] . \"</a>\";\n $auction->car_url_tag_204 = \"<a href='\" . $auction->tracking_car_url . \"'>\" . $english[204] . \"</a>\";\n $auction->voucher_url = $siteURL . 'shop_voucher.php?id=' . $auction->voucher_id . '&shop_id=' . $auction->shop_id;\n $auction->stock_take_url = $siteURL . 'stock_take.php?id=' . $auction->auction_number;\n $auction->rma_url = $siteURL . 'rma.php?rma_id=' . $auction->rma_id . '&number=' . $auction->auction_number . '&txnid=' . $auction->txnid;\n $auction->article_url = $auction->articleurl = $siteURL . 'article.php?original_article_id=' . $auction->article_id;\n $auction->article_img = '<img src=\"' . $siteURL . str_replace('_image.jpg', '_x_1024_image.jpg', $auction->picture_URL) . '\"/>';\n $auction->wwourl = $siteURL . 'ware2ware_order.php?id=' . $auction->auction_number;\n $auction->understock_url = $siteURL . 'understock.php?warehouse_id=' . $auction->warehouse_id;\n $auction->opourl = $siteURL . 'op_order.php?id=' . $auction->auction_number;\n $auction->atsurl = $siteURL . 'ats.php?id=' . $auction->auction_number;\n $auction->empurl = $siteURL . 'employee.php?id=' . $auction->auction_number;\n $auction->auctionurl = $siteURL . 'auction.php?number=' . $auction->auction_number . '&txnid=' . $auction->txnid;\n $auction->tracker_url = $siteURL . \"tracker.php?a=\" . $auction->auction_number . \"&t=\" . $auction->txnid . \"&k=\" . $key_email;\n if (!strlen($auction->sa_url)) $auction->sa_url = $siteURL . 'newauction.php?edit=' . $auction->saved_id;\n\n if ($sellerInfo->get('seller_channel_id') == 4) {\n $auction->sa_url_comments = $siteURL . 'react/condensed/condensed_sa/' . $auction->saved_id . '/comments/';\n } else {\n $auction->sa_url_comments = $auction->sa_url;\n }\n $auction->shipping_cost_url = $siteURL . 'shipping_cost.php?id=' . $auction->auction_number;\n $auction->offerurl = $siteURL . 'offer.php?id=' . $auction->offer_id;\n if ($auction->offer_id) $auction->offer_name = $dbr->getOne(\"select name from offer where offer_id=\" . $auction->offer_id);\n $auction->customerurl = $siteURL . 'customer.php?id=' . $auction->auction_number . '&src=' . ($auction->txnid == -6 ? '_auction' : ($auction->txnid == -7 ? '_jour' : ''));\n $auction->customerid = $auction->auction_number;\n $auction->shipauctionurl = $siteURL . 'shipping_auction.php?number=' . $auction->auction_number . '&txnid=' . $auction->txnid;\n $auction->route_task_url = $siteURL . 'route_task.php?auction_number=' . $auction->auction_number;\n $auction->car_url = $siteURL . 'car.php?id=' . $auction->car_id;\n $atype = $dbr->getOne(\"select fget_AType(\" . $auction->auction_number . \",\" . $auction->txnid . \")\");\n $auction->payment_method_name = $dbr->getOne(\"select value from payment_method pm\n join translation t on pm.id=t.id and t.table_name='payment_method' and t.field_name='name'\n and t.language='$locallang'\n where pm.code='\" . $auction->payment_method . \"'\");\n\n if ($atype == '_auction') {\n $auction->orderurl = $siteURL . 'order.php?a=' . $auction->auction_number . '&t=' . $auction->txnid . '&k=' . $key;\n } else {\n $shopuser = $dbr->getRow(\"select * from customer where id=\" . $auction->customer_id);\n $shoprow = $dbr->getRow(\"select * from shop where '{$auction->server}' in (url, concat('www.', url))\");\n $shopURL = 'http://' . $auction->server . '/';\n if (strlen($auction->server)) {\n $auction->orderurl = $shopURL . \"order/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/\";\n $auction->shop_rating_link = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/\";\n $auction->shop_rating_link1 = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/1\";\n $auction->shop_rating_link2 = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/2\";\n $auction->shop_rating_link3 = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/3\";\n $auction->shop_rating_link4 = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/4\";\n $auction->shop_rating_link5 = $shopURL . \"rating/\" . $auction->auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/5\";\n $auction->shop_ambassador_link = $shopURL . \"ambassador/\" . $auction->subs_auction_number . \"-\" . $auction->txnid\n . \"-\" . substr(md5($auction->subs_auction_number . $auction->txnid\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"/\";\n $auction->shop_ambassador_link_yes = $shopURL . \"ambassador/\" . $auction->auction_number\n . \"-\" . substr(md5($auction->auction_number\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"-yes-\" . $nextID . \"/\";\n $auction->shop_ambassador_link_no = $shopURL . \"ambassador/\" . $auction->auction_number\n . \"-\" . substr(md5($auction->auction_number\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"-no-\" . $nextID . \"/\";\n $auction->shop_ambassador_link_never = $shopURL . \"ambassador/\" . $auction->auction_number\n . \"-\" . substr(md5($auction->auction_number\n . $auction->username . $shopuser->email . $shopuser->password), 0, 8) . \"-never-\" . $nextID . \"/\";\n//\t\t\t\t\t\t.$auction->auction_number.'+'.$auction->txnid.'+'.$auction->username.'+'.$shopuser->email.'+'.$shopuser->password;\n $auction->shop_url = 'http://www.' . $auction->url . '/' . $auction->cat_route . $auction->ShopSAAlias . '.html';\n if ((int)$template_name->smarty && $shoprow->id) {\n $shopCatalogue = new Shop_Catalogue($db, $dbr, $shoprow->id);\n $smarty->assign('shopCatalogue', $shopCatalogue);\n $docs = Shop_Catalogue::getDocs($db, $dbr, $shoprow->id, $auction->lang, $auction->lang);\n foreach ($docs as $doc) {\n if ($doc->code == 'logo') $smarty->assign('logo', $doc);\n }\n $smarty->assign('def_lang', $auction->lang);\n $banners_header = $shopCatalogue->listBanners(1, 'header');\n $smarty->assign('banners_header', $banners_header);\n if ($shopCatalogue->_shop->ssl) {\n $http = 'https';\n } else {\n $http = 'http';\n }\n $smarty->assign('http', $http);\n }\n } else {\n $auction->orderurl = $siteURL . 'order.php?a=' . $auction->auction_number . '&t=' . $auction->txnid . '&k=' . $key;\n }\n//\t\tdie($auction->auction_number.'-'.$auction->txnid\n//\t\t\t\t\t\t.'-'.$auction->username.'-'.$shopuser->email.'-'.$shopuser->password);\n }\n $auction->orderurl_tag = \"<a href='\" . $auction->orderurl . \"'>\" . $english[216] . \"</a>\";\n $auction->feedbackurl = $siteURL . 'feedback.php?auction=' . $auction->auction_number . '&txnid=' . $auction->txnid . '&key=' . $key;\n $auction->eBayfeedbackurl = getParByName($db, $dbr, $auction->siteid, \"_feedback_customer\") . $auction->auction_number;\n $auction->eBayurl = getParByName($db, $dbr, $auction->siteid, \"_cgi_eBay\") . $auction->auction_number;\n if (!isset($auction->alias)) $auction->alias = $dbr->getOne(\"select name from offer_name where id=\" . (int)$auction->name_id);\n $auction->smtp_num = $i;\n $auction->smtp = $sellerInfo->getDefSMTP();\n $auction->smtp = $auction->smtp->smtp;\n $auction->emailto = $sellerInfo->get('email');\n $auction->now = ServerTolocal(date(\"Y-m-d H:i:s\"), $timediff);\n $auction->today = date(\"Y-m-d\");\n $auction->gender_shipping_text = $english[$auction->gender_shipping];\n $auction->gender_invoice_text = $english[$auction->gender_invoice];\n if (is_a($loggedUser, 'User')) {\n $auction->name_of_user = $loggedUser->get('name');\n $auction->email_of_user = $loggedUser->get('email');\n } else {\n $auction->name_of_user = '';\n $auction->email_of_user = '';\n }\n if ($auction->delivery_date_customer != '0000-00-00') {\n $auction->delivery_notes = substitute($sellerInfo4template->getTemplate('delivery_notes', $locallang/*SiteToCountryCode($siteid)*/), $auction);\n } else {\n $auction->delivery_notes = substitute($sellerInfo4template->getTemplate('delivery_notes_default', $locallang/*SiteToCountryCode($siteid)*/), $auction);\n }\n\n if ($template == 'order_confirmation'){\n $payment_instruction_template = $dbr->getOne(\"select email_template from payment_method where `code`='\" . (is_a($auction, 'Auction')?$auction->get('payment_method'):$auction->payment_method) . \"'\");\n $auction->payment_instruction = standardEmail($db, $dbr, $auction, $payment_instruction_template, 0, 0, true);\n if($auction->payment_instruction==1){\n $auction->payment_instruction = '';\n }\n $ashop_id = (int)$dbr->getOne(\"select fget_AShop(\".(is_a($auction, 'Auction')?$auction->get('auction_number'):$auction->auction_number).\",\".(is_a($auction, 'Auction')?$auction->get('txnid'):$auction->txnid).\")\");\n if(!empty($ashop_id)){\n $subs_q = \"\n select t.*\n , sum(\n ROUND((IFNULL(ac.price_sold,0) - IFNULL(ac.ebay_listing_fee,0) - IFNULL(ac.additional_listing_fee,0) - IFNULL(ac.ebay_commission,0) - IFNULL(ac.vat,0) - IFNULL(ac.purchase_price,0)\n + IFNULL(ac.shipping_cost,0) -IFNULL(ac.vat_shipping,0) - IFNULL(ac.effective_shipping_cost,0)\n + IFNULL(ac.COD_cost,0) -IFNULL(ac.vat_COD,0) - IFNULL(ac.effective_COD_cost,0)\n /*- IFNULL(ac.packing_cost,0)*/)*IFNULL(ac.curr_rate,0), 2)\n ) as brutto_income_2_eur\n , sum(\n ROUND((IFNULL(ac.price_sold,0) - IFNULL(ac.ebay_listing_fee,0) - IFNULL(ac.additional_listing_fee,0) - IFNULL(ac.ebay_commission,0) - IFNULL(ac.vat,0) - IFNULL(ac.purchase_price,0)\n + IFNULL(ac.shipping_cost,0) -IFNULL(ac.vat_shipping,0) - IFNULL(ac.effective_shipping_cost,0)\n + IFNULL(ac.COD_cost,0) -IFNULL(ac.vat_COD,0) - IFNULL(ac.effective_COD_cost,0)\n /*- IFNULL(ac.packing_cost,0)*/), 2)\n ) as brutto_income_2\n , sum(\n ROUND(IFNULL(ac.price_sold,0) + IFNULL(ac.shipping_cost,0) + IFNULL(ac.COD_cost,0)\n + IFNULL(ac.vat_COD,0) + IFNULL(ac.vat_shipping,0),2)) as revenue\n , max(ac.curr_rate) curr_rate\n from (\n select au.offer_id, tmessage_to_buyer3.value message_to_buyer3, offer.message3_activate, offer.add_shipping_rules\n , total_price+total_shipping+total_cod+total_cc_fee price\n , au.saved_id, au.auction_number, au.txnid\n , min(sa1.shop_catalogue_id) catalogue_id, au.quantity, alias.name alias\n , tcatalogue_name.value catalogue_name\n , CONCAT(mau.auction_number,'/',mau.txnid) `order`\n from auction au\n join offer on au.offer_id=offer.offer_id\n join invoice i on i.invoice_number=au.invoice_number\n join auction mau on au.main_auction_number=mau.auction_number and au.main_txnid=mau.txnid\n join sa{$ashop_id} sa1 on sa1.id=au.saved_id\n left join sa_all master_sa on sa1.master_sa=master_sa.id\n join translation tcatalogue_name on tcatalogue_name.id=sa1.shop_catalogue_id\n and tcatalogue_name.table_name='shop_catalogue'\n and tcatalogue_name.field_name='name'\n and tcatalogue_name.language = mau.lang\n join translation tShopDesription on tShopDesription.id=IFNULL(master_sa.id, sa1.id)\n and tShopDesription.table_name='sa'\n and tShopDesription.field_name='ShopDesription'\n and tShopDesription.language = mau.lang\n join translation tmessage_to_buyer3 on tmessage_to_buyer3.id=IFNULL(master_sa.offer_id, sa1.offer_id)\n and tmessage_to_buyer3.table_name='offer'\n and tmessage_to_buyer3.field_name='message_to_buyer3'\n and tmessage_to_buyer3.language = mau.lang\n join offer_name alias on tShopDesription.value=alias.id\n where au.main_auction_number=\".(is_a($auction, 'Auction')?$auction->get('auction_number'):$auction->auction_number).\" and au.main_txnid=\".(is_a($auction, 'Auction')?$auction->get('txnid'):$auction->txnid).\"\n group by au.auction_number\n ) t\n join orders o on t.auction_number=o.auction_number and t.txnid=o.txnid\n left JOIN article_list al ON o.article_list_id = al.article_list_id\n LEFT JOIN auction_calcs ac ON o.article_list_id = ac.article_list_id\n AND o.auction_number = ac.auction_number\n AND o.txnid = ac.txnid\n and ac.article_id=o.article_id\n group by t.auction_number\n \";}else{\n $subs_q = \"select t.*\n , sum(\n ROUND((IFNULL(ac.price_sold,0) - IFNULL(ac.ebay_listing_fee,0) - IFNULL(ac.additional_listing_fee,0) - IFNULL(ac.ebay_commission,0) - IFNULL(ac.vat,0) - IFNULL(ac.purchase_price,0)\n + IFNULL(ac.shipping_cost,0) -IFNULL(ac.vat_shipping,0) - IFNULL(ac.effective_shipping_cost,0)\n + IFNULL(ac.COD_cost,0) -IFNULL(ac.vat_COD,0) - IFNULL(ac.effective_COD_cost,0)\n /*- IFNULL(ac.packing_cost,0)*/)*IFNULL(ac.curr_rate,0), 2)\n ) as brutto_income_2_eur\n , sum(\n ROUND((IFNULL(ac.price_sold,0) - IFNULL(ac.ebay_listing_fee,0) - IFNULL(ac.additional_listing_fee,0) - IFNULL(ac.ebay_commission,0) - IFNULL(ac.vat,0) - IFNULL(ac.purchase_price,0)\n + IFNULL(ac.shipping_cost,0) -IFNULL(ac.vat_shipping,0) - IFNULL(ac.effective_shipping_cost,0)\n + IFNULL(ac.COD_cost,0) -IFNULL(ac.vat_COD,0) - IFNULL(ac.effective_COD_cost,0)\n /*- IFNULL(ac.packing_cost,0)*/), 2)\n ) as brutto_income_2\n , sum(\n ROUND(IFNULL(ac.price_sold,0) + IFNULL(ac.shipping_cost,0) + IFNULL(ac.COD_cost,0)\n + IFNULL(ac.vat_COD,0) + IFNULL(ac.vat_shipping,0),2)) as revenue\n , max(ac.curr_rate) curr_rate\n from (\n select au.offer_id, tmessage_to_buyer3.value message_to_buyer3, offer.message3_activate, offer.add_shipping_rules\n , total_price+total_shipping+total_cod+total_cc_fee price\n , au.saved_id, au.auction_number, au.txnid\n , au.quantity, alias.name alias\n , CONCAT(mau.auction_number,'/',mau.txnid) `order`\n from auction au\n join offer on au.offer_id=offer.offer_id\n join invoice i on i.invoice_number=au.invoice_number\n left join auction mau on au.main_auction_number=mau.auction_number and au.main_txnid=mau.txnid\n join translation tmessage_to_buyer3 on tmessage_to_buyer3.id=au.offer_id\n and tmessage_to_buyer3.table_name='offer'\n and tmessage_to_buyer3.field_name='message_to_buyer3'\n and tmessage_to_buyer3.language = IFNULL(mau.lang, au.lang)\n left join offer_name alias on au.name_id=alias.id\n where IFNULL(mau.auction_number,au.auction_number)=\".(is_a($auction, 'Auction')?$auction->get('auction_number'):$auction->auction_number).\" and au.txnid=\".(is_a($auction, 'Auction')?$auction->get('txnid'):$auction->txnid).\"\n group by au.auction_number\n ) t\n join orders o on t.auction_number=o.auction_number and t.txnid=o.txnid\n left JOIN article_list al ON o.article_list_id = al.article_list_id\n LEFT JOIN auction_calcs ac ON o.article_list_id = ac.article_list_id\n AND o.auction_number = ac.auction_number\n AND o.txnid = ac.txnid\n and ac.article_id=o.article_id\n group by t.auction_number\";\n }\n $subs = $dbr->getAll($subs_q);\n if(isset($subs[0]) && strlen($subs[0]->message_to_buyer3) && $subs[0]->message3_activate) {\n $auction->data->offer_id = $subs[0]->offer_id;\n $auction->offer_id = $subs[0]->offer_id;\n }\n $auction->conditions_agree = standardEmail($db, $dbr, $auction, 'conditions_agree', 0, 0, true);\n if($auction->payment_method == 1 && $sellerInfo->get('giro_transfer_form') == 1){\n $rec = new stdClass;\n $rec->data = file_get_contents('./Einzahlungsschein_Beliani.pdf');\n $rec->name = 'Einzahlungsschein_Beliani.pdf';\n $attachments[] = $rec;\n }\n if (!$sellerInfo->get('dontsend_ruckgabebelehrung')) {\n $auction->send_Ruckgabebelehrung = standardEmail($db, $dbr, $auction, 'send_Ruckgabebelehrung', 0, 0, true);\n $smarty->assign('title','Ruckgabebelehrung');\n $smarty->assign('content_html',$auction->send_Ruckgabebelehrung);\n $content_ruckgabebelehrung = WKHtmlToPDF::render($smarty->fetch('_layout.tpl'));\n $rec = new stdClass;\n $rec->data = $content_ruckgabebelehrung;\n $rec->name = 'Ruckgabebelehrung.pdf';\n $attachments[] = $rec;\n }\n }\n if ($template == 'supervisor_alert' || $template == 'improvent_email') {\n require_once 'lib/Category.php';\n $vars = unserialize($auction->details);\n $category = Category::path($db, $dbr, $siteid, $vars['category']);\n $fun = create_function('$a', 'return $a->CategoryName;');\n $categoryName = implode('::', array_map($fun, $category));\n $category2 = Category::path($db, $dbr, $vars['siteid'], $vars['category2']);\n $categoryName2 = implode('::', array_map($fun, $category2));\n $offer = new Offer($db, $dbr, $auction->offer_id, $locallang);\n $auction->offer_name = $offer->get('name');\n $auction->category = $vars['category'] . ': ' . $categoryName;\n $auction->category2 = $vars['category2'] . ': ' . $categoryName2;\n $auction->category_featured = isset($vars['featured']) && $vars['featured'] ? 'yes' : 'no';\n $auction->gallery = $dbr->getOne(\"SELECT\n SUBSTRING_INDEX( SUBSTRING_INDEX( SUBSTRING_INDEX( apt.value, 's:7:\" . '\"gallery\"' . \";', -1 ) , '\" . '\"' . \"', 2 ), '\" . '\"' . \"', -1) gallery\n from auction_par_text apt\n where apt.key='details' and auction_number=$auction->auction_number and txnid=$auction->txnid\");\n if (!PEAR::isError($auction->gallery)) if (strlen($auction->gallery)) {\n $fn = basename($auction->gallery);\n $exts = explode('.', $fn);\n $ext = end($exts);\n switch ($ext) {\n case 'jpeg':\n case 'jpg':\n $im = imagecreatefromjpeg($auction->gallery);\n break;\n case 'bmp':\n $im = imagecreatefromwbmp($auction->gallery);\n break;\n }\n $destsx = 500;\n $destsy = $destsx * imagesy($im) / imagesx($im);\n $img2 = imagecreatetruecolor($destsx, $destsy);\n imagecopyresized($img2, $im, 0, 0, 0, 0, $destsx, $destsy, imagesx($im), imagesy($im));\n if (imagesx($im) < 500)\n $img2 = $im;\n imagejpeg($img2, './tmp/' . $fn, 100);\n $rec = new stdClass;\n $rec->data = file_get_contents('./tmp/' . $fn);\n $rec->name = $fn;\n $attachments[] = $rec;\n unlink('./tmp/' . $fn);\n };\n }\n if (\n $template == 'resend_payment_instruction_1' ||\n $template == 'resend_payment_instruction_2' ||\n $template == 'payment_instruction_1'\n ) {\n if ($auction->payment_method == 3 || $auction->payment_method == 2 || $auction->paid ||\n !$invoice->get('open_amount') || !$sellerInfo->get('send_payment_info')) {\n echo 'do not send';\n return 1;\n }\n $email = $auction->email_invoice;\n if($sellerInfo->get('giro_transfer_form') == 1){\n $rec = new stdClass;\n $rec->data = file_get_contents('./Einzahlungsschein_Beliani.pdf');\n $rec->name = 'Einzahlungsschein_Beliani.pdf';\n $attachments[] = $rec;\n }\n } elseif ($template == 'rating_case') {\n $email = $dbrr->getOne(\"select group_concat(distinct users.email)\n from users\n where users.deleted=0 and users.rating_case\n and (users.rating_case_if_manage=0 or\n (users.rating_case_if_manage=1 and exists (select o.id\n from auction au\n left join orders o on o.auction_number=au.auction_number and o.txnid=au.txnid\n join article a on a.article_id=o.article_id and a.admin_id=0\n join op_company_emp opc on opc.company_id=a.company_id\n join employee e on opc.emp_id=e.id\n where au.auction_number={$auction->auction_number} and au.txnid={$auction->txnid}\n and e.username=users.username\n union\n select o.id\n from auction au\n left join auction mau on mau.auction_number=au.main_auction_number and mau.txnid=au.main_txnid\n left join orders o on o.auction_number=au.auction_number and o.txnid=au.txnid\n join article a on a.article_id=o.article_id and a.admin_id=0\n join op_company_emp opc on opc.company_id=a.company_id\n join employee e on opc.emp_id=e.id\n where mau.auction_number={$auction->auction_number} and mau.txnid={$auction->txnid}\n and e.username=users.username))\n )\");\n $rating = $dbr->getRow(\"select text,code from auction_feedback\n where auction_number=$auction->auction_number and txnid=$auction->txnid and type='received'\n order by datetime desc limit 1 \");\n\n $auction->rating = $rating->text;\n\n if ($auction->txnid == 3) {\n if ($rating->code >= 4) $rating_received_color = 'green';\n elseif ($rating->code == 3) $rating_received_color = 'black';\n elseif ($rating->code <= 2) $rating_received_color = 'red';\n else $rating_received_color = '';\n } else {\n if ($rating->code == 1) $rating_received_color = 'green';\n elseif ($rating->code == 2) $rating_received_color = 'black';\n elseif ($rating->code == 3) $rating_received_color = 'red';\n else $rating_received_color = '';\n }\n $auction->rating_color = $rating_received_color;\n if ($auction->lang != 'english' && $auction->lang != 'german') {\n $result = translate_js_backend($rating->text, $auction->lang, 'english');\n $rating->text .= '<br><br>' . $result[1];\n }\n $auction->rating_case_text = $rating->text;\n $smarty->assign('stars_offset',(5-$rating->code)*20);\n $auction->rating_case_stars = $smarty->fetch('_stars.tpl');\n } elseif ($template == 'bonus_usage_notification') {\n $email = $sellerInfo->get('bonus_usage_notification_email');\n if (!strlen($email)) return false;\n $auction->bonus_title = $ins_id;\n } elseif ($template == 'wishlist_share_email') {\n $from = $auction->from;\n $from_name = $auction->from_name;\n $message = $auction->message;\n $subject = $auction->subject;\n $attachments = 'html';\n } elseif ($template == 'resend_wishlist_reminder') {\n $from = $auction->from;\n $message = $auction->message;\n $subject = $auction->subject;\n $attachments = 'html';\n } elseif ($template == 'supervisor_responsibles') {\n $email = $dbr->getOne(\"select email from users where deleted=0 and username='\" . $auction->sv_username . \"'\");\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n// \t\t print_r($sellerInfo);\n } elseif ($template == 'improvent_email') {\n $email_array = $dbr->getAssoc('select username, email from users where deleted=0 and get_customer_comment');\n if (strlen($sellerInfo->get('improvement_email')))\n $email_array = array_merge(array($sellerInfo->get('improvement_email')), $email_array);\n $email = implode(', ', $email_array);\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n// \t\t print_r($sellerInfo);\n } elseif ($template == 'new_comment_auction') {\n $auction->lastcomment = $dbr->getOne(\"select comment\n from auction_sh_comment where auction_number=\" . $auction->auction_number . \" and txnid=\" . $auction->txnid . \"\n order by id desc\n LIMIT 0, 1\");\n//\t\t\tprint_r($auction->lastcomment);\n } elseif ($template == 'resend_winning_mail_2') {\n //$subject = \"Auction $auction->auction_number won - final reminder!\";\n $email = $auction->email;\n } elseif ($template == 'payment_notification') {\n $auction->payment = $dbr->getOne(\"select value from translation where table_name='payment_method'\n and field_name='name' and id=(select id from payment_method where `code`='{$auction->payment_method}')\n and language='$auction->lang'\");\n $email = $sellerInfo->get('payment_notify_using_email');\n } elseif ($template == 'resend_winning_mail_1') {\n //$subject = \"Auction $auction->auction_number won - reminder!\";\n $email = $auction->email;\n } elseif ($template == 'winning_mail') {\n //$subject = \"Auction $auction->auction_number won !\";\n $email = $auction->email;\n } elseif ($template == 'thank_receiving_money') {\n //$subject = \"Thank you for your payment\";\n $email = $auction->email_invoice;\n } elseif ($template == 'ready_to_pickup') {\n //$subject = \"Auction $auction->auction_number : ready to pickup\";\n $email = $auction->email_invoice;\n $warehouse = new Warehouse($db, $dbr, $auction->pickup_warehouse);\n $auction->warehouse_name = $warehouse->get('name');\n $auction->warehouse_address = $warehouse->get('address1') . ' ' . $warehouse->get('address2') . ' ' . $warehouse->get('address3');\n $auction->warehouse_phone = $warehouse->get('phone');\n } elseif ($template == 'resend_ready_to_pickup_1') {\n //$subject = \"Auction $auction->auction_number : ready to pickup - reminder\";\n $email = $auction->email_invoice;\n $warehouse = new Warehouse($db, $dbr, $auction->pickup_warehouse);\n $auction->warehouse_name = $warehouse->get('name');\n $auction->warehouse_address = $warehouse->get('address1') . ' ' . $warehouse->get('address2') . ' ' . $warehouse->get('address3');\n $auction->warehouse_phone = $warehouse->get('phone');\n } elseif ($template == 'resend_ready_to_pickup_2') {\n //$subject = \"Auction $auction->auction_number : ready to pickup - final reminder\";\n $email = $auction->email_invoice;\n $warehouse = new Warehouse($db, $dbr, $auction->pickup_warehouse);\n $auction->warehouse_name = $warehouse->get('name');\n $auction->warehouse_address = $warehouse->get('address1') . ' ' . $warehouse->get('address2') . ' ' . $warehouse->get('address3');\n $auction->warehouse_phone = $warehouse->get('phone');\n } elseif ($template == 'rating_made') {\n //$subject = \"Auction $auction->auction_number : rating made\";\n $email = $auction->email;\n } elseif ($template == 'wait_receiving_rating') {\n //$subject = \"Auction $auction->auction_number : waiting for rating\";\n $email = $auction->email;\n }elseif ($template == 'op_order_container_arrived') {\n $email = $auction->email_invoice;\n }elseif ($template == 'add_stock_email') {\n $email = $auction->email_invoice;\n }elseif ($template == 'article_arrived_no_active_sa') {\n $email = $auction->email_invoice;\n }elseif ($template == 'order_confirmation') {\n $offer_id = $auction->offer_id;\n if (!$offer_id) {\n $offer_id = $dbr->getOne(\"select group_concat(offer_id) from auction where main_auction_number=\" . $auction->auction_number . \"\n and main_txnid=\" . $auction->txnid);\n }\n if ($sellerInfo4template->get('seller_channel_id') == 3) {\n $type = 'a';\n } else {\n switch ($auction->txnid) {\n case 1:\n $type = '';\n break;\n case 3:\n $type = 's';\n break;\n case 0:\n $type = '';\n break;\n default:\n $type = 'f';\n break;\n }\n }\n $shipping_plan_id = $dbr->getOne(\"SELECT value\n FROM translation\n WHERE table_name = 'offer'\n AND field_name = '\" . $type . \"shipping_plan_id'\n AND language = '\" . $auction->siteid . \"'\n AND id in ($offer_id)\");\n\n $shipping_plan = new \\ShippingPlan($db, $dbr, $shipping_plan_id, $locallang);\n $auction->rules_to_confirm = nl2br($shipping_plan->data->rules_to_confirm);\n\n $email = $auction->email_invoice;\n if (!strlen($email)) $email = $auction->email;\n $auction->order_confirmation = formatInvoice($auction->auction_number, $auction->txnid);\n $message = $sellerInfo4template->getTemplate($template, $locallang);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $message = substitute($message, $auction); // 2nd time, yes, yes\n if($auction->payment_method == 'klr_shp'){ // remove invoice number in case of klarna\n $message = preg_replace('~Invoice.*\\d*(<br>)?~', '', $message); // en\n $message = preg_replace('~Fakturanummer.*\\d*(<br>)?~', '', $message); // svenska\n $message = preg_replace('~Factuurnummer.*\\d*(<br>)?~', '', $message); // nl\n $message = preg_replace('~Rechnungsnummer.*\\d*(<br>)?~', '', $message); // de\n }\n // add meta charset utf-8, otherwise pdf displays bad non-utf-8 symbols\n $re = '~(<\\s*?head\\b[^>]*>)(.*?)(<\\/head\\b[^>]*>)~s';\n $message = preg_replace($re, '$1$2' . '<meta charset=\"UTF-8\">' . '$3', $message);\n\n $fn = md5($message);\n file_put_contents(\"tmp/$fn.html\", $message);\n $comand = \"/usr/local/bin/wkhtmltopdf \\\"tmp/$fn.html\\\" tmp/$fn.pdf\";\n $r = exec($comand);\n if (file_exists(\"tmp/$fn.pdf\")) {\n $result=file_get_contents(\"tmp/$fn.pdf\");\n unlink(\"tmp/$fn.pdf\");\n unlink(\"tmp/$fn.html\");\n }\n if($result){\n $rec = new stdClass;\n $rec->data = $result;\n $rec->name = $english[183] . '.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n }\n\n $message = '<html>\n<head>\n<meta\thttp-equiv=\"Content-Type\"\tcontent=\"charset=utf-8\" />\n</head>\n<body>\n' . (($message)) . '\n</body>\n</html>\n';\n } elseif ($template == 'shipping_details' || $template == 'picked_up_details' || $template == 'ready_to_pick_up_details') {\n //$subject = \"Auction $auction->auction_number : shipping details\";\n $email = $auction->email_shipping;\n if (!strlen($email)) $email = $auction->email;\n if ($auction->main_auction_number) return; // we dont send shipping_details for subinvoices, https://trello.com/c/oHiYashA/3784-hanna-kot-subinvoice-e-mails\n if ($email == 'removed') return;\n $method = new ShippingMethod($db, $dbr, $auction->shipping_method);\n if ($sellerInfo->get('dontsendShippingConfirmation') || $method->get('dontsendShippingConfirmation')) {/* echo '!dontsendShippingConfirmation!'; print_r($sellerInfo); print_r($method);*/\n return;\n }\n $auction->shipping_company_name = $method->get('company_name');\n $auction->shipping_company_phone = $method->get('phone');\n $auction->items_list = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, '', $locallang, '');\n $auction->items_list_past = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'past', $locallang, '');\n $auction->items_list_present = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'present', $locallang, '');\n $auction->items_list_future = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'future', $locallang, '');\n $auction->items_list_past_present = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'past_present', $locallang, '');\n $auction->ready_items_list = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, '', $locallang, 'ready_to_pick_up_details');\n $auction->ready_items_list_past = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'past', $locallang, 'ready_to_pick_up_details');\n $auction->ready_items_list_present = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'present', $locallang, 'ready_to_pick_up_details');\n $auction->ready_items_list_future = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'future', $locallang, 'ready_to_pick_up_details');\n $auction->ready_items_list_past_present = formatShippingList($db, $dbr, $auction->auction_number, $auction->txnid, 'past_present', $locallang, 'ready_to_pick_up_details');\n#\t\t\tdie();\n $attachments[] = 'html';\n $message = $sellerInfo4template->getTemplate($template, $locallang);\n $sms = $sellerInfo4template->getSMS($template, $locallang);\n $bcc = $sellerInfo->get('bcc');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n\n if($template == 'shipping_details' && $auction->payment_method != 'klr_shp'){\n $invoice = new Invoice($db, $dbr, $auction->invoice_number);\n $rec = new stdClass;\n $rec->data = $invoice->getInvoicePDF($db, $dbr, $auction->auction_number, $auction->txnid);\n $rec->name = ($sellerInfo->get('dont_show_vat') ? $english[250] : $english[59]) . ' ' . $auction->invoice_number . '.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n\n $items_list = Order::listAll($db, $dbr, $auction->auction_number, $auction->txnid, 1);\n $names = array();\n foreach ($items_list as $item) {\n if ($item->manual) continue;\n $senddocs = Article::getDocsTranslated($db, $dbr, $item->article_id, 1);\n $subarticles = Article::getSubArticles($item->article_id);\n foreach ($subarticles as $article) {\n $senddocs = array_merge($senddocs, Article::getDocsTranslated($db, $dbr, $article, 1));\n }\n if (count($senddocs)) foreach ($senddocs as $fichier_attache) {\n if (strlen($fichier_attache->$locallang->name)\n && !in_array($fichier_attache->$locallang->name, $names)\n ) {\n $rec = new stdClass;\n $rec->data = base64_decode($fichier_attache->$locallang->data);\n $rec->name = $fichier_attache->$locallang->name;\n $attachments[] = $rec;\n $names[] = $fichier_attache->$locallang->name;\n };\n }\n }\n // Tracking numbers\n $tracking_numbers = '';\n $tracking_numbers_buf = getTrackingNumbersList($db, $dbr, $auction->auction_number, $auction->txnid, 'present', $locallang, '');\n if(sizeof($tracking_numbers_buf)){\n foreach($tracking_numbers_buf as $tracking_number=>$tracking_url){\n $tracking_numbers .= empty($tracking_numbers) ? $tracking_number : ','.$tracking_number;\n if(!$auction->tracking_url){\n $auction->tracking_url = $tracking_url;\n }\n }\n $auction->separated_tracking_numbers = $tracking_numbers;\n }\n }\n\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $message = substitute($message, $auction); // 2nd time, yes, yes\n } elseif ($template == 'order_placed') {\n //$subject = \"Auction $auction->auction_number : order placed\";\n $email = $sellerInfo->get('email');\n $order = Order::listAll($db, $dbr, $auction->auction_number, $auction->txnid, 1);\n $currCode = siteToSymbol($auction->get('siteid'));\n $auction->items_list = formatItemsList($order, $currCode, $locallang);\n } elseif ($template == 'rma_based_invoice_sent' || $template == 'Ticket_based_driver_task_mark_as_shipped') {\n global $timediff;\n global $siteURL;\n $sellerInfo = new SellerInfo($db, $dbr, Config::get($db, $dbr, 'aatokenSeller'), $locallang);\n $au = new Auction($db, $dbr, $auction->auction_number, $auction->txnid);\n $rma = new Rma($db, $dbr, $au, $auction->rma_id);\n $user = new User($db, $dbr, $rma->get('responsible_uname'));\n $email = $user->get('email');\n if (!strlen($email)) $email = $sellerInfo->get('support_email');\n $auction->now = ServerTolocal(date(\"Y-m-d H:i:s\"), $timediff);\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n } elseif ($template == 'call_goods_back') {\n $rma_id = $ins_id;\n $auction->rma_id = $rma_id;\n $tnid = $rma_spec_id;\n $shipping_method = $dbr->getRow(\"select n.called_back_to, p.name as packet_name, n.pickup_date, n.shipping_number, n.weight\n from tracking_numbers n LEFT JOIN tn_packets p ON p.id=n.packet_id\n where n.auction_number=\" . $auction->auction_number . \"\n and n.txnid=\" . $auction->txnid . \" and n.id=$tnid\");\n if (PEAR::isError($shipping_method)) aprint_r($shipping_method);\n $auction->pickup_date = $shipping_method->pickup_date;\n if (!strlen($auction->pickup_date)) $auction->pickup_date = $english[154];\n $auction->weight = $shipping_method->weight;\n $auction->shipping_number = $shipping_method->shipping_number;\n if (!strlen($auction->shipping_number)) $auction->shipping_number = $english[154];\n $auction->packet_name = $shipping_method->packet_name;\n if (!strlen($auction->packet_name)) $auction->packet_name = $english[154];\n $shipping_method_id = $shipping_method->called_back_to;\n $meth = new ShippingMethod($db, $dbr, $shipping_method_id);\n $email = $meth->get('cs_email');\n if (!strlen($email)) {\n $errormsg = 'Email is not assigned to shipping company, call back order is NOT sent';\n return false;\n }\n if (is_a($loggedUser, 'User')) $email .= ', ' . $loggedUser->get('email');\n $auction->customer_number = $meth->get('customer_number');\n $auction->return_name = $meth->get('return_name');\n $auction->return_address1 = $meth->get('return_address1');\n $auction->return_address2 = $meth->get('return_address2');\n $auction->return_address3 = $meth->get('return_address3');\n } elseif ($template == 'stop_goods') {\n $rma_id = $ins_id;\n $tnid = $rma_spec_id;\n $row = $dbr->getRow(\"select number, stop_to from tracking_numbers\n where auction_number=\" . $auction->auction_number . \"\n and txnid=\" . $auction->txnid . \" and id=$tnid\");\n $auction->trackingnumber = $row->number;\n $shipping_method_id = $row->stop_to;\n if (PEAR::isError($shipping_method_id)) aprint_r($shipping_method_id);\n $meth = new ShippingMethod($db, $dbr, $shipping_method_id);\n $email = $meth->get('cs_email');\n if (!strlen($email)) {\n $errormsg = 'Email is not assigned to shipping company, stop order is NOT sent';\n return false;\n }\n if (is_a($loggedUser, 'User')) $email .= ', ' . $loggedUser->get('email');\n $auction->customer_number = $meth->get('customer_number');\n $auction->return_name = $meth->get('return_name');\n $auction->return_address1 = $meth->get('return_address1');\n $auction->return_address2 = $meth->get('return_address2');\n $auction->return_address3 = $meth->get('return_address3');\n } elseif ($template == 'temp_rating_request') {\n//\t\t\t$auction->siteurl = $siteURL;\n// $email = $auction->email;\n } elseif ($template == 'mark_as_shipped') {\n $emails = $dbr->getAssoc(\"select 1, '\" . $sellerInfo->get('marked_as_Shipped_email') . \"'\n from payment_method\n where not dontsend_marked_as_Shipped and code='\" . $auction->payment_method . \"'\n union\n select 2, marked_as_Shipped_email\n from source_seller where not dontsend_marked_as_Shipped and id=\" . $auction->source_seller_id);\n $email = implode(',', $emails);\n//\t\t$srcs = $dbr->getAll(\"select distinct `type` from auction_marked_as_Shipped_src where auction_id=\".$auction->id);\n /*\t\tforeach($srcs as $src) {\n switch ($src->type) {\n case 'payment_method':\n $email .= $sellerInfo->get('marked_as_Shipped_email');\n break;\n case 'source_seller':\n $email .= $dbr->getOne(\"select marked_as_Shipped_email from source_seller where id=\".$auction->source_seller_id);\n break;\n }\n }*/\n if (!strlen($email)) {\n $email = 'not defined';\n return;\n }\n//\t\t\tdie($email);\n } elseif ($template == 'supervisor_alert') {\n $email_array = $dbr->getAssoc('select username, email from users where deleted=0 and get_manag_alert');\n $email_array[] = $sellerInfo->get('management_alert_email');\n $email = implode(', ', $email_array);\n } elseif ($template == 'mass_email') {\n $email = $auction->email;\n if (strlen($auction->email_invoice))\n $email .= ', ' . $auction->email_invoice;\n if (strlen($auction->email_shipping))\n $email .= ', ' . $auction->email_shipping;\n /*\t\t\t$template = mysql_escape_string('<a onclick=\"alert('.\"'\"\n .(str_replace(\"\\r\", \"\", str_replace(\"\\n\", '\\n', ($auction->text)))).\"'\".')\">mass_email</a>');*/\n $message = $auction->text; //$sellerInfo->getTemplate('mass_email', SiteToCountryCode($siteid));//\t$sellerInfo->get($template);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n } elseif ($template == 'mass_doc' || $template == 'mass_doc_win' || $template == 'mass_doc_after_ticket_open'\n || $template == 'ricardo_pics' || $template == 'supplier_packing_docs'\n ) {\n $email = $auction->email;\n if (strlen($auction->email_invoice))\n $email .= ', ' . $auction->email_invoice;\n if (strlen($auction->email_shipping))\n $email .= ', ' . $auction->email_shipping;\n foreach ($auction->docs as $doc) {\n $rec = new stdClass;\n $rec->data = $doc->data;\n $rec->name = $doc->name;\n $attachments[] = $rec;\n }\n//\t\t\tprint_r($attachments);\n } elseif ($template == 'shop_requested_voucher_email') {\n $rec = new stdClass;\n $rec->data = $auction->templateHTML;\n $rec->name = 'doc.html';\n $attachments[] = $rec;\n $rec = new stdClass;\n $rec->data = $auction->templatePDF;\n $rec->name = 'doc.pdf';\n $attachments[] = $rec;\n } elseif ($template == 'ins_list') {\n $method = new ShippingMethod ($db, $dbr, $auction->shipping_method);\n $email = $method->get('email');\n if (is_a($loggedUser, 'User')) $email .= ',' . $loggedUser->get('email');\n $inses = Auction::findInsurance($db, $dbr, $auction->shipping_method, 1);\n foreach ($inses as $ins) {\n $list .= $siteURL . 'insurance.php?id=' . $ins->ins_id . \"\\r\\n\";\n }\n $auction->INS_list = $list;\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n } elseif ($template == 'brutto_income') {\n $rec = new stdClass;\n $static = '';\n $bi_sellers = \"&bi_sellers[]=\" . implode(\"&bi_sellers[]=\", $auction->bi_sellers);\n $auction->calcs_to_send_url = $siteURL . \"calcs_to_send.php?from_date_inv=\" . $auction->from_date_inv\n . \"&to_date_inv=\" . $auction->to_date_inv\n . \"&bi_sellers=\" . $bi_sellers;\n for ($i = 0; $i < 10; $i++) {\n $file = fopen($siteURL . \"calcs_to_send.php?from_date_inv=\" . $auction->from_date_inv\n . \"&to_date_inv=\" . $auction->to_date_inv\n . \"&bi_sellers=\" . $bi_sellers, \"r\");\n if (!$file) {\n $rep .= \"Unable to open remote file.\" . $siteURL . \"calcs_to_send.php?from_date_inv=\" . $auction->from_date_inv\n . \"&to_date_inv=\" . $auction->to_date_inv\n . \"&bi_sellers=\" . $bi_sellers . \", $i time\\n\";\n sleep(10);\n } else {\n break;\n }\n }\n while (!feof($file)) {\n $static .= fgets($file, 1024);\n }\n fclose($file);\n $rec->data = $static;\n $rec->name = 'Brutto Income.html';\n $attachments[] = $rec;\n $rec = new stdClass;\n $reccs = getCalcsBy($db, $dbr, '', '', '', '', '', '',\n $auction->from_date_inv, $auction->to_date_inv,\n '', '', '', '', '', '', '', '', \"'\" . implode(\"','\", $auction->bi_sellers_orig) . \"'\");\n $rec->data = formatBruttoIncomeXLS($reccs);\n $rec->name = 'Brutto Income.xls';\n $attachments[] = $rec;\n $email = $auction->super_emails;\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $total_amount = substr($static, strpos($static,\n '<b>Total brutto income - Total refunds - Total fees - Total Marketing = '));\n $total_amount = substr($total_amount, strlen(\n '<b>Total brutto income - Total refunds - Total fees - Total Marketing = '));\n $total_amount = substr($total_amount, 0, strpos($total_amount, '</b>'));\n if (isset($_GET['debugDate'])) {\n $dateForSubject = $_GET['debugDate'];\n } else {\n $dateForSubject = date('Y-m-d');\n }\n $subject .= ' ' . $dateForSubject . ', ' . $auction->title . ', ' . $total_amount;\n if (strlen($rep)) {\n mail(\"[email protected]\", \"brutto_income\", $rep);\n echo $rep;\n }\n } elseif ($template == 'inventory_status') {\n if ($ins_id) {\n $rma_id = $ins_id;\n $sups = $dbr->getAll(\"select email, rma_id from op_company oc\n join article a on oc.id=a.company_id\n join rma_spec rs on a.article_id=rs.article_id and not a.admin_id\n where rs.rma_id=$rma_id\n \");\n $supplier_email = '';\n foreach ($sups as $suprow) $supplier_email .= $suprow->email . ', ';\n $pics = $dbr->getAll(\"select rp.* from rma_pic rp\n join rma_spec rs on rp.rma_spec_id=rs.rma_spec_id\n where rs.rma_id = $rma_id and not rp.sent and not IFNULL(rp.hidden, 0) and not IFNULL(rs.hidden, 0)\");\n if (PEAR::isError($pics)) aprint_r($pics);\n }\n $rec = new stdClass;\n $rec->data = $auction->data;\n $rec->name = 'InventoryStatus.pdf';\n $attachments[] = $rec;\n $supplier_email = $dbr->getOne(\"select email from op_company where id=$ins_id\");\n $email_array = $dbr->getAssoc('select username, email from users where deleted=0 and inventory');\n $message = $sellerInfo4template->getTemplate($template, '');\n $super_emails = implode(', ', $email_array);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $auction->rma_id = $rma_id;\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $email = $supplier_email . ', ' . $super_emails;\n echo \": to $email<br>\";\n } elseif ($template == 'supplier_broken_item_email') {\n $auction->rma_id = $rma_spec_id;\n $problem_condition = $auction->problem_condition;\n\n $t1 = $auction->t1;\n $t2 = $auction->t2;\n $company_id = $ins_id;\n $auction->rma_url = $siteURL . 'rma.php?rma_id=' . $auction->rma_id . '&number=' . $auction->auction_number . '&txnid=' . $auction->txnid;\n\n if ($auction->send_anyway) { // for ONE ticket row only! so $rma_spec_id is really rma_spec_id\n $pics = $dbr->getAll(\"select op_company.email, rma_pic.*, rma_spec.article_id\n from rma_pic\n join rma_spec on rma_pic.rma_spec_id=rma_spec.rma_spec_id\n join article on rma_spec.article_id = article.article_id and not article.admin_id\n join op_company on article.company_id = op_company.id\n where rma_spec.rma_spec_id = $rma_spec_id\n and not rma_pic.hidden and not IFNULL(rma_spec.hidden, 0)\n and IFNULL( rma_spec.sell_channel, 0 )=0\n #and (broken_if_manage=0 or (broken_if_manage=1 and e.username=u.username))\n \");\n $email = $pics[0]->email; // . ',' . $auction->email_invoice; //https://trello.com/c/bLWjLTL7/2788-marta-g-send-picture-to-supplier WE DONT NEED TO SEND IT TO CUSTOMER\n $manager_info = $dbr->getRow(\"SELECT em.name,em.name2,em.email \n\t\t\t\t\t\t\t\tFROM employee em\n JOIN rma_spec ON rma_spec.rma_id=$rma_spec_id\n JOIN article ON article.article_id=rma_spec.article_id\n JOIN op_company_emp ON op_company_emp.company_id=article.company_id\n WHERE op_company_emp.emp_id=em.id\n AND op_company_emp.type='purch'\");\n $manager = $dbr->getOne(\"SELECT group_concat(concat(em.name,' ',em.name2,' ',em.email) separator '\n')\n\t\t\t\t\t\t\t\tFROM employee em\n JOIN rma_spec ON rma_spec.rma_spec_id=$rma_spec_id\n JOIN article ON article.article_id=rma_spec.article_id\n JOIN op_company_emp ON op_company_emp.company_id=article.company_id\n WHERE op_company_emp.emp_id=em.id\n AND op_company_emp.type='purch'\");\n } else { // for the complete ticket, sent by cron. In $rma_spec_id we have really rma_id\n $auction->send2username = \"'\".trim($auction->send2username,\"'\").\"'\";\n $pics = $dbr->getAll(\"select rma_pic.*, rma_spec.article_id\n from rma_pic\n join rma_spec on rma_pic.rma_spec_id=rma_spec.rma_spec_id\n/*\t\t\t\t\tjoin article on rma_spec.article_id = article.article_id and not article.admin_id\n join op_company on article.company_id = op_company.id\n left join op_company_emp on op_company_emp.company_id = op_company.id\n left join employee e on op_company_emp.emp_id=e.id\n left join users u on u.username=e.username*/\n where rma_spec.rma_id = $rma_spec_id\n and not rma_pic.hidden and not IFNULL(rma_spec.hidden, 0)\n #and ((op_company.id=$company_id \" . ($auction->send_anyway ? \"\" : \"and not rma_pic.sent_supplier\") . \")\n #\tor ($company_id=0 and not rma_pic.sent))\n and rma_pic.date between '\" . date('Y-m-d', $t1) . \"' and '\" . date('Y-m-d', $t2) . \"'\n $problem_condition\n and IFNULL( rma_spec.sell_channel, 0 )=0\n #and (broken_if_manage=0 or (broken_if_manage=1 and e.username in ({$auction->send2username})))\n \");\n $email = $auction->email_invoice;\n $manager_info = $dbr->getRow(\"SELECT em.name,em.name2,em.email FROM employee em\n JOIN rma_spec ON rma_spec.rma_id=$rma_spec_id\n JOIN article ON article.article_id=rma_spec.article_id\n JOIN op_company_emp ON op_company_emp.company_id=article.company_id\n WHERE op_company_emp.emp_id=em.id\n AND op_company_emp.type='purch'\");\n $manager = $dbr->getOne(\"SELECT group_concat(concat(em.name,' ',em.name2,' ',em.email) separator '\n')\n\t\t\t\t\t\t\t\tFROM employee em\n JOIN rma_spec ON rma_spec.rma_id=$rma_spec_id\n JOIN article ON article.article_id=rma_spec.article_id\n JOIN op_company_emp ON op_company_emp.company_id=article.company_id\n WHERE op_company_emp.emp_id=em.id\n AND op_company_emp.type='purch'\");\n }\n $auction->name_manager = $manager_info->name.' '.$manager_info->name2;\n $auction->email_manager = $manager_info->email;\n $auction->managers = $manager;\n $auction->company_id = $company_id;\n if (PEAR::isError($pics)) print_r($pics);\n if (!$company_id) {\n //$db->query(\"update rma_pic set sent=1 where rma_id = $rma_spec_id\");\n #now update in cron\n global $pic_ids;\n $pic_ids[] = $dbr->getOne(\"select group_concat(pic_id) from rma_pic where sent=0 and rma_id = $rma_spec_id\");\n }\n else {\n //$db->query(\"update rma_pic set sent_supplier=1 where rma_id = $rma_spec_id\");\n }\n\n if (!count($pics)) { echo 'nothing to send 1'; return;}\n if (count($pics)) {\n foreach ($pics as $pic) {\n if ($pic->article_id && strlen($pic->description)) {\n $auction->images .= \"<img src='cid:$pic->pic_id'><br>\";\n $rec = new stdClass;\n $rec->data = file_get_contents(\"http://{$_SERVER['HTTP_HOST']}/doc.php?doc_id={$pic->pic_id}&external=1\");\n $rec->name = $auction->rma_id . '-' . $pic->article_id . '-' . $pic->description;\n $attachments[] = $rec;\n }\n }\n }\n if (!count($attachments)) { echo 'nothing to send 2'; return;}\n\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n echo \": to \" . $auction->email_invoice . \"<br>\";\n } elseif ($template == 'supplier_broken_item_email_label') {\n $shipping_method_id = $ins_id;\n $problem_condition = $auction->problem_condition;\n $t1 = $auction->t1;\n $t2 = $auction->t2;\n $auction->rma_id = $rma_spec_id;\n $auction->rma_url = $siteURL . 'rma.php?rma_id=' . $auction->rma_id . '&number=' . $auction->auction_number . '&txnid=' . $auction->txnid;\n $pics = $dbr->getAll(\"select distinct rma_pic.*, rma_spec.article_id\n from rma_pic\n join rma_spec on rma_pic.rma_spec_id=rma_spec.rma_spec_id\n join rma on rma_spec.rma_id = rma.rma_id\n join article on rma_spec.article_id = article.article_id and not article.admin_id\n join op_company on article.company_id = op_company.id\n join auction on auction.main_auction_number=rma.auction_number and auction.main_txnid=rma.txnid\n join orders on rma_spec.article_id = orders.article_id\n and (orders.auction_number=auction.auction_number)\n and (orders.txnid=auction.txnid)\n join tn_orders on tn_orders.order_id = orders.id\n join tracking_numbers on tn_orders.tn_id = tracking_numbers.id\n where rma_spec.rma_id = $rma_spec_id\n and not rma_pic.sent_label\n and not rma_pic.hidden and not IFNULL(rma_spec.hidden, 0)\n and IFNULL( rma_spec.sell_channel, 0 )=0\n and rma_pic.date between '\" . date('Y-m-d', $t1) . \"' and '\" . date('Y-m-d', $t2) . \"'\n $problem_condition\n and tracking_numbers.shipping_method=\" . $shipping_method_id . \"\n union all\n select distinct rma_pic.*, rma_spec.article_id\n from rma_pic\n join rma_spec on rma_pic.rma_spec_id=rma_spec.rma_spec_id\n join rma on rma_spec.rma_id = rma.rma_id\n join article on rma_spec.article_id = article.article_id and not article.admin_id\n join op_company on article.company_id = op_company.id\n join orders on rma_spec.article_id = orders.article_id\n and (orders.auction_number=rma.auction_number)\n and (orders.txnid=rma.txnid)\n join tn_orders on tn_orders.order_id = orders.id\n join tracking_numbers on tn_orders.tn_id = tracking_numbers.id\n where rma_spec.rma_id = $rma_spec_id\n and not rma_pic.sent_label\n and not rma_pic.hidden and not IFNULL(rma_spec.hidden, 0)\n and IFNULL( rma_spec.sell_channel, 0 )=0\n and rma_pic.date between '\" . date('Y-m-d', $t1) . \"' and '\" . date('Y-m-d', $t2) . \"'\n $problem_condition\n and tracking_numbers.shipping_method=\" . $shipping_method_id . \"\n \");\n if (PEAR::isError($pics)) aprint_r($pics);\n $db->query(\"update rma_pic set sent_label=1\n where rma_id = $rma_spec_id\");\n if (!count($pics)) return;\n if (count($pics)) {\n foreach ($pics as $pic) {\n $auction->images .= \"<img src='cid:$pic->pic_id'><br>\";\n $rec = new stdClass;\n\n //$rec->data = base64_decode($pic->pic);\n\n $rec->data = file_get_contents(\"http://{$_SERVER['HTTP_HOST']}/doc.php?doc_id={$pic->pic_id}&external=1\");\n $rec->name = $auction->rma_id . '-' . $pic->article_id . '-' . $pic->name;\n $attachments[] = $rec;\n }\n }\n $message = $sellerInfo4template->getTemplate($template, '');\n// \t\t$message = $sellerInfo4template->getTemplate($template, $locallang);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $email = $auction->email_invoice;\n echo \": to $email<br>\";\n } elseif ($template == 'send_invoice' || $template == 'send_invoice_to_seller_email' || $template == 'send_invoice_shippingcompany') {\n if ($template == 'send_invoice' || $template == 'send_invoice_to_seller_email') {\n $email = $auction->email_invoice;\n } else {\n $email = $auction->email_shipping;\n }\n if (!strlen($email))\n $email = $auction->email;\n if (!strlen($email)) $email = $auction->email;\n if ($email == 'removed') return;\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $invoice = new Invoice($db, $dbr, $auction->invoice_number);\n $rec = new stdClass;\n $rec->data = $invoice->getInvoicePDF($db, $dbr, $auction->auction_number, $auction->txnid);\n $rec->name = $english[59] . ' ' . $auction->invoice_number . '.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n } elseif ($template == 'send_packing_list' || $template == 'send_packing_list_shippingcompany') {\n $email = $auction->email_shipping;\n if ($template == 'send_packing_list_shippingcompany' && !strlen($email)) return false;\n if (!strlen($email)) $email = $auction->email;\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n if($auction->payment_method != 'klr_shp'){\n $invoice = new Invoice($db, $dbr, $auction->invoice_number);\n $rec = new stdClass;\n $rec->data = $invoice->getShippingListPDF($db, $dbr, $auction->auction_number, $auction->txnid);\n $rec->name = $english[150] . ' ' . $auction->invoice_number . '.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n }\n } elseif ($template == 'shop_good_rating_thanks') {\n $q = \"select t.value good_rate_thanks_html\n , t1.value good_rate_thanks_subject\n from translation t\n left join translation t1 on {$auction->shop_id}=t1.id and t1.table_name='shop' and t1.field_name='good_rate_thanks_subject'\n and t1.language='{$auction->lang}'\n where {$auction->shop_id}=t.id and t.table_name='shop' and t.field_name='good_rate_thanks_html'\n and t.language='{$auction->lang}'\n \";\n $rec = $dbr->getRow($q);\n if (!strlen($auction->good_rate_thanks_html)) $auction->good_rate_thanks_html = $rec->good_rate_thanks_html;\n if (!strlen($auction->good_rate_thanks_subject)) $auction->good_rate_thanks_subject = $rec->good_rate_thanks_subject;\n $message = substitute($auction->good_rate_thanks_html, $auction);\n $message = substitute($message, $sellerInfo->data);\n $subject = substitute($auction->good_rate_thanks_subject, $auction);\n $subject = substitute($subject, $sellerInfo->data);\n $attachments = 'html';\n } elseif ($template == 'shop_rating_remember') {\n $message = substitute($auction->rating_remember_html, $auction);\n $message = substitute($message, $sellerInfo->data);\n $subject = substitute($auction->rating_remember_subject, $auction);\n $subject = substitute($subject, $sellerInfo->data);\n $attachments = 'html';\n } elseif ($template == 'send_SERVICEQUITTUNG') {\n//\t\t\techo 'send_SERVICEQUITTUNG for '.$ins_id.'<br>';\n return; # KDqgfQpH/1076-marta-changes-to-shipping-details-to-customer-and-servicequittung-mails\n $tnid = $ins_id;\n $r = $dbr->getRow(\"select * from tracking_numbers where id=$tnid\");\n $method = new ShippingMethod($db, $dbr, $r->shipping_method);\n if ($sellerInfo->get('dontsendSERVICEQUITTUNG')/* || $method->get('dontsendSERVICEQUITTUNG')*/) {\n#\t\t\t\techo 'seller='.$sellerInfo->get('dontsendSERVICEQUITTUNG').' method='.$method->get('dontsendSERVICEQUITTUNG');\n#\t\t\t\techo '<br>cant send Servicequitting'; die();\n return;\n }\n $email = $auction->email_shipping;\n if (!strlen($email)) $email = $auction->email;\n if ($email == 'removed') return;\n if ($tnid && $method->get('sendcustomSERVICEQUITTING')) {\n $message = $sellerInfo4template->getTemplate('send_SERVICEQUITTUNG_custom', $locallang);\n } else {\n $message = $sellerInfo4template->getTemplate($template, $locallang);\n }\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $subject = substitute($subject, $method->data);\n $message = substitute($message, $auction);\n $message = substitute($message, $method->data);\n $rec = new stdClass;\n $auobj = new Auction($db, $dbr, $auction->auction_number, $auction->txnid);\n $rec->data = $auobj->getSERVICEQUITTUNG_PDF($tnid);\n $rec->name = 'SERVICEQUITTUNG.pdf';\n $attachments[] = $rec;\n } elseif ($template == 'warehouse_volume_report') {\n $email = $auction->email;\n $attachments[] = $auction->attachments;\n } elseif ($template == 'warehouse_report') {\n $email = $auction->email;\n $attachments[] = $auction->attachments;\n } elseif ($template == 'automatic_generation_barcodes') {\n $email = $auction->email;\n $attachments[] = $auction->attachments;\n } elseif ($template == 'send_documents') {\n//\t\t\trequire_once 'mime_mail.class.php';\n $email = $auction->email_shipping;\n if (!strlen($email)) {\n $email = $auction->email;\n // echo \"No shipping email <br>\";\n//\t return;\n }\n if ($email == 'removed') return;\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $items_list = Order::listAll($db, $dbr, $auction->auction_number, $auction->txnid, 1);\n $names = array();\n $attach = 0;\n foreach ($items_list as $item) {\n if ($item->manual) continue;\n $senddocs = Article::getDocsTranslated($db, $dbr, $item->article_id, 1);\n $subarticles = Article::getSubArticles($item->article_id);\n foreach ($subarticles as $article) {\n $senddocs = array_merge($senddocs, Article::getDocsTranslated($db, $dbr, $article, 1));\n }\n if (count($senddocs)) foreach ($senddocs as $fichier_attache) {\n if (strlen($fichier_attache->$locallang->name)\n && !in_array($fichier_attache->$locallang->name, $names)\n ) {\n $rec = new stdClass;\n $rec->data = base64_decode($fichier_attache->$locallang->data);\n $rec->name = $fichier_attache->$locallang->name;\n $attachments[] = $rec;\n $names[] = $fichier_attache->$locallang->name;\n $attach = 1;\n };\n }\n }\n if (!$attach) return;\n } elseif (\n $template == 'customer_invoice'\n || $template == 'insurance'\n || $template == 'pictures'\n || $template == 'insurance_invoice'\n || $template == 'newcomment'\n || $template == 'send_announce_insurance'\n || $template == 'send_insurance'\n || $template == 'insurance_letter'\n ) {\n if (!$ins_id)\n $ins_id = $db->getOne('select max(id) from insurance where auction_number=' . $auction->auction_number\n . ' and txnid=' . $auction->txnid);\n if (!$ins_id) return \"You can't send this email because there is no insuarance cases in this auction\";\n $ins = new Insurance($db, $dbr, $ins_id);\n $method = new ShippingMethod ($db, $dbr, $ins->get('shipping_method'));\n $email = $method->get('email');\n if (!strlen($email)) return false;\n $auction->insurance_url = $siteURL . 'insurance.php?id=' . $ins_id;\n $auction->insuranceurl = $siteURL . 'insurance.php?id=' . $ins_id;\n $auction->insid = $ins_id;\n $auction->ins_date = $ins->get('date');\n $auction->ins_shipping_company_name = $method->get('company_name');\n $auction->ins_responsible_username = $dbr->getOne(\"select name from users where username='\" .\n $ins->get('responsible_username') . \"'\");\n $auction->lastcomment = $dbr->getOne(\"select comment\n from ins_comment where ins_id=$ins_id\n order by id desc\n LIMIT 0, 1\");\n $auction->comments_history = formatCommentHistory($db, $dbr, $ins_id);\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n switch ($template) {\n case 'insurance':\n $rec = new stdClass;\n $rec->data = $ins->getSelfPDF();\n $rec->name = 'Insurance case.pdf';\n $attachments[] = $rec;\n break;\n case 'customer_invoice':\n $rec = new stdClass;\n $rec->data = $ins->getInvoiceCustomerPDF();\n $rec->name = 'Invoice customer.pdf';\n $attachments[] = $rec;\n break;\n case 'pictures':\n $rec = new stdClass;\n $rec->data = $ins->getRMAPicturesPDF();\n $rec->name = 'pictures of broken items.pdf';\n if ($rec->data) $attachments[] = $rec;\n break;\n case 'insurance_invoice':\n $rec = new stdClass;\n $rec->data = $ins->getInvoicePDF();\n $rec->name = 'Invoice.pdf';\n $attachments[] = $rec;\n break;\n case 'newcomment':\n break;\n case 'send_announce_insurance':\n break;\n case 'send_insurance':\n $rec = new stdClass;\n $rec->data = $ins->getSelfPDF();\n $rec->name = 'Insurance case.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n $rec->data = $ins->getInvoicePDF();\n $rec->name = 'Invoice.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n $rec->data = $ins->getLetterPDF();\n $rec->name = 'Insurance letter1.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n $rec->data = $ins->getRMAPicturesPDF();\n $rec->name = 'pictures of broken items.pdf';\n $attachments[] = $rec;\n $rec = new stdClass;\n $rec->data = $ins->getInvoiceCustomerPDF();\n $rec->name = 'Invoice customer.pdf';\n $attachments[] = $rec;\n foreach ($ins->docs as $doc) {\n $doc->data = get_file_path($doc->data);\n $attachments[] = $doc;\n }\n break;\n case 'insurance_letter':\n $rec = new stdClass;\n $rec->data = $ins->getLetterPDF();\n $rec->name = 'Insurance letter1.pdf';\n $attachments[] = $rec;\n break;\n }\n } elseif (\n $template == 'not_assigned_ins_comment'\n || $template == 'new_responsible_insurance'\n ) {\n if (!$ins_id)\n $ins_id = $db->getOne('select max(id) from insurance where auction_number=' . $auction->auction_number\n . ' and txnid=' . $auction->txnid);\n if (!$ins_id) return \"You can't send this email because there is no insuarance cases in this auction\";\n $ins = new Insurance($db, $dbr, $ins_id);\n $auction->insurance_url = $siteURL . 'insurance.php?id=' . $ins_id;\n $auction->insuranceurl = $siteURL . 'insurance.php?id=' . $ins_id;\n $auction->insid = $ins_id;\n $auction->ins_date = $ins->get('date');\n $auction->ins_responsible_username = $dbr->getOne(\"select name from users where username='\" .\n $ins->get('responsible_username') . \"'\");\n $auction->lastcomment = $dbr->getOne(\"select comment\n from ins_comment where ins_id=$ins_id\n order by id desc\n LIMIT 0, 1\");\n $auction->comments_history = formatCommentHistory($db, $dbr, $ins_id);\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n } elseif (($template == 'shipping_order_datetime_approvement')\n || ($template == 'shipping_order_datetime_pickup_approvement')\n || ($template == 'customer_confirm_delivery')\n || ($template == 'shipping_order_datetime_late')\n || ($template == 'customer_reject_delivery')\n || ($template == 'removing_from_route')\n ) {\n\t\t// check for pickup and change template\n\t\tif ($template == 'customer_confirm_delivery'\n\t\t\t&& (in_array($auction->payment_method, array('bean_pck', 'ppcc_pck', 'gc_pck', 'pp_pck', 'cc_pck', '3', '4')) || $auction->txnid==4)\n\t\t\t) {\n\t\t\t$template = 'customer_confirm_pickup';\n\t\t}\n $attachments = 'html';\n $email = $auction->email_shipping;\n $sendmethod = $ins_id;\n if($template == 'customer_confirm_delivery'){\n $loggedUser = new User($db, $dbr, $auction->shipping_username, 1);\n if ($loggedUser->data->shipping_method > 0) {\n $meth = new ShippingMethod ($db, $dbr, $loggedUser->data->shipping_method);\n if (\n (strlen($auction->shipping_order_date) && $auction->shipping_order_date != '0000-00-00')\n && ($auction->shipping_order_time == '00:00:00'\n && ($meth->data->delivery_time_for_approvement_mail_from != '00:00:00'\n && $meth->data->delivery_time_for_approvement_mail_to != '00:00:00'))\n ) {\n $shipping_order_time = $meth->data->delivery_time_for_approvement_mail_from . \"-\" . $meth->data->delivery_time_for_approvement_mail_to;\n $auction->shipping_order_time = $shipping_order_time;\n }\n }\n }\n if($template == 'shipping_order_datetime_approvement'){\n $loggedUser = new User($db, $dbr, $auction->shipping_username, 1);\n if(strlen($auction->shipping_order_date) && $auction->shipping_order_date != '0000-00-00'\n && $auction->shipping_order_time == '00:00:00'){\n if(empty($loggedUser->data->shipping_method)){\n $msg = \"Auction shipping order time is {$auction->shipping_order_time} but no shipping method assigned\";\n die($msg);\n }\n $meth = new ShippingMethod ($db, $dbr, $loggedUser->data->shipping_method);\n if($meth->data->delivery_time_for_approvement_mail_from == '00:00:00'\n || $meth->data->delivery_time_for_approvement_mail_to == '00:00:00'){\n $msg = \"Please set delivery time for the <a target='_blank' href='/method.php?id={$meth->data->shipping_method_id}'>shipping method</a>\";\n die($msg);\n }\n }\n }\n list($auction->shipping_order_time_min,$auction->shipping_order_time_max) = get_auction_timeframes($auction);\n } elseif ($template == 'conditions_agree') {\n $email = $auction->email;\n//\t $subject = substitute($english[101], $auction);\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $offer = new Offer($db, $dbr, $auction->offer_id, $locallang);\n $auction->text_from_offer = substitute($offer->translated_message_to_buyer3, $sellerInfo->data);\n//\t\t\tif (!strlen($message)) $message = substitute($offer->data->message_to_buyer3,$sellerInfo->data);\n } elseif ($template == 'rules_to_confirm') {\n return; // combined with order_confirm\n $email = $auction->email;\n//\t $subject = substitute($english[119], $auction);\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n//\t\t\techo($message);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n if ($auction->offer_id) {\n $offer = new Offer($db, $dbr, $auction->offer_id, $locallang);\n } else {\n $offer_id = $dbr->getOne(\"select offer_id from auction where main_auction_number=\" . $auction->auction_number . \"\n and main_txnid=\" . $auction->txnid);\n $offer = new Offer($db, $dbr, $offer_id, $locallang);\n }\n if ($sellerInfo4template->get('seller_channel_id') == 3) {\n $type = 'a';\n } else {\n switch ($auction->txnid) {\n case 1:\n $type = '';\n break;\n case 3:\n $type = 's';\n break;\n case 0:\n $type = '';\n break;\n default:\n $type = 'f';\n break;\n }\n }\n $shipping_plan_id = $dbr->getOne(\"SELECT value\n FROM translation\n WHERE table_name = 'offer'\n AND field_name = '\" . $type . \"shipping_plan_id'\n AND language = '\" . $auction->siteid . \"'\n AND id = \" . $offer->get('offer_id'));\n $shipping_plan = new ShippingPlan($db, $dbr, $shipping_plan_id, $locallang);\n $message = $shipping_plan->data->rules_to_confirm;\n//\t\t\techo \"<br>$message<br>\";\n } elseif ($template == 'customer_shop_news') {\n $inside = 1;\n if (!isset($auction->email_invoice)) $auction->email_invoice = $auction->customer->email_invoice;\n if (!isset($auction->firstname_invoice)) $auction->firstname_invoice = $auction->customer->firstname_invoice;\n if (!isset($auction->name_invoice)) $auction->name_invoice = $auction->customer->name_invoice;\n $email = $auction->email;\n $subject = $auction->spam->subject;\n $from = $auction->spam->from_email;\n $from_name = $auction->spam->from_name;\n $xheaders = $auction->xheaders;\n foreach ($xheaders as $k => $r) {\n $xheaders[$k]->header = substitute($xheaders[$k]->header, $auction);\n }\n if (count($auction->spam->docs)) {\n $rec = new stdClass;\n $rec->data = substitute($auction->spam->body, $auction) . \"<img src='\" . $siteURL . \"image_shop.php?id=$nextID'>\";\n $rec->name = 'newsmail.html';\n $attachments[] = $rec;\n foreach ($auction->spam->docs as $doc) {\n $rec = new stdClass;\n\n $rec->data = $doc->data;\n $rec->name = $doc->name;\n $attachments[] = $rec;\n }\n } else {\n if($sendmethod=='sms'){\n $message = substitute($auction->spam->sms_body, $auction);\n $sms = substitute($auction->spam->sms_body, $auction);\n }else{\n $message = substitute($auction->spam->body, $auction) . \"<img src='\" . $siteURL . \"image_shop.php?id=$nextID'>\";\n $attachments = 'html';\n }\n }\n if (is_array($auction->auction_numbers)) $auction->auction_number = $auction->auction_numbers;\n $notes = serialize(array('shop_spam_id' => $auction->shop_spam_id));\n } elseif ($template == 'alarm') {\n $attachments = 'html';\n } elseif ($template == 'invoice_email') {\n $email = $auction->email;\n $message = $sellerInfo4template->getTemplate($template, '');\n list ($subject, $message_dummy) = explode(\"\\n\", $message, 2);\n $message = $auction->content;\n $attachments = 'html';\n } elseif ($template == 'shop_news_recommended') {\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $rec = new stdClass;\n $rec->data = $auction->content;\n $rec->name = 'newsletter.html';\n $attachments[] = $rec;\n $from = $auction->from;\n $from_name = $auction->from_name;\n } elseif ($template == 'send2friend') {\n $from = $auction->loggedCustomer->email_invoice;\n $from_name = $english[$auction->loggedCustomer->gender_invoice] . ' ' . $auction->loggedCustomer->firstname_invoice . ' ' . $auction->loggedCustomer->name_invoice;\n } elseif ($template == 'shop_question') {\n $from = $auction->from;\n $from_name = $auction->from_name;\n } elseif ($template == 'personal_voucher') {\n $message = $sellerInfo4template->getTemplate($template, $locallang);\n list ($subject, $message) = explode(\"\\n\", $message, 2);\n $rec = new stdClass;\n $rec->data = $auction->html;\n $rec->name = 'voucher.html';\n $attachments[] = $rec;\n $from = $sellerInfo->get('email');\n $from_name = $sellerInfo->get('email_name');\n $auction->auction_number = $auction->customer_id;\n $auction->txnid = -5;\n $notes = serialize(array('voucher_code' => $auction->voucher_code, 'voucher_id' => $auction->voucher_id));\n//\t\t\t$template .= $auction->voucher_id;\n } elseif ($template == 'send_container_booking') {\n $message = $auction->message;\n $subject = $auction->subject;\n#\t\t\techo $message; die();\n } elseif ($template == 'newsletter_partner_email') {\n $message = $auction->message;\n $subject = $auction->subject;\n#\t\t\techo $message; die();\n } elseif ($template == 'no_barcode_alert') {\n $warehouse = new Warehouse($db, $dbr, $auction->packed_warehouse);\n $auction->warehouse_name = $warehouse->get('name');\n\n $email = $dbr->getOne(\"SELECT GROUP_CONCAT(`u`.`email`) FROM `users` AS `u`\n JOIN `user_ware_no_barcode_alert` AS `nba` ON `u`.`username` = `nba`.`username`\n WHERE `nba`.`warehouse_id` = {$auction->packed_warehouse}\");\n\n $subject = \"No barcodes in {$auction->warehouse_name}\";\n } elseif ($template == 'a_article_ticket_alert') {\n $email = $dbr->getOne(\"select group_concat(email) from users where deleted=0 and sendNotinvoice_alert=1\");\n } elseif ($template == 'decompleted_barcode') {\n $email = $auction->email = $dbr->getOne(\"SELECT GROUP_CONCAT(email) FROM users WHERE deleted=0 AND barcode_alert=1;\");\n $subject = 'You have decompleted articles, please assign barcodes';\n $message = '<h2>' . $subject . \":</h2>\\n\";\n $message .= $auction->auction_links;\n } elseif ($template === 'oneoff_token') {\n $message = $auction->message;\n $subject = 'Token';\n $email = $auction->email;\n if (empty($email)) {\n $sendmethod = 'sms';\n }\n $sms = $auction->message;\n $notes = $auction->smsNumber;\n }\n\n if ($auction->op_order_id) {\n $auction->auction_number = $auction->op_order_id;\n $auction->txnid = -1;\n }\n if (!strlen($email)) $email = $auction->email_invoice;\n if (!strlen($from)) {\n $from = $template_name->email_sender;\n switch ($from) {\n case 'seller':\n $from = $sellerInfo->get('email');\n break;\n case 'user':\n if (is_a($loggedUser, 'User')) $from = $loggedUser->get('email');\n break;\n case 'system':\n $from = Config::get($db, $dbr, 'system_email');\n break;\n }\n }\n if (!strlen($from_name)) {\n switch ($template_name->email_sender) {\n case 'seller':\n $from_name = $sellerInfo->get('email_name');\n break;\n case 'user':\n if (is_a($loggedUser, 'User')) $from_name = $loggedUser->get('name');\n break;\n /*\t\t\tcase 'customer':\n $from_name = $loggedUser->get('name');\n $from = $loggedUser->get('name');\n break;*/\n case 'system':\n $from_name = Config::get($db, $dbr, 'system_email_name');\n break;\n }\n }\n $bcc = $sellerInfo->get('bcc');\n if (!$message) {\n if ($issystem) {\n $message = $sellerInfo4template->getTemplate($template, '');\n $sms = $sellerInfo4template->getSMS($template, '');\n $bcc = '';\n } else {\n $message = $sellerInfo4template->getTemplate($template, $locallang/*SiteToCountryCode($siteid)*/);//\t$sellerInfo->get($template);\n $sms = $sellerInfo4template->getSMS($template, $locallang);\n $bcc = $sellerInfo->get('bcc');\n }\n list ($subject1, $message) = explode(\"\\n\", $message, 2);\n//\t echo $subject.'-'.$subject1; die();\n if (!strlen($subject)) $subject = $subject1;\n }\n\n if ($auction->payment_method == 'bill_shp') {\n require_once 'XML/Unserializer.php';\n $q = \"select `data` from billpay_notify where token = (select token from payment_saferpay where auction_number = {$auction->auction_number})\";\n $data = $db->getOne($q);\n\n if (strlen($data)) {\n $opts = array('parseAttributes' => true);\n $us = new XML_Unserializer($opts);\n $us->unserialize($data);\n $POB = $us->getUnserializedData();\n unset($us);\n $sellerInfo->data->currency = siteToSymbol($auction->siteid);\n $sellerInfo->data->billpay_header_top = substitute($sellerInfo->data->billpay_header_top, $POB);\n $sellerInfo->data->billpay_header_right = substitute($sellerInfo->data->billpay_header_right, $POB);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $POB);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $sellerInfo->data);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $auction);\n $sellerInfo->data->country = translate($db, $dbr, CountryCodeToCountry($sellerInfo->get('country')), $locallang, 'country', 'name');\n $message = substitute($message, $POB);\n//\t\t\t\tdie($message);\n }\n } // for billpay only\n else {\n $sellerInfo->data->billpay_header_top = '';\n $sellerInfo->data->billpay_header_right = '';\n $sellerInfo->data->billpay_header_bottom = '';\n $sellerInfo->data->currency = siteToSymbol($auction->siteid);\n $sellerInfo->data->country = translate($db, $dbr, CountryCodeToCountry($sellerInfo->get('country')), $locallang, 'country', 'name');\n $message = substitute($message, $sellerInfo->data);\n }\n $subject = substitute($subject, $auction);\n $message = substitute($message, $auction);\n $message = substitute($message, $auction); // 2nd time, yes, yes\n $message = substitute($message, $sellerInfo->data);\n $message = substitute($message, $sellerInfo->data); // 2nd time, yes, yes\n $message = substitute($message, $auction); // 3rd time, yes, yes\n if ($auction->payment_method == 'bill_shp') {\n /*require_once 'XML/Unserializer.php';\n $q = \"select `data` from billpay_notify where token = (select token from payment_saferpay where auction_number = {$auction->auction_number})\";\n $data = $db->getOne($q);*/\n if (strlen($data)) {\n /*$opts = array('parseAttributes' => true);\n $us = new XML_Unserializer($opts);\n $us->unserialize($data);\n $POB = $us->getUnserializedData();\n unset($us);\n $sellerInfo->data->billpay_header_top = substitute($sellerInfo->data->billpay_header_top, $POB);\n $sellerInfo->data->billpay_header_right = substitute($sellerInfo->data->billpay_header_right, $POB);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $POB);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $sellerInfo->data);\n $sellerInfo->data->billpay_header_bottom = substitute($sellerInfo->data->billpay_header_bottom, $auction);*/\n $message = substitute($message, $auction);\n $message = substitute($message, $sellerInfo->data);\n $message = substitute($message, $POB);\n }\n } // for billpay only\n else {\n $sellerInfo->data->billpay_header_top = '';\n $sellerInfo->data->billpay_header_right = '';\n $sellerInfo->data->billpay_header_bottom = '';\n $message = substitute($message, $sellerInfo->data);\n }\n if ($auction->check) {\n $message = $message . \"<img src='\" . $siteURL . \"image_shop.php?id=$nextID'>\";\n }\n\n global $def_smtp;\n if ((int)$def_smtp)\n {\n $defsmtp = $def_smtp;\n }\n else if ((int)$_def_smtp)\n {\n $defsmtp = $_def_smtp;\n }\n else\n {\n $defsmtp = array(0 => $sellerInfo4template->getDefSMTP());\n }\n\n $altsmtps = $sellerInfo4template->getAltSMTPs();\n if ((int)$template_name->smarty) {\n $message = fetchfromstring($message);\n }\n\n if ($issystem) {\n $emails_array = explode(',', $email);\n foreach ($emails_array as $k => $user_email) {\n $user_email = mysql_real_escape_string($user_email);\n $user = $dbr->getRow(\"select u.deleted, super_u.email super_email\n from users u\n left join employee e on e.username=u.username\n left join emp_department ed on ed.id=e.department_id\n left join users super_u on super_u.username=ed.direct_super_username\n where u.email='$user_email'\");\n if ($user->deleted && strlen($user->super_email)) {\n $emails_array[$k] = $user->super_email;\n }\n } // foreach email\n $email = implode(',', $emails_array);\n }\n\n if ((isset($sendmethod) && $sendmethod == 'email') || !isset($sendmethod)) {\n global $debug;\n require_once 'mail_util.php';\n if ($template=='customer_shop_news') if (checkDoubleEmails($db, $template, $email, $subject, 60)) {\n echo \"!!! Double for $template, $email, $subject<br>\";\n return false;\n }\n\n $message_body = $message;\n if(!trim(strip_tags($message_body, '<img>'))) return;\n if ($ishtml && ! $issystem && $header_footer) {\n $layouts = ['header', 'footer'];\n $layouts = mulang_files_Get($layouts, 'email_template_layout', $sellerInfo->data->id); // update template layout logic\n\n $header = isset($layouts['header']) ? $layouts['header'] : [];\n $header = isset($header[$locallang]->value) ? $header[$locallang]->value : (isset($header['english']->value) ? $header['english']->value : '');\n\n $footer = isset($layouts['footer']) ? $layouts['footer'] : [];\n $footer = isset($footer[$locallang]->value) ? $footer[$locallang]->value : (isset($footer['english']->value) ? $footer['english']->value : '');\n\n $message = $header . $message . $footer;\n }\n $message = substitute($message, ['link_online_html' => '<a href=\"[[link_online]]\">online</a>']);\n if (empty($nextID)) {\n $db->exec('INSERT INTO ' . $template_name->log_table . ' (template, date, auction_number, txnid) VALUES (\\'\\', NOW(), 0, 0)');\n $nextID = $db->lastInsertID($template_name->log_table);\n }\n $emailKey = md5(SALT_EMAIL_ONLINE . $nextID);\n $shopCatalogue = new Shop_Catalogue($db, $dbr, $auction->shop_id);\n $http = $shopCatalogue->_shop->ssl ? 'https' : 'http';\n $link = (strpos($sellerInfo->data->web_page, 'http') !== false) ? $sellerInfo->data->web_page :\n $http . \"://\" . $sellerInfo->data->web_page;\n $link .= '/email/?id=' . $nextID . '&key=' . $emailKey;\n if($short_url = googleShortUrl($sellerInfo->get('google_apiKey'), $link)){\n $link = $short_url;\n }\n $message = substitute($message, ['link_online' => $link]);\n // if no send - return message body\n if($nosend){\n return $message_body;\n }\n $res = sendSMTP($db, $dbr, $email, $subject, $message, $attachments, $from, $from_name\n , $auction->auction_number, $auction->txnid, $template, $ins_id, $defsmtp, $inside, $notes, $bcc, $xheaders, $nextID);\n if ($template_name->alt) {\n $res1 = sendSMTP($db, $dbr, $email, $subject, $message, $attachments, $from, $from_name\n , $auction->auction_number, $auction->txnid, $template, $ins_id, $altsmtps, $inside, $notes, $bcc, $xheaders, $nextID);\n $res = $res || $res1;\n }\n $copy_to_email = $template_name->copy_to;\n if (strlen($copy_to_email)) {\n $nextID = 0;\n $res2 = sendSMTP($db, $dbr, $copy_to_email, $subject, $message, $attachments, $from, $from_name\n , $auction->auction_number, $auction->txnid, $template, $ins_id, $defsmtp, $inside, $notes, $bcc, $xheaders, $nextID);\n $res = $res || $res2;\n }\n }\n// UNLOCK TABLE email_log\n global $conv;\n global $debug;\n $msg = print_r($defsmtp, true) . $sellerInfo->get('username') . \"-SiteCode:\" . SiteToCountryCode($siteid) . \", $template, $email, <br>Subj=$subject, <br><br>Msg=$message, <br><br>($from_name)$from<br>\" . count($attachments) . \"<br>\" . $conv;\n if ($debug) echo $msg;\n if ($template != 'customer_shop_news' && (!$res || $debug)) {\n mail(\"[email protected]\", \"standardEmail!!!\", $msg);\n }\n $sms = substitute($sms, $auction);\n $number = $auction->shipping_order_datetime_sms_to;\n\n if ((isset($sendmethod) && $sendmethod == 'sms') || /*!isset($sendmethod)*/$send_sms) {\n if (strlen(Config::get($db, $dbr, 'clickatell_user'))\n && strlen(Config::get($db, $dbr, 'clickatell_password'))\n && strlen(Config::get($db, $dbr, 'clickatell_api_id'))\n && strlen(trim($sms))\n && !empty($number) && strlen($auction->$number)\n ) {\n if (substr($auction->$number, 0, 1) == '+') {\n $cleared_number = str_replace('+', '00', $auction->$number);\n } else {\n $pefix_field = str_replace('_','_country_code_', $auction->shipping_order_datetime_sms_to);\n $country_prefix = CodeToPhonePrefix($auction->{$pefix_field});\n if (substr($auction->$number, 0, 2) != $country_prefix) {\n $cleared_number = $country_prefix . $auction->$number;\n } else {\n $cleared_number = $auction->$number;\n }\n }\n\n if (Config::get($db, $dbr, 'use_php_sms_gateway')) {\n if (Config::get($db, $dbr, 'clickatell_cut0') == 1) {\n $sms2number = ltrim($cleared_number, '0');\n } elseif (Config::get($db, $dbr, 'clickatell_cut0') == 2) {\n $sms2number = ltrim($cleared_number, '0');\n while (strpos($sms2number, '00') !== 0) $sms2number = '0' . $sms2number;\n } else {\n $sms2number = $cleared_number;\n }\n\n $sms_emails = $dbr->getOne(\"select count(*) from sms_email\n where email='clickatell' and inactive=0 and '$sms2number' like CONCAT(sms_email.number,'%')\");\n if ($sms_emails) {\n $id = sendSMS_Clickatell($sms2number, substr($sms, 0, Config::get($db, $dbr, 'sms_message_limit'))\n , $auction->auction_number, $auction->txnid, $template, $nextID);\n } else {\n $id = \"Is requested to send the SMS to this number. Add to the SMS settings\";\n }\n }\n if (Config::get($db, $dbr, 'smsemail_cut0') == 1) {\n $sms2number = ltrim($cleared_number, '0');\n } elseif (Config::get($db, $dbr, 'smsemail_cut0') == 2) {\n $sms2number = ltrim($cleared_number, '0');\n while (strpos($sms2number, '00') !== 0) $sms2number = '0' . $sms2number;\n } else {\n $sms2number = $cleared_number;\n }\n $sms_emails = $dbr->getOne(\"select group_concat(email) from sms_email where inactive=0 and '$sms2number' like CONCAT(sms_email.number,'%')\");\n /**\n * @todo rewrite and document it\n * [email protected] should recieve number with leading + or 00\n */\n if (strlen($sms_emails)) {\n sendSMTP($db, $dbr, $sms_emails, $sms2number,\n substr($sms, 0, Config::get($db, $dbr, 'sms_message_limit')), array(), $from, $from_name,\n $auction->auction_number, $auction->txnid, $template, $ins_id,\n $defsmtp, $inside, $notes, $bcc,\n $xheaders, $nextID);\n }\n $res = '<br>SMS: ' . $sms_emails . ', ' . $id;\n }\n }\n\n return $res;\n}", "title": "" }, { "docid": "19cb63120dcc21df27246346daac0aa9", "score": "0.5486082", "text": "public static function checkSendEmails()\r\n {\r\n $nMailings = EmailSendQueue::getNMailings();\r\n\r\n if($nMailings > 0)\r\n Cron::sendEmails();\r\n }", "title": "" }, { "docid": "22a8e3b68df8f242cab100761c9c964a", "score": "0.5483513", "text": "public function send_mail() {\n\t\t\t\n\t\t\n\t\t$this->load->library(\"My_PHPMailer\");\n\t\t$session_data = $this->session->userdata('logged_in');\n\t\t$datav['codserv'] = $session_data['codserv'];\n\t\t$datav['nomeserv'] = $session_data['nomeserv'];\n\t\t$data = $this->inscricao_m->retorna_last_inscricao();\n\t\tforeach ($data as $linha){\n\t\t\t$idins = $linha->codinscricao;\n\t\t\t$nomeserv = $linha->nomeserv;\n\t\t\t$matriculasiapeservidor = $linha->siape;\n\t\t\t$nomecurso=$linha->nome;\n\t\t\t$mmodulo=$linha->modulo;\n\t\t\t$nturma=$linha->nometurma;\n\t\t\t$tdias=$linha->diasemana;\n\t\t\t$hrin=$linha->horainicio;\n\t\t\t$hrfim=$linha->horafim;\n\t\t\t$datain=$linha->datainicio;\n\t\t\t$dataf=$linha->datafim;\n\t\t\t$emailserv=$linha->email;\n\t\t\t$chefemail=$linha->emailchefe;\n\t\t\t$chefenome=$linha->nomechefe;\n\t\t\t$baseurl = base_url();\n\t\t\t\n\n\t\t\n $mail = new PHPMailer();\n $mail->IsSMTP(); //Definimos que usaremos o protocolo SMTP para envio.\n $mail->SMTPAuth = true; //Habilitamos a autenticação do SMTP. (true ou false)\n $mail->SMTPSecure = \"ssl\"; //Estabelecemos qual protocolo de segurança será usado.\n $mail->Host = \"smtp.gmail.com\"; //Podemos usar o servidor do gMail para enviar.\n $mail->Port = 465; //Estabelecemos a porta utilizada pelo servidor do gMail.\n $mail->Username = \"[email protected]\"; //Usuário do gMail\n $mail->Password = \"hillsong01\"; //Senha do gMail\n $mail->SetFrom('[email protected]', 'CODEP'); //Quem está enviando o e-mail.\n //$mail->AddReplyTo(\"[email protected]\",\"Nome Completo\"); //Para que a resposta será enviada.\n $mail->Subject = utf8_decode(\"CODEP - Confirmação da Inscrição\"); //Assunto do e-mail.\n //$mail->Body = \"Corpo do e-mail em HTML.<br />\";\n $mail->Body = utf8_decode( \"<p><h4>Inscrições - CODEP-DP/DAA </h4></p>\n <p>&nbsp;</p>\n\t\t <p>&nbsp;</p>\n <p>Olá, $nomeserv, sua inscrição no curso $nomecurso: módulo $mmodulo, foi realizada com sucesso!!</p>\n <p>Certifique-se que seu chefe recebeu o e-mail de pedido de autorização da sua inscrição, pois a mesma se faz necessário para que possa concorrer a vaga do curso que selecionou.</p>\n <p>&nbsp;</p>\n <p>A sua senha de acesso ao SICAP servirá para verificar o estado da sua inscrição, e também possui as seguintes funcionalidades:</p>\n<p>&nbsp;</p>\n <p>- Verificar se o seu chefe autorizou a sua inscrição;</p>\n\n <p>- Verificar a justificativa do chefe caso ele não autorize a sua inscrição e</p>\n\n <p>- Verificar se você foi matriculado no curso que se inscreveu</p>\n\n <p>&nbsp;</p>\n\n \n \n <p>&nbsp;</p>\n\n <p>OBS: A confirmação da inscrição não garante a vaga para o curso selecionado por você, a seleção dos inscritos é determinada a partir dos critérios regulamentados pela CODEP.</p>\n <p>&nbsp;</p>\n <p>Maiores informações pelo tel. 2681-4739 / 2681-4740 ou email [email protected]</p>\");\n\n $mail->AltBody = \"Corpo em texto puro.\";\n //$destino = \"[email protected]\";\n $mail->AddAddress($emailserv, $nomeserv);\n $mail->Send();\n \n /*Também é possível adicionar anexos.*/\n //$mail->AddAttachment(\"images/phpmailer.gif\");\n // $mail->AddAttachment(\"images/phpmailer_mini.gif\");\n $mail = new PHPMailer();\n $mail->IsSMTP(); //Definimos que usaremos o protocolo SMTP para envio.\n $mail->SMTPAuth = true; //Habilitamos a autenticação do SMTP. (true ou false)\n $mail->SMTPSecure = \"ssl\"; //Estabelecemos qual protocolo de segurança será usado.\n $mail->Host = \"smtp.gmail.com\"; //Podemos usar o servidor do gMail para enviar.\n $mail->Port = 465; //Estabelecemos a porta utilizada pelo servidor do gMail.\n $mail->Username = \"[email protected]\"; //Usuário do gMail\n $mail->Password = \"hillsong01\"; //Senha do gMail\n $mail->SetFrom('[email protected]', 'CODEP'); //Quem está enviando o e-mail.\n //$mail->AddReplyTo(\"[email protected]\",\"Nome Completo\"); //Para que a resposta será enviada.\n $mail->Subject = utf8_decode(\"CODEP - Autorização para Curso de Capacitação\"); //Assunto do e-mail.\n //$mail->Body = \"Corpo do e-mail em HTML.<br />\";\n $mail->Body = utf8_decode( \"<p><h4> Inscrições - CODEP-DP/DAA </h4></p>\n <p>&nbsp;</p>\n <p>Servidor:$nomeserv</p>\n <p>Matrícula SIAPE:$matriculasiapeservidor</p>\n\t\t\t <p>Curso escolhido:$nomecurso</p>\n\t\t\t <p>Módulo:$mmodulo<p/>\n\t\t\t <p>Turma:$nturma - $tdias - Horário: \".substr($hrin,0,5).\"h às \".substr($hrfim,0,5).\"h</p>\n <p>Início do Curso: \". date('d/m/Y', strtotime($datain)).\" - Término do curso: \". date('d/m/Y', strtotime($dataf)).\" </p>\n\t\t\t <p>&nbsp;</p>\n\t\t\t <p>&nbsp;</p>\n <p>Senhor dirigente,</p>\n <p>&nbsp;</p>\n <p>Para efetivar a inscrição do servidor descrito acima é necessário a sua autorização. A não autorização deverá ser acompanhada de justificativa.</p>\n\t\t <p>Solicitamos sua atenção ao autorizar, pois o mesmo servidor poderá realizar inscrições em cursos e ou módulos diferentes ao mesmo tempo. </p>\n <p>&nbsp;</p>\n\t\t\t\n <p>&nbsp;</p>\n\t\t\t <p>Para autorizar a insrição do servidor no curso.<a href=' \".$baseurl.\"usuario.php/cadastro/conferir/\".trim($matriculasiapeservidor).\"/$idins'>Clique Aqui</a></p>\n \n <p>&nbsp;</p>\n <p>Acesse o cronograma do Curso de Capacitação no Link abaixo:\n <a href='http://www.ufrrj.br/codep/avisos/inscricoes.php'>http://www.ufrrj.br/codep/avisos/inscricoes.php</a></p>\n <p>&nbsp;</p>\n\t\t\t <p>&nbsp;</p>\n <p>Maiores informações pelo tel. (21) (21) 2681-4739/2681-4740 ou email [email protected]</p>\");\n\n $mail->AltBody = \"Corpo em texto puro.\";\n //$destino = \"[email protected]\";\n $mail->AddAddress($chefemail, $chefenome);\n if(!$mail->Send()) {\n $datav[\"message\"] = \"ocorreu um erro durante o envio: \" . $mail->ErrorInfo;\n } else {\n $datav[\"message\"] = \"Mensagem enviada com sucesso!\";\n }\n$this->session->set_flashdata('cadastrook','Inscrição efetuada com sucesso');\n \n\nRedirect('inscricao/cadastrar');\n}//fim foreach\n}", "title": "" }, { "docid": "f077ddef1ea9cb056c4af435f8155341", "score": "0.5483022", "text": "function sendEmailNotification()\n {\n $link = $this->referer_page;\n $subject = 'Добавлен новый комментарий к ' . $this->referer_page;\n $body = 'Новый комментарий можете отмодерировать по ссылке <a href=\"/admin/index.php?module=71#id' . $this->id . '\"></a>';\n $SysSet = new SysSettings();\n $sett = $SysSet->GetGlobalSettings();\n $mail_admin = new Mail();\n $mail_admin->WordWrap = 500;\n $mail_admin->IsHTML(true);\n $mail_admin->Subject = $subject;\n $mail_admin->Body = $body;\n if (!empty($sett['mail_auto_emails'])) {\n $hosts = explode(\";\", $sett['mail_auto_emails']);\n for ($i = 0; $i < count($hosts); $i++) {\n //$arr_emails[$i]=$hosts[$i];\n $mail_admin->AddAddress($hosts[$i]);\n }\n //end for\n }\n $res_admin = $mail_admin->SendMail();\n return $res_admin;\n }", "title": "" }, { "docid": "8902a174eb96ae42bf29680aebda2d0f", "score": "0.5481955", "text": "function paid_sendEmail_admin($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$sendto = $this->adminemail;\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidadmin\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidadmin\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "title": "" }, { "docid": "11d25828877b7e14ba9a9d8ef4817b8d", "score": "0.5466125", "text": "function send_mail_feedback($email)\n{\n // $activation = md5(uniqid(rand(), true));\n // $key = hash(\"joaat\", uniqid(mt_rand(), true));\n $msg = \"Your timetable issue has being resolved\";\n\n //PHPMailer Object\n $mail = new PHPMailer;\n\n $mail->IsSMTP(); // enable SMTP\n $mail->SMTPDebug = 2; // debugging: 1 = errors and messages, 2 = messages only\n $mail->SMTPAuth = true; // authentication enabled\n $mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail\n $mail->SMTPAutoTLS = false;\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = 587;\n // optional\n // used only when SMTP requires authentication \n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = 'q.sill..';\n\n //From email address and name\n $mail->From = \"[email protected]\";\n $mail->FromName = \"Kenyatta University Timetable\";\n\n //To address and name\n $mail->addAddress($email); //Recipient name is optional\n\n //Address to which recipient will reply\n // $mail->addReplyTo(\"[email protected]\", \"Reply\");\n\n //CC and BCC\n // $mail->addCC(\"[email protected]\");\n // $mail->addBCC(\"[email protected]\");\n\n //Send HTML or Plain Text email\n $mail->isHTML(true);\n\n $mail->Subject = \"Timetable password\";\n $mail->Body = \"<i>$msg</i>\";\n $mail->AltBody = \"This is the plain text version of the email content\";\n\n if (!$mail->send()) {\n alert(\"Email could not be sent\");\n // echo \"Mailer Error: \" . $mail->ErrorInfo;\n } else {\n // echo \"Message has been sent successfully\";\n\n // header(\"location: ../feedback/feedback.php\");\n }\n}", "title": "" }, { "docid": "4910206aaf338605a24e9df344fc3727", "score": "0.5465418", "text": "function actual_send_newsletter($message, $subject, $language, $send_details, $html_only = 0, $from_email = '', $from_name = '', $priority = 3, $csv_data = '', $mail_template = 'MAIL')\n{\n require_lang('newsletter');\n\n // Put in archive\n $GLOBALS['SITE_DB']->query_insert('newsletter_archive', array('date_and_time' => time(), 'subject' => $subject, 'newsletter' => $message, 'language' => $language, 'importance_level' => 1));\n\n // Mark as done\n log_it('NEWSLETTER_SEND', $subject);\n set_value('newsletter_send_time', strval(time()));\n\n // Schedule the task\n require_code('tasks');\n return call_user_func_array__long_task(do_lang('NEWSLETTER_SEND'), get_screen_title('NEWSLETTER_SEND'), 'send_newsletter', array($message, $subject, $language, $send_details, $html_only, $from_email, $from_name, $priority, $csv_data, $mail_template), false, get_param_integer('keep_send_immediately', 0) == 1, false);\n}", "title": "" }, { "docid": "842a27a591cded602640f9b177ac0fc4", "score": "0.54594505", "text": "function notify_assigned_tutor($arr_tutors,$ses_id){ // assigned\r\n $today = date(\"Y-m-d H:i:s\"); // \r\n foreach ($arr_tutors as $key => $arr) {\r\n # code...\r\n // print_r($arr); die;\r\n //foreach ($arr_tutors as $tut_id) {\r\n $last_ses_id=$ses_id;// job_id , or session_id\r\n $notify_msg='Hot job found, Session ID-'.$ses_id;\r\n $tutorId=$arr['id']; //$tut_id;\r\n $f_name=$arr['f_name']; // mysql_query\r\n\r\n $msg_query1=(\" INSERT INTO notifications \r\n (receiver_id, type, sender_type,type_id, info, created_at) VALUES('$tutorId','job_changed',\r\n 'admin','$last_ses_id', '$notify_msg','$today')\");\r\n //echo $msg_query1 ; echo'<br/>';\r\n\r\n # code...\r\n // Send Email//\r\n $message=null;\r\n\r\n $message= \"Dear {$f_name},\r\n <br/><br/>\r\n There are Tutor Jobs available within next 24-48 hours that are unclaimed. Are you available? <br/>\r\n Please login and claim the Tutor Gig.<br/>\r\n <p><strong>Job ID</strong>:{$ses_id}</p>\r\n <br/><br/>\r\n\r\n Warm Regards,<br/><br/>\r\n Tutor Gigs Support Team<br/>\r\n <img alt='' src='https://tutorgigs.io/logo.png'> <br/><br/>\r\n <span style=' color: blue;font-size: 14px;\r\n font-style: italic;font-weight: bold;'>A great tutor can inspire, hope ignite the immigration, and instill a love of leaning.</span><br/>\r\n\r\n <span style='font-style: italic;\r\n font-size: 10px;\r\n color: blue;'>by Brad Henry</span><br/><br/>\r\n <span style='color: red;\r\n font-weight: bold;'>(832) 590-0674</span><br/> \";\r\n\r\n\r\n // Demo Email \r\n $message.='<br/><br/><strong>Note:-</strong> This is demo Email for Hot job found ,Please ignore it.!!!';\r\n\r\n //echo $message; die; \r\n $to=$arr['email'];\r\n\r\n \r\n\r\n send_job_email($email='',$to,$message,$f_name);\r\n\r\n //\r\n }\r\n /////Send job notification to Tutor.///\r\n\r\n\r\n\r\n}", "title": "" }, { "docid": "25000291cb170b674c8a8b8f2c3c790d", "score": "0.5454743", "text": "private function notify(){\n\t$dt = date(\"Y-m-d H:i:s\");\n $serverMessage = \"Hi,<br/><br/>\".\"Please find below the server details exceeding threshold.\".$this->mailMessage;\n SendMail::send_email(self::EMAIL_TO, $serverMessage,\"Servers exceeding threshold - $dt\"); \n }", "title": "" }, { "docid": "b60a58d52fb6f8cbbaa5fc768aa949df", "score": "0.54440725", "text": "public function actionWeeklyEmail(){\n //Code here\n\n return self::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "f7526db0769ccc821fb760c7fdc7689e", "score": "0.54378855", "text": "private function sendDeadlineNotifications()\n {\n $tasks = $this->taskService->getTaskHaveOverDeadline();\n\n $tasks->each(function ($itemTask, $keyTask) {\n if ($itemTask->taskSubscribers->isNotEmpty()) {\n $itemTask->taskSubscribers->each(function ($itemSub, $keySub) use ($itemTask) {\n $itemSub->user->notify(new DeadlineNotification(\n User::find($itemTask->creator_id) ?? $this->company, $itemTask, $itemSub->user)\n );\n });\n }\n });\n }", "title": "" }, { "docid": "ce938d958027a2ffd36fe3d14a6a2e3b", "score": "0.5436601", "text": "public static function do_cron()\n\t{\n\t\t$options = get_option( self::option_name );\n\t\t$admin_message = '';\n\t\t$headers = 'From: Comunicaciones Invertir Mejor <[email protected]>' . \"\\r\\n\";\n\t\t$headers .= \"Reply-To: [email protected]\" . \"\\r\\n\";\n\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=utf-8\\r\\n\";\n\n\t\t// Expire users\n\t\t$admin_message .= \"<h1>Expire Users Notification</h1>\";\n\t\t$range1 = date( 'Y-m-d H:i:s', date('U') );\n\t\t$range2 = date( 'Y-m-d H:i:s', strtotime( '+'.$options['notify_days'].' days' ) );\n\t\t$admin_message .= \"<p><strong>[Range: \". $range1 . \" to \" . $range2 . \"]</strong></p><p>Users:<br>\";\n\n\t\t$users = self::get_users_by_range( self::user_meta_expire_date, array( $range1, $range2 ), self::user_meta_expire_count );\n\t\t$admin_message .= self::send_mails( $users, $headers, $options['notify_subject'], $options['notify_text'], self::user_meta_expire_count);\n\n\t\t// Welcome message\n\t\t$admin_message .= \"</p><h1>Post User-Registration Notification</h1>\";\n\t\t$range1_temp = 4 + $options['welcome_days']; // The range is 4 since the shedule event is executed twice weekly (once 3.5 days), so 4 prevent for lost users notification\n\t\t$range1 = date( 'Y-m-d H:i:s', strtotime( '-'.$range1_temp.' days' ) );\n\t\t$range2 = date( 'Y-m-d H:i:s', strtotime( '-'.$options['welcome_days'].' days' ) );\n\t\t$admin_message .= \"<p><strong>[Range: \". $range1 . \" to \" . $range2 . \"]</strong></p><p>Users:<br>\";\n\n\t\t$users = self::get_users_by_range( self::user_meta_reg_date, array( $range1, $range2 ), self::user_meta_expire_welcome_messages_count );\n\t\t$admin_message .= self::send_mails( $users, $headers, $options['welcome_subject'], $options['welcome_text'], self::user_meta_expire_welcome_messages_count);\n\n\t\t$admin_message .= '</p>';\n\n\t\t// Report to admin\n\t\twp_mail( get_bloginfo('admin_email'), '[User Expire] Mensajes Enviados el Día de Hoy', $admin_message, $headers );\n\t}", "title": "" }, { "docid": "5fa0b98568739d54757ecb75e3e5fece", "score": "0.54355294", "text": "public function send_client_not_rps($useremail, $username, $instaname, $instapass) {\r\n //$mail->addReplyTo('[email protected]', 'First Last');\r\n //Set who the message is to be sent to\r\n $this->mail->clearAddresses();\r\n $this->mail->addAddress($useremail, $username);\r\n $this->mail->clearCCs();\r\n //$this->mail->addCC($GLOBALS['sistem_config']->SYSTEM_EMAIL, $GLOBALS['sistem_config']->SYSTEM_USER_LOGIN);\r\n $this->mail->addCC($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n $this->mail->addReplyTo($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n\r\n //Set the subject line\r\n //$this->mail->Subject = 'DUMBU Cliente sem perfis de referencia';\r\n $this->mail->Subject = 'DUMBU Client without reference profiles alert';\r\n\r\n //Read an HTML message body from an external file, convert referenced images to embedded,\r\n //convert HTML into a basic plain-text alternative body\r\n $username = urlencode($username);\r\n $instaname = urlencode($instaname);\r\n $instapass = urlencode($instapass);\r\n //$this->mail->msgHTML(file_get_contents(\"http://localhost/dumbu/worker/resources/emails/login_error.php?username=$username&instaname=$instaname&instapass=$instapass\"), dirname(__FILE__));\r\n //echo \"http://\" . $_SERVER['SERVER_NAME'] . \"<br><br>\";\r\n $lang = $GLOBALS['sistem_config']->LANGUAGE;\r\n $this->mail->msgHTML(@file_get_contents(\"http://\" . $_SERVER['SERVER_NAME'] . \"/dumbu/worker/resources/$lang/emails/not_reference_profiles.php?username=$username&instaname=$instaname&instapass=$instapass\"), dirname(__FILE__));\r\n\r\n //Replace the plain text body with one created manually\r\n //$this->mail->AltBody = 'DUMBU Cliente sem perfis de referência';\r\n $this->mail->AltBody = 'DUMBU Client without reference profiles alert';\r\n\r\n //Attach an image file\r\n $mail->addAttachment('images/phpmailer_mini.png');\r\n //send the message, check for errors\r\n if (!$this->mail->send()) {\r\n $result['success'] = false;\r\n $result['message'] = \"Mailer Error: \" . $this->mail->ErrorInfo;\r\n } else {\r\n $result['success'] = true;\r\n $result['message'] = \"Message sent!\" . $this->mail->ErrorInfo;\r\n }\r\n $this->mail->smtpClose();\r\n return $result;\r\n }", "title": "" }, { "docid": "879e844b1ab7337d1cd490892de63bf5", "score": "0.54274005", "text": "public function index()\r\n {\r\n try\r\n {\r\n\t\t\t$before_days = 3;\r\n\t\t\t$s_where = \" WHERE n.i_status=8\";\t\t\t\r\n\t\t\t$s_where .= \" AND FROM_UNIXTIME( n.i_expire_date , '%Y-%m-%d' )=DATE_ADD(curdate(), INTERVAL {$before_days} DAY)\";\r\n\t\t\t\r\n\t\t\t$info \t\t\t\t= $this->mod_job->fetch_multi($s_where);\r\n\t\t\t$total_db_records \t= $this->mod_job->gettotal_info($s_where);\r\n\t\t\t\r\n\t\t\tif($total_db_records>0)\r\n\t\t\t{\r\n\t\t\t\tfor($i=0;$i<$total_db_records;$i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t $i_job_id = $info[$i]['id'];\r\n\t\t\t\t $i_tradesman_id = $info[$i]['i_tradesman_id'];\r\n\t\t\t\t\t/* for job quote mail to the user */\r\n\t\t\t\t $this->load->model('tradesman_model','mod_td');\r\n\t\t\t\t $s_where = \" WHERE n.i_tradesman_user_id={$i_tradesman_id} AND n.i_job_id={$i_job_id} AND n.i_status=1\";\r\n\t\t\t\t $job_details = $this->mod_job->fetch_quote_multi($s_where,0,1);\r\n\t\t\t\t //echo '==========='.$i_tradesman_id;exit;\r\n\t\t\t\t $tradesman_details = $this->mod_td->fetch_tradesman_details($i_tradesman_id);\r\n\t\t\t\t \r\n\t\t\t\t $s_wh_id = \" WHERE n.i_user_id=\".$i_tradesman_id.\" \";\r\n\t\t\t\t $buyer_email_key = $this->mod_buyer->fetch_email_keys($s_wh_id);\r\n\t\t\t\t $is_mail_need = in_array('buyer_awarded_job',$buyer_email_key);\r\n\t\t\t\t \r\n\t\t\t\t if($is_mail_need)\r\n\t\t\t\t {\r\n\t\t\t\t $this->load->model('auto_mail_model');\r\n\t\t\t\t $content \t= $this->auto_mail_model->fetch_mail_content('buyer_awarded_job','tradesman',$tradesman_details['lang_prefix']);\r\n\t\t\t\t \r\n\t\t\t\t $filename \t= $this->config->item('EMAILBODYHTML').\"common.html\";\r\n\t\t\t\t $handle \t\t= @fopen($filename, \"r\");\r\n\t\t\t\t $mail_html \t= @fread($handle, filesize($filename));\r\n\t\t\t\t $s_subject \t= $content['s_subject'];\t\t\t\t\t\t\r\n\t\t\t\t\t//print_r($content); exit;\r\n\t\t\t\t\tif(!empty($content))\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$description = $content[\"s_content\"];\r\n\t\t\t\t\t\t$description = str_replace(\"[TRADESMAN_NAME]\",$tradesman_details['s_username'],$description);\r\n\t\t\t\t\t\t$description = str_replace(\"[BUYER_NAME]\",$job_details[0]['job_details']['s_buyer_name'],$description);\r\n\t\t\t\t\t\t$description = str_replace(\"[JOB_TITLE]\",$job_details[0]['job_details']['s_title'],$description);\t\r\n\t\t\t\t\t\t$description = str_replace(\"[QUOTE_AMOUNT]\",$job_details[0]['s_quote'],$description);\t\r\n\t\t\t\t\t\t$description = str_replace(\"[LOGIN_URL]\",base_url().'user/login/TVNOaFkzVT0',$description);\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tunset($content);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$mail_html = str_replace(\"[SITE_URL]\",base_url(),$mail_html);\t\r\n\t\t\t\t\t$mail_html = str_replace(\"[##MAIL_BODY##]\",$description,$mail_html);\r\n\t\t\t\t\t//echo \"<br>DESC\".$description;\texit;\r\n\t\t\t\t\t\r\n\t\t\t\t\t/// Mailing code...[start]\r\n\t\t\t\t\t$site_admin_email = $this->s_admin_email;\t\r\n\t\t\t\t\t$this->load->helper('mail');\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$i_newid = sendMail($tradesman_details['s_email'],$s_subject,$mail_html);\t\r\n /// Mailing code...[end]\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n unset($i_status,$i_job_id);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tunset($s_where,$info,$total_db_records);\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \t \t \r\n }", "title": "" }, { "docid": "ab03e87119c7b75e9007db0345ccf32e", "score": "0.5419663", "text": "public function action_pedestal_email_tester() {\n $newsletters = new \\WP_Query( [\n 'post_type' => 'pedestal_newsletter',\n 'posts_per_page' => 1,\n ] );\n if ( empty( $newsletters->posts ) ) {\n echo 'No published newsletters to test with.';\n die();\n }\n $newsletter = Newsletter::get( $newsletters->posts[0] );\n echo Email::get_email_template( 'newsletter', 'mc', [\n 'item' => $newsletter,\n 'email_type' => 'Daily',\n 'shareable' => true,\n ] );\n die();\n }", "title": "" }, { "docid": "87b64635aafbae18bcd85fcc8419853f", "score": "0.54142714", "text": "public function sendWaitingListRegisterEmail($data)\n\t{\n\t\t$to = $data['email_address'];\n\t\t$subject = \"WinterFest registration confirmation email - this is not your ticket to access the venue\";\n\t\t$details = \"\";\n\t\t$ical = $this->generateRegisterEventICalendar($data['entertainment_only']);\n\t\t\n\t\t// Create Details Confirmation\n\t\t$details .= \"Hello {$data['first_name']},<br /><br />\";\n\t\tif ( $data['entertainment_only'] == 1 && strtolower($data['has_guest']) == 'no' )\n\t\t{\n\t\t\t// Email 11 – From waiting list to Registered/NO Dinner/ NO Guest\n\t\t\t$details .= <<<OJAMBO\n\t\t\tThis email is to confirm that you are no longer on the waitlist and are now registered to the event.<br /><br />\n\t\t\tYou are registered to attend the <b style=\"font-weight: bold;\">entertainment portion</b> of WinterFest beginning at <b style=\"font-weight: bold;\">9pm</b>.<br /><br />\n\t\t\t<span style=\"background-color: #FFFF00\"><b style=\"font-weight: bold;\">Please note that this is a confirmation only and not your ticket for the event.</b></span><br /><br />\n\t\t\tTo access the event: <br />\n\t\t\tOn <b style=\"font-weight: bold;\">Wednesday December 7</b>, you will receive your ticket via email. To access the venue, you will need to <b style=\"font-weight: bold;\">print your ticket</b> and bring it with you. <br /><br /> \n\t\t\tYou will be required to show photo ID to enter the event. The name on the printed ticket must match the photo ID. <br /><br />\n\n\t\t\tIf you do not bring your printed ticket, you will be required to join the queue at the information desk located on site to re-register to attend the event. <br /><br />\n\t\t\tIf you have any questions, please visit our <a target=\"_blank\" href=\"https://kpmgwinterfest.ca/faq\">FAQ<a> page or contact the WinterFest mailbox [email protected].<br /><br />\n\t\t\t<b style=\"font-weight: bold;\">Registration Details:</b><br /><br />\n\t\t\t<i style=\"font-style: italic;\">Username and password:</i><br/ >\n\t\t\t{$data['email_address']} and {$data['password_one']}<br />\n\t\t\t<u style=\"text-decoration: underline;\">You have registered to attend:</u><br />\n\t\t\t<b style=\"font-weight: bold;\">Entertainment at 9pm</b><br /><br />\nOJAMBO;\n\t\t}\n\t\telseif ( $data['entertainment_only'] == 1 && strtolower($data['has_guest']) == 'yes' )\n\t\t{\n\t\t\t// Email 12 – From waiting list to Registered/NO Dinner/ YES Guest\n\t\t\t$details .= <<<OJAMBO\n\t\t\tThis email is to confirm that you are no longer on the waitlist and are now registered to the event.<br /><br />\n\t\t\tYou are registered to attend the <b style=\"font-weight: bold;\">entertainment portion</b> of WinterFest with your guest <b style=\"font-weight: bold;\">{$data['first_name_guest']} {$data['last_name_guest']}</b>.<br /><br />\n\t\t\t<span style=\"background-color: #FFFF00\"><b style=\"font-weight: bold;\">Please note that this is a confirmation only and not your ticket for the event.</b></span><br /><br />\n\t\t\tTo access the event: <br />\n\t\t\tOn <b style=\"font-weight: bold;\">Wednesday December 7</b>, you will receive your ticket via email. To access the venue, you will need to <b style=\"font-weight: bold;\">print your ticket and bring it with you</b>. <br /><br /> \n\t\t\tYou and your guest will be required to show photo ID to enter the event. The name on the printed ticket must match the photo ID. <br /><br />\n\n\t\t\tIf you do not bring your printed ticket, you will be required to join the queue at the information desk located on site to re-register to attend the event. <br /><br /> \n\t\t\tA reminder that <b style=\"font-weight: bold;\"><u style=\"text-decoration: underline;\">all attendees must be 19 years of age or older</u></b> to attend the event. <br /><br />\n\t\t\tIf you have any questions, please visit our <a target=\"_blank\" href=\"https://kpmgwinterfest.ca/faq\">FAQ<a> page or contact the WinterFest mailbox [email protected].<br /><br />\n\t\t\t<b style=\"font-weight: bold;\">Registration Details:</b><br /><br />\n\t\t\t<i style=\"font-style: italic;\">Username and password:</i><br/ >\n\t\t\t{$data['email_address']} and {$data['password_one']}<br />\n\t\t\t<i style=\"font-style: italic;\">Guest Name:</i><br />\n\t\t\t{$data['first_name_guest']} {$data['last_name_guest']}<br />\n\t\t\t<u style=\"text-decoration: underline;\">You have registered to attend:</u><br />\n\t\t\t<b style=\"font-weight: bold;\">Entertainment at 9pm</b><br /><br />\nOJAMBO;\n\t\t}\n\t\telseif ( $data['entertainment_only'] != 1 && strtolower($data['has_guest']) == 'no' )\n\t\t{\n\t\t\t// Email 13 – From waiting list to Registered/YES Dinner/ NO Guest\n\t\t\t$details .= <<<OJAMBO\n\t\t\tThis email is to confirm that you are no longer on the waitlist and are now registered to the event.<br /><br />\n\t\t\tYou are registered to attend <b style=\"font-weight: bold;\">the dinner and entertainment portions</b> of WinterFest.<br /><br />\n\t\t\t<span style=\"background-color: #FFFF00\"><b style=\"font-weight: bold;\">Please note that this is a confirmation only and not your ticket for the event.</b></span><br /><br />\n\t\t\tTo access the event: <br />\n\t\t\tOn <b style=\"font-weight: bold;\">Wednesday December 7</b>, you will receive your ticket via email. To access the venue, you will need to <b style=\"font-weight: bold;\">print your ticket and bring it with you</b>. <br /><br /> \n\t\t\tYou will be required to show photo ID to enter the event. The name on the printed ticket must match the photo ID. <br /><br />\n\n\t\t\tIf you do not bring your printed ticket, you will be required to join the queue at the information desk located on site to re-register to attend the event. <br /><br /> \n\t\t\tIf you have any questions, please visit our <a target=\"_blank\" href=\"https://kpmgwinterfest.ca/faq\">FAQ<a> page or contact the WinterFest mailbox [email protected].<br /><br />\n\t\t\t<b style=\"font-weight: bold;\">Registration Details:</b><br /><br />\n\t\t\t<i style=\"font-style: italic;\">Username and password:</i><br/ >\n\t\t\t{$data['email_address']} and {$data['password_one']}<br />\n\t\t\t<i style=\"font-style: italic;\">Dietary:</i><br />\n\t\t\t{$data['dietary_requirements']} {$data['dietary_requirements_other']}<br />\n\t\t\t<u style=\"text-decoration: underline;\">You have registered to attend:</u><br />\n\t\t\t<b style=\"font-weight: bold;\">Cocktail reception at 6pm / Dinner at 7pm / Entertainment at 9pm</b><br /><br />\nOJAMBO;\n\t\t}\n\t\telseif ( $data['entertainment_only'] != 1 && strtolower($data['has_guest']) == 'yes' )\n\t\t{\n\t\t\t// Email 14 – From waiting list to Registered/YES Dinner/ YES Guest\n\t\t\t$details .= <<<OJAMBO\n\t\t\tThis email is to confirm that you are no longer on the waitlist and are now registered to the event.<br /><br />\n\t\t\tYou are registered to attend the <b style=\"font-weight: bold;\">dinner and entertainment portions</b> of WinterFest with your guest <b style=\"font-weight: bold;\">{$data['first_name_guest']} {$data['last_name_guest']}</b>.<br /><br />\n\t\t\t<span style=\"background-color: #FFFF00\"><b style=\"font-weight: bold;\">Please note that this is a confirmation only and not your ticket for the event.</b></span><br /><br />\n\t\t\tTo access the event: <br />\n\t\t\tOn <b style=\"font-weight: bold;\">Wednesday December 7</b>, you will receive your ticket via email indicating the <b style=\"font-weight: bold;\">table number</b> you and your guest have been assigned to. <br /><br /> \n\t\t\tTo access the venue on the evening, you will need to <b style=\"font-weight: bold;\">print your ticket and bring it with you</b>. You and your guest will be required to show photo ID to enter the event. The name on the printed ticket must match the photo ID. <br /><br />\n\n\t\t\tIf you do not bring your printed ticket, you will be required to join the queue at the information desk located on site to re-register to attend the event. <br /><br /> \n\t\t\t<b style=\"font-weight: bold;\"><u style=\"text-decoration: underline;\">A reminder that all attendees must be 19 years of age or older</u></b> to attend the event. <br /><br />\n\t\t\tIf you have any questions, please visit our <a target=\"_blank\" href=\"https://kpmgwinterfest.ca/faq\">FAQ<a> page or contact the WinterFest mailbox [email protected].<br /><br />\n\t\t\t<b style=\"font-weight: bold;\">Registration Details:</b><br /><br />\n\t\t\t<i style=\"font-style: italic;\">Username and password:</i><br/ >\n\t\t\t{$data['email_address']} and {$data['password_one']}<br />\n\t\t\t<i style=\"font-style: italic;\">Dietary:</i><br />\n\t\t\t{$data['dietary_requirements']} {$data['dietary_requirements_other']}<br />\n\t\t\t<i style=\"font-style: italic;\">Guest Name:</i><br />\n\t\t\t{$data['first_name_guest']} {$data['last_name_guest']}<br />\n\t\t\t<i style=\"font-style: italic;\">Guest Dietary:</i><br />\n\t\t\t{$data['dietary_requirements_guest']} {$data['guest_dietary_requirements_other']}<br />\n\t\t\t<u style=\"text-decoration: underline;\">You have registered to attend:</u><br />\n\t\t\t<b style=\"font-weight: bold;\">Cocktail reception at 6pm / Dinner at 7pm / Entertainment at 9pm</b><br /><br />\nOJAMBO;\n\t\t}\n\t\t\n\t\t$details .= <<<OJAMBO\n\t\tWinterFest <i style=\"font-style: italic;\">FastForward!</i><br />\n\t\tSaturday, December 10, 2016<br />\n\t\tMetro Toronto Convention Centre – North Building<br />\n\t\t255 Front St. West, Toronto<br /><br />\n\n\t\tLooking <i style=\"font-style: italic;\">FastForward</i> to seeing you there!<br />\n\t\tKPMG WinterFest Crew<br />\nOJAMBO;\n\t\t\n\t\t// Create Mime Boundry\n\t\t$mime_boundary = \"Winterfest Registration Confirmation-\".md5(time());\n\t\t \n\t\t// Headers\n\t\t$headers = \"\";\n\t\t$headers .= \"MIME-Version: 1.0\\n\";\n\t\t$headers .= \"Content-Type: multipart/alternative; boundary=\\\"{$mime_boundary}\\\"\\n\";\n\t\t$headers .= \"Content-class: urn:content-classes:calendarmessage\\n\";\n\n\t\t\n\t\t// Email Body\n\t\t$message = \"\";\n\t\t$message .= \"--{$mime_boundary}\\n\";\n\t\t$message .= \"Content-Type: text/html; charset=UTF-8\\n\";\n\t\t$message .= \"Content-Transfer-Encoding: 8bit\\n\\n\";\n\t\t//$message .= \"Content-Transfer-Encoding: quoted-printable\\n\\n\";\n\n\t\t$message .= \"<html>\\n\";\n\t\t$message .= \"<body>\\n\";\n\t\t$message .= \"<p>Thank you. Your registration has now been confirmed with the details below. Please click on the attached icon to save the event in your Outlook calendar. We look forward to seeing you at the event!</p>\\n\";\n\t\t$message .= \"<p>{$details}</p>\\r\\n\";\n\t\t$message .= \"</body>\\r\\n\";\n\t\t$message .= \"</html>\\r\\n\";\n\t\t$message .= \"--{$mime_boundary}\\r\\n\";\n\t\t\n\t\t// Email Body Ical\n\t\t$message .= \"Content-Type: text/calendar; name=\\\"meeting.ics\\\"; method=REQUEST; charset=utf-8\\n\";\n\t\t$message .= \"Content-Transfer-Encoding: 8bit\\n\\n\";\n\t\t//$message .= \"Content-Transfer-Encoding: quoted-printable\\n\\n\";\n\t\t$message .= $ical;\n\t\t\n\t\tif ( wp_mail($to, $subject, $message, $headers) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "463724bc947890caac99943f552bc062", "score": "0.5412729", "text": "function sendEmail()\n{\n //There is not much to commit here. It's about 90% server-side config/setup\n //This is for testing\n //$emailStr = \"<div style='font-family: arial, verdana, sans-serif'>This is an email!\";\n //$emailStr.= date(\"Y-m-d H:i:s\").\"</div>\";\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\".\n 'Content-Type: text/html; charset=ISO-8859-1' . \"\\r\\n\".\n 'X-Mailer: PHP/' . phpversion() .\n\n $emailHead = \"<div style = 'font-family: arial, verdana, sans-serif'>\n <div style = 'font-size: 20px; text-shadow: 1px 1px 4px #000000; text-align: center; background-color: #00cbcc; color: white; padding: 1%;'>\n LTI Automation Email: Version 0.6a\n </div>\n <div style = ''>\n <br>\";\n\n global $emailMid;\n /*\n concat to test-\n\n Process run on 12-08-2015<br>Latest files determined to be WNCLN1072.ACF and WNCLN1072.ULH<hr><br><b>WNCLN1072.ACF downloaded successfully<br>WNCLN1072.ULH downloaded successfully</b>\";\n */\n $emailFoot = \"</div></div>\";\n\n mail(\"[email protected]\", \"LTI Automated Email\", $emailHead.$emailMid.$emailFoot, $headers); //, [email protected]\n}", "title": "" }, { "docid": "1c7bef69c501bc3957a8903383ad9dc4", "score": "0.54099137", "text": "public function sendmail()\n\t{\n\t\n\t\n\t\t$this->putlog(\"\\n Entered sendmail() \\n\");\n\t/*\t\n\t\t$host = \"localhost\";\n\t\t$user = \"root\";\n\t\t$pass = \"rgbxyz\";\n\t\t$dbname = \"audianz\";\n\t\t\n\t\t$con=mysqli_connect($host,$user,$pass,$dbname);\n\t*/\t\n\t\t// Check connection\n\t\tif (mysqli_connect_errno())\n\t\t{\n\t\t\tputlog(\"Failed to connect to database\");\n\t\t\techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t\t}\n\t\t\n\t\t$result = mysqli_query($con,\"SELECT * FROM userEmail\");\n\t\t$row = mysqli_fetch_array($result);\n\t\t\t\t\n\t\t$url=\" http://www.iitk89.eninovmobility.com/Yearbook/yearbook/?randome=\";\n\t\n\t\t$from\t\t\t\t= \"[email protected]\";\n\t\t$name\t\t\t\t= \"Priyanka Tripathi\";\n\t\t$subject = \"Yearbook layout :IITK89\";\n\t\n\t\t\n\t\t\n\t\t$config['protocol']\t= \"sendmail\";\n\t\t$config['wordwrap'] = TRUE;\n\t\t$config['mailtype'] = 'html';\n\t\t$this->email->initialize($config);\n\t\t\n\t\twhile($row = mysqli_fetch_array($result))\n\t\t{\n\t\t\tif($row['userEmailId']!=null)\n\t\t\t{\n\t\t\t\t$toemail\t= $row['userEmailId'];\n\t\t\t\t$this->email->from($from, $name);\n\t\t\t\t$this->email->to($toemail);\n\t\t\t\t$this->email->subject($subject);\n\t\t\t\t$link = $url.$row['randome'];\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t$body = \"Dear Alumni,\".\"<br>\".\"Greetings!\".\"<br>\".\n\t\t\t\t\t\t\"Please click the below link to have a quick view of the updated information in the YEAR BOOK PAGE\".\"<br>\".$link.\"<br>\".\n\t\t\t\t\t\t\"Do let us know if you have any changes for the same.\".\"<br>\".\"Regards\".\"<br>\".\"Priyanka\";\n\t\t\t\t$this->email->message($body);\n\t\t\t\t\t\n\t\t\t\t$res = $this->email->send();\n\t\t\t\tif($res==true)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t$this->putlog(\"\\n Email sent successfully to \".$toemail);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t$this->putlog(\"\\n Email could not be sent to \".$toemail);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse\n\t\t\t{ \n\t\t\t\t$this->putlog(\"\\n Email id not found \");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tmysql_close($con);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "10cfef7df60377dd6daed992d723fd87", "score": "0.5406508", "text": "function checkDueDates($dbh) {\n $sql = \"Select * from item where duedate = ?\";\n $data = array(date('Y-m-d', strtotime(date('Y-m-d'). ' + 3 days')));\n $rs = prepared_query($dbh, $sql, $data);\n $num_sent = 0;\n while ($row = $rs->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n $itemName = $row['nameOfObject'];\n $itemDue = $row['duedate'];\n $sql1 = \"Select * from borrows where objectNum = ?\";\n $data1 = array($row['objectID']);\n $rs1 = prepared_query($dbh, $sql1, $data1);\n \n while ($row1 = $rs1->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n //$thing = $row1['objectNum'];\n //echo \"object due in three days: \".$thing;\n $reminder = \"<html>\n<head>\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n <title>An item is due on LoanRetriever!</title>\n</head>\n<body>\nDear Borrower,\n\n<p>This is a reminder that \".findUserLogin($dbh, $_REQUEST['phpname']). \" would like \".$itemName.\" back by \".$itemDue.\". To arrange a time and place to meet them, please log into LoanRetriver: http://cs.wellesley.edu/~sstewar2/cs304/loanRetriever/mainCookie.php and message them. </p>\n\n<p>If something has happened to the item, we recommend contacting them to replace it as soon as possible. As always, honesty is the best policy.</p>\n\n<p>Thank you,</p>\n\n<p>LoanRetriever\n\n<p>we made fetch happen\n\n\n</body>\n</html>\n\";\n sendEmail($row1['bemail'], \"Item Due Soon!\", $reminder);\n $num_sent++;\n } \n }\n return \"$num_sent mail messages sent.\";\n}", "title": "" }, { "docid": "a83d8b809c489ee83603ccb7d8c156e7", "score": "0.5405254", "text": "function paid_sendEmail_supplier($details) {\n\n\t\t\t$currencycode = $details->currCode;\n\t\t\t$currencysign = $details->currSymbol;\n\n\t\t\t\t$custid = $details->bookingUser;\n\t\t\t\t$country = $details->userCountry;\n\t\t\t\t$name = $details->userFullName;\n\t\t\t\t$phone = $details->userMobile;\n\t\t\t\t$paymethod = $details->paymethod;\n\t\t\t\t$invoiceid = $details->id;\n\t\t\t\t$refno = $details->code;\n\t\t\t\t$totalamount = $details->checkoutTotal;\n\t\t\t\t$deposit = $details->checkoutAmount;\n\t\t\t\t$duedate = $details->expiry;\n\t\t\t\t$date = $details->date;\n\t\t\t\t$remaining = $details->remainingAmount;\n\t\t\t\t$custemail = $details->accountEmail;\t\t\t\t\n\t\t\t\t$sendto = $this->supplierEmail($details->module, $details->itemid);\n\n\t\t\t\t$sitetitle = \"\";\n\n\t\t\t\t$invoicelink = \"<a href=\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \" >\" . base_url() . \"invoice?id=\" . $invoiceid . \"&sessid=\" . $refno . \"</a>\";\n\t\t\t\t$template = $this->shortcode_variables(\"bookingpaidsupplier\");\n\t\t\t\t$details = email_template_detail(\"bookingpaidsupplier\");\n\t\t\t\t//$smsdetails = sms_template_detail(\"bookingpaidadmin\");\n\t\t\t\t$values = array($invoiceid, $refno, $deposit, $totalamount, $custemail, $custid, $country, $phone, $currencycode, $currencysign, $invoicelink, $sitetitle, $name);\n\t\t\t\t\n\t\t\t\t$message = $this->mailHeader;\n\t\t\t\t$message .= str_replace($template, $values, $details[0]->temp_body);\n\t\t\t\t$message .= $this->mailFooter;\n\n\t\t\t\t//$smsmessage = str_replace($template, $values, $smsdetails[0]->temp_body);\n\t\t\t\t//sendsms($smsmessage, $this->adminmobile, \"bookingpaidadmin\");\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from($this->sendfrom);\n\t\t\t\t$this->email->to($sendto);\n\t\t\t\t$this->email->subject('Booking Payment Notification');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t}", "title": "" }, { "docid": "427cebae91c41b8b28d65a720604867c", "score": "0.5403481", "text": "function userNotif($id){\nglobal $w, $wuser, $tsWeb;\n$usdfo = mysql_fetch_assoc(mysql_query(\"SELECT * FROM wnotifi WHERE id='\".$id.\"'\"));\nif($usdfo['id_emisor'] != $wuser->uid){\n$uskfjwlkeinfo = mysql_fetch_assoc(mysql_query(\"SELECT * FROM usuarios WHERE usuario_id='\".$usdfo['id_emisor'].\"'\"));\n$kg = $uskfjwlkeinfo['usuario_nombre'].' '.$this->web[$usdfo['tipo']]['text'].' '.$this->web[$usdfo['tipo']]['pref'];\n// 'X-Mailer: PHP/' . phpversion()\n$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'MIME-Version: 1.0' . \"\\r\\n\" .\n 'Content-type: text/html; charset=iso-8859-1';\n$sfkl5545 = $tsWeb->url($usdfo['tipo'], $usdfo['idg']);\nmail($wuser->info['usuario_email'], \"\".$w->wrecorte($kg, 40).\" | Wortit\", \"<style type='text/css'>body{margin:0px;padding: 0px;}</style><meta charset='utf-8' /><div style=''><div style='width: 100%;background: url(http://www.wortit.net/images/bg/menu-f5.png);'><div style='margin: 11px 0px 0px 19px;padding: 0px 0px 15px 0px;overflow: hidden;clear: both;'>Wortit</div><div style='margin: -38px 0px 0px 170px;position: absolute;color: #FFFFFF;font-weight: bold;font-family: verdana;'>Notificacion Por Correo</div></div><div style='margin: 8px;'><div style=''>Gracias por utilizar el sistema de notificaciones por email de WORTIT.</div><br><div style=''>\".$kg.\" \".$sfkl5545['extras'].\"</div><br><div style=''><span><a href='\".$sfkl5545['url'].\"' style='font-size:23px;'>Ver la notificacion en WORTIT</a></b></span></div></div></div>\", $headers);\n}\n}", "title": "" }, { "docid": "33e5bf7aa6e951eb9b2a77a7d4a17361", "score": "0.5401453", "text": "public function email_templates() {\t\n\t\t# Check login status...\n \t\t$this->_is_user_login ();\n\t}", "title": "" }, { "docid": "872cb7b744915754905b8ef8196094ce", "score": "0.5399076", "text": "function send_mail($db, $email, $user_id)\n{\n // $activation = md5(uniqid(rand(), true));\n $key = hash(\"joaat\", uniqid(mt_rand(), true));\n // $msg=\"Your Password is \".$key;\n $message = '<html><body>';\n $message .= '<h1 style=\"color:#f40;\">Hi !</h1>';\n $message .= '<p style=\"color:#080;font-size:18px;\">Dear Sir/Madam, Your account password is <strong>' . $key . '.</strong> after approval </h3></p>';\n $message .= '</body></html>';\n //PHPMailer Object\n $mail = new PHPMailer;\n\n $mail->IsSMTP(); // enable SMTP\n // $mail->SMTPDebug = 2; // debugging: 1 = errors and messages, 2 = messages only\n $mail->SMTPAuth = true; // authentication enabled\n $mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail\n $mail->SMTPAutoTLS = false;\n $mail->Host = 'smtp.gmail.com';\n $mail->Port = 587;\n // optional\n // used only when SMTP requires authentication \n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = 'q.sill..';\n\n //From email address and name\n $mail->From = \"[email protected]\";\n $mail->FromName = \"Kenyatta University Timetable\";\n\n //To address and name\n $mail->addAddress($email); //Recipient name is optional\n\n //Address to which recipient will reply\n // $mail->addReplyTo(\"[email protected]\", \"Reply\");\n\n //CC and BCC\n // $mail->addCC(\"[email protected]\");\n // $mail->addBCC(\"[email protected]\");\n\n //Send HTML or Plain Text email\n $mail->isHTML(true);\n\n $mail->Subject = \"Timetable user approved\";\n $mail->Body = \"<i>$message</i>\";\n $mail->AltBody = \"You are receiving this email from Timetable admin. if it was not You please ingore this message. Thank You.\";\n if (!$mail->send()) {\n\n alert(\"Email could not be sent\");\n // echo \"Mailer Error: \" . $mail->ErrorInfo;\n } else {\n // echo \"Message has been sent successfully\";\n\n $db->query(\"update users set status='approved', password='$key' where id=$user_id;\") or die($db->error);\n\n header(\"location: ../users/users.php\");\n }\n}", "title": "" }, { "docid": "121e7916888c080b5062e7a2d7953d86", "score": "0.5398435", "text": "public function sendPendingMail () {\n //get pending mail\n $criteria = new CDbCriteria();\n $criteria->compare('runTime', '<' . time());\n $criteria->compare('status', 'pending');\n $criteria->limit = 100;\n $criteria->order = 'runTime ASC';\n $emails = DbMailOutbox::Model()->findAll($criteria);\n if (!empty($emails)) {\n\n //get mailer extension\n Yii::import('ext.YiiMailer.YiiMailer');\n $this->mailer = new YiiMailer();\n\n foreach ($emails as $i => $email) {\n //clear mailer data from previous email\n $this->mailer->clear();\n\n //set recipients\n if(strpos($email->sendFrom,'@completeintel.com') !== false){\n $this->mailer->setFrom($email->sendFrom, Yii::app()->params['name']);\n } else {\n $this->mailer->setFrom($email->sendFrom, $email->sendFrom);\n }\n $this->mailer->Sender = $email->sendFrom;\n $this->mailer->ReturnPath = $email->sendFrom;\n\n if (strpos($email->sendTo, ',') !== false) {\n $this->mailer->setTo(explode(',', $email->sendTo));\n } else {\n $this->mailer->setTo($email->sendTo);\n }\n\n if (strpos($email->sendCc, ',') !== false) {\n $this->mailer->setCc(explode(',', $email->sendCc));\n } else {\n $this->mailer->setCc($email->sendCc);\n }\n\n if (strpos($email->sendBcc, ',') !== false) {\n $this->mailer->setBcc(explode(',', $email->sendBcc));\n } else {\n $this->mailer->setBcc($email->sendBcc);\n }\n \n\n //attach files\n if (!empty($email->attach)) {\n $email->formatSerialised('attach', 'array');\n foreach ($email->attach as $attachment) {\n $path = $attachment;\n if (!file_exists($path) || !is_file($path)) {\n $path = YiiBase::getPathOfAlias('root') . '/' . $attachment;\n }\n $this->mailer->setAttachment($path);\n }\n }\n\n //set email content\n $this->mailer->setBody($this->emogrify($email->body));\n $this->mailer->setSubject($email->subject);\n\n $this->mailer->isHTML(true);\n $this->mailer->clearLayout();\n $this->mailer->clearView();\n\n //send and log outcome\n if ($this->mailer->send()) {\n $email->status = 'sent';\n $email->sentTime = time();\n } else {\n $email->status = 'failed';\n }\n $email->save();\n }\n }\n }", "title": "" }, { "docid": "63818ef6f63a5e0267839e965065b3ea", "score": "0.5397493", "text": "function createMailing() {\n \n // Create the mailing and update the group/receipients\n $this->updateGroupandRecipients();\n \n // Update tracking options\n $this->updateTrackingOptions();\n \n // Update the templates and upload options\n $this->updateTemplateOptions();\n }", "title": "" }, { "docid": "8b99a4e432c79d1746d10e8961cbdda2", "score": "0.53946936", "text": "static public function email_sent() {\n\t}", "title": "" }, { "docid": "514a7a7ece11bef5118f8d09a84553d3", "score": "0.53942347", "text": "function send_mail_temp($to=\"\",$type=\"\",$vars=\"\")\n{\n // {\n $CI =& get_instance();\n $arraydata=array();\n $CI->db->where_in('field',array('smtp_host','smtp_port','smtp_username','smtp_password'));\n $getdata = $CI->db->get('settings');\n $data=$getdata->result();\n if(is_array($data) && count($data)>0)\n {\n foreach($data as $datai)\n {\n $arraydata[$datai->field]=$datai->value;\n }\n }\n $config = Array(\n 'protocol' => 'smtp',\n 'smtp_host' => $arraydata['smtp_host'],\n 'smtp_port' => $arraydata['smtp_port'],\n 'smtp_user' => $arraydata['smtp_username'],\n 'smtp_pass' => $arraydata['smtp_password'],\n 'mailtype' => 'html',\n 'charset' => 'iso-8859-1',\n 'wordwrap' => TRUE\n );\n $CI->load->library('email', $config);\n $CI->email->set_newline(\"\\r\\n\");\n $CI->db->where(array('type'=> $type));\n $equery= $CI->db->get('email');\n $getmaildetail1['body'] = $equery->result();\n $CI->email->from($getmaildetail1['body'][0]->from_email, $getmaildetail1['body'][0]->from_name);\n $sub = $getmaildetail1['body'][0]->subject;\n $body = $CI->load->view('user_mail_format',$getmaildetail1,TRUE);\n \n if($vars!=\"\")\n {\n if(count($vars))\n {\n foreach($vars as $key => $val)\n {\n if($key=='url')\n {\n $val=\"<a href='\".$val.\"'>Click Here</a></h1>\";\n }\n $body=str_replace($key,$val,$body);\n }\n $body = str_replace(\"{\",\"\",$body);\n $body = str_replace(\"}\",\"\",$body);\n }\n }\n \n $CI->email->to($to);\n\t\t//echo $to; exit;\n\t\tif($to=='[email protected]')\n\t\t{ \n\t \t$CI->email->cc('[email protected]');\n\t \t$CI->email->cc('[email protected]');\n\t \t$CI->email->cc('[email protected]');\n\t }\n $CI->email->subject($sub);\n $CI->email->message($body);\n $CI->email->set_mailtype('html');\n\n $CI->email->send();\n\t\t//if($to=='[email protected]')\n\t\t//{echo $to; exit;\n\t\t//$CI->email->cc('[email protected]');\n\t\t//$CI->email->cc('[email protected]');\n\t\t//$CI->email->cc('[email protected]');\n\t\t//}\n\t\treturn ;\n // }\n}", "title": "" }, { "docid": "5e155b47e51b545648cc2091db0ae330", "score": "0.53920805", "text": "public function uplinemail($user_code,$level) {\r\n $subject = \"You have a New Referral\";\r\n $body = \"\r\nDear \" . $username . \"\r\n\r\n\r\nThank you for supporting ZarFund.\r\n\r\nMember $username has just signed up as your level $level referral!\r\n\r\nName: $fullname\r\nEmail: $email\r\nPhone: $phone\r\n\r\nThank you.\r\n\r\nClassicAid Network\r\nYour Sure Path to Wealth\";\r\n \r\n $system_object->send_email($subject, $body, $email_address, $full_name);\t\r\n\t/*\t$headers = array(\"From: [email protected]\",\r\n \"Reply-To: [email protected]\",\r\n \"X-Mailer: PHP/\" . PHP_VERSION\r\n);\r\n$headers = implode(\"\\r\\n\", $headers);*/\r\n$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n$headers .= \"Content-type: text/html; charset=iso-8859-1\" . \"\\r\\n\";\r\n$headers .= \"From: \". $from. \"\\r\\n\";\r\n$headers .= \"Reply-To: \". $from. \"\\r\\n\";\r\n$headers .= \"X-Mailer: PHP/\" . phpversion();\r\n$headers .= \"X-Priority: 1\" . \"\\r\\n\"; \r\n\r\n$my_mail = \"[email protected]\";\r\n$my_replyto = \"[email protected]\";\r\n\r\n\t\tmail($email_address, $subject, $body, $headers);\r\n\t\t\r\n\t return $query ? $query : 0;\r\n\t}", "title": "" }, { "docid": "0def135d858d10e23ebaf673a8798dba", "score": "0.5383787", "text": "function isUsable(){\n\t\t// echo \"Testing \". $this['name']. '<br/>';\n\t\t// echo \"Last Email at \" . $this['last_emailed_at'] .'<br/>';\n\n\t\t// echo 'date(\"Y-m-d H:i:00\",strtotime($this[\"last_emailed_at\"])) = ' .date('Y-m-d H:i:00',strtotime($this['last_emailed_at'])) . '<br/>';\n\t\t// echo 'date(\"Y-m-d H:i:00\",strtotime($this->app->now)) = ' . date('Y-m-d H:i:00',strtotime($this->app->now)) . '<br/>';\n\n\t\t$this_minute_ok=false;\n\t\t$this_month_ok=false;\n\n\t\t$in_same_minute=false;\n\t\tif(date('Y-m-d H:i:00',strtotime($this['last_emailed_at'])) == date('Y-m-d H:i:00',strtotime($this->app->now)))\n\t\t\t$in_same_minute= true;\n\t\t\n\t\tif(!$in_same_minute) {\n\t\t\t$this['email_sent_in_this_minute']=0;\n\t\t\t$this->save();\n\t\t\t$this_minute_ok = true;\n\t\t}elseif($this['email_sent_in_this_minute'] < $this['email_threshold']){\n\t\t\t$this_minute_ok = true;\n\t\t}\n\n\t\t// emails sent in this month is under limit\n\t\t$month_emails_count = $this->add('xepan\\communication\\Model_Communication')\n\t\t\t->addCondition('communication_channel_id',$this->id)\n\t\t\t->addCondition('created_at','>=',date('Y-m-01',strtotime($this->app->now)))\n\t\t\t->addCondition('created_at','<',$this->app->nextDate(date('Y-m-t',strtotime($this->app->now))))\n\t\t\t->count();\n\n\t\tif($month_emails_count < $this['email_threshold_per_month'])\n\t\t\t$this_month_ok = true;\n\n\t\tif($this_minute_ok==true && $this_month_ok==true){\n\t\t\techo $this['name'].\" is usable<br/>\";\n\t\t\treturn true;\n\t\t}\n\n\t\techo $this['name'].\" is un-usable<br/>\";\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5fc6f69462c86c6e1967fac520c6312c", "score": "0.53811324", "text": "function send_unpaid_invoice_frequency_reminders()\n\t{\n\t\tglobal $ilance, $ilconfig, $ilpage;\n\t\t$cronlog = '';\n\t\t$count = 0;\n\t\t$message = array();\n\t\t$remindfrequency = $ilance->datetimes->fetch_date_fromnow($ilconfig['invoicesystem_resendfrequency']);\n\t\t$expiry = $ilance->db->query(\"\n\t\t\tSELECT user_id, invoiceid, projectid, buynowid, description, paiddate, invoicetype, duedate, createdate, amount, paid, totalamount, transactionid, isif, isfvf, currency_id, istaxable\n\t\t\tFROM \" . DB_PREFIX . \"invoices\n\t\t\tWHERE (invoicetype = 'commission' OR invoicetype = 'credential' OR invoicetype = 'debit')\n\t\t\t\tAND isdeposit = '0'\n\t\t\t\tAND iswithdraw = '0'\n\t\t\t\tAND ispurchaseorder = '0'\n\t\t\t\tAND (status = 'unpaid' OR status = 'scheduled')\n\t\t\t\tAND amount > 0\n\t\t\t\tAND projectid > 0 \n\t\t\", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($expiry) > 0)\n\t\t{\n\t\t\twhile ($reminder = $ilance->db->fetch_array($expiry, DB_ASSOC))\n\t\t\t{\n\t\t\t\t$user = $ilance->db->query(\"\n\t\t\t\t\tSELECT user_id, email, username, autopayment, first_name, available_balance\n\t\t\t\t\tFROM \" . DB_PREFIX . \"users\n\t\t\t\t\tWHERE user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\tLIMIT 1\n\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\tif ($ilance->db->num_rows($user) > 0)\n\t\t\t\t{\n\t\t\t\t\t$res_user = $ilance->db->fetch_array($user, DB_ASSOC);\n\t\t\t\t\t// does user have sufficient funds within online account to cover invoice\n\t\t\t\t\t// before we send an unpaid reminder?\n\t\t\t\t\tif ($res_user['available_balance'] >= $reminder['totalamount'] AND $res_user['autopayment'] == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\t// pay invoice using funds available via online account\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoices\n\t\t\t\t\t\t\tSET status = 'paid',\n\t\t\t\t\t\t\tpaid = '\" . $reminder['totalamount'] . \"',\n\t\t\t\t\t\t\tpaymethod = 'account',\n\t\t\t\t\t\t\tpaiddate = '\" . DATETIME24H . \"',\n\t\t\t\t\t\t\tcustommessage = '\" . $ilance->db->escape_string('{_automated_debit_from_account_balance_via_billing_and_payments}') . \"'\n\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\t\tAND invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t// adjust customers online account balances\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"users\n\t\t\t\t\t\t\tSET total_balance = total_balance - $reminder[totalamount],\n\t\t\t\t\t\t\tavailable_balance = available_balance - $reminder[totalamount]\n\t\t\t\t\t\t\tWHERE user_id = '\" . $res_user['user_id'] . \"'\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t// handle the insertion fee and/or final value fee automatic payment settlement and set the fields in the auction table to paid\n\t\t\t\t\t\tif ($reminder['isif'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// this is an insertion fee.. update auction listing table\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"projects\n\t\t\t\t\t\t\t\tSET isifpaid = '1'\n\t\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($reminder['isfvf'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// this is a final value fee.. update auction listing table\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"projects\n\t\t\t\t\t\t\t\tSET isfvfpaid = '1'\n\t\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this could also be a payment from the \"seller\" for an unpaid \"buy now\" escrow fee OR unpaid \"buy now\" fvf.\n\t\t\t\t\t\t// let's check the buynow order table to see if we have a matching invoice to update as \"ispaid\"..\n\t\t\t\t\t\t// this scenerio would kick in once a buyer or seller deposits funds, this script runs and tries to pay the unpaid fees automatically..\n\t\t\t\t\t\t// at the same time we need to update the buy now order table so the presentation layer knows what's paid, what's not.\n\t\t\t\t\t\t$buynowcheck = $ilance->db->query(\"\n\t\t\t\t\t\t\tSELECT escrowfeeinvoiceid, escrowfeebuyerinvoiceid, fvfinvoiceid, fvfbuyerinvoiceid\n\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\tWHERE project_id = '\" . $reminder['projectid'] . \"'\n\t\t\t\t\t\t\t\tAND orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\tif ($ilance->db->num_rows($buynowcheck) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$resbuynow = $ilance->db->fetch_array($buynowcheck, DB_ASSOC);\n\t\t\t\t\t\t\tif ($reminder['invoiceid'] == $resbuynow['escrowfeeinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from seller paying a buy now escrow fee\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isescrowfeepaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['escrowfeebuyerinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from buyer paying a buy now escrow fee\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isescrowfeebuyerpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['fvfinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from seller paying a buy now fvf\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isfvfpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reminder['invoiceid'] == $resbuynow['fvfbuyerinvoiceid'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// invoice being paid is from buyer paying a buy now fvf\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"buynow_orders\n\t\t\t\t\t\t\t\t\tSET isfvfbuyerpaid = '1'\n\t\t\t\t\t\t\t\t\tWHERE orderid = '\" . $reminder['buynowid'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// adjust members total amount paid for subscription plan\n\t\t\t\t\t\t$ilance->accounting_payment->insert_income_spent($res_user['user_id'], sprintf(\"%01.2f\", $reminder['totalamount']), 'credit');\n\t\t\t\t\t\t// remove old invoice logs now that it's paid in full\n\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\tDELETE FROM \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\tWHERE invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\");\n\t\t\t\t\t\t$existing = array (\n\t\t\t\t\t\t\t'{{provider}}' => $res_user['username'],\n\t\t\t\t\t\t\t'{{invoiceid}}' => $reminder['invoiceid'],\n\t\t\t\t\t\t\t'{{new_txn_transaction}}' => $reminder['transactionid'],\n\t\t\t\t\t\t\t'{{invoice_amount}}' => $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']),\n\t\t\t\t\t\t\t'{{description}}' => $reminder['description'],\n\t\t\t\t\t\t\t'{{datepaid}}' => print_date(DATETIME24H, $ilconfig['globalserverlocale_globaltimeformat'], 0, 0),\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$ilance->email->mail = $res_user['email'];\n\t\t\t\t\t\t$ilance->email->slng = fetch_user_slng($res_user['user_id']);\n\t\t\t\t\t\t$ilance->email->get('transaction_payment_complete');\n\t\t\t\t\t\t$ilance->email->set($existing);\n\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\t\t\t$ilance->email->mail = SITE_EMAIL;\n\t\t\t\t\t\t$ilance->email->slng = fetch_site_slng();\n\t\t\t\t\t\t$ilance->email->get('transaction_payment_complete_admin');\n\t\t\t\t\t\t$ilance->email->set($existing);\n\t\t\t\t\t\t$ilance->email->send();\n\t\t\t\n\t\t\t\t\t\t($apihook = $ilance->api('send_unpaid_invoice_frequency_reminders_paid_sent_end')) ? eval($apihook) : false;\n\t\t\t\t\t}\n\t\t\t\t\t// insufficient funds in account balance\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// unpaid invoice reminder for this customer\n\t\t\t\t\t\t$logs = $ilance->db->query(\"\n\t\t\t\t\t\t\tSELECT invoicelogid, date_sent, date_remind\n\t\t\t\t\t\t\tFROM \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\tWHERE user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\t\t\t\tAND invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\tORDER BY invoicelogid DESC\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\tif ($ilance->db->num_rows($logs) == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\tINSERT INTO \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t(invoicelogid, user_id, invoiceid, invoicetype, date_sent, date_remind)\n\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t\t\t'\" . $res_user['user_id'] . \"',\n\t\t\t\t\t\t\t\t'\" . $reminder['invoiceid'] . \"',\n\t\t\t\t\t\t\t\t'\" . $reminder['invoicetype'] . \"',\n\t\t\t\t\t\t\t\t'\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t'\" . $remindfrequency . \"')\n\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\tif ($ilconfig['invoicesystem_unpaidreminders'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$url = '';\n\t\t\t\t\t\t\t\t$project_type = fetch_auction('project_state', $reminder['projectid']);\n\t\t\t\t\t\t\t\tif ($project_type == 'service')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['rfp'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if ($project_type == 'product')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['merch'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$url = !empty($url) ? \"URL: \" . $url : \"\";\n\t\t\t\t\t\t\t\t$crypted = array ('id' => $reminder['invoiceid']);\n\t\t\t\t\t\t\t\t$invoiceurl = HTTP_SERVER . $ilpage['invoicepayment'] . '?crypted=' . encrypt_url($crypted);\n\t\t\t\t\t\t\t\tif (!isset($message[$res_user['user_id']]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['email'] = $res_user['email'];\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['first_name'] = $res_user['first_name'];\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] .= \"{_description}: \" . $reminder['description'] . \"\n\" . $url . \"\n{_pay_invoice}: \" . $invoiceurl . \" \n{_due_date}: \" . print_date($reminder['duedate']) . \"\n{_transaction_id}: \" . $reminder['transactionid'] . \"\n{_amount}: \" . $ilance->currency->format($reminder['amount'], $reminder['currency_id']) . \"\n\" . (($reminder['istaxable'] == '1') ? '{_tax}: ' . $reminder['taxinfo'] : '') . \"\n{_total_amount}: \" . $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']) . \"\n{_amount_paid}: \" . $ilance->currency->format($reminder['paid'], $reminder['currency_id']) . \"\n\\n**********************************************\n\";\n\t\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($ilance->db->num_rows($logs) > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// it appears we have a log for this invoice id ..\n\t\t\t\t\t\t\t$reslogs = $ilance->db->fetch_array($logs, DB_ASSOC);\n\t\t\t\t\t\t\t// time to send an update to this user for this invoice\n\t\t\t\t\t\t\t// make sure we didn't already send one today\n\t\t\t\t\t\t\tif ($reslogs['date_remind'] == DATETODAY AND $reslogs['date_sent'] == DATETODAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// we've sent a reminder to this user for this invoice today already.. do nothing until next reminder frequency \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if ($reslogs['date_remind'] == DATETODAY AND $reslogs['date_sent'] != DATETODAY)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// time to send a new frequency reminder.. update table with new email sent date as today\n\t\t\t\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\t\t\t\tUPDATE \" . DB_PREFIX . \"invoicelog\n\t\t\t\t\t\t\t\t\tSET date_sent = '\" . DATETODAY . \"',\n\t\t\t\t\t\t\t\t\tdate_remind = '\" . $remindfrequency . \"'\n\t\t\t\t\t\t\t\t\tWHERE invoiceid = '\" . $reminder['invoiceid'] . \"'\n\t\t\t\t\t\t\t\t\t\tAND user_id = '\" . $reminder['user_id'] . \"'\n\t\t\t\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t\t\t\tif ($ilconfig['invoicesystem_unpaidreminders'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$url = '';\n\t\t\t\t\t\t\t\t\t$project_type = fetch_auction('project_state', $reminder['projectid']);\n\t\t\t\t\t\t\t\t\tif ($project_type == 'service')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['rfp'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ($project_type == 'product')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$url = HTTPS_SERVER . $ilpage['merch'] . '?id=' . ($reminder['projectid']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$url = !empty($url) ? \"URL: \" . $url : \"\";\n\t\t\t\t\t\t\t\t\t$crypted = array ('id' => $reminder['invoiceid']);\n\t\t\t\t\t\t\t\t\t$invoiceurl = HTTP_SERVER . $ilpage['invoicepayment'] . '?crypted=' . encrypt_url($crypted);\n\t\t\t\t\t\t\t\t\tif (!isset($message[$res_user['user_id']]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['email'] = $res_user['email'];\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['first_name'] = $res_user['first_name'];\n\t\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$message[$res_user['user_id']]['body'] .= \"{_description}: \" . $reminder['description'] . \"\n\" . $url . \"\n{_pay_invoice}: \" . $invoiceurl . \" \n{_due_date}: \" . print_date($reminder['duedate']) . \"\n{_transaction_id}: \" . $reminder['transactionid'] . \"\n{_amount}: \" . $ilance->currency->format($reminder['amount'], $reminder['currency_id']) . \"\n\" . (($reminder['istaxable'] == '1') ? '{_tax}: ' . $reminder['taxinfo'] : '') . \"\n{_total_amount}: \" . $ilance->currency->format($reminder['totalamount'], $reminder['currency_id']) . \"\n{_amount_paid}: \" . $ilance->currency->format($reminder['paid'], $reminder['currency_id']) . \"\n\\n**********************************************\n\";\n\t\t\t\t\t\t\t\t $count++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\t($apihook = $ilance->api('send_unpaid_invoice_frequency_reminders_unpaid_sent_end')) ? eval($apihook) : false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($message) > 1)\n\t\t\t{\n\t\t\t\tforeach ($message as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$ilance->email->mail = $value['email'];\n\t\t\t\t\t$ilance->email->slng = fetch_user_slng($key);\n\t\t\t\t\t$ilance->email->get('cron_expired_subscription_invoices_reminder_items');\n\t\t\t\t\t$ilance->email->set(array (\n\t\t\t\t\t\t'{{messagebody}}' => $value['body'],\n\t\t\t\t\t\t'{{firstname}}' => $value['first_name'],\n\t\t\t\t\t\t'{{transactions_url}}' => HTTPS_SERVER . $ilpage['accounting'] . '?cmd=transactions&status=unpaid',\n\t\t\t\t\t));\n\t\t\t\t\t$ilance->email->send();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $cronlog;\n\t}", "title": "" }, { "docid": "1de59020f81dc655ad8b20e605c17137", "score": "0.5380286", "text": "public function buildMail(){\r\n\t\t\t$this->recipients['mandrill'] = \"\";\r\n\r\n\t\t\t$recipients = explode( \",\", $this->to['email'] );\r\n\t\t\t\r\n\t\t\t$numEmail = count($this->to['email']);\r\n\t\t\t$numNames = count($this->to['name']);\r\n\r\n\t\t\t$i = 0;\r\n\r\n\t\t\tforeach($recipients as $recipient){\r\n\r\n\t\t\t\t$name = ($this->to['name'][$i] != \"\" && $this->to[\"name\"][$i] != NULL)? $this->to[\"name\"][$i] : $this->to[\"name\"];\r\n\r\n\t\t\t\t$this->recipients[''] += '{\r\n\t\t\t\t\t\t\t\"email\": \t'.@json_encode($recipient).',\r\n\t\t\t\t\t\t\t\"name\": \t'.@json_encode($name).'\r\n\t\t\t\t\t\t }';\r\n\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\t/* End of email recipient list builder */\r\n\r\n\t\t\t/* SEND THE EMAIL */\r\n\t\t\t$this->mailIt();\r\n\r\n\t\t}", "title": "" }, { "docid": "2b4f3646f20df26367247b37c30d7ebd", "score": "0.53675854", "text": "function sendMail($inbatch=false, $idctrl){\n\t\n\t\t$start_time = time();\n\t\t\t\n\t\tif (!$inbatch){\n\t\t\t$ctrl=$this->loadControl($idctrl);\n\t\t\t$wctrl='and tx_auxnewsmailer_msglist.idctrl='.$ctrl['uid'];\n\t\t}else{\n\t\t\t$ctrl=$this->loadControl($idctrl);\t\t\n\t\t\t$wctrl='and tx_auxnewsmailer_msglist.idctrl='.intval($idctrl);\t\n\t\t}\n\t\t\n\t\t$this->limit = $ctrl['tx_auxnewsmailersplitcat_tmplmsgbounce'];\n\t\t\n $dbres = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'tx_auxnewsmailer_usrmsg.*',\n 'tx_auxnewsmailer_usrmsg,tx_auxnewsmailer_msglist',\n \t'tx_auxnewsmailer_usrmsg.state=0 and tx_auxnewsmailer_usrmsg.idmsg=tx_auxnewsmailer_msglist.uid '.$wctrl,\n '',\n 'idmsg',\n '0,'.$this->limit\n );\n\t\t$cnt=0;\n\t\t$cid=0;\t\t\n\t\t$msglist_count = $GLOBALS['TYPO3_DB']->sql_affected_rows();\n\t\twhile($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbres)) {\n\t\t\n\t\t\t// For statistics if diferent idmsg breakloop\n\t\t\tif ($cid==0){$idmsg=$row['idmsg'];}\t\t\t\t\n\t\t\tif ($cid!=0 && $cid!=$row['idmsg']){break;}\n\t\t\t$cid = $row['idmsg'];\n\t\t\t\t\t\n\t \t\t$userinfo=$this->getUserInfo($row['iduser']);\n\t\t\t$msg=$this->getMessageInfo($row['idmsg']);\n\n\t\t\t$title=$msg['subject'];\n\t\t\t$fromEmail=$msg['returnmail'];\n\t\t\t$fromName=$msg['organisation'];\n\t\t\tif ($fromName!='')\n\t\t\t\t$fromName.='-';\n\t\t\t$fromName.=$msg['name'];\n\n\t\t\t$marker=array();\n\t\t\t$marker['###name###']=$userinfo['name'];\n\t\t\t$marker['###orgname###']=$msg['name'];\n\t\t\t$marker['###org###']=$msg['organisation'];\n\t\t\t$marker['###domain###']=$msg['orgdomain'];\n\n\t\t\t$plain=$this->cObj->substituteMarkerArray($msg['plain'],$marker);\n\t\t\t$title=$this->cObj->substituteMarkerArray($title,$marker);\n\n\t\t\tif ($userinfo['html'])\n\t\t\t\t$html=$this->cObj->substituteMarkerArray($msg['html'],$marker);\n\t\t\telse\n\t\t\t\t$html='';\n\t\t\t$this->domail($userinfo['mail'],$title,$plain,$fromEmail,$fromName,$html);\n\t\t\t/*$content.='----------------------</br>';\n\t\t\t$content.=$userinfo['mail'].'</br>';\n\t\t\t$content.=$msg['plain'].'</br>';*/\n\t\t\t$updateArray=array(\n\t\t\t\t'state' => '2',\n\t\t\t\t'tstamp'=>time(),\n\t\t\t);\n\t\t\t$ures = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_auxnewsmailer_usrmsg','idmsg='.$row['idmsg'].' and iduser='.$row['iduser'], $updateArray);\n\t\t\t$cnt++;\n\t\t}\n\t\t\n\t\t// Process Create Statistics\n\t\t$restat = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t '*',\n\t 'tx_auxnewsmailer_sendstat',\n\t 'idmsg='.intval($idmsg).' and pid='.intval($ctrl['pid']),\n\t '',\n\t 'idmsg',\n\t\t\t\t\t''\n\t );\t\n\t\t$row_count = $GLOBALS['TYPO3_DB']->sql_affected_rows();\t\t\t\t\t\t\n\t\tif ($row_count>0 && $msglist_count>0){\n\t\t\twhile($rowstat = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($restat)) {\n\t\t\t\t$new_total_time = (time()-$start_time) + $rowstat['send_total_time_seconds'];\t\n\t\t\t\t$updateArray=array(\n\t\t\t\t\t'send_total_msg' => intval($rowstat['send_total_msg']+$cnt),\t\n\t\t\t\t\t'send_total_time' => t3lib_BEfunc::calcAge($new_total_time),\n\t\t\t\t\t'send_total_time_seconds' => intval($new_total_time),\n\t\t\t\t\t'crdate' => time(),\t\t\t\t\n\t\t\t\t);\n\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_auxnewsmailer_sendstat','idmsg='.intval($idmsg).' and pid='.intval($ctrl['pid']), $updateArray);\t\t\n\t\t\t}\n\t\t}else if ($msglist_count>0){ \n\t\t\t$new_total_time = time() - $start_time;\t\t\t\n\t\t\t$insertArray = array(\n\t\t\t\t'tstamp' => time(),\t\n\t\t\t\t'idmsg' => intval($idmsg),\t\t\t\t\t\t\t\t\n\t\t\t\t'pid' => intval($ctrl['pid']),\t\t\t\n\t\t\t\t'send_total_msg' => intval($cnt),\t\n\t\t\t\t'send_total_time' => t3lib_BEfunc::calcAge($new_total_time),\n\t\t\t\t'send_total_time_seconds' => intval($new_total_time),\n\t\t\t\t'crdate' => time(),\t\t\t\t\n\t\t\t);\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_auxnewsmailer_sendstat', $insertArray);\t\n\t\t}\t\n\t\t\t\t\n\t\treturn $cnt;\n\n\t}", "title": "" }, { "docid": "8f74a934ad1f72c4a2179d41985d971d", "score": "0.5366489", "text": "public function sendNotificationEmailsTask()\n {\n $emails = get_option($this->emailsKey);\n\n if (count($emails) == 0) {\n return;\n } else {\n $currentTS = time();\n\n $options = get_option($this->optionsKey);\n $lastBotVisit = $options['lastBotVisit'];\n $sendTreshold = $options['sendTreshold'];\n $resendTreshold = $options['resendTreshold'];\n\n $subject = 'Google Bot visit';\n $message = sprintf('Your page has not been visited by Google Bot for %s day(s).', $sendTreshold);\n\n foreach ($emails as $email => $emailData) {\n if ($this->shouldEmailBeSent($lastBotVisit, $currentTS, $sendTreshold, $resendTreshold, $emailData)) {\n $emailSent = wp_mail($email, $subject, $message);\n if ($emailSent) {\n $emails[$email]['lastSentTS'] = $currentTS;\n $emails[$email]['botVisitTimeAtNotification'] = $lastBotVisit;\n $emails[$email]['sent'] = true;\n }\n }\n }\n update_option($this->emailsKey, $emails);\n }\n }", "title": "" }, { "docid": "82c4f036f18094449ecfa6be255dd3e1", "score": "0.53633994", "text": "function SendMailOneToAnothor($vEmailCode,$ToEmail,$bodyArr,$postArr,$FromEmail,$vFromName){\n\n\t\t$columnsToSelect = 'iEmailTemplateId,vEmailCode,vFromName,vFromEmail,vFromEmail,vEmailSubject,tEmailMessage,dtCreatedDateTime,eStatus';\n\t\t$comparisonColumnsAndValues = array('vEmailCode' => array($vEmailCode,'where'));\n\t\t$email_info=$this->QueryCreator_model->selectQuery('email_templates',$columnsToSelect,$comparisonColumnsAndValues,'Single',NULL);\n\t\t$Subject = strtr($email_info['vEmailSubject'], \"\\r\\n\" , \" \" );\n\t\t$body = stripslashes($email_info['tEmailMessage']);\n $body = str_replace($bodyArr,$postArr, $body);\n\t\t\n\t\trequire_once(APPPATH.'third_party/PHPMailer-master/PHPMailerAutoload.php');\n $mail = new PHPMailer;\n $mail->isSMTP();\n $mail->Host = \"smtp.gmail.com\";\n $mail->SMTPAuth = true; \n $mail->SMTPDebug = 0; // Enable SMTP authentication\n $mail->Username = '[email protected]'; // SMTP username\n $mail->Password = 'demo12345'; \n $mail->SMTPSecure = 'tls'; \n $mail->Port = 587; // TCP port to connect to\n $mail->From = $FromEmail;\n $mail->FromName = $vFromName;\n $mail->addAddress($ToEmail); // Add a recipient\n \n $mail->WordWrap = 50; // Set word wrap to 50 characters\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $Subject;\n $mail->Body = $body;\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n if(!$mail->send()) {\n $res = 0;\n } else {\n $res = 1;\n }\n return $res;\t\t\t\n\t}", "title": "" }, { "docid": "702e637e5411f4c9f55ea6ce1d664a18", "score": "0.53630733", "text": "function sp_email_setup_schedule(){\n\n $sp_email_settings = get_option( 'sp_email_settings' );\n $frequency = $sp_email_settings['sp_email_fetch_frequency'];\n\n if ( ! wp_next_scheduled( 'sp_email_check_emails' ) ) {\n if( isset( $frequency ) && $frequency !== 0 ){\n wp_schedule_event( time(), $frequency, 'sp_email_check_emails');\n }\n }else{\n // Get the current schedule, if we've updated it, un-schedule the previous recurrence\n $current_schedule = wp_get_schedule( 'sp_email_check_emails' );\n\n if( $current_schedule !== $frequency ){\n $timestamp = wp_next_scheduled( 'sp_email_check_emails' );\n wp_unschedule_event( $timestamp, 'sp_email_check_emails' );\n if( isset( $frequency ) && $frequency !== 0 ){\n wp_schedule_event( time(), $frequency, 'sp_email_check_emails');\n }\n }\n\n }\n }", "title": "" }, { "docid": "d4d415c9b683ed39e1dd8f866a920b9a", "score": "0.5357701", "text": "function mail_account_generate_postfix(){\n\tglobal $pro_mysql_domain_table;\n\tglobal $pro_mysql_admin_table;\n\tglobal $pro_mysql_subdomain_table;\n\n\tglobal $console;\n\n\tglobal $conf_generated_file_path;\n\tglobal $conf_addr_mail_server;\n\tglobal $conf_dtcadmin_path;\n\n\tglobal $conf_unix_type;\n\n\tglobal $conf_nobody_user_id;\n\tglobal $conf_dtc_system_uid;\n\tglobal $conf_dtc_system_username;\n\n\tglobal $conf_use_cyrus;\n\tglobal $conf_use_mail_alias_group;\n\n\tglobal $conf_support_ticket_email;\n\tglobal $conf_support_ticket_fw_email;\n\tglobal $conf_support_ticket_domain;\n\tglobal $conf_main_domain;\n\n\tglobal $adm_realpass;\n\tglobal $adm_pass;\n\tglobal $adm_random_pass;\n\t//global $conf_postfix_virtual_mailbox_domains_path;\n\t//global $conf_postfix_virtual_path;\n\t//global $conf_postfix_vmailbox_path;\n\t//global $conf_postfix_virtual_uid_mapping_path;\n\n\t// prepend the configured path here\n\n\t$conf_postfix_virtual_mailbox_domains_path = $conf_generated_file_path . \"/postfix_virtual_mailbox_domains\";\n\t$conf_local_domains_path = $conf_generated_file_path . \"/local_domains\";\n\t$conf_postfix_virtual_path = $conf_generated_file_path . \"/postfix_virtual\";\n\t$conf_postfix_aliases_path = $conf_generated_file_path . \"/postfix_aliases\";\n\t$conf_postfix_vmailbox_path = $conf_generated_file_path . \"/postfix_vmailbox\";\n\t$conf_postfix_virtual_uid_mapping_path = $conf_generated_file_path . \"/postfix_virtual_uid_mapping\";\n\n\t$conf_postfix_relay_domains_path = $conf_generated_file_path . \"/postfix_relay_domains\";\n\t$conf_postfix_relay_recipients_path = $conf_generated_file_path . \"/postfix_relay_recipients\";\n\t$conf_postfix_recipient_lists_path = $conf_generated_file_path . \"/recipientlists\";\n\n\t// now for our variables to write out the db info to\n\n\t$domains_file = \"\";\n\t$local_domains_file = \"\";\n\t$domains_postmasters_file = \"\";\n\t$aliases_file = \"\";\n\t$vmailboxes_file = \"\";\n\t$uid_mappings_file = \"\";\n\t$relay_domains_file = \"\";\n\t$relay_recipients_file = \"\";\n\t//store ALL of the domains we know about\n\t//if we manage to get better information later, don't worry about the entry on this one\n\t$relay_recipients_all_domains = \"\";\n\n\t$data = \"\"; // init var for use later on\n\n\t#CL: Don create sasldb password when using cyrus. \n\tif($conf_use_cyrus != \"yes\")\n\t{\n\t\tgenSasl2PasswdDBStart();\n\t}\n\t// go through each admin login and find the domains associated \n\t$query = \"SELECT * FROM $pro_mysql_admin_table ORDER BY adm_login;\";\n\t$result = mysql_query ($query)or die(\"Cannot execute query : \\\"$query\\\"\");\n\t$num_rows = mysql_num_rows($result);\n\n\tif($num_rows < 1){\n\t\tdie(\"No account to generate\");\n\t}\n\n\tfor($i=0;$i<$num_rows;$i++){\n\t\t$row = mysql_fetch_array($result) or die (\"Cannot fetch user-admin\");\n\t\t$user_admin_name = $row[\"adm_login\"];\n\t\t$user_admin_pass = $row[\"adm_pass\"];\n\t\t$adm_realpass = $row[\"adm_pass\"];\n\t\t$adm_pass = $row[\"adm_pass\"];\n\t\t$adm_random_pass = $row[\"adm_pass\"];\n\n\t\t$admin = fetchAdmin($user_admin_name,$user_admin_pass);\n\t\tif(($error = $admin[\"err\"]) != 0){\n\t\t\tdie(\"Error fetching admin : $error\");\n\t\t}\n\n\t\t//Path of user's mailing lists\n\t\t$admin_path = getAdminPath($user_admin_name);\n\n\t\t$info = $admin[\"info\"];\n\t\t$nbr_domain = 0;\n\t\tif (isset($admin[\"data\"]))\n {\n $data = $admin[\"data\"];\n $nbr_domain = sizeof($data);\n }\n\n\t\tfor($j=0;$j<$nbr_domain;$j++){\n\t\t\t$domain = $data[$j];\n\t\t\t$domain_full_name = $domain[\"name\"];\n\n\t\t\t//$console .= \"Processing $domain_full_name ...\\n\";\n\t\t\t//if we are primary mx, add to domains\n\t\t\t//else add to relay\n\t\t\t$primary_mx=0;\n\t\t\tif ($domain[\"primary_mx\"] == \"\" || $domain[\"primary_mx\"] == \"default\")\n\t\t\t{\n\t\t\t\t$primary_mx=1;\n\t\t\t\t$domains_file .= \"$domain_full_name virtual\\n\";\n\t\t\t\t$local_domains_file .=\"$domain_full_name\\n\";\n\t\t\t} else {\n\t\t\t\t$relay_domains_file .= \"$domain_full_name\\n\";\n\t\t\t\t$relay_recipients_all_domains .= \"$domain_full_name\\n\";\n\t\t\t}\n\n\t\t\t$store_catch_all = \"\";\n\t\t\t//$store_catch_all_md = \"\";\n\t\t\t$catch_all_id = $domain[\"catchall_email\"];\n\t\t\t$abuse_address = 0;\n\t\t\t$postmaster_address = 0;\n\t\t\t// This should handle domain parking without a lot of code! :)\n\t\t\tif($domain[\"domain_parking\"] != \"no-parking\"){\n\t\t\t\tfor($b=0;$b<$nbr_domain;$b++){\n\t\t\t\t\tif($data[$b][\"name\"] == $domain[\"domain_parking\"]){\n\t\t\t\t\t\tif(isset($data[$b][\"emails\"])){\n\t\t\t\t\t\t\t$domain[\"emails\"] = $data[$b][\"emails\"];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tunset($domain[\"emails\"]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//Mail Group Aliases Start\n\t\t\tif ( $conf_use_mail_alias_group == \"yes\" )\n\t\t\t{\n\t\t\t\tif ( $primary_mx && $domain[\"domain_parking\"] != \"no-parking\" )\n\t\t\t\t{\n\t\t\t\t\t// @domain1 -> @domain2\n\t\t\t\t\t$domains_postmasters_file.= \"# Mail Alias Groups for \".$domain[\"name\"].\"\\n\";\n\t\t\t\t\t$domains_postmasters_file.= \"@\".$domain[\"name\"].\" @\".$domain[\"domain_parking\"].\"\\n\";\n\t\t\t\t\t$domains_postmasters_file.= \"#\\n\";\n\t\t\t\t}\n\t\t\t\telseif ( $primary_mx && isset($domain[\"aliases\"]) )\n\t\t\t\t{\n\t\t\t\t\t// name@domain1 -> othername@domain1,user@domain2,etc.\n\t\t\t\t\t$aliases = $domain[\"aliases\"];\n\t\t\t\t\t$nbr_boites = sizeof($aliases);\n\t\t\t\t\t// go through each of these emails and build the vmailbox file\n\t\t\t\t\t//also create our sasldb2 if we have a saslpasswd2 exe\n\t\t\t\t\tfor($k=0;$k<$nbr_boites;$k++){\n\t\t\t\t\t\t$alias = $aliases[$k];\n\t\t\t\t\t\t$id = $alias[\"id\"];\n\t\t\t\t\t\t$domain_parent = $alias[\"domain_parent\"];\n\t\t\t\t\t\t$ainc = $alias[\"autoinc\"];\n\t\t\t\t\t\t$mailbox_cleanup1 = str_replace(\"\\r\\n\", \"\\n\", $alias[\"delivery_group\"]);\n\t\t\t\t\t\t$mailbox_cleanup2 = split(\"\\n\", $mailbox_cleanup1);\n\t\t\t\t\t\t$deliver_mailbox = '';\n\t\t\t\t\t\tif ( $k==0 ) $domains_postmasters_file.= \"# Mail Alias Groups for : \".$domain_parent.\"\\n\";\n\t\t\t\t\t\tfor($x=0;$x<count($mailbox_cleanup2);$x++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ( $x<count($mailbox_cleanup2)-1 )\n\t\t\t\t\t\t\t\t$deliver_mailbox.=trim($mailbox_cleanup2[$x]).\",\";\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$deliver_mailbox.=trim($mailbox_cleanup2[$x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$domains_postmasters_file.=$id.\"@\".$domain_parent.\" \".$deliver_mailbox.\"\\n\";\n\t\t\t\t\t\tif ( $k==$nbr_boites-1 ) $domains_postmasters_file.= \"#\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//Mail Group Aliases End\n\t\t\tif(isset($domain[\"emails\"]) && $primary_mx && $domain[\"domain_parking\"] == \"no-parking\" ){\n\t\t\t\t$emails = $domain[\"emails\"];\n\t\t\t\t$nbr_boites = sizeof($emails);\n\t\t\t\t// go through each of these emails and build the vmailbox file\n\t\t\t\t//also create our sasldb2 if we have a saslpasswd2 exe\n\t\t\t\tfor($k=0;$k<$nbr_boites;$k++){\n\t\t\t\t\t$email = $emails[$k];\n\t\t\t\t\t$id = $email[\"id\"];\n\t\t\t\t\t$uid = $email[\"uid\"];\n\t\t\t\t\t// if our uid is 65534, make sure it's the correct uid as per the OS (99 for redhat)\n/*\t\t\t\t\tif ($uid == 65534){\n\t\t\t\t\t\t$uid = $conf_nobody_user_id;\t\n\t\t\t\t\t}*/\n\t\t\t\t\t$localdeliver = $email[\"localdeliver\"];\n\t\t\t\t\t$redirect1 = $email[\"redirect1\"];\n\t\t\t\t\t$redirect2 = $email[\"redirect2\"];\n\t\t\t\t\t$_id = strtr($id,\".\",\":\");\n\t\t\t\t\t$home = $email[\"home\"];\n\t\t\t\t\t$passwdtemp = $email[\"passwd\"];\n\t\t\t\t\t$passwd = crypt($passwdtemp, dtc_makesalt());\n\t\t\t\t\t$spam_mailbox = $email[\"spam_mailbox\"];\n\t\t\t\t\t$spam_mailbox_enable = $email[\"spam_mailbox_enable\"];\n\t\t\t\t\t$vacation_flag = $email[\"vacation_flag\"];\n\t\t\t\t\t$vacation_text = stripslashes($email[\"vacation_text\"]);\n\n\t\t\t\t\tif ( $k==0 ) $domains_postmasters_file.= \"# Mailboxes for : \".$domain_full_name.\"\\n\";\n\t\t\t\t\t$spam_stuff_done = 0;\n\t\t\t\t\t$homedir_created = 0;\n\t\t\t\t\tif (!isset($home) || $home==\"\" && $conf_use_cyrus != \"yes\"){\n\t\t\t\t\t\t$console .= \"Missing home variable for $id\";\n\t\t\t\t\t}\n\t\t\t\t\tif(! is_dir($home) && ($conf_use_cyrus != \"yes\") && strlen($home) > 0 && $id != \"cyrus\" && $id != \"cyradm\"){\n\t\t\t\t\t\t$PATH = getenv('PATH');\n\t\t\t\t\t\tputenv(\"PATH=/usr/lib/courier-imap/bin:$PATH\");\n\t\t\t\t\t\tsystem(\"/bin/mkdir -p $home && maildirmake $home\");\n\t\t\t\t\t\tputenv(\"PATH=$PATH\");\n\t\t\t\t\t\t$homedir_created = 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// if we have a $id equal to abuse\n\t\t\t\t\tif ($id == \"abuse\"){\n\t\t\t\t\t\t$abuse_address++;\n\t\t\t\t\t}\n\t\t\t\t\tif ($id == \"postmaster\"){\n\t\t\t\t\t\t$postmaster_address++; \n\t\t\t\t\t}\n\t\t\t\t\t// Previously: only generate sasl logins for local accounts\n\t\t\t\t\t// In fact, there is no reason to do so. We might want to create a mail account ONLY for sending\n\t\t\t\t\t// some mail, and not receiving.\n\t\t\t\t\t#CL: Not needed for cyrus\n\t\t\t\t\tif($conf_use_cyrus != \"yes\")\n\t\t\t\t\t{\n\t\t\t\t\t\tgenSasl2PasswdDBEntry($domain_full_name,$id,$passwdtemp,$conf_addr_mail_server);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// setup a postfix mapping for local delivery or vacation flags\n\t\t\t\t\tif ($localdeliver == \"yes\" || $localdeliver == \"true\" || $vacation_flag == \"yes\"){\n\t\t\t\t\t\t// setup the catch_all for locally delivered email addresses\n\t\t\t\t\t\tif ($id == $catch_all_id){\n\t\t\t\t\t\t\t//$store_catch_all_md .= \"@$domain_full_name $home/Maildir/\\n\";\n\t\t\t\t\t\t\t$store_catch_all .= \"@$domain_full_name\t$id@$domain_full_name\\n\";\n\t\t\t\t\t\t} \n\t\t\t\t\t\t$vmailboxes_file .= \"$id@$domain_full_name $home/Maildir/\\n\";\n\t\t\t\t\t\t$uid_mappings_file .= \"$id@$domain_full_name $uid\\n\";\t\t\t\t\n\t\t\t\t\t\tif (isset($catch_all_id) || $catch_all_id != \"\"){\n\t\t\t\t\t\t\t//just so we can deliver to our vmailboxs if we have set a catch-all (otherwise postfix gets confused, and delivers all mail to the catch all)\n\t\t\t\t\t\t\t$domains_postmasters_file .= \"$id@$domain_full_name $id@$domain_full_name\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($redirect1) && $redirect1 != \"\"){\n\t\t\t\t\t\tunset($extra_redirects);\n\t\t\t\t\t\tif ($localdeliver == \"yes\" || $localdeliver == \"true\" || $vacation_flag == \"yes\"){\n\t\t\t\t\t\t\t// need to generate .mailfilter file with \"cc\" and also local delivery\n\t\t\t\t\t\t\tif($conf_use_cyrus != \"yes\" && (!isset($redirect2) || $redirect2 == \"\" )){\n\t\t\t\t\t\t\t\tgenDotMailfilterFile($home,$id,$domain_full_name,$spam_mailbox_enable,$spam_mailbox,$localdeliver,$vacation_flag,$vacation_text,$redirect1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$spam_stuff_done = 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$extra_redirects = \" $redirect1 \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($redirect2 != \"\" && isset($redirect2)){\n\t\t\t\t\t\t\tif ($localdeliver == \"yes\" || $localdeliver == \"true\" || $vacation_flag == \"yes\"){\n\t\t\t\t\t\t\t\t//need to generate .mailfilter file with \"cc\" and also local delivery\n\t\t\t\t\t\t\t\tif($conf_use_cyrus != \"yes\"){\n\t\t\t\t\t\t\t\t\tgenDotMailfilterFile($home,$id,$domain_full_name,$spam_mailbox_enable,$spam_mailbox,$localdeliver,$vacation_flag,$vacation_text,$redirect1,$redirect2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$spam_stuff_done = 1;\n\t\t\t\t\t\t\t} else if (isset($extra_redirects)) {\n\t\t\t\t\t\t\t\t$extra_redirects .= \" , $redirect2\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($store_catch_all == \"\" && ($id == \"*\" || $id == $catch_all_id)){\n\t\t\t\t\t\t\tif(isset($extra_redirects)){\n\t\t\t\t\t\t\t\t$store_catch_all .= \"@$domain_full_name $extra_redirects\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (isset($extra_redirects)) {\n\t\t\t\t\t\t\t$domains_postmasters_file .= \"$id@$domain_full_name\t$extra_redirects\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tunset($extra_redirects);\n\t\t\t\t\t} \n\t\t\t\t\t//if we haven't added the spam mailbox yet, do it here\n\t\t\t\t\tif ($spam_stuff_done == 0){\n\t\t\t\t\t\tif($conf_use_cyrus != \"yes\"){\n\t\t\t\t\t\t\tgenDotMailfilterFile($home,$id,$domain_full_name,$spam_mailbox_enable,$spam_mailbox,$localdeliver,$vacation_flag,$vacation_text,$redirect1,$redirect2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(is_dir($home) && $homedir_created == 1 && $id != \"cyrus\" && $id != \"cyradm\"){\n\t\t\t\t\t\tsystem(\"chown -R $conf_dtc_system_username $home\");\n\t\t\t\t\t}\n\t\t\t\t\tif ( $k==$nbr_boites-1 ) $domains_postmasters_file.= \"#\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//add support for creation of mailing lists\n\t\t\tif(isset($domain[\"mailinglists\"]) && $primary_mx){\n\t\t\t\t$lists = $domain[\"mailinglists\"];\n\t\t\t\t$nbr_boites = sizeof($lists);\n\t\t\t\t// go through each of these lists and add to virtual maps and normal aliases\n\t\t\t\tfor($k=0;$k<$nbr_boites;$k++){\n\t\t\t\t\t$list = $lists[$k];\n\t\t\t\t\t$list_id = $list[\"id\"];\n\t\t\t\t\t$list_name = $list[\"name\"];\n\t\t\t\t\tif ($list_name == \"abuse\"){\n\t\t\t\t\t\t$abuse_address++;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($list_name == \"postmaster\"){\n\t\t\t\t\t\t$postmaster_address++;\n\t\t\t\t\t}\n\t\t\t\t\t$list_owner = $list[\"owner\"];\n\t\t\t\t\t$list_domain = $list[\"domain\"];\n\t\t\t\n\t\t\t\t\t$list_path = \"$admin_path/$list_domain/lists\";\n\t\t\t\t\t$name = $list_domain . \"_\" . $list_name;\n\t\t\t\t\tif (!preg_match(\"/\\@/\", $list_owner)){\n\t\t\t\t\t\t$owner = $list_owner . \"@\" . $list_domain;\n } else {\n\t\t\t\t\t\t$owner = $list_owner;\n\t\t\t\t\t}\n\t\t\t\t\t$modified_name = str_replace(\"-\",\"_\",$name);\n\t\t\t\t\t$domains_postmasters_file .= $list_name . \"@\" . $list_domain . \" \" . $modified_name . \"\\n\";\n\t\t\t\t\t$aliases_file .= $modified_name.': \"|/usr/bin/mlmmj-recieve -L '.$list_path.'/'.$name.'/\"' . \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if an abuse@ email hasn't been set, set one here to go to postmaster\n\t\t\tif ($abuse_address == 0 && $primary_mx){\n\t\t\t\t$domains_postmasters_file .= \"abuse@$domain_full_name postmaster\\n\";\n\t\t\t}\n\t\t\tif ($postmaster_address == 0 && $primary_mx){\n\t\t\t\t$domains_postmasters_file .= \"postmaster@$domain_full_name postmaster\\n\";\n\t\t\t}\n\n\t\t\t//always store catch all last... :)\n\t\t\tif(isset($store_catch_all) && $store_catch_all != \"\"){\n\t\t\t\t$domains_postmasters_file .= $store_catch_all;\n\t\t\t}\n\t\t\t//now store the Maildir version\n\t\t\tif(isset($store_catch_all_md) && $store_catch_all_md != \"\"){\n\t\t\t\t$vmailboxes_file .= $store_catch_all_md;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\n\n\t//check to see if the domain is in our local recipients first before adding to allowed relay domains\n\t$relay_domains_file_temp_list = explode(\"\\n\", get_remote_mail_domains());\n\tforeach($relay_domains_file_temp_list as $domain){\n\t\tif (isset($domain) && strlen($domain) > 0){\n\t\t\tif (!preg_match(\"/^$domain\\s/\", $domains_file))\n\t\t\t{\n\t\t\t\t$relay_domains_file .= \"$domain\\n\";\n\t\t\t}\n\t\t}\n\t}\n\n\t$relay_recipients_list = explode(\"\\n\", get_remote_mail_recipients());\n\n\tforeach($relay_recipients_list as $email){\n\t\tif (isset($email) && strlen($email) > 0){\n\t\t\t// echo \"Stage 1 - adding $email\";\n\t\t\t$relay_recipients_file .= $email . \" OK\\n\";\n\t\t}\n\t}\n\n\t// if we haven't added the following domains to the $relay_recipients_file, then we need to add a wildcard, bad, but necessary for domains we don't have email lists for\n\t$relay_recipients_all_domains_list = explode(\"\\n\", $relay_recipients_all_domains);\n\tforeach($relay_recipients_all_domains_list as $domain){\n\t\t// if the $domain isn't set here, keep going\n\t\tif (!(isset($domain) && strlen($domain) >0)){\n\t\t\tcontinue;\n\t\t}\n\t\t//$console .= \"$domain is being backed up\\n\";\n\t\t//try and read a file here, and see if we have a list already created\n\t\tif (is_file(\"$conf_postfix_recipient_lists_path/$domain\")){\n\t\t\t//$console .= \"File found with domain info - $conf_postfix_recipient_lists_path/$domain\\n\";\n\t\t\t//check to see if we have already got this domain... \n\t\t\t//if we do, then it means that we have a rogue $domain file, and it should be deleted! :)\n\n\t\t\tif (preg_match(\"/\\@$domain\\s+OK/\", $relay_recipients_file)){\n\t\t\t\tunlink(\"$conf_postfix_recipient_lists_path/$domain\");\n\t\t\t} else {\n\t\t\t\t// echo \"Reading $domain from recip file...\";\n\t\t\t\t$fp = fopen( \"$conf_postfix_recipient_lists_path/$domain\", \"r\");\n\t\t\t\t$contents = fread($fp, filesize(\"$conf_postfix_recipient_lists_path/$domain\"));\n\t\t\t\tfclose($fp);\n\t\t\t\t//now we have found some domain email list, append it here\n\t\t\t\t$relay_recipients_file .= $contents;\n\t\t\t\t// echo \"Stage 2 - adding $contents\";\n\t\t\t}\n\t\t}\n\t\t//finally check to see if we haven't got any entries for this domain\n\t\tif (!preg_match(\"/\\@$domain\\s+OK/\", $relay_recipients_file)){\n\t\t\t//$console .= \"Faking domain entry for $domain...\\n\";\n\t\t\t$relay_recipients_file .= \"@$domain OK\\n\";\n\t\t\t// echo \"Stage 3 - adding $domain OK\";\n\t\t\t//write this to a file, so admin/users can edit later\n\t\t\tif (!file_exists(\"$conf_postfix_recipient_lists_path\")){\n\t\t\t\t//make a directory here if it doesn't exist yet\n\t\t\t\tmkdir(\"$conf_postfix_recipient_lists_path\");\n\t\t\t}\n\t\t\t$fp = fopen( \"$conf_postfix_recipient_lists_path/$domain\", \"w\");\n\t\t\tfwrite($fp, \"@$domain OK\\n\");\n\t\t\tfclose($fp);\t\n\t\t}\n\t}\n\n\t// Add the support@ email\n\t$aliases_file .= \"dtc_support_ticket_messages: \\\"| \".$conf_dtcadmin_path.\"/support-receive.php\\\"\\n\";\n\t$domains_postmasters_file .= $conf_support_ticket_email.\"@\".$conf_support_ticket_domain.\" dtc_support_ticket_messages\\n\";\n\n\t// Add the supportforward@ email\n\t$aliases_file .= \"dtc_support_forward_ticket_messages: \\\"| reformime -e -s 1.2 | \".$conf_dtcadmin_path.\"/support-receive.php\\\"\\n\";\n\t$domains_postmasters_file .= $conf_support_ticket_fw_email.\"@\".$conf_support_ticket_domain.\" dtc_support_ticket_messages\\n\";\n\n\t//write out our config files\n\t$fp = fopen ( \"$conf_postfix_virtual_mailbox_domains_path\", \"w\");\n\tfwrite($fp, $domains_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_local_domains_path\", \"w\");\n\tfwrite($fp, $local_domains_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_virtual_path\", \"w\");\n\tfwrite($fp, $domains_postmasters_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_aliases_path\", \"w\");\n\tfwrite($fp, $aliases_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_vmailbox_path\", \"w\");\n\tfwrite($fp, $vmailboxes_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_virtual_uid_mapping_path\", \"w\");\n\tfwrite($fp, $uid_mappings_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_relay_domains_path\", \"w\");\n\tfwrite($fp, $relay_domains_file);\n\tfclose($fp);\n\n\t$fp = fopen ( \"$conf_postfix_relay_recipients_path\", \"w\");\n\tfwrite($fp, $relay_recipients_file);\n\tfclose($fp);\n\n\n\t//now that we have our base files, go and rebuild the db's\n\tif($conf_unix_type == \"bsd\"){\n\t\t$POSTMAP_BIN = \"/usr/local/sbin/postmap -r\";\n\t\t$POSTALIAS_BIN = \"/usr/local/sbin/postalias -r\";\n\t}else{\n\t\t$POSTMAP_BIN = \"/usr/sbin/postmap -r\";\n\t\t$POSTALIAS_BIN = \"/usr/sbin/postalias -r\";\n\t}\n\n\tsystem(\"$POSTMAP_BIN $conf_postfix_virtual_mailbox_domains_path\");\n\tsystem(\"$POSTMAP_BIN $conf_postfix_virtual_path\");\n\tsystem(\"$POSTALIAS_BIN $conf_postfix_aliases_path\");\n\tsystem(\"$POSTMAP_BIN $conf_postfix_vmailbox_path\");\n\tsystem(\"$POSTMAP_BIN $conf_postfix_virtual_uid_mapping_path\");\n\tsystem(\"$POSTMAP_BIN $conf_postfix_relay_recipients_path\");\n\tgenSaslFinishConfigAndRights();\n\tsystem(\"chown \".$conf_dtc_system_username.\":postfix \".$conf_generated_file_path.\"/postfix_*\");\n\t//in case our relay_domains file hasn't been created correctly, we should touch it\n\tsystem(\"touch $conf_postfix_relay_domains_path\");\n}", "title": "" }, { "docid": "91b562a65781ab0cd7218d6088e06748", "score": "0.53574884", "text": "private function _sendEmail($data)\n {\n //email config\n $config = [\n 'protocol' => 'smtp',\n 'smtp_host' => 'ssl://smtp.gmail.com',\n 'smtp_port' => 465,\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'forumcagbudRPL6',\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'crlf' => \"\\r\\n\",\n 'newline' => \"\\r\\n\",\n 'wordwrap' => TRUE,\n ];\n $this->load->library('email');\n $this->email->initialize($config);\n\n //email info\n $this->email->from('[email protected]', 'CAGBUD Army');\n $this->email->to($data['email']);\n $this->email->subject($data['subject']);\n\n switch ($data['type']) {\n case 'activation':\n $this->email->message('<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<title>Email Activation</title>\n\t\t</head>\n\t\t<body>\n\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout:fixed;background-color:#F9F9F9;\" id=\"bodyTable\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding-right:10px;padding-left:10px;\" id=\"bodyCell\">\n\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px; margin-top: 60px\" width=\"100%\" class=\"wrapperBody\">\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#FFFFFF;border-color:#E5E5E5; border-style:solid; border-width:0 1px 1px 1px;\" width=\"100%\" class=\"tableCard\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td height=\"5\" style=\"background-color:#00384f;font-size:1px;line-height:3px;\" class=\"topBorder\">&nbsp;</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding-top:30px;padding-bottom:5px;padding-left:20px;padding-right:20px;\" class=\"mainTitle\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h2 class=\"text\" style=\"color:#000000; font-family: Poppins, Helvetica, Arial, sans-serif; font-size:28px; font-weight:500; font-style:normal; letter-spacing:normal; line-height:36px; text-transform:none; text-align:center; padding:0; margin:0\">Aktivasi Akun</h2>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding-left:20px;padding-right:20px;\" class=\"containtTable ui-sortable\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"tableDescription\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding-bottom:20px;\" class=\"description\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"text\" style=\"color:#666666; font-family: Open Sans, Helvetica, Arial, sans-serif; font-size:14px; font-weight:400; font-style:normal; letter-spacing:normal; line-height:22px; text-transform:none; text-align:center; padding:0; margin:0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTerima kasih telah bergabung bersama kami. <br>Tekan tombol dibawah untuk mengaktifkan akun anda.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"tableButton\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding-top:20px;padding-bottom:20px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" class=\"ctaButton\" style=\"background-color:#00384f;padding-top:12px;padding-bottom:12px;padding-left:35px;padding-right:35px;border-radius:50px\"> <a class=\"text\" href=\"' . base_url() . 'auth/verify?email=' . $data['email'] . '&token=' . urlencode($data['token']) . '\" target=\"_blank\" style=\"color:#FFFFFF; font-family:Poppins, Helvetica, Arial, sans-serif; font-size:13px; font-weight:600; font-style:normal;letter-spacing:1px; line-height:20px; text-transform:uppercase; text-decoration:none; display:block\"> Aktifkan akun </a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td height=\"20\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"middle\" style=\"padding-bottom: 40px;\" class=\"emailRegards\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"space\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px;\" width=\"100%\" class=\"wrapperFooter\">\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\">\n\t\t\t\t\t\t\t\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"footer\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td align=\"center\" valign=\"top\" style=\"padding: 10px 10px 5px;\" class=\"brandInfo\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\"text\" style=\"color:#777777; font-family:Open Sans, Helvetica, Arial, sans-serif; font-size:12px; font-weight:400; font-style:normal; letter-spacing:normal; line-height:20px; text-transform:none; text-align:center; padding:0; margin:0;\">©&nbsp; Tugas Akhir RPL 2019 | RPL A </p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t</body>\n</html>');\n break;\n case 'forgot':\n $this->email->message('<!DOCTYPE html>\n <html>\n <head>\n <title>Reset Password</title>\n </head>\n <body>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" style=\"table-layout:fixed;background-color:#F9F9F9;\" id=\"bodyTable\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-right:10px;padding-left:10px;\" id=\"bodyCell\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px; margin-top: 60px\" width=\"100%\" class=\"wrapperBody\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#FFFFFF;border-color:#E5E5E5; border-style:solid; border-width:0 1px 1px 1px;\" width=\"100%\" class=\"tableCard\">\n <tbody>\n <tr>\n <td height=\"5\" style=\"background-color:#00384f;font-size:1px;line-height:3px;\" class=\"topBorder\">&nbsp;</td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-top:30px;padding-bottom:5px;padding-left:20px;padding-right:20px;\" class=\"mainTitle\">\n <h2 class=\"text\" style=\"color:#000000; font-family: Poppins, Helvetica, Arial, sans-serif; font-size:28px; font-weight:500; font-style:normal; letter-spacing:normal; line-height:36px; text-transform:none; text-align:center; padding:0; margin:0\">Atur Ulang Sandi</h2>\n </td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-left:20px;padding-right:20px;\" class=\"containtTable ui-sortable\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"tableDescription\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-bottom:20px;\" class=\"description\">\n <p class=\"text\" style=\"color:#666666; font-family: Open Sans, Helvetica, Arial, sans-serif; font-size:14px; font-weight:400; font-style:normal; letter-spacing:normal; line-height:22px; text-transform:none; text-align:center; padding:0; margin:0\">\n Tekan tombol dibawah untuk mengatur ulang sandi akun anda.\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"tableButton\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding-top:20px;padding-bottom:20px;\">\n <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tbody>\n <tr>\n <td align=\"center\" class=\"ctaButton\" style=\"background-color:#00384f;padding-top:12px;padding-bottom:12px;padding-left:35px;padding-right:35px;border-radius:50px\"> <a class=\"text\" href=\"' . base_url('auth/resetpassword?email=' . $data['email'] . '&token=' . urlencode($data['token'])) . '\" target=\"_blank\" style=\"color:#FFFFFF; font-family:Poppins, Helvetica, Arial, sans-serif; font-size:13px; font-weight:600; font-style:normal;letter-spacing:1px; line-height:20px; text-transform:uppercase; text-decoration:none; display:block\"> Reset</a>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td height=\"20\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"middle\" style=\"padding-bottom: 40px;\" class=\"emailRegards\"></td>\n </tr>\n </tbody>\n </table>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"space\">\n <tbody>\n <tr>\n <td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"max-width:600px;\" width=\"100%\" class=\"wrapperFooter\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" class=\"footer\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" style=\"padding: 10px 10px 5px;\" class=\"brandInfo\">\n <p class=\"text\" style=\"color:#777777; font-family:Open Sans, Helvetica, Arial, sans-serif; font-size:12px; font-weight:400; font-style:normal; letter-spacing:normal; line-height:20px; text-transform:none; text-align:center; padding:0; margin:0;\">©&nbsp; Tugas Akhir RPL 2019 | RPL A </p>\n </td>\n </tr>\n <tr>\n <td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td height=\"30\" style=\"font-size:1px;line-height:1px;\">&nbsp;</td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </body>\n </html>');\n break;\n }\n\n if ($this->email->send()) {\n //email send success\n return true;\n } else {\n //email send got error\n echo $this->email->print_debugger();\n die;\n }\n }", "title": "" }, { "docid": "7c9628ddbc6b0c66d949bcc34d671ea1", "score": "0.5350213", "text": "public function send_client_payment_error($useremail, $username, $instaname, $instapass, $diff_days = 0) {\r\n //$mail->addReplyTo('[email protected]', 'First Last');\r\n //Set who the message is to be sent to\r\n $this->mail->clearAddresses();\r\n $this->mail->addAddress($useremail, $username);\r\n $this->mail->clearCCs();\r\n //$this->mail->addCC($GLOBALS['sistem_config']->SYSTEM_EMAIL, $GLOBALS['sistem_config']->SYSTEM_USER_LOGIN);\r\n $this->mail->addCC($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n $this->mail->addReplyTo($GLOBALS['sistem_config']->ATENDENT_EMAIL, $GLOBALS['sistem_config']->ATENDENT_USER_LOGIN);\r\n\r\n //Set the subject line\r\n //$this->mail->Subject = \"DUMBU Problemas de pagamento $diff_days dia(s)\";\r\n $this->mail->Subject = \"DUMBU Payment Issues $diff_days day(s)\";\r\n\r\n //Read an HTML message body from an external file, convert referenced images to embedded,\r\n //convert HTML into a basic plain-text alternative body\r\n $username = urlencode($username);\r\n $instaname = urlencode($instaname);\r\n $instapass = urlencode($instapass);\r\n //$this->mail->msgHTML(file_get_contents(\"http://localhost/dumbu/worker/resources/emails/login_error.php?username=$username&instaname=$instaname&instapass=$instapass\"), dirname(__FILE__));\r\n //echo \"http://\" . $_SERVER['SERVER_NAME'] . \"<br><br>\";\r\n $lang = $GLOBALS['sistem_config']->LANGUAGE;\r\n $this->mail->msgHTML(@file_get_contents(\"http://\" . $_SERVER['SERVER_NAME'] . \"/dumbu/worker/resources/$lang/emails/payment_error.php?username=$username&instaname=$instaname&instapass=$instapass&diff_days=$diff_days\"), dirname(__FILE__));\r\n\r\n //Replace the plain text body with one created manually\r\n //$this->mail->AltBody = 'DUMBU Problemas de pagamento';\r\n $this->mail->Subject = \"DUMBU Payment Issues\";\r\n\r\n //Attach an image file\r\n //$mail->addAttachment('images/phpmailer_mini.png');\r\n //send the message, check for errors\r\n if (!$this->mail->send()) {\r\n $result['success'] = false;\r\n $result['message'] = \"Mailer Error: \" . $this->mail->ErrorInfo;\r\n } else {\r\n $result['success'] = true;\r\n $result['message'] = \"Message sent!\" . $this->mail->ErrorInfo;\r\n //print \"<b>Informações do erro:</b> \" . $this->mail->ErrorInfo;\r\n }\r\n $this->mail->smtpClose();\r\n return $result;\r\n }", "title": "" }, { "docid": "bf0ea39141c0f51e3fc457a37aae08b6", "score": "0.5348432", "text": "protected function sendMailThroughAcy(){\n\t\t// Check if this is a notifification that we override. If yes send with Acymailing, if no let Joomla handle it.\n\t\tforeach($this->bodyAliasCorres as $alias => $oneMsg){\n\t\t\t// Change default texts to regexp in order to identify mail and get values (%s, %1$s...)\n\t\t\t$oneMsg = preg_replace('/%([0-9].?\\$)?s/', '(.*)', preg_quote($oneMsg, '/'));\n\t\t\t$oneMsg = str_replace('&amp;', '&', $oneMsg);\n\n\t\t\t$testMail = preg_match('/'.trim($oneMsg).'/', $this->Body, $matches);\n\t\t\tif($testMail !== 1) continue;\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$db->setQuery('SELECT * FROM #__acymailing_mail WHERE `alias` = '.$db->Quote($alias).' AND `type` = \\'joomlanotification\\'');\n\t\t\t$mailNotif = $db->loadObject();\n\t\t\tif($mailNotif->published != 1) break;\n\n\t\t\t$acymailer = acymailing_get('helper.acymailer');\n\t\t\t// Skip check on user enabled\n\t\t\t$acymailer->checkConfirmField = false;\n\t\t\t$acymailer->checkEnabled = false;\n\t\t\t$acymailer->checkAccept = false;\n\t\t\t$acymailer->report = false;\n\t\t\t// Check if the user needs to be created in Acymailing\n\t\t\tif(!isset($this->params)){\n\t\t\t\t$plugin = JPluginHelper::getPlugin('system', 'acymailingclassmail');\n\t\t\t\t$paramsacyclassmail = new acyParameter($plugin->params);\n\t\t\t}\n\t\t\t$createAcyUser = $paramsacyclassmail->get('createacyuser', 1);\n\n\t\t\tif($createAcyUser == 1){\n\t\t\t\t$acymailer->trackEmail = true;\n\t\t\t\t$acymailer->autoAddUser = true;\n\t\t\t}else{\n\t\t\t\t$acymailer->trackEmail = false;\n\t\t\t\t$acymailer->autoAddUser = false;\n\t\t\t\t// Create receveir object to avoid creation of subscribed in acymailier helper\n\t\t\t\t$receiver = new stdClass();\n\t\t\t\t$receiver->subid = 0;\n\t\t\t\t$receiver->email = $this->to[0][0];\n\t\t\t\t// Define a default name to avoid issue with addnames option (can't replace [name] in the receiver name and can create phpmail error)\n\t\t\t\tif(!empty($this->to[0][1])){\n\t\t\t\t\t$receiver->name = $this->to[0][1];\n\t\t\t\t}else{\n\t\t\t\t\t$receiver->name = substr($receiver->email, 0, strpos($receiver->email, '@'));\n\t\t\t\t}\n\t\t\t\t$receiver->html = 1;\n\t\t\t\t$receiver->confirmed = 1;\n\t\t\t\t$receiver->enabled = 1;\n\t\t\t}\n\n\t\t\tfor($i = 1; $i < count($matches); $i++){\n\t\t\t\t// Joomla emails does not contain links with href but links as text\n\t\t\t\t$tmp = $matches[$i];\n\t\t\t\tif($this->ContentType != 'text/html'){\n\t\t\t\t\t$matches[$i] = preg_replace('/(http|https):\\/\\/(.*)/', '<a href=\"$1://$2\" target=\"_blank\">$1://$2</a>', $matches[$i], -1, $count);\n\t\t\t\t\tif($count > 0) $acymailer->addParam('link'.$i, $tmp);\n\t\t\t\t\tif($count > 0) $acymailer->addParam('link', $tmp);\n\t\t\t\t}\n\t\t\t\t$acymailer->addParam('param'.$i, $matches[$i]);\n\t\t\t}\n\n\t\t\t// Special case for share an article from Joomla to get the subject set by the user\n\t\t\tif($alias == 'joomla-frontsendarticle'){\n\t\t\t\t$acymailer->addParam('senderSubject', $this->Subject);\n\t\t\t}\n\n\t\t\tif($createAcyUser == 1){\n\t\t\t\t$statusSend = $acymailer->sendOne($mailNotif->mailid, $this->to[0][0]);\n\t\t\t}else{\n\t\t\t\t$statusSend = $acymailer->sendOne($mailNotif->mailid, $receiver);\n\t\t\t}\n\t\t\t$app = JFactory::getApplication();\n\t\t\tif(!$statusSend) $app->enqueueMessage(nl2br($acymailer->reportMessage), 'error');\n\n\t\t\treturn $statusSend;\n\t\t}\n\t\t// No message sent\n\t\treturn 'noSend';\n\t}", "title": "" }, { "docid": "926d80ee2cbe2866db42616292c44fbf", "score": "0.53419507", "text": "function sendEmails()\n {\n global $TYPO3_CONF_VARS, $BE_USER, $LANG;\n $arSendMails\n = $TYPO3_CONF_VARS['SC_OPTIONS']['tx_nreasyworkspace_tcemain']['sendMails'];\n\n if (isset($arSendMails['to']) && is_array($arSendMails['to'])) {\n $emails = $arSendMails['to'];\n $message = sprintf($arSendMails['message'], $arSendMails['toreplace']);\n $message .= \"\\n\" . $LANG->getLL('message_notice');\n $message .= \"\\n\\n\" . $BE_USER->user['realName'];\n $message .= \"\\n\" . (\n $BE_USER->user['email'] != ''\n ? $BE_USER->user['email'] : ''\n );\n\n $returnPath = (\n $BE_USER->user['email'] != ''\n ? $BE_USER->user['realName'] . ' <' . $BE_USER->user['email'] . '>'\n : (\n $TYPO3_CONF_VARS['SYS']['siteemail'] != ''\n ? $TYPO3_CONF_VARS['SYS']['siteemail'] :\n '[email protected]'\n )\n );\n $ret = t3lib_div::plainMailEncoded(\n implode(',',$emails),\n $arSendMails['title'],\n trim($message),\n 'From: '.$returnPath.\"\\n\"\n );\n }\n }", "title": "" }, { "docid": "d5161267711f65da3415112738146f74", "score": "0.53406274", "text": "public function mail_fg() {\n\t// * Fungsi ini untuk memanggil function send_fg agar di generate menjadi excel dan di kirim ke email\n\t// * Untuk merubah list daftar email bisa ke Library -> Sendmail.php -> function mail_stock_fg()\n\t// * Mengirim email ke [email protected]\n\t// * cc ke [email protected], [email protected], [email protected], [email protected], [email protected]\n\t\n\t\t$this->send_fg('cahaya');\n\t\t$this->send_fg('theia');\n\t\t\n\t\t$this->load->library('sendmail');\n\t\t$this->sendmail->mail_stock_fg(\n\t\t\tarray(\n\t\t\t\t'attach01' => 'FG_CAHAYA_'.date('dmY').'.xls',\n\t\t\t\t'attach02' => 'FG_THEIA_'.date('dmY').'.xls',\n\t\t));\n\n\t}", "title": "" }, { "docid": "50534c6bdee9a4af3ee74180285035a2", "score": "0.5339953", "text": "function reservationPendingMail($reservationId){\n\t\t\n\t\t//*********************************\n\t\t// Get reservation details from DB\n\t\t//*********************************\n\t\t$bookingInfo = \t$this->ExecuteQuery(\"SELECT Reservation_Ref_No, Check_In_Date, Check_Out_Date, Arrival_Time, Client_Name, Email, Phone, Total_Rooms_Amt, Total_Guests_Amt, Subtotal_Amt, SGST_Amt, CGST_Amt, Grand_Total_Amt, CASE WHEN Reservation_Status=5 THEN 'Pending' END Reservation_Status\n\t\tFROM tbl_reservation \n\t\tWHERE Reservation_Id=\".$reservationId);\n\t\t\n\t\t//************************************************************\n\t\t$checkindate=date('d-m-Y',strtotime($bookingInfo[1]['Check_In_Date']));\n\t\t$checkoutdate=date('d-m-Y',strtotime($bookingInfo[1]['Check_Out_Date']));\n\t\t//************************************************************\n\t\t//Get Total No of Nights /////////////////////////////////////\n\t\t//************************************************************\n\t\t$date1 = new DateTime($bookingInfo[1]['Check_In_Date']);\n\t\t$date2 = new DateTime($bookingInfo[1]['Check_Out_Date']);\n\t\t\n\t\t//***********************************************************\n\t\t// Its calculates the the number of nights between two dates\n\t\t//***********************************************************\n\t\t$numberOfNights= $date2->diff($date1)->format(\"%a\"); \n\t\t\n\t\t/////////////////////////////////////////////////////////////////////////////\n\t\t// this calculates the diff between two dates, which is the number of nights\n\t\t/////////////////////////////////////////////////////////////////////////////\n\t\t$bookedRooms = $this->ExecuteQuery(\"SELECT COUNT( rc.R_Category_Id ) AS Room_Count, R_Category_Name, Adult, Children \n\t\tFROM tbl_reserved_rooms rr\n\t\tLEFT JOIN tbl_room_master rm ON rm.Room_Id = rr.Room_Id\n\t\tLEFT JOIN tbl_rooms_category rc ON rm.R_Category_Id = rc.R_Category_Id\n\t\t\n\t\tWHERE Reservation_Id=\".$reservationId.\" GROUP BY rc.R_Category_Id\n\t\t\");\n\t\t\n\t\t//*********************************\n\t\t// User Email Id //////////////////\n\t\t//*********************************\t\t\n\t\t//$to = \"[email protected]\";\n\t\t$to = $bookingInfo[1]['Email'];\n\t\t\n\t\t//*********************************************************\n\t\t// Email Subject //////////////////////////////////////////\n\t\t//*********************************************************\n\t\t$subject = 'Pending Reservation at Van Vinodan Resort';\n\t\t//*********************************************************\n\t\t// Message ////////////////////////////////////////////////\n\t\t//*********************************************************\n\t\t$message = '\n\t\t<table width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n \t<tr>\n \t<td style=\"padding:20px; background:#F2F2F2;\">\n \t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n \t<tr>\n <td><img src=\"images/logo.png\" alt=\"\" /></td>\n </tr>\n <tr>\n \t<td style=\"background:#fff; padding:15px; font-family:Arial, Helvetica, sans-serif; font-size:14px;\">\n \t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n \t<tr>\n \t<td>\n \t<h2>Thanks for showing an ineterest in reservation with Van Vinodan</h2>\n <p>your pending reservation and payment details</p>\n </td>\n </tr>\n <tr>\n \t<td style=\"background:#F2F2F2; padding:10px;\">\n \tYOUR RESERVATION DETAILS\n </td>\n </tr>\n <tr>\n \t<td style=\"padding:20px 10px; border:solid 1px #F2F2F2;\">\n \t<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n \t<tr>\n \t<td><strong>Reservation Ref. No.:</strong> '.$bookingInfo[1]['Reservation_Ref_No'].'</td>\n <td style=\"text-align:right;\"><strong>Date:</strong> '.date(\"M d, Y\").'</td>\n </tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td><strong>Reservation Status:</strong> '.$bookingInfo[1]['Reservation_Status'].'</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n <tr>\n \t<td colspan=\"2\" style=\"padding-bottom:15px;\">\n \t<table width=\"50%\">\n \t<tr>\n \t<td colspan=\"2\" style=\"padding-top:15px; padding-bottom:5px; border-bottom:solid 1px #CCCCCC;\"><strong>BILL To</strong></td>\n </tr>\n </table>\n </td>\n </tr>\n <tr>\n \t<td colspan=\"2\"><strong>Name:</strong> '.$bookingInfo[1]['Client_Name'].'</td>\n </tr>\n <tr>\n \t<td colspan=\"2\"><strong>Email:</strong> '.$bookingInfo[1]['Email'].'</td>\n </tr>\n <tr>\n \t<td colspan=\"2\"><strong>Phone:</strong> '.$bookingInfo[1]['Phone'].'</td>\n </tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n \t<td colspan=\"2\">\n \t<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n \t';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach($bookedRooms as $val){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$message .='<tr>\n \t<td>'.$val['R_Category_Name'].' - '.$val['Room_Count'].' Room(s)</td>\n <td>Adult(s):'.$val['Adult'].'&nbsp;&nbsp;&nbsp;&nbsp; Children(s):'.$val['Children'].'</td>\n </tr>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n $message .='</table>\n </td>\n </tr>\n \n <tr>\n \t<td colspan=\"2\"><strong>Check-In Date:</strong> '.$checkindate.'&nbsp;&nbsp;&nbsp;&nbsp;<strong>Check-Out Date:</strong> '.$checkoutdate.'</td>\n </tr>\n <tr>\n \t<td colspan=\"2\"><strong>Estimated Arriaval Time:</strong> '.$bookingInfo[1]['Arrival_Time'].' &nbsp;&nbsp;&nbsp;&nbsp; <strong>Total Nights:</strong> '.$numberOfNights.'</td>\n </tr>\n <tr>\n \t<td style=\"padding-top:30px;\">Total Room Amt.:</td>\n <td style=\"padding-top:30px;\">'.$bookingInfo[1]['Total_Rooms_Amt'].'</td>\n </tr>\n <tr>\n \t<td>Extra Guest Amt:</td>\n <td>0.00</td>\n </tr>\n <tr>\n \t<td>SGST:</td>\n <td>'.$bookingInfo[1]['SGST_Amt'].'</td>\n </tr>\n <tr>\n \t<td>CGST:</td>\n <td>'.$bookingInfo[1]['CGST_Amt'].'</td>\n </tr>\n <tr>\n \t<td style=\"border-top:solid 1px #CCC; border-bottom:solid 1px #CCC;\"><strong>GRAND TOTAL:</strong></td>\n <td style=\"border-top:solid 1px #CCC; border-bottom:solid 1px #CCC;\"><strong>'.$bookingInfo[1]['Grand_Total_Amt'].'</strong></td>\n </tr>\n <tr>\n \t<td colspan=\"2\" style=\"text-align:center; padding:15px;\">\n \t<a href=\"\"><img src=\"images/payBtn.png\" alt=\"\" /></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>';\n\t\t\n\t\t//*********************************************************\n\t\t// To send HTML mail, the Content-type header must be set\n\t\t//*********************************************************\n\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\t\t\n\t\t//*********************************************************\n\t\t// Additional headers /////////////////////////////////////\n\t\t//*********************************************************\n\t\t$headers .= 'From: Van Vinodan Reosrt <[email protected]>' . \"\\r\\n\";\n\t\t//$headers .= 'Cc: [email protected]' . \"\\r\\n\";\n\t\t//$headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n\t\t\n\t\t//*********************************************************\n\t\t// Send Mail //////////////////////////////////////////////\n\t\t//*********************************************************\n\t\tmail($to, $subject, $message, $headers);\n\t\t//*********************************************************\n\t}", "title": "" }, { "docid": "dae97057af04cb09f2fef45cb648291b", "score": "0.5339364", "text": "public function emailListings(){\n // Set timezone\n date_default_timezone_set('UTC');\n $recipients = Configure::read('FEATURED_LISTINGS_REPORT_RECIPIENT');\n foreach ($recipients as $recipient){\n // Start date\n $date = date('Y-m-d');\n // End date\n $num_days = 3;\n $listings = array();\n $recipient_email = $recipient['email'];\n $recipient_uni = $recipient['university_id'];\n for($i = 0; $i < $num_days; ++$i){\n $listings[$date] = array();\n $listing_ids = $this->FeaturedListing->getByDate($date, $recipient_uni);\n $featuredListings = $this->Listing->find('all', array(\n 'conditions' => array(\n 'Listing.listing_id' => $listing_ids\n )\n ));\n // Go through and add the relevant data as a new array to the listings array\n foreach ($featuredListings as $key => $fl) {\n $fldata = array(\n 'listing_id' => $fl['Listing']['listing_id'],\n 'address' => $fl['Marker']['street_address'],\n 'beds'=>$fl['Rental']['beds'],\n 'baths'=>$fl['Rental']['baths'],\n 'rent'=>$fl['Rental']['rent'],\n 'highlights'=>$fl['Rental']['highlights'],\n 'description'=>$fl['Rental']['description'],\n 'contact_email'=>$fl['Rental']['contact_email'],\n 'contact_phone'=>$fl['Rental']['contact_phone'],\n 'listing_url'=>'www.cribspot.com/listing/' . $fl['Listing']['listing_id'] \n );\n $fldata['primary_image_url'] = '';\n if (array_key_exists('Image', $fl)){\n foreach ($fl['Image'] as $image){\n if (array_key_exists('is_primary', $image) && intval($image['is_primary']) === 1)\n $fldata['primary_image_url'] = 'www.cribspot.com/' . $image['image_path'];\n }\n }\n\n if (!empty($fl['Marker']['alternate_name']))\n $fldata['address'] = $fl['Marker']['alternate_name'];\n\n array_push($listings[$date],$fldata);\n }\n\n $date = date (\"Y-m-d\", strtotime(\"+1 day\", strtotime($date)));\n } \n\n $template_data = array(\"listings\"=>$listings);\n $month = date('F');\n $day = date('j');\n $year = date('Y');\n $subject = \"Featured Listings Report for \" . $month.' '.$day.', '.$year;\n $recipient = $recipient_email;\n $this->_emailUser($recipient, $subject, \"featured_listings\", $template_data);\n }\n }", "title": "" }, { "docid": "b3b7463166fa255d29a2899f2211618b", "score": "0.5335925", "text": "public function setupMailer() {\n\n Requirements::clear();\n\n $this->parseVariables(true);\n\n if(empty($this->from)) $this->from = Email::config()->admin_email;\n\n $headers = $this->customHeaders;\n\n if(project()) $headers['X-SilverStripeSite'] = project();\n\n $to = $this->to;\n $from = $this->from;\n $subject = $this->subject;\n if ($sendAllTo = $this->config()->send_all_emails_to) {\n $subject .= \" [addressed to $to\";\n $to = $sendAllTo;\n if($this->cc) $subject .= \", cc to $this->cc\";\n if($this->bcc) $subject .= \", bcc to $this->bcc\";\n $subject .= ']';\n unset($headers['Cc']);\n unset($headers['Bcc']);\n } else {\n if($this->cc) $headers['Cc'] = $this->cc;\n if($this->bcc) $headers['Bcc'] = $this->bcc;\n }\n\n if ($ccAllTo = $this->config()->cc_all_emails_to) {\n if(!empty($headers['Cc']) && trim($headers['Cc'])) {\n $headers['Cc'] .= ', ' . $ccAllTo;\n } else {\n $headers['Cc'] = $ccAllTo;\n }\n }\n\n if ($bccAllTo = $this->config()->bcc_all_emails_to) {\n if(!empty($headers['Bcc']) && trim($headers['Bcc'])) {\n $headers['Bcc'] .= ', ' . $bccAllTo;\n } else {\n $headers['Bcc'] = $bccAllTo;\n }\n }\n\n if ($sendAllfrom = $this->config()->send_all_emails_from) {\n if($from) $subject .= \" [from $from]\";\n $from = $sendAllfrom;\n }\n\n Requirements::restore();\n\n return self::mailer()->setupMailer($to, $from, $subject, $this->attachments, $headers);\n\n }", "title": "" }, { "docid": "2c9fa84678c1e52019b589c871b97c71", "score": "0.5332789", "text": "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->input->post('clients_company_name');\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_client_welcome_client') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_client_welcome_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n //new client welcom email-------------------------------\n if ($email == 'new_client_admin') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_client_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n }\n\n }", "title": "" } ]
baacf4e8320d401c0f285b1c43eb3894
add the header here
[ { "docid": "d79e50481ee7f1b8ae2de8423ad4b878", "score": "0.0", "text": "public function send()\n {\n header('Content-Type: application/json');\n $success = false;\n $code = 404;\n $message = 'Problème lors de l\\'authentification';\n\n if ($this->input->post()) {\n if ($this->input->post('token') && $this->config->item('token_api') == $this->input->post('token')) {\n if (!empty($this->input->post('email')) && !empty($this->input->post('subject')) && !empty($this->input->post('message'))) {\n //Get Paramètre\n $params = $this->input->post();\n $email = $params['email'];\n $subject = $params['subject'];\n $message = strip_tags($params['message']);\n //Load model\n $this->load->model('emails_model');\n $send = $this->emails_model->send_simple_email($email, $subject, $message);\n if ($send) {\n $success = true;\n $code = 200;\n $message = 'Email envoyé avec succées';\n } else {\n $code = 300;\n $message = 'Problème lors de l\\'envoi de l\\'email';\n }\n } else {\n $code = 403;\n $message = 'Tous les champs sont obligatoire';\n }\n } else {\n $code = 500;\n $message = 'Token invalide';\n }\n }\n\n //Return result\n echo json_encode(array('success' => $success, 'code' => $code, 'message' => $message));\n }", "title": "" } ]
[ { "docid": "50d1330b7c8ef09b1afc9e2e9d447b24", "score": "0.8753686", "text": "public function add_header() {\n }", "title": "" }, { "docid": "294ff5badd658750ecc68865230fc105", "score": "0.86510605", "text": "protected function addHeader(){}", "title": "" }, { "docid": "d7f94141752e768138cc900361006ddb", "score": "0.80402356", "text": "public function createheader()\n {\n //\n }", "title": "" }, { "docid": "583a3e6fc7ff86cdecb9ab2f25c9d7dd", "score": "0.79603386", "text": "public function addHeader($header) {}", "title": "" }, { "docid": "4223304506627d741b0ba3bb5668ade5", "score": "0.79200166", "text": "function Header(){\n\t\t}", "title": "" }, { "docid": "3357571d6051a2e6a6959a95bd2e09ce", "score": "0.7841994", "text": "function addHeader($header) {\r\n\t\t$this->headers .= \"\\r\\n\".$header;\r\n\t}", "title": "" }, { "docid": "3286c4e26c34df53d9cb948e224fd74a", "score": "0.77486986", "text": "protected function makeHeader()\n {\n }", "title": "" }, { "docid": "4441902f27118e3d0f69de11dcbae643", "score": "0.773245", "text": "public function header()\n {\n }", "title": "" }, { "docid": "dbc1c35a9f6b2909e0661bde650e4b09", "score": "0.7721088", "text": "protected function generateHeader() {\n }", "title": "" }, { "docid": "be1524f3b174bbb2d4be2077077b86af", "score": "0.7689952", "text": "protected function header()\n {\n\n }", "title": "" }, { "docid": "c7201f8656da46ea041237346357f8aa", "score": "0.76748455", "text": "private static function generate_header()\n {\n }", "title": "" }, { "docid": "c5cb828e9e4dd36e51a3305f5ad9c367", "score": "0.7646356", "text": "public function header() {\n\t}", "title": "" }, { "docid": "c5cb828e9e4dd36e51a3305f5ad9c367", "score": "0.7646356", "text": "public function header() {\n\t}", "title": "" }, { "docid": "19d0297fc29c221546cdd42327e94db4", "score": "0.76100296", "text": "abstract public function header();", "title": "" }, { "docid": "ba9ac6a9516737a0da134567125ae628", "score": "0.7551951", "text": "abstract protected function header();", "title": "" }, { "docid": "651e7effba5e3985b2aff5439f47119a", "score": "0.7486784", "text": "public static function header(){\t?>\r\n\t\t\t\r\n\t\t\t<header>\r\n\t\t\t \t\t\t\r\n\t\t\t\t<hgroup>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t</hgroup>\r\n\t\t\t\t\t\t\t \r\n\t\t\t</header>\r\n\t\t<?php }", "title": "" }, { "docid": "424b198e900b46d13249bfa875432fcf", "score": "0.74674183", "text": "public function addHeader($head) {\n $this->header[] = $head;\n }", "title": "" }, { "docid": "e73b3e4af2dff671470efbaf9843941b", "score": "0.7375216", "text": "public function addHeader() {\n\t\t$this->startElement(self::HEADER_ELEMENT_NAME);\n\t\t$arg_list = func_get_args();\n\t\tif (func_num_args()==3) {\n\t\t\t$this->writeElement(self::ERROR_CODE_ELEMENT_NAME, $arg_list[0]); \n\t\t\t$this->writeElement(self::ERROR_MESSAGE_ELEMENT_NAME, $arg_list[1]);\n\t\t\t$this->writeElement(self::RESPONSE_ELEMENT_NAME, $arg_list[2]); \n\t\t}\n\t\telse if (func_num_args()==2) {\n\t\t\t$this->writeElement(self::ERROR_CODE_ELEMENT_NAME, $arg_list[0]); \n\t\t\t$this->writeElement(self::ERROR_MESSAGE_ELEMENT_NAME, $arg_list[1]); \n\t\t}\n\t\t$this->endElement();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ceeb479b8a2adc9aa4f1a0f975f553f6", "score": "0.7335992", "text": "protected function display_header()\n {\n }", "title": "" }, { "docid": "6101b58a3195ae2ae5377a3c43d70245", "score": "0.72296214", "text": "function Header() {\r\n // print the title\r\n $this->SetTitleFont();\r\n $this->Cell(100, 8, $this->title, 0, 0, \"L\");\r\n\r\n // print the author\r\n $this->SetAuthorFont();\r\n $this->Cell(0, 8, $this->author, 0, 0, \"R\");\r\n\r\n // header line\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, 17, 190, 0.2, \"F\");\r\n $this->Rect(10, 17.5, 190, 0.2, \"F\");\r\n $this->Ln(14);\r\n }", "title": "" }, { "docid": "bb435b6a624ace3540f59124dd70e08d", "score": "0.72207564", "text": "function myheader($additionalHeaderContent = NULL) {\n\t\tprint '<html>';\n\t\t\tprint '<head>';\n\t\t\t\tprint '<title>';\n\t\t\t\t\tif (defined('TITLE')) {\n\t\t\t\t\t\tprint TITLE;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tprint 'MiddleClik';\n\t\t\t\t\t}\n\t\t\t\tprint '</title>';\n\t\t\t\tprint \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; charset=utf-8\\\" />\";\n\t\t\t\tprint $additionalHeaderContent;\n\t\t\t\tprint \"<style type=\\\"text/css\\\">\";\n\t\t\t\t\tprint '//this is where my css, js goes';\n\t\t\t\tprint \"</style>\";\n\t\t\tprint '</head>';\n\t}", "title": "" }, { "docid": "c518b9c15186c5ae953ace7ebcfc12e4", "score": "0.7193495", "text": "private function addAdditionalHeaders(){\n array_push($this->headers, 'node_db_label');\n array_push($this->headers, 'datasource_name');\n array_push($this->headers, 'value');\n }", "title": "" }, { "docid": "9f7a8818c845e66537879aa2a2fd07ae", "score": "0.7184267", "text": "public function set_head($header) {\r\n\t\theader($header['name'] . \": \" . $header['value']);\r\n\t}", "title": "" }, { "docid": "03855fa151e1eda42880e2f22fe37028", "score": "0.71405286", "text": "public function addHeader($header)\n\t{\n\t\theader($header);\n\t}", "title": "" }, { "docid": "124c2b574a30924e478d27bfeaf90889", "score": "0.7121955", "text": "public function format_for_header()\n {\n }", "title": "" }, { "docid": "57d1cea9e341349bd79a40ac7b704883", "score": "0.70872724", "text": "function msdlab_pre_header(){\n print '<div class=\"pre-header\">\n <div class=\"wrap\">';\n do_action('msdlab_pre_header');\n print '\n </div>\n </div>';\n }", "title": "" }, { "docid": "c813c76149412ea3a9b300c62f5fd3a6", "score": "0.70785385", "text": "public function header()\n {\n echo \"<!doctype html>\\n<html lang='pt'>\\n<head>\\n\";\n echo \"\\t<meta charset='UTF-8'>\\n\";\n echo \"\\t<title>{$this->controller->getTitle()}</title>\\n\";\n $this->links();\n echo \"</head>\\n<body>\\n\";\n }", "title": "" }, { "docid": "ca249d1d98b24c30ac50e9ba779f8f8e", "score": "0.7078002", "text": "public function ajax_header_add()\n {\n }", "title": "" }, { "docid": "abbb3186b13adcd558dd8abc3d678606", "score": "0.7070628", "text": "protected function setCurlHeaderElement() {\n // set header for cur\n $this->header[] = 'Content-type: application/json';\n $this->header[] = 'Authorization: Bearer '.$this->accessToken;\n }", "title": "" }, { "docid": "cecb93cbaa887e32e596041767efae08", "score": "0.7069246", "text": "function display_header() {}", "title": "" }, { "docid": "12cc94e2163abf8d06d583f69132fd17", "score": "0.70539504", "text": "public function addHeader(){\n$this->page.= <<<EOD\n<html>\n<head>\n</head>\n<title>\n$this->title\n</title>\n<body>\n<h1 align=\"center\">\n$this->title\n</h1>\nEOD;\n}", "title": "" }, { "docid": "46b90884bf0b819223e6cf6ed7474a4d", "score": "0.7052516", "text": "public function __Header(){\n $this->Ln(5);\n $this->SetDrawColor(160,160,160);\n $this->SetFillColor(230,230,230);\n $this->SetTextColor(100);\n $this->SetFont('Arial','B',7);\n $this->SetX(($this->w - $this->_tWidth)/2);\n foreach($this->_fields as $field)\n $this->Cell($field[\"size\"],5,$field[\"header\"],1,0,\"C\",true);\n $this->Ln();\n }", "title": "" }, { "docid": "75e0f69f146104a41e09b0880dd70d2f", "score": "0.7040678", "text": "function Header() \n { \n\n list($r, $b, $g) = $this->xheadercolor; \n $this->setY(10); // shouldn't be needed due to page margin, but helas, otherwise it's at the page top \n $this->SetFillColor($r, $b, $g); \n $this->SetTextColor(0 , 0, 0); \n $this->Cell(0,20, '', 0,1,'C', 1); \n $this->Text(15,26,$this->xheadertext ); \n }", "title": "" }, { "docid": "8c38d8358e1569108b23eace62ae783f", "score": "0.70355165", "text": "function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}", "title": "" }, { "docid": "53d6cff6a7ea87f9c600e7f5ae6eb8d9", "score": "0.7028703", "text": "protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }", "title": "" }, { "docid": "e847812d03b2cbe900dac98b4053d600", "score": "0.70223975", "text": "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "title": "" }, { "docid": "de3977bcd08960a7675c8fb0789ba3fd", "score": "0.69904906", "text": "public function Header()\n {\n // Set the header logo.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\Nexus-logo.png', 120, 18, 40, 30);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 26);\n\n // Line break.\n $this->Ln(42);\n\n // Move to the right.\n $this->Cell(120);\n\n // Set page header title.\n $this->Cell(20, 3, 'NEXUS IT TRAINING CENTER', 0, 0, 'C');\n\n // Set the font.\n $this->AddFont('AsiyahScript', '', 'AsiyahScript.php');\n $this->SetFont('AsiyahScript', '', 40);\n\n // Line break.\n $this->Ln(12);\n\n // Set page header title.\n $this->Cell(259, 15, 'Certificate of Attendance', 0, 0, 'C');\n }", "title": "" }, { "docid": "5ecc75776a95c1ee73238509651444c7", "score": "0.6982362", "text": "public function addHeader ($header) {\n\t\t$this->headers[] = $header;\n\t}", "title": "" }, { "docid": "dd0da97d2bdc8a743dcb3b90357352fe", "score": "0.6975384", "text": "function header() {\n\t\techo '<div class=\"wrap\">';\n\t\techo '<h2>' . __( 'Import Vamtam Widgets', 'wordpress-importer' ) . '</h2>'; // xss ok\n\t}", "title": "" }, { "docid": "6b6e1346b91dbcc80db74fbd205cc05c", "score": "0.6966572", "text": "private function addHeaders()\n {\n $this->curl->addHeader('Content-Type', 'application/json');\n $this->curl->addHeader('Accept', 'application/json');\n }", "title": "" }, { "docid": "261720890074a4daa8630310ec575513", "score": "0.69397974", "text": "public static function addHeader($header)\n {\n header($header, false);\n }", "title": "" }, { "docid": "d2eb85645dd4e15168e070df438ce203", "score": "0.69073254", "text": "private function _setHeader() {\n\n $header = new stdClass;\n switch ($this->type) {\n case 'html':\n case 'htm': $content_type = 'text/html';\n break; //application/javascript?\n case 'js':\n case 'javascript': $content_type = 'text/javascript';\n break; //application/javascript?\n case 'css': $content_type = 'text/css';\n break;\n case 'pdf': $content_type = 'application/pdf';\n break;\n default: $content_type = $this->type;\n }\n $header->contentType = $content_type;\n\n if (isset($this->charset)) {\n $header->charset .= '; charset=' . $this->charset;\n } else {\n $header->charset .= '; charset=charset=';\n }\n\n $this->_printHeader($header);\n }", "title": "" }, { "docid": "c852c36cde3c1dd73b4fd427914845fe", "score": "0.69053614", "text": "function sloodle_print_header()\r\n {\r\n global $CFG;\r\n $navigation = \"<a href=\\\"{$CFG->wwwroot}/mod/sloodle/view.php?_type=course&id={$this->course->id}\\\">\".get_string('courseconfig', 'sloodle').\"</a>\";\r\n\r\n\r\n sloodle_print_header_simple(get_string('courseconfig','sloodle'), \"&nbsp;\", $navigation, \"\", \"\", true, '', navmenu($this->course));\r\n }", "title": "" }, { "docid": "26f0e560c0a5bb12adf6944af45a306e", "score": "0.6904523", "text": "function Header()\n\t{\n\t\t$logo=logo();\n\t\t$ancho_logo=ancho_logo();\n\t\t$direc_fiscal=direc_fiscal();\n\t\t$telef_emp=telef_emp();\n\t\t\n\t\t$this->Image(\"../imagenes/$logo\",15,10,$ancho_logo);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}", "title": "" }, { "docid": "148ebed6e91c8e87f4bc89397ecf2ba8", "score": "0.69040406", "text": "public function showHeader();", "title": "" }, { "docid": "aedda5c326c4eee4e16ca32a44049c1c", "score": "0.6899053", "text": "function rest_output_link_header()\n {\n }", "title": "" }, { "docid": "32d57e50aa2a5dca76de0b7e8ab4ee46", "score": "0.6879881", "text": "private function writeHeader()\n {\n $this->write(AvroDataIO::magic());\n $this->datum_writer->writeData(\n AvroDataIO::metadataSchema(),\n $this->metadata,\n $this->encoder\n );\n $this->write($this->sync_marker);\n }", "title": "" }, { "docid": "0c65355eae7b76bcd423b705314a5940", "score": "0.6874922", "text": "function Header()\n {\n //estableciendo imagen\n $this->image('../../../web/img/logo.png', 12, 10, 20, 20);\n //estableciendo fuente\n $this->setFont('Arial', 'B', 15);\n //espaciado\n $this->Cell(75);\n //Titulo del pdf\n $this->Cell(30, 20, $this->getText(), 0, 0, \"C\");\n //espaciado\n $this->Cell(45);\n //estableciendo color para nombre de proyecto\n $this->SetTextColor(53, 234, 188);\n //estableciendo un nuevo tama;o de fuente\n $this->setFont('Arial', 'B', 20);\n //nombre del pryecto\n $this->Cell(30, 20, 'Sttom xD', 0, 0, \"C\");\n //volviendo a tama;o original de letra\n $this->setFont('Arial', 'B', 15);\n //volviendo a color original de letra\n $this->SetTextColor(0,0,0);\n //salto de linea\n $this->Ln(30);\n //linea divisoria\n $this->SetDrawColor(53, 234, 188);\n $this->Line(10, 35, 210-10, 35);\n }", "title": "" }, { "docid": "3a5d860a2e9f69ec005b36a556e83490", "score": "0.6831914", "text": "public function addHeader($header)\n {\n $this->_headers[] = $header;\n }", "title": "" }, { "docid": "d34acd31b2aee548473e6a157d6bef55", "score": "0.6826646", "text": "function Header()\r\n {\r\n $this->SetFont('Arial','B',15);\r\n // Move to the right\r\n $this->Cell(80);\r\n // Framed title\r\n // Logo\r\n $this->Image('intestazione.png',10,10,178);\r\n // Line break\r\n $this->Ln(35);\r\n }", "title": "" }, { "docid": "89b16f416fc626f5cdd039119a53d536", "score": "0.6826396", "text": "public function printHeader(){\n ?>\n <div class=\"header\">\n <h2>Gestione Prezzi</h2>\n <p>Questa sezione è dedicata alla compilazione dinamica dei prezzi per i vari articoli</p>\n </div> \n <?php\n \n \n }", "title": "" }, { "docid": "20c689bff3c1ddc8a7288fe024cbcf8c", "score": "0.6825339", "text": "function Header()\n\t{\n\t\t$this->Image('../imagenes/logo.jpg',15,10,40);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->SetXY(70,15)\t;\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','L');\n\t//\t$this->MultiCell(190,5,\"CABLE, C.A.\",'0','L');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->SetX(70)\t;\n\t\t$this->MultiCell(190,5,strtoupper(_(tipo_serv())),'0','L');\n\t\t//$this->Ln(8);\n\t}", "title": "" }, { "docid": "fc123cbfb3855cfaf30a5d637953dbdb", "score": "0.6824012", "text": "public function addHeader($record=null)\n {\n return '';\n }", "title": "" }, { "docid": "1500dca0181e774ca58e46766acc0637", "score": "0.68065107", "text": "public function Header() {\n\t\t$x = 0;\n\t\t$dx = 0;\n\t\tif ($this->rtl) {\n\t\t\t$x = $this->w + $dx;\n\t\t} else {\n\t\t\t$x = 0 + $dx;\n\t\t}\n\n\t\t// print the fancy header template\n\t\tif($this->print_fancy_header){\n\t\t\t$this->printTemplate($this->header_xobjid, $x, 0, 0, 0, '', '', false);\n\t\t}\n\t\tif ($this->header_xobj_autoreset) {\n\t\t\t// reset header xobject template at each page\n\t\t\t$this->header_xobjid = false;\n\t\t}\n\t\t\n\t\t$this->y = $this->header_margin;\n\t\t$this->SimpleHeader();\n\t\t//$tmpltBase = $this->MakePaginationTemplate();\n\t\t//echo $tmpltBase;die();\n\t\t//echo('trying to print header template: ');\n\t\t//$this->printTemplate($tmpltBase, $x, $this->y, 0, 0, '', '', false);\n\t\t//die();\n\t}", "title": "" }, { "docid": "ea10058bee84c863e49f84fffe680f42", "score": "0.68053055", "text": "function additionalHeaderStuff() {\n return;\n }", "title": "" }, { "docid": "29a796107011fa7b51d8af292363c955", "score": "0.6791056", "text": "public function addHeader($name, $value);", "title": "" }, { "docid": "29a796107011fa7b51d8af292363c955", "score": "0.6791056", "text": "public function addHeader($name, $value);", "title": "" }, { "docid": "29a796107011fa7b51d8af292363c955", "score": "0.6791056", "text": "public function addHeader($name, $value);", "title": "" }, { "docid": "088c68b99d6cddc8537572cc8397223e", "score": "0.67870396", "text": "protected function writeHeader()\n {\n fwrite( $this->fd,\n \"<?php\\n\" );\n }", "title": "" }, { "docid": "dc027647df22ecba6685f1e8b180d6a0", "score": "0.67869395", "text": "function change_print_header($matches) {\n $newcode = '';\n $args = explode(',',$matches[2]);\n\n $newcode .= $matches[1].'$PAGE->set_context($context);';\n $newcode .= $matches[1].'$PAGE->set_pagelayout(\\'incourse\\');';\n\n $newcode .= (isset($args[0]))? $matches[1].'$PAGE->set_title('.$args[0].');' : '';\n $newcode .= (isset($args[1]))? $matches[1].'$PAGE->set_heading('.$args[1].');' : '';\n $newcode .= (isset($args[5]))? $matches[1].'$PAGE->set_cacheable('.$args[5].');' : '';\n $newcode .= (isset($args[6]))? $matches[1].'$PAGE->set_button('.$args[6].');' : '';\n $newcode .= (isset($args[7]))? $matches[1].'$PAGE->set_headingmenu('.$args[7].');' : '';\n\n $newcode .= $matches[1].'echo $OUTPUT->header()';\n return $newcode;\n }", "title": "" }, { "docid": "db04e513617195118cd7f1d11daf0bf9", "score": "0.67796254", "text": "function do_signup_header()\n {\n }", "title": "" }, { "docid": "76b7c709b8c22a8e7fce4b0e577c35a9", "score": "0.6779259", "text": "public function add_header($key, $value)\n {\n }", "title": "" }, { "docid": "1665e24ec4e4b5d0292bb7a630642db9", "score": "0.67757297", "text": "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\n }", "title": "" }, { "docid": "9d95b819dc4bd8a052722f2037f878ec", "score": "0.6775464", "text": "protected function header($header) {\r\n\t\theader($header);\r\n\t}", "title": "" }, { "docid": "1d3fda8f31b8cfb379681147d8f1bea7", "score": "0.6773577", "text": "public function GiveMe_headerSection()\r\n\t{\r\n \t//setcookie (\"password\", 'password' ,time()+ (10 * 365 * 24 * 60 * 60));\r\n\t\t\r\n\t\techo $this->headSection;\r\n\t}", "title": "" }, { "docid": "c5fdd8e1b44eec5de8cdb1dc47f3fbfd", "score": "0.6770953", "text": "function renderHeader(): void;", "title": "" }, { "docid": "64832ffb17985c21ffbecb9599281df0", "score": "0.67675924", "text": "function Header()\n\t{\n\t\t// Police Arial gras 24\n\t\t$this->SetTextColor(255,10,22);\n\t\t$this->SetFont('Arial','B',14);\n\t\t// Décalage à droite\n\t\t$this->Cell(10);\n\t\t// Titre (ligne,titre)\n\t\t$this->Cell('',10,'Liste des employes',0,0,'C');\n\t\t// Saut de ligne\n\t\t$this->Ln(20);\n\t}", "title": "" }, { "docid": "2b361756367ed130ab9df6257dc6cb42", "score": "0.6765296", "text": "function httpHeader($header) {\r\n\t\t$this->customHeaders[] = $header;\r\n\t}", "title": "" }, { "docid": "575bbb0f710d6442204d04f08a7d7f5e", "score": "0.6760311", "text": "public function addHeader($header, $value);", "title": "" }, { "docid": "5d782d891605a51d666052df37123ca0", "score": "0.6757896", "text": "private function _renderHeader()\n {\n if (true) {\n // open header tag\n echo Html::beginTag('header', ['class' => 'panel-heading']);\n\n $this->_renderTitle();\n\n // close header tag\n echo Html::endTag('header');\n }\n }", "title": "" }, { "docid": "feb86ea5e6e06b28b565ca533834a3b0", "score": "0.67572296", "text": "private function setHeader($header){\n $this->header = $header ;\n }", "title": "" }, { "docid": "ca20901d1cf5d5ede4e0fb27a8812412", "score": "0.6749695", "text": "function Header() {\n $this->AddFont('Gotham-M','B','gotham-medium.php'); \n //seteamos el titulo que aparecera en el navegador \n $this->SetTitle(utf8_decode('Toma de Protesta Candidato PVEM'));\n\n //linea que simplemente me marca la mitad de la hoja como referencia\n \t$this->Line(139.5,$this->getY(),140,250);\n\n \t//bajamos la cabecera 13 espacios\n $this->Ln(10);\n //seteamos la fuente, el color de texto, y el color de fondo de el titulo\n $this->SetFont('Gotham-M','B',11);\n $this->SetTextColor(255,255,255);\n $this->SetFillColor(73, 168, 63);\n //escribimos titulo\n $this->Cell(0,5,utf8_decode('Toma de Protesta Candidato PVEM'),0,0,'C',1); //el completo es 279 bueno 280 /2 = 140 si seran 10 de cada borde, entonces 120\n\n $this->Ln();\n }", "title": "" }, { "docid": "72a91e74364890d022cb9539afb98e6d", "score": "0.6745628", "text": "function get_custom_header()\n {\n }", "title": "" }, { "docid": "ebf959b4a465d44f04c8a55e7744a3aa", "score": "0.6744753", "text": "function AddHeader($keys)\n\t{\n\t\t$head = array_combine($keys,$keys);\n\t\t$this->Header()->NewRow($head);\n\t}", "title": "" }, { "docid": "8d19165d858de423aa2ede22578f671d", "score": "0.6743467", "text": "function page_header()\n\t{\n\t\t$this->form_handler();\n\n\t\techo \"<div class='wrap'>\\n\";\n\t\techo \"<h2>\" . $this->args['page_title'] . \"</h2>\\n\";\n\t}", "title": "" }, { "docid": "46bda1100bd945a8fed98ff7a48c23b4", "score": "0.6722881", "text": "public function header(){\n $title = $this->title;\n $css_files = $this->css_files;\n include_once('templates/header.php');\n }", "title": "" }, { "docid": "6b649a8932b161a2bf15dddbe51a1cb5", "score": "0.6710795", "text": "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t$this->SetFont('Arial','B',10);\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->MultiCell(190,7,strtoupper(_('listado de clientes para cortes')),'0','C');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(133);\n\t\t$this->Cell(12,5,strtoupper(_('fecha')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,strtoupper(_('hora')).': ',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t$this->Ln();\t\t\n\t}", "title": "" }, { "docid": "a8630e0bb14fa25b4ec77b623a081d15", "score": "0.67106867", "text": "protected function addHeaderRowToCSV() {}", "title": "" }, { "docid": "fa169bc58f8b4c2b39b49218ac73bbd2", "score": "0.67055535", "text": "public function Header()\n {\n $this->Image('assets/images/pdf/logo_puce.PNG',10,8,22);\n $this->SetFont('Arial','B',13);\n $this->Cell(80);\n $this->Cell(120,10,'PONTIFICIA UNIVERSIDAD CATOLICA DEL ECUADOR',0,0,'C');\n $this->Ln('5');\n $this->SetFont('Arial','B',8);\n $this->Cell(80);\n $this->Cell(120,10,'REPORTES DE ESTUDIANTES',0,0,'C');\n $this->Ln(5);\n $this->Cell(80);\n $this->Cell(120,10,$this->titulo,0,0,'C');\n $this->Ln(20);\n\n\n\n }", "title": "" }, { "docid": "6ae18940d6d900800daf9497d0076370", "score": "0.6702964", "text": "function displayHeader()\n\t{\n\t\t// output locator\n\t\t$this->displayLocator();\n\n\t\t// output message\n\t\tif($this->message)\n\t\t{\n\t\t\tilUtil::sendInfo($this->message);\n\t\t}\n\t\tilUtil::infoPanel();\n\n//\t\t$this->tpl->setTitleIcon(ilUtil::getImagePath(\"icon_pd_b.gif\"),\n//\t\t\t\"\");\n\t\t$this->tpl->setTitle($this->lng->txt(\"bookmarks\"));\n\t}", "title": "" }, { "docid": "558152d2509e276e21eed8267270e8dd", "score": "0.66907215", "text": "public function Header(){\n $ci =& get_instance();\n // Select Arial bold 15\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',16);\n // Move to the right\n //$this->Cell(80);\n // Framed title\n // Logo\n $this->Image(asset_url() . \"images/logo.png\",11,5,0,20);\n $this->Ln(15);\n $this->Cell(0,10,\"GetYourGames\",0,1,'L');\n $this->SetFont('Futura-Medium','',12);\n $this->Cell(0,10,site_url(),0,1,\"L\");\n $this->Ln(5);\n $this->SetFont('Futura-Medium','',18);\n $this->Cell(0,10,utf8_decode($this->title),0,1,'C');\n // Line break\n $this->Ln(10);\n $this->SetFont('Futura-Medium','',11);\n $this->Cell(15,10,utf8_decode('#'),'B',0,'C');\n $this->Cell(100,10,utf8_decode($ci->lang->line('table_product')),'B',0,'L');\n $this->Cell(30,10,utf8_decode($ci->lang->line('table_qty')),'B',0,'L');\n $this->Cell(40,10,utf8_decode($ci->lang->line('table_subtotal')),'B',1,'L');\n\n $this->Ln(2);\n }", "title": "" }, { "docid": "9acb48c31152571ffeecc0ac35f63c68", "score": "0.668402", "text": "public function Header() {\n \n // Logo SEIP\n $image_file = $this->generateAsset('bundles/pequivenseip/logotipos-pqv/logo_menu_seip.png'); //K_PATH_IMAGES.'logo_example.jpg';\n $this->Image($image_file, 10, 10, 15, '', 'PNG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Set font\n $this->SetFont('helvetica', 'B', 16);\n $this->SetTextColor(255,0,0);\n // Title\n $text='<div align=\"center\" style=\"font-size: 1em;color: red;\">'.$this->title.'<br>'.$this->period->getDescription().'</div>';\n $this->writeHTML($text);\n // Logo Pqv\n $image_file = $this->generateAsset('bundles/pequivenseip/logotipos-pqv/logo_pqv2.gif'); //K_PATH_IMAGES.'logo_example.jpg';\n $this->Image($image_file, 190, 10, 15, '', 'GIF', '', 'T', false, 300, '', false, false, 0, false, false, false);\n // Línea HR\n $lineRed = array('width' => 1.0, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(255, 0, 0));\n $this->Line(0, 27, 300, 27, $lineRed);\n }", "title": "" }, { "docid": "c0c83c44958722494366ad9f6b8cd8dc", "score": "0.668316", "text": "function Header() {\n\t\tif (is_null($this->_tplIdx)) {\n\t\t\t$this->setSourceFile('gst3.pdf');\n\t\t\t$this->_tplIdx = $this->importPage(1);\n\t\t}\n\t\t$this->useTemplate($this->_tplIdx);\n\n\t\t$this->SetFont('freesans', 'B', 9);\n\t\t$this->SetTextColor(255);\n\t\t$this->SetXY(60.5, 24.8);\n\t\t$this->Cell(0, 8.6, \"TCPDF and FPDI\");\n\t}", "title": "" }, { "docid": "787015125fe17f06c542370e70261c10", "score": "0.66786385", "text": "public function print_header() {\n header('Content-type: text/csv');\n $filename = $this->page->title;\n $filename = preg_replace('/[^a-z0-9_-]/i', '_', $filename);\n $filename = preg_replace('/_{2,}/', '_', $filename);\n $filename = $filename.'.csv';\n header(\"Content-Disposition: attachment; filename=$filename\");\n }", "title": "" }, { "docid": "f053203d77452b3b1cfcbea663f091fd", "score": "0.66666895", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\"; \r\n\r\n\t\t$header = '<a class=\"operacion btn btn-success\" name=\"RefreshGroupFromFb\" id=\"'.preg_replace('/\\D/', '', $_GET['super_id'] ).'\" href=\"#\">Refresh From FB</a> '; \r\n\t }", "title": "" }, { "docid": "0305fa85255c1a521630f7a6c86841ea", "score": "0.6659373", "text": "function header() {\n\t\techo '<div class=\"wrap\">';\n\t\tscreen_icon();\n\t\techo '<h2>' . __( 'JigoShop To WooCommerce Converter', 'woo_jigo' ) . '</h2>';\n\t}", "title": "" }, { "docid": "eb7add98324861b0d76b3b97586a8a6d", "score": "0.6648673", "text": "function setHeader($header) {\n $this->header = $header;\n }", "title": "" }, { "docid": "ff44b05f66674b71103ae841f08b248d", "score": "0.6645772", "text": "function Header()\n\t{\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t}", "title": "" }, { "docid": "a0acca69dada137a94725b5e69b80cca", "score": "0.66445297", "text": "public function extObjHeader()\n {\n if (is_callable([$this->extObj, 'head'])) {\n $this->extObj->head();\n }\n }", "title": "" }, { "docid": "d3f6a7f1e906db59dd40ac2187764ed6", "score": "0.6630338", "text": "function Header()\n\t{\n\t\t//$this->Image('../imagenes/cabecera.jpg',20,10,40);\n\t\t$this->SetTextColor(74,90,109);\n\t\t$this->SetFont('Arial','',12);\n\t\t$this->MultiCell(190,5,nombre_empresa(),'0','C');\n\t\t$this->SetFont('Arial','',10);\n\t\t$this->MultiCell(190,5,tipo_serv(),'0','C');\n\t\t\n\t\t$this->SetFont('Arial','B',10);\n\t\t\n\t\t$this->MultiCell(190,7,utf8_decode(\"ESTADISTICAS ANUALES DE $this->nombre_det_orden POR SECTOR\"),'0','C');\n\t\t\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->SetX(123);\n\t\t$this->Cell(12,5,'Fecha:',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"d/m/Y\"),0,0,'L');\n\t\t$this->SetFont('Arial','B',8);\n\t\t$this->Cell(12,5,'Hora:',0,0,'L');\n\t\t$this->SetFont('Arial','',8);\n\t\t$this->Cell(18,5,date(\"h:i:s A\"),0,0,'L');\n\t\t\n\t}", "title": "" }, { "docid": "77aba61c77299147411f6276a28c514e", "score": "0.6628576", "text": "public function view_header(){\n echo 'Вызов метода класса Page хедер = '.$this->header.'<br>';\n }", "title": "" }, { "docid": "9aadf93faf5e4aa8893487b5146646ab", "score": "0.6615078", "text": "function displayHeader() { \n\t\tif (!in_array(\"header\",$this->displayed)) {\n\t\t\techo $this->header;\n\t\t\t$this->displayed[] = \"header\";\t\n\t\t}\n\t}", "title": "" }, { "docid": "393986669f8f35d91f26c9cf0e69bd99", "score": "0.66108197", "text": "public function addHeader($header): CuxMailer{\n $this->_headers[] = $header;\n return $this;\n }", "title": "" }, { "docid": "0989510809025de127b2974ecc07f2f0", "score": "0.6604825", "text": "public function buildHeader() {\n $header = [];\n\n $header['title'] = $this->t('Title');\n $header['release_date'] = $this->t('Release date');\n $header['rating'] = $this->t('Rating');\n\n return $header + parent::buildHeader();\n }", "title": "" }, { "docid": "915f3d7ae4de756801c54eb1be1ed16e", "score": "0.66026884", "text": "public function header(){\n\t \tinclude TEMPLATE_PATH.\"header.php\";\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" }, { "docid": "784df685890c56cc6c058b0888f72c03", "score": "0.6600819", "text": "function Page_DataRendering(&$header) {\r\n\r\n\t\t// Example:\r\n\t\t//$header = \"your header\";\r\n\r\n\t}", "title": "" } ]
262fd44ffb2036512bb2cf5801377ebc
$this>builder()>select("systemuser.id, systemuser.password")>where("username", $username)>join($role." as role","role.id=systemuser.id" );
[ { "docid": "7f330855fcf57cbca19cf7ad1ae1ca27", "score": "0.0", "text": "public function findMyCategories($idS){\n return $this->builder()->select(\"shopcat.idC,category.name\")->where(\"idShop\", $idS)->join(\"category\",\"category.idC=shopcat.idC\")->get()->getResultObject();\n \n \n }", "title": "" } ]
[ { "docid": "76be21581a39f1d6f82f22d793b8150d", "score": "0.6660432", "text": "function ambilpass($where){\n $query = $this->db->select('profile.id_profile, profile.nama_user, profile.username_user, profile.notelp_user, profile.foto_user, profile.id_user, login.password_user, login.type_user, login.nama_user as nmuser, login.id_user')\n ->from('profile')\n ->join('login', 'profile.id_user = login.id_user', 'inner')\n ->where($where)\n ->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "5921b62b2fea1dd3f9340bd5333be7ac", "score": "0.66570896", "text": "public function getUser(){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->db->select(\"user.name,user.id,user.email,user.phone,user.identitynumber,role.id as roleid,role.role,login.id as loginid,login.password\")\n\t\t\t\t\t\t->from(\"user\")\n\t\t\t\t\t\t->join(\"login\",\"login.user_id = user.id\")\n\t\t\t\t\t\t->join(\"role\",\"role.id = login.role_id\")\n\t\t\n\t\t\t\t->order_by('user.id');\n\t\treturn $this->db->get()->result() ;\n\t}", "title": "" }, { "docid": "780978400a089451d7b321cb4a4e2c84", "score": "0.6614035", "text": "function selectRole($user, $role) {\n $query = \"\tSELECT\t\tkuka.kuka \t\tAS 'kuka' \n\t\t\t\t\t, kuka.yhtio \t\t\tAS 'yhtio' \n\t\t\t\t\t, yhtio.nimi \t\t\tAS 'yhtionNimi' \n\t\t\t\t\t, TAMK_pankkitili.tilinro \tAS 'tilinro'\n\t\t\t\t\t, yhtio.ytunnus\t\t\tAS 'ytunnus'\n\t\t\t\tFROM\t\tkuka \n\t\t\t\tJOIN\t\tyhtio\n\t\t\t\tON\t\t\tkuka.yhtio = yhtio.yhtio \n\t\t\t\tJOIN\t\tTAMK_pankkitili\n\t\t\t\tON\t\t\tyhtio.ytunnus = TAMK_pankkitili.ytunnus\n\t\t\t\tWHERE\t\tkuka.kuka = '$user' \n\t\t\t\t\t\tAND yhtio.ytunnus = '$role'\n\t\t\t\t; \";\n\n print_result($query);\n}", "title": "" }, { "docid": "2dbaeda5e529b6f6d2c542bb2944f240", "score": "0.6555518", "text": "public function Users(){\n// ->join('model_has_roles', 'users.id', '=', 'model_has_roles.model_id')\n// ->join('roles', 'model_has_roles.role_id', '=', 'roles.id')\n// ->select('users.id as userID', 'first_name', 'last_name', 'email', 'company.name', 'roles.name' )\n// ->get();\n return response()->json(User::get(),200);\n }", "title": "" }, { "docid": "816f2cc1fc889b6233883390ed2d9dcb", "score": "0.6492944", "text": "private function _allRoles() \n {\n\n return (new \\yii\\db\\Query())\n ->select([\n 'ai.name'\n ])\n ->from('auth_item ai')\n ->join('LEFT JOIN','project_collection pc' , 'pc.collection_id=c.id')\n ->join('LEFT JOIN','project p' , 'pc.project_id=p.id')\n ->distinct(true) \n ->all();\n\n \n\n }", "title": "" }, { "docid": "9863f1000f3fd150c5c2c0c058414ef5", "score": "0.6402558", "text": "public function get_all_join($role) {\n $field = array(\n 'system_users.id',\n 'user_firstname',\n 'user_lastname',\n 'user_username',\n 'user_gender',\n 'user_image',\n 'user_created',\n 'user_modified',\n 'user_lastlogin',\n 'user_lastlogout',\n 'user_flag',\n 'user_status'\n );\n $this->db->select($field);\n $this->db->from($this->table);\n $this->db->where('user_role', $role);\n $this->db->join($this->table_joined, $this->table_joined.'.user_id = '.$this->table.'.id');\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "05fa80f3ff5a1be046d8af9ff10e9e78", "score": "0.63919824", "text": "public function user(){\n\n\n$users = DB::table('users')\n ->join('roles', 'users.id', '=', 'roles.id')\n ->join('product_types', 'users.id', '=', 'product_types.id')\n ->select('users.*', 'roles.*','product_types.*')\n ->get();\n\n\n return view('user',['query'=>$users]);\n \t\n }", "title": "" }, { "docid": "08a060e4d8c68ca43391ecad44224f7a", "score": "0.63251626", "text": "function get_by_login($username,$password)\n {\n $this->db->where('username', $username);\n $this->db->where('password', md5($password));\n $this->db->join('level','level.id_level=user.id_level');\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "3f0fba626f0a06151369c48ed4bd1aff", "score": "0.6276002", "text": "function fetch_admin_data($userid=''){\n $query=$this->db->query(\"select * from user AS e left JOIN user_details AS u ON e.user_id = u.ud_user_id WHERE e.user_id='$userid'\");\n return $query->result();\n }", "title": "" }, { "docid": "dd57d0f1ef3e94759cb905e57745a057", "score": "0.61837393", "text": "public function getUserByToken($token){\n /* \n SELECT * FROM client WHERE remember_token ='\".$token.\"';\n */\n //string format\n $args = array(\n 'where' => array(\n 'remember_token' => $token,\n )\n );\n //array format\n /* $args = array(\n 'fields' => ['id', 'name', 'email','password','role','status']\n ); */\n return $this->select($args);\n}", "title": "" }, { "docid": "723b806ec61f6631faa5cde5211359a4", "score": "0.61332333", "text": "public function getUser(){\n \t$select = $this->select()->where('role = ?', 'user')->order('name');\n \treturn $this->fetchAll($select);\n }", "title": "" }, { "docid": "c4171051360fd7d46e4e9d81ee20525b", "score": "0.6064355", "text": "function rolesetup($id_user,$name_page){\n$db = new Database();\n$db->connect();\n$db->selectall(\"pr_user_role\",'*',null,'id_user='.$id_user); // Table name, Column Names, JOIN, WHERE conditions, ORDER BY conditions\n$res = $db->getResult();\n $name_role=$res[0][\"name_role\"];\n\n$db = new Database();\n$db->connect();\n$db->selectall(\"role_setup\",'*',null,\"`name_role` = '\".$name_role.\"' AND `name_page` = '\".$name_page.\"'\"); // Table name, Column Names, JOIN, WHERE conditions, ORDER BY conditions\n$res = $db->getResult();\n \n$return=$res[0];\nreturn $return;\n\n \n \n\n \n}", "title": "" }, { "docid": "1a8c3a8a10d9feacf412397b3f78c2ec", "score": "0.60564566", "text": "public function getUsers(){\n $query = \"SELECT user.*, user_level.level_name\n From user JOIN user_level\n ON user.level_id = user_level.id_level\n \";\n \n return $this->db->query($query)->result_array();\n\n }", "title": "" }, { "docid": "f654ddd5144ea4fa43c82beee0119d86", "score": "0.60421723", "text": "function get_users_demo(){\n $sql='select crx_demo_users.*,crx_ads.keywords from crx_demo_users inner join crx_ads on crx_demo_users.id=crx_ads.user';\n $data=select_sql($sql);\n return $data;\n}", "title": "" }, { "docid": "8e3c6f722916fb469b5166c22a254368", "score": "0.60159", "text": "public function GetMailFromRolId($rolid){\n //inner join usuario on usuario.rut = braizperuser.fk_rut)\n //) where braizperuser.fk_rolid = 2424\n \n \n \n \n}", "title": "" }, { "docid": "28fef830716ee34c889b019fcf9cd301", "score": "0.59853655", "text": "function get_another_users($role){\n\n\t$users = array();\n\n\t$sql = db_select('users', 'u');\n\n\t$sql->innerJoin('users_roles', 'ur', 'ur.uid = u.uid');\n\t$sql->innerJoin('role', 'r', 'r.rid = ur.rid');\n\t$sql->innerJoin('field_data_field_ef_first_name', 'fn', 'fn.entity_id = u.uid');\n\t$sql->innerJoin('field_data_field_ef_last_name', 'ln', 'ln.entity_id = u.uid');\n\n\t$sql->fields('u', array('uid', 'name'));\n\t$sql->fields('fn', array('field_ef_first_name_value'));\n\t$sql->fields('ln', array('field_ef_last_name_value'));\n\t$sql->fields('r', array('rid', 'name'));\n\n\t$sql->condition('r.name', $role, '=');\n\t$sql->condition('u.status', 1, '=');\n\n\t$sql->orderBy('ln.field_ef_last_name_value', 'ASC');\n\n\t$results = $sql->execute()->fetchAll();\n\n\tforeach ($results as $key => $value) {\n\t\t$users[$value->uid] = $value->field_ef_last_name_value . ', ' .\n\t\t\t$value->field_ef_first_name_value . ' - ' . $value->name . ' -';\n\n\t}\n\n\treturn $users;\n}", "title": "" }, { "docid": "43bde0ad2c4a41559fcaeba288a2f73b", "score": "0.5982717", "text": "public function getUserList ()\r\n\t{\r\n\t\t$sql = $this->select()\r\n\t\t\t->from($this->t1, array(\"{$this->t1}.*\", \"group_concat({$this->t2}.name) as role\"))\r\n\t\t\t->joinLeft($this->rsh, \"{$this->t1}.id = {$this->rsh}.user_id\", null)\r\n\t\t\t->joinLeft($this->t2, \"{$this->t2}.id = {$this->rsh}.role_id\", null)\r\n\t\t\t->group(\"{$this->t1}.id\");\r\n\t\t\r\n\t\treturn $this->dbr()->fetchAll($sql);\r\n\t}", "title": "" }, { "docid": "f9fc34df6aa1ad048aa763a93450dad0", "score": "0.5967289", "text": "public function tableJoin() {\n\n $this->db->select('user.name');\n $this->db->select('chat.*');\n $this->db->from('chat');\n $this->db->join('user', 'chat.user_id = user.id');\n\n $query = $this->db->get();\n\n return $query->result_array();\n }", "title": "" }, { "docid": "9a3e3e2977f9800b346761182c349786", "score": "0.5950985", "text": "public function showPMusers($page_key=null)\n\n{\n\n $users = DB::table('users')\n ->join('role_user', 'users.id', '=', 'role_user.user_id')\n ->join('roles', 'roles.id', '=', 'role_user.role_id')\n ->where('roles.role_name', '=', 'account_manager')\n\n ->where('Status', '=', '1')\n ->get();\n\n \n \n\n return View::make('list_users', array('user_list'=>$users, 'page_key'=>$page_key));\n\n}", "title": "" }, { "docid": "228a0af137304992a0e8a4cd5999a7e3", "score": "0.5946742", "text": "function get_role()\n {\n // $this->db->distinct();\n $this->db->select('userID');\n $this->db->select('role');\n $this->db->from('user');\n $query = $this->db->get();\n $result = $query->result();\n\n //array to store userID id & role\n // $userid = array('-SELECT-');\n // $role = array('-SELECT-');\n for ($i = 0; $i < count($result); $i++)\n {\n array_push($userid, $result[$i]->userID);\n array_push($role, $result[$i]->role);\n }\n return $userid_result = array_combine($userid, $role);\n }", "title": "" }, { "docid": "296f7d557f7777b9cbad13ef3fb81787", "score": "0.5945281", "text": "function data_login($username,$password) {\n $this->db->where(\"(admin.email = '$username' OR admin.username = '$username')\");\n $this->db->where('password', $password);\n return $this->db->get('admin')->row();\n }", "title": "" }, { "docid": "58003092a4300ba4cf60498a72fe1924", "score": "0.59409666", "text": "public function getJoinUser($TableName1,$TableName2,$fieldName,$user_id){\n\t$query = \"SELECT \".$TableName1.\".* FROM \".$TableName1.\" WHERE EXISTS (SELECT \".$TableName2.\".`user_id` AS `id` FROM \".$TableName2.\" WHERE \".$TableName2.\".\".$fieldName.\" = '$user_id' AND \".$TableName2.\".`user_id`=\".$TableName1.\".`user_id`)\";\n\t$this->exe = $this->db->query($query);\n\treturn $this->exe->result_array();\n}", "title": "" }, { "docid": "82a7ab9e778aea359885cb08c42d5d2e", "score": "0.5932521", "text": "public function login($user){\r\n$this->db->where('admin_user',$user);\r\n$result=$this->db->get($this->table);\r\nreturn $result->row();\r\n}", "title": "" }, { "docid": "76d84b6bf8261d7ca347a84542a05d2e", "score": "0.5924914", "text": "function getActiveEmployees(){\n $query = ORM::forTable(\"emp\")->tableAlias(\"t1\")->innerJoin(\"users\", array(\"t1.emp_uid\", \"=\", \"t2.emp_uid\"), \"t2\")->whereNotEqual(\"t2.username\", \"0001\")->where(\"t1.status\", \"1\")->orderByAsc(\"t2.username\")->findMany();\n return $query;\n}", "title": "" }, { "docid": "247d51f6c3de8228504f6be0dffc8108", "score": "0.5902146", "text": "function operations(){\n return DB::table('employees')\n ->join('users','employees.id','=','users.emp_id')\n ->where('users.emp_id','4')\n ->select('users.*')\n ->get();\n }", "title": "" }, { "docid": "d6e5d120625f20030d9b01a0bfe64b0a", "score": "0.59000957", "text": "public function roles(){\n\n return DB::table(\"users\")\n ->join(\"user_roles\", \"users.id\", \"user_roles.user_id\")\n ->join(\"roles\", \"user_roles.role_id\", \"roles.id\")\n ->where(\"users.id\", $this->id)\n ->get();\n }", "title": "" }, { "docid": "296a5747965d90b17712517ba1d21180", "score": "0.58985853", "text": "public function query()\n {\n Route::currentRouteName()=='admin.access.users.deactivated' ? $result = 0 : $result = 1;\n $users = User::select('*','users.name as name','users.id as id')\n ->join(\"assigned_roles\",'assigned_roles.user_id','=','users.id')\n ->join(\"roles\",'roles.id','=','assigned_roles.role_id')\n ->where('status','=',$result);\n return $this->applyScopes($users);\n }", "title": "" }, { "docid": "8330e694a0ca6848bc74c1a1272c057e", "score": "0.5892118", "text": "public static function employeeprofile(){\n $logedid = Auth::id();\n $sql= DB::table('users')\n ->select('users.*', 'departments.department', 'emp_bank_details.user_id', 'emp_bank_details.bank_name', 'emp_bank_details.branch', 'emp_bank_details.account_name', 'emp_bank_details.account_number', \n 'emp_bank_details.bsb', 'emp_bank_details.status', 'emp_bank_details.status')\n ->leftjoin('departments','users.department_id', '=', 'departments.id')\n ->leftjoin('emp_bank_details','users.id', '=', 'emp_bank_details.user_id')\n ->where('users.id','=', $logedid)\n ->get();\n return $sql; \n\n }", "title": "" }, { "docid": "ce3604688192dc271348cdcc8bf8783f", "score": "0.5885072", "text": "public static function getAdministration()\n {\n\n return DB::table('users as u')\n ->select('u.id', 'u.name', 'u.email')\n ->Join('role_user as ru', 'ru.user_id', '=', 'u.id')\n //->whereIn('ru.role_id', $roles->pluck('id'))\n ->groupBy('u.id')\n ->get();\n }", "title": "" }, { "docid": "1e6103a895c731e40ee4519bfa0c6d70", "score": "0.5873566", "text": "public function getUsersLoginPass($login, $password) {\n $type = 'arraydata';\n $sql = \"SELECT `\".PREF.\"users`.id, `\".PREF.\"users`.banned FROM `\".PREF.\"users` \" \n . \"WHERE `\".PREF.\"users`.username = :username and `\".PREF.\"users`.password= :password\";\n// $sql = \"select `id`, `id_role` from \".PREF.\"users where `username` = :username and `password`= :password\"; \n $data_array=array(\n 'username' => $login,\n 'password' => $password\n );\n $result = $this->driver->query($sql, $type, $data_array); \n return $result; \n }", "title": "" }, { "docid": "b1d37e1f7291e8252bca8567b7fe16e3", "score": "0.58238715", "text": "function joinData(){\n return DB::table('linkdetail')\n ->join('profiledatas','linkdetail.id','=','profiledatas.id')\n //->select('profiledatas.*','linkdetail.*')\n ->where('linkdetail.id',2)\n ->select('linkdetail.ips','profiledatas.mob')\n ->get();\n\n }", "title": "" }, { "docid": "348529b96d8d2aa9d0c6d329c193509a", "score": "0.5804838", "text": "static function user_list(){\n return self::$db->where(array('role_id' => 2,'activated' => 1))->get('users')->result();\n }", "title": "" }, { "docid": "9aed864160de3f6fee2e342aa657bdd2", "score": "0.5796796", "text": "protected function getLoginSelectStatement() { \n return \"SELECT UserID, UserName, Password, Salt, State, DateJoined, DateLastModified\n FROM UsersLogin\";\n }", "title": "" }, { "docid": "ca44127cddb82ca27cae4683fad95dc3", "score": "0.5794687", "text": "private function getJoinFields() {\n return \n \"advertisements.id AS id,\".\n \"advertisements.title AS title,\".\n \"users.id AS userid,\".\n \"users.name AS name\";\n }", "title": "" }, { "docid": "652bcb15dd9c4f611dcbc0d03aae4f1d", "score": "0.5790279", "text": "function auth_admin($username,$password){\n $query=$this->db->query(\"SELECT * FROM admin WHERE username='$username' AND password=('$password') LIMIT 1\");\n return $query;\n }", "title": "" }, { "docid": "f7d52b41c9bf9331fe57e35cef5d1c55", "score": "0.5786953", "text": "function getUserInfoWithRole($userId)\r\n {\r\n $this->db->select('BaseTbl.id, BaseTbl.email, BaseTbl.name, BaseTbl.mobile, BaseTbl.roleId, Roles.role');\r\n $this->db->from('users as BaseTbl');\r\n $this->db->join('roles as Roles','Roles.id = BaseTbl.roleId');\r\n $this->db->where('BaseTbl.id', $userId);\r\n $this->db->where('BaseTbl.isDeleted', 0);\r\n $query = $this->db->get();\r\n \r\n return $query->row();\r\n }", "title": "" }, { "docid": "ee6725fbeab46fea770fbf4103f38fe3", "score": "0.57738787", "text": "public function user(){\n return $this->belongsTo(User::class)->select('id','role_id','name','email');\n }", "title": "" }, { "docid": "96eb4b9e53a1b32813725a5e33fcc38c", "score": "0.5770434", "text": "function InnerJoin();", "title": "" }, { "docid": "7cfeee2c5bba5e28566a4816060f456c", "score": "0.57618505", "text": "function User(){\n return $this->db->query(\"select a.*,b.* from tbl_user a\n join tbl_user_group b on a.user_group_id=b.id_user_group\n order by a.id_user desc\");\n }", "title": "" }, { "docid": "8d5404bc84c1b5577764f5773720f03b", "score": "0.57555485", "text": "function get_user_level($level)\n {\n $this->db->join('level','level.id_level=user.id_level');\n $this->db->where('nama_level',$level);\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "5c0d2d82fc2611982e01bba8bcbcd8c6", "score": "0.5732796", "text": "function allagentdata(){\n $agentlist = $this->db->query(\"SELECT * FROM users WHERE role!='admin'\");\n return $agentlist->result();\n }", "title": "" }, { "docid": "1d3e0532073a46aab10e661f1712c4e2", "score": "0.572554", "text": "public function get($where = array()){\n\t\t$this->db->select('UM.user_id, UM.full_name');\n\t\t$this->db->from('web_user_master UM');\n\t\t//$this->db->join('role_master RM','UM.role_master_id = RM.role_id');\n\t\t$db_where = \"(UM.email = '\".$where['email'].\"' AND UM.password ='\". $where['pwd'] .\"')\";\n\t\t$this->db->where($db_where);\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "63521b9048ef32c167b5bd28285b5f99", "score": "0.5723908", "text": "function loggedin_role_name()\r\n{\r\n $CI = &get_instance();\r\n $roleID = $CI->session->userdata('loggedin_role_id');\r\n return $CI->db->select('nama')->where('id', $roleID)->get('roles')->row()->nama;\r\n}", "title": "" }, { "docid": "7b390ac469c9ef8a36d064cee77e943c", "score": "0.5722245", "text": "public function tabel_user() {\r\n\r\n $query = $this->db->query('SELECT * FROM tbl_user_login ORDER BY id_user_login ASC');\r\n return $query;\r\n }", "title": "" }, { "docid": "c599602fad538120353ab7beca0cc3fc", "score": "0.5705757", "text": "function fetch_auditor_data($userid=''){\n $query=$this->db->query(\"select * from user AS e left JOIN user_details AS u ON e.user_id = u.ud_user_id WHERE e.user_id='$userid'\");\n return $query->result();\n }", "title": "" }, { "docid": "a300583cf669028a4571dfcdda3b22b8", "score": "0.5703625", "text": "public function rol($id){\n $sql = \" SELECT permission\n FROM permissions as pms\n INNER JOIN permission_users as pmsusr on pms.id = pmsusr.id_permission\n WHERE pmsusr.id_user ={$id}\";\n return DB::select($sql);\n }", "title": "" }, { "docid": "081ce2952ef59074ed285f73ec33f07c", "score": "0.56898594", "text": "public function role_user($id){\n \n $info = DB::table('users as u')\n ->select('m.role_id')\n ->join('model_has_roles as m', 'm.model_id', '=', 'u.id')\n ->where('u.id', '=', $id)\n ->get();\n return $info;\n }", "title": "" }, { "docid": "3407dedd32dad32cc571fbc3e594ab5a", "score": "0.56832415", "text": "protected function _joinUserAndGroup()\n {\n //join user\n $this->getSelect()->joinLeft(\n array('admin_user' => $this->getTable('admin/user')),\n \"admin_user.user_id = main_table.user_id\",\n array(\"user_name\" => \"CONCAT_WS(' ', admin_user.firstname, admin_user.lastname)\")\n );\n\n //join group\n $this->getSelect()->joinLeft(\n array('user_group' => $this->getTable('olts_reminder/group')),\n \"user_group.group_id = main_table.group_id\",\n array(\"group_name\" => \"user_group.group_name\")\n );\n }", "title": "" }, { "docid": "fb1041ca9e7ed8796af109a8e2b0fe52", "score": "0.56609523", "text": "function db_get_user_list()\n{\n $users = $GLOBALS['db']->select('user',\n ['user_id', 'user_name', 'nick_name', 'password', 'reg_time', 'last_time', 'achat_name', 'group_name', 'role'],\n [\n 'ORDER' => ['user_id' => 'ASC']\n ]\n );\n return $users;\n}", "title": "" }, { "docid": "d10cc80bf85d3c82f5ca395aae987f08", "score": "0.56550765", "text": "function getRoalAuth($path,$user_role_id){\n\t$sql='SELECT user_menu . * , user_menu_type.user_menu_type_name\n\t\tFROM user_menu\n\t\tJOIN user_menu_type ON user_menu_type.user_menu_type_id = user_menu .user_menu_type_id\n WHERE `user_role_id` ='.$user_role_id.' \n\t\tAND `user_menu_type_name`=\"'.$path.'\"';\n\t\n\t\n\t/*$this-> db-> where('user_role_id =', $user_role_id);\n\t$this-> db-> where('menu =', $path);\n\t$Q = $this-> db-> get('user_menu');//table name*/\n\t$Q = $this-> db-> query($sql);\n\tif ($Q-> num_rows() > 0){\n\tforeach ($Q-> result_array() as $row){\n\t\n\t}\n\treturn true;\n\t}else{\n\treturn false;\n\t}\n\t}", "title": "" }, { "docid": "cf025d5603ab20f441605b86baa76add", "score": "0.56485546", "text": "function join_proveedor_table(){\n global $db;\n $sql =\" SELECT p.id,p.nombre,p.telefono,p.direccion\";\n $sql .=\" FROM proveedores p\";\n $sql .=\" ORDER BY p.id ASC\";\n return find_by_sql($sql);\n\n }", "title": "" }, { "docid": "2f8148b0487258eb66755078f020aa7c", "score": "0.5647739", "text": "public function index()\n {\n ;\n $roles = DB::table('admin_roles as a')\n ->leftjoin('admin_role_user as b','a.id','=' ,'b.role_id')\n ->leftjoin('admin_users as c','c.id','=','b.user_id')\n ->groupBy('a.id')\n ->selectRaw('telecom_a.*,GROUP_CONCAT(telecom_c.username) as user')\n ->get();\n return view('admin/role/index')->with('roles',$roles);\n }", "title": "" }, { "docid": "928cc666a6a92a072e68bd9c1d1c8363", "score": "0.5646012", "text": "function login($username, $password){\n // $this -> db -> from('user , mahasiswa ,pegawai ');\n // $this -> db -> where('user.email', $username);\n // $this -> db -> where('user.password', MD5($password));\n // $this -> db ->group_start();\n // $this -> db -> where('user.email = mahasiswa.email');\n // $this -> db ->or_where('user.email = pegawai.email');\n // $this -> db ->group_end();\n // $this -> db -> limit(1);\n \n // $query = $this -> db -> get();\n \n$sql = \"SELECT user_.email as email,user_.id as id , password FROM user_ , mahasiswa ,pegawai WHERE\n user_.email='\".$username.\"' AND user_.password ='\".MD5($password).\"' AND (user_.email = mahasiswa.email OR user_.email = pegawai.email )\n AND ROWNUM <= 1 \";\n \n $query= $this->db->query($sql);\n if($query -> num_rows() == 1){\n return $query->result_array();\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "66d5fd1edb30e1126aabd88028fda51e", "score": "0.5623181", "text": "function get_by_id($id)\n\t{\n\t\t$this->db->select($this->table . '.*, ' . $this->role_table . '.name AS role_name')\n\t\t\t\t->join($this->role_table, $this->role_table . '.id = ' . $this->table . '.role_id', 'left');\n\t\treturn parent::get_by_id($id);\n\t}", "title": "" }, { "docid": "21104943c41c44dc29a1c828c2451f32", "score": "0.560644", "text": "public function show_remark()\n{ \n $loged_id= Auth::user()->id ;\n\n $data['log']=Logs::join('employees','employees.emp_id','=','logs.remarker_id')\n ->join('services','services.ser_id','=','logs.main_servic_id')\n ->where(['status'=>3,'editor_id'=>$loged_id])->get();\n\n return view('show_remark',$data);\n }", "title": "" }, { "docid": "66ed55e5d2cafb65f5a643d1cf163539", "score": "0.5606342", "text": "public function fetchByRole(){\n\t\t$db = $this->getServiceLocator()->get('db');\n\t\t$args = func_get_args();\n\t\t\n\t\t$count = func_num_args();\n\t\t\n\t\t$sql = \"\n\t\t\tSELECT * \n\t\t\tFROM users\n\t\t\tWHERE company_id = '{$this->company_id}'\n\t\t\tAND (\";\n\t\t\tforeach($args as $role){\n\t\t\t\t$sql .= \"access_level = '{$role}' \";\n\t\t\t\t$count -= 1;\n\t\t\t\tif($count > 0){\n\t\t\t\t\t$sql .= \" OR \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t$sql .= \") AND active = 1\n\t\t\tORDER BY lname, name\n\t\t\";\n\t\t\n\t\t$result = $db->query($sql, array());\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f53343e5d535246185671fcbf54a36df", "score": "0.5594538", "text": "static function admin_list(){\n return self::$db->where(array('role_id' => 1,'activated' => 1))->get('users')->result();\n }", "title": "" }, { "docid": "a238b306ed0605da2fba0bf4e10c36cd", "score": "0.55920744", "text": "public function getRole($userId){\n return User::where('users.id', $userId)\n ->join('user_has_role', 'user_has_role.user_id', '=', 'users.id')\n ->join('roles', 'roles.id', '=', 'user_has_role.role_id')\n ->select('roles.role')\n ->pluck('roles.role')\n ->first();\n\n }", "title": "" }, { "docid": "83a3a888fa60b7c9871a750038384816", "score": "0.55875903", "text": "function getusers(){\n $user=\"2_user\";\n $query = $this->db->query(\"SELECT * FROM $user\");\n return $query->result();\n }", "title": "" }, { "docid": "84ab4e7a4f0e9342419942284da2ad22", "score": "0.5587248", "text": "protected function getSelectStatement() { \n return \"SELECT UserID, FirstName, LastName, Address, City, \n Region, Country, Postal, Phone, Email, Privacy\n FROM Users\";\n }", "title": "" }, { "docid": "9f35f173a9b0ca4fa259bf8bafbc7c68", "score": "0.5583473", "text": "public function User()\n {\n return $this->hasMany('App\\User','roles_id','id');\n }", "title": "" }, { "docid": "d79e7ea2f7db94e9e337297e25cb42be", "score": "0.558248", "text": "public function userview()\n\t\t\t\t{\n \t\t\t$this->db->select('*');\n \t\t\t$this->db->join('login','login.id=registration.loginid','inner');\n \t\t\t$qry=$this->db->get(\"registration\");\n \t\t\treturn $qry;\n\t\t\t\t}", "title": "" }, { "docid": "40f8ab20a73b10efb9a4a63ad30cafcd", "score": "0.55782944", "text": "function getAuth($username,$password){\n\t\t$data = array('username'=>$username,\n\t\t\t\t\t 'password'=>$password);\n\t\t$user = $this->db->select('user_id,profile_id,username')\n\t\t\t\t\t\t ->from('users')\n\t\t\t\t\t\t ->where($data);\n\t\t$result = $user->get()->result();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "547cb573feba0071ec7f48be648a253c", "score": "0.557593", "text": "function getOnRole($role_id){\n\t\t$q = \"SELECT `permissions`.*, `permissions_roles`.`role_id`, `permissions_roles`.`permission_id` FROM `permissions` \n\t\tJOIN `permissions_roles` ON (`permissions`.`id` = `permissions_roles`.`permission_id`) \n\t\tWHERE `permissions_roles`.`role_id` = ?\";\n\n\t\t$query = $this->db->query($q, $role_id);\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "8b0d6ada41b1e936901383b7904cc4af", "score": "0.55748", "text": "function map_joins($join){\n //\n //return field to str\n return $join->to_str();\n }", "title": "" }, { "docid": "e27a1a34f554a80c9ae02675c6ec7310", "score": "0.5573358", "text": "public function getUserDetails($Tablename1,$Tablename2,$tab2_field,$id=''){\n\t\t$this->db->select(\"{$Tablename1}.*, {$Tablename2}.$tab2_field\");\n\t\t$this->db->from($Tablename1);\n\t\t$this->db->join($Tablename2, $Tablename2.'.'.'user_id'.' ='.$Tablename1.'.'.'user_id','left');\n\t\t$this->db->WHERE($Tablename2.'.user_id',$id);\n\t\t$this->exe = $this->db->get();\n\t\treturn $this->exe->result_array();\n}", "title": "" }, { "docid": "6a460b89c2cdbedf51ffa60f1f03b87c", "score": "0.5570077", "text": "function getUserRoles()\r\n {\r\n $this->db->select('id, role');\r\n $this->db->from('roles');\r\n $this->db->where('id !=', 1);\r\n $query = $this->db->get();\r\n \r\n return $query->result();\r\n }", "title": "" }, { "docid": "c0702a9d21774838b95a4811ebcc52b8", "score": "0.55681163", "text": "public function getAdmins() {\n return db::query_array(\"SELECT `admins`.`id` AS `id`, `users`.`email` AS `email` FROM `admins` JOIN `users` WHERE `admins`.`id`=`users`.`id`;\");\n }", "title": "" }, { "docid": "6b7f84dfd4a7c44fb3f8de943de05e11", "score": "0.55673623", "text": "public function getRole() {\n $result = $this->db->select(\n \"SELECT `as_user_roles`.`role` as role \n FROM `as_user_roles`,`as_users`\n WHERE `as_users`.`user_role` = `as_user_roles`.`role_id`\n AND `as_users`.`user_id` = :id\",\n array( \"id\" => $this->user_id)\n );\n\n return $result[0]['role'];\n }", "title": "" }, { "docid": "912a7e423fa0fa3de7e1ad49546aaa01", "score": "0.55659324", "text": "private function getRoles(){\n $list=array();//array\n $query='select r.id,r.name from userRoles ur join roles r on ur.idRole = r.id where ur.idUser = ?';//query\n $connection= MySqlConnection::getConnection();\n $command=$connection->prepare($query);\n $command->bind_param('s',$this->id);\n $command->bind_result($id,$name);\n $command->execute();\n\n //read result\n while ($command->fetch()) {\n array_push($list,new Role($id,$name));\n \n }\n mysqli_stmt_close($command);\n $connection->Close();\n\n return $list;//return array\n }", "title": "" }, { "docid": "19b3e670d19770b9d503368a11c06774", "score": "0.5565389", "text": "public function getAllUser(){\n $allUser = \"SELECT * FROM tbl_user WHERE id_role = :id\";\n $this->db->query($allUser);\n $this->db->bind('id', 2);\n return $this->db->allResult();\n }", "title": "" }, { "docid": "bf0e645bff4360286157cd4d7a8df9d1", "score": "0.5564707", "text": "public function getuser_ids_mdl()\n{\n $this->db->select('*');\n $this->db->from('users_tb u');\n $this->db->join('usertype_tb ut','ut.user_id=u.user_id'); \n $this->db->where(['user_type' => 'owner','u.status' => 1, 'u.approve_status' => 1]); \n $r = $this->db->get();\n return $r->result();\n}", "title": "" }, { "docid": "5ca82c96ab101d741d8844385575632b", "score": "0.5560742", "text": "function commentsJoinFilter() {\r\n\r\n\t\treturn array('users' => array('fields' => array('loginza_id')));\r\n\t}", "title": "" }, { "docid": "35fa35a79497b75e067127e41556ac86", "score": "0.5552978", "text": "public static function studentsInRiskQuery(){\n //return static::find()->select('codalu','codperiodo')->distinct(); \n $query = static::find()->select([Aluriesgo::tableName().'.codalu','codperiodo'])\n ->distinct()/*->innerJoin(Alumnos::tableName(), Aluriesgo::tableName().'.codalu='. Alumnos::tableName().'.codalu')*/;\n \n return $query;\n }", "title": "" }, { "docid": "c14fa58f36381b8f42cb9d2b42fdcbca", "score": "0.5544391", "text": "function get_by_id($id)\n {\n $this->db->select('user.*, user_level.level_name as level_name');\n $this->db->where($this->id, $id);\n $this->db->join('user_level','user.user_level_id = user_level.user_level_id');\n return $this->db->get($this->table)->row();\n }", "title": "" }, { "docid": "c7c9d40b6820841d760bc4246e024cbe", "score": "0.5542217", "text": "public function show($id)\n { \n // $result = UserGroup::where('grouproles_id',$id)->first()->user->name;\n\n $result =DB::select( DB::raw(\n \"\n SELECT \n b.user_id\n , a.grouproles_id\n , b.name\n , b.email\n FROM usergroups a, users b \n WHERE \n a.user_id = b.user_id\n and a.grouproles_id = :param1\n \"\n ), array(\n 'param1' => $id\n \n ));\n\n \n //dd($menu);\n\n \n // return view('authmanager::menu', ['menus' => json_encode($menu)\n // ,'menu_detl' => $menu_detl\n // ]);\n\n return response()->json($result);\n }", "title": "" }, { "docid": "59e28403a5c5a97c0f794a6bec4c41b7", "score": "0.55394953", "text": "function get_query(){\n $this->load->model(array('User', 'Location'));\n \n $this->db->order_by('date', 'desc');\n $this->db->select(\"{$this->table_name}.*, {$this->Location->table_name}.dgf_name, {$this->User->table_name}.name as username\");\n\n $this->db->join($this->User->table_name, \"{$this->User->table_name}.id = {$this->table_name}.user_id\", 'left');\n $this->db->join($this->Location->table_name, \"{$this->Location->table_name}.id = {$this->table_name}.location_id\", 'left');\n }", "title": "" }, { "docid": "d18bffb193734c7c1703e19415c9f93d", "score": "0.55331963", "text": "public function Permission_User($Tablename,$tempPermittedField,$id='')\n{\n\t\t/*$data = implode('`, `'.USER_DETAILS.'`.`',$tempPermittedField);\n\t\t$this->db->select(\"`\".USER_DETAILS.\"`.`\".$data.\"`, \".USER.\".email, \".USER.\".user_type, \".ADDRESS.\".*\");\n\t\t$this->db->from(USER_DETAILS);\n\t\t$this->db->join(USER, USER.'.'.'user_id'.' ='.USER_DETAILS.'.'.'user_id','left');\n\t\t$this->db->join(ADDRESS, ADDRESS.'.'.'user_id'.' ='.USER_DETAILS.'.'.'user_id','left');\n\t\t//$this->db->join(CITY, CITY.'.'.'user_id'.' ='.USER_DETAILS.'.'.'user_id','left');\n\t\t$this->db->WHERE(USER_DETAILS.'.user_id',$id);\n\t\t$this->exe = $this->db->get();\n\t\treturn $this->exe->result_array();*/\n}", "title": "" }, { "docid": "02802f73bb65991b5a650ef0722b9611", "score": "0.55322206", "text": "public function get_admin_by_username($username){\n $this->db->from($this->table);\n $this->db->where('username',$username);\n $this->db->where('privilege <=', 4);\n // fetch seluruh hasil pada db berupa array\n return $this->db->get();\n }", "title": "" }, { "docid": "8a4ec19371146038e6448a071bbf1400", "score": "0.5524858", "text": "function auth_admin($username,$password){\r\n\t\t$query=$this->db->query(\"SELECT * FROM admin WHERE usere='$username' AND passworde=MD5('$password') \");\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "a5b66582608c79221e5139fd1edfabe9", "score": "0.5521356", "text": "public function get_user_details($tenant_id, $user_id) { \n $this->db->select('usr.*,pers.*,emp.*,GROUP_CONCAT(role.role_id SEPARATOR \",\") as role_id,'\n . 'GROUP_CONCAT(tms_roles.role_name SEPARATOR \",\") as role_name', FALSE); \n $this->db->from('tms_users usr');\n $this->db->join('tms_users_pers pers', 'usr.user_id = pers.user_id and usr.tenant_id = pers.tenant_id');\n $this->db->join('internal_user_emp_detail emp', 'usr.user_id = emp.user_id and usr.tenant_id = emp.tenant_id');\n $this->db->join('internal_user_role role', 'usr.user_id = role.user_id and usr.tenant_id = role.tenant_id');\n $this->db->join('tms_roles', 'role.tenant_id = tms_roles.tenant_id and tms_roles.role_id=role.role_id');\n $this->db->where('usr.user_id', $user_id);\n $this->db->where('usr.tenant_id', $tenant_id);\n $this->db->group_by(\"usr.user_id\"); // Added by dummy for multiple roles on Nov 21 2014.\n $qry = $this->db->get(); \n if ($qry->num_rows() > 0) {\n return $qry->row();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "08656e7547b56edae13580af0d7f4a28", "score": "0.551992", "text": "function get_by($id){\r\n\t\t$this->load->database();\r\n\t\t\t\t\t\t\r\n\t\t\t$sql = \"SELECT {$this->table}.*, users.nama as nama_user, profile_image, username FROM {$this->table} LEFT JOIN users ON user_id=users.id WHERE {$this->table}.id='$id';\";\r\n\t\t\t$query = $this->db->query($sql);\r\n\t\t\r\n\t\t$this->db->close();\r\n\t\t\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "6cfaceac591918307dc73349925cb0f1", "score": "0.551896", "text": "public function getUsersFromBlackList(){\n\n$i = $this->USER['id'];\n\n$q = $this->query_select(\"select u.gender,u.fullname,u.profile_photo,u.id from \".tbl_blacklist.\" b, \".tbl_users.\" u where u.id=b.userid and b.employer='{$i}' order by b.added desc\");\nreturn $q;\n}", "title": "" }, { "docid": "a93800ce5563ae38e866d4f393271663", "score": "0.5517535", "text": "public function getAllDataUsers($id){\n $this->db->select('a.*, c.username, c.password')\n ->from('tbl_admin a')\n ->join('tbl_credentials c', 'a.id = c.user_id', 'inner')\n ->where('a.status', 'saved')\n ->where('c.status', 'saved');\n $this->db->where('c.user_type', 'admin');\n if($id != 0){ // if id not equal to 0 the query will filter per admin id \n $this->db->where('a.id', $id);\n }\n $query = $this->db->get(); // get results of query\n return $query->result();\n }", "title": "" }, { "docid": "ca67743eb17c328f1e43f73b1a2a090e", "score": "0.55107844", "text": "public function CityNews_UserDetails($Tablename1,$Tablename2,$Tablename3,$field_name,$id)\n{\n\t$sql = \"SELECT \".$Tablename1.\".*,CONCAT(\".$Tablename2.\".`first_name`,'',\".$Tablename2.\".`last_name`) as user_name,\".$Tablename2.\".`company_name`,\".$Tablename3.\".`city_name`\";\n\t$sql.= \"FROM \".$Tablename1.\" \";\n\t$sql.= \"LEFT JOIN \".$Tablename2.\" ON \".$Tablename2.\".`user_id` = \".$Tablename1.\".`user_id`\";\n\t$sql.= \" LEFT JOIN \".$Tablename3.\" ON \".$Tablename3.\".`city_id` = \".$Tablename1.\".`city_id`\";\n\t$sql.= \" WHERE \".$Tablename1.\".`\".$field_name.\"` = \".$id.\"\";\n\t$this->exe = $this->db->query($sql);\n\treturn $this->exe->result_array();\n\n}", "title": "" }, { "docid": "7351da70646daa9fddaa5b1f0fa7395a", "score": "0.55100036", "text": "function getUser(){\n return db()->query(\"SELECT*FROM user order by user_id ASC\");\n }", "title": "" }, { "docid": "df3aa03c6a51cbcea61905e5f21f92ef", "score": "0.55076325", "text": "public function getUser($username = null){\n\t\tif($username == null){\n\t\t\t$this->db->select(\"users.username as username, users.fullname as fullname, role.role as role\");\n\t\t\t$this->db->from(\"users\");\n\t\t\t$this->db->join(\"role\",\"users.role=role.id\",\"inner\");\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result_array();\n\t\t}else{\n\t\t\t$query = $this->db->get_where('users', array('username' => $username));\n\t\t\treturn $query->row_array();\n\t\t}\n\t}", "title": "" }, { "docid": "3602467fc180aafc39254eed7185b765", "score": "0.5507109", "text": "public function listUsersIds($options = Array()){\r\n $defaults = Array('searchname'=>'', 'searchlogin'=>'', 'sortfield' => 'd.encoded_search_name','sortorder' => 'ASC');\r\n $options = array_merge($defaults, $options);\r\n $select = $this->_db->select();\r\n \t\t$select->from(array('u'=>'mst_user'),array('u.id'))\t\r\n ->joinLeft(array('r'=>'mst_user_role') , 'u.role_id = r.id', array())\r\n ->joinLeft(array('d'=>'devotee'), 'u.did=d.did', array())\r\n ->joinLeft(array('cn'=>'mst_country'), 'd.country_id = cn.id', array())\r\n ->joinLeft(array('a'=>'mst_asram'), 'd.asram_status_id = a.id', array())\r\n ->joinLeft(array('c'=>'mst_center'), 'd.center_id = c.id', array())\r\n ->joinLeft(array('con'=>'mst_counselor') , 'd.counselor_id = con.id' , array())\r\n ->joinLeft(array('con_dev'=>'devotee'), 'con.did=con_dev.did', array())\r\n ->joinLeft(array('astcon'=>'mst_astcounselor') , 'd.ast_counselor_id = astcon.id' ,array())\r\n ->joinLeft(array('astcon_dev'=>'devotee'), 'astcon.did=astcon_dev.did', array())\r\n ->joinLeft(array('hg'=>'mst_guru'), 'd.ini_guru_id = hg.id', array())\r\n ->joinLeft(array('sg'=>'mst_guru'), 'd.sanyas_guru_id = sg.id', array())\r\n\r\n ->joinLeft(array('o'=>'mst_user'),'u.owner_uid=o.id', array())\r\n ->joinLeft(array('o_dev'=>'devotee'), 'o.did=o_dev.did', array())\r\n ->joinLeft(array('e'=>'mst_user'),'u.entered_by_uid=e.id', array())\r\n ->joinLeft(array('e_dev'=>'devotee'), 'e.did=e_dev.did', array())\r\n ->joinLeft(array('m'=>'mst_user'),'u.modi_by_uid=m.id', array())\r\n ->joinLeft(array('m_dev'=>'devotee'), 'm.did=m_dev.did', array())\r\n \r\n ->where($this->_db->quoteInto('d.encoded_search_name LIKE ?','%' . Rgm_Basics::encodeDiacritics($options['searchname']) . '%'))\r\n ->orWhere($this->_db->quoteInto('u.login LIKE ?','%' . $options['searchlogin'] . '%'));\r\n\r\n $results = $this->getAdapter()->fetchAll($select);\r\n return $results;\r\n }", "title": "" }, { "docid": "ad4c1a0014a002a34c5f6aac9de3108a", "score": "0.5500023", "text": "public function loginCheck($username,$password) \r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('users');\r\n\t\t$this->db->where(array('username' => $username, 'password' => $password, 'usertype' => 'Admin' ));\t\t\r\n\t\t$query = $this->db->get(); \r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "8bcad08fb683c2be31faed728df95013", "score": "0.5496519", "text": "public static function usuarios($id){ \n return DB::table('users')\n ->leftJoin('puestos', 'users.puesto_id', '=', 'puestos.id')\n -> where('users.id', '=', $id)\n ->select('users.*', 'puestos.puesto','puestos.abogado')\n ->get();\n\n }", "title": "" }, { "docid": "d8d411b2d8e81fd980f5802508ce7afc", "score": "0.54946023", "text": "function current_user_info(){\n // return profile::where('username',Auth::user()->username)->with(array('roles_id.role' => function($query){\n // $query->addSelect(array('role_name'));\n // }))->first();\n return profile::where('username',Auth::user()->username)->with('account')->with('roles_id.role')->with('permissions_id.permission')->first();\n }", "title": "" }, { "docid": "e3d67baa0f9c5bb2493b1dcb68e355db", "score": "0.5493131", "text": "function loggedin_role_name()\n{\n $CI = &get_instance();\n $roleID = $CI->session->userdata('loggedin_role_id');\n return $CI->db->select('name')->where('id', $roleID)->get('roles')->row()->name;\n}", "title": "" }, { "docid": "7a48d7dafea5f115b8ce8bd96d69e526", "score": "0.5491256", "text": "public function consultar_turno()\n {\n //$role_user=Auth::user()->whatRoleUser(Auth::user()->id);\n //dd($role_user);\n\n //$Obj_Turnos= new Turnos() ;\n $turno= $this->select('tbl_turnos.id','tbl_turnos.role_user_id','tbl_turnos.tipo_turno_id') \n ->Join('role_user','role_user.id','tbl_turnos.role_user_id') \n ->Join('roles','roles.id','role_user.role_id') \n ->Join('users','users.id','role_user.user_id') \n ->where(\n [\n ['tbl_turnos.role_user_id',Auth::user()->id],\n ['tbl_turnos.status_turno',\"1\"]\n ]\n )\n ->orderby('tbl_turnos.id','DESC')->take(1)\n ->get(); \n //dd($turno);\n return $turno;\n }", "title": "" }, { "docid": "f1787816c548f41ea164c092931dc7a9", "score": "0.5489698", "text": "public function getRole(){\n \treturn $this->hasOne('role','id','role_id')->field('id,role_name,remark');\n }", "title": "" }, { "docid": "19404eeb874e25d3764b688ab8759faf", "score": "0.54885155", "text": "public function getAllJoinedBy($id) {\n\n }", "title": "" }, { "docid": "8ed48abacdaafe49057850b4d3dd1a0e", "score": "0.54877937", "text": "function getOnUser($username){\n\t\t$q = \"SELECT `permissions`.*, `permissions_users`.`user`, `permissions_users`.`form` FROM `permissions` \n\t\tJOIN `permissions_users` ON (`permissions`.`id` = `permissions_users`.`permission_id`) \n\t\tWHERE `permissions_users`.`user` = ?\";\n\n\t\t$query = $this->db->query($q, $username);\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "683e4dbfd0044c4df37fb10c984cb946", "score": "0.5477192", "text": "function current_user_info(){\n // return profile::where('username',Auth::user()->username)->with(array('roles_id.role' => function($query){\n // $query->addSelect(array('role_name'));\n // }))->first();\n return profile::where('username',auth::guard('user')->user()->username)->with('user')->with('roles_id.role')->with('permissions_id.permission')->with('tags')->first();\n }", "title": "" }, { "docid": "de4a5407c876817734e493ceaded4ac2", "score": "0.5475941", "text": "public function get_users_by_login_result($roleId =[],$statusId =[]) {\r\n //SELECT tbl_login_history_result as login_result, COUNT(*) as count FROM tbl_login_history GROUP BY tbl_login_history_result;\r\n $this->db->select('lh.tbl_login_history_result as login_result, COUNT(*) as count');\r\n $this->db->group_by('lh.tbl_login_history_result');\r\n $this->db->join('tbl_users as u', 'lh.tbl_login_history_user_id = u.tbl_users_role_id', 'LEFT'); \r\n\r\n if($roleId){\r\n $this->db->where_in('u.tbl_users_role_id',$roleId);\r\n } \r\n $result = $this->db->get('tbl_login_history lh')->result_array();\r\n return $result;\r\n }", "title": "" }, { "docid": "8a58c4b2b8eac42af5d5d1c6eeb59534", "score": "0.5473985", "text": "function getallUsers()\n {\n $this->db->select('u.*, ur.roleID ');\n $this->db->from('tbl_users as u');\n $this->db->join('tbl_user_roles as ur', 'u.userID = ur.userID', 'inner');\n $this->db->where('ur.roleID !=', '1');\n $this->db->where('u.status', 1);\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "27bb5bf1e938d93f7eee256937992a28", "score": "0.5465163", "text": "public function userole()\n {\n return $this->belongsTo('App\\User', 'userid', 'id')->with('role');\n }", "title": "" }, { "docid": "780deaa38190c603f24178067fbd6060", "score": "0.5462581", "text": "function buildSelectUserQuery($user,$usertable,$userfield,$passwordfield,$accountdisablefield=null,$accountenbleexpression=null)\n\t{\n\t\t$disableexpr=\"\";\n\t\tif($accountdisablefield) $disableexpr = \", $accountdisablefield\";\n\t\t$query = \"SELECT $passwordfield $disableexpr FROM $usertable WHERE $userfield ='$user'\";\n\t\tif ($accountenbleexpression) $query .= \" AND $accountenbleexpression\";\n\t\treturn $query;\n\t}", "title": "" } ]
bf0116cf75dd590f7c0e5a5ebe9ba9d0
$query = $this>db>query("SELECT DISTINCT FROM " . DB_PREFIX . "child_nurse3b WHERE customer_child_id = '" . (int)$customer_child_id . "' ORDER BY child_nurse3b_id, date_added");
[ { "docid": "61c5a4952b63a54765571199528992f1", "score": "0.59467936", "text": "public function getNurse3bs($customer_child_id) {\r\n\t\t$query = $this->db->query(\"SELECT DISTINCT * FROM \" . DB_PREFIX . \"child_nurse3b WHERE customer_child_id = '\" . (int)$customer_child_id . \"' ORDER BY date_added, FIND_IN_SET(arrangement, '白班,小夜,大夜') ASC\");\r\n\t\treturn $query->rows;\r\n\t}", "title": "" } ]
[ { "docid": "3971606c0a6dd9ffd956ec2906226b47", "score": "0.5863776", "text": "public function all_child_customers()\n\t{\n\t\t$this->db->where('customer_status = 1 AND customer_parent != 0');\n\t\t$this->db->order_by('customer_name');\n\t\t$query = $this->db->get('customer');\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "14b8a995c3035e1c1148b80c48ea15d4", "score": "0.56368697", "text": "function distinct( $query ) {\n\t\tglobal $wpdb;\n\t\tif ( !empty( $this->query_instance->query_vars['s'] ) ) {\n\t\t\tif ( strstr( $query, 'DISTINCT' ) ) {}\n\t\t\telse {\n\t\t\t\t$query = str_replace( 'SELECT', 'SELECT DISTINCT', $query );\n\t\t\t}\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "915868e16122c733e236584f6259e7a8", "score": "0.5631956", "text": "public function cidade_imovel_distinct(){\n \treturn $this->db->query('SELECT DISTINCT C.NMCIDADE,C.CODCIDADE FROM imovel I INNER JOIN cidade c ON C.CODCIDADE = I.CODCIDADE')->result(); \t\n }", "title": "" }, { "docid": "1649ff06468efb83335be724cf57c72c", "score": "0.56292826", "text": "public function getSondagesCres($id)\n{\n $sql='SELECT DISTINCT s.sondage_date_create,s.sondage_id, s.ut_id, s.titre, s.texte_desc, s.sondage_droit, s.date_fin, s.type_methode, s.visibilite, s.groupe_id, u.ut_nom, u.ut_prenom,moderateur_sondage.ut_id as idModerateur\n FROM sondage s natural join utilisateur u\n LEFT JOIN moderateur_sondage ON moderateur_sondage.sondage_id = s.sondage_id\n WHERE s.ut_id=?\n ORDER BY s.sondage_date_create DESC';\n\n $sondage_pub=$this->executerRequete($sql,array($id));\n return ($sondage_pub->fetchAll());\n\n}", "title": "" }, { "docid": "bfd81509da90380cf994c0670ba9be8d", "score": "0.56074816", "text": "function getDataWhereOrder()\n{\n $final_query= $this->db->select('*').$this->db->from('categories').$this->db->whereone('category_is_active','=','1').$this->db->orderbymore('date_added',' DESC').$this->db->orderbymoreorder('category_id',' DESC');\n return $this->db->executeb($final_query); \n \n}", "title": "" }, { "docid": "e0dd17e5bc90a1cfa53ec0453e196c3f", "score": "0.5602882", "text": "public function getallappliedJobs()\n{\n$query =\"SELECT DISTINCT applied_job_ID FROM application_applied_job WHERE state=1\";\n$result = $this->db->select($query);\nreturn $result;\n}", "title": "" }, { "docid": "10713cc27b1830a4bb4dec7042066f30", "score": "0.55005985", "text": "public function countPayment()\n{\n$query =\"SELECT DISTINCT payment_id FROM application_payment\";\n$result = $this->db->select($query);\nreturn $result;\n}", "title": "" }, { "docid": "8224df7acc26b16ee5a41866961773a9", "score": "0.54380566", "text": "function listar_fechas_de_sustentacion(){\n $this->db->distinct();\n\n\n $this->db->select('fecha');\n $this->db->from('sustentaciones');\n $result = $this->db->get();\n\n\n\n\n return $result->result_array();\n\n }", "title": "" }, { "docid": "acf752f6b624f4a24c2687111aa26604", "score": "0.5425253", "text": "function getDailyDistinctUserPoints()\n{\n $week_date=date(\"Y-m-d\");\n $query=\"SELECT DISTINCT(up.user_id) AS user_id\nFROM\n user_points up\n INNER JOIN glogin_users gu \n ON (up.user_id = gu.id)\n INNER JOIN silverhat_games sg\n ON (up.game_id = sg.game_id) where up.createdAt='$week_date' or up.updatedAt='$week_date' order by over_all_points DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "864cfb74d5cf3475b84754352e629292", "score": "0.5416474", "text": "function fetchRecordSet($id=\"\",$condition=\"\",$order=\"client_payment_id\")\n\t{\n\t\tif($id!=\"\" && $id!= NULL && is_null($id)==false)\n\t\t{\n\t\t$condition = \" and client_payment_id=\". $id .$condition;\n\t\t}\n\t\tif($order!=\"\" && $order!= NULL && is_null($order)==false)\n\t\t{\n\t\t\t$order = \" order by \" . $order;\n\t\t}\n\t\t$strquery = \"SELECT distinct(cp.client_payment_id),ur.user_username,ur.user_firstname,ur.user_lastname,ur.user_email,cp.amount,cp.payment_date,cp.transaction_type,cp.transaction_id,p.payment_type,cpd.plan_title, (TO_DAYS('\".currentScriptDate().\"')-TO_DAYS(ct.register_date)) as pending,ct.client_id, ct.register_date FROM \".DB_PREFIX.\"user ur, \".DB_PREFIX.\"client cl, \".DB_PREFIX.\"client_payment cp, \".DB_PREFIX.\"client ct, \".DB_PREFIX.\"payment_type p, \".DB_PREFIX.\"plan cpd WHERE 1 = 1 AND cp.client_id=cl.client_id AND ur.client_id=cl.client_id AND cp.client_id=ct.client_id AND cp.payment_type_id=p.payment_type_id AND cpd.plan_id=ct.plan_id AND p.payment_type='Credit Card' AND p.payment_type_id=cp.payment_type_id \".$condition . \" GROUP BY cp.client_payment_id \" . $order;\n\t\t$rs=mysql_query($strquery);\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "e0d6651c9c9d1bead1482c422d0194f6", "score": "0.5393919", "text": "public function get_sermons()\n\t{\n\t\t$this->db->where('blog_category_id = 9');\n\t \t$this->db->order_by('last_modified','DESC');\n\t\t$query = $this->db->get('post');\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "d6b6d9fffb65264d931ee9f4da9a9396", "score": "0.53912234", "text": "function get_carryout_orders_date(){\n\tglobal $db;\n\t$query = \"SELECT * FROM orders WHERE orderCompleteDate IS NOT NULL AND delivery = 'N' AND orderStatus != 'Order Completed' ORDER BY orderCompleteDate DESC\";\n\t$results = $db->query($query);\n\treturn $results;\t\n}", "title": "" }, { "docid": "9ac72da6c0c494de83f9d5f4888f3beb", "score": "0.5354062", "text": "function get_carryout_orders(){\n\tglobal $db;\n\t$query = \"SELECT * FROM orders WHERE orderCompleteDate IS NOT NULL AND delivery = 'N' AND orderStatus != 'Order Completed' ORDER BY orderCompleteDate ASC\";\n\t$results = $db->query($query);\n\treturn $results;\t\n}", "title": "" }, { "docid": "0075df03fd6207d1b3f85b8b9c2caa5c", "score": "0.53518915", "text": "function recupPromo(){\r\n $query = \"SELECT * from promotion ORDER BY id\";\r\n return $GLOBALS[\"bdd\"]->query($query);\r\n }", "title": "" }, { "docid": "5439978356267e45da0b2a7a6d3df85a", "score": "0.53430283", "text": "function get_distinct_record_ids($s_key_name,$s_table_name,$i_default_language_id,$s_language_key) {\n $arr_distinct_id = array();\n $s_distinctrec = \"select distinct(\".$s_key_name.\") from `\".$s_table_name.\"` where \".$s_language_key.\" = \".$i_default_language_id.\" order by \".$s_key_name; \n $res_distinctrec = mysql_query($s_distinctrec) or die(mysql_error());\n while($data_distinctrec = mysql_fetch_array($res_distinctrec)) {\n $arr_distinct_id[] = $data_distinctrec[0];\n }\n return($arr_distinct_id);\n}", "title": "" }, { "docid": "84b05379474d07d9daf96e468d95f3f3", "score": "0.53397584", "text": "function model_purchase_category_get($id) {\n global $conn;\n\n if(!empty($_SESSION['login'])) {\n $id = mysqli_real_escape_string($conn, $_SESSION['login']);\n }\n\n $query = \"SELECT DISTINCT category FROM mkeerus_pr_items WHERE user_id = $id ORDER BY category ASC\";\n $result = mysqli_query($conn, $query);\n\n $rows = array();\n\n if($result) {\n while($row = mysqli_fetch_assoc($result)) {\n $rows[] = $row;\n }\n }\n return $rows;\n}", "title": "" }, { "docid": "8c61494907976f978c71b8b68ff08383", "score": "0.53378814", "text": "public function get_sub_customers($customer_id)\n\t{\n\t\t//retrieve all users\n\t\t$this->db->from('customer');\n\t\t$this->db->select('*');\n\t\t$this->db->where('customer_parent = '.$customer_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "9eccdce179d3eccfe8baccc2d573f7dc", "score": "0.53129387", "text": "function get_all_criminals(){\n global $db;\n $query = 'SELECT * FROM criminals\n ORDER BY criminal_id';\n $statement = $db->prepare($query);\n $statement->execute();\n $criminals = $statement->fetchAll();\n $statement->closeCursor();\n return $criminals; \n }", "title": "" }, { "docid": "50b649d2034f01d2cf35149adbe59498", "score": "0.53056175", "text": "public function all_parent_customers()\n\t{\n\t\t$this->db->where('customer_status = 1 AND customer_parent = 0');\n\t\t$this->db->order_by('customer_name', 'ASC');\n\t\t$query = $this->db->get('customer');\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "218df4923c8b0ef76d51e6fe4dc75b6c", "score": "0.52924705", "text": "function get_clients($repid)\r\r\n{\r\r\n $sql = \"SELECT * from clients order by name asc\";\r\r\n $r = do_query($sql);\r\r\n return $r;\r\r\n}", "title": "" }, { "docid": "fd9166b66441dd77150fc599860123ce", "score": "0.52790594", "text": "public function distinct()\n\t{\n\t}", "title": "" }, { "docid": "54806b94ebef0c086d09d35e9be81d58", "score": "0.52724046", "text": "public function latest_customer()\n\t{\n\t\t$this->db->limit(1);\n\t\t$this->db->order_by('created', 'DESC');\n\t\t$query = $this->db->get('customer');\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "e6b1eac38d68df72fd86dcc83a09f870", "score": "0.52678794", "text": "function get_submitted_categories() {\r\n global $db;\r\n $query = 'SELECT DISTINCT category FROM submittedquotes ORDER BY category ASC';\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $quotes = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $quotes;\r\n }", "title": "" }, { "docid": "a6e22b1bb7dd4d575251deb8aa68b135", "score": "0.52571297", "text": "function recupLot(){\r\n $query = \"SELECT * from lots ORDER BY id\";\r\n return $GLOBALS[\"bdd\"]->query($query);\r\n }", "title": "" }, { "docid": "0decac4ab9b4e93c555dd7ba1bb17cf4", "score": "0.52498305", "text": "public function selectComments()\n\t{\t\n\t\t$this->db->order_by(\"date\", \"desc\"); \n\t\t$query = $this->db->get('comments');\n\t\treturn $query->result_array();\t\t\n\t}", "title": "" }, { "docid": "33d55668a38a85820b3d73ac027e503f", "score": "0.524261", "text": "protected function _buildQuery()\r\n {\r\n $db = JFactory::getDBO();\r\n $query = $db->getQuery(TRUE);\r\n\r\n $query->select('c.action_id, c.comite_id, c.designation, c.description, c.date_debut, c.date_fin, \r\n c.use_alerte, c.interval_alerte, c.date_alerte, c.state_code, c.created, c.created_by');\r\n $query->from('#__crfpge_action as c');\r\n\r\n// JFactory::getApplication()->enqueueMessage($query);\r\n\r\n return $query;\r\n }", "title": "" }, { "docid": "bf67be12b759e1a64ed778c31ef8a310", "score": "0.5242151", "text": "public static function distinct()\n { \n return \\Illuminate\\Database\\Query\\Builder::distinct();\n }", "title": "" }, { "docid": "7f4c8374a96f112f9629dbe5c6a675a8", "score": "0.5230292", "text": "function getTopRows(){\n $where = \" 1 = 1 and duan_active = 1\";\n $rows = $this->getDBList($where,\" duan_id DESC\",true,\" Limit 1\");\n return $rows;\n }", "title": "" }, { "docid": "222b72380d6e3b24545b988cdb31f764", "score": "0.5229714", "text": "public function userlistdpr() {\n return $this->db->select('SELECT COUNT(IDREC) as NBRDON,IDREC,GROUPAGE,RHESUS,DATEDIS FROM dis GROUP BY IDREC HAVING COUNT( IDREC ) >1 order by NBRDON desc ');\n }", "title": "" }, { "docid": "b82cf22e5df2a6e3fd65e5ecc3fb8ff2", "score": "0.5220039", "text": "public function SelectAllCustomers()\r\n {\r\n \r\n $select = \"SELECT sc.sno,CONCAT(sc.sno,' - ',sc.cname) AS comp_name FROM `staffacc_cinfo` sc ORDER BY sc.cname ASC\";\r\n $result = mysql_query($select,$this->db) or die(mysql_error());\r\n return $result;\r\n }", "title": "" }, { "docid": "7cb34df344ebddf94e9a2263eb0d50ce", "score": "0.52023315", "text": "function uniq_order_payment_list($name,$value)\r\n\t{\r\n\t$sql=\"select * from ninerr_order_payment where \".$name.\"='\".$value.\"' \";\r\n\t$rs=mysql_query($sql);\r\n\treturn $rs;\r\n\t}", "title": "" }, { "docid": "d7d450f1a6df95723cc931a5f3a58f67", "score": "0.51598233", "text": "public function distinct() \n {\n $this->query_string[\"SELECT\"] = \"SELECT DISTINCT \" . strstr($this->query_string[\"SELECT\"], \"SELECT \");\n \n return $this;\n }", "title": "" }, { "docid": "2e8d4fdd3f0158d92dc8c4a3b8a86ffa", "score": "0.5157105", "text": "private function buildDistinct(): void {\r\n\r\n if(true === $this -> distinct) {\r\n $this -> query[] = 'DISTINCT';\r\n }\r\n }", "title": "" }, { "docid": "a387f2ce2907501b6d4d88c5e90480aa", "score": "0.5152196", "text": "function fetch_case_prescription($case_id) {\n\n $this->db->select('\n users.name as issuer,\n prescription.id,\n prescription.title,\n prescription.description,\n prescription.remarks, \n prescription.created_by,\n prescription.created_at,\n prescription.updated_at \n '); \n $this->db->join('users', 'users.username = prescription.created_by', 'left'); \n $this->db->where('prescription.case_id', $case_id); \n $this->db->order_by('prescription.created_at', 'DESC');\n $query = $this->db->get(\"prescription\");\n\n return $query->result_array();\n \n }", "title": "" }, { "docid": "03c8f68ab71ffe3c863852e8abbe8b84", "score": "0.51520365", "text": "public function EC($couid)\n{\n$query =\"SELECT * FROM application_sub_category WHERE subCat_id=$couid\";\n$result = $this->db->select($query);\nreturn $result;\n}", "title": "" }, { "docid": "0c53b0d703033444b99e713fb438661c", "score": "0.51509106", "text": "function list_user_posts($id, $date_sorted=\"DESC\") {\n $list = array();\n $db = \\Db::dbc();\n if($date_sorted == false)\n $date_sorted = \"\";\n $query = \"SELECT TWEETID FROM TWEET WHERE USERID = :ID ORDER BY TWEETPUBLICATIONDATE \".$date_sorted;\n try {\n $req = $db->prepare($query);\n $req->execute(array(\n \":ID\" => $id\n ));\n $result = $req->fetchAll();\n $rowCount = count($result);\n if($result != FALSE && $rowCount > 0) {\n foreach($result as $i)\n $list[] = get($i[0]);\n }\n }\n catch (PDOException $e) {\n printf($e->getMessage());\n return false;\n }\n return $list;\n}", "title": "" }, { "docid": "f4142528ff5da5647b92e9401c5123c8", "score": "0.5150464", "text": "function getDistinctGameScoreUser()\n{\n $query=\"SELECT DISTINCT(gs.user_id) AS user_id FROM\n game_scores gs\n INNER JOIN glogin_users gu\n ON (gs.user_id = gu.id)\n INNER JOIN silverhat_games sg \n ON (gs.game_id = sg.game_id) ORDER BY gs.game_score DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "24d4ba04e58253bdd72e678b7dce02ad", "score": "0.51497877", "text": "function getByCustomerId( $id )\n\n { \n\n \t$sql = \"SELECT * FROM reminders\"\n\n \t. \" WHERE reminders.customer_id = '$id' ORDER BY reminders.priority DESC\";\n\n \t\n\n \t$this->query( $sql );\n\n }", "title": "" }, { "docid": "3c062239b5bd108e78956920c144a991", "score": "0.51437426", "text": "function hang_hoa_select_all(){\n $sql = \"SELECT * FROM hang_hoa ORDER BY ma_hh DESC\";\n return pdo_query($sql);\n}", "title": "" }, { "docid": "b7ee5fde81ec07064748e3a7aebe416d", "score": "0.5141689", "text": "function get_crimes() {\n global $db;\n $query = 'SELECT DISTINCT crime_committed FROM crimes';\n $statement = $db->prepare($query);\n $statement->execute();\n $crimes = $statement->fetchAll();\n $statement->closeCursor();\n return $crimes; \n }", "title": "" }, { "docid": "ed504debb7cd07643cf41b1032755ae6", "score": "0.51367027", "text": "function query() {\n $this->ensure_my_table();\n $params = array('type' => 'date');\n $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order'], NULL, $params);\n }", "title": "" }, { "docid": "5ba5680760f7af998d8a311c9d8e4b2e", "score": "0.51256984", "text": "protected function getListQuery()\n\t{\n\t\t// Initialize variables.\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n \n\t\t// Create the base select statement.\n\t\t$query->select('o.*');\n $query->from('oscmemberrates AS o');\n //$query->leftJoin('apsschools AS s ON v.schoolid = s.id'); \n \n\t\treturn $query;\n\t}", "title": "" }, { "docid": "21fc08394d2bc242e0cbd726e8246f53", "score": "0.51246625", "text": "function get_all_unidad()\r\n {\r\n $unidad = $this->db->query(\"\r\n SELECT\r\n *\r\n\r\n FROM\r\n unidad\r\n\r\n WHERE\r\n 1 = 1\r\n \r\n ORDER BY unidad_id DESC\r\n\r\n \")->result_array();\r\n\r\n return $unidad;\r\n }", "title": "" }, { "docid": "1f12088d6a22ea851747ba1824ca0580", "score": "0.51212335", "text": "function getWeeklyDistinctUserPoints()\n{\n $week_date=date('Y-m-d', strtotime('-7 days'));\n $query=\"SELECT DISTINCT(up.user_id) AS user_id\nFROM\n user_points up\n INNER JOIN glogin_users gu \n ON (up.user_id = gu.id)\n INNER JOIN silverhat_games sg\n ON (up.game_id = sg.game_id) where up.createdAt>'$week_date' or up.updatedAt>'$week_date' order by over_all_points DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "80dfc540a2e05106e20ebe7d1fac61ef", "score": "0.5117515", "text": "function find_all_sale(){\n global $db;\n $sql = \"SELECT s.id,s.qty,s.price,s.date,p.name\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON s.product_id = p.id\";\n $sql .= \" ORDER BY s.date DESC\";\n return find_by_sql($sql);\n }", "title": "" }, { "docid": "55b7fed54c667846f875a310adb4d892", "score": "0.510267", "text": "function getFeess(){\n\t$sql = \"select * from feesdetails order by fees_collection_id desc\";\n\t$result = DBConnection::execQery($sql);\n\treturn $result;\n}", "title": "" }, { "docid": "5d919fd0b4beffacced922b8079e5c12", "score": "0.51005197", "text": "function getDistinctUserPoints()\n{\n $query=\"SELECT DISTINCT(up.user_id) AS user_id\nFROM\n user_points up\n INNER JOIN glogin_users gu \n ON (up.user_id = gu.id)\n INNER JOIN silverhat_games sg\n ON (up.game_id = sg.game_id) order by over_all_points DESC\";\n $result= mysql_query($query) or die(mysql_error());\n return $result;\n}", "title": "" }, { "docid": "43571189182534e04ea72244aad61222", "score": "0.5091577", "text": "public function getAll(){\n\t\t$kue = \"select * from customer order by date_modified desc\";\n\t\t$result = $this->db->query($kue);\n\t\treturn $result->result();\n\t}", "title": "" }, { "docid": "41b450e61a2ff269d36fb6c9c6d6d020", "score": "0.5086564", "text": "function SQuery() {\r\n\t\r\n\t\t\tglobal $wpdb;\r\n\t\r\n\t\t\tforeach($_GET as $k => $v) {\r\n\t\t\t\t$$k = $v;\r\n\t\t\t}\r\n\t\t\t$sort = empty($sort) ? \"premiumpress_subscriptions.ID\" : $sort;\r\n\t\t\t$order = empty($order) ? \"asc\" : $order;\r\n\t\t\t$s = strval($this->s*$GLOBALS['results_per_page']);\r\n\t\t\t$e = $GLOBALS['results_per_page'];\r\n\t\r\n\t\t\t\r\n\t\t\t$q = \"select premiumpress_subscriptions.*, premiumpress_packages.package_name from premiumpress_subscriptions LEFT JOIN premiumpress_packages ON (premiumpress_packages.ID = premiumpress_subscriptions.package_ID ) WHERE premiumpress_subscriptions.ID !='' $h order by $sort $order limit $s,$e\";\r\n\t\r\n\t\t\t$tq = \"select COUNT(distinct ID) from premiumpress_subscriptions where 1 = 1 $h\";\r\n\t\t\t\r\n\t\r\n\t\t\t$this->r = $wpdb->get_results($q);\r\n\t\t\t$this->total = intval($wpdb->get_var($tq));\r\n\t\t\treturn $this->r;\r\n\t\t}", "title": "" }, { "docid": "4fb077085becf04dec1b568594a81f02", "score": "0.5086508", "text": "function readAll(){\n \n $query = \"SELECT `id`, `cat_parent_name`, `cat_child_name`, `cat_description` FROM \n \" . $this->table_name . \"\n ORDER BY\n cat_child_name ASC\n \";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n return $stmt;\n }", "title": "" }, { "docid": "0ae6cfd193872bde3e4c2a4253bd1ba1", "score": "0.5077364", "text": "public function getallDistrict()\n{\n$query =\"SELECT * FROM area_district Order By district_name Asc\";\n$result = $this->db->select($query);\nreturn $result;\n}", "title": "" }, { "docid": "1d1ec87a3fb58b0786b8ab5f77c5a49d", "score": "0.5065521", "text": "public function getAllSousCommentaire()\n {\n $sql='SELECT u.ut_pseudo,u.ut_id,s.sondage_id,c.commentaire_date,c.soutien,c.texte,c.com_id,c.com_parent_id \n FROM commentaire c,sondage s ,utilisateur u \n WHERE s.sondage_id=? and c.ut_id=u.ut_id and s.sondage_id = c.sondage_id and c.com_parent_id IS NOT NULL\n ORDER BY c.soutien DESC';\n //echo $this->sondage_id;\n $allSubcommentaires=$this->executerRequete($sql,array($this->sondage_id));\n return ($allSubcommentaires->fetchAll());\n }", "title": "" }, { "docid": "8ff04d24885a516e7151cfbe8f746a20", "score": "0.5059395", "text": "function Select_articles_tinfo_personnel()\n\t{\n\t return $this->db->query('SELECT * FROM tinfo_personnel ORDER BY created_at DESC LIMIT 10');\n\t}", "title": "" }, { "docid": "6da43950302c74311a436f42e564b6f6", "score": "0.50546825", "text": "function get_coupons($sort=NULL) \n\t{\n\t\tif($sort=='end_date') {\n\t\t\t$this->db->order_by('end_date');\n\t\t} else {\n\t\t\t$this->db->order_by('start_date');\n\t\t}\n\t\t$res = $this->db->get('coupons');\n\t\treturn $res->result();\n\t}", "title": "" }, { "docid": "591fef111595b18a8b5ef2763fc3af48", "score": "0.5049823", "text": "function getOrdersByID($client_id) {\n $database = new Database();\n \n $database->query('SELECT * FROM invoices WHERE client_id = :client_id ORDER BY inv_num DESC');\n $database->bind(':client_id', $client_id);\n\n $data = $database->resultset();\n\n if (!empty($data)) {\n return $data;\n }\n}", "title": "" }, { "docid": "8cc1a3da50d73273a280d03c4d6e8873", "score": "0.5039166", "text": "function getDuplicatedDatesRM($selzone,$dal,$al){\n $duplicates=array();\n $sqlduplicated=\"select ShooperLog.LastDateChars \n from ShooperLog where CategoryZone={$selzone} AND esito=1 and ShooperLog.LastDateChars >=CONVERT(datetime, '\".$dal.\"', 101) and ShooperLog.LastDateChars<=CONVERT(datetime, '\".$al.\"', 101) and ShooperLog.ID in (select ShooperDates_{$selzone}.IDLogs from ShooperDates_{$selzone} WHERE (LOWER(LTRIM(rtrim(City))) LIKE '%rome%' OR LOWER(LTRIM(rtrim(City))) LIKE '%milan%'))\n group by ShooperLog.LastDateChars \n having COUNT(ShooperLog.LastDateChars )>1\";\n \n $sqlduplicates = $this->adoExecQuery($sqlduplicated);\n if($sqlduplicates){\n $duplicates=$sqlduplicates->GetArray();}\n return $duplicates;\n }", "title": "" }, { "docid": "ac2a9d92b637dd312b3a0482826dfa98", "score": "0.50384635", "text": "function getAllPosts()\r\n{\r\n $db = connectDb();\r\n $sql = \"SELECT idPost, commentaire, creationDate, modificationDate \"\r\n . \"FROM Post \"\r\n . \"ORDER BY creationDate DESC\";\r\n $request = $db->prepare($sql);\r\n $request->execute();\r\n return $request->fetchAll(PDO::FETCH_ASSOC);\r\n}", "title": "" }, { "docid": "e6ababfcf1e46c851dccbeeea8ac48cb", "score": "0.5029014", "text": "function select_all_by_id_desc() {\n global $sql;\n global $result;\n\t$sql = (\"SELECT * FROM `share` ORDER BY `id` DESC\");\n $result = mysql_query($sql) or die(\"Ошибка \" . mysql_error($link));\n}", "title": "" }, { "docid": "e6be27991197f536bbdcf5bdbdab91d7", "score": "0.50261325", "text": "function get_carryout_orders_name(){\n\tglobal $db;\n\t$query = \"SELECT * FROM orders JOIN customers ON orders.customerID = customers.customerID JOIN names ON customers.nameIDcust = names.nameID WHERE orders.orderCompleteDate IS NOT NULL AND orders.delivery = 'N' AND orders.orderStatus != 'Order Completed' ORDER BY names.lName ASC\";\n\t$results = $db->query($query);\n\treturn $results;\t\n}", "title": "" }, { "docid": "3539df474d0b607943a5b618cd19df53", "score": "0.50035673", "text": "public function distinct()\n {\n $this->db->distinct();\n return $this;\n }", "title": "" }, { "docid": "c52e15d3afdf7c1e14c3bce557ae2000", "score": "0.50010586", "text": "function getDrugsWithUsableBatches($baseID){\n return(selectMany(\"SELECT drugs.id, drugs.name AS name FROM batches INNER JOIN drugs WHERE batches.drug_id = drugs.id AND batches.base_id = :base_id AND NOT batches.state = 'used' GROUP BY name;\",['base_id' => $baseID]));\n}", "title": "" }, { "docid": "a866afb7c2cc642c9ca33eb4b6a31282", "score": "0.4996875", "text": "function queryPosts()\n{\n\n $table = queryAllDate();\n $delete_if_less = date(\"Ymd\");\n $table = removeElementWithInferiorValue($table,'date_calendrier',$delete_if_less);\n return $table;\n\n}", "title": "" }, { "docid": "98c7a6d12044138e807fccd6258853f8", "score": "0.49918354", "text": "function tri_asc(){\n\t\t$sql=\"SElECT * From produit order by prix\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "title": "" }, { "docid": "04b95fc3d032686043cd5bea2a0fa5b1", "score": "0.49884352", "text": "public static function selectConstruct(){\n\t\t\n\t\t$statement = array();\n\t\t\n\t\t$query = mysql_query(self::sql());\n\n\t\twhile($row = mysql_fetch_array($query)){\n\t\t\tarray_push($statement,selectFieldReturn($row[\"id\"]));\n\t\t}\n\t\t\n\t\treturn \"SELECT DISTINCT \" . implode(\", \",$statement);\t\n\t}", "title": "" }, { "docid": "9ba05c88465351967ac169155bb69b84", "score": "0.4979263", "text": "public function userlistdpd() {\n return $this->db->select('SELECT COUNT(IDDNR) as NBRDON,IDDNR,GROUPAGE,RHESUS,DATEDON FROM don GROUP BY IDDNR HAVING COUNT( IDDNR ) >2 order by NBRDON desc ');\n }", "title": "" }, { "docid": "298f26b6310d5f5fbdd6d2a211800bfe", "score": "0.49782008", "text": "public function view()\n{\n$sql = \"SELECT * FROM customer_info ORDER BY id DESC \";\n\n$STH = $this->DBH->query($sql);\n\n$STH->setFetchMode(PDO::FETCH_OBJ);\n\nreturn $STH->fetchAll();\n\nreturn $result;\n}", "title": "" }, { "docid": "ef577a7a0cfb0caa8247e1b680f46eba", "score": "0.49738416", "text": "function find_all_transfer_history(){\n global $db;\n $sql = \"SELECT l_h.id,l_h.responsible_user,l_h.transfer_date,l_h.created_at,e.tombo,e.specifications,s.name AS sector,u.name AS create_user\";\n $sql .= \" FROM transfer_historys l_h\";\n $sql .= \" INNER JOIN equipments e ON e.id = l_h.equipment_id\";\n $sql .= \" INNER JOIN sectors s ON s.id = l_h.sector_id\";\n $sql .= \" INNER JOIN users u ON u.id = l_h.created_by\";\n $sql .= \" ORDER BY l_h.created_at DESC\"; \n return find_by_sql($sql);\n}", "title": "" }, { "docid": "2b1d424bea49119d7c3fde8a399e3ac6", "score": "0.49729472", "text": "public function student_feedbackall()\n{\n$query =\"SELECT * FROM application_student_feedback Order By id Desc\";\n$result = $this->db->select($query);\nreturn $result;\n}", "title": "" }, { "docid": "d40fd4a3355d08ea39e8db333bdbd570", "score": "0.4969785", "text": "function dbSelectRDV($base)\n {\n $data = $base->prepare('SELECT R.rdvs_id, R.rdvs_date, R.rdvs_lieu, '\n . 'C.clients_nom, C.clients_prenom, C.clients_societe FROM Rdvs '\n . 'as R LEFT JOIN Clients as C ON R.rdvs_client = C.clients_id');\n $data->execute();\n return $data;\n }", "title": "" }, { "docid": "f29f2d52c3c355d316f1a892d6fd60e1", "score": "0.49696136", "text": "function get_distinct_year($conn){\n include 'flags.php';\n $sql = \"SELECT DISTINCT YEAR(created_at) as dis from kyc_table ORDER BY(YEAR(created_at)) ASC\";\n $run_query = mysqli_query($conn,$sql);\n $result = mysqli_fetch_all($run_query,MYSQLI_ASSOC);\n return $result;\n}", "title": "" }, { "docid": "a0ac805327970b4e164cb646c961c37e", "score": "0.49578583", "text": "function get_categories(){\n\tglobal $config;\n\t$sql_word = \"SELECT * FROM {$config['db']['tableprefix']}category ORDER BY id\";\n return perform_sql($sql_word);\n }", "title": "" }, { "docid": "cdafcbe3a649f4e66f511c9a7ff5e19d", "score": "0.4954095", "text": "public function getPayment(){\n $con = $GLOBALS['con'];\n $sql = \"SELECT payment_id, payment_timestamp, order_id, payment_amount \"\n . \"FROM payment ORDER BY payment_timestamp DESC\";\n $results = $con->query($sql)or die($con->error);\n return $results; \n }", "title": "" }, { "docid": "8736b793e6842635d83326376140cbf4", "score": "0.49501938", "text": "function find_all_bookings() {\n global $db;\n\n $sql = \"SELECT * FROM booking \";\n $sql .= \"ORDER BY customerID ASC\";\n $result = mysqli_query($db, $sql);\n //confirm_result_set($result);\n return $result;\n }", "title": "" }, { "docid": "caf9f68370ba03396d22951894c75315", "score": "0.49472627", "text": "function getUsableBatches($baseID){\n return(selectMany(\"SELECT drugs.name as name,batches.drug_id as drug_id, batches.id, batches.number as number, batches.state AS state FROM batches INNER JOIN drugs WHERE batches.drug_id = drugs.id AND batches.base_id = :base_id AND NOT batches.state = 'used';\",['base_id' => $baseID]));\n}", "title": "" }, { "docid": "8e398a4a5a922aeb19f489f10370a602", "score": "0.49437934", "text": "function get_all_zahlungen_by_wg($wg)\n{\n $db = get_db_connection();\n $sql = \"SELECT * FROM zahlungen WHERE wg='$wg' ORDER BY zahlungen.id DESC\";\n $result = $db->query($sql);\n return $result->fetchAll();\n}", "title": "" }, { "docid": "01879372a76d05e763e2d240d48e62db", "score": "0.494134", "text": "function getGripesByRecent() {\r\n //$result = mysql_query(\"SELECT * FROM gripes ORDER BY created DESC\");\r\n}", "title": "" }, { "docid": "3e726b1de4351be7318e45c5215a3b0a", "score": "0.49376833", "text": "function getTopRows(){\n\t\t$where = \" 1 = 1\";\n \t$rows = $this->getDBList($where,\" cc_id DESC\",true,\" Limit 1\");\n \treturn $rows;\n }", "title": "" }, { "docid": "d263db700a2798934da9b01abfba3bb9", "score": "0.49356914", "text": "function ipress_posts_distinct() { return 'DISTINCT'; }", "title": "" }, { "docid": "a8ebb535de994898828038eb461e1976", "score": "0.4927089", "text": "function getCategories(){\n global $con;\n $sql = \"SELECT * FROM categories ORDER BY id ASC\";\n $stmt = $con->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n}", "title": "" }, { "docid": "1e4d5e48e0b74c2b3977722c1113c5ec", "score": "0.4924075", "text": "function getStudents(){\n\n \t$sql = \"SELECT * FROM tblstudent_personal_details ORDER BY student_id DESC\";\n\n\t $result = DBConnection::execQery($sql);\n\t return $result;\n }", "title": "" }, { "docid": "e843734e5427c3b389d7879f57d0a68e", "score": "0.49211726", "text": "function getCat($WHERE=null){\n global $con;\n $stmt = $con->prepare(\"SELECT * From categories $WHERE ORDER BY Ordering asc\");\n $stmt->execute();\n $cats = $stmt->fetchAll();\n return $cats;\n}", "title": "" }, { "docid": "76dcb5d26e898c7a2c49b15bb81eb1af", "score": "0.4918148", "text": "function getDuplicatedDates($selzone,$dal,$al){\n $duplicates=array();\n $sqlduplicated=\" select ShooperLog.LastDateChars \n from ShooperLog where CategoryZone={$selzone} and ShooperLog.LastDateChars >=CONVERT(datetime, '\".$dal.\"', 101) and ShooperLog.LastDateChars<=CONVERT(datetime, '\".$al.\"', 101) AND esito=1\n group by ShooperLog.LastDateChars \n having COUNT(ShooperLog.LastDateChars )>1\";\n \n $sqlduplicates = $this->adoExecQuery($sqlduplicated);\n if($sqlduplicates){\n $duplicates=$sqlduplicates->GetArray();}\n return $duplicates;\n }", "title": "" }, { "docid": "e6acdc9486eb31c00bce125591dc8d9d", "score": "0.49139273", "text": "function get_all_user_data($UD_iduser)\n {\n $this->db->where('UD_iduser',$UD_iduser);\n $this->db->order_by('iduser_data', 'desc');\n return $this->db->get('user_data')->result_array();\n }", "title": "" }, { "docid": "0ce137d419c18b9db4e690538bfd257c", "score": "0.49129915", "text": "public function select_all_customer_info($customer_id){\n$query = \"SELECT * FROM tbl_customer WHERE customer_id='$customer_id'\";\n\n$query_result = mysqli_query($this->connection,$query);\n\nif($query_result){\n\treturn $query_result;\n}else{\n\tdie(\"Select customer query failed\".mysqli_error($this->connection));\n}\n}", "title": "" }, { "docid": "3ac30df072737a69f7866421f2d839ab", "score": "0.49124685", "text": "function achieve_get_main_category(&$sqlm)\n{\n $main_cat = array();\n $result = $sqlm->query('SELECT id, name01 FROM dbc_achievement_category WHERE parentid = -1 and id != 1 ORDER BY `order` ASC');\n while ($main_cat[] = $sqlm->fetch_assoc($result));\n return $main_cat;\n}", "title": "" }, { "docid": "0b086b492f8e70026cb2a3bdc3afab9b", "score": "0.49122104", "text": "function getTopRows(){\n\t\t$where = \" 1 = 1 and cv_sub_active = 1\";\n \t$rows = $this->getDBList($where,\" cv_sub_id DESC\",true,\" Limit 1\");\n \treturn $rows;\n }", "title": "" }, { "docid": "d55ace4918fb27c2b577622eb56e746d", "score": "0.4911528", "text": "function _buildQuery() {\n\t\t\t$orderby = $this->_buildContentOrderBy();\n\t\t\t$where = $this->_buildContentWhere();\n\t\t\t$types = $this->getTypes();\n\t\t\t$i = 98;\n\t\t\t$n = 98;\n\t\t\t$query = \" SELECT a.id,a.user_id,a.name,a.rosterchecked,a.published,a.unpublisheddate \";\n\t\t\tforeach($types AS $type) {\n\t\t\t\t$query .= \",a.\".$type.\" AS \".$type.\"_id \";\n\t\t\t\t$query .= \",\".chr($i).\".name AS \".$type.\"_name \";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$query .= \" FROM #__char_characters AS a \";\n\t\t\tforeach($types AS $type){\n\t\t\t\t$query .= \" LEFT JOIN #__char_categories AS \".chr($n).\" ON \".chr($n).\".id = a.\".$type.\" \";\n\t\t\t\t$n++;\n\t\t\t}\n\t\t\t$query .= $where;\n\t\t\t$query .= $orderby;\n\t\t\tdump($query);\n\t\t\treturn $query;\n\t\t}", "title": "" }, { "docid": "eaf604547407dc52308e3a6c1cbdca1a", "score": "0.4907325", "text": "function distinctItem($select,$from)\n{\n\tglobal $con;\n\t$statementch=$con->prepare(\"SELECT $select FROM $from\");\n\t$statementch->execute();\n\t$count=$statementch->rowCount();\n\treturn $count;\n}", "title": "" }, { "docid": "d20421ceb18b915cae41fe248a7e735d", "score": "0.4900365", "text": "function getProductsOnSaleCat($id) {\r\n\tglobal $conn;\r\n\t$stmt = $conn->prepare\r\n\t('\r\n\tSELECT DISTINCT ON (product.id) *, product.name AS product_name, product.id AS product_id\r\n\tFROM product\r\n\tJOIN keyword ON product.keyword=keyword.id\r\n\tJOIN onsale ON product.id=onsale.id\r\n\tLEFT JOIN image ON product.id=image.product\r\n\tWHERE keyword.id=?\r\n\tORDER BY product.id, product.nr_views DESC\r\n\tLIMIT 6\r\n\t');\r\n\t$stmt->execute(array($id));\r\n\r\n\treturn $stmt->fetchAll();\r\n}", "title": "" }, { "docid": "6bee3167de9848143576c235589b0bfa", "score": "0.48968244", "text": "public function getCategorys($idfather)\n {\n return $this->db->query(\"SELECT * FROM ac_discussion_category WHERE idfather = '$idfather'\");\n }", "title": "" }, { "docid": "8b963ad77aca55c588a53582f56c05fa", "score": "0.489635", "text": "function sort_submitted_category($categoryName) {\r\n global $db;\r\n $query = 'SELECT * FROM submittedquotes WHERE category = :categoryName';\r\n $statement = $db->prepare($query);\r\n $statement->bindValue(':categoryName',$categoryName);\r\n $statement->execute();\r\n $quotes = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $quotes;\r\n }", "title": "" }, { "docid": "449f37301dce723fd76fd7015b97de06", "score": "0.48961732", "text": "public function listWhereId($cnx){\n$resultat =$cnx->query(\"select * from type where id_type='\".$this->id_type.\"'\")->fetch(PDO::FETCH_OBJ);\n\t \nreturn $resultat;\n}", "title": "" }, { "docid": "e06c3931857802feb67e387bac333fe2", "score": "0.4896127", "text": "function get_dates( $db, $ui, $n ) {\n if ( $db == NULL ) {\n $db = get_db();\n }\n $userinfo = get_all($db, $ui);\n\t$db = NULL;\n\t$db = get_db($userinfo[\"dbname\"]);\n\n $now = time();//datetime(gpstime, 'localtime')) strftime('%Y-%m-%d %H:%M:%S',gpstime)\n try {\n $stmt = $db->prepare(\"select distinct date(gpstime,'unixepoch','localtime') as d from points where userid = :userid and type >= 0 order by d desc limit :n\"); // type >= 0 (so we can store -1 and ignore)\n $stmt->execute( array(':userid' => $ui, 'n' => $n) );\n $result = $stmt->fetchAll();\n return $result;\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n}", "title": "" }, { "docid": "f86a8846ee789c23ebadef59386c5dca", "score": "0.48935685", "text": "public function SelectByCust_id($cust_id)\r\n {\r\n \t $sql = \"Select * from `sales` where cust_id = \".$this->Prepare($cust_id);\r\n \t return $this->SelectWithCondition($sql);\r\n }", "title": "" }, { "docid": "bc34c66a9198495696214a338c3b9f7c", "score": "0.48931924", "text": "public function distinct(): self;", "title": "" }, { "docid": "07c3cae879a566db60bef39c8266b5a3", "score": "0.488987", "text": "function model_purchase_buyer_get($id) {\n global $conn;\n\n if(!empty($_SESSION['login'])) {\n $id = mysqli_real_escape_string($conn, $_SESSION['login']);\n }\n\n $query = \"SELECT DISTINCT buyer FROM mkeerus_pr_purchase WHERE user_id = $id ORDER BY buyer ASC\";\n $result = mysqli_query($conn, $query);\n\n $buyers = array();\n\n if($result) {\n while($b = mysqli_fetch_assoc($result)) {\n $buyers[] = $b;\n }\n }\n return $buyers;\n}", "title": "" }, { "docid": "148265ae265e9d3c7f7302b156d9618e", "score": "0.48897722", "text": "function get_all_cargo()\n\t{\n\t\t$this->db->where('eliminado=1');\n\t\t$this->db->order_by('idCargo', 'desc');\n\t\treturn $this->db->get('cargo')->result_array();\n\t}", "title": "" }, { "docid": "5fad789f5a219455cfdcd0bce09ca525", "score": "0.4879461", "text": "function fultrage_fetch_data_candidat_by_category($query)\n {\n \n $this->db->limit(10);\n $this->db->order_by('nom', 'ASC');\n $resultat = $this->db->get_where(\"profile_entreprise\", array(\n 'idcat' => $query\n ));\n\n return $resultat;\n \n \n }", "title": "" }, { "docid": "f0aa7f214254fc57d3178976c8c81934", "score": "0.4874757", "text": "function get_all_items()\r\n\t{\r\n\t\tglobal $conn;\r\n\t\t/*return $conn->query(\"SELECT items.*, categories.category_name FROM items LEFT JOIN categories ON items.category_id=categories.id ORDER BY items.order_num\");*/\r\n\t\treturn $conn->query(\"SELECT * FROM items ORDER BY order_num\");\r\n\t}", "title": "" }, { "docid": "692cca345bc7c445dbf491e325fe3d5b", "score": "0.48685142", "text": "protected function getListQuery()\n {\n // Create a new query object. \n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n // Select some fields from the hello table\n $query\n ->select($db->quoteName(array('id', 'rate', 'rate_val1', 'rate_val2', 'comp_rate', 'comp_rate_val', 'rate_date', 'debt')))\n ->from('#__debtticker_debtlogsdaily')\n ->order('id DESC');\n\n return $query;\n }", "title": "" } ]
798ea4b7ec9b96e0c2900197a23f6653
Creates a form to delete a agent entity.
[ { "docid": "e1b3a051fa3b77a6a026337fc4da923f", "score": "0.8246397", "text": "private function createDeleteForm(Agent $agent)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('agent_delete', array('id' => $agent->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
[ { "docid": "3a0ff226b5c8913736a12e929e52cd06", "score": "0.71592474", "text": "private function createDeleteForm()\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acecommerce_adresse_delete'))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "33c6648e1bf04f9e3c1c106ed1354bab", "score": "0.69384325", "text": "public function deleteAction(Request $request, Agent $agent)\n {\n $form = $this->createDeleteForm($agent);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($agent);\n $em->flush();\n }\n\n return $this->redirectToRoute('agent_index');\n }", "title": "" }, { "docid": "295baf46665616adc6f509cd09c76112", "score": "0.68247694", "text": "private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "98996e368deb8d0bea5c64032c595d36", "score": "0.6787122", "text": "private function createDeleteForm(Agence $agence)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('agence_delete', array('id' => $agence->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4976b29e8ecc8d3d925983863ea67438", "score": "0.6762495", "text": "private function createDeleteForm(OfertaAcademica $ofertaAcademica)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ceapp_gestion_oferta_academica_delete', array('id' => $ofertaAcademica->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e13bea8d4133897395bf9f0b6af7c5cf", "score": "0.6743945", "text": "private function createDeleteForm(Ambassador $ambassador)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ambassador_delete', array('id' => $ambassador->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "98722cb48d353cf3dc8ff7149ee9903b", "score": "0.6734113", "text": "private function createDeleteForm(Temoignages $temoignage) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('temoignages_delete', array('id' => $temoignage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a0b1808b886c81d02985a2e0ff6e37ea", "score": "0.66908026", "text": "private function createDeleteForm(Oficina $oficina)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('oficina_delete', array('id' => $oficina->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2f05fa053a78b6413dff6b316be0a8e5", "score": "0.668329", "text": "private function createDeleteForm(Votacao $votacao) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_votacao_delete', array('id' => $votacao->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1e9ec2c44e890cf843cbf35e9e60782a", "score": "0.664862", "text": "public function deleting(Form $form);", "title": "" }, { "docid": "36c339f90cffa69edb1201b7e13d9229", "score": "0.6591428", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('job_delete', array('token' => $token)))\n ->setMethod('DELETE')\n ->add('token', 'hidden')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "89f605fc681ca13041b7df95f8a52226", "score": "0.6586611", "text": "public function destroy(Agent $agent)\n {\n $deleted_agent = $agent;\n\n $agent->contact()->delete();\n $agent->delete();\n\n return redirect()->route('agents.index')->with('success', \"El agente <strong>{$deleted_agent->name}</strong> se eliminó con éxito.\");\n\n }", "title": "" }, { "docid": "cbdc59de7904f263e656b593ea275098", "score": "0.6573388", "text": "private function createDeleteForm(Archive $archive)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('association_archive_delete', array('id' => $archive->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8d179227e771a61b0710505ae209f171", "score": "0.65503645", "text": "private function createDeleteForm(Voyage $voyage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('voyage_delete', array('idVoyage' => $voyage->getIdvoyage())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "91fa127de239e83510544d60ecaf34c8", "score": "0.6534396", "text": "private function createDeleteForm(Commandescafes $commandescafe)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_commandescafe_delete', array('id' => $commandescafe->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2103ad037e8d168e0fb108e6dfa76416", "score": "0.6527155", "text": "private function createDeleteForm(Caja $caja) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('caja_delete', array('id' => $caja->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "d7575da87a922fb96f4423f9956b6c6d", "score": "0.64784735", "text": "private function createDeleteForm($entity, $entityCode)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_content_entry_delete', [\n 'entityCode'=>$entityCode,\n 'id' => $entity->getId()\n ]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "77de8130d78bbe1c6555c1bbccfa36a1", "score": "0.6443578", "text": "private function createDeleteForm($id) {\n $this->securityControle();\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('employe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Effacer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cc546a8ca79363dcfa3e58c2e55c1e12", "score": "0.64167684", "text": "function ticker_delete_form($form, &$form_state, $entity) {\n // Store the entity in the form.\n $form_state['entity'] = $entity;\n\n // Show confirm dialog.\n $entity_uri = entity_uri('ticker', $entity);\n $message = t('Are you sure you want to delete entity %title?', array('%title' => entity_label('ticker', $entity)));\n return confirm_form(\n $form,\n $message,\n $entity_uri['path'],\n t('This action cannot be undone.'),\n t('Delete'),\n t('Cancel')\n );\n}", "title": "" }, { "docid": "525bbe678591b303628468870588a588", "score": "0.64157134", "text": "private function createDeleteForm(Mariage $mariage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mariage_delete', array('id' => $mariage->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "84fbbd1e6f356fc32fb67a6a63bf3eee", "score": "0.6406381", "text": "private function createDeleteForm(Marquees $marquee)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('marquees_delete', array('id' => $marquee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2cf02fe912754623513663da8325c64a", "score": "0.6401409", "text": "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('e_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "4f785ec4d88251935b20df823c3595c2", "score": "0.639521", "text": "private function createDeleteForm(Annonce $annonce) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_delete', array('id' => $annonce->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0504176b80d8e1376ec66cc7ea90f9ee", "score": "0.6395067", "text": "private function createDeleteForm(BottleType $bottleType)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bottletype_delete', array('id' => $bottleType->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "03388205de8ccb0798b20c50eee1aeda", "score": "0.6387459", "text": "public function deleted(Form $form);", "title": "" }, { "docid": "9765fe561bc5d88a31899f45f6b2c26c", "score": "0.6365429", "text": "public function delete_form()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "efdfefc413f4e7861e40b47b35eb96a6", "score": "0.63488424", "text": "private function createDeleteForm(Acudientes $acudiente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acudientes_delete', array('id' => $acudiente->getIdAcu())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "51d99aecd4ff2ee14fc3585ee5c519d4", "score": "0.6346233", "text": "private function createDeleteForm(Afeccione $afeccione) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('afeccione_delete', array('id' => $afeccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "19cf2e407c94c6c7a3fbc950f949b342", "score": "0.63438123", "text": "private function createDeleteForm(AtletaEquipo $atletaEquipo) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('atletaequipo_delete', array('id' => $atletaEquipo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fdb5da4f708363e61b37940c76479c56", "score": "0.63320744", "text": "private function createDeleteForm(Opleiding $opleiding)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('opleiding_delete', array('id' => $opleiding->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7dac74c131efe58f35b5945a440bf3aa", "score": "0.63319063", "text": "private function createDeleteForm(IgnoreOriginInstanceRule $ignoreOriginInstanceRule)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ignore_origin_instance_rules_delete', ['id' => $ignoreOriginInstanceRule->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7dac74c131efe58f35b5945a440bf3aa", "score": "0.63319063", "text": "private function createDeleteForm(IgnoreOriginInstanceRule $ignoreOriginInstanceRule)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ignore_origin_instance_rules_delete', ['id' => $ignoreOriginInstanceRule->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3bd0b045965b42c2a7811663506bcebd", "score": "0.6319926", "text": "private function createDeleteForm(Cas $ca)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Cas_delete', array('id' => $ca->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "be830bc2c3400652a05ec396def3d237", "score": "0.63192475", "text": "public function destroy(Agent $agent)\n {\n $agent->delete();\n toastr()->success('agent was deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "93edfc21a933f9ba0d99fb547006f8f0", "score": "0.63157094", "text": "private function createDeleteForm(Funcionaros $funcionaro)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionaros_delete', array('idfuncionaros' => $funcionaro->getIdfuncionaros())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2f6aa559438f13010a7932ec3c78e9bf", "score": "0.6313105", "text": "private function createDeleteForm(Usuario $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_usuario_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "7b0b1638fd6f88c9f8860fad969e02d7", "score": "0.63068867", "text": "private function createDeleteForm(exhibitor $exhibitor) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('exhibitor_delete', array('id' => $exhibitor->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "187f1fe6c322c8b4d253cf403c299875", "score": "0.6302596", "text": "private function createDeleteForm(Employee $employee) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('employee_delete', array('id' => $employee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cb655808f18ddff54a96209b2c08cf37", "score": "0.6295041", "text": "private function createDeleteForm(About $about)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('admin_about_delete', array('id' => $about->getId())))\n\t\t\t->setMethod('DELETE')\n\t\t\t->getForm()\n\t\t;\n\t}", "title": "" }, { "docid": "d90e813e819dbd03821d58a5daea5a72", "score": "0.6294583", "text": "private function createDeleteForm($passenger)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('passenger_delete', array('id' => $passenger->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ffff5dbdd318b92d10a82c482d7584f9", "score": "0.62625253", "text": "private function createDeleteForm(Lotes $lote) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('lotes_delete', array('id' => $lote->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "deefe43cc84f5eabaab44ce69f2ef6c7", "score": "0.62610376", "text": "private function createDeleteForm(LoftType $loftType)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('loftTypeDelete', array('id' => $loftType->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "769aa56c2f2d1003cb639ee722ad5944", "score": "0.6257805", "text": "private function createDeleteForm(Artist $artist)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('artist_delete', array('id' => $artist->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bc541b39e73d1b90d7ca3c6784298111", "score": "0.62575436", "text": "private function createDeleteForm(Article $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('article_delete', array('id' => $article->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "bc541b39e73d1b90d7ca3c6784298111", "score": "0.62575436", "text": "private function createDeleteForm(Article $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('article_delete', array('id' => $article->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "273f837b6e2f45f0011a3698f40fd8b8", "score": "0.6257006", "text": "private function createDeleteForm(Villano $villano)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('villano_delete', array('id' => $villano->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "df6cd37a5158a2e527e2caa42490ef12", "score": "0.6256363", "text": "private function createDeleteForm(Form $form)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('formCrud_delete', array('id' => $form->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "20855612a150123fc6781e2b95313afd", "score": "0.6246122", "text": "private function createDeleteForm(SvCfgarea $svCfgArea)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svcfgarea_delete', array('id' => $svCfgArea->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "66e1f00d6a1fa311554077f411e2db47", "score": "0.6245659", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_pending_delete', array('token' => $token)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ca356c6992a8930e36972b5267907bd6", "score": "0.62424797", "text": "private function createDeleteForm(Article $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('article_delete', array('id' => $article->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ca356c6992a8930e36972b5267907bd6", "score": "0.62424797", "text": "private function createDeleteForm(Article $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('article_delete', array('id' => $article->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "200ced810616809bab7f5070707db420", "score": "0.6232856", "text": "public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"cLASSNAME/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }", "title": "" }, { "docid": "784d621cd1ee932ca0a2eb8edeae50a0", "score": "0.6227989", "text": "private function createDeleteForm(Campagne $campagne)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('campagne_delete', array('id' => $campagne->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0472f3ad0f3de97ba78522d23f997e4b", "score": "0.622551", "text": "private function createDeleteForm(Article $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('blog_article_delete', ['id' => $article->getId()]))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "95ca1549c8e3337823f2e66d536a1dc0", "score": "0.6225301", "text": "private function createDeleteForm(Enquete $enquete)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('enquete_delete', array('id' => $enquete->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0ba482e9e4317d535fcc34435fce18dd", "score": "0.62235206", "text": "private function createDeleteForm(Avis $avi)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_dashboard_avis_delete', array('id' => $avi->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8815b86bf03f4d0094a9edcba8240fc5", "score": "0.62224656", "text": "private function createDeleteForm(Ausencia $ausencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ausencia_delete', array('id' => $ausencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "830cf2de915048267183e1257774bc9f", "score": "0.62196344", "text": "private function createDeleteForm(Afdeling $afdeling)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('afdeling_delete', array('id' => $afdeling->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "be5b49d4504f0fe613b2a8f1edd1334a", "score": "0.6214191", "text": "private function createDeleteForm($id) {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('insumos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ca4ad3baa07558a15029a8dbf732c069", "score": "0.62137175", "text": "private function createDeleteForm(VhloCfgLinea $vhloCfgLinea)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vhlocfglinea_delete', array('id' => $vhloCfgLinea->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "900c1676c55b7075d3cc78c0f3b0e813", "score": "0.62108415", "text": "private function createDeleteForm(Txostenadet $txostenadet)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('txostenadet_delete', array('id' => $txostenadet->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "adbeee759f7f697e28bb216fc3f8dc40", "score": "0.62107205", "text": "public function accountDeleteForm(){\n\t\t$form = UserAccount_DeleteForm::create($this, \"accountDeleteForm\");\n\n $this->extend(\"updateAccountDeleteForm\", $form);\n\n return $form;\n\t}", "title": "" }, { "docid": "de1aa7904a110d1293493177e662ff0c", "score": "0.62048185", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('engagement_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Skasuj Engagement','attr' => array('class' => 'btn btn-danger' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9b28edfccbbf6cd0c16ce69f59132e80", "score": "0.62009597", "text": "private function createDeleteForm(ChargeLabel $chargeLabel)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_charge_label_delete', array('id' => $chargeLabel->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b1fb124ec29b021795129306c9d72a30", "score": "0.6200347", "text": "private function createDeleteForm(RefActionPrevention $refActionPrevention) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('refactionprevention_delete', array('idActionprev' => $refActionPrevention->getIdActionprev())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9e4b4a3a7fb8ec4d857fbb68c9d11cc1", "score": "0.6197354", "text": "private function createDeleteForm(Movimentacao $movimentacao)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('movimentacao_delete', array('id' => $movimentacao->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "acd23c873137ec1eabe8366dfc6a8718", "score": "0.61925244", "text": "private function createDeleteForm(TbAcesso $tbAcesso)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acesso_delete', array('id' => $tbAcesso->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "db0d0e132172a2f77dd47fd2bc558a20", "score": "0.61920774", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('venta_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Eliminar Venta',\n 'attr' => array('class'=>'btn btn-danger btn-block')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9cbd92c2c20083ead97d9d0f732dd050", "score": "0.61908054", "text": "private function createDeleteForm(CarteAbonnee $carteAbonnee)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('carteabonnee_delete', array('id' => $carteAbonnee->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f8695757258157c4fdd804bd7bc419da", "score": "0.61880505", "text": "private function createDeleteForm(RequeteFb $requeteFb)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('requetefb_delete', array('id' => $requeteFb->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "65334830fd02d1ec920a56e07f752f4a", "score": "0.6180591", "text": "public function destroy(Agent $agent)\n {\n if (Gate::denies('edit-users')){\n\n return redirect()->route('admin.users.index');\n }\n $agent->delete();\n\n return redirect()->route('agent.agents.index')->with('message', 'Suppression Effectué avec succès');\n }", "title": "" }, { "docid": "f43de0f55cc1b25422c1b47eab90f8ec", "score": "0.6180584", "text": "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f43de0f55cc1b25422c1b47eab90f8ec", "score": "0.6180584", "text": "private function createDeleteForm(Event $event)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $event->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e50e89a56fbf0bf553137c6e46dfead5", "score": "0.6179185", "text": "private function createDeleteForm(testMovember $testMovember)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('testmovember_delete', array('id' => $testMovember->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "db29c7ae9849d69d28974dbdb615f446", "score": "0.6173056", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('venue_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7343e4b3e6ee59ef9cfc86aebcd00153", "score": "0.6170631", "text": "private function createDeleteForm(Email $email)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('email_delete', array('id' => $email->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "83ec6b793609cfd5023483d77b54058c", "score": "0.6170345", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('logo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "88e8daff402625cfbeeab3100ef9f714", "score": "0.61587656", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr'=>array('id' => 'delete-form')))\n ->setAction($this->generateUrl('recipefields_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "40302fe1fb345a6d9eb4cfbf3ae2a4a4", "score": "0.6156171", "text": "private function createDeleteForm(Almacen $almacen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('almacen_delete', array('id' => $almacen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7aa9763a47c29fedcdf829bf754837b0", "score": "0.61496645", "text": "private function createDeleteForm(Role $role)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('roles_delete', array('id' => $role->getId())))\n\t\t\t->setMethod('DELETE')\n\t\t\t->getForm();\n\t}", "title": "" }, { "docid": "77f0cd0d6e131541a3eea0675af61cfc", "score": "0.61425954", "text": "private function createDeleteForm(Message $message)\n{\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('message_delete', array('id' => $message->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n}", "title": "" }, { "docid": "3cc15caf1288eee67f21e0ec63b6ba92", "score": "0.61409676", "text": "private function createDeleteForm(SvCfgClaseAccidente $svCfgClaseAccidente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svcfgclaseaccidente_delete', array('id' => $svCfgClaseAccidente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "675278a5e96d9ba8c73a8a8f77a7f77c", "score": "0.6133036", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('actor_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bbb0b3c05539b33cc18fafb13942c584", "score": "0.6132111", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('banner_delete', array('id' => $id)))\r\n ->setMethod('GET')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "2362cb369dd99a4bb925685ec13b98fe", "score": "0.6131658", "text": "private function createDeleteForm(ModeDeLivraison $modeDeLivraison)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modedelivraison_delete', array('id' => $modeDeLivraison->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9f547544a15009cea55d35db5d3bf228", "score": "0.61150086", "text": "private function createDeleteForm(EventBlog $eventBlog)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $eventBlog->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bb02913d247ac73f3190bb414580f554", "score": "0.61145335", "text": "private function createDeleteForm(Interview $interview)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('interview_delete', array('refEnt' => $interview->getRefent())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e0a492d42560e0d3543f1939c01b433d", "score": "0.6111366", "text": "private function createDeleteForm(SvCfgMotivoAnulacion $svCfgMotivoAnulacion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svCfgmotivoanulacion_delete', array('id' => $svCfgMotivoAnulacion->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "498b66ab37c55c526bbe48aaaef7e474", "score": "0.61110973", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('announcement_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5903a7077b86137c22f6e0dd70efd07a", "score": "0.61084425", "text": "private function createDeleteForm(Fraturaamostra $fraturaamostra)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fraturaamostra_delete', array('id' => $fraturaamostra->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "345986ea923ec0e80f1ea31c006996ff", "score": "0.6106232", "text": "private function createDeleteForm(Articles $article)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_articles_delete', array('id' => $article->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f4850fb6701b92383ff393b6a56af173", "score": "0.61043566", "text": "private function createDeleteForm(Pacientes $paciente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('paciente_delete', array('id' => $paciente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c2e5d59ffb746b8617ad1339ae291626", "score": "0.61032397", "text": "private function createDeleteForm(Osoba $osoba)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('osoba_delete', array('id' => $osoba->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e0da49c25a2fd912f4394c94ac84cfb9", "score": "0.6103004", "text": "private function createDeleteForm(Tournament $tournament)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_tournament_delete', array('id' => $tournament->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fd21a3f00bef66e3767d730429352ef0", "score": "0.61026573", "text": "private function createDeleteForm(LoginAnim $loginAnim)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('loginanim_delete', array('id' => $loginAnim->getId())))\r\n ->setMethod('DELETE')\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "ddfdd25e6ac7f434ca0e5a00cba2f7ee", "score": "0.6099925", "text": "private function createDeleteForm(Creneau $creneau)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('creneau_archive', array('id' => $creneau->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "97b7ae474a039f118f4f79909963f210", "score": "0.6097852", "text": "private function createDeleteForm(Comunidad $comunidad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comunidad_delete', ['id' => $comunidad->getId()]))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "112b8ff167f43400ae098f485ebfe5ee", "score": "0.60967416", "text": "private function createDeleteForm(Advert $advert)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('advert_delete', array('id' => $advert->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d1e5e3fc79f3024bbbcf3d205a5edeaa", "score": "0.6096493", "text": "protected function deleteAction()\n {\n $return = null;\n\n //simulate configuration for the twig extension\n $easyadmin = $this->request->attributes->get('easyadmin');\n $easyadmin['entity']['delete']['fields'] = [];\n $this->request->attributes->set('easyadmin', $easyadmin);\n\n $id = $this->request->query->get('id');\n if (!$entity = $this->em->getRepository($this->entity['class'])->find($id)) {\n throw new EntityNotFoundException(array('action' => 'delete', 'entity' => $this->entity, 'entity_id' => $id));\n }\n\n $fields = [];\n\n $form = $this->createDeleteForm($this->entity['name'], $id);\n $form->handleRequest($this->request);\n\n if ('DELETE' === $this->request->getMethod()) {\n $this->dispatch(EasyAdminEvents::PRE_DELETE);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $this->dispatch(EasyAdminEvents::PRE_REMOVE, array('entity' => $entity));\n\n if (method_exists($this, $customMethodName = 'preRemove'.$this->entity['name'].'Entity')) {\n $this->{$customMethodName}($entity);\n } else {\n $this->preRemoveEntity($entity);\n }\n\n $this->em->remove($entity);\n $this->em->flush();\n\n $this->dispatch(EasyAdminEvents::POST_REMOVE, array('entity' => $entity));\n\n $urlParameters = $this->getUrlParameters('list');\n $return = $this->redirect($this->generateUrl($this->getAdminRouteName(), $urlParameters));\n } else {\n throw new \\LogicException('The delete form is not valid');\n }\n\n $this->dispatch(EasyAdminEvents::POST_DELETE);\n } else {\n $return = $this->render(\"@EasyAdminPopup/default/delete.html.twig\", array(\n 'form' => $form->createView(),\n 'entity_fields' => $fields,\n 'entity' => $entity,\n ));\n }\n\n return $return;\n }", "title": "" }, { "docid": "bff2d75b97235b94b7aa8460639db71c", "score": "0.608989", "text": "private function createDeleteForm(Comprador $comprador)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comprador_delete', array('id' => $comprador->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
99340b289a49b48b27f21a634be8e210
Gets the complete list of drinks and all their properties from the database
[ { "docid": "b235306c15bc3d14556b5e86628b5b2d", "score": "0.7713101", "text": "function getAllDrinks()\r\n {\r\n $db = $this->_dbh;\r\n\r\n $sql = \"SELECT name, glass, shots FROM drink\";\r\n $statement = $db->prepare($sql);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(2);\r\n\r\n // append \" shots\" for table readability\r\n for($i = 0; $i < count($rows); $i++) {\r\n $rows[$i]['shots'] = $rows[$i]['shots'] . \" shots\";\r\n }\r\n\r\n return $rows;\r\n }", "title": "" } ]
[ { "docid": "31aea7f4d2493d9c95d2fd358e31ec4b", "score": "0.68864304", "text": "public function getDrinksOnly(){\r\n\t\t$this->db->query(\"SELECT * FROM drink\");\r\n\r\n\t\t\t//Assign the Result Set\r\n\t\t$result = $this->db->resultSet();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "6621015b97ce70ccacbf2cea5733dfa9", "score": "0.64654714", "text": "public function drinks()\n {\n return Drink::where(function ($query) {\n return $query->where('ingredient_1', $this->bottle_id)\n ->orWhere('ingredient_2', $this->bottle_id)\n ->orWhere('ingredient_3', $this->bottle_id)\n ->orWhere('ingredient_4', $this->bottle_id);\n });\n }", "title": "" }, { "docid": "c49e37a756d839de7e6d33cb407b8257", "score": "0.6243239", "text": "public function drinks()\n {\n return $this->belongsToMany('App\\Drink')->withTimestamps();\n }", "title": "" }, { "docid": "d0864fd427c7f27114c7efcee02528e0", "score": "0.6183327", "text": "public function drinks()\n {\n return $this->belongsToMany('App\\Models\\Drink', 'bebidamenu', 'idmenu', 'idbebida');\n }", "title": "" }, { "docid": "8aa9f7c22179ccc398e9ffa3cc6cfee6", "score": "0.5912463", "text": "public function getProperties() {\n \treturn $this->hasMany(Properties::className(), ['id' => 'prop_id'])\n \t->viaTable('junction', \t['product_id' => 'id']);\n }", "title": "" }, { "docid": "314c26a04d500c4e14388b0b0c8374f6", "score": "0.5900386", "text": "public function getList(){\n $this->getDB(); \n $query = \"SELECT * FROM product\";\n return $this->getModel(\"Product\", $query) ;\n }", "title": "" }, { "docid": "4dc6250bae067145e223e6293eb7591e", "score": "0.5822328", "text": "function getDrink($drinkName)\r\n { // update\r\n // get drink table info\r\n $sql = \"SELECT name, glass, image, recipe, alcoholic, shots FROM drink\r\n WHERE name=:name\";\r\n $statement = $this->_dbh->prepare($sql);\r\n $statement->bindParam(':name', $drinkName);\r\n $statement->execute();\r\n $drink = $statement->fetch(2);\r\n\r\n // get ingredients, qty, type\r\n\r\n $sql = \"SELECT drink_ing.ing_name, qty, type FROM drink_ing, ingredient\r\n WHERE drink_ing.name = :name AND drink_ing.ing_name = ingredient.ing_name\";\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n $statement->bindParam(':name', $drinkName);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(2);\r\n\r\n // create appropriate quantity, ingredient, and type arrays\r\n $qty = array();\r\n $type = array();\r\n $ingredients = array();\r\n foreach($rows as $ingredient) {\r\n $qty[] = $ingredient['qty'];\r\n $type[] = $ingredient['type'];\r\n $ingredients[] = $ingredient['ing_name'];\r\n }\r\n // TODO I don't see drink['ingredients'] ever used => I believe matches old Drink structure\r\n $drink['ingredients'] = $rows;\r\n // create a new Drink or Alcoholic drink appropriately\r\n if($drink['alcoholic'] == 0) {\r\n $newDrink = new Drink($drinkName, $drink['glass'], $qty, $ingredients, $type, $drink['recipe'], $drink['image']);\r\n } else {\r\n $newDrink = new AlcoholDrink($drinkName, $drink['glass'], $qty, $ingredients, $type, $drink['recipe'], $drink['image']);\r\n $newDrink->setShots($drink['shots']);\r\n }\r\n\r\n return $newDrink;\r\n\r\n }", "title": "" }, { "docid": "49108e732555e768bb78c6625e81553d", "score": "0.5705636", "text": "public function getAllListings()\n {\n $sql = \"SELECT id, price, street, apt, cross_street, city,\n state, zipcode, type, is_furnished, is_accessible, is_smoke,\n has_parking, campus_distance, create_time, last_update_time,\n size, description, utilities, latitude, longitude,\n\t bed, bath, pets_allowed FROM \" . self::TABLE_NAME;\n $query = $this->db->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows, here in object-style because we defined this in\n // core/controller.php! If you prefer to get an associative array as the result, then do\n // $query->fetchAll(PDO::FETCH_ASSOC); or change core/controller.php's PDO options to\n // $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ...\n return $query->fetchAll();\n }", "title": "" }, { "docid": "5cabaa65253780b991431a89f566a7a7", "score": "0.56650084", "text": "public function getDrinksByVendor($vendor_id){\r\n\t\t$this->db->query(\"SELECT drink.*\r\n\t\t\tFROM vendor_info\r\n\t\t\tINNER JOIN drink ON drink.vendor_id = vendor_info.id\r\n\t\t\tWHERE vendor_info.id = $vendor_id\r\n\t\t\t\");\r\n\r\n\t\t\t//Assign the Result Set\r\n\t\t$result = $this->db->resultSet();\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "846afaf9f30b11afeeac8cf18ea87302", "score": "0.5663584", "text": "public function getList()\n {\n $query = \"SELECT id_producto, nombre, precio, descripcion, disponibilidad, ranking, prod_destacado, nombre_imagen, activo\n\t\t FROM producto\";\n return $this->con->query($query);\n }", "title": "" }, { "docid": "a89583b0b9a301dd69b5827e5bde25d4", "score": "0.5661073", "text": "public function getBeds()\n {\n $getBeds = new Database();\n return $getBeds->setTable(\"gardenBeds\")->where(\"gardenId\", \"=\", $this->gardenId)->results();\n }", "title": "" }, { "docid": "9514acb791d52774de403b4981b86509", "score": "0.5639688", "text": "public function getDB() {\n\t\t$properties_meta = array(\n\t\t\t'user_id'\t=> Frogg_Db_Type::get('user_id', 'int', 11),\n\t\t\t'series_id'\t=> Frogg_Db_Type::get('series_id', 'int', 11),\n\t\t\t'season_id'\t=> Frogg_Db_Type::get('season_id', 'int', 11),\n\t\t\t'episode_id'=> Frogg_Db_Type::get('episode_id', 'int', 11)\n\t\t);\n\t\treturn $properties_meta; \n\t}", "title": "" }, { "docid": "ae2a56ce97bc9f4fff58efde21203bd4", "score": "0.5604532", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new ProductData());\n\t}", "title": "" }, { "docid": "5c4a83fe8923d8b8ea18d851508e9718", "score": "0.5587297", "text": "public function listAll()\n {\n\t\treturn $this->createQuery('w')\n\t\t\t\t\t\t->orderBy('w.id_producto_item')\n\t\t\t\t\t\t->execute();\t\t\t\t \n }", "title": "" }, { "docid": "7230b59cd5416c25c7263f54801e32f2", "score": "0.55866295", "text": "public function getAll()\n {\n //Excrevemos a consulta SQL e atribuimos a váriavel $sql\n $sql = 'SELECT id, nome, imagem, descricao FROM produto ORDER BY nome ASC';\n\n //Executamos a consulta chamando o método da modelo. Atribuimos o resultado a variável $dr\n $dt = $this->pdo->executeQuery($sql);\n\n //Declara uma lista inicialmente nula\n $listaProduto = null;\n\n //Percorremos todas as linhas do resultado da busca\n foreach ($dt as $dr)\n //Atribuimos a última posição do array o produto devidamente tratado\n $listaProduto[] = $this->collection($dr);\n\n //Retornamos a lista de produtos\n return $listaProduto;\n }", "title": "" }, { "docid": "b73da45186ac0acb70be1eab6a263d1a", "score": "0.5582092", "text": "public function all(){\n $sql = \"select * from $this->tableName\";\n $donnees = $this->executeQuery($sql);\n return $donnees;\n }", "title": "" }, { "docid": "c2b1cee0fe11c29ee16acb2da64038b8", "score": "0.55763686", "text": "public function getBreeds() {\n\t\t$this->breeds = $this->dbHandler->getBreed();\n\t}", "title": "" }, { "docid": "910798f5f6db4ef3db30bfc69fdcddc4", "score": "0.55387497", "text": "public function car_list() {\n return $this->db\n ->select('*') /* select anything */\n ->from('car') /* from car */\n ->order_by('name', 'ASC') /* order it by name, ascendant */\n ->get() /* execute the query */\n ->result_array(); /* convert result into an array */\n }", "title": "" }, { "docid": "83512e48f9aa2dd270964226e829bbcd", "score": "0.5520227", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new SellData());\n\t}", "title": "" }, { "docid": "48102dfb15ed0d0eeaba18da855a0da9", "score": "0.55052686", "text": "public function getListings() {\n\t return $this->findBy(array());\n }", "title": "" }, { "docid": "3ee6a4b1ae0c7641dc0309e62454eeb7", "score": "0.549334", "text": "public static function getCarList() {\n $cars = DB::table('cars')->get();\n return $cars;\n }", "title": "" }, { "docid": "24a20a9012e22389074702427edde609", "score": "0.5486465", "text": "function carList(){\n \n global $conn;\n \n $sql = \"SELECT carName,carCompany,carType,carId \n FROM cars\n ORDER BY carName\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $records = $stmt->fetchAll(PDO::FETCH_ASSOC);\n \n return $records;\n }", "title": "" }, { "docid": "e70a8cbeb6a7f77b4b5a87095dbe8114", "score": "0.5474326", "text": "public function getPropertiesList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "af328a5b4d1fce69183ee478bf98f23f", "score": "0.546585", "text": "public function get_voorraad_information(){\t\t\n\t\t$sql = \"SELECT voorraad.aantal, artikel.product, locatie.locatie \n\t\t\t\tFROM ((voorraad \n\t\t\t\tINNER JOIN artikel on voorraad.productcode = artikel.productcode) \n\t\t\t\tINNER JOIN locatie on voorraad.locatiecode = locatie.locatiecode)\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->execute([]);\t\t\n\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "786c599ac63910a8353942517bdfa1e3", "score": "0.54638237", "text": "public function getAll(){\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM genres\n\t\t\tORDER BY genre ASC\n\t\t\";\n\n\t\t$statement = static::$pdo->prepare($sql);\n\t\t$statement->execute();\n\t\t$genreList = $statement->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $genreList;\n\t}", "title": "" }, { "docid": "389e7994ab002352a3f21a2819ee8c7f", "score": "0.54549587", "text": "public function data()\n {\n $advertisement = Advertisement::leftJoin('categoryadvt', 'advertisement.categoryadvt_id', '=', 'categoryadvt.id')\n ->select([\n 'advertisement.id',\n 'advertisement.name',\n 'advertisement.slug',\n 'advertisement.content', \n 'advertisement.created_at',\n 'advertisement.updated_at',\n 'categoryadvt.name as categoryname',\n 'company.name as companyname'\n ])->leftJoin('company','advertisement.company_id','=','company.id');\n\n return $this->createCrudDataTable($advertisement, 'admin.advertisement.destroy', 'admin.advertisement.edit')->make(true);\n }", "title": "" }, { "docid": "fec0119d83517cb9407979d8ec0e17bd", "score": "0.54482806", "text": "public function anyData()\n {\n\n $database = Auth::user()->getDatabase();\n\n $property = new Property;\n $property->changeConnection($database);\n\n $d = Property::on($database)->with('note', 'owner')->select('*');\n\n //$d = Property::on($database)\n // ->leftjoin('owners', 'owners.strIDNumber', '=', 'properties.strIdentity')\n // ->leftjoin('notes', 'notes.strKey', '=', 'properties.strKey')\n // ->select('*')\n // ->get();\n //dd($d);\n\n // dd(Datatables::of($d)->make(true));\n\n //$d->load('owner', 'note');\n\n return Datatables::of($d)->make(true);\n\n }", "title": "" }, { "docid": "20d8c572b819f09784c0944a64c1c8aa", "score": "0.5443304", "text": "public function getPropertiesList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "20d8c572b819f09784c0944a64c1c8aa", "score": "0.5443304", "text": "public function getPropertiesList(){\n return $this->_get(5);\n }", "title": "" }, { "docid": "b1d295bc4df98964c5cd4023667e34fc", "score": "0.5408359", "text": "public function getList() {\n\t\treturn $this->tdbmService->getObjects('diaporama', null, null, null, null, 'coiffuresenegal\\Dao\\Bean\\DiaporamaBean');\n\t}", "title": "" }, { "docid": "64aba25a80ccdea5386b80d2556ae77a", "score": "0.53974396", "text": "public function getAll() {\n\n return Deal::all();\n }", "title": "" }, { "docid": "25c01097567ce2a7047740e1816140f8", "score": "0.53969824", "text": "public function getPropertiesList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "25c01097567ce2a7047740e1816140f8", "score": "0.53969824", "text": "public function getPropertiesList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "25c01097567ce2a7047740e1816140f8", "score": "0.53969824", "text": "public function getPropertiesList(){\n return $this->_get(7);\n }", "title": "" }, { "docid": "930140cf1fda0385dd0403284882f9e6", "score": "0.53892803", "text": "public function listMyRecipe(){\n $prepare = $this->db->prepare('SELECT * FROM recipe WHERE idUser = :idUser');\n $prepare->bindValue(':idUser', $this->idUser, PDO::PARAM_INT);\n $prepare->execute();\n $all = $prepare->fetchAll(PDO::FETCH_OBJ);\n return $all;\n }", "title": "" }, { "docid": "4ec82d77760c727b598be9c8a0b01a82", "score": "0.53645474", "text": "public function getDataList()\n\t{\n\t\t// $data = $cat->getList('', 0, 'id');\n\n\t\t$data = model('website') -> select();\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "da6c481c7a1199b590097ac01ef5b8f5", "score": "0.53636837", "text": "public function getAllDruhy(){\n\t\t\t$stm = self::$pdo->prepare(\"select * from trophy.druh\");\n\t\t\t$stm->execute();\n $rows = $stm->fetchAll(PDO::FETCH_ASSOC);\n \n for($i = 0; $i < count($rows); $i++){\n $druhy[$i] = array('id' => $rows[$i]['druh_id'], 'nazev' => $rows[$i]['nazev_rod']. \" \" . $rows[$i]['nazev_druh']);\n }\n \n return $druhy;\n\t\t}", "title": "" }, { "docid": "960df38fbbb24167a83e7993c00a4a28", "score": "0.53301907", "text": "public function data_for_relationship() {\n $sub_categories = SubCategory::all();\n $brands = Brand::all();\n $sizes = Size::all();\n\n return [\n 'sub_categories' => $sub_categories,\n 'brands' => $brands,\n 'sizes' => $sizes\n ];\n }", "title": "" }, { "docid": "d4a12f91b5d2f11537c1cbf7eec456ec", "score": "0.5329674", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new BuyData());\n\t}", "title": "" }, { "docid": "1a92e3f700be103c1f014665b6288c14", "score": "0.5328797", "text": "protected function getAll() {\n\n // SQL query\n $sql = \"SELECT * FROM products.producttable\";\n\n // Query the database defined in Dbh\n $res = $this->connect()->query($sql);\n\n // If SQL query failed throw error\n if (!$res) {\n die(\"Query returned false\");\n }\n\n // Get number of rows in database\n $numberOfRows = $res->num_rows;\n\n\n // Check if database empty\n if ($numberOfRows > 0) {\n\n\n // Fetch row and add to array\n while ($row = $res->fetch_assoc()) {\n $data[] = $row;\n }\n \n return $data;\n\n } else {\n\n // If number of rows is <=0 return error\n die(\"Empty database\");\n }\n }", "title": "" }, { "docid": "866d319ad2e8aa2177145a85987b52ca", "score": "0.53243136", "text": "public function fetch(): Collection\n {\n return $this->finder->andWhere([$this->foreignKeyName => $this->keyValue])->all();\n }", "title": "" }, { "docid": "6dc7c72b7dc4c2c87129cefe1163dfb1", "score": "0.53237545", "text": "public function listwedding(){\n\t\t$sql=\"Select wedding.*,country.CountryName From wedding inner join country on wedding.CountryID=country.CountryID\";\n\t\t//echo $sql;\n $sts=$this->db->prepare($sql);\n $sts->execute();\n return $sts->fetchAll();\n }", "title": "" }, { "docid": "fdab3450d050f7e7660d9f0e2b448da7", "score": "0.5322137", "text": "public function get_list() {\n\t\t$this->db->from('attribute AS atr');\n\t\t$this->db->order_by('atr.updated');\n\n\t\treturn parent::get_list();\n\t}", "title": "" }, { "docid": "367b0d7beec2a37853f3c0a694256669", "score": "0.5319267", "text": "public static function getProductsAll()\n {\n $pdo = Database::getPDO();\n $sql = \n \n \"SELECT * FROM `products` WHERE `brand_id` = '1' LIMIT 5 \" ;\n\n\n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "title": "" }, { "docid": "83e0bf9723285d992b81ef47c7780449", "score": "0.5312521", "text": "public function getList(){\n return $this->select('pilotId','name', 'username','created_at','country', 'multigpId')->paginate(12);\n }", "title": "" }, { "docid": "d0aabee119d23f7868463aec2b3ac9a2", "score": "0.53019804", "text": "public function getAll()\n {\n $query = $this->db->query(\"SELECT * FROM \".$this->getTable());\n return $query->fetchAll(\\PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "5f55fe3d8f43215cf98b613ff5b3fc6f", "score": "0.52968746", "text": "public function show(Drink $drink)\n {\n return Drink::find($drink->id);\n }", "title": "" }, { "docid": "4029f4ed6bfc820c3c90cc77a6c3f8af", "score": "0.52929175", "text": "public function getBrands(){\r\n $sql = \"SELECT `ID`,`brandName` FROM `Brands`\";\r\n $this->brandList = $this->query($sql,'select');\r\n return ($this->brandList) ? $this->brandList : [];\r\n }", "title": "" }, { "docid": "dc72b87a7091d06ea855c9edfbccbef7", "score": "0.52914125", "text": "public function get_deals_bought()\n\t{\n\t\t$result = $this->db->from(\"cms\")->where(array(\"cms_id\" => 7))->get();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8172fb7a09e5c26c139af65046de9eec", "score": "0.5288487", "text": "public function getdishAll(){\n \n $entity= $this->createQueryBuilder('r')\n ->join('r.idRecipe', 'e')\n ->join('r.idIngredient', 'i')\n ->orderBy('r.id', 'ASC')\n ->getQuery()\n ->getResult();\n\n return $entity;\n \n }", "title": "" }, { "docid": "ba9f16715650b7d625546210aa53dcf5", "score": "0.52799666", "text": "public function getAll()\n\t{\n\t\treturn $this->product->orderBy('order', 'DESC')->paginate(10);\n\t}", "title": "" }, { "docid": "f30a6f4d5ff501364784633876ccc8e7", "score": "0.52778506", "text": "public function get($appliance) {\n\n // brands\n return $this->getSqlColumn($this->cn, self::SQL_BRANDS, [':appliance'=>$appliance]);\n\n // convert json object to a json string\n //return json_encode($brands, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);\n }", "title": "" }, { "docid": "0637bbdb985d8615e609e88435ff9299", "score": "0.5273244", "text": "public function Makes(){\n $sql = \"select * from car_makes\";\n $data = $this->executeQuery($sql);\n return $data;\n }", "title": "" }, { "docid": "ec75d64b6d1c35cafa7ccff2a5a332e7", "score": "0.52698106", "text": "public function getAlls()\n {\n $details_info = ORM::for_table('details_info')\n ->where('active', 1)\n ->order_by_asc('sortOrder')\n ->order_by_asc('id')\n ->find_array();\n return $details_info;\n }", "title": "" }, { "docid": "f5b4d107dd7d44a56093fb87f855f2ce", "score": "0.5260577", "text": "public function getDrink($drink_id){\r\n\t\t$this->db->query(\"SELECT * FROM drink\r\n\t\t\tWHERE id = :id;\r\n\t\t\t\");\r\n\r\n\t\t//:drink_id is a placeholder, therefore\r\n\t\t//We have to bind it\r\n\t\t$this->db->bind(':id', $drink_id);\r\n\r\n\t\t\t//Assign Row\r\n\t\t$row = $this->db->single();\r\n\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "2253c24e5dc7553c608ed8b06fd53e02", "score": "0.525694", "text": "function listData(){\r\r\n return $this->obj->fetch(PDO::FETCH_ASSOC);\r\r\n }", "title": "" }, { "docid": "268586e95e56eacecf231138c9211336", "score": "0.52436703", "text": "function GetAllResto()\n {\n $query = \"SELECT ID, Name, Address, OpeningTime, Closingtime, Stars, Seats, Price, FoodType ,image From Restaraunt\";\n $stmt = $this->connection->prepare($query);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $results=$stmt->fetchAll();\n return $results;\n\n }", "title": "" }, { "docid": "2f1af69df1514a4bdfcfd8f8393608f1", "score": "0.524208", "text": "public function getCdList()\n {\n $res = array();\n $stmt = $this->db->prepare(\n \"SELECT id, title, artist, genre, creationYear \"\n . \"FROM cd\");\n $stmt->execute();\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $res[] = new Cd($row['id'], $row['title'],\n $row['artist'], $row['genre'],\n $row['creationYear']);\n }\n return $res;\n }", "title": "" }, { "docid": "1805ab297a70f050b6ca6424cddad766", "score": "0.5239675", "text": "public static function getAll(){\n\t\t$foodstands = DB::table('foodstands')->get();\n\n\t\t//Get the images\n\t\t$foodstands = images::getAllImages($foodstands);\n\n\t\treturn $foodstands;\n\t}", "title": "" }, { "docid": "ebb9296583546344d771c2427bf0033d", "score": "0.5230273", "text": "public function getAvailableProperties() {\n\t\t\t$this->db->query(\"CALL spGetAvailableProperties()\");\n\t\t\t$results = $this->db->resultSet();\n\n\t\t\treturn $results;\n\t\t}", "title": "" }, { "docid": "d8f94b7d4e7edbcbd828e4cd0eac295e", "score": "0.52276546", "text": "public function listing()\n {\n $biddings = \\models\\Bidding::findBy(null);\n\n // se crea un array donde cada campo sera un par subastas, producto),\n // recuperando para ello los datos del producto en cada una de las\n // subastas obtenidas en la instruccion anterior\n $list = array();\n foreach ($biddings as $bidding) {\n $product = new \\models\\Product($bidding->getProductId());\n if (!$product->fill()) break;\n\n $list[ ] = [\n \"bidding\" => $bidding,\n \"product\" => $product\n ];\n }\n\n // se devuelve el array de pares creado\n $this->view->assign(\"list\", $list);\n $this->view->render(\"bidding_list\");\n }", "title": "" }, { "docid": "8f083550049ac3b1edf68315b88be334", "score": "0.5222915", "text": "public function properties()\n {\n return $this->hasMany(Property::class);\n }", "title": "" }, { "docid": "0ebfb56a21cf3900c7d2dcf241be8825", "score": "0.5220583", "text": "public function returnAdverts()\n {\n $sqlQuery = $this->db->prepare(\"SELECT * FROM Adverts\");\n $sqlQuery->execute();\n $results = $sqlQuery->fetchAll(PDO::FETCH_OBJ);\n return $results;\n }", "title": "" }, { "docid": "80b507696059e2de534d3c560edb67d9", "score": "0.5219894", "text": "public function get_list(){\n\t\t\t\t\n // Open db instance\n $db = new DB();\n\t\t\n\t\t$conn = $db->connect_db();\n $result = pg_query($conn, \"select * from category where 1\"); // should return only a given number of parameters not all\n\t if (!$result) {\n\t\terror_log( \"An error occurred while retrieving category list.\\n\");\n\t\texit;\n\t }\n\t\treturn pg_fetch_all($result);\n\t}", "title": "" }, { "docid": "9d21b5b99fe863c8df6d8bdc86505660", "score": "0.5218296", "text": "public function listyoga(){\n\t\t$sql=\"Select yoga.*,country.CountryName From yoga inner join country on yoga.CountryID=country.CountryID\";\n\t\t//echo $sql;\n $sts=$this->db->prepare($sql);\n $sts->execute();\n return $sts->fetchAll();\n }", "title": "" }, { "docid": "7d4881ef7f7dbec054305afb4f43f354", "score": "0.52140737", "text": "public function index()\n {\n return BreedResource::collection(Breed::all());\n }", "title": "" }, { "docid": "81e7ab18412bd127d8a5d366d35124a5", "score": "0.52127826", "text": "public function all()\n {\n return $this->dataService->driver()->get()->{$this->table};\n }", "title": "" }, { "docid": "cb95765cca3faa3a12c503d964861d24", "score": "0.52126724", "text": "public function getVehicles()\n {\n $query = \"SELECT `id`, `name` FROM `vehicle`\";\n return $this->pdo->query($query)->fetchAll();\n }", "title": "" }, { "docid": "61b526c4cc95a0e2a1ee2e1b021d8b65", "score": "0.52045596", "text": "public function getList(){\n $listAccounts = [];\n\n $q = $this->_db->query('SELECT id, name, sold FROM accounts');\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC)){\n $listAccounts[] = new Account([\"id\" => $donnees['id'],\"name\" => $donnees['name'],\"sold\" => $donnees['sold']]);\n }\n return $listAccounts;\n }", "title": "" }, { "docid": "93f70aaf5afd8d48de7918dc70f48a23", "score": "0.5196877", "text": "public function findAll()\n {\n $ask = $this->db->createQueryBuilder();\n\n $ask->select('DISTINCT b.brand as FIRMA', 'b.id')\n ->from('parts', 'p')\n ->innerJoin('p','brands','b','p.FIRMA = b.id');\n return $ask->execute()->fetchAll();\n }", "title": "" }, { "docid": "5476224a8abac0a2e005142efc88ce5f", "score": "0.5187655", "text": "public function getDiaporamaList() {\n\t\treturn $this->getList();\n\t}", "title": "" }, { "docid": "5152bbb2dc7a99da7eeddfb7c669fb49", "score": "0.51875895", "text": "public function fetchAll() {\n // gather all of the entries in the database\n // and push their values into an array\n $resultSet = $this->selectAll()->query()->fetchAll();\n $entries = array();\n foreach ($resultSet as $row) {\n $entry = new Atlas_Model_ProductExtraInfo();\n $entry->setOptions($row);\n\n $entries[] = $entry;\n }\n\n // return the results\n return $entries;\n }", "title": "" }, { "docid": "0118da27c8eb5a7093e511dd6272d060", "score": "0.518576", "text": "public function getData()\n {\n $db = DB::getInstance();\n return $db->query('SELECT * FROM products limit 10');\n }", "title": "" }, { "docid": "328f8f128cfaeaded952a175fb6c3326", "score": "0.5181053", "text": "public function getArmies()\n {\n $query = \"SELECT `id`, `name` FROM `army`\";\n return $this->pdo->query($query)->fetchAll();\n }", "title": "" }, { "docid": "747742eddca01286cafd812159ced749", "score": "0.51799625", "text": "public function fetchAll()\n {\n return $this->data;\n }", "title": "" }, { "docid": "ba512e33e1c4a388815dfd3f3c6679b9", "score": "0.51784563", "text": "public function Listar(){\n\t\ttry{\n\t\t\t$result = array();\n\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM dollar\");\n\t\t\t$stm->execute();\n\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "88c5a18a39c97b3e66addd8c70229f23", "score": "0.51760226", "text": "public function list()\n {\n $all_recipes = $this->getDoctrine()\n ->getRepository(Recipe::class)\n ->findAllRecipeHaveIngredients();\n\n /** get data Ingredients sort by ingredient.use_by desc*/\n $data_recipes = $this->getDoctrine()\n ->getRepository(Recipe::class)\n ->RecipesSortByBestUse($all_recipes);\n\n \n \n return $this->json(['lunch'=>$data_recipes]); \n }", "title": "" }, { "docid": "988150e2f78eaad1eae285802f67a776", "score": "0.51744455", "text": "public function getAll($clientID)\n {\n $lists = $this->model->where('id_cli', $clientID)->lists('id_prop');\n\n if (!$lists->count()) {\n return [];\n }\n\n $propiedades = $this->propiedad->listsByFavorite($lists);\n\n return $propiedades;\n }", "title": "" }, { "docid": "d4f4b14b538825bd10e4750319948416", "score": "0.51718575", "text": "public static function getProductsAll1()\n {\n $pdo = Database::getPDO();\n $sql = \n \n \"SELECT * FROM `products` WHERE `brand_id` = '5' \" ;\n\n\n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "title": "" }, { "docid": "1af44dec891199d564883b6394e47fd4", "score": "0.5170417", "text": "public static function GetGoals(){\n $dbh = DataBase::getDbh();\n $arr = null;\n try {\n\t\t\t$selSth = $dbh->prepare(self::SQL_SEL_GOALS);\t\t\n\t\t\t$selSth->execute();\n\t\t\t$arr = $selSth->fetchAll(PDO::FETCH_CLASS); \n\t\t} catch (PDOException $e) {\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"<br/>\";\n\t\t\tdie();\n\t\t}\n \n return $arr;\n\n }", "title": "" }, { "docid": "a75946118855ec888b00a7d1814b7f26", "score": "0.5164957", "text": "function listdata(){\n\t\t$this->getdata(TBL_BANNER,\"Id asc\");\n\t\t$row = $this->num_rows();\n\t\treturn $this->fetchall();\n\t}", "title": "" }, { "docid": "a2db1a520a9bc0e8489a8276ede9b683", "score": "0.51642483", "text": "public function getDitsobotlaPropertyListImagesForSale(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '199'\n\t\t\t\t\t\t AND properties.property_status = 'For Sale'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d042805b9c1dc4a24aa8533b8fc257e1", "score": "0.5162898", "text": "public function listhotelcat(){ \n $sts=$this->db->prepare(\"SELECT * FROM `category`\");\n $sts->execute();\n\t\t$data=$sts->fetchAll(PDO::FETCH_ASSOC);\n return $data;\n print_r($data);\n }", "title": "" }, { "docid": "845a86ef9f66068c6da87b8255ade9ae", "score": "0.5160311", "text": "public function getDirectors()\n {\n return $this->hasMany(Director::className(), ['Id_workshop' => 'Id_workshop']);\n }", "title": "" }, { "docid": "8d7e420b98a66fef0b0179325d7acf60", "score": "0.5157411", "text": "public function getLesediPropertyListImagesOnShow(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT properties.property_id, property_type, property_desc, price, num_bathrooms, street_no, \n\t\t\t\t street_name, num_beds, num_garages, property_image_id, image_location, suburbs.suburb_id, \n\t\t\t\t\t\t suburb_name, cities.city_id, city_name, municipalities.municipality_id, municipalities.municipality_name,\n\t\t\t\t\t\t agents.agent_id, firstname, lastname, email, phone, agencies.agency_id, agency_name, logo \n\t\t\t\t\t\t FROM property_images \n\t\t\t\t\t\t LEFT JOIN properties\n\t\t\t\t\t\t ON property_images.property_id = properties.property_id\n\t\t\t\t\t\t LEFT JOIN suburbs\n\t\t\t\t\t\t ON properties.suburb_id = suburbs.suburb_id\n\t\t\t\t\t\t LEFT JOIN cities\n\t\t\t\t\t\t ON suburbs.city_id = cities.city_id\n\t\t\t\t\t\t LEFT JOIN municipalities\n\t\t\t\t\t\t ON cities.municipality_id = municipalities.municipality_id\n\t\t\t\t\t\t LEFT JOIN agents\n\t\t\t\t\t\t ON properties.agent_id = agents.agent_id\n\t\t\t\t\t\t LEFT JOIN agencies\n\t\t\t\t\t\t ON agents.agency_id = agencies.agency_id\n\t\t\t\t\t\t WHERE municipalities.municipality_id = '6'\n\t\t\t\t\t\t AND properties.property_status = 'On Show'\n\t\t\t\t\t\t GROUP BY properties.property_id\n\t\t\t\t\t\t DESC\n\t\t\t\t\t\t LIMIT 3\n\t\t\t\t\t\t \";\n\t\t\t\t$result = $this->conn->query($query);\n\n\t\t\t $properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$agency = new Agency();\n\t\t\t\t\t$agency->setAgencyID($row['agency_id']);\n\t\t\t\t\t$agency->setAgencyName($row['agency_name']);\n\t\t\t\t\t$agency->setLogo($row['logo']);\n\t\t\t\t\t\n\t\t\t\t\t$agent = new Agent();\n\t\t\t\t\t$agent->setAgentID($row['agent_id']);\n\t\t\t\t\t$agent->setFirstname($row['firstname']);\n\t\t\t\t\t$agent->setLastname($row['lastname']);\n\t\t\t\t\t$agent->setEmail($row['email']);\n\t\t\t\t\t$agent->setPhone($row['phone']);\n\t\t\t\t\t$agent->setAgency($agency);\n\t\t\t\t\t\n\t\t\t\t\t$munucipality = new Municipality();\n\t\t\t\t\t$munucipality->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$munucipality->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t\n\t\t\t\t\t$city = new City();\n\t\t\t\t\t$city->setCityID($row['city_id']);\n\t\t\t\t\t$city->setCityName($row['city_name']);\n\t\t\t\t\t$city->setMunicipality($munucipality);\n\t\t\t\t\t\n\t\t\t\t\t$suburb = new Suburb();\n\t\t\t\t\t$suburb->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$suburb->setSuburbName($row['suburb_name']);\n\t\t\t\t\t$suburb->setCity($city);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$property = new Property();\t\t\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\t\t\t\n\t\t\t\t\t$property->setSuburb($suburb);\t\n\t\t\t\t\t$property->setAgent($agent);\n\t\t\t\t\t$property->setNumBathRoom($row['num_bathrooms']);\n\t\t\t\t\t$property->setNumBed($row['num_beds']);\n\t\t\t\t\t$property->setNumGarage($row['num_garages']);\t\n\t\t\t\t\t$property->setStreetNo($row['street_no']);\t\n\t\t\t\t\t$property->setStreetName($row['street_name']);\t\n\t\t\t\t\t$property->setPropertyDescription($row['property_desc']);\t\n\t\t\t\t\t$property->setPropertyType($row['property_type']);\t\t\n\t\t\t\t\t$property->setPrice($row['price']);\t\n\t\t\t\t\t$property->setImageLocation($row['image_location']);\n\t\t\t\t\t$property->setSuburbID($row['suburb_id']);\n\t\t\t\t\t$property->setMunicipalityID($row['municipality_id']);\n\t\t\t\t\t$property->setMunicipalityName($row['municipality_name']);\n\t\t\t\t\t$property->setCityID($row['city_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b02410a60964a2d595dd9eef8ad6da5b", "score": "0.515483", "text": "public function list()\n {\n return Supplier::select(['name as label', 'id as value'])->get();\n }", "title": "" }, { "docid": "3a831c42f6d7add9946ee352aefb5775", "score": "0.51541513", "text": "function GatherData() {\r\n\t\t$db = Database::getInstance ();\r\n\t\t$sql = $db->getConnection ();\r\n\t\t\r\n\t\t$query = \"SELECT m.matchid as matchID, w.tekst as wish, t.talenttekst as talent FROM `match` as m \r\n\t\t\t\t\tJOIN `wens` as w ON m.wensenid = w.wensenid\r\n\t\t\t\t\tJOIN `talent` as t ON m.talentid = t.talentid\r\n\t\t\t\t\tWHERE m.status = 1\";\r\n\t\t$result = $sql->query ( $query );\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "e90edbed8d21be8d18a73534de7be8d5", "score": "0.51519406", "text": "public static function getAll(){\n\t\t\ttry {\n\t\t\t\t$connect = Database::connect();\n\t\t\t\t$query= 'SELECT * FROM vehicles WHERE deleted_at IS NULL';\n\t\t\t\t$statement = $connect->prepare($query);\n\t\t\t\t$statement->execute();\n\t\t\t\treturn $statement->fetchAll(PDO::FETCH_OBJ);\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\techo $e;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f38cf6ffa4d3f3ac886f99b40f2fc328", "score": "0.5150296", "text": "function getAll(){\r\n\r\n //2. Enviamos la consulta y nos devuelve el resultado (prepare y execute)\r\n $query = $this->db->prepare('SELECT * FROM producto');\r\n $query->execute();\r\n \r\n //3. Obtengo la rta con un FetchAll en este caso (por ser varias categorias)\r\n $products = $query->fetchAll(PDO::FETCH_OBJ); //Arreglo de categorias\r\n\r\n return $products;\r\n }", "title": "" }, { "docid": "41e33e4ee9ecc08a9c68af84a437b940", "score": "0.51501197", "text": "public static function get()\n {\n // ->pluck('product_name', 'id');\n $data = static::orderBy('distributor_name', 'asc')->get();\n return $data;\n }", "title": "" }, { "docid": "0c39fe2493e928a56b04191ccea3b430", "score": "0.514964", "text": "function getAll(): array {\n return $this->db->getModelArray(Genre::class, 'select * from genre');\n }", "title": "" }, { "docid": "c25bdc9bdd1535b33ddd109378e46761", "score": "0.51468444", "text": "public function getAll()\r\r\n {\r\r\n $data = $this->select()\r\r\n ->from($this->_name);\r\r\n return $this->fetchAll($data);\r\r\n }", "title": "" }, { "docid": "adfc7ef5251d0118b977c24f8b07aa20", "score": "0.5144427", "text": "public function getProperties()\n {\n $function = new \\ReflectionClass($this);\n $className = $function->getShortName();\n $list = Property::where('model', '=', $className)->orderBy('sort')->get();\n\n return $list;\n }", "title": "" }, { "docid": "6750a6c3e5ab9bedc09af72a74ea98f9", "score": "0.5142203", "text": "public function listar(){\n $sql = \"SELECT a.idarticulo, a.idcategoria, c.nombre as categoria, a.codigo, \n a.nombre, a.stock, a.descripcion, a.imagen, a.condicion \n FROM articulo a \n INNER JOIN categoria c on a.idcategoria = c.idcategoria\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "d677074ffe0eaa0700b6e28e58bbc664", "score": "0.51406837", "text": "public function fetchAll()\n {\n return $this->_repository->findAll();\n }", "title": "" }, { "docid": "d3250c82e682de23ccd1543555e8a055", "score": "0.5140623", "text": "public function getPropertyIDs(){\n\t\t\ttry{\n\t\t\t\t$query = \"SELECT property_id FROM properties\n\t\t\t\t\t\t ORDER BY property_id\n\t\t\t\t\t\t DESC LIMIT 1\";\n\t \n\t\t\t\t$result = $this->conn->query( $query );\n\t\t\t \t$properties = array();\n\t\t\t\t\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$property = new Property();\n\t\t\t\t\t$property->setPropertyID($row['property_id']);\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\treturn $properties;\n\t\t\t\t\n\t\t\t}catch(PDOException $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "504165e007c98b53581063673ea97bab", "score": "0.5140547", "text": "public function getAll()\r\n {\r\n $data = $this->select()\r\n ->from($this->_name);\r\n return $this->fetchAll($data);\r\n }", "title": "" }, { "docid": "3a809051cae46179ae7985d9053784d8", "score": "0.5137128", "text": "public function index()\n {\n $properties = Property::paginate(12);\n\n return PropertyResource::collection($properties);\n }", "title": "" }, { "docid": "af04cf73af3f3d780c0336521d41a68a", "score": "0.51357156", "text": "public function getAllBreeds(){\n $breeds = Breed::all();\n if(!$breeds){\n //return parent::notFound($request, $response, NULL);\n }\n return $breeds;\n }", "title": "" }, { "docid": "f7e82248db8dae6694af6fea3a5a32bc", "score": "0.5131436", "text": "static function getAll(){\n\n return self::connection()\n ->query('select * from books')\n ->fetchAll();\n\n\n }", "title": "" } ]
cedf84ee5fae3c5d5578fd8ed3302e4d
Creates the login and registration modals, and links to the scripts that provide their functionality. Only called if the user is not logged in.
[ { "docid": "35377767db75c3487fb08dd9ede716fe", "score": "0.66610825", "text": "function generateModals() {\n echo \"\n <!--Login Modal-->\n <div class='modal fade' id='login-modal' tabindex='-1' role='dialog' aria-labelledby='loginHeading' aria-hidden='true'>\n <div class='modal-dialog'>\n <div class='modal-content'>\n <div class='modal-header'>\n <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button>\n <h4 id='loginHeading' class='modal-title'>Login</h4>\n </div>\n <div class='modal-body'>\n <form id='login-form' role='form' method='post' action='scripts/login.php'>\n <div class='form-group'>\n <label for='login-email'>Email or Username:</label>\n <input type='email' id='login-email' name='email' class='form-control'>\n </div>\n <div class='form-group'>\n <label for='login-password'>Password:</label>\n <input type='password' id='login-password' name='password' class='form-control'>\n </div>\n <div class='checkbox'>\n <label><input type='checkbox'> Remember me</label>\n </div>\n </form>\n <p><a href='scripts/login&registration/login_facebook.php'><img src='images/loginfacebook.png' alt='Facebook login button.'></a></p>\n </div>\n <div class='modal-footer'>\n <button type='button' class='btn btn-primary' onclick='validateLogin()'>Login</button>\n <button type='button' class='btn btn-default' data-dismiss='modal'>Cancel</button>\n </div>\n </div>\n </div>\n </div>\n \n <!--Registration Modal-->\n <div class='modal fade' id='registration-modal' tabindex='-1' role='dialog' aria-labelledby='registrationHeading' aria-hidden='true'>\n <div class='modal-dialog'>\n <div class='modal-content'>\n <div class='modal-header'>\n <button type='button' class='close' data-dismiss='modal' aria-label='Close'><span aria-hidden='true'>&times;</span></button>\n <h4 id='registrationHeading' class='modal-title'>Register</h4>\n </div>\n <div class='modal-body'>\n <form id='registration-form' role='form' method='post'>\n <div class='form-group'>\n <label for='username'>Username:</label>\n <input type='text' id='username' name='username' class='form-control' maxlength='20'>\n </div>\n <div class='form-group'>\n <label for='registration-email'>Email:</label>\n <input type='email' id='registration-email' name='email' class='form-control' maxlength='254'>\n </div>\n <div class='form-group'>\n <label for='registration-password'>Password:</label>\n <input type='password' id='registration-password' name='password' class='form-control' maxlength='255'>\n </div>\n <div class='form-group'>\n <label for='confirm-password'>Confirm Password:</label>\n <input type='password' id='confirm-password' name='confirm-password' class='form-control' maxlength='255'>\n </div>\n <div class='checkbox'>\n <label><input type='checkbox' id='tos-checkbox'> I accept the <a href='#'>terms of service</a>.</label>\n </div>\n <div id='recaptcha1'></div>\n </form>\n </div>\n <div class='modal-footer'>\n <button type='button' class='btn btn-primary' onclick='validateRegistration();'>Register</button>\n <button type='button' class='btn btn-default' data-dismiss='modal'>Cancel</button>\n </div>\n </div>\n </div>\n </div>\n \n <!-- Render captcha. -->\n <script>\n var recaptcha1;\n var multipleCaptcha = function() {\n //Render the recaptcha1 on the element with ID recaptcha1'\n recaptcha1 = grecaptcha.render('recaptcha1', {\n 'sitekey' : '6LfzwQYTAAAAAGRb0kllCxB2qV3Jh-qPRcsU806x', \n 'theme' : 'light'\n });\n };\n </script>\n \n <!-- Contains some functions related to the creation and removal of error messages. Used by both the login- and registration validation scripts. -->\n <script src='scripts/error_functions.js'></script>\n \n <!-- Contains code to validate data sent with the login form. Passes the data on to the server if the validation is passed. -->\n <script src='scripts/login&registration/login_validation.js'></script>\n \n <!-- Contains code to validate data sent with the registration form. Passes the data on to the server if the validation is passed. -->\n <script src='scripts/login&registration/registration_validation.js'></script>\n \";\n}", "title": "" } ]
[ { "docid": "8e4c4995b0b6adb9d720a25ab9700f84", "score": "0.6627192", "text": "function kulam_modal_login() {\n\n\t// vars\n\t$login_registration_pages = get_field( 'acf-oprion_login_registration_pages', 'option' );\n\n\t?>\n\n\t<div class=\"modal fade\" id=\"modal-login\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\n\n\t\t<div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n\t\t\t<div class=\"modal-content\">\n\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<h5 class=\"modal-title\"><?php _e( 'Login', 'kulam-scoop' ); ?></h5>\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"></button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"pre-text\"><?php _e( 'In order to save / upload posts or view saved content, you must register / log-in to your account', 'kulam-scoop' ); ?></div>\n\n\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t<button>\n\t\t\t\t\t\t<a href=\"<?php echo $login_registration_pages[ 'login_page' ]; ?>\">\n\t\t\t\t\t\t\t<?php _e( 'Login', 'kulam-scoop' ); ?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t</div>\n\n\t</div><!-- #modal-login -->\n\n\t<?php\n\n}", "title": "" }, { "docid": "9c5c570a1ad9063e8d1e5f6e58826080", "score": "0.65780216", "text": "public function showLogin(){\n require_once($this->tmpl['Login']);\n }", "title": "" }, { "docid": "791b4cba9e83c9b75a382c51221fba62", "score": "0.62445414", "text": "public function loginwidget(){\n\t\t\tinclude 'login.php';\n\t\t}", "title": "" }, { "docid": "52f2082c9c18cd3c7c1845636075b511", "score": "0.62009186", "text": "public function displayLogin() {\n\t\t\trequire_once('app/views/user/login-view.php');\n\t\t}", "title": "" }, { "docid": "4c7782982d1f4f845d46c03e44bab756", "score": "0.6173791", "text": "public static function showLoginPage()\n {\n include(__APPFOLDER__.'/templates/login.php');\n }", "title": "" }, { "docid": "c2fe3fa51b61c1dac8c76f1d91c015c7", "score": "0.61386156", "text": "function show_new_user_form()\n{\n $backgroundColor = getBackgroundColor();\n\n $isLoggedIn = is_logged_in_from_session();\n $username = username_from_session();\n $isAdmin = is_user_admin($username);\n $profilePicture = get_image($username);\n\n $indexLinkClass = \"button\";\n $aboutLinkClass = \"button\";\n $shopLinkClass = \"button\";\n $contactLinkClass = \"button\";\n $sitemapLinkClass = \"button\";\n $settingLinkClass = \"button\";\n\n require_once __DIR__ . '/../templates/newUserForm.php';\n}", "title": "" }, { "docid": "deb004a9f5dfeefdf71d695099a5378d", "score": "0.6131698", "text": "public function viewSignIn()\n {\n require_once(VIEWS_PATH.\"header.php\");\n require_once(VIEWS_PATH.\"nav.php\");\n require(VIEWS_PATH.\"signIn.php\");\n require_once(VIEWS_PATH.\"footer.php\");\n }", "title": "" }, { "docid": "0ec0d0b93ad321cdf594cc8f656a270b", "score": "0.6071207", "text": "public function login(){\n\n\t\t$this->view([\"header\",\"account/login\",\"footer\"]);\n\t}", "title": "" }, { "docid": "dc73a5e4d7a937d843c8c3a4b9a3c117", "score": "0.60394007", "text": "public function bs_login()\n {\n if(!$this->_AUTH_USER_IS_ACTIVE)\n {\n //show the login template form\n $header['title'] = 'Account Login';\n $activeUser['is_active'] = $this->_AUTH_USER_IS_ACTIVE;\n\n echo view('includes/main/header', $header);\n echo view('main/bs_auth/auth_login', $activeUser);\n echo view('includes/main/footer');\n }\n }", "title": "" }, { "docid": "3c094be3d7268c37f5285ad3f841c6d4", "score": "0.5975695", "text": "public function displayPage()\n {\n\n // -------- Display login form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=login'))\n {\n if ($GLOBALS['config']['OPEN_RESPAWN']) { header('Location: ?'); exit; } // No need to login for open Respawn\n $token=''; if ($this->ban_canLogin()) $token=$this->getToken(); // Do not waste token generation if not useful.\n \n $this->assign('token',$token);\n $this->assign('do','login');\n $this->renderPage('loginform');\n echo $this->footer();\n exit();\n }\n // -------- User wants to logout.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=logout'))\n {\n $this->logout();\n header('Location: '.$GLOBALS['ROOT']);\n exit();\n }\n\n // -------- Handle other actions allowed for non-logged in users:\n if (!$this->isLoggedIn() )\n {\n\n $token=''; if ($this->ban_canLogin()) $token = $this->getToken(); // Do not waste token generation if not useful.\n\n // User tries to post new link but is not loggedin:\n // Show login screen, then redirect to ?post=...\n if (isset($_GET['q']))\n {\n $_GET['do'] = 'login';\n $this->assign('q',$_GET['q']);\n (!empty($_GET['source'])? $this->assign('source',$_GET['source']):'');\n }\n $this->assign('token',$token);\n $this->assign('do','login');\n $this->renderPage('loginform');\n echo $this->footer();\n exit();\n } else {\n\n // -------- All other functions are reserved for the registered user:\n\n // -------- Display the Tools menu if requested (import/export/bookmarklet...)\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=tools'))\n {\n $this->renderPage('tools');\n }\n\n // -------- User wants to change his/her password.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=changepasswd'))\n {\n if ($GLOBALS['config']['OPEN_RESPAWN']) {\n echo '<script language=\"JavaScript\">alert(\"You are not supposed to change a password on an Open Respawn.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n if (!empty($_GET['setpassword']) && !empty($_GET['oldpassword']))\n {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.'); // Go away !\n\n // Make sure old password is correct.\n $oldhash = sha1($_GET['oldpassword'].$GLOBALS['login'].$GLOBALS['salt']);\n if ($oldhash!=$GLOBALS['hash']) { echo '<script language=\"JavaScript\">alert(\"The old password is not correct.\");document.location=\\'?do=changepasswd\\';</script>'; exit; }\n // Save new password\n $GLOBALS['salt'] = sha1(uniqid('',true).'_'.mt_rand()); // Salt renders rainbow-tables attacks useless.\n $GLOBALS['hash'] = sha1($_GET['setpassword'].$GLOBALS['login'].$GLOBALS['salt']);\n $this->writeConfig();\n echo '<script language=\"JavaScript\">alert(\"Your password has been changed.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n else // show the change password form.\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('changepassword');\n }\n }\n\n // -------- User wants to change configuration\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=configure'))\n {\n if (!empty($_GET['rec']) )\n {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.'); // Go away !\n $GLOBALS['disablesessionprotection']=!empty($_GET['disablesessionprotection']);\n $this->writeConfig();\n echo '<script language=\"JavaScript\">alert(\"Configuration was saved.\");document.location=\\'?do=addlink\\';</script>';\n exit;\n }\n else // Show the configuration form.\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('configure');\n }\n }\n\n // -------- User wants to add a link without using the bookmarklet: show form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && $this->startswith($_SERVER[\"QUERY_STRING\"],'do=addlink') && $this->isLoggedIn())\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('addlink');\n }\n\n // -------- User wants to add a link without using the bookmarklet: show form.\n if (isset($_SERVER[\"QUERY_STRING\"]) && empty($_SERVER[\"QUERY_STRING\"]) )\n {\n $this->assign('token',$this->getToken());\n $this->renderPage('addlink');\n }\n\n // -------- User clicked the \"Delete\" button \n if (isset($_GET['suppr']) and $torem = $_GET['suppr'] and $torem != '' and $_GET['suppr'] != 'config') {\n if (!$this->tokenOk($_GET['token'])) die('Wrong token.');\n // We do not need to ask for confirmation:\n // - confirmation is handled by javascript\n // - we are protected from XSRF by the token.\n //////\n \n $torem = str_replace('data','',htmlspecialchars($_GET['suppr']));\n\n $this->deleteDir($torem);\n\n header('Location:'.$GLOBALS['ROOT']);\n exit();\n }\n }\n }", "title": "" }, { "docid": "0f7a2ce961c76e734cc5972d9586eddc", "score": "0.59669185", "text": "function tmpl_add_login_reg_popup(){ ?>\r\n\t<!-- Login form -->\r\n\t<div id=\"tmpl_reg_login_container\" class=\"reveal-modal tmpl_login_frm_data\" data-reveal>\r\n\t\t<a href=\"javascript:;\" class=\"modal_close\"></a>\r\n\t\t<div id=\"tmpl_login_frm\" > \r\n\t\t\t<?php echo do_shortcode('[tevolution_login form_name=\"popup_login\"]'); ?>\r\n\t\t</div>\r\n\t\t\r\n\t\t<?php if ( get_option('users_can_register') ) { ?>\r\n\t\t<!-- Registration form -->\r\n\t\t<div id=\"tmpl_sign_up\" style=\"display:none;\"> \r\n\t\t\t<?php echo do_shortcode('[tevolution_register form_name=\"popup_register\"]'); ?>\r\n <?php include(TT_REGISTRATION_FOLDER_PATH . 'registration_validation.php');?>\r\n\t\t\t<p><?php _e('Already have an account? ','templatic'); ?><a href=\"javascript:void(0)\" class=\"widgets-link\" id=\"tmpl-back-login\"><?php _e('Sign in','templatic');?></a></p>\r\n\t\t</div>\r\n\t\t<?php } ?>\r\n\t\t\r\n\t</div>\r\n<?php\r\n}", "title": "" }, { "docid": "3a76d8c3ad7f11ea80a31897b92044c6", "score": "0.59658885", "text": "public function showLoginPage()\n\t{\n\t\t$this->layout->content = View::make('user.user_login');\n\t}", "title": "" }, { "docid": "ab382e44708777dccec012f57761a909", "score": "0.5965884", "text": "public function income_cost_management_create_login_page(){\n $root_url = $this->income_cost_management_root_url();\n\n $data['root_url'] = $root_url;\n\n $this->income_cost_management_include_file(__INCOMECOST_MANAGEMENT_ROOT_VIEWS__.'/login/header.php', $data);\n $this->income_cost_management_include_file(__INCOMECOST_MANAGEMENT_ROOT_VIEWS__.'/login/content.php', $data);\n $this->income_cost_management_include_file(__INCOMECOST_MANAGEMENT_ROOT_VIEWS__.'/login/footer.php', $data);\n }", "title": "" }, { "docid": "dd7378774d037ebcbdc50a67aee921ef", "score": "0.5959868", "text": "function login()\n\t{\n\t\tif ($this->tank_auth->is_logged_in()) {\t\t\t\t\t\t\t\t\t// logged in\n\t\t\tredirect('dashboard');\n\n\t\t} elseif ($this->tank_auth->is_logged_in(FALSE)) {\t\t\t\t\t\t// logged in, not activated\n\t\t\tredirect('/auth/send_again/');\n\n\t\t} else {\n\t\t\t\n\t\t\t\n\t\t\t$fb = $this->fb_init();\n\n\t\t\t$helper = $fb->getRedirectLoginHelper();\n \n\t\t\t$permissions = ['public_profile','email']; // Optional permissions\n\t\t\t$data['loginUrl'] = $helper->getLoginUrl(site_url().'auth/doFbLogin', $permissions);\n \n\t\t\t$this->template\n\t\t\t->title('Login') //$article->title\n\t\t\t->prepend_metadata('<script src=\"/js/jquery.js\"></script>')\n\t\t\t->append_metadata('<script src=\"/js/jquery.flot.js\"></script>')\n\t\t\t// application/views/some_folder/header\n\t\t\t//->set_partial('header', 'includes/widgets') //third param optional $data\n\t\t\t// application/views/some_folder/header\n\t\t\t//->inject_partial('header', '<h1>Hello World!</h1>') //third param optional $data\n\t\t\t->set_layout('empty') // application/views/layouts/two_col.php\n\t\t\t->build('login_form', $data); // views/welcome_message\n\t\t}\n\t}", "title": "" }, { "docid": "44fb1973347107664e640a6226911b2e", "score": "0.59505564", "text": "function loginForm() {}", "title": "" }, { "docid": "74d7a93a5e5377cb877d97ecb2a90ef5", "score": "0.5945696", "text": "public function loginArea() {\n if ($this->user('logged')) {\n $this->xml->writeTree('userinfo', $this->user());\n } else {\n $form = new FormWriter('auth.loginblock');\n\n $form->add_field_data('remember', 1);\n\n if ($data = $form->get_valid_data_if_form_sent($this->router->getParams())) {\n\n if (!$form->has_error()) {\n\n $username_parts = explode('-', $data['username']);\n\n $cid = $this->db->selectValue('SELECT id FROM customer WHERE login = $1', array($username_parts[0]));\n if (!$cid) {\n $form->add_error($this->translate('Unkown customer'));\n } elseif (!Auth::instance()->authorize($data['username'], $data['password'], (bool) $data['remember'])) {\n $form->add_error($this->translate('au_err_g_wrong_up'));\n } else {\n $form->add_confirm($this->translate('au_lb_success'));\n }\n }\n\n if ($form->has_error() && $this->isAjax()) {\n $result = array(\n 'status' => 'error',\n 'messages' => $form->get_errors()\n );\n $this->JSONRespond($result);\n } elseif (!$form->has_error() && $this->isAjax()) {\n $result = array(\n 'status' => 'confirm',\n 'messages' => $form->get_confirms()\n );\n $this->JSONRespond($result);\n } elseif (!$form->has_error() && array_value_not_empty($data, 'gohome')) {\n $this->redirecttobase();\n } elseif (!$form->has_error()) {\n $this->redirectback();\n }\n }\n\n $form->writeFormBlock();\n }\n }", "title": "" }, { "docid": "1779465487358238a736f8ecb00f87ee", "score": "0.593308", "text": "public function login() {\n\t\trequire_once('views/pages/login.php');\n\t}", "title": "" }, { "docid": "ef2e6e45ea457d66e652a85bc303ea4a", "score": "0.59112096", "text": "static function exibe_login() {\n ?>\n <div id=\"logo-login\">\n <label class=\"nome-logo\"><?php echo KLS::NOME_APP; ?></label>\n <label class=\"descricao-logo\">Sistema de Auto-Atendimento Gerenciável</label>\n </div>\n <div id=\"form-login\">\n <form method='post' action='?reg_log'>\n <?php Template::exibe_cabecalho_form('Login'); ?>\n <p>\n <label for='usuario' class=\"form-dialogo\">Usuário:</label>\n <input class=\"campo-form\" type='text' id='usuario' name='usuario' autofocus placeholder='Usuário'>\n </p>\n <p>\n <label for='senha' class=\"form-dialogo\">Senha:</label>\n <input class=\"campo-form\" type='password' id='senha' name=\"senha\" placeholder='Senha'>\n </p>\n <div class=\"rodape-login\">\n <label class=\"form-dialogo\">&nbsp;</label>\n <button class=\"enviar-botao\">Acessar</button>\n </div>\n </form>\n </div>\n <?php\n }", "title": "" }, { "docid": "28e24d72e4aa9e6972ae3f270d13b932", "score": "0.5902269", "text": "public function index() \n\t{\n\t\t// If admin is logged in open the pages module\n\t\tif (is_admin())\n\t\t\tredirect('/administration/pages/');\n\t\t// If admin is not logged in open login page\n\t\telse\n\t\t\tredirect('/administration/login/');\n\t}", "title": "" }, { "docid": "c61df656e425d73652219dbd8a8593e5", "score": "0.589206", "text": "public function login_page_custom_footer() {\n\n if( ! LoginPress_Social::check_social_api_status() )\n return;\n\n include( LOGINPRESS_SOCIAL_DIR_PATH . 'assets/js/script-login.php' );\n }", "title": "" }, { "docid": "f51143db2030302c1365e5055d35c3df", "score": "0.58910286", "text": "public function logIn()\n {\n PermissionHelper::requireUnauthorized();\n PageHelper::displayPage('users/log_in.php', $params = ['errors' => []]);\n }", "title": "" }, { "docid": "c8a31f38f896576f8e431ccd72bb676c", "score": "0.5887345", "text": "function invitation_modal()\n {\n $this->access_only_admin();\n $this->load->view('team_members/invitation_modal');\n }", "title": "" }, { "docid": "a139dc7a611febf843ed62ef92938c96", "score": "0.58780974", "text": "public function actionLogin()\n\t{\n\t\t// display the login form. everything's handled by widget LoginPop in components\n\t\t$this->render('login');\n\t}", "title": "" }, { "docid": "f7a7fbf2350ea894bf67305e9619667f", "score": "0.5847416", "text": "public function action_auth() {\n \n $this->template->styles = array(\n '/media/css/bootstrap.min.css' => array(),\n '/media/css/bootstrap-responsive.min.css' => array(),\n '/media/css/unicorn.login.css' => array(),\n );\n \n $this->template->scripts = array(\n '/media/js/jquery.min.js',\n '/media/js/unicorn.login.js',\n );\n \n if (Auth::instance()->logged_in('admin')) {\n HTTP::redirect('admin');\n }\n\n if (isset($_POST['submit'])) {\n $data = Arr::extract($_POST, array('login', 'password'));\n\n $status = Auth::instance()->login($data['login'], $data['password']);\n\n if ($status) {\n if (Auth::instance()->logged_in('admin')) {\n HTTP::redirect('admin');\n }\n } else {\n $errors = array(Kohana::message('auth/user', 'no_user'));\n //var_dump($errors);exit;\n }\n }\n\n $content = View::factory('public/auth/auth_index')\n ->bind('errors', $errors);\n /*->bind('data', $data);*/\n\n // Выводим в шаблон\n $this->template->content = $content;\n /*$this->template->block_center = array($content);\n $this->template->scripts[] = 'media/js/sha1.js';\n $this->template->scripts[] = 'media/js/jquery-1.6.2.min.js';*/\n }", "title": "" }, { "docid": "f454523105325eeaa27e41e73a7207f1", "score": "0.5846299", "text": "public function footer(){\n // load_template( plugin_dir_path( dirname( __FILE__ ) ) . 'views/login-dialog.php' );\n }", "title": "" }, { "docid": "aec2aec3b45808bd2a0b3df5931b2bb1", "score": "0.584534", "text": "public static function indexLogin() {\n if (!Auth::hasAdmin()) {\n $admin_login = new View('forms/admin/signin-admin.php');\n $admin_login->render();\n } else {\n redirect(\"/admin\");\n }\n }", "title": "" }, { "docid": "7c622022747fb0e99bbead557a984c4d", "score": "0.58424574", "text": "public function adminAddFormUsers() : void\n {\n if(!$this->adminSession->isAuthenticatedAdmin()){\n redirect(\"index.php\");\n }\n require_once 'www/templates/admin/users/add/AdminAddFormUsersView.phtml';\n }", "title": "" }, { "docid": "fb5fbe2550f4dc450d9c871a143f4040", "score": "0.58423275", "text": "public function requiredLogin()\n {\n if (!Authentication::isLoggedIn()) {\n\n\n Authentication::rememberedPage();\n\n _echo(\"<p class='container red b'>Dostęp tylko dla zalogowanych użytkowników</p>\");\n _echo(\"<p class='container'> <a href='login'>Zaloguj się &rarr;</a></p>\");\n $this->after();\n exit;\n /**\n * możemy zrobić także Authentication::redirect(600) i exit\n * jeżeli w funkcji after ma się wykoywaćwazna logika - było by to pożądane\n */\n }\n }", "title": "" }, { "docid": "c53359aaa9cd0041b6ba2d56a7867191", "score": "0.5806277", "text": "public function renderLogin() {\n //check support of social network logins\n /** @var FacebookLoginDialog $facebookLogin */\n $facebookLogin=$this->getComponent('facebookLogin');\n $this->template->allowFacebook=(!empty($facebookLogin->facebook->config->appId));\n\n /** @var GoogleLoginDialog $googleLogin */\n $googleLogin=$this->getComponent('googleLogin');\n $this->template->allowGoogle=(!empty($googleLogin->getGoogle()->getConfig()->clientId));\n }", "title": "" }, { "docid": "ac7ce96ecbe9a31bfc3643101aed4a10", "score": "0.57789713", "text": "public static function index() {\n if (!Auth::hasAdmin()) {\n $admin_login = new View('forms/admin/signin-admin.php');\n $admin_login->render();\n } else {\n redirect(\"/admin/gestion-traducteurs\");\n }\n }", "title": "" }, { "docid": "f4470de06c59533cda71225aeec9e867", "score": "0.57588154", "text": "function onepiece_loadlogin_widget() {\n\tregister_widget( 'onepiece_login_widget' );\n}", "title": "" }, { "docid": "83a8aa90ecf2789775ffca9e19e13305", "score": "0.5715171", "text": "function index()\n\t{\n\t\t\n\t\t$data[\"title\"] = _e('Login');\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"login\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"login\", $data, true, \"login\");\n\t\t$this->template->set_admin_layout(\"login\");\n\t\t$this->template->build_admin_output($data);\t\t\n\t}", "title": "" }, { "docid": "a66ca68b1ff006fc7d63532a6f8376d0", "score": "0.57139874", "text": "public function login() {\n \n $this->template->content = View::instance('v_users_login'); \n echo $this->template; \n \n }", "title": "" }, { "docid": "13211444f7a00c6de8cbf331bd94bfb9", "score": "0.5700622", "text": "function admin_login() {\n\t\t$this->layout = \"admin\";\n\t\t\n\t}", "title": "" }, { "docid": "8ee20a317af3036444d859a4e8e07626", "score": "0.56823206", "text": "function index()\n\t{\n\t\tif( $this->current_user )\n\t\t\tredirect( site_url('user/edit_profile') );\n\t\t$data[\"title\"] = _e('Login');\n\t\t$data[\"register_link\"] = \"package?ct=2&rl=2\";\n\t\t$data[\"next\"] = $_GET[\"next\"];\t\t\t\t\n\t\t$data[\"content\"] = $this->template->frontend_view(\"login\", $data, true, \"login\");\n\t\t$this->template->build_frontend_output($data);\t\n\t}", "title": "" }, { "docid": "9f0c8a6d967e412079a7f1672221a5e9", "score": "0.5676826", "text": "public function login(){\n $this->show('login', []);\n }", "title": "" }, { "docid": "ae6deb9a6695ddfa6deb9aa14ad71fd7", "score": "0.566922", "text": "public function login()\r\n\t{\r\n\r\n\t\t$this->display(\r\n\t\t\t'backoffice/login.html.twig'\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "142e627db9ff669218faf13f822837db", "score": "0.5667722", "text": "public function login()\r\n {\r\n $this->view->vista(\"app\", \"login\");\r\n\r\n }", "title": "" }, { "docid": "367de42a56e4e2bec229b4c38d404fcf", "score": "0.5658175", "text": "function index() {\n //exit;\n \n $this->helpers->secure_session_start();\n \n if($_SESSION['login_id']) { //if session start\n \n $this->view->assign('success',\"Password actualizado.\");\n $this->view->assign('stylesheets',array($this->helpers->load_css('admin')));\n $this->view->assign('javascripts',array($this->helpers->load_javascript(), $this->helpers->load_javascript('growl') ));\n $this->view->assign('title','Administrador CCM');\n $this->view->assign('helper',$this->helpers);\n $this->view->display('header');\n $this->view->display('menu');\n if($_GET[success]) $this->view->display('success');\n $this->view->display('home_view');\n $this->view->display('footer');\n\n exit;\n }\n \n\n $this->view->assign('success',\"Password actualizado. Hemos enviado tu nuevo password a tu casilla de correo.\");\n $this->view->assign('stylesheets',array($this->helpers->load_css('login')));\n $this->view->assign('javascripts',array($this->helpers->load_javascript()));\n $this->view->assign('title','Administrador CCM');\n $this->view->assign('helper',$this->helpers);\n $this->view->display('header');\n if($_GET[success]) $this->view->display('success');\n $this->view->display('login_view');\n $this->view->display('footer');\n \n }", "title": "" }, { "docid": "0c28edd661ec26bb6a1c65abc1ac9c61", "score": "0.5652995", "text": "public function usersLogin()\n\t{\n\t\t# module actuel\n\t\t$this->okt->page->module = 'users';\n\t\t$this->okt->page->action = 'login';\n\n\t\t# page désactivée ?\n\t\tif (!$this->okt->users->config->enable_login_page) {\n\t\t\t$this->serve404();\n\t\t}\n\n\t\t# allready logged\n\t\t$this->handleGuest();\n\n\t\t$this->performLogin();\n\n\t\t# title tag\n\t\t$this->okt->page->addTitleTag(__('c_c_auth_login'));\n\n\t\t# titre de la page\n\t\t$this->okt->page->setTitle(__('c_c_auth_login'));\n\n\t\t# titre SEO de la page\n\t\t$this->okt->page->setTitleSeo(__('c_c_auth_login'));\n\n\t\t# fil d'ariane\n\t\tif (!$this->isDefaultRoute(__CLASS__, __FUNCTION__)) {\n\t\t\t$this->okt->page->breadcrumb->add(__('c_c_auth_login'), usersHelpers::getLoginUrl());\n\t\t}\n\n\t\t# affichage du template\n\t\techo $this->okt->tpl->render($this->okt->users->getLoginTplPath(), array(\n\t\t\t'user_id' => $this->sUserId,\n\t\t\t'redirect' => $this->sRedirectURL\n\t\t));\n\t}", "title": "" }, { "docid": "c2093a65c27532c992b838912a943069", "score": "0.564959", "text": "public function getLoginPage()\n {\n echo $this->blade->render(\"login\", [\n 'signer' => $this->signer,\n ]);\n }", "title": "" }, { "docid": "dd68096faeb9a1494b9f48aedb85fde3", "score": "0.56366307", "text": "public function index() {\n\t\t\n\n\t\tif (!empty($this->session -> userdata('user_logado'))) redirect(base_url('dashboard/principal'));\n\t\t\n\t\tset_tema('conteudo', load_modulo_dash('view_dash_login'), FALSE);\n\t\tload_template();\n\t\t\n\t}", "title": "" }, { "docid": "92532c03fe92ae022a74366273592633", "score": "0.5632666", "text": "public function loginAction() {\n // Do not cache login page\n $this->_helper->cache->setNoCacheHeaders($this->getResponse());\n\n $this->view->title = __('login page title');\n $this->view->description = __('login page description');\n\n // allow callers to set a targetUrl via the request\n if ($targetUrl = $this->_getSubmittedTargetUrl()) {\n Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;\n }\n\n $authVars = Garp_Auth::getInstance()->getConfigValues();\n // self::processAction might have populated 'errors' and/or 'postData'\n if ($this->getRequest()->getParam('errors')) {\n $this->view->errors = $this->getRequest()->getParam('errors');\n }\n if ($this->getRequest()->getParam('postData')) {\n $this->view->postData = $this->getRequest()->getParam('postData');\n }\n }", "title": "" }, { "docid": "a529712ffdffc6aa8dd066444023a91f", "score": "0.5630717", "text": "function pintar_modal_login() { ?>\n\t\t<div class=\"modal fade\" id=\"login\" role=\"dialog\">\n\t \t<div class=\"modal-dialog\">\n\t <div class=\"modal-content\">\n\t\t <div class=\"modal-header colorModalHead\">\n\t\t <button type=\"button\" class=\"close\" data-dismiss=\"modal\" style=\"color:white;\">&times;</button>\n\t\t <h2 class=\"modal-title posicionTituloModal\"><span class=\"glyphicon glyphicon-lock\"></span> Iniciar Sesión</h2>\n\t\t </div>\n\t\t <div class=\"modal-body\">\n\t\t <form role=\"form\" action=\"\" method=\"post\">\n\t\t <div class=\"form-group\">\n\t\t <label for=\"email\"><span class=\"glyphicon glyphicon-envelope\"></span> Email:</label>\n\t\t <input type=\"email\" class=\"form-control\" name=\"fEmail\" id=\"email\" placeholder=\"Enter email\">\n\t\t </div>\n\t\t <div class=\"form-group\">\n\t\t <label for=\"passwd\"><span class=\"glyphicon glyphicon-lock\"></span> Password:</label>\n\t\t <input type=\"password\" class=\"form-control\" id=\"passwd\" placeholder=\"Enter password\" name=\"fPasswd\" required>\n\t\t </div>\n\t\t \n\t\t <button type=\"submit\" class=\"btn btn-block\" id=\"btnSubmit\" name=\"btnLogin\"><span class=\"glyphicon glyphicon-off\"></span> Iniciar sesión</button>\n\t\t </form>\n\t\t </div>\n\t\t <div class=\"modal-footer\">\n\t\t \n\t\t <p>¿No eres miembro? <a href=\"#\">Regístrate</a></p>\n\t\t <p>¿No recuerdas la <a href=\"#\">Contraseña?</a></p>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n<?php\t}", "title": "" }, { "docid": "2e376f0e1051d74837a02a5f55430722", "score": "0.56208026", "text": "function run()\n {\n $credentials = array();\n\n\n // Get the user supplied credentials\n $credentials[LOGIN_ID_FIELD] = getUserField('loginid');\n $credentials['password'] = getUserField('password');\n \n $rememberMe = getUserField(remember_me);\n\n // Create a new user object with the credentials\n $thisUser = new User($credentials);\n\n // Authenticate the user\n $ok = $thisUser->authenticate();\n\n // If successful (i.e. user supplied valid credentials)\n // show user home\n if ($ok)\n {\n \t //set user supplied values to cookie\n \t if($rememberMe)\n \t {\n \t \tsetcookie('usr_name', $credentials[LOGIN_ID_FIELD], time() + 259200, '/nm_tx/');\n \t \tsetcookie('usr_pass', $credentials['password'], time() + 259200, '/nm_tx/');\n \t }\n \t else\n \t {\n \t \tsetcookie('usr_name', '');\n \t \tsetcookie('usr_pass', '');\n \t }\n \t \n \t \n \t //save value to session that will help to set the pop up logic\n \t $_SESSION['type'] = $_SESSION['type'] ? $_SESSION['type'] : getUserField('type');\n \t \n $thisUser->goHome();\n }\n // User supplied invalid credentials so show login form\n // again\n else\n { \n \t $data = array();\n \t \n \t $data['loginid'] = $_COOKIE['usr_name'];\n \t $data['password'] = $_COOKIE['usr_pass'];\n \t \n \t if(!$data['loginid'] && !$data['password'])\n \t {\n \t \t$data = array_merge($data, $_REQUEST);\n \t }\n \t \t \n echo createPage(LOGIN_TEMPLATE, $data);\n }\n\n return true;\n }", "title": "" }, { "docid": "7777ca5ccf1dae5f9891db0722c88ea9", "score": "0.5617672", "text": "public function login_shortcode(){\n ob_start();\n load_template( plugin_dir_path( dirname( __FILE__ ) ) . 'views/login-form.php' );\n return ob_get_clean();\n }", "title": "" }, { "docid": "7391c3bb912a6a7aa27cafe30778c533", "score": "0.5610817", "text": "public function LoginForm()\n\t{\n if ($this->GetCurrentUser()){\n $this->Redirect('Default.Home');\n return;\n }\n\t\t$this->Assign(\"currentUser\", $this->GetCurrentUser());\n\t\t$this->Assign('page','login');\n\t\t$this->Render(\"Login\");\n\t}", "title": "" }, { "docid": "32a398e78fb91a520c69aab494a25f0a", "score": "0.56107545", "text": "public function getSignupLoginFormAction() {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "7e84435a9576d564f02d3fb578cb1390", "score": "0.5609086", "text": "public function login(){\n\t\t$login_message=\"\";\n require_once __DIR__ . '/../view/users_login.php';\n\t}", "title": "" }, { "docid": "e42b839bb2cfcd61e0ad18056e0fc0ac", "score": "0.560488", "text": "public function displayFormLogin()\n {\n $this->loadTemplate('login');\n }", "title": "" }, { "docid": "f31765bc0d0196f80825f99b949a77f1", "score": "0.56032157", "text": "protected function showLogin() {\n // redirect to login form\n MvcSkel_Helper_Url::redirect('Auth/Login?destination='.\n urlencode($_SERVER['REQUEST_URI']));\n }", "title": "" }, { "docid": "065ac30cc4b328bab0366b808c1669bf", "score": "0.5601408", "text": "public function sign_in() {\n\n\t\t/* User had a session, and is not logged into admin, just log them out and start over */\n\n\t\t//if ($this->session->userdata('session_id') && !empty($_SESSION['admin'])) $this->logout(); \n\n\t\tif (!empty($_POST)) new GO_Login($_POST, \"home\");\n\t\t\n\t\telse $this->go_load_page(\n\t\t\tarray(\n\t\t\t\t'page' => 'home/login',\n\t\t\t\t'title' => 'Login',\n\t\t\t\t'template' => 'home',\n\t\t\t\t'activeClass' => 'sign-in',\n\t\t\t\t'queries' => null\n\t\t\t)\n\t\t);\t\t\n\t}", "title": "" }, { "docid": "26b1650b771890febf4bfb11d69e8dc1", "score": "0.55996424", "text": "function process_login_action()\n{\n $backgroundColor = getBackgroundColor();\n\n\n $isLoggedIn = is_logged_in_from_session();\n $username = username_from_session();\n $profilePicture = get_image($username);\n $isAdmin = is_user_admin($username);\n\n\n $indexLinkClass = \"button\";\n $aboutLinkClass = \"button\";\n $shopLinkClass = \"button\";\n $contactLinkClass = \"button\";\n $sitemapLinkClass = \"button\";\n $crudLinkClass = \"button\";\n $settingLinkClass = \"button\";\n\n\n\n $isLoggedIn = false;\n\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\n\n if(authenticate($username, $password)){\n $isLoggedIn = true;\n\n $isAdmin = is_user_admin($username);\n\n $_SESSION['user'] = $username;\n\n require_once __DIR__ . '/../templates/loginSuccess.php';\n } else {\n $message = 'bad username or password, please try again';\n require_once __DIR__ . '/../templates/message.php';\n }\n}", "title": "" }, { "docid": "250683873ccb1aba8fd1ed78b82fd7ad", "score": "0.55914456", "text": "function views_head(){\n\n\t?>\n\n\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n\t\t<head>\n\n\t\t\t<title>App2night Adminpanel</title>\n\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"css/bootstrap.min.css\">\n\t\t\t<style>\n\t\t\t\t.alert {\n\t\t\t\t\tpadding: 20px;\n\t\t\t\t\tbackground-color: #f44336;\n\t\t\t\t\tcolor: white;\n\t\t\t\t\topacity: 1;\n\t\t\t\t\ttransition: opacity 0.6s;\n\t\t\t\t\tmargin-bottom: 15px;\n\t\t\t\t}\n\n\t\t\t\t.alert.success {background-color: #4CAF50;}\n\t\t\t\t.alert.info {background-color: #2196F3;}\n\t\t\t\t.alert.warning {background-color: #ff9800;}\n\n\t\t\t\t.closebtn {\n\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\tfloat: right;\n\t\t\t\t\tfont-size: 22px;\n\t\t\t\t\tline-height: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\ttransition: 0.3s;\n\t\t\t\t}\n\n\t\t\t\t.closebtn:hover {\n\t\t\t\t\tcolor: black;\n\t\t\t\t}\n</style>\n\t\t</head>\n\t\t<body>\n\t\t\n\t\t<?php\t\n\t\t//Menübar wird bei Login (default) nicht geprintet\n\t\tif($_SESSION['type']) { ?>\n\t\t\t\t\n\t\t<nav class=\"navbar navbar-default\">\n\t\t<div class=\"container-fluid\">\n\t\t <div class=\"navbar-header\">\n\t\t\t\t<a class=\"navbar-brand\" href=\"#\">\n\t\t\t\t\t<img alt=\"Admin Panel\" src=\"/img/a2n_app_color_20.png\">\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t\t<form class=\"navbar-form navbar-left\" action=\"index.php\" method=\"POST\">\n\t\t\t\t<input type=\"submit\" class='btn btn-info' name='partysview' value=\"Party Liste\">\n\t\t\t\t<input type=\"submit\" class='btn btn-info' name='partysallview' value=\"Party Liste (Alle)\">\n\t\t\t\t<input type=\"submit\" class='btn btn-info' name=\"partycreateview\" value=\"Party anlegen\">\n\t\t\t\t<input type=\"submit\" class='btn btn-info' name=\"usersview\" value=\"User Liste\">\n\t\t\t\t<input type=\"submit\" class='btn btn-info' name=\"usercreateview\" value=\"User anlegen\">\n\t\t\t</form>\n\t\t</div>\n\t\t</nav>\n\t\t\n\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "39990472649428dfc5e24a2ddd733616", "score": "0.5590151", "text": "public function create()\n\t{\n\t\tif ($this->cekLoginAdmin()) {\n\t\t\treturn $this->got();\n\t\t} else {\n\t\t\techo view('header', [\n\t\t\t\t'title' => 'REG USER',\n\t\t\t]);\n\t\t\techo view('admin/login_create', []);\n\t\t\techo view('footer');\n\t\t}\n\t}", "title": "" }, { "docid": "f73f2e2f32b1f2739559ab37e6e386c7", "score": "0.5589821", "text": "function accountManagement() {\n\t\t$user = userCore::getUser();\n\t\t$template = new template;\n\t\t$template->addStyle('/css/'.systemSettings::get('SOURCEDIR').'/site/main.css');\n\t\t$template->addScript('/js/'.systemSettings::get('SOURCEDIR').'/site/main.js');\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' User Account');\n\t\t$template->assignClean('hasPassword', !empty($user['password']));\n\t\t$template->assignClean('external', !empty($user['externalID']));\n\t\t$template->assignClean('user', $user);\n\t\t$template->assignClean('location', 'accountmanagement');\n\t\t$template->assignClean('hotTitles', gameTitlesController::getTitles('weight'));\n\t\t$template->assignClean('loggedin', userCore::isLoggedIn());\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('user/accountManagement.htm');\n\t}", "title": "" }, { "docid": "9981c534c5f1e93c82a632de1b7c0f09", "score": "0.55800974", "text": "function userUI()\n{\n\tif(userCheck())\n\t{\n\t\t//Prerequisites\n\t\t$username = userCheck('returnCurrent');\n\t\t?>\n\t\t<div class=\"userMenu noselect\">\n\t\t<p align=\"left\">\n\t\t<ul id=\"userMenuNav\">\n\t\t<li><span class=\"userMenuText\"><a href=\"account\"><? echo $username ?></a></span></li>\n\t\t<li><span class=\"userMenuText\"><a href=\"#\">Tools</a></span>\n\t\t\t\t<ul class=\"navDropWidth\">\n\t\t\t\t\t\t<li class=\"navDrop\">\n\t\t\t\t\t\t<?\n\t\t\t\t\t\tif (modCheck() or adminCheck())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<a href='page-imageupload'>Image Uploader</a>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<a href='page-storage'>Your Storage</a>\n\t\t\t\t\t\t<a href='upload'>File Uploader</a>\n\t\t\t\t\t\t<? //<a href='ilynx'>iLynx.us</a> ?>\n\t\t\t\t\t\t<a href='services'>Full Status</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t</li>\n\t\t<?\n\t\tif (modCheck() or adminCheck())\n\t\t{\n\t\t\t?>\n\t\t\t<li><span class=\"userMenuText\"><a href=\"#\"><? if(adminCheck()){ $admin = 1; echo \"Administrator\"; } else { $admin = 0; echo \"Moderator\";} ?></a></span>\n\t\t\t\t<ul class=\"navDropWidth\">\n\t\t\t\t\t\t<li class=\"navDrop\">\n\t\t\t\t\t\t<a href='page-utorrent'>Torrents</a>\n\t\t\t\t\t\t<a href='page-mcmyadmin'>McMyAdmin</a>\n\t\t\t\t\t\t<?\n\t\t\t\t\t\tif($admin == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\techo \"<a href='page-storage'>Browse Files</a>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t</li>\n\t\t\t\t </ul>\n\t\t\t</li>\n\t\t\t<?\n\t\t}\n\t\t?>\n\t\t<li><span class=\"userMenuText\"><form action=\"#\" method=\"post\"><input type=\"hidden\" name=\"logout\" /><input type=\"submit\" name=\"submit\" value=\"Log Out\" /></form></span></li>\n\t\t</ul>\n\t\t</p>\n\t\t<?\n\t\t//<div id='cse' style='width: 100%;'>Loading</div>\n\t\t//<script src='//www.google.com/jsapi' type='text/javascript'></script>\n\t\t//<script type='text/javascript'>\n\t\t//google.load('search', '1', {language: 'en', style: google.loader.themes.V2_DEFAULT});\n\t\t//google.setOnLoadCallback(function() {\n\t\t// var customSearchOptions = {};\n\t\t// var orderByOptions = {};\n\t\t// orderByOptions['keys'] = [{label: 'Relevance', key: ''} , {label: 'Date', key: 'date'}];\n\t\t// customSearchOptions['enableOrderBy'] = true;\n\t\t// customSearchOptions['orderByOptions'] = orderByOptions;\n\t\t// customSearchOptions['overlayResults'] = true;\n\t\t// var customSearchControl = new google.search.CustomSearchControl('009771454284285984078:onao_9ihiqw', customSearchOptions);\n\t\t// customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);\n\t\t// var options = new google.search.DrawOptions();\n\t\t// options.setAutoComplete(true);\n\t\t// customSearchControl.draw('cse', options);\n\t\t//}, true);\n\t\t//</script>\n\t\t?>\n\t\t</div>\n<?php\n\t}\n}", "title": "" }, { "docid": "8b05512046bce10dd8550a481b9e9763", "score": "0.5569836", "text": "public function login()\n {\n $error = null;\n $data = $this->inputEscaping();\n\n if (!empty($data)) {\n $auth = new Auth(App::getInstance()->getDb());\n\n $error = \"identifiant Incorrect\";\n $notification = $this->notify(null, null, $error);\n\n if ($auth->login($data['username'], $data['password'])) {\n $this->redirectTo(\"HTTP/1.0 303 See Other\", \"admin/dash\");\n }\n }\n\n $form = new BootstrapForm($data);\n\n isset($notification)\n ? $this->render('users.login', compact('form', 'notification'))\n : $this->render('users.login', compact('form'));\n }", "title": "" }, { "docid": "2378c9752c4570f99c38bc86d7a0558f", "score": "0.5567714", "text": "public function login_assets() {\n\t\t\twp_enqueue_style( 'login-stylesheet', asset_path( 'styles/login.css' ), [], '1.0.0', 'all' );\n\n\t\t\t// Use site logo for login page\n\t\t\t$this->print_login_logo();\n\t\t}", "title": "" }, { "docid": "a34b6bfe99e52c8918bba87650a5e66d", "score": "0.5565899", "text": "function sMain ()\n\t{\n\t\tglobal $ttH;\n\t\t\n\t\tif($ttH->site_func->check_user_login() != 1) {\n\t\t\t$url = $ttH->func->base64_encode($_SERVER['REQUEST_URI']);\n\t\t\t$url = (!empty($url)) ? '/?url='.$url : '';\n\t\t\t$link_go = $ttH->site->get_link ($this->modules, $ttH->setting[$this->modules][\"signin_link\"]).$url;\n\t\t\t$ttH->html->redirect_rel($link_go);\n\t\t}\n\t\t\n\t\t$ttH->func->load_language($this->modules);\n\t\t$ttH->temp_act = new XTemplate($ttH->path_html.$this->modules.DS.$this->modules.\".tpl\");\n\t\t$ttH->temp_act->assign('CONF', $ttH->conf);\n\t\t$ttH->temp_act->assign('LANG', $ttH->lang);\n\t\t$ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);\n\t\t\n\t\t$ttH->func->include_css ($ttH->dir_css.$this->modules.'/'.$this->modules.'.css');\n\t\t\n\t\t$ttH->func->include_js($ttH->dir_js.'jquery_plugins/jquery.validate.js');\n\t\t$ttH->func->include_js($ttH->dir_skin.'js/location/location.js');\n\t\t$ttH->func->include_js($ttH->dir_skin.'js/'.$this->modules.'/'.$this->modules.'.js');\n\t\t\n\t\t$ttH->conf['menu_action'] = array($this->modules);\n\t\t$ttH->data['link_lang'] = (isset($ttH->data['link_lang'])) ? $ttH->data['link_lang'] : array();\n\t\t\n\t\tinclude ($this->modules.\"_func.php\");\n\t\t\n\t\t$data = array();\n\t\t//Make link lang\n\t\tforeach($ttH->data['lang'] as $row_lang) {\n\t\t\t$ttH->data['link_lang'][$row_lang['name']] = $ttH->site->get_link_lang ($row_lang['name'], $this->modules);\n\t\t}\n\t\t//End Make link lang\n\t\t\n\t\t//SEO\n\t\t$ttH->site->get_seo (array(\n\t\t\t'meta_title' => (isset($ttH->setting[$this->modules][$this->action.\"_meta_title\"])) ? $ttH->setting[$this->modules][$this->action.\"_meta_title\"] : '',\n\t\t\t'meta_key' => (isset($ttH->setting[$this->modules][$this->action.\"_meta_key\"])) ? $ttH->setting[$this->modules][$this->action.\"_meta_key\"] : '',\n\t\t\t'meta_desc' => (isset($ttH->setting[$this->modules][$this->action.\"_meta_desc\"])) ? $ttH->setting[$this->modules][$this->action.\"_meta_desc\"] : ''\n\t\t));\n\t\t$ttH->conf[\"cur_group\"] = 0;\n\t\t\n\t\t$data = array();\n\t\t$data['content'] = $this->do_main();\n\t\t$data['box_left'] = box_left($this->action);\n\t\t//$data['box_column'] = box_column();\n\t\n\t\t$ttH->temp_act->assign('data', $data);\n\t\t$ttH->temp_act->parse(\"main\");\n\t\t$ttH->output .= $ttH->temp_act->text(\"main\");\n\t}", "title": "" }, { "docid": "fb2ae3b56b2ce04bad09eb58cbd8b58c", "score": "0.55597776", "text": "public function index(){\n $email = null;\n if(isset($_SESSION[USER_EMAIL])){\n $email = $_SESSION[USER_EMAIL];\n }\n require 'GestioneAcquariMarini/views/_templates/header.php';\n require 'GestioneAcquariMarini/views/gestioneAcquari/login/index.php';\n require 'GestioneAcquariMarini/views/_templates/footer.php';\n $_SESSION['errorLogin'] = false;\n }", "title": "" }, { "docid": "0f4c80d9c70bd7a7f97a2bbd65fe2074", "score": "0.5559266", "text": "public function showLogin() {\n $userLogged = AuthHelper::checkLoggedIn();\n if($userLogged == true){\n $permitAdmin = AuthHelper::checkAdmin();\n if($permitAdmin == 1){\n $this->view->showLogin(\"Sesion iniciada\",$userLogged,$permitAdmin);\n }\n else{\n $this->view->showLogin(\"Sesion iniciada\",$userLogged);\n }\n }\n else{\n $this->view->showLogin();\n }\n }", "title": "" }, { "docid": "b0e79c718a01d1bd537763b23fe3215a", "score": "0.5555376", "text": "public function loginFormAction()\n {\n include(__DIR__ . '/../admin/pages/login.php');\n }", "title": "" }, { "docid": "6bfd2bb32fd0126610990b8ac3b9003b", "score": "0.5555367", "text": "public function enqueue_scripts () {\n\t\t\n\t\twp_register_script( $this->parent->_token . '-login', esc_url( $this->parent->assets_url ) . 'js/login' . $this->parent->script_suffix . '.js', array( 'jquery' ), $this->parent->_version );\n\t\twp_enqueue_script( $this->parent->_token . '-login' );\n\t\t\n\t}", "title": "" }, { "docid": "ca22269727a998831cc7275ebe11c9a9", "score": "0.5554421", "text": "private function login()\n\t{\n\n\t\tif( $this->registry->getObject('authenticate')->isJustProcessed() )\n\t\t{\n\t\t\tif( isset( $_POST['sn_auth_user'] ) && $this->registry->getObject('authenticate')->isLoggedIn() == false )\n\t\t\t{\n\t\t $this->registry->getObject('template')->buildFromTemplates( \n\t\t \t$this->registry->getObject('constants')->getBasicHeaderTpl(),\n\t\t \t'authenticate/login/'.$this->registry->getObject('constants')->getMainTpl(), \n\t\t \t$this->registry->getObject('constants')->getFooterTpl()\n\t\t \t);\n //si el referer es logout lo limpiamos\n\t if($_SERVER['HTTP_REFERER']==$this->registry->getSetting($this->registry->getObject('constants')->getConstant('site_url')).\"authenticate/logout\"){\n $this->registry->getObject('template')->getPage()->addTag( 'referer','home' );\t \n\t }else {\t\t\t\t\n\t\t\t $this->registry->getObject('template')->getPage()->addTag( 'referer', ( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '' ) );\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Si ya estamos logeados hay que redireccionar\n\t\t\t\tif( $_POST['referer'] == '' )\n\t\t\t\t{\n\t\t\t\t\t //redireccionamos por nuestra url sino tenemos \"referer\"\n\t\t\t\t\t$referer = $this->registry->getSetting($this->registry->getObject('constants')->getConstant('site_url'));\n\t\t\t\t\t$date = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t// registramos en el log y gamificamos\n\t\t\t\t\t$this->registry->getObject('event')->notify('user.login',$_SESSION['sn_auth_session_uid'],$_SERVER['REMOTE_ADDR'],'',$_SESSION['sn_auth_session_uid'],'Has iniciado sesion',$date,3);\n \n\t\t\t\t\t$this->registry->redirectUser( $referer, 'Logged in', 'Thanks, you are now logged in, you are now being redirected to the page you were previously on', false);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t $ref = $this->registry->getSetting($this->registry->getObject('constants')->getConstant('site_url')).$_POST['referer'];\n\t\t\t\t //if($this->registry->getObject('authenticate')->getUser()->isAdmin())\n // $ref=\"#\";\n\t\t\t\t \n\t\t\t\t //if($_SERVER['HTTP_REFERER']== $this->registry->getSetting($this->registry->getObject('constants')->getConstant('site_url')).\"authenticate/logout\")\n // $ref=\"#\";\n\n\t \t$date = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t// registramos en el log y gamificamos\n\t\t\t\t\t$this->registry->getObject('event')->notify('user.login',$_SESSION['sn_auth_session_uid'],$_SERVER['REMOTE_ADDR'],'',$_SESSION['sn_auth_session_uid'],'Has iniciado sesion',$date,3);\n\t\t\t\t // si tenemos \"referer\" pues lo redireccionamos por ahi\n\t\t\t\t $this->registry->redirectUser( $ref, 'Logged in', 'Thanks, you are now logged in, you are now being redirected to the page you were previously on', false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{ \n\t\t\t//Si ya estamos logeados no podemos volvernos a logear\n\t\t\tif( $this->registry->getObject('authenticate')->isLoggedIn() == true )\n\t\t\t{\n \t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{ //si no estamos logeados mostramos error\n\t\t\t $this->registry->getObject('template')->getPage()->addTag( 'error','Debes iniciar tu sesi&oacute;n para continuar');\n\t\t\t $this->registry->getObject('template')->getPage()->addTag( 'username','');\n\t\t\t $this->registry->getObject('template')->buildFromTemplates(\n\t\t\t \t$this->registry->getObject('constants')->getBasicHeaderTpl(),\n\t\t\t \t'authenticate/login/'.$this->registry->getObject('constants')->getMainTpl(),\n\t\t\t \t$this->registry->getObject('constants')->getFooterTpl()\n\t\t\t \t);\n\t\t\t $this->registry->getObject('template')->getPage()->addTag( 'referer', ( isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : '' ) );\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "926d82204c338969d78298468c2b4750", "score": "0.55540514", "text": "public function AmILoggedIn() {\n if($this->_auth->hasIdentity()) {\n\n $logoutUrl = $this->view->url(array(\n 'module' => 'users',\n 'controller'=>'account',\n 'action'=>'logout'),\n 'default', true);\n\n $user = $this->_auth->getIdentity();\n\n// $gravatar = $this->view->gravatar()\n// ->setEmail($user->email)\n// ->setImgSize(30)\n// ->setDefaultImg(Zend_View_Helper_Gravatar::DEFAULT_MONSTERID)\n// ->setSecure(true)\n// ->setAttribs(array('class' => 'avatar'));\n\n $fullname = $this->view->escape(ucfirst($user->fullname));\n $id = $this->view->escape(ucfirst($user->id));\n// $string = '<div id=\"gravatar\">' . $gravatar . '</div>';\n\t$string = '<div id=\"logmein\">';\n $string .= '<p><a href=\"'.$this->view->url(array('module' => 'users','controller' => 'account'),\n 'default',true).'\" title=\"View your user profile\">' . $fullname . '</a> &raquo; <a href=\"'\n . $logoutUrl . '\">Log out</a></p><p>Assigned role: ' . ucfirst($user->role);\n\n $this->view->headMeta(ucfirst($user->fullname),'page-user-screen_name');\n\n $allowed = array('admin' , 'fa');\n if(in_array($user->role,$allowed)) {\n $string .= '<p><a class=\"btn btn-small btn-danger\" href=\"' . $this->view->url(array('module' => 'admin'),'default',true)\n . '\">Administer site</a></p>';\n }\n } else {\n $loginUrl = $this->view->url(array('module' => 'users'),'default', true);\n $register = $this->view->url(array('module' => 'users','controller' => 'account',\n 'action'=> 'register'),'default',true);\n\t$string = '<div id=\"logmein\">';\n $string .= '<a href=\"'.$loginUrl.'\" title=\"Login to our database\">Log in</a> | <a href=\"'\n . $register . '\" title=\"Register with us\">Register</a>';\n $this->view->headMeta('Public User','page-user-screen_name');\n }\n $string .= '</div>';\n return $string;\n\n }", "title": "" }, { "docid": "be031116c3baa5426b631367712aac94", "score": "0.5548599", "text": "public function login()\n\t{\n\t\t$viewData = [\n\t\t\t'page_title' => 'Login'\n\t\t];\n\t\t$this->set( $viewData );\n\n\t\t$this->view->render( 'frontend/auth/login', $this->layout, $this->vars );\n\t}", "title": "" }, { "docid": "2c347c6655f21f08290acb16a50691ce", "score": "0.5547292", "text": "function hohb_custom_login() {\n\t\n\t$files = '<link rel=\"stylesheet\" href=\"'.plugins_url( 'login.css' , __FILE__ ).'\" />';\n\t$files .= '<script src=\"http://code.jquery.com/jquery-1.11.0.min.js\"></script>';\n\t$files .= '<script src=\"'.plugins_url( 'js/login.js' , __FILE__ ).'\"></script>';\n\t\n\techo $files;\n}", "title": "" }, { "docid": "efeb141feb1654dd224bc9c7278943f7", "score": "0.55449915", "text": "function add_wp_login_page_restrications() {\n\n\tglobal $action;\n\n\t// make sure if we don't have a \"logout\" action in progress\n\tif( $action == 'logout' || ! is_user_logged_in() ) {\n\t\treturn;\n\t}\n\n\twp_redirect( home_url( '/my-account/' ) );\n\tdie;\n}", "title": "" }, { "docid": "b2089243b2da89f778e0b535e075c0ea", "score": "0.55449194", "text": "public function register_login(){\n\t\t\n\t\t$pages_row = $this->cms->get_front_pages_contents();\n\t\t$data['pages_row'] = $pages_row;\n\t\t\n\t\t// CMS DATA for Homepage\n\t\t$homepage_cms = $this->cms->get_cms_page('homepage');\n\t\t$data['homepage_cms'] = $homepage_cms;\n\t\t\n\t\tif(filter_string($homepage_cms['page_title'])){\n\t\t\t\n\t\t\t//set title\n\t\t\t$page_title = $homepage_cms['meta_title'];\n\t\t\t$this->stencil->title($page_title);\t\n\t\t\t\n\t\t\t//Sets the Meta data\n\t\t\t$this->stencil->meta(array(\n\t\t\t\t'description' => $homepage_cms['meta_description'],\n\t\t\t\t'keywords' => $homepage_cms['meta_keywords']\n\t\t\t));\n\n\t\t}else{\n\t\t\t\n\t\t\t//set title\n\t\t\t$page_title = DEFAULT_TITLE;\n\t\t\t$this->stencil->title($page_title);\t\n\t\t\t\n\t\t\t//Sets the Meta data\n\t\t\t$this->stencil->meta(array(\n\t\t\t\t'description' => DEFAULT_META_DESCRIPTION,\n\t\t\t\t'keywords' => DEFAULT_META_KEYWORDS\n\t\t\t));\n\n\t\t}//end if(filter_string($homepage_cms['page_title']))\n\n\t\t// $this->stencil->css('jquery.fancybox.css');\n // $this->stencil->js('jquery.fancybox.js');\n\n\t\t// Page Heading\n\t\t$page_heading = 'Cruceros On Sale';\n\t\t$data['page_heading'] = $page_heading;\n\t\t\n\t\t$this->stencil->layout('site_layout');\n\t\t$this->stencil->paint('home/register_login', $data);\n\n\t}", "title": "" }, { "docid": "1a000304eb16cd21fb167b46ba30d31b", "score": "0.55444217", "text": "public function crearUsuario()\n {\n $this->load->view(\"modules/ViewModule_Head\", array(\n \"hojas\" => array(\"modules/StyleModule_Panel\", \"modules/StyleModule_Panel_Responsive\", \"modules/StyleModule_Registro_Usuario\"),\n \"scripts\" => array(\"modules/ScriptModule_Panel\", \"modules/ScriptModule_Registro_Usuario\", \"lib/dni\")\n ));\n\n //carga el modulo principal\n $this->load->view(\"modules/ViewModule_Panel\");\n\n //carga el panel de registro\n $this->load->view(\"modules/ViewModule_Registro_Usuario\");\n }", "title": "" }, { "docid": "250373887b628a779db750ee861b5d28", "score": "0.55415255", "text": "public function form_creation() {\n if ( is_user_logged_in() ):\n wp_redirect(home_url());\n exit;\n else: ?>\n <section class=\"login-form\">\n <?php if ( isset( $_GET['login'] ) ): ?>\n <div id=\"message\" class=\"error\">\n <?php if ( $_GET['login'] == 'failed' ): ?>\n <p><?php _e( 'Invalid email address or password', TGI_USER_FRONTEND_TEXT_DOMAIN ); ?></p>\n <?php elseif ( $_GET['login'] == 'empty_email' ): ?>\n <p><?php _e( 'Empty email address', TGI_USER_FRONTEND_TEXT_DOMAIN ); ?></p>\n <?php elseif ( $_GET['login'] == 'invalid_email' ): ?>\n <p><?php _e( 'Invalid email format', TGI_USER_FRONTEND_TEXT_DOMAIN ); ?></p>\n <?php elseif ( $_GET['login'] == 'empty_password' ): ?>\n <p><?php _e( 'Empty password', TGI_USER_FRONTEND_TEXT_DOMAIN ); ?></p>\n <?php endif; ?>\n </div>\n <?php endif; ?>\n <?php\n $args = array(\n 'echo' => true,\n 'redirect' => home_url(),\n 'form_id' => 'loginform',\n 'label_username' => __( 'Email Address' ),\n 'label_password' => __( 'Password' ),\n 'label_remember' => __( 'Remember Me' ),\n 'label_log_in' => __( 'Log In' ),\n 'id_username' => 'user_login',\n 'id_password' => 'user_pass',\n 'id_remember' => 'rememberme',\n 'id_submit' => 'wp-submit',\n 'remember' => true,\n 'value_username' => isset( $_GET['email'] ) ? $_GET['email'] : null,\n 'value_remember' => true\n );\n\n // Calling the login form.\n wp_login_form( $args );\n ?>\n </section>\n <?php endif;\n }", "title": "" }, { "docid": "cbf3a65ecc0607d613ede8db4cef8896", "score": "0.5533365", "text": "public function manage() {\n\t\t$user = LoginSession::currentUser();\n\t\t$users = User::loadAll();\n\t\tif (!$user->isAdmin()) {\n\t\t\t// User does not have permissions\n\t\t\theader(\"HTTP/1.1 403 Forbidden\" );\n\t\t\texit();\n\t\t}\n\t\t$pageName = 'User Manager';\n\t\tinclude_once SYSTEM_PATH.'/view/header.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/manager.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.tpl';\n\t}", "title": "" }, { "docid": "e39eb53c6a75e53964d1425e811e2170", "score": "0.5531193", "text": "public function show_page() {\n if ( $_SERVER['HTTPS'] !== 'on' ) {\n header(\"Location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\");\n exit();\n }\n\n // redirect to page=user if user is not 'admin'\n // redirect to page=login if user is not logged in\n if ( isset($_SESSION['user']) ) {\n if ( $_SESSION['user'] !== 'admin' ) {\n header(\"Location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?page=user\");\n exit();\n }\n } else {\n header(\"Location: https://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?page=login\");\n exit();\n }\n \n $action = $_SERVER['PHP_SELF'] .\"?\". $_SERVER['QUERY_STRING'];\n\n $this->start_page();\n\n print <<<EOP\n <div class=\"container\">\n <p>\n <h1>You are logged in as admin</h1>\n </p>\n\n <div class=\"panel panel-success\">\n <div class=\"panel-body\">\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n <div class=\"login col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <p align=\"left\">Add User:</p>\n <form name=\"addUser\" method=\"POST\" action=\"$action\" class=\"form-horizontal\">\n <div class=\"input-group col-xs-12\">\n <input type=\"hidden\" name=\"form\" value='addUser' class=\"login-input\"></td>\n <input type=\"text\" maxlength=\"63\" name=\"username\" placeholder=\"Username\" class=\"login-input form-control\">\n <input type=\"password\" maxlength=\"32\" name=\"password1\" placeholder=\"Enter New Password\" class=\"login-input form-control\">\n <input type=\"password\" maxlength=\"32\" name=\"password2\" placeholder=\"Re-enter New Password\" class=\"login-input form-control\">\n </div><!-- End of input-group -->\n <br/>\n <button type=\"button\" value=\"Submit\" class=\"login-btn btn btn-info\">Submit</button>\n <input name=\"submit\" value=\"\" class=\"hidden btnSubmit btn btn-info\" type=\"submit\">\n <div class=\"hidden submit-message\">Are you sure you want to add this user?</div>\n <!-- div class=\"hidden submit-message\">Are you sure you want add user %username%?</div -->\n </form>\n </div>\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n </div>\n </div><!-- End of panel -->\n <p>\n <div class=\"panel panel-success\">\n <div class=\"panel-body\">\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n <div class=\"login col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <p align=\"left\">Delete User:</p>\n <form name=\"deleteUser\" method=\"POST\" action=\"$action\" class=\"form-horizontal\">\n <div class=\"input-group col-xs-12\">\n <input type=\"hidden\" name=\"form\" value='deleteUser' class=\"login-input\">\n <input type=\"text\" maxlength=\"63\" name=\"username\" placeholder=\"Username\" class=\"login-input form-control\">\n </div><!-- End of input-group -->\n <br/>\n <button type=\"button\" value=\"Submit\" class=\"login-btn btn btn-info\">Submit</button>\n <input name=\"submit\" value=\"\" class=\"hidden btnSubmit btn btn-info\" type=\"submit\">\n <div class=\"hidden submit-message\">Are you sure you want to delete this user?</div>\n <!-- div class=\"hidden submit-message\">Are you sure you want to delete user %username%?</div -->\n </form>\n </div>\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n </div>\n </div><!-- End of panel -->\n\n <div class=\"panel panel-success\">\n <div class=\"panel-body\">\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n <div class=\"login col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <p align=\"left\">Change User Password:</p>\n <form name=\"changeUserPassword\" method=\"POST\" action=\"$action\" class=\"form-horizontal\">\n <div class=\"input-group col-xs-12\">\n <input type=\"hidden\" name=\"form\" value='changeUserPassword' class=\"login-input form-control\">\n <input type=\"text\" maxlength=\"63\" name=\"username\" placeholder=\"Username\" class=\"login-input form-control\">\n <input type=\"password\" maxlength=\"32\" name=\"password1\" placeholder=\"Enter New Password\" class=\"login-input form-control\">\n <input type=\"password\" maxlength=\"32\" name=\"password2\" placeholder=\"Re-enter New Password\" class=\"login-input form-control\">\n </div><!-- End of input-group -->\n <br/>\n <button type=\"button\" value=\"Submit\" class=\"login-btn btn btn-info\">Submit</button>\n <input name=\"submit\" value=\"\" class=\"hidden btnSubmit btn btn-info\" type=\"submit\">\n <div class=\"hidden submit-message\">Are you sure you want to change this user's password?</div>\n <!-- div class=\"hidden submit-message\">Are you sure you want to change user %username% password?</div -->\n </form>\n </div>\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n </div>\n </div><!-- End of panel -->\n <p>\n <div class=\"panel panel-success\">\n <div class=\"panel-body\">\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n <div class=\"login col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <p align=\"left\">Log Out:</p>\n <form name=\"userLogout\" method=\"POST\" action=\"$action\" class=\"form-horizontal\">\n <div class=\"input-group\">\n <input type=\"hidden\" name=\"form\" value='userLogout' class=\"login-input\">\n </div><!-- End of input-group -->\n <input name=\"submit\" value=\"Log Out\" class=\"btnSubmit btn btn-info\" type=\"submit\">\n </form>\n </div>\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n </div>\n </div><!-- End of panel -->\n\n <!-- p>\n <div class=\"panel panel-success\">\n <div class=\"panel-body\">\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n <div class=\"login col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <form name=\"userLogout\" method=\"POST\" action=\"$action\" class=\"form-horizontal\">\n <input type=\"hidden\" name=\"form\" value='userLogout' class=\"login-input\"></td>\n <table border=\"0\" cellpadding=\"10\" cellspacing=\"1\" width=\"500\" align=\"center\" class=\"tblLogin\">\n <th><td colspan=\"2\">Admin Log Out</td></th>\n <tr class=\"tableheader\">\n <td>\n <input type=\"hidden\" name=\"logout\" value='true' class=\"login-input form-control\"></td>\n </tr>\n <tr class=\"tableheader\">\n <td align=\"left\" colspan=\"2\"></br><input type=\"submit\" name=\"submit\" value=\"Log Out\" class=\"btn btn-info btnSubmit\"></td>\n </tr>\n </table>\n <p/>\n </form>\n </div>\n <div class=\"hidden-sm hidden-xs col-lg-3 col-md-3\"></div>\n </div>\n </div><!-- End of panel -->\n </div>\nEOP;\n \n $this->end_page();\n }", "title": "" }, { "docid": "a5a77f0db362046d91fa15da021f1ea4", "score": "0.5529778", "text": "public function Index(){\n unset($_SESSION['authen']);\n $_SESSION['authen'] = 2;\n require_once 'views/layouts/headeauten.php';\n require_once 'views/pages/login/index.php';\n require_once 'views/layouts/footerauten.php';\n }", "title": "" }, { "docid": "793c2318884753fa0aa000396dfd6c3d", "score": "0.55262375", "text": "function aid_holder()\n {\n Auth::handleLogin();\n $this->view->target = \"aid_holder\"; \n $this->view->render('index/aid_holder');\n }", "title": "" }, { "docid": "fea4caefaf8e89f202fb4a9eee8aea2b", "score": "0.55211973", "text": "function openRandomPage(){\n parent::doOpenLink();\n parent::doLogin();\n parent::doAccessRandomPage();\n parent::doEditPage();\n }", "title": "" }, { "docid": "6408e4be41c54d80668dd55d2b97c239", "score": "0.55157274", "text": "public function login(){\n // Check User is Logged In\n\t\tif(Session::get('AdminLoggedIn') == true){\n $this->_view->flash[] = \"You are already logged in\";\n Session::set('backofficeFlash', array($this->_view->flash, 'failure'));\n\t\t\tUrl::redirect('backoffice/adminUsers');\n\t\t}\n // Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Login', 'Login');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'User Login';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Login';\n\n\t\t// Set Page Specific CSS\n\t\t//$this->_view->pageCss = $pageCss;\n\n\t\t// Set Page Specific Javascript\n\t\t//$this->_view->pageJs = $pageJs;\n\n\t\t// Define expected and required\n\t\t$this->_view->expected = array('username', 'password');\n\t\t$this->_view->required = array('username', 'password');\n\n\t\t// Set default variables\n $this->_view->missing = array();\n $this->_view->error = array();\n $this->_view->postData = array();\n\n // If Form has been submitted process it\n\t\tif(!empty($_POST)){\n\t\t\t// Send $_POST to validate function\n\t\t\t$post = Form::ValidatePost($_POST, $this->_view->expected, $this->_view->required);\n\n\t\t\t// If true return array of formatted $_POST data\n\t\t\tif($post[0] == true){\n\t\t\t\t$this->_view->postData = $post[1];\n\t\t\t}\n\t\t\t// else return array of missing required fields\n\t\t\telse{\n\t\t\t\t$this->_view->missing = $post[1];\n\t\t\t}\n\n\t\t\tif(empty($this->_view->missing)){\n\n\t\t\t\t$username = $this->_view->postData['username'];\n\t\t\t\t$password = $this->_view->postData['password'];\n\n\t\t\t\t//If no errors yet continue\n\t\t\t\tif(empty($this->_view->error)){\n\n\t\t\t\t\t//Get User ID, Salt and Password for given Email Address\n\t\t\t\t\t$checkUser = $this->_model->checkAdminLogin($username);\n\n\t\t\t\t\tif(!empty($checkUser)){\n\t\t\t\t\t\t$userID = $checkUser[0]['id'];\n\t\t\t\t\t\t$storedSalt = $checkUser[0]['salt'];\n\t\t\t\t\t\t$storedPassword = $checkUser[0]['user_pass'];\n\n\t\t\t\t\t\tif(!empty($userID) && !empty($storedSalt) && !empty($storedPassword)){\n\n\t\t\t\t\t\t\t// Check if the given password matches the hashed password\n\t\t\t\t\t\t\t$verify = Password::password_verify($storedPassword, $storedSalt, $password);\n\n\t\t\t\t\t\t\t// If true comtinue with login\n\t\t\t\t\t\t\tif($verify[0] == true){\n\t\t\t\t\t\t\t\t// Get User Details\n\t\t\t\t\t\t\t\t$userData = $this->_model->getDataByID($userID);\n\n\t\t\t\t\t\t\t\t// Set User Sessions\n\t\t\t\t\t\t\t\tSession::set('AdminLoggedIn', true);\n\t\t\t\t\t\t\t\tSession::set('AdminCurrentUserID', $userID);\n\t\t\t\t\t\t\t\tSession::set('AdminCurrentUserName', $userData[0]['display_name']);\n Session::set('AdminIsSuper', $userData[0]['is_super']);\n\n\t\t\t\t\t\t\t\tUrl::redirect('backoffice/admin-users/index');\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// else return error message\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$this->_view->error[] = $verify[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->_view->error[] = 'We could not find a password for your account. Please <a href=\"/contact\">contact us</a> and we will be happy to set this up for you.';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_view->error[] = 'No user found with this email. Please try different email.';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t// Error Message\n\t\t\t\t$this->_view->error[] = 'Please complete the missing required fields.';\n\t\t\t}\n\t\t}\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('adminusers/login', 'login-layout', 'backoffice');\n }", "title": "" }, { "docid": "22ada4b3bec5b0b1159d26c1f4477cd4", "score": "0.55122876", "text": "function shift3_header_scripts()\n{\n if ($GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n \n \n wp_register_script('jQuery', get_template_directory_uri() . '/js/jquery-1.12.1.min.js', array(), ''); // jQuery\n wp_enqueue_script('jQuery'); // Enqueue it!\n wp_register_script('contact-modal', get_template_directory_uri() . '/js/contact-modal.js', array(), ''); // jQuery\n wp_enqueue_script('contact-modal'); // Enqueue it!\n \n }\n}", "title": "" }, { "docid": "2a5f8d6f4b46d64690411c8358586c68", "score": "0.5511216", "text": "public function displayLoginAdmin() {\n\t\t// détruis la session en cours lorsque l'on veut accéder à la page Administration\n\t\t$_SESSION = array();\n\t\tsetcookie(session_name(), '', time() - 42000);\n\t\tsession_destroy();\n\n\t\t$template = $this->_twig->load('backend/adminLoginView.html.twig');\n\t\techo $template->render();\n\t}", "title": "" }, { "docid": "9e76b5d5919f66f4dbf63b063c523b9f", "score": "0.5502274", "text": "public function login() {\n if($this->user) {\n Flash::set(\"You are already logged in.\");\n Router::redirect(\"/stories/welcome\");\n return;\n }\n # Setup view\n $this->template->content = View::instance('v_users_login');\n $this->template->title = \"Login\";\n # Render template\n echo $this->template;\n }", "title": "" }, { "docid": "04a438e039e02bfa78b8ca141a8a8acb", "score": "0.5501561", "text": "public function login_prba (){$this->view->show(\"login_prba.php\");}", "title": "" }, { "docid": "9b629cf3d7b2be0615cd41637c149c4c", "score": "0.5499342", "text": "function loadLogin() {\n\t\t?>\n\n\t\t<form action=\"do_login.php\" method=\"POST\">\n\t\t\t<input type=\"text\" name=\"user\" placeholder=\"Username\" required>\n\t\t\t<input type=\"password\" name=\"pass\" placeholder=\"Password\" required>\n\t\t\t<button>Login</button>\n\t\t</form>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "f1d56c498d63265d0f8ca8152806d7c5", "score": "0.5490054", "text": "public function index()\n\t{\n\t\tis_logged_in(FALSE);\n\t\t\n\t\tredirect(SSO_SERVER_LOGIN);\n\t\t\n\t}", "title": "" }, { "docid": "3f48805cf9d6428c4c631a080b73e4ce", "score": "0.5488146", "text": "public function indexAction()\n {\n $this->requireGuest();\n View::renderBlade('login/form');\n }", "title": "" }, { "docid": "0c8cd7907c619dfa9c3519fd52606262", "score": "0.5482626", "text": "public function doModal()\r\n {\r\n if (!isset($_SESSION['OSATS_WIZARD']) || !count($_SESSION['OSATS_WIZARD']['pages'])) return;\r\n osatutil::transferRelativeURI('m=wizard');\r\n return true;\r\n }", "title": "" }, { "docid": "8db5c0da6d3728648fa4def10491315e", "score": "0.5482116", "text": "public function index()\n\t{\n\t\t$this->login();\n\t}", "title": "" }, { "docid": "5fa84d015dfcf8251fa763cee835411b", "score": "0.5470716", "text": "public function login()\n\t{\n\t\tif( $this->uri->uri_string() == 'user/login') {\n\t\t\tshow_404();\n\t\t}\n\n\t\tif( strtolower( $_SERVER['REQUEST_METHOD'] ) == 'post' ) {\n\t\t\t$this->require_min_level(1);\n\t\t}\n\n\t\t$this->setup_login_form();\n\t\t$this->data['form_open'] = form_open($this->load->get_var('login_url'), ['class' => 'std-form']);\n\t\t$this->twig->display('auth/login.php',$this->data);\n\t}", "title": "" }, { "docid": "7c23713899de27f3283da3e2f258208a", "score": "0.5468075", "text": "public function display_login_button()\n {\n\n // User is not logged in, display login button\n echo '<li><a class=\"jobsearch-linkedin-bg\" href=\"' . $this->get_auth_url() . '\" data-original-title=\"linkedin\"><i class=\"fa fa-linkedin\"></i>' . __('Login with Linkedin', 'wp-jobsearch') . '</a></li>';\n }", "title": "" }, { "docid": "84393e3614e34111758d67e9c0393367", "score": "0.54674524", "text": "function loginizer_page_dashboard_T(){\n\t\n\tglobal $loginizer, $lz_error, $lz_env;\n\n\tloginizer_page_header('Dashboard');\n?>\n<style>\n.welcome-panel{\n\tmargin: 0px;\n\tpadding: 10px;\n}\n\ninput[type=\"text\"], textarea, select {\n width: 70%;\n}\n\n.form-table label{\n\tfont-weight:bold;\n}\n\n.exp{\n\tfont-size:12px;\n}\n</style>\n\t\t\n\t<?php \n\t$lz_ip = lz_getip();\n\t\n\tif($lz_ip != '127.0.0.1' && @$_SERVER['SERVER_ADDR'] == $lz_ip){\n\t\techo '<div class=\"update-message notice error inline notice-error notice-alt\"><p style=\"color:red\"> &nbsp; Your Server IP Address seems to match the Client IP detected by Loginizer. You might want to change the IP detection method to HTTP_X_FORWARDED_FOR under System Information section.</p></div><br>';\n\t }\n\t\n\tloginizer_newsletter_subscribe();\n\t\n\t$hide_announcement = get_option('loginizer_no_announcement');\n\tif(empty($hide_announcement)){\n\t\techo '<div id=\"message\" class=\"welcome-panel\">'. __('<a href=\"https://loginizer.com/blog/loginizer-has-been-acquired-by-softaculous/\" target=\"_blank\" style=\"text-decoration:none;\">We are excited to announce that we have joined forces with Softaculous and have been acquired by them 😊. Read full announcement here.</a>', 'loginizer'). '<a class=\"welcome-panel-close\" style=\"top:3px;right:2px;\" href=\"'.menu_page_url('loginizer', false).'&dismiss_announcement=1\" aria-label=\"Dismiss announcement\"></a></div><br />';\n\t}\n\t\t\n\techo '<div class=\"welcome-panel\">Thank you for choosing Loginizer! Many more features coming soon... &nbsp; Review Loginizer at WordPress &nbsp; &nbsp; <a href=\"https://wordpress.org/support/view/plugin-reviews/loginizer\" class=\"button button-primary\" target=\"_blank\">Add Review</a></div><br />';\n\n\t// Saved ?\n\tif(!empty($GLOBALS['lz_saved'])){\n\t\techo '<div id=\"message\" class=\"updated\"><p>'. __('The settings were saved successfully', 'loginizer'). '</p></div><br />';\n\t}\n\t\n\t// Any errors ?\n\tif(!empty($lz_error)){\n\t\tlz_report_error($lz_error);echo '<br />';\n\t}\n\t\n\t?>\t\n\t\n\t<div class=\"postbox\">\n\t\t\n\t\t<div class=\"postbox-header\">\n\t\t<h2 class=\"hndle ui-sortable-handle\">\n\t\t\t<span><?php echo __('Getting Started', 'loginizer'); ?></span>\n\t\t</h2>\n\t\t</div>\n\t\t\n\t\t<div class=\"inside\">\n\t\t\n\t\t<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t<?php wp_nonce_field('loginizer-options'); ?>\n\t\t<table class=\"form-table\">\n\t\t\t<tr>\n\t\t\t\t<td scope=\"row\" valign=\"top\" colspan=\"2\" style=\"line-height:150%\">\n\t\t\t\t\t<i>Welcome to Loginizer Security. By default the <b>Brute Force Protection</b> is immediately enabled. You should start by going over the default settings and tweaking them as per your needs.</i>\n\t\t\t\t\t<?php \n\t\t\t\t\tif(defined('LOGINIZER_PREMIUM')){\n\t\t\t\t\t\techo '<br><i>In the Premium version of Loginizer you have many more features. We recommend you enable features like <b>reCAPTCHA, Two Factor Auth or Email based PasswordLess</b> login. These features will improve your websites security.</i>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<br><i><a href=\"'.LOGINIZER_PRICING_URL.'\" target=\"_blank\" style=\"text-decoration:none;color:red;\">Upgrade to Pro</a> for more features like <b>reCAPTCHA, Two Factor Auth, Rename wp-admin and wp-login.php pages, Email based PasswordLess</b> login and more. These features will improve your website\\'s security.</i>';\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t</form>\n\t\t\n\t\t</div>\n\t</div>\n\t\n\t<div class=\"postbox\">\n\t\n\t\t<div class=\"postbox-header\">\n\t\t<h2 class=\"hndle ui-sortable-handle\">\n\t\t\t<span><?php echo __('System Information', 'loginizer'); ?></span>\n\t\t</h2>\n\t\t</div>\n\t\t<div class=\"inside\">\n\t\t\n\t\t<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t<?php wp_nonce_field('loginizer-options'); ?>\n\t\t<table class=\"wp-list-table fixed striped users\" cellspacing=\"1\" border=\"0\" width=\"95%\" cellpadding=\"10\" align=\"center\">\n\t\t<?php\n\t\t\techo '\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\" width=\"25%\">'.__('Loginizer Version', 'loginizer').'</th>\n\t\t\t\t<td>'.LOGINIZER_VERSION.(defined('LOGINIZER_PREMIUM') ? ' (<font color=\"green\">Security PRO Version</font>)' : '').'</td>\n\t\t\t</tr>';\n\t\t\t\n\t\t\tdo_action('loginizer_system_information');\n\t\t\t\n\t\t\techo '<tr>\n\t\t\t\t<th align=\"left\">'.__('URL', 'loginizer').'</th>\n\t\t\t\t<td>'.get_site_url().'</td>\n\t\t\t</tr>\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\">'.__('Path', 'loginizer').'</th>\n\t\t\t\t<td>'.ABSPATH.'</td>\n\t\t\t</tr>\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\">'.__('Server\\'s IP Address', 'loginizer').'</th>\n\t\t\t\t<td>'.@$_SERVER['SERVER_ADDR'].'</td>\n\t\t\t</tr>\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\">'.__('Your IP Address', 'loginizer').'</th>\n\t\t\t\t<td>'.lz_getip().'\n\t\t\t\t\t<div style=\"float:right\">\n\t\t\t\t\t\tMethod : \n\t\t\t\t\t\t<select name=\"lz_ip_method\" id=\"lz_ip_method\" style=\"font-size:11px; width:150px\" onchange=\"lz_ip_method_handle()\">\n\t\t\t\t\t\t\t<option value=\"0\" '.lz_POSTselect('lz_ip_method', 0, (@$loginizer['ip_method'] == 0)).'>REMOTE_ADDR</option>\n\t\t\t\t\t\t\t<option value=\"1\" '.lz_POSTselect('lz_ip_method', 1, (@$loginizer['ip_method'] == 1)).'>HTTP_X_FORWARDED_FOR</option>\n\t\t\t\t\t\t\t<option value=\"2\" '.lz_POSTselect('lz_ip_method', 2, (@$loginizer['ip_method'] == 2)).'>HTTP_CLIENT_IP</option>\n\t\t\t\t\t\t\t<option value=\"3\" '.lz_POSTselect('lz_ip_method', 3, (@$loginizer['ip_method'] == 3)).'>CUSTOM</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t\t<input name=\"lz_custom_ip_method\" id=\"lz_custom_ip_method\" type=\"text\" value=\"'.lz_optpost('lz_custom_ip_method', @$loginizer['custom_ip_method']).'\" style=\"font-size:11px; width:100px; display:none\" />\n\t\t\t\t\t\t<input name=\"save_lz_ip_method\" class=\"button button-primary\" value=\"Save\" type=\"submit\" />\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\">'.__('wp-config.php is writable', 'loginizer').'</th>\n\t\t\t\t<td>'.(is_writable(ABSPATH.'/wp-config.php') ? '<span style=\"color:red\">Yes</span>' : '<span style=\"color:green\">No</span>').'</td>\n\t\t\t</tr>';\n\t\t\t\n\t\t\tif(file_exists(ABSPATH.'/.htaccess')){\n\t\t\t\techo '\n\t\t\t<tr>\t\t\t\t\n\t\t\t\t<th align=\"left\">'.__('.htaccess is writable', 'loginizer').'</th>\n\t\t\t\t<td>'.(is_writable(ABSPATH.'/.htaccess') ? '<span style=\"color:red\">Yes</span>' : '<span style=\"color:green\">No</span>').'</td>\n\t\t\t</tr>';\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t?>\n\t\t</table>\n\t\t</form>\n\t\t\n\t\t</div>\n\t</div>\n\n<script type=\"text/javascript\">\n\nfunction lz_ip_method_handle(){\n\tvar ele = jQuery('#lz_ip_method');\n\tif(ele.val() == 3){\n\t\tjQuery('#lz_custom_ip_method').show();\n\t}else{\n\t\tjQuery('#lz_custom_ip_method').hide();\n\t}\n};\n\nlz_ip_method_handle();\n\n</script>\n\t\n\t<div id=\"\" class=\"postbox\">\n\t\n\t\t<div class=\"postbox-header\">\n\t\t<h2 class=\"hndle ui-sortable-handle\">\n\t\t\t<span><?php echo __('File Permissions', 'loginizer'); ?></span>\n\t\t</h2>\n\t\t</div>\n\t\t\n\t\t<div class=\"inside\">\n\t\t\n\t\t<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n\t\t<?php wp_nonce_field('loginizer-options'); ?>\n\t\t<table class=\"wp-list-table fixed striped users\" border=\"0\" width=\"95%\" cellpadding=\"10\" align=\"center\">\n\t\t\t<?php\n\t\t\t\n\t\t\techo '\n\t\t\t<tr>\n\t\t\t\t<th style=\"background:#EFEFEF;\">'.__('Relative Path', 'loginizer').'</th>\n\t\t\t\t<th style=\"width:10%; background:#EFEFEF;\">'.__('Suggested', 'loginizer').'</th>\n\t\t\t\t<th style=\"width:10%; background:#EFEFEF;\">'.__('Actual', 'loginizer').'</th>\n\t\t\t</tr>';\n\t\t\t\n\t\t\t$wp_content = basename(dirname(dirname(dirname(__FILE__))));\n\t\t\t\n\t\t\t$files_to_check = array('/' => array('0755', '0750'),\n\t\t\t\t\t\t\t\t'/wp-admin' => array('0755'),\n\t\t\t\t\t\t\t\t'/wp-includes' => array('0755'),\n\t\t\t\t\t\t\t\t'/wp-config.php' => array('0444'),\n\t\t\t\t\t\t\t\t'/'.$wp_content => array('0755'),\n\t\t\t\t\t\t\t\t'/'.$wp_content.'/themes' => array('0755'),\n\t\t\t\t\t\t\t\t'/'.$wp_content.'/plugins' => array('0755'),\n\t\t\t\t\t\t\t\t'.htaccess' => array('0444'));\n\t\t\t\n\t\t\t$root = ABSPATH;\n\t\t\t\n\t\t\tforeach($files_to_check as $k => $v){\n\t\t\t\t\n\t\t\t\t$path = $root.'/'.$k;\n\t\t\t\t$stat = @stat($path);\n\t\t\t\t$suggested = $v;\n\t\t\t\t$actual = substr(sprintf('%o', $stat['mode']), -4);\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t<tr>\n\t\t\t\t<td>'.$k.'</td>\n\t\t\t\t<td>'.current($suggested).'</td>\n\t\t\t\t<td><span '.(!in_array($actual, $suggested) ? 'style=\"color: red;\"' : '').'>'.$actual.'</span></td>\n\t\t\t</tr>';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t?>\n\t\t</table>\n\t\t</form>\n\t\t\n\t\t</div>\n\t</div>\n\n<?php\n\t\n\tloginizer_page_footer();\n\n}", "title": "" }, { "docid": "ab593bac5f4d0a307f252da5ff858e54", "score": "0.5466938", "text": "public function run() {\r\n\r\n if (!isset($this->model))\r\n $this->model = new LoginForm;\r\n\r\n $this->render('loginForm', array('model' => $this->model));\r\n }", "title": "" }, { "docid": "a6b7e4d5a32711b70fd855fb6118f90f", "score": "0.5465301", "text": "public function doLogin(){\n\t\t\t//check if there is a newly registered user\n\t\t\tif($this->model->isJustRegistered()){\n\t\t\t\t$this->loginView->setMessageRegSuccess();\n\t\t\t\t$this->loginView->setUsernameField($this->model->getSessionUsername());\n\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t$this->model->clearSessionUsername();\n\t\t\t} else $this->loginView->clearMessage();\n\t\n\t\t\t$requestUser = $this->loginView->getRequestUserName();\n\t\t\t$requestPassword = $this->loginView->getRequestPassword();\n\t\t\t\n\t\t\tif($this->loginView->didUserPressLogin() ){\n\t\t\t\t\t\n\t\t\t\tif(empty($requestUser)){\n\t\t\t\t\t$this->loginView->setErrorUsername();\n\t\t\t\t} else if(empty($requestPassword)){\n\t\t\t\t\t$this->loginView->setErrorPassword();\n\t\t\t\t\t$this->loginView->setUsernameField($requestUser);\n\t\t\t\t} else if($this->userList->isCredentialsCorrect($requestUser,$requestPassword)){\n\t\t\t\t\tif($this->model->isLoggedIn() == false){\n\t\t\t\t\t\t$this->loginView->setWelcomeMessage();\n\t\t\t\t\t\t$this->model->toggleLogged();\n\t\t\t\t\t//if there is a session in place, remove the message\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$this->loginView->clearMessage();\n\t\t\t\t\t}\n\t\t\t\t} else{ \n\t\t\t\t\t$this->loginView->setErrorElse();\n\t\t\t\t\t$this->loginView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse if($this->loginView->didUserPressLogout() ){\n\t\t\t\tif($this->model->isLoggedIn() == true){\n\t\t\t\t\t$this->loginView->setByeMessage();\n\t\t\t\t\t$this->model->toggleLogged();\n\t\t\t\t\t\n\t\t\t\t//if the session is finished, remove the message\n\t\t\t\t}else {\n\t\t\t\t\t$this->loginView->clearMessage();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a9e04567c58772e9e168d2538b8b598f", "score": "0.54630923", "text": "public function getLogin() {\n\n // Redirect if logged in or show Login screen\n $this->loginRedirect();\n new LoginView;\n\n }", "title": "" }, { "docid": "f953098242279b20374d543a1377fa62", "score": "0.5461623", "text": "public function showLogin(){\nob_start();\nif(!isset($_SESSION)){session_start();}\n\nif(isset($_SESSION['USER_ID']))\n{\n echo \"<li class='mdl-menu__item'>\".$_SESSION['FIRST_NAME'].\" \".$_SESSION['LAST_NAME'].\"</li>\";\n echo \"<li class='mdl-menu__item'><a href='profile.php'>My Profile</a></li>\";\n echo \"<li class='mdl-menu__item'><a href='settings.php'>Settings</a></li>\";\n echo \"<li class='mdl-menu__item'><a href='logout.php'>Logout</a></li>\";\n}\n\nelse{\n echo \"<li class='mdl-menu__item'><a href='login.php'>Log in</a></li>\";\n echo \"<li class='mdl-menu__item'><a href='signup.php'>Register</a></li>\";\n}\n}", "title": "" }, { "docid": "68972b1c1dfccf9658791585749e17be", "score": "0.54597425", "text": "public function login(){\n $this->title = 'Acesso Ao Login';\n $this->layout = '_layout.login';\n $this->view();\n }", "title": "" }, { "docid": "aeb72d4962640077ee067596427378a7", "score": "0.54574674", "text": "function login()\n\t{\n\t\t$this->data['stylesheets']['end']['cf-hidden']\t\t= get_css('.cf-hidden { display: none; } .cf-invisible { visibility: hidden; }',TRUE);\n\t\t$this->data['javascripts']['mid']['bs-timeout'] = NULL; \n\t\t$this->data['javascripts']['end']['screen_lock_code'] = NULL;\t\t\n\n\t\t// \n\t\t$dashboard = 'dashboard';\n\t\t$bcs \t = '/';\n\t\t\n\t\tif ($this->ion_auth->logged_in() == TRUE) \n\t\t{\n\t\t\tif (!$this->ion_auth->is_admin()) \n\t\t\t{\n\t\t\t\tredirect($bcs);\n\t\t\t} else {\n\t\t\t\tredirect($dashboard);\n\t\t\t}\n\t\t} \n\t\t\n\t\t$this->data['title'] = 'Login to BUCOSU';\n\t\t$this->data['body_class'] = 'external-page external-alt sb-l-c sb-r-c';\n\t\t$this->data['logo']['class'] = 'center-block img-responsive';\n\t\t$this->data['logo']['style'] = 'max-width: 275px;';\n\n\n\t\t\n\t\t//validate form input\n\t\t$this->form_validation->set_rules('identity', 'Identity', 'required|valid_email');\n\t\t$this->form_validation->set_rules('password', 'Password', 'required');\n\t\t\t\n\t\tif ($this->form_validation->run() == true)\n\t\t{\n\n\t\t\t//check to see if the user is logging in\n\t\t\t//check for \"remember me\"\n\t\t\t$remember = (bool) $this->input->post('remember');\n\n\t\t\tif ($this->ion_auth->login($this->input->post('identity'), $this->input->post('password'), $remember))\n\t\t\t{\n\t\t\t\t//if the login is successful\n\t\t\t\t//redirect them back to the home page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\n\t\t\t\tif (!$this->ion_auth->is_admin()) \n\t\t\t\t{\n\t\t\t\t\tredirect($bcs);\n\t\t\t\t} else {\n\t\t\t\t\tredirect($dashboard);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if the login was un-successful\n\t\t\t\t//redirect them back to the login page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\tredirect('auth/login', 'refresh'); //use redirects instead of loading views for compatibility with MY_Controller libraries\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//the user is not logging in so display the login page\n\t\t\t//set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\n\t\t\t$this->data['identity'] = array('name' => 'identity',\n\t\t\t\t'id' => 'identity',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('identity'),\n\t\t\t\t'class' => 'gui-input',\n\t\t\t\t'placeholder' => 'Enter username',\n\t\t\t);\n\t\t\t$this->data['password'] = array('name' => 'password',\n\t\t\t\t'id' => 'password',\n\t\t\t\t'type' => 'password',\n\t\t\t\t'class' => 'gui-input',\n\t\t\t\t'placeholder' => 'Enter password',\n\t\t\t);\n\t\t\t$subView = 'auth/login';\n\t\t\t$mainView = 'ui/_layout_modal';\n\t\t\t$this->load_structure($subView,$mainView);\n\n\n\t\t\t//$this->_render_page('auth/login', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "deca5303f970d81771bdd709824262f8", "score": "0.54522574", "text": "public function user()\n {\n $session_data = $this->is_logged_in();\n\n $this->load->view('head_section', $session_data);\n $this->load->view('left_side_menu', $session_data);\n $this->load->view('ct_btn', $session_data);\n }", "title": "" }, { "docid": "b08765c8616bcd3826aa69db3d5976ac", "score": "0.545134", "text": "public function init()\n {\n if ($this->getUserId()) {\n if ($this->_helper->adblade->isCobrand()) {\n $this->_helper->redirector->gotoSimpleAndExit(null,'ads');\n } else {\n $this->_helper->redirector->gotoSimpleAndExit('account','control');\n }\n }\n\n // Set custom layout for cobrands\n if ($this->_helper->adblade->isCobrand()) {\n $this->getHelper('layout')->getLayoutInstance()->setLayout('cobrand/cobrand-registration');\n } else {\n $this->getHelper('layout')->getLayoutInstance()->setLayout('home');\n }\n }", "title": "" }, { "docid": "c854964b8623e147ca539947934ea42f", "score": "0.54476315", "text": "public function action_login() {\n $view = View::factory('login/login');\n\n $this->template->title = __('Login');\n $this->template->content = $view;\n }", "title": "" }, { "docid": "70616b132fbc58a6bb2ae5d1edcc028e", "score": "0.5447476", "text": "private function showPageLoginForm()\n {\n if ($this->feedback) {\n echo $this->feedback . \"<br/><br/>\";\n }\n\n echo '<h2>Bank Login</h2>';\n\n echo '<form method=\"post\" action=\"' . $_SERVER['SCRIPT_NAME'] . '\" name=\"loginform\">';\n echo '<label for=\"login_input_username\">Username</label> ';\n echo '<input id=\"login_input_username\" type=\"text\" name=\"user_name\" required /> ';\n echo '<label for=\"login_input_password\">Password</label> ';\n echo '<input id=\"login_input_password\" type=\"password\" name=\"user_password\" required /> ';\n echo '<input type=\"submit\" name=\"login\" value=\"Log in\" />';\n echo '</form>';\n\n echo '<a href=\"' . $_SERVER['SCRIPT_NAME'] . '?action=register\">Register new account</a>';\n echo '<br><div><img src=\"/bank.jpg\" /></div>';\n }", "title": "" } ]
b18c6877c13e753e71a723294c70def9
$oEnchere = new Enchere($_GET['idEnchere']);
[ { "docid": "ecf4ece7fa3eb3fa94e32813d008ef6b", "score": "0.0", "text": "public function gererAjaxAjoutOffre()\n {\n\n VueEnchere::xmlAjaxAjoutOffre();\n }", "title": "" } ]
[ { "docid": "d07708992dadeaf828bde14422f70083", "score": "0.7112467", "text": "public function gererUneEnchere()\n {\n if(isset($_GET['idEnchere']))\n {\n $oEnchere = new Enchere($_GET['idEnchere']);\n $oEnchere->chargerUneEnchereParIdEnchere();\n }\n elseif(isset($_GET['idOeuvre']))\n {\n $idEnchere = Enchere::rechercherIdEnchereParIdOeuvre($_GET['idOeuvre']);\n $oEnchere = new Enchere($idEnchere);\n $oEnchere->chargerUneEnchereParIdEnchere();\n }\n\n VueEnchere::afficherUneEnchere($oEnchere);\n }", "title": "" }, { "docid": "2d7eee37b39f016b01162c7886520654", "score": "0.63928944", "text": "function __construct($eid){\n\t\t$this->eid = $eid; \n\t\n\t }", "title": "" }, { "docid": "51371bc65c5aea59ec2d2269d6d8c4ca", "score": "0.63763684", "text": "public function __construct($idEntrada){\n $this->idEntrada=$idEntrada;\n }", "title": "" }, { "docid": "9ac0d4ae949b0d4a4b6188d676c1f15b", "score": "0.6184345", "text": "function buscarEncuesta($id_estudiante)\n{\n $obj_encuesta_areas_model = new Encuesta_Areas_Model();\n return $obj_encuesta_areas_model->buscarEncuesta($id_estudiante);\n}", "title": "" }, { "docid": "e5392f35a21de5679b6b15fda24c4d67", "score": "0.6179145", "text": "function cl_acertid() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acertid\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e22aa10e77d5afc69b8bc95eee57da05", "score": "0.60693425", "text": "function cl_aidof() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aidof\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "9e049bb40a65b6f8b7f4dbb8142500df", "score": "0.5959714", "text": "function cl_matestoqueitemunid() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"matestoqueitemunid\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "1ff4253b6d7d321e5f507c80f592f49a", "score": "0.59575933", "text": "function cl_empempenho() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empempenho\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "820b1f6fb062505bb2419bb50f78219a", "score": "0.59513426", "text": "function cl_empagetipo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagetipo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7ace45120e06eb441d5793e037795fec", "score": "0.59457505", "text": "public function obtenerEnlace($idEnlace){\n $enlace = null;\n //Se forma la consulta\n $consulta = \"SELECT * FROM enlaces WHERE id=$idEnlace\";\n //Obtenemos los registros\n $datos = mysqli_query($this->conex,$consulta);\n if(mysqli_num_rows($datos) > 0){\n $reg = mysqli_fetch_array($datos);\n $enlace = new Enlace($reg['id'], $reg['url'], $reg['nombre'], $reg['id_tipo']);\n }\n return $enlace;\n }", "title": "" }, { "docid": "5f04d77e2f863289a0ca9cf3ab83e38f", "score": "0.5932791", "text": "function cl_empresto() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empresto\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6525ac5d5765b35e4a5a02523d80dac7", "score": "0.5932553", "text": "function cl_empautitem() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empautitem\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "28d3a154f391d3bb49ba800763262d58", "score": "0.5910631", "text": "function cl_acordoencerramentolicitacon() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acordoencerramentolicitacon\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4aa59f4662b9ed528fa1898db5f807cb", "score": "0.5892766", "text": "public function __construct($ID_Etudiant=\"\",$_ID_Type=\"\",$ID_Chambre=\"\"){\n /* parent::__construct($_ID_Etudiant=\"\");*/\n $this->ID_Type=$_ID_Type;\n $this->ID_Chambre=$_ID_Chambre;\n }", "title": "" }, { "docid": "0ebed5b2ed33f3931a0d11fc21758bc4", "score": "0.5878887", "text": "public function getId(){\n\t\treturn $this->_idAcheteur;\n\t }", "title": "" }, { "docid": "42e1cd405a2ce4bb5dc91570470785d6", "score": "0.58515966", "text": "static function get($id){\n\tglobal $bdd;\n\t\n\ttry {\n\t\t$req = \"SELECT * FROM ec WHERE id = '\" . $id . \"'\";\n\t\t$result = $bdd->query($req);\n\t\t\n\t\t$row = $result->fetch();\n\t\t\n\t\t// On renvoi null si on a aucun resultat\n\t\tif(empty($row))\n\t\t\treturn null;\n\t\t// Sinon renvoi l'EC\n\t\telse\n\t\t\treturn new EC ($row['id'], $row['nom'], $row['prenom'], $row['bureau'], $row['id_pole']);\n\t\t\t\n\t} catch(PDOException $e) { die (\"Erreur lors de l'exécution de la requéte : \" . $e->getMessage()); }\n}", "title": "" }, { "docid": "ee4f341a18cc096f9b54bfaeac062851", "score": "0.58506244", "text": "public function setIdEtudiant($idEtudiant)\n{\n$this->idEtudiant = $idEtudiant;\n\nreturn $this;\n}", "title": "" }, { "docid": "a3928d3aa6224a7fe14ded8c70055b27", "score": "0.5822648", "text": "public function getUneEcole($idEcole)\n {\n $query = $this->db->prepare(\"SELECT * FROM Ecole WHERE idEcole =':idEcole'\");\n $query->bindValue(\":idEcole\",$idEcole);\n $query->execute();\n $data = $query->fetch();\n $uneEcole = new Ecole($data[\"idEcole\"],$data[\"nom\"], $data[\"ville\"], $data[\"lienPhoto\"]);\n return $uneEcole;\n }", "title": "" }, { "docid": "fcb6a6c85cdd029763fb0662014f59e7", "score": "0.581835", "text": "function detallarEncuestaPorEstudiante($id_estudiante)\n{\n $obj_encuesta_areas_model = new Encuesta_Areas_Model();\n return $obj_encuesta_areas_model->detallesEncuestaPorEstudiante($id_estudiante);\n}", "title": "" }, { "docid": "b1a5b68208c0e2de796ca86c2edea3f5", "score": "0.58006686", "text": "function __construct (/*$ID ,$nombre, $direccion, $capacidad, $valor_entrada*/){\n }", "title": "" }, { "docid": "bbca34568c8df9d0375e4dc71fa2b452", "score": "0.57843727", "text": "function cl_isentaxa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"isentaxa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "18ce09ffa1bfdd7e923c71bc399cc803", "score": "0.576674", "text": "function cl_agualeituracancela() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"agualeituracancela\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8d406b87cee3bba6cd2b5145b07f64fc", "score": "0.5758636", "text": "function cl_tipoassentamentoferias() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipoassentamentoferias\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e33afe498971d25c3af1f956c86c3ccc", "score": "0.57575375", "text": "public function getIdEtudiant()\n{\nreturn $this->idEtudiant;\n}", "title": "" }, { "docid": "fe55d0d9f64a69a361d0dcf66da91a30", "score": "0.572796", "text": "function cl_mer_infaluno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"mer_infaluno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8b2f9f31cf1ea02243f240230a2caaeb", "score": "0.5701755", "text": "public function busqueda(){\n $idMarca = $_REQUEST[\"id\"];\n $genero = Marca::find($idMarca);\n echo $genero->descripcion;\n }", "title": "" }, { "docid": "1b5076176ef4b512c60ce8eb1c6c1f4b", "score": "0.5697934", "text": "function cl_tipoassefinanceirorra() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipoassefinanceirorra\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "55603ac2f195ced4f4b2cd815af48495", "score": "0.56894684", "text": "function cl_escolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "b8194c1469c5b19c39ae57ee6ebb40bd", "score": "0.56488353", "text": "public function actionDatosenlace(){\n if(isset($_GET['id'])){\n \n $enlace = \\app\\models\\Enlace::find()->where('enl_id = '.$_GET['id'])->one();\n $data = $enlace->attributes;\n $r = json_encode($data);\n \n echo $r;\n } else {\n echo false;\n }\n }", "title": "" }, { "docid": "bc51ab8664082542772d5772bf0cca20", "score": "0.5611264", "text": "public function setLieu($lieu)\n{\n$this->lieu = $lieu;\n\n}", "title": "" }, { "docid": "d3938398e644f6b5ac013ba53e5b0729", "score": "0.5608721", "text": "function cl_fechamentotfdprocedimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"fechamentotfdprocedimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "13be5fe7742c9977f124aca9ebe5ce14", "score": "0.5608004", "text": "public function actionCrearenlace(){\n if(isset($_GET['idRegistro'])){\n \n $enlace = new \\app\\models\\Enlace();\n\n if(isset($_GET['idRegistro']) && $_GET['idRegistro'] != \"\"){\n $enlace = \\app\\models\\Enlace::find()->where('enl_id = '.$_GET['idRegistro'])->one();\n } \n\n $enlace->enl_nombre = $_GET['nombre_enlace']; \n $enlace->enl_descripcion = $_GET['detalle_enlace']; \n $enlace->enl_estado = $_GET['estado']; \n $enlace->enl_url = $_GET['url_enlace']; \n $enlace->enl_orden = $_GET['orden_enlace']; \n \n if($enlace->validate()){\n $enlace->save();\n echo true;\n } else {\n foreach ($enlace->errors as $key => $mns){\n echo $mns[0];\n break;\n }\n } \n } else {\n echo false;\n }\n }", "title": "" }, { "docid": "80bc0e6f792411a0047842b042787425", "score": "0.56072545", "text": "public function Obtener($id)\n\t{\n\t\t$codig = $_GET['intidproveedor'];\n\n\t\t$databaseHost = 'localhost';\n\t\t$databaseName = 'db_tiendastock';\n\t\t$databaseUsername = 'root';\n\t\t$databasePassword = '';\n\n\t\t$mysqli = mysqli_connect($databaseHost, $databaseUsername, $databasePassword, $databaseName); \n\t\t$sql = \"SELECT * FROM tbproveedor WHERE intidproveedor=$codig\";\n\t\t$result = $mysqli->query($sql);\n\n\t\tif ($result->num_rows >= 1) {\n\t\t //echo \"Si existe.\";\n\t\t} else {\n\t\t //echo \"No existe registro alguno.\";\n\t\t\t header(\"Location: proveedor.php\"); \n\t\t}\n\t\t\n\t\ttry \n\t\t{\n\t\t\t$stm = $this->pdo\n\t\t\t ->prepare(\"SELECT * FROM tbproveedor WHERE intidproveedor = ?\");\n\t\t\t \n\n\t\t\t$stm->execute(array($id));\n\t\t\t$r = $stm->fetch(PDO::FETCH_OBJ);\n\n\t\t\t$gam = new Proveedor();\n\n\t\t\t$gam->__SET('intidproveedor', $r->intidproveedor);\n\t\t\t$gam->__SET('intcodigo', $r->intcodigo);\n\t\t\t$gam->__SET('nvchnombre', $r->nvchnombre);\n\t\t\t$gam->__SET('nvchrazon_social', $r->nvchrazon_social);\n\n\t\t\t$gam->__SET('nvchdomicilio', $r->nvchdomicilio);\n\t\t\t$gam->__SET('nvchlocalidad', $r->nvchlocalidad);\n\t\t\t$gam->__SET('intfax', $r->intfax);\n\t\t\t$gam->__SET('inttelefono', $r->inttelefono);\n\n\t\t\t$gam->__SET('intcelular', $r->intcelular);\n\t\t\t$gam->__SET('nvchsitio_web', $r->nvchsitio_web);\n\t\t\t$gam->__SET('nvchemail_1', $r->nvchemail_1);\n\t\t\t$gam->__SET('nvchemail_2', $r->nvchemail_2);\n\n\t\t\t$gam->__SET('inttipo_doc', $r->inttipo_doc);\n\t\t\t$gam->__SET('intcod_doc', $r->intcod_doc);\n\n\t\t\treturn $gam;\n\t\t} catch (Exception $e) \n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7dad67586c0ce541c56a37fc3995faa9", "score": "0.56010306", "text": "function cl_tfd_passageiroveiculo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_passageiroveiculo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "af132af722dd7b346193a199d5f5d910", "score": "0.56004614", "text": "function cl_orcunidade() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcunidade\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6f37c6fd8cef034243dbf8a5af127af7", "score": "0.5598704", "text": "function cl_orcindica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcindica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d7b98f08a334f5c44e3c69023d57ab4c", "score": "0.5583951", "text": "function cl_tipoasseexterno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipoasseexterno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4457a00aafa0d48224603be2fa6328e6", "score": "0.55659735", "text": "function __construct($id, $nombre, $nombre2, $orden) {\n $this->id = $id;\n $this->nombre = $nombre;\n $this->nombre2 = $nombre2;\n $this->orden = $orden;\n }", "title": "" }, { "docid": "34e15189d402b5f0422c2d9bedca0539", "score": "0.5558961", "text": "public function __construct () {\n parent::__construct ( 'esercito' );\n\n }", "title": "" }, { "docid": "8e9b41c42ed6522dbb43cc449ea28948", "score": "0.5546176", "text": "function luoSuositus($puuhaid, $suositusid) {\n $suositus = new Suositukset();\n $suositus->setPuuhaId($puuhaid);\n $suositus->setSuositusId($suositusid);\n $suositus->setPuuhaajaId(annaKirjautuneenId());\n $suositus->setSuositusTeksti($_POST['suosittelu']);\n return $suositus;\n}", "title": "" }, { "docid": "085533790d13a33ce02bc51606e0c409", "score": "0.5535192", "text": "public function inscription()\n {\n $id = 0;\n if (isset($_GET['id'])) {\n $id = $_GET['id'];\n }\n // Affichage\n require 'view/inscription-view.php';\n }", "title": "" }, { "docid": "a602264a5ac43662d70ef071251ead32", "score": "0.55349606", "text": "function cl_tfd_pedidoregulado() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_pedidoregulado\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "343b1d7391383a8a399cc9d9dae1ff36", "score": "0.5527586", "text": "public function setIdnombre($p_idnombre){\r\n\t$this->idnombre=$p_idnombre;\r\n}", "title": "" }, { "docid": "d00d8726cad3e3164afbd7caffb3f028", "score": "0.55264807", "text": "function cl_gerfcom() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"gerfcom\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "99df2f86db2ad08432e4aa61373632af", "score": "0.5524939", "text": "function cl_acervoreserva() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acervoreserva\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "282adff6dea035469740534817428726", "score": "0.55239034", "text": "public function getIdnombre(){\r\n\treturn $this->idnombre;\r\n}", "title": "" }, { "docid": "723335ed47c4b2b625d5b84cf2edf8de", "score": "0.5520901", "text": "public function find_indemnite($annee_indemnite) {\n $connexion = get_connexion();\n $sql = \"SELECT * FROM indemnite WHERE annee_indemnite =:annee_indemnite\";\n\n try {\n $sth = $connexion->prepare($sql);\n $sth->execute(array(\":annee_indemnite\" => $annee_indemnite));\n $row = $sth->fetch(PDO::FETCH_ASSOC);\n } \n catch (PDOException $e) {\n die( \"<p>Erreur lors de la requête SQL : \" . $e->getMessage() . \"</p>\");\n }\n\n $indemnite_object = new Indemnite($row);\n\n return $indemnite_object;\n\n }", "title": "" }, { "docid": "07182a999ae71da9b35017605394198f", "score": "0.55184346", "text": "function cl_retencaoreceitas() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"retencaoreceitas\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0cd0c916e38523f3ddbe3dc39fd240ca", "score": "0.5515862", "text": "function __construct($class='',$id=''){\n\t\t$this->class = $class;\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "3525b37b836af48993fbbade8f26572a", "score": "0.55145496", "text": "function cl_agendaconsultaanula() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"agendaconsultaanula\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "84c2412164b1e3d224c609bc5e2c7e8b", "score": "0.55071104", "text": "function cl_certidlivro() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"certidlivro\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f8408a9b60ba30a45bb1a58ba0a5d42a", "score": "0.55035263", "text": "function salvar_editar(){\n\n $caminhoneiro = new Crudcaminhoneiro();\n $caminhoneiro->editar($_POST['id_caminhoneiro'], $_POST['nome'], $_POST['email'], $_POST['telefone'], $_POST['senha'], $_POST['rg'], $_POST['cpf'], $_POST['num_cnh'], $_POST['cod_cidade']);\n\n}", "title": "" }, { "docid": "93bcfd766926619ec957ab9df30d8282", "score": "0.5500289", "text": "function salvar_editar() {\r\n\r\n $transportadora = new CrudTransportadora();\r\n $transportadora->editar($_POST['id_transportadora'], $_POST['nome'], $_POST['email'], $_POST['telefone'], $_POST['senha'], $_POST['razo_social'], $_POST['cnpj'], $_POST['cidade_cod_cidade']);\r\n\r\n}", "title": "" }, { "docid": "0989bad68147a59a8971b88c5f15edf4", "score": "0.54984426", "text": "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $this->setNometabella(\"email\");\n $this->tabella= array(\"nome\"=>\"\",\"lingua\"=>\"\",\"oggetto\"=>\"\",\"url\"=>\"\",\"testo\"=>\"\");\n parent::__construct($id);\n}", "title": "" }, { "docid": "c6fcf33ddf4fecdac46c4374e2c5df8f", "score": "0.5497662", "text": "public static function read() {\r\n if (!isset($_GET['idp'])) {\r\n //appelle l'erreur\r\n self::error('noPeluche');\r\n } else {\r\n $id = rawurlencode($_GET['idp']);\r\n //récupère la peluche\r\n $peluche = ModelPeluche::select($id);\r\n //si aucune peluche n'a l'id de l'url\r\n if ($peluche == false) {\r\n //appelle l'erreur\r\n self::error('noPeluche');\r\n } else {\r\n if(isset($_GET['lastqte'])) {\r\n $lastqte = $_GET['lastqte'];\r\n $html_value = $_GET['lastqte'];\r\n $html_hidden = '<input type=\"hidden\" name=\"lastqte\" value=\"'.$lastqte.'\">';\r\n $html_submit = 'Modifier';\r\n $html_legend = 'Modifier la quantité';\r\n } else {\r\n $html_value = 1;\r\n $html_hidden = '';\r\n $html_legend = 'Ajouter au panier';\r\n $html_submit = 'Ajouter';\r\n }\r\n\r\n //on stock ses données\r\n $p_idp = $peluche->getIdp();\r\n $p_nom = $peluche->getNom();\r\n $p_couleur = $peluche->getCouleur();\r\n $p_description = $peluche->getDescription();\r\n $p_prix = $peluche->getPrix();\r\n $p_taille = $peluche->getTaille();\r\n $p_image = $peluche->getImage();\r\n\r\n\r\n if (Session::isAdmin()) {\r\n $html_admin = '<br> <a href=\"index.php?action=delete&idp='\r\n . $id . '\" > supprimer</a> <a href=\"index.php?action=update&idp='\r\n . $id . '\" > modifier</a>';\r\n } else {\r\n $html_admin = '';\r\n } \r\n\r\n //paramètres de la vue désirée\r\n $view = 'detail';\r\n $pagetitle = 'Votre peluche';\r\n $controller = 'peluche';\r\n //redirige vers la vue\r\n require File::build_path(array('view', 'view.php'));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "545cedda1d273782287046abd737815a", "score": "0.54937667", "text": "public function edit(Encuentro $encuentro)\n {\n //\n }", "title": "" }, { "docid": "b077c988c4a3267046bda91470bc6e51", "score": "0.5491615", "text": "public function show($idAsesor)\n {\n\n }", "title": "" }, { "docid": "d3e06fde4fc7ca7a8609980e44bc0c07", "score": "0.54884785", "text": "function mostrar_noticia(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM noticia WHERE id_not='$id'\";\n\t\t\t$consulta=mysql_query($sql);\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->categoria = $resultado['categoria_not'];\n\t\t\t$this->titulo = $resultado['titulo_not'];\n\t\t\t$this->subtitulo = $resultado['subtitulo_not'];\n\t\t\t$this->contenido = $resultado['contenido_not'];\n\t\t\t$this->fecha = $resultado['fecha_not'];\n\t\t\t$this->autor = $resultado['autor_not'];\n\t\t\t\n\t\t} \n\t}", "title": "" }, { "docid": "1db66921ecde53f26076072a2e4b5e6b", "score": "0.54816103", "text": "function get_id($id = \"\") {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "b2cb829c18f9cf3d9ad58c0f873fdc8c", "score": "0.5476991", "text": "function cl_matestoqueinimeimri() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"matestoqueinimeimri\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "fd064607bcd28de96444381415e8d76e", "score": "0.5470156", "text": "function cl_orcsuplemrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcsuplemrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "bf8f550f9785e757958cd05ec62578d3", "score": "0.5462463", "text": "function cl_vitimas_acid() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"vitimas_acid\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c412862f69f675df54d7edfda5963be9", "score": "0.5461112", "text": "function cl_vac_vacinamaterial() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"vac_vacinamaterial\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "16d829039fbb4c769d693a54a3b77617", "score": "0.5459716", "text": "function cl_agendamentos() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"agendamentos\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "160e48c923dc2a8f8a8b69f1684fd843", "score": "0.5459163", "text": "public function __construct(){\n$this->acId = \"\";\n$this->acNombre = \"\";\n}", "title": "" }, { "docid": "84f707a4cf7f6ea48a3f3c7fcc0626f6", "score": "0.5452941", "text": "function editar(){\n\n $caminhoneiro = new Crudcaminhoneiro();\n $caminhoneiro = $caminhoneiro->getCaminhoneiro($_GET['id_caminhoneiro']);\n\n include __DIR__ . \"/../views/Caminhoneiro/caminhoneiro_editar.php\";\n\n}", "title": "" }, { "docid": "f95d752285d2c39df83271e0d5d91dff", "score": "0.544733", "text": "function cl_inicialcodforo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"inicialcodforo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7342eba726e1813fd203be6b40423c46", "score": "0.544047", "text": "function cl_trocaserie() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"trocaserie\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "cd697a13e760a61acca695df58ec10ec", "score": "0.54404694", "text": "function cl_itbialt() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itbialt\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0451c5da471d55db1f8bfb880b021cc6", "score": "0.5437095", "text": "function saveWohnung(){\n\tinclude_once \"classes/wohnung.php\";\n\t$wohnung = new wohnung();\n\t$wohnung->saveWohnung($_POST);\n}", "title": "" }, { "docid": "cf2df7279c802e52074ca722cb71269c", "score": "0.54366577", "text": "function cl_rhferiasperiodo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhferiasperiodo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8eee13ccec93fa71357b011a03fffbdc", "score": "0.5430517", "text": "function cl_aguacoletorexportadadosreceita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacoletorexportadadosreceita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ce68519ddf8cf758a4ef7f615a1c5acb", "score": "0.5430166", "text": "public function getId(){\n return $this->idFichier;\n }", "title": "" }, { "docid": "310718dd45a1c6d755ecfcc17e148c4e", "score": "0.54285425", "text": "public function getAlquilerJuego(){\n $idJuego = $_GET['ID_Juego'];\n $alquiler = $this->tiendaModel->getAlquilerJuego($idJuego);\n echo $alquiler;\n }", "title": "" }, { "docid": "18f3e301d6e70b7887135084484531ae", "score": "0.5425466", "text": "public function __construct($unUtilisateur)\r\n\t{\r\n\t\t// On utilise le constructeur de la classe mère\r\n\t\tparent::__construct();\r\n\r\n\t\t// On récupère l'utilisateur et le jeu\r\n\t\t$this->monUtilisateur = $unUtilisateur;\r\n\t\t\r\n\t\t//if (intval($_GET[\"idVersion\"])\r\n\t\t//http://127.0.0.1/ludotheque/module.php?idModule=FicheJeu&idVersion=1\r\n\t\t$this->maVersion = $_GET[\"idVersion\"];\r\n\t\tif ($this->maVersion==null){\r\n\t\t\theader('Location:' . PAGE_INDEX);\r\n\t\t}\r\n\t\t//$this->maVersion=1;\r\n\t\t\r\n\t\t\r\n\t\t// On affiche le contenu du module\r\n\t\t$this->baseDonnees = AccesAuxDonneesDev::recupAccesDonneesDev();\r\n\t\t\r\n\t\t// En entrée : l'idVersion\r\n\t\t$this->infosJeu = $this->baseDonnees->recupInfoJeu($this->maVersion);\r\n\t\t$this->maVersionIllustrateur = $this->baseDonnees->recupIllustrateurs($this->maVersion);\r\n\t\t$this->maVersionDistributeur = $this->baseDonnees->recupDistributeurs($this->maVersion);\r\n\t\t$this->maVersionEditeur = $this->baseDonnees->recupEditeurs($this->maVersion);\r\n\t\t$this->mesExemplaires = $this->baseDonnees->recupExemplaireJeu($this->maVersion);\r\n\t\t$this->maPhotoVersion = $this->baseDonnees->recupPhotoVersion($this->maVersion);\r\n\t\t$this->maCategorie = $this->baseDonnees->recupCategorieJeuVersion($this->baseDonnees->recupIdJeuVersion($this->maVersion));\r\n\t\t\r\n\t\t// On recupere l'id du jeu dans la version\r\n\t\t$this->monJeu = $this->recupIdJeu();\r\n\t\t\r\n\t\t// En entrée : l'idJeu\r\n\t\t$this->monJeuLangue = $this->baseDonnees->recupJeuLangue($this->monJeu);\r\n\t\t$this->monJeuAuteur = $this->baseDonnees->recupAuteurs($this->monJeu);\r\n\t\t//var_dump($this->monJeuAuteur);\r\n\t\t// On affiche les informations\r\n\t\t$this->afficheInfoJeu();\r\n\t\t\r\n\t\t//Affichage des liens de modifications en fonction du type de l'utilisateur\r\n\t\tif($this->testGroupe())\r\n\t\t\t$this->afficherModifier();\t\t\r\n\t\r\n\t}", "title": "" }, { "docid": "419c0c983978f6992670ff2feb9a430e", "score": "0.54176396", "text": "function cl_mer_item() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"mer_item\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "92a4dbffa5007d582c3d2b97b6526d85", "score": "0.54172707", "text": "function cl_notiagenda() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"notiagenda\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7c64c5fbfac10570283ef2cbb6540270", "score": "0.5417119", "text": "public function __construct1($t_data){\n global $mysqli;\n\n # Gets subscription data via $_POST (destroy)\n # or via $_GET (edit)\n $this->id = $t_data['id'];\n\n if (!empty($_POST)) {\n # Gets event data via $_POST (update)\n $this->init($_POST);\n\n } else {\n # Gets subscription data by id\n $query = \"SELECT nom, prenom, lieu FROM events_members\n INNER JOIN events ON events_members.event_id = events.id\n INNER JOIN members ON events_members.member_id = members.id\n WHERE events_members.id=$this->id\";\n $result = $mysqli->query($query) or die('Échec de la requête : ' . mysql_error());\n $events_member = $result->fetch_array();\n\n $this->init($events_member);\n\n # bonus : to display edit page\n $this->nom = $events_member['nom'];\n $this->prenom = $events_member['prenom'];\n $this->lieu = $events_member['lieu'];\n\n }\n\n }", "title": "" }, { "docid": "432e6356e42a7b9224e805a0fcc55bbd", "score": "0.54158443", "text": "function cl_mer_cardapioaluno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"mer_cardapioaluno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "468dfe4f558dd86e287a74438735959a", "score": "0.54145986", "text": "public function __construct($id);", "title": "" }, { "docid": "df69e8c24204060caf3c34e61df755ac", "score": "0.54048944", "text": "function cl_quadracemit() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"quadracemit\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a770a52aa76b322408d5fa5530aaeee6", "score": "0.53934914", "text": "public function edit(Vendeur $vendeur)\n {\n //\n }", "title": "" }, { "docid": "29e3b04d0f43cdaf642965cb17d3b811", "score": "0.53898543", "text": "function cl_afasta() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"afasta\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c36099757cb0aa4641043143d1df8ffa", "score": "0.5387342", "text": "function cl_afastamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"afastamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "e69d7f8ba45c43361d3b008d2f0d9e97", "score": "0.5383416", "text": "public function index(){\n// echo \"salut voici la liste des développeurs\";\n //recuperer les devs de l'équipe\n // 1- on recupere l'id de l'équipe dans l'url via $_GET\n $id_equipe = isset($_GET['id']) ? $_GET['id'] : null;\n $nom_equipe = isset($_GET['nom']) ? $_GET['nom'] : null;\n if(!empty($id_equipe) && !empty($nom_equipe)){\n $developpeur = new Developpeur();\n $developpeurs = $developpeur->findDeveloppeurEquipe($id_equipe);\n// var_dump($developpeurs);\n// die();\n require 'resources/views/developpeur/index.php';\n }\n }", "title": "" }, { "docid": "7169ae0a517da6187d9f4c76b2443ff3", "score": "0.53634423", "text": "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->nombre = \"\";\n\n\t}", "title": "" }, { "docid": "1b4c7dc03a747469b5c056deb1ee4011", "score": "0.53606194", "text": "function get_datosE()\n {\n\n $data['id'] = $_REQUEST['txt_id'];\n $data['cedula'] = $_REQUEST['txt_cedula'];\n $data['nombre'] = $_REQUEST['txt_nombre'];\n $data['apellidos'] = $_REQUEST['txt_apellidos'];\n $data['promedio'] = $_REQUEST['txt_promedio'];\n $data['edad'] = $_REQUEST['txt_edad'];\n $data['fecha'] = $_REQUEST['txt_fecha'];\n\n if ($_REQUEST['id'] == \"\") {\n $this->model_e->create($data);\n }\n\n if ($_REQUEST['id'] != \"\") {\n $date = $_REQUEST['id'];\n $this->model_e->update($data, $date);\n }\n\n header(\"Location:index.php?m=verEstudiantes\");\n }", "title": "" }, { "docid": "91d0a0ecb652ae0509f7b886d67b15d6", "score": "0.53588927", "text": "function gestione_utenti(){\n\t\tforeach($_GET as $k=>$v){\n\t\t\t$this->$k = $v;\n\t\t}\n\t\t$this->standard_layout = true;\n\t\t$this->title = \"Area Riservata\";\n\t\t$this->db = new DBConn();\n\t\t$this->color = \"#F60\";\n\t\t$this->cerca = false;\n\t\t$this->auth = array('eliminare utenti', 'privilegiare utenti', 'visualizzare utenti');\n\t}", "title": "" }, { "docid": "a45c90963be68888107db009c54283f5", "score": "0.5356148", "text": "function getDesafiado(){\r\n return $this->desafiado;\r\n}", "title": "" }, { "docid": "8e4efbf63240468093c75a1460e03631", "score": "0.534597", "text": "function cl_responsaveltecnico() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"responsaveltecnico\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "60937f193fb8c73e7a08ec7737786810", "score": "0.53451586", "text": "private function __construct($id, $paswoord) {\r\n $this->id = $id;\r\n $this->paswoord = $paswoord;\r\n }", "title": "" }, { "docid": "0e0413263c324b53693bd7b83074b6da", "score": "0.5338089", "text": "function cl_veicdevolucao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"veicdevolucao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "75709d7625bb10703a755e698a31843f", "score": "0.5335661", "text": "function select($id)\n{\n\n$sql = \"SELECT * FROM pessoa WHERE PESS_ID = $id;\";\n$result = $this->database->query($sql);\n$result = $this->database->result;\n$row = mysql_fetch_object($result);\n\n\n$this->ID = $row->PESS_ID;\n$this->ORGA_ID = $row->ORGA_ID;\n$this->TRATAMENTO = $row->PESS_TRATAMENTO;\n$this->NOME = $row->PESS_NOME;\n$this->EMAIL = $row->PESS_EMAIL;\n$this->FONE = $row->PESS_FONE;\n$this->CELULAR = $row->PESS_CELULAR;\n$this->NASCIMENTO = $row->PESS_NASCIMENTO;\n$this->SEXO = $row->PESS_SEXO;\n$this->OBS = $row->PESS_OBS;\n\n}", "title": "" }, { "docid": "a5c1e116138546d11714ecdb219aa784", "score": "0.53337634", "text": "function load($id){\r\n \r\n $sql = $GLOBALS[\"db\"]->query('SELECT * FROM j_ville WHERE id = '.$id)or die ('Erreur : '.mysql_error());\r\n $donnees = mysql_fetch_array($sql);\r\n\r\n $this->id = $donnees['id'];\r\n $this->idCompte = $donnees['idCompte'];\r\n $this->idAlliance = $donnees['idAlliance'];\r\n $this->nom = $donnees['nom'];\r\n $this->date_dern_action = $donnees['date_dern_action'];\r\n $this->X = $donnees['X'];\r\n $this->Y = $donnees['Y'];\r\n $this->map = $donnees['map'];\r\n $this->mineur = $donnees['mineur']; // NB paysan atribué à la mine\r\n $this->bucheron = $donnees['bucheron']; // NB paysan atribué à la scierie\r\n $this->paysans = $donnees['paysans'];\r\n\r\n $this->hdv = $donnees['hdv'];\r\n $this->mine = $donnees['mine']; // Niveau Mine\r\n $this->scierie = $donnees['scierie']; // Niveau Scierie\r\n $this->caserne = $donnees['caserne'];\r\n $this->tour = $donnees['tour'];\r\n $this->uarm = $donnees['uarm'];\r\n $this->entrepot = $donnees['entrepot'];\r\n $this->recherche = $donnees['recherche'];\r\n $this->marche = $donnees['marche'];\r\n\r\n $this->construction = $donnees['construction'];\r\n $this->idActionConstruction = $donnees['idActionConstruction'];\r\n $this->time = $donnees['time'];\r\n $this->garnison = unserialize($donnees['garnison']);\r\n $this->marcheContent = unserialize($donnees['marcheContent']);\r\n $this->tourContent = unserialize($donnees['tourContent']);\r\n $this->etat = $donnees['etat'];\r\n\r\n\r\n $time = time();\r\n\r\n $this->entrainement = unserialize($donnees['entrainement']);\r\n\r\n\r\n //$this->oldThis = $this;\r\n //echo $this->$bat;\r\n //echo 'Niv Scierie'.$this->scierie;\r\n //echo 'Construction :'.$this->construction.' END';\r\n\r\n /********************************************************************/\r\n /**********************MAINTENANCE VILLE*****************************/\r\n /********************************************************************/\r\n\r\n\r\n if($this->time < $time AND $this->time > 0){\r\n $_SESSION['AugAJour']=0;\r\n $bat = $this->construction;\r\n //echo 'Ville Auto :'.$this->construction.' Niv'.$this->$this->construction.'->'.$this->$this->construction++.'<br />';\r\n //echo $this->scierie;\r\n //$bat = $this->construction;\r\n $this->$bat++;\r\n $this->construction=\"\";\r\n $this->idActionConstruction=0;\r\n $this->time=0;\r\n $this->save();\r\n\r\n $joueur = new Joueur();\r\n $joueur->loadSimple($this->idCompte);\r\n $joueur->maxRess();\r\n $joueur->save();\r\n $stat = new Stat();\r\n $stat->load($this->idCompte);\r\n $stat->calculHab();\r\n $stat->save();\r\n }\r\n\r\n\r\n if(is_object($this->tourContent)){\r\n if($this->tourContent->arriveTime <= time()){\r\n\r\n if($this->tourContent->arriveTime != 0){\r\n $this->tourContent->genererMessage($this->tour,$this->idCompte);\r\n $this->tourContent->arriveTime=0;\r\n $this->save();\r\n }\r\n\r\n if($this->tourContent->finishTime <= time()){\r\n $this->tourContent->arriveTime = 0;\r\n $this->tourContent->finishTime = 0;\r\n $this->save();\r\n }\r\n\r\n }\r\n }\r\n\r\n\r\n if(is_object($this->entrainement)){\r\n $newUnite = $this->entrainement->terminerEntrainement();\r\n }else{\r\n $this->entrainement = new Entrainement();\r\n $this->save();\r\n }\r\n if(isset($newUnite[0])){\r\n $this->garnison->nouvelleRecrue($newUnite);\r\n $this->save();\r\n }\r\n\r\n if(!is_object($this->garnison)){\r\n $this->garnison = new Garnison();\r\n }\r\n \r\n }", "title": "" }, { "docid": "4f1152ba37a3ca6068b51d4dc19accc7", "score": "0.532991", "text": "public function __construct()\n {\n if (! isset($_GET['model'])) {\n $model = 'Funcionarios';\n } else {\n $model = ucfirst($_GET['model']);\n }\n \n if (! isset($_GET['action'])) {\n $action = 'gerenciar';\n } else {\n $action = $_GET['action'];\n }\n // http://192.168.203.86/Curso%20501/Capitulo05_Design_Patterns/MVC/?model=clientes&action=cadastrar\n echo $model;\n echo '<br>';\n echo $action;\n \n exit();\n \n // odel=Funcionarios&action=gerenciar\n \n $this->template = strtolower($model) . \"/$action\";\n \n echo '<hr>';\n \n echo \"Template: \" . $this->template;\n \n $model = \"Model\\\\$model\";\n \n \n \n \n $this->model = new $model();\n \n echo '<hr><pre>';\n \n var_dump($this->model);\n \n \n exit();\n $this->dados = $this->model->$action();\n \n View::carregar($this->template, $this->dados);\n }", "title": "" }, { "docid": "a151032fd912a27167dd95827a670b32", "score": "0.5326791", "text": "function __construct($id) \n {\n $this->_id = $id; \n }", "title": "" }, { "docid": "1cd1a9d189d97f0802e3cfdc8c8dc62c", "score": "0.5325893", "text": "public function __construct($suiveur)\n {\n $this->suiveur = $suiveur;\n }", "title": "" }, { "docid": "eb3de39a3d14d503baa9a7d7a3679062", "score": "0.53203976", "text": "public function oceni(){\n require_once 'models/termin.php';\n $_POST['sport'] = 'termini u kojima ucestvujes';\n self::$termini = Termin::dohvatiSveMojeNeaktivnePrihvaceneIKreirane($_SESSION['username']);\n if(isset($_GET['termin'])){\n require_once 'models/korisnik.php';\n self::$korisnici = Korisnik::dohvatiSveKojeNisamOcenio($_SESSION['username'], $_GET['termin']);\n }\n require_once 'views/korisnik/header.php';\n require_once 'views/ocene.php';\n require_once 'views/footer.php';\n }", "title": "" }, { "docid": "fcfac6267e7db439d7c483e68f5dfed1", "score": "0.5315577", "text": "function editar(){\r\n\r\n $transportadora = new CrudTransportadora();\r\n $transportadora = $transportadora->getTransportadora($_GET['id_transportadora']);\r\n\r\n include __DIR__ . \"/../views/Transportadora/transportadora_editar.php\";\r\n\r\n}", "title": "" }, { "docid": "bf72e994277db348c37a35e6b8d7aec9", "score": "0.530924", "text": "public function __construct()\n\t{\n\t $this->entity = new Almacenes;\n\t}", "title": "" }, { "docid": "10d65835865224cfa55ae1a465d844f3", "score": "0.53075063", "text": "function afficherLesAnnonces(){\n $getproduit = new Pagination();\n //stock dansune variable l'appel de la methode concernée\n $recupAnnonce = $getproduit->afficherToutesAnnonces();\n require_once \"../View/produitClient.php\";\n}", "title": "" } ]
1e66055348726676340de8fd2e0a66a2
The deposit's uuid is the string representation.
[ { "docid": "1004fd2f46b33efe8c18000ebaefc258", "score": "0.74034315", "text": "public function __toString()\n {\n return $this->uuid;\n }", "title": "" } ]
[ { "docid": "8c8b32c8afd0683c6724103896da86de", "score": "0.8141525", "text": "public function __toString() : string {\n return $this->getDepositUuid();\n }", "title": "" }, { "docid": "21f55984a89949f6a291137d72328a88", "score": "0.7349341", "text": "public function __toString()\n\t{\n\t\treturn $this->_uuid;\n\t}", "title": "" }, { "docid": "2d41bc2ec1aabb2223a9b6e8965873f7", "score": "0.7160719", "text": "function uuid()\n {\n return Str::uuid()->toString();\n }", "title": "" }, { "docid": "dfee78da4324e3d43e3e3103efd55efe", "score": "0.715662", "text": "function uuid() : string\n {\n return (string) \\Ramsey\\Uuid\\Uuid::uuid4();\n }", "title": "" }, { "docid": "7aac359839f02dda1077be520d14552b", "score": "0.7113501", "text": "public function get_uuid() {\n\t\treturn $this->uuid;\n\t}", "title": "" }, { "docid": "4e8fbe4bdca44ce18854ae4c487521c4", "score": "0.7105912", "text": "public function getUuid(): string;", "title": "" }, { "docid": "947fae21c19768f67cfb6ee5838231d9", "score": "0.7048225", "text": "public function getUUID();", "title": "" }, { "docid": "947fae21c19768f67cfb6ee5838231d9", "score": "0.7048225", "text": "public function getUUID();", "title": "" }, { "docid": "3dcb036939b89b88fe0728bcdbc69bec", "score": "0.69970757", "text": "public function getUUID()\n {\n return $this->__uuid;\n }", "title": "" }, { "docid": "a5a5d924f638055f430c9ac6839d79fd", "score": "0.6855341", "text": "public function getUuid() {\n return $this->uuid;\n }", "title": "" }, { "docid": "a0ee168a1185d01e6e4720ffdd8e1c32", "score": "0.68152636", "text": "public function uuid()\n {\n return $this->generate(32, 'AN');\n }", "title": "" }, { "docid": "e4fbda6fc86a8f276e57db093edfa11f", "score": "0.67918164", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e4fbda6fc86a8f276e57db093edfa11f", "score": "0.67918164", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.67864865", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.67864865", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.67864865", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "7058e4190448534476ef7e31013766bf", "score": "0.6785218", "text": "public function getUuid() {\n return $this->_uuid;\n }", "title": "" }, { "docid": "c7fe2eb9d97b1fdecf0eb42f421a377c", "score": "0.6756777", "text": "private function getUUID(): string\n {\n $str = $this->explodeString(strtoupper(bin2hex(random_bytes(16))), [8, 4, 3, 3, 12]);\n return $str[0]\n . '-' . $str[1]\n . '-4' . $str[2]\n . '-' . substr('89AB', rand(0, 3), 1) . $str[3]\n . '-' . $str[4];\n }", "title": "" }, { "docid": "8f52b57cc602df82348831bf2cdcbba7", "score": "0.67388606", "text": "public function getUuid()\n {\n $value = $this->get(self::UUID);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "b3285064ae8da08b6bc1a18615a2fb65", "score": "0.6725844", "text": "public function uuid()\n {\n }", "title": "" }, { "docid": "899e7f3bd9e30b2bb0bcc1ad8c910fb4", "score": "0.6703613", "text": "public function getUuid() {\r\n return $this->_uuid;\r\n }", "title": "" }, { "docid": "578232f22834e93b8eeac74658820e59", "score": "0.66707665", "text": "public function get_uuid() {\n return steam_connection::get_instance($this->get_id())->get_uuid();\n }", "title": "" }, { "docid": "434819cc4d792c27449824de68fc799a", "score": "0.66513395", "text": "public function uuid(): Uuid\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "695f770fdaa5e90e99af94c71f8f259d", "score": "0.66480297", "text": "public function getUUID()\n {\n return $this->uUID;\n }", "title": "" }, { "docid": "695f770fdaa5e90e99af94c71f8f259d", "score": "0.66480297", "text": "public function getUUID()\n {\n return $this->uUID;\n }", "title": "" }, { "docid": "7c449a6d9b24e668b5c126f9a32707b4", "score": "0.6643767", "text": "public function q_std_uuid() {\n $q = \"concat(SUBSTR(hex(ordered_uuid), 9, 8), '-', SUBSTR(hex(ordered_uuid), 5, 4), '-', SUBSTR(hex(ordered_uuid), 1, 4), '-', SUBSTR(hex(ordered_uuid), 17, 4), '-', SUBSTR(hex(ordered_uuid), 21, 12))\";\n return $q;\n }", "title": "" }, { "docid": "a9e2e50284ebd90ff7548f9b4a8a72fd", "score": "0.661652", "text": "public function getUuid()\n\t{\n\t\treturn $this->_uuid;\n\t}", "title": "" }, { "docid": "bdde8b28b0ccbc970b78edd3aea4cc45", "score": "0.6531643", "text": "function UUID() {\n\n $sqlStr = 'SELECT UUID() AS answer FROM DUAL';\n $arrRes = $this->doSQLRes($sqlStr);\n $uuid = $arrRes[0]['answer'];\n\n return $uuid;\n }", "title": "" }, { "docid": "6ac2db313aa00ec74562daca89520ae6", "score": "0.65229553", "text": "public function getMerchantUuid()\n {\n return Mage::helper('core')->decrypt($this->getConfigData('merchantuuid'));\n }", "title": "" }, { "docid": "86386fed7e885ff52cb4a23f4accbc15", "score": "0.65221614", "text": "public function __toString()\n\t{\n\t\tif($this->nickname)\n\t\t\treturn (string) $this->nickname;\n\n\t\treturn (string) ($this->name) ?: $this->uuid;\n\t}", "title": "" }, { "docid": "200ace3c00df74e257d514e9c61413ad", "score": "0.6507293", "text": "public static function generateAsString(): string\n {\n $uuid = new static();\n\n return $uuid->toNative();\n }", "title": "" }, { "docid": "b1c021a1cec499749e19936362eab210", "score": "0.6485624", "text": "public function getUUID()\n {\n if($this->link)\n {\n $result = $this->link->query(\"SELECT UUID() as id;\");\n \n $array = $result->fetch();\n \n return $array['id'];\n }\n\n return '';\n }", "title": "" }, { "docid": "5d8575746e9dd63753b5de624a6ee9e8", "score": "0.6472207", "text": "public function getID(){return $this->uuid;}", "title": "" }, { "docid": "fc4efb6e72f6d8958140026412d73e2a", "score": "0.6468477", "text": "public static function UUID(): string\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\n // 32 bits for \"time_low\"\n random_int(0, 0xffff), random_int(0, 0xffff),\n\n // 16 bits for \"time_mid\"\n random_int(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\", four most significant bits holds version number 4\n random_int(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\", 8 bits for \"clk_seq_low\", two most significant bits holds zero and\n // one for variant DCE1.1\n random_int(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n random_int(0, 0xffff), random_int(0, 0xffff), random_int(0, 0xffff)\n );\n }", "title": "" }, { "docid": "62174780cb422768b85ef77ba5e13e39", "score": "0.64650804", "text": "public function toString()\n {\n return $this->guid;\n }", "title": "" }, { "docid": "aff02c8ecb23639c52ed46fa44da3a9e", "score": "0.64572644", "text": "function str_uuid4() {\n $bytes = random_bytes(16);\n\n $bytes[6] = chr(ord($bytes[6]) & 0x0f | 0x40);\n $bytes[8] = chr(ord($bytes[8]) & 0x3f | 0x80);\n\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($bytes), 4));\n }", "title": "" }, { "docid": "ca3eb80c04f50ea9a43e77d97103577f", "score": "0.6410855", "text": "private function uuid()\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "55ed9058a3546c6cccd16ad62b737a7b", "score": "0.6292097", "text": "protected static function getUuidField()\n {\n return 'uuid';\n }", "title": "" }, { "docid": "360b9f2389bf0e810c1ae51550068156", "score": "0.62641686", "text": "public function getUUID()\r\n\t{\r\n\t\t$q = \"SELECT uuid_short() as uuid\";\r\n\t\t$row = $this->query($q)->fetch_assoc();\r\n\t\treturn $row['uuid'];\r\n\t}", "title": "" }, { "docid": "d7f5f9f158df714fe49f1df430efe359", "score": "0.6229742", "text": "public function gen_uuid() {\n\t return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t // 32 bits for \"time_low\"\n\t mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n\t // 16 bits for \"time_mid\"\n\t mt_rand( 0, 0xffff ),\n\n\t // 16 bits for \"time_hi_and_version\",\n\t // four most significant bits holds version number 4\n\t mt_rand( 0, 0x0fff ) | 0x4000,\n\n\t // 16 bits, 8 bits for \"clk_seq_hi_res\",\n\t // 8 bits for \"clk_seq_low\",\n\t // two most significant bits holds zero and one for variant DCE1.1\n\t mt_rand( 0, 0x3fff ) | 0x8000,\n\n\t // 48 bits for \"node\"\n\t mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n\t );\n\t}", "title": "" }, { "docid": "aa603bebde69b3decf64102222894243", "score": "0.62020105", "text": "public function __toString(): string\n {\n return $this->getHexString();\n }", "title": "" }, { "docid": "e872de5eb7a09c4eeff7ef52e036121a", "score": "0.6186258", "text": "public function getUuid() {\n\t\tif($this->getData() === FALSE)\n\t\t\treturn FALSE;\n\t\treturn $this->uuid;\n\t}", "title": "" }, { "docid": "b9c1482a0d0626d1983d2e9d7631dad8", "score": "0.61814404", "text": "public function getUsername(): string\n {\n return (string) $this->uuid;\n }", "title": "" }, { "docid": "fae5a956441cc939ef11ae2b30981166", "score": "0.61787575", "text": "public static function getUUID()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "4b6d0fe91d9a76487a1df184e12ea586", "score": "0.6178424", "text": "public function getUUID(): ?string\n {\n return $this->UUID;\n }", "title": "" }, { "docid": "b256d5309e56450f035fee52373781c1", "score": "0.6163722", "text": "private static function getUuid() {\n $userId = Session::getField('user_id');\n return DatabaseConnector::getUuid($userId);\n }", "title": "" }, { "docid": "5834577d50f0fb29ccef06fb983f9874", "score": "0.6146476", "text": "function getProductUUID()\n {\n return $this->product_uuid;\n }", "title": "" }, { "docid": "7de21114a487a0e7b009cc286740d5ef", "score": "0.613855", "text": "protected static function fromUuidToHexString(string $data): string {\n return \\str_replace('-', '', $data);\n }", "title": "" }, { "docid": "21f5aca008df2e01927fbe29a63bfee3", "score": "0.61273646", "text": "public function uuid() \n {\n // The field names refer to RFC 4122 section 4.1.2\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "title": "" }, { "docid": "61e059499b69993dc0998bbd935a133f", "score": "0.6122893", "text": "public function getGuid(): string;", "title": "" }, { "docid": "596528eb195bb0abe26ec3e1eb6e34b3", "score": "0.6109896", "text": "#[Pure] public static function newUuid(): string\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "75165563addadcbcce661cee3ca589c1", "score": "0.6106981", "text": "function uuid() {\n return implode('', array_map(function ($d) {\n return '0123456789abcdefghjkmnpqrstvwxyz'[$d];\n },array_map('bindec',array_slice(str_split(implode('', array_map(function ($s) {\n return str_pad($s, 8, '0', STR_PAD_LEFT);\n }, array_map('decbin', array_map('ord', str_split(openssl_random_pseudo_bytes(16)))))),5),0,-1))));\n}", "title": "" }, { "docid": "be4eea5125e814627bea3d71c0e8c3a6", "score": "0.6104383", "text": "public function getUuid() : ?string \n {\n if ( ! $this->hasUuid()) {\n $this->setUuid($this->getDefaultUuid());\n }\n return $this->uuid;\n }", "title": "" }, { "docid": "ae3c8aa9e92e9c0836ae8705d6beb4db", "score": "0.60995156", "text": "function uuid()\r\n\t{\r\n\t return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\r\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\r\n mt_rand( 0, 0x0fff ) | 0x4000,\r\n mt_rand( 0, 0x3fff ) | 0x8000,\r\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );\r\n\t}", "title": "" }, { "docid": "1cfa22464660cd55af213484005f29f0", "score": "0.60969746", "text": "public function q_ordered_uuid() {\n $q = \"UNHEX(CONCAT(SUBSTR(uuid, 15, 4),SUBSTR(uuid, 10, 4),SUBSTR(uuid, 1, 8),SUBSTR(uuid, 20, 4),SUBSTR(uuid, 25)))\";\n return $q;\n }", "title": "" }, { "docid": "3b4e998fc640fbca64186e30a1309d06", "score": "0.6088921", "text": "public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}", "title": "" }, { "docid": "104b4e41d4937dbc5d9657611107a04c", "score": "0.60760313", "text": "function generateUuid();", "title": "" }, { "docid": "968c9710be298379295b90a930e85fdf", "score": "0.6074765", "text": "public function jsonSerialize(): string\n {\n return $this->getHexString();\n }", "title": "" }, { "docid": "f5a537fca28cdd5e47859523b2eec0ad", "score": "0.60619956", "text": "public function generateUuid()\n {\n $hash = md5($this->getStoreUid() . microtime(true));\n\n return sprintf('%s-%s-%s-%s-%s', substr($hash, 0, 8), substr($hash, 8, 4), substr($hash, 12, 4),\n substr($hash, 16, 4), substr($hash, 20));\n }", "title": "" }, { "docid": "4754aab3a1ce4f446d9ca1c0237010cc", "score": "0.60544974", "text": "public function getUuid()\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "b6e2f6995603c12a13d90df889305917", "score": "0.60373294", "text": "function generateUUID();", "title": "" }, { "docid": "0ea382e13578bafd518c146a416ec4b2", "score": "0.60234785", "text": "function lib_string_get_uuid() { \n $random_string=openssl_random_pseudo_bytes(16);\n $time_low=bin2hex(substr($random_string, 0, 4));\n $time_mid=bin2hex(substr($random_string, 4, 2));\n $time_hi_and_version=bin2hex(substr($random_string, 6, 2));\n $clock_seq_hi_and_reserved=bin2hex(substr($random_string, 8, 2));\n $node=bin2hex(substr($random_string, 10, 6));\n $time_hi_and_version=hexdec($time_hi_and_version);\n $time_hi_and_version=$time_hi_and_version >> 4;\n $time_hi_and_version=$time_hi_and_version | 0x4000;\n $clock_seq_hi_and_reserved=hexdec($clock_seq_hi_and_reserved);\n $clock_seq_hi_and_reserved=$clock_seq_hi_and_reserved >> 2;\n $clock_seq_hi_and_reserved=$clock_seq_hi_and_reserved | 0x8000;\n return sprintf(\"%08s-%04s-%04x-%04x-%012s\", $time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node);\n}", "title": "" }, { "docid": "e7a44d1a721297a591f5f9861cdd600a", "score": "0.6015561", "text": "function uuid() {\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n mt_rand( 0, 0x0fff ) | 0x4000,\n mt_rand( 0, 0x3fff ) | 0x8000,\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );\n}", "title": "" }, { "docid": "f91e97dde4c3aa4aee7813e6c9018861", "score": "0.60100985", "text": "public function getUuidAttribute()\n {\n return $this->globalUuid->uuid;\n }", "title": "" }, { "docid": "0018af6e9f05532ae26c6a9536562fe2", "score": "0.60092026", "text": "public function getGuid(): string\n {\n return $this->guid;\n }", "title": "" }, { "docid": "31ca2867135ac79eb65ed8af774fd108", "score": "0.5983009", "text": "public static function generate_uuid() {\n if (function_exists(\"openssl_random_pseudo_bytes\")) {\n // Algorithm from stackoverflow: http://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid\n // If openSSL extension is installed.\n $data = openssl_random_pseudo_bytes(16);\n\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // Set version to 0100.\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // Set bits 6-7 to 10.\n\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n\n } else if (function_exists(\"uuid_create\")) {\n $uuid = '';\n $context = null;\n uuid_create($context);\n\n uuid_make($context, UUID_MAKE_V4);\n uuid_export($context, UUID_FMT_STR, $uuid);\n return trim($uuid);\n } else {\n // Fallback uuid generation based on:\n // \"http://www.php.net/manual/en/function.uniqid.php#94959\".\n $uuid = sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\n // 32 bits for \"time_low\".\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\n // 16 bits for \"time_mid\".\n mt_rand(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4.\n mt_rand(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1.\n mt_rand(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\".\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff));\n }\n }", "title": "" }, { "docid": "a72cd2fbf610478e84d7af78206b0662", "score": "0.5981775", "text": "function uuid($data = null) {\n $data = $data ?? random_bytes(16);\n assert(strlen($data) == 16);\n \n // Set version to 0100\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n // Set bits 6-7 to 10\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n \n // Output the 36 character UUID.\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "title": "" }, { "docid": "30cb973d2fa09c5df31136fc4e012830", "score": "0.5973692", "text": "public function test() {\n\t\t$uuidv1 = Uuid::generate(4);\n\t\t/*$uuid3 = Uuid::generate(3, 'turing' , Uuid::NS_DNS);\n\t\t$uuid4 = Uuid::generate(4);\n\t\t$uuid5 = Uuid::generate(5, 'turing' , Uuid::NS_DNS);*/\n\t\treturn $uuidv1;\n\t}", "title": "" }, { "docid": "351c5dc60c2380aeb5624411f1ba2d95", "score": "0.59595066", "text": "public static function uuid4(): string\n {\n $data = random_bytes(16);\n assert(strlen($data) == 16);\n\n // Set version to 0100\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n // Set bits 6-7 to 10\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n // Output the 36 character UUID.\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "title": "" }, { "docid": "679bcd752ad43f776bd2ab728c93ec94", "score": "0.5934439", "text": "protected static function asUuid(?array $data = null): string {\n $hex = static::asHexString($data);\n return \\vsprintf('%s%s-%s-%s-%s-%s%s%s', \\str_split($hex, 4));\n }", "title": "" }, { "docid": "42bdf684e49f38d2177b49de2b22ba2c", "score": "0.59306896", "text": "function generate_uuid() {\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n mt_rand( 0, 0xffff ),\n mt_rand( 0, 0x0fff ) | 0x4000,\n mt_rand( 0, 0x3fff ) | 0x8000,\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n }", "title": "" }, { "docid": "857d201d00790d33c4971e8b62de92d5", "score": "0.5903973", "text": "public function id()\n {\n return $this->decoded['uuid'] ?? $this->decoded['id'];\n }", "title": "" }, { "docid": "47795befa79fe96f14031b88d0f011b4", "score": "0.59016645", "text": "public function random(){\r\n try{\r\n $uuid4 = Uuid::uuid4();\r\n return $uuid4->toString();\r\n }catch(UnsatisfiedDependencyException $e){\r\n return 'Caught exception: ' . $e->getMessage();\r\n };\r\n }", "title": "" }, { "docid": "866673dc2d8740b68287da68c7a1ed40", "score": "0.59011567", "text": "public static function uuid() {\n\t\tif (function_exists(\"uuid_create\")) { return uuid_create(); }\n\n\t\t// fallback\n\t\tglobal $_SERVER;\n\t\t$uuid = md5(microtime().$_SERVER['SERVER_NAME'].getmypid());\n\t\treturn substr($uuid, 0, 8).\"-\".substr($uuid, 8, 4).\"-\".substr($uuid, 12, 4).\"-\".substr($uuid, 16, 4).\"-\".substr($uuid, 20);\n\t}", "title": "" }, { "docid": "c2f1aee1ad59ab63cfb95fc288dc2f4b", "score": "0.588746", "text": "public function generateRandomUuid()\n {\n return Uuid::uuid4()->toString();\n }", "title": "" }, { "docid": "03825825fddb254a118570f6dfdd194d", "score": "0.58804065", "text": "public function getUuidFieldName(): string\n {\n return empty($this->uuidFieldName) ? 'uuid' : $this->uuidFieldName;\n }", "title": "" }, { "docid": "dbeea2664b32783e350c15b4e6d24b43", "score": "0.5867162", "text": "public static function uuid_10_str() {\n\t//--\n\t$toggle = self::random_number(0,1);\n\t//--\n\t$uid = '';\n\tfor($i=0; $i<10; $i++) {\n\t\tif(($i % 2) == $toggle) {\n\t\t\t$rand = self::random_number(0,9);\n\t\t} else { // alternate nums with chars (this avoid to have ugly words)\n\t\t\t$rand = self::random_number(10,35);\n\t\t} //end if else\n\t\t$uid .= base_convert($rand, 10, 36);\n\t} //end for\n\t//--\n\treturn (string) strtoupper((string)$uid);\n\t//--\n}", "title": "" }, { "docid": "46190990c7efa68e63da174bbc9ac0e7", "score": "0.5865525", "text": "public function generateUid()\n {\n return strval(new Horde_Support_Uuid());\n }", "title": "" }, { "docid": "9343426a8c592d2232f70a120bb9e513", "score": "0.58597463", "text": "protected function create_uuid() {\n $uuid_query = $this->db->query('SELECT UUID()');\n $uuid_rs = $uuid_query->result_array();\n return $uuid_rs[0]['UUID()'];\n }", "title": "" }, { "docid": "024170ff066f710fc601cb46fada404e", "score": "0.5853857", "text": "function uuidv4()\n\t{\n\t\t//return com_create_guid();\n\t\t\n\t\t// use this method for servers with PHP7 installed\n\t\t/*return implode('-', [\n\t\t\tbin2hex(random_bytes(4)),\n\t\t\tbin2hex(random_bytes(2)),\n\t\t\tbin2hex(chr((ord(random_bytes(1)) & 0x0F) | 0x40)) . bin2hex(random_bytes(1)),\n\t\t\tbin2hex(chr((ord(random_bytes(1)) & 0x3F) | 0x80)) . bin2hex(random_bytes(1)),\n\t\t\tbin2hex(random_bytes(6))\n\t\t]);*/\n\t\t$chars = md5(uniqid(mt_rand(), true));\n $uuid = substr($chars,0,8) . '-';\n $uuid .= substr($chars,8,4) . '-';\n $uuid .= substr($chars,12,4) . '-';\n $uuid .= substr($chars,16,4) . '-';\n $uuid .= substr($chars,20,12);\n return $prefix . $uuid;\n\t}", "title": "" }, { "docid": "18a2a8f1199fa84b93e2511234a889bc", "score": "0.5850465", "text": "function generarUuid()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "ae696dfab27f9ead5cb33b462b1df955", "score": "0.582038", "text": "public static function uuid_45($prefix='') {\n\t//--\n\t$hash = sha1($prefix.self::unique_entropy('uid45'));\n\t//--\n\t$uuid = substr($hash,0,8).'-';\n\t$uuid .= substr($hash,8,4).'-';\n\t$uuid .= substr($hash,12,4).'-';\n\t$uuid .= substr($hash,16,4).'-';\n\t$uuid .= substr($hash,20,12);\n\t$uuid .= '-'.substr($hash,32,8);\n\t//--\n\treturn (string) strtolower($uuid);\n\t//--\n}", "title": "" }, { "docid": "4c84636316a09b27493f884a6557b8dc", "score": "0.5816048", "text": "public function __toString(): string\n {\n return (string) $this->id;\n }", "title": "" }, { "docid": "a87bbb6a2fc67912ddc6628d7b7112d8", "score": "0.58076525", "text": "public function getPublicUuid()\n {\n return $this->publicUuid;\n }", "title": "" }, { "docid": "a87bbb6a2fc67912ddc6628d7b7112d8", "score": "0.58076525", "text": "public function getPublicUuid()\n {\n return $this->publicUuid;\n }", "title": "" }, { "docid": "a87bbb6a2fc67912ddc6628d7b7112d8", "score": "0.58076525", "text": "public function getPublicUuid()\n {\n return $this->publicUuid;\n }", "title": "" }, { "docid": "4a31a25eded41e1ce07f9e191364c899", "score": "0.58068746", "text": "public function partitionUuid(): string\n {\n return $this->partitionUuid;\n }", "title": "" }, { "docid": "58fd7bd717b6eb45a5614b7c33745ff9", "score": "0.58018976", "text": "public function generate()\n {\n if(!class_exists('Ramsey\\Uuid\\Uuid')) {\n throw new \\RuntimeException('For use the UUID generator you should setup the ramsey/uuid package');\n }\n\n switch($this->version) {\n case 1:\n return Uuid::uuid1()->toString();\n\n case 3:\n $this->checkNamespace($this->version);\n return Uuid::uuid3(Uuid::NAMESPACE_DNS, $this->namespace)->toString();\n\n case 4:\n return Uuid::uuid4()->toString();\n\n case 5:\n $this->checkNamespace($this->version);\n return Uuid::uuid5(Uuid::NAMESPACE_DNS, $this->namespace)->toString();\n\n default:\n throw new \\RuntimeException(sprintf('The version %s of UUID does not exists',$this->version));\n }\n }", "title": "" }, { "docid": "0d018eb9ffb59bf83bc4e346fe27bbbf", "score": "0.57940733", "text": "public function uuidColumn(): string\n {\n return 'uuid';\n }", "title": "" }, { "docid": "d65dc4fcb8877d7712def532d33dda47", "score": "0.57879364", "text": "public function __toString()\n {\n return $this->toHex();\n }", "title": "" }, { "docid": "6025b90ab740523cb2748507f9175e92", "score": "0.5767585", "text": "function uuid()\n{\n $microTime = microtime();\n list($a_dec, $a_sec) = explode(' ', $microTime);\n\n $dec_hex = dechex($a_dec * 1000000);\n $sec_hex = dechex($a_sec);\n\n ensure_length($dec_hex, 5);\n ensure_length($sec_hex, 6);\n\n $guid = '';\n $guid .= $dec_hex;\n $guid .= create_guid_section(3);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= create_guid_section(4);\n $guid .= '-';\n $guid .= $sec_hex;\n $guid .= create_guid_section(6);\n\n return $guid;\n}", "title": "" }, { "docid": "36ff9671bf97cd464d6dc666d1990d51", "score": "0.5764844", "text": "private function computeUuid(): UuidInterface\n {\n return Uuid::uuid4();\n }", "title": "" }, { "docid": "bdaa350882e80398cbc890a26a75f938", "score": "0.5760693", "text": "public static function uuid4()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "title": "" }, { "docid": "c8a85f9ba51b98014aeff6baf4245407", "score": "0.57604283", "text": "public function getUuid(): UniqueId\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "27540cbc24c1ec5dd3dd57f3bbf20a43", "score": "0.5750563", "text": "function hs_uuid() {\n if (function_exists ( 'com_create_guid' )) {\n return com_create_guid ();\n } else {\n mt_srand ((double) microtime() * 10000);\n $charid = md5 (uniqid (rand(), true));\n $hyphen = chr (45); // \"-\"\n $uuid = '' . //chr(123)// \"{\"\n substr ($charid, 0, 8) . $hyphen . substr( $charid, 8, 4) . $hyphen . substr( $charid, 12, 4) . $hyphen . substr ($charid, 16, 4) . $hyphen . substr ($charid, 20, 12);\n //.chr(125);// \"}\"\n return $uuid;\n }\n}", "title": "" }, { "docid": "bc9d8f034684f790ba29077a864368f2", "score": "0.5741934", "text": "public function getGuidSQL()\n {\n \treturn 'UUID()';\n }", "title": "" }, { "docid": "fc04685c796a860d9a3fa18c94a32990", "score": "0.5729767", "text": "public function getGUID(): string\n {\n return $this->guid;\n }", "title": "" }, { "docid": "4f3b40da020ad9a3631b13c5f799458c", "score": "0.5729711", "text": "protected function GetNewUUID()\n {\n return uniqid();\n }", "title": "" }, { "docid": "7d35e48c467fd85377d7793c5bd6ea01", "score": "0.57278", "text": "public function generateSnippet() {\n return '\"' . $this->_command_name . '\":{\"uuid\":\"'. $this->_uuid . '\"}';\n }", "title": "" } ]
f5bc64c7db5e7fada10f45c3f1d2599e
The security layer will intercept this request
[ { "docid": "64fae01fa3bda2e775cb52a0447f11d1", "score": "0.61581796", "text": "public function securityCheckAction()\n {\n }", "title": "" } ]
[ { "docid": "4a2d8301648b42ca566e48a4317a1bf5", "score": "0.66265553", "text": "public function authorizeRequest(\\TYPO3\\Flow\\Http\\Request $request);", "title": "" }, { "docid": "b8886b6d5fb93343a4f8f9140a6fcf7c", "score": "0.6453163", "text": "public function authenticateRequest(){\r\n $this->authenticationHandler->authenticate();\r\n }", "title": "" }, { "docid": "4d1e2b9a273a6fe5eadce8ed40ba04bf", "score": "0.6290716", "text": "public function externalAuthAction(Request $request);", "title": "" }, { "docid": "26b70d8616f2bb72bf76f591f08a0067", "score": "0.62054837", "text": "public function isSecureRequest()\n {\n }", "title": "" }, { "docid": "7b7aca7f52270ffbe07e986b6d1ed1ab", "score": "0.6176163", "text": "public function before(): void\n {\n /** @var LTO\\Account|null $account */\n $account = $this->request->getAttribute('account');\n\n if (!$this->noAuth && $account === null) {\n $this->cancel()->forbidden('HTTP request not signed');\n } elseif ($account !== null && $account->getPublicSignKey() !== $this->node->getPublicSignKey()) {\n $this->cancel()->forbidden('HTTP request was not signed by node');\n }\n }", "title": "" }, { "docid": "29f6ca13181475feb004d44b91c057e0", "score": "0.6170953", "text": "public function onKernelRequestFilterProvider(RequestEvent $event) {\n if (isset($this->filter) && $event->isMainRequest()) {\n $request = $event->getRequest();\n if ($this->authenticationProvider->applies($request) && !$this->filter->appliesToRoutedRequest($request, TRUE)) {\n throw new AccessDeniedHttpException('The used authentication method is not allowed on this route.');\n }\n }\n }", "title": "" }, { "docid": "1633761bb5d8ae64c9e6b6d2fb577ba0", "score": "0.6104884", "text": "public function beforeFilter() {\r\n\t\tparent::beforeFilter();\r\n\r\n\t\t//$this->Auth->allow('checkout', 'paypalExpressCheckout', 'add');\r\n\t\t$this->Auth->allow(\r\n\t\t\t'add_to_cart',\r\n\t\t\t'change_qty_for_1_item_in_cart',\r\n\t\t\t'view_cart',\r\n\t\t\t'view',\r\n\t\t\t'create_order',\r\n\t\t\t'redirectem',\r\n\t\t\t'user_type',\r\n\t\t\t'catchem'\r\n\t\t);\r\n\t\t\r\n\t\tif ($this->request->action == 'add_to_cart' || \r\n\t\t\t$this->request->action == 'view_cart'\t||\r\n\t\t\t$this->request->action == 'create_order'\r\n\t\t) {\r\n\t\t\t$this->Components->disable('Security');\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "933e45edeea9842f8b7007498cd9af9a", "score": "0.6068468", "text": "public function before()\n\t\t{\n\t\t\tparent::before();\n\n\t\t\t// Check user auth and role\n\t\t\t$action = $this->request->action();\n\t\t\t\t\t\t\t\t\t\n\t\t\tif (($this->auth_required !== FALSE && Auth::instance()->logged_in($this->auth_required) === FALSE)\n\t\t\t\t|| (is_array($this->secure_actions) && array_key_exists($action, $this->secure_actions) && \n\t\t\t\tAuth::instance()->logged_in($this->secure_actions[$action]) === FALSE))\n\t\t\t{\n\t\t\t\tif (Auth::instance()->logged_in())\n\t\t\t\t{\n\t\t\t\t\tthrow new HTTP_Exception_403('Access denied: not enough permissions');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->redirect('login');\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f93cedbd402b6340ed397e856c538ed3", "score": "0.60522795", "text": "public function handleRequest() {}", "title": "" }, { "docid": "f93cedbd402b6340ed397e856c538ed3", "score": "0.60522795", "text": "public function handleRequest() {}", "title": "" }, { "docid": "fbe2b4434ad39c4602f0aa520e42c9bc", "score": "0.59909254", "text": "public function beforeFilter() {\n parent::beforeFilter();\n $this->User->userAuth = $this->UserAuth;\n if (isset($this->Security) && ($this->RequestHandler->isAjax() || $this->action == 'login' || $this->action == 'addMultipleUsers')) {\n $this->Security->csrfCheck = false;\n $this->Security->validatePost = false;\n }\n }", "title": "" }, { "docid": "d113c2e531266e1bb4a383f7c70dbd3b", "score": "0.59822464", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t\n\t\t$this->Auth->allow('send');\n\t\t$this->Security->requirePost('send');\n\t\t\n\t\tif($this->request->action == 'send') {\n\t\t\t$this->Security->validatePost = false;\n\t\t\t$this->Security->csrfCheck = false;\n\t\t}\n\t}", "title": "" }, { "docid": "40cda1f5deeff995f2f1d76cee6d7659", "score": "0.5978892", "text": "public function preExecution($request){\n parent::preExecution($request);\n\n if(!isset($_SESSION['user'])){\n $_SESSION['user'] = array();\n $_SESSION['user']['id'] = 1;\n }\n\n if(!isset($_SESSION['user']['acl'])){\n $_SESSION['user']['acl'] = Model::getInstance('Admin')->getAcls();\n }\n\n if(!$this->isUserAllowedToAccessResource($request->getParameter('ctrl') . '/' . $request->getParameter('action'))){\n throw new Exception('not allowed to access resource');\n }\n }", "title": "" }, { "docid": "9cc499eeb3dcfb262a06602141cdc591", "score": "0.59493893", "text": "public function beforeFilter(\\Cake\\Event\\Event $event)\n {\n // allow all action\n $this->Auth->allow();\n $this->response->header('Access-Control-Allow-Origin', '*');\n }", "title": "" }, { "docid": "247aaf3ddef68927dd875560db215f14", "score": "0.5940891", "text": "private function authorizeRequest()\r\n {\r\n\r\n $authHeader = json_decode( $this->auth, true );\r\n }", "title": "" }, { "docid": "e29c491fe50e6b542140e8d53f0294df", "score": "0.5916209", "text": "public function beforeAction($event)\n {\n if (isset($_SERVER['HTTP_ORIGIN'])) {\n header(\"Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}\");\n header('Access-Control-Allow-Credentials: true');\n header('Access-Control-Max-Age: 86400'); // cache for 1 day\n }\n\n // Access-Control headers are received during OPTIONS requests\n if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {\n if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) {\n header(\"Access-Control-Allow-Methods: GET, POST, OPTIONS\");\n }\n\n if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) {\n header(\"Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}\");\n }\n\n exit(0);\n }\n\n $this->enableCsrfValidation = false;\n if($event->actionMethod == 'actionChangepassword') {\n $headers = Yii::$app->request->headers;\n if(!$headers->has('token')) {\n http_response_code(401);\n $errorMsg=\"TOKEN_EXPIRED\";\n $token=Yii::$app->request->headers['token'];\n $class=__FILE__;\n $method=__FUNCTION__;\n $model=\"SsoUserInformationService\";\n $message=\" ERROR $errorMsg at line \".__LINE__;\n //Yii::$app->utility->logError($class,$method,$model,$token,$message);\n echo json_encode(array(\"error\" => $errorMsg));\n exit;\n } else {\n if( Yii::$app->utility->isValidToken(Yii::$app->request->headers['token']) == false) {\n http_response_code(401);\n $errorMsg=\"Unauthorized Access\";\n $token=Yii::$app->request->headers['token'];\n $class=__FILE__;\n $method=__FUNCTION__;\n $model=\"SsoUserInformationService\";\n $message=\" ERROR $errorMsg at line \".__LINE__;\n //Yii::$app->utility->logError($class,$method,$model,$token,$message);\n echo json_encode(array(\"error\" => $errorMsg));\n exit;;\n }\n }\n }\n\n $action = $event->id;\n if (isset($this->actions[$action])) {\n $verbs = $this->actions[$action];\n } elseif (isset($this->actions['*'])) {\n $verbs = $this->actions['*'];\n } else {\n return $event->isValid;\n }\n $verb = Yii::$app->getRequest()->getMethod();\n $allowed = array_map('strtoupper', $verbs);\n\n if (!in_array($verb, $allowed)) {\n http_response_code(401);\n $errorMsg=\"Method not allowed\";\n $token=Yii::$app->request->headers['token'];\n $class=__FILE__;\n $method=__FUNCTION__;\n $model=\"SsoUserInformationService\";\n $message=\" ERROR $errorMsg at line \".__LINE__;\n //Yii::$app->utility->logError($class, $method, $model, $token, $message);\n echo json_encode(array(\"error\" => $errorMsg));\n exit;\n }\n return true;\n }", "title": "" }, { "docid": "e05e2f37bffdcd8254395c7ca032be20", "score": "0.59152025", "text": "public function preDispatch(Zend_Controller_Request_Abstract $request) {\n\t\t$resource = $request->getControllerName ();\n\t\t$privilege = $request->getActionName ();\n\t\t\n\t\t// checking permission our special way\n\t\t$boolFlag = $this->_acl->checkPermissions ( $resource, $privilege );\n\t\t\n\t\tif (empty ( $boolFlag )) {\n\t\t\t//If the user has no access we send him elsewhere by changing the request\n\t\t\t$request->setControllerName ( 'authentication' )->setActionName ( 'unauthorized' );\n//\t\t\tthrow new Zend_Acl_Exception(\"Unauthorized\");\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "73537aa4589147dd50b85c2a94c91458", "score": "0.5902696", "text": "abstract public function authorize();", "title": "" }, { "docid": "73537aa4589147dd50b85c2a94c91458", "score": "0.5902696", "text": "abstract public function authorize();", "title": "" }, { "docid": "20d653950c5b5bd1a60c674c2c5f7454", "score": "0.5869974", "text": "public function __invoke(Request $request) {\n //\n }", "title": "" }, { "docid": "20ef3cdd8146499321809f20de2a9008", "score": "0.5869081", "text": "public function __construct() {\n $this->beforeFilter('serviceCSRF');\n\n if ($this->permitted) {\n $this->beforeFilter('authentication');\n \n // This authroization filter resides in the controller\n // because we need to pass the permitted role which is\n // not possible for filters defined in filters.php\n $role = $this->permitted;\n $unauthorizedResponse = $this->unauthorizedResponse();\n $ctrl = $this;\n $this->beforeFilter(function() use ($role, $unauthorizedResponse, $ctrl) {\n if (!UserAuthorization::permit($role)) {\n Log::info(\"Unauthorized access attempt\", array('context' => get_class($ctrl)));\n return $unauthorizedResponse;\n }\n });\n }\n }", "title": "" }, { "docid": "9eae96ae1dfb72b6dc4fd776d2a11546", "score": "0.58334625", "text": "public function before()\n {\n if (in_array($this->request->action(), $this->_no_auth_action))\n {\n $this->_auth_required = FALSE;\n }\n\n parent::before();\n }", "title": "" }, { "docid": "1a080406566fcebc40c2a0d5c1deea70", "score": "0.58327085", "text": "public abstract function authorize();", "title": "" }, { "docid": "3759fc39a84f7b2b6862501c19cca228", "score": "0.583036", "text": "public function __invoke(Request $request)\n {\n //\n \n }", "title": "" }, { "docid": "af9a104a6db69eccb97aabd148474ffd", "score": "0.5829993", "text": "public function __construnct() {\n\t\t$this->beforeFilter('login');\n\t}", "title": "" }, { "docid": "a67c7d7ea3f0c0eeaddeaa6a365b1931", "score": "0.5824541", "text": "public function beforeFilter() {\n \t\t//parent is appController we call\n parent::beforeFilter();\n //use this componennt Auth and allow()\n $this->Auth->allow('add','logout');\n //after this function allowed, go on...\n }", "title": "" }, { "docid": "46f70c28fbadd9d09a3bdc3b05efc41c", "score": "0.58140504", "text": "public function preDispatch()\n {\n $this->checkAuthentication();\n }", "title": "" }, { "docid": "92c5b47e5480b9620344dbbc35a70d8d", "score": "0.5808426", "text": "function get($request){\n $security = Security::getInstance(); \n if(!$security->isLoggedIn() || $security->getClassName() !== \"Admin\"){\n $this->display_error(401);\n }\n\n parent::get($request);\n }", "title": "" }, { "docid": "220b92e0a129994d6d592518dbc8094b", "score": "0.58042324", "text": "protected function preprocessRequest()\n {\n }", "title": "" }, { "docid": "079a6102bc637a933086c4c9db5bf986", "score": "0.58037984", "text": "public function handle_request() {}", "title": "" }, { "docid": "aba069a0803b97285a2638d064880dc5", "score": "0.5800031", "text": "private function HandleRequest(){\n\n // Удаляем лишние символы до начала xml-запроса и после xml-запроса\n $this->postXML = preg_replace('/^.*\\<\\?xml/sim', '<?xml', $this->postXML);\n $this->postXML = preg_replace('/\\<\\/ServiceProvider_Request\\>.*/sim', '</ServiceProvider_Request>', $_REQUEST['XML']);\n\n // Избавляемся от экранирования\n $this->postXML = stripslashes($this->postXML);\n\n // Получаем подпись от iPay\n if (preg_match('/SALT\\+MD5\\:\\s(.*)/', $this->sign, $matches))\n {\n $this->signature = $matches[1];\n }\n }", "title": "" }, { "docid": "6262c861e59cd39ff28f973fe2d3e62f", "score": "0.57978344", "text": "public function accessspecial()\n\t{\n\t\t// CSRF prevention\n\n\t\tif ($this->csrfProtection)\n\t\t{\n\t\t\t$this->_csrfProtection();\n\t\t}\n\n\t\treturn $this->setaccess(2);\n\t}", "title": "" }, { "docid": "0b02350cd6803b47115c031afc67e8d8", "score": "0.5794302", "text": "protected function getRequest() {}", "title": "" }, { "docid": "00e000461be1274289b32654727c7c1b", "score": "0.57822347", "text": "protected function processRequest() : void {}", "title": "" }, { "docid": "b2c50abcfee23384b0b35b7317bbb883", "score": "0.57697344", "text": "public function inRequestScope();", "title": "" }, { "docid": "c8f17138c7b7ae6db13f469895f702dc", "score": "0.5768736", "text": "abstract public function onRequest(Request $request);", "title": "" }, { "docid": "ab4a5b83ed3ce332f4ecda1b9ae53b23", "score": "0.5765381", "text": "public function beforeFilter(Event $event)\n {\n parent::beforeFilter($event);\n $this->Auth->allow(['endpoint', 'authenticated']);\n }", "title": "" }, { "docid": "6ea03799e53f4466dba1eed9f7baf4ac", "score": "0.57600087", "text": "public function setRequestOnHandler(Request $request);", "title": "" }, { "docid": "6248938406d9a9d30cfee0cbb6c6bca7", "score": "0.57454365", "text": "public function handleRequest() {\n\t\t\t/** @var $requestHashService Tx_Extbase_Security_Channel_RequestHashService */\n\t\t$requestHashService = $this->objectManager->get('Tx_Extbase_Security_Channel_RequestHashService'); // singleton\n\t\t$requestHashService->verifyRequest($this->request);\n\n\t\t\t/** @var $response Tx_Extbase_MVC_Web_Response */\n\t\t$response = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');\n\n\t\tif ($this->request->hasReferrerArgument()) {\n\t\t\t$persistedControllerData = $this->sessionAdapter->load($this->request->getControllerObjectName());\n\t\t\tif (count($persistedControllerData) > 0) {\n\t\t\t\tforeach ($persistedControllerData['Arguments'] as $argumentName => $argumentValue) {\n\t\t\t\t\tif ($this->request->hasArgument($argumentName)) {\n\t\t\t\t\t\t$argument = $this->request->getArgument($argumentName);\n\t\t\t\t\t\t$argument = t3lib_div::array_merge_recursive_overrule(\n\t\t\t\t\t\t\t$argumentValue,\n\t\t\t\t\t\t\t$argument\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->request->setArgument($argumentName, $argument);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// @todo: is this case needed anymore???\n\t\t\t\t\t\t$this->request->setHmacVerified(TRUE);\n\t\t\t\t\t\t$this->request->setArgument($argumentName, $argumentValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->sessionAdapter->clear();\n\t\t}\n\n\t\t$this->dispatcher->dispatch($this->request, $response);\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "213c712c7bfb6dc4e89a93a1404fc1d5", "score": "0.57369924", "text": "public function __invoke(Request $request)\n {\n //\n }", "title": "" }, { "docid": "1334a8241a3cb8441137cdf75d15bced", "score": "0.5735232", "text": "protected abstract function handleAuthentication();", "title": "" }, { "docid": "1759cc5f49157e65120ed776af57b05b", "score": "0.57274336", "text": "public function theInterceptedRequestIsStoredInASessionForLaterRetrieval()\n {\n $this->markTestIncomplete();\n\n // At this time, we can't really test this case because the security context\n // does not contain any authentication tokens or a properly configured entry\n // point. Also the browser lacks support for cookies which would enable us\n // to simulate a full round trip.\n\n // -> should be a redirect to some login page\n // -> then: send login form\n // -> then: expect a redirect to the above page and $this->securityContext->getInterceptedRequest() should contain the expected request\n }", "title": "" }, { "docid": "7a17491f59f99bc59b4cf8f0e5b1ea3c", "score": "0.57219887", "text": "public function actionAuthorize()\n {\n Log::debug( 'Inbound $REQUEST: ' . print_r( $_REQUEST, true ) );\n\n $_state = Storage::defrost( Option::request( 'state' ) );\n $_origin = Option::get( $_state, 'origin' );\n $_apiKey = Option::get( $_state, 'api_key' );\n\n Log::debug( 'Inbound state: ' . print_r( $_state, true ) );\n\n if ( empty( $_origin ) || empty( $_apiKey ) )\n {\n Log::error( 'Invalid request state.' );\n throw new BadRequestException();\n }\n\n if ( $_apiKey != ( $_testKey = sha1( $_origin ) ) )\n {\n Log::error( 'API Key mismatch: ' . $_apiKey . ' != ' . $_testKey );\n throw new ForbiddenException();\n }\n\n $_code = FilterInput::request( 'code', null, FILTER_SANITIZE_STRING );\n\n if ( !empty( $_code ) )\n {\n Log::debug( 'Inbound code received: ' . $_code . ' from ' . $_state['origin'] );\n }\n else\n {\n if ( null === Option::get( $_REQUEST, 'access_token' ) )\n {\n Log::error( 'Inbound request code missing.' );\n throw new RestException( HttpResponse::BadRequest );\n }\n else\n {\n Log::debug( 'Token received. Relaying to origin.' );\n }\n }\n\n $_redirectUri = Option::get( $_state, 'redirect_uri', $_state['origin'] );\n $_redirectUrl =\n $_redirectUri . ( false === strpos( $_redirectUri, '?' ) ? '?' : '&' ) . \\http_build_query( $_REQUEST );\n\n Log::debug( 'Proxying request to: ' . $_redirectUrl );\n\n header( 'Location: ' . $_redirectUrl );\n exit();\n }", "title": "" }, { "docid": "a0233a1992e999c2064701362e6a11f2", "score": "0.5721656", "text": "public function __invoke(Request $request){\n //\n }", "title": "" }, { "docid": "a0583c2455a7c431c0ab0c2f58a33f8f", "score": "0.5713406", "text": "public function handleRequest();", "title": "" }, { "docid": "1674e014fc56019c72d1aa0bef0a3a2e", "score": "0.5689861", "text": "function securiser() {}", "title": "" }, { "docid": "303a71f13858f9dc0aa79b8feba40432", "score": "0.5683478", "text": "public function beforeFilter() {\n parent::beforeFilter();\n\t\t$this->Security->unlockedActions = array('ajaxAction');\n\t\t$this->Security->csrfCheck = false;\n\t\t$this->Security->validatePost = false;\n\t\t$includeBeforeFilterAdmin = array('add','index');\n\t\tif (in_array($this->action,$includeBeforeFilterAdmin)){\n\t\t\tif(isset($this->request->data['cookie'])){\n\t\t\t\tparent::checkadmin($this->request->data['cookie']);\n\t\t\t}else if(isset($this->request->query['cookie'])){\n\t\t\t\tparent::checkadmin($this->request->query['cookie']);\n\t\t\t}else{\n\t\t\t\tparent::sendmsg(\"101\");\t\n\t\t\t}\n\t\t} \n }", "title": "" }, { "docid": "03c7be8c458d3f2c3458fc9729c7daad", "score": "0.5680204", "text": "public function handleRequest ()\n\t{\n\t\t$this->service->handleRequest();\n\t}", "title": "" }, { "docid": "2af6ea2dff153d83b96594ed72490ce9", "score": "0.56585944", "text": "public function loginCheckAction()\n {\n // as the route is handled by the Security system\n }", "title": "" }, { "docid": "e5234925c460dac5cf0cbfb760c62dfa", "score": "0.5658167", "text": "public function beforeFilter(Event $event)\n {\n if (in_array($this->request->action, $this->secureActions)\n && !isset($_SERVER['HTTPS'])) {\n // $this->forceSSL();\n }\n\n $this->Auth->allow(['add', 'requestUser', 'forgotPassword', 'changePasswordMedecin', 'search', 'forgotpass', 'login', 'logout']);\n $this->Auth->authError = __('Vous devez vous connecter pour pouvoir accéder à cette fonctionnalité.');\n // $this->Auth->loginError = __('Invalid Username or Password entered, please try again.');\n }", "title": "" }, { "docid": "b44752200cfa3cb5a6506631f2d79470", "score": "0.5646628", "text": "public function preDispatch()\n {\n // a brute-force protection here would be nice\n\n parent::preDispatch();\n\n if (!$this->getRequest()->isDispatched()) {\n return;\n }\n\n if (!$this->_getSession()->authenticate($this)) {\n $this->setFlag('', 'no-dispatch', true);\n }\n \n }", "title": "" }, { "docid": "8d601a41956aa23e8302483d42413b53", "score": "0.56447697", "text": "protected function forwardToReferringRequest() {}", "title": "" }, { "docid": "b66fb43c26ed7243310a8f46a0f86ef9", "score": "0.561668", "text": "public function preAuth(Request $request, Response $response)\n {\n }", "title": "" }, { "docid": "e999a8977676b42fb4dcf9f93d8e3d7b", "score": "0.5614924", "text": "abstract public function handleRequest();", "title": "" }, { "docid": "e2bc118037514a4e59c7fb262b8b734c", "score": "0.5610635", "text": "public function beforeFilter() {\r\n\t\tif ($this->isRest()) {\r\n\t\t\t$this->Auth->autoRedirect = false;\r\n\t\t\t$this->loadModel('User');\r\n\t\t\t$this->loadModel('Group');\r\n\t\t\t$credentials = $this->Rest->credentials(true);\r\n\t\t\t$user = $this->User->find('first', array(\r\n\t\t\t\t'conditions' => array('User.username' => $credentials['username'],\r\n\t\t\t\t\t\t\t\t\t 'User.account_sid' => $credentials['account_sid'])\r\n\t\t\t));\t\t\t\r\n\t\t\tif (!empty($user) /*&& $this->Auth->login($user)*/) {\r\n\t\t\t\t$this->Auth->allow($this->params['action']);\t\t\t\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn $this->Rest->abort(array('status' => '403', 'error' => 'Unable to log you in with the supplied credentials'));\r\n\t\t\t}\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "57a682145d768b1da5beffa64608df64", "score": "0.5607402", "text": "function authorize() {}", "title": "" }, { "docid": "edea151dffa752da3de2c8c5f00d495e", "score": "0.560286", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t\n\t\t//don't want users accessing this controller unless it's via an AJAX call\n\t\tif(!$this->input->is_ajax_request()){\n\t\t\theader('', true, 403);\n\t\t\tdie(json_encode(array('success' => false,\n\t\t\t\t\t\t\t\t\t'message' => 'invalid access attempt')));\n\t\t}\n\t}", "title": "" }, { "docid": "4a0989d5c0251f85edecf0490339a825", "score": "0.5598283", "text": "public function beforeFilter(){\n\t\t$mod_id = ($this->request->params['pass'][0] == 'pending' || $this->request->params['pass'][3] == 'pending' \n\t\t\t\t\t|| $this->request->params['pass'][4] == 'pending')\t? '46' : '47';\n\t\t$this->check_session();\n\t\t$this->check_role_access($mod_id);\n\t\t\n\t}", "title": "" }, { "docid": "862ee0606e045cd2646e4bee2b5ae24d", "score": "0.55921584", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->Auth->allow('view', 'index', 'verify', 'check', 'forgot', 'reset');\n\t}", "title": "" }, { "docid": "7f9f5e03cfb354793a99b90ea1a0704b", "score": "0.5589973", "text": "public function beforeFilter() {\n $this->Auth->allow();\n }", "title": "" }, { "docid": "6afd06234bc275c5fb799ac00e01cee6", "score": "0.5588239", "text": "public function beforeFilter() {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "6afd06234bc275c5fb799ac00e01cee6", "score": "0.5588239", "text": "public function beforeFilter() {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "0a6b5d435518834068f347a2a3091cac", "score": "0.5584211", "text": "public function filterEventContext($filterChain) {\n if (isset($_GET['event']))\n $this -> _event = $this -> loadEvent($_GET['event']);\n else\n throw new CHttpException(403, 'Must specify aan event before performing this action.');\n //complete the running of other filters and execute the requested action\n $filterChain -> run();\n }", "title": "" }, { "docid": "3fe34a006944a9e3cfe613edea9cbbe8", "score": "0.5583396", "text": "public function preDispatch()\n\t{\n\t\tif(!\\Install\\Modules::isInstalled('permission'))\n\t\t\treturn;\n\n\t\t$request = $this->getRequest();\n\n\t\t$permission = strtolower(str_replace('\\\\', '.', get_class($this)));\n\n\t\t// User has the required permission\n\t\tif(\\Permission\\Permission::capable($permission))\n\t\t\treturn;\n\n\t\t// Normal request - forward to controller action response\n\t\tif(in_array(self::detect($request), [ self::$ResponseFormatPlain, self::$ResponseFormatUnknown ]))\n\t\t\treturn $this->invalidate('onInvalidRender');\n\n\t\t$wrong_content_check = ob_get_contents();\n\n\t\t// We are going to put JSON data, but we have no JSON content - it might be an error - Normal output\n\t\tif($wrong_content_check && !json_decode($wrong_content_check))\n\t\t\treturn $this->invalidate('onInvalidRender');\t\t\t\n\n\t\t$request->setQuery('callback', 'alert');\n\t\t$this->responseJsonCallback('Access denied.');\n\n\t\texit;\n\t}", "title": "" }, { "docid": "c83f3136d7bcf163a9c07e7912552159", "score": "0.55819905", "text": "function beforeFilter() {\n // Force restful, since by definition we are\n $this->request->addDetector('restful', array('callback' => function ($request) { return true; }));\n \n // Run the auth check\n parent::beforeFilter();\n \n $memberid = isset($this->params['memberid']) ? $this->params['memberid'] : null;\n $groupid = isset($this->params['groupid']) ? $this->params['groupid'] : null;\n \n if(isset($this->params['ext'])) {\n // Because the non-VOOT API calls accept a formatting notation as an extension\n // (eg: /cos.json, /co_people.xml) and the VOOT API calls don't, part of our\n // identifier may have been parsed into an extension (eg: foo.internet2 / edu).\n // Practically, this only applies to memberid at the moment since groupid is\n // expected to be numeric, but we'll handle the groupid case anyway.\n \n if($memberid && !$groupid) {\n $memberid .= \".\" . $this->params['ext'];\n } elseif($groupid) {\n $groupid .= \".\" . $this->params['ext'];\n }\n }\n \n if($memberid) {\n // Map the provided identifier to one or more CO Person IDs.\n \n try {\n // XXX We should really provide an identifier type. Instead, we'll just\n // take the first person returned.\n // Don't look for login identifiers only since conext needs to map urn:\n // style identifiers.\n $coppl = $this->CoPerson->idsForIdentifier($memberid, null);\n \n if(!empty($coppl)) {\n $this->coPersonIdReq = $coppl[0];\n }\n }\n catch(InvalidArgumentException $e) {\n if($e->getMessage() == _txt('er.id.unk')) {\n $this->Api->restResultHeader(404, \"Identifier Unknown\");\n } else {\n $this->Api->restResultHeader(404, \"CO Person Unknown\");\n }\n $this->response->send();\n exit;\n }\n } else {\n $this->Api->restResultHeader(400, \"Bad Request\");\n $this->response->send();\n exit;\n }\n \n // We just copy the Group ID if set\n if($groupid) {\n $this->coGroupIdReq = $groupid;\n }\n }", "title": "" }, { "docid": "47c5b3d1078b0a288cc9b98835614590", "score": "0.557575", "text": "public function beforeFilter(Event $event)\n {\n parent::beforeFilter($event);\n // Deny un-authenticated users from seeing details about applications\n $this->Auth->deny(['index', 'view']);\n \n // Allow un-authenticated users to see the following actions\n //$this->Auth->allow(['add']);\n }", "title": "" }, { "docid": "284c4206a501bdc6c16f48c2496dbf18", "score": "0.5571196", "text": "public function __construct()\n {\n $this->middleware('auth:api', ['except' => ['getEvent']]);\n header(\"Access-Control-Allow-Origin: \" . getOrigin($_SERVER));\n }", "title": "" }, { "docid": "6bfb67412bf3cbfe2911f3a95ce5f76f", "score": "0.55678594", "text": "public function handlePreflightRequest(Request $request): Response;", "title": "" }, { "docid": "c04bdf4c96e714c6498a6f3f69de12e3", "score": "0.55648434", "text": "public function preDispatch(Zend_Controller_Request_Abstract $request) {\r\n $role = MyAcl::ROLE_GUEST;\r\n \t\r\n \tif(Zend_Auth::getInstance()->hasIdentity()){\r\n \t\t//logged in\t \r\n \t\t$authStorage = Zend_Auth::getInstance()->getStorage();\r\n\t $userInfo = $authStorage->read();\r\n\t $role = $userInfo->role;\t\t \r\n \t}\r\n \r\n //For this example, we will use the controller as the resource:\r\n $resource = $request->getControllerName();\r\n $action = $request->getActionName();\r\n \r\n if(!$this->_acl->isAllowed($role, $resource, $action)) {\r\n //If the user has no access we send him elsewhere by changing the request\r\n \r\n //if not logged in, show login page, otherwise error\r\n if($role == MyAcl::ROLE_GUEST){\r\n \t$request->setControllerName('user')\r\n \t->setActionName('login');\r\n }else{\r\n \t$request->setControllerName('error')\r\n \t->setActionName('denied');\r\n }\r\n }\r\n }", "title": "" }, { "docid": "09f89b295ce814e4a9a2c9779206dd16", "score": "0.55642337", "text": "public function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('update');\n }", "title": "" }, { "docid": "6922934e2f772449bbfd56124845ccdc", "score": "0.55640465", "text": "public function preDispatch(Zend_Controller_Request_Abstract $request)\r\n\t{\r\n if ($this->auth->hasIdentity()) {\r\n return;\r\n }\r\n\r\n // anything other means the user is not logged in\r\n $request->setModuleName('identity');\r\n $request->setControllerName('account');\r\n $request->setActionName('login');\r\n\t}", "title": "" }, { "docid": "93af68e17faf629b309889615fd18620", "score": "0.55563027", "text": "public function preDispatch()\n {\n $role = Zend_Registry::get('config')->acl->defaultRole;\n if ($this->_auth->hasIdentity()) {\n $user = $this->_auth->getIdentity();\n if (is_object($user) && !empty($user->role)) {\n $role = $user->role;\n }\n }\n\n $request = $this->_action->getRequest();\n $controller = $request->getControllerName();\n $action = $request->getActionName();\n $module = $request->getModuleName();\n $this->_controllerName = $controller;\n\n $resource = $controller;\n $privilege = $action;\n\n if (!$this->_acl->has($resource)) {\n $resource = null;\n }\n\n if ($resource == 'error' && $privilege == 'error') {\n return;\n }\n\n if (!$this->_acl->isAllowed($role, $resource, $privilege)) {\n $request->setModuleName('default')->setControllerName('auth')->setActionName('noaccess');\n $request->setDispatched(false);\n return;\n }\n }", "title": "" }, { "docid": "3cf0e8c745d98384b6a8bc2e3ceaa2b4", "score": "0.55481887", "text": "public function beforeFilter(){\r\n\t\t/* Llamar al metodo beforeFilter() del padre */\r\n\t\tparent::beforeFilter();\r\n\t\t/* Para implementar formularios seguros que requieran Authentication Key y usen solo el método POST */\r\n\t\t//$this->Security->requireAuth('login', 'logout');\r\n\t\t/* Para configurar el algoritmo OWF de encriptación para las contraseñas */\r\n\t\tSecurity::setHash('md5');\r\n\t\t/* Define la accion que a que redirecciona cuando es autenticado exitosamente */\r\n\t\t$this->Auth->loginRedirect = array('controller' => 'adm', 'action' => 'index');\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1b0ffe9b081ecc720b80486ea36ae3fb", "score": "0.5546944", "text": "public function process()\n {\n //$this->container = $this->container\n // ->withSingleton(DatabaseServiceInterface::class, DatabaseService::class)\n // ->withTransient(DoSomethingInterface::class, DoSomething::class);\n\n // Redirect to HTTPS\n //$this->useHttps();\n\n // Allow CORS\n //$this->allowCors();\n\n // Use routing to map route\n //$this->useRouting(new Route());\n\n // Middleware before passing request to controller such as authorization can apply here\n\n // Invoke the action to fulfill the request\n // Data likes user information from Authorization can be passed to controller by bucket\n //$this->invokeAction(bucket: null);\n\n // Middleware after invoke the action can be here\n }", "title": "" }, { "docid": "8913787a07fd29995ee771f1f2c7a79c", "score": "0.55455834", "text": "public function beforeFilter(Event $event) {\n\t\tparent::beforeFilter($event);\n\t\t$this->loadModel('Usermgmt.UserGroupPermissions');\n\t\tif(isset($this->Security)) {\n\t\t\t$this->Security->config('unlockedActions', [$this->request['action']]);\n\t\t}\n\t\tif(isset($this->Csrf)) {\n\t\t\t$this->eventManager()->off($this->Csrf);\n\t\t}\n\t}", "title": "" }, { "docid": "59cb969909540bc9f1ae05010a45523e", "score": "0.55398947", "text": "public function handleRequest() {\n\t\t$request = $this->requestBuilder->build();\n\n\t\t// TODO: implement request verification (fake hmac)\n\n\t\t// Request hash service\n\t\t//$requestHashService = $this->objectManager->get('Tx_Extbase_Security_Channel_RequestHashService'); // singleton\n\t\t//$requestHashService->verifyRequest($request);\n\t\t$request->setHmacVerified(TRUE);\n\n\t\tif (version_compare(TYPO3_branch, '4.7', '<')) {\n\t\t\t$isActionCacheable = $this->isCacheable($request->getControllerName(), $request->getControllerActionName());\n\t\t} else {\n\t\t\t$isActionCacheable = $this->extensionService->isActionCacheable(NULL, NULL, $request->getControllerName(), $request->getControllerActionName());\n\t\t}\n\t\tif ($isActionCacheable) {\n\t\t\t$request->setIsCached(TRUE);\n\t\t} else {\n\t\t\t$contentObject = $this->configurationManager->getContentObject();\n\t\t\tif ($contentObject->getUserObjectType() === tslib_cObj::OBJECTTYPE_USER) {\n\t\t\t\t$contentObject->convertToUserIntObject();\n\t\t\t\t// tslib_cObj::convertToUserIntObject() will recreate the object, so we have to stop the request here\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$request->setIsCached(FALSE);\n\t\t}\n\t\t$response = $this->objectManager->create('Tx_Extbase_MVC_Web_Response');\n\n\t\t$this->dispatcher->dispatch($request, $response);\n\n\t\tif(stripos($request->getFormat(), 'json') !== FALSE) {\n\t\t\t$response->setHeader('Content-type', 'application/json; charset=UTF-8');\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "29ede322fe5ad490ac1f3c089cececae", "score": "0.5539276", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\tif(in_array($this->params['action'], array('edit', 'admin_edit', 'register', 'reset_password', 'admin_index', 'register'))) {\n\t\t\t$this->Security->validatePost = false;\n\t\t}\n\t\t$this->set('authFields', $this->Auth->fields);\n\t\t$this->Auth->allow(\n\t\t\t'confirm',\n\t\t\t'forgotten_password',\n\t\t\t'index',\n\t\t\t'login',\n\t\t\t'logout',\n\t\t\t'profile',\n\t\t\t'register',\n\t\t\t'register_popup',\n\t\t\t'reset_password',\n\t\t\t'switch_language'\n\t\t);\n\t\t$this->Auth->autoRedirect = false;\n\t\tif (isset($this->Security)) {\n\t\t\t$this->Security->blackHoleCallback = '_blackHole';\n\t\t}\n\n\t}", "title": "" }, { "docid": "5d07b127b831acdc51b22649249a0340", "score": "0.55290484", "text": "public function authorize($request, $response) {\n\t}", "title": "" }, { "docid": "2ac7ccc27098ac3501200057c6e9179c", "score": "0.55284077", "text": "public function filter_pre(Cpf_Core_Request $request);", "title": "" }, { "docid": "8acecf4669660f930c5553eba2980078", "score": "0.5527889", "text": "public function beforeFilter()\n {\n parent::beforeFilter();\n }", "title": "" }, { "docid": "4e38fb6366d8b05eca4c5cdc2a25a7ad", "score": "0.5526943", "text": "function beforeFilter () {\r\n $this->Allow('login');\r\n $this->Allow('edit');\r\n $this->Allow('logout');\r\n parent::beforeFilter();\r\n }", "title": "" }, { "docid": "2072f4bec3aa651c18c2d3e80fa191a8", "score": "0.552507", "text": "public function sign(BeforeEvent $event)\n {\n $request = $event->getRequest();\n\n if ($request->getMethod() === 'GET') {\n $this->authenticateGetRequest($request);\n }\n }", "title": "" }, { "docid": "ac0073c7feda908ed507854db7094ba7", "score": "0.5524495", "text": "public function beforeFilter(Event $event)\n {\n parent::beforeFilter($event);\n // Deny un-authenticated users from seeing the following actions\n $this->Auth->deny(['index', 'view']);\n \n // Allow un-authenticated users to see the following actions\n //$this->Auth->allow(['add']);\n }", "title": "" }, { "docid": "a645793db95252115223a7579bd77de9", "score": "0.55236", "text": "public function preAction() {\n $this->user = SecurityManager::getInstance()->getUser();\n }", "title": "" }, { "docid": "ae5e658cba29c86c87eac852e1c2945e", "score": "0.55203795", "text": "public function authenticate(){\n /* request from the same server don't have a HTTP_ORIGIN header */\n if (array_key_exists('HTTP_ORIGIN', $_SERVER)) {\n $response = array();\n if($_SERVER['HTTP_ORIGIN'] !== 'http://'.$_SERVER['SERVER_NAME']){\n $response[\"status\"] = false ;\n $response[\"result\"] = \"Request from server \" . $_SERVER['HTTP_ORIGIN'] . \" is not allowed\";\n $this->jsEcho($response,401);\n exit();\n }\n }\n\n }", "title": "" }, { "docid": "311f039e6f8ad05665c2ffd6cb2f8a4d", "score": "0.55181295", "text": "public function preDispatch()\n\t{\n\t\t\n\t\t$request \t\t\t\t\t= $this->getRequest();\n \t\n \t$user \t\t\t\t\t\t= Point_Model_User::getInstance();\n \t$groups \t\t\t\t\t= Point_Model_Groups::getInstance();\n\t\t$this->_user_priviledge\t\t= $groups->getMembership($user->getUserId());\n \t$this->_user \t\t\t\t= $user;\n \t\t \n \t\t\n \t\t$action_name = $request->getActionName();\n \t\t\n \t\t \n \tif (!$user->isLoggedIn() && \n \t\t('index' \t!= $action_name && \n\t\t\t 'events' \t!= $action_name && \n\t\t\t 'search' \t!= $action_name ))\n\t\t{\n\t \t$this->_redirect('error/noaccess');\n\t\t}\n\t}", "title": "" }, { "docid": "b4e85538ad1fd41a5cde555792c697db", "score": "0.55170316", "text": "public function processRequest(){\n if(!$this->_verifyAccess()){\n throw new v\\PageRedirectException(403);\n }\n if(isset($this->_get['ajax']) || isset ($this->_post['ajax'])){\n return $this->_processAjax();\n }\n if(!empty($this->_post)){\n return $this->_processPost();\n }\n return $this->_processGet();\n }", "title": "" }, { "docid": "e3fbdda9bff1ee78388f9c683eb8ed6a", "score": "0.55152863", "text": "function __construct()\n {\n $this->beforeFilter('auth.basic');\n// We want to enable CSFR protection on both the 'store' action.\n $this->beforeFilter('csrf', array('on' => 'store'));\n }", "title": "" }, { "docid": "07739e3425bd8462dceec6cc7f03c164", "score": "0.55147606", "text": "public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t\n\t\t\n\n\t}", "title": "" }, { "docid": "e000ef67390890b488623f299640a6c2", "score": "0.55123997", "text": "public function canHandleRequest() {}", "title": "" }, { "docid": "e000ef67390890b488623f299640a6c2", "score": "0.55123997", "text": "public function canHandleRequest() {}", "title": "" }, { "docid": "e000ef67390890b488623f299640a6c2", "score": "0.55123997", "text": "public function canHandleRequest() {}", "title": "" }, { "docid": "58786f0301dca77fbeb3d5b424c04467", "score": "0.5510042", "text": "function model_security( &$request, &$db ) {\n $action = $request->action;\n \n if ( isset( $request->resource ) )\n $model =& $db->get_table( $request->resource );\n else\n return true; // request is not for a resource\n\n if (public_resource())\n return true;\n\n if (virtual_resource())\n return true;\n \n if ( !( in_array( $action, $model->allowed_methods, true )))\n $action = 'get';\n \n $failed = false;\n \n authenticate_with_openid();\n \n // this switch is now repeated in $model->can($action)\n \n switch( $action ) {\n case 'get':\n if (!($model && $model->can_read_fields( $model->field_array )))\n $failed = true;\n break;\n case 'put':\n $submitted = $model->fields_from_request( $request );\n foreach ( $submitted as $table=>$fieldlist ) {\n $model =& $db->get_table($table);\n if (!($model && $model->can_write_fields( $fieldlist )))\n $failed = true;\n }\n break;\n case 'post':\n $submitted = $model->fields_from_request( $request );\n foreach ( $submitted as $table=>$fieldlist ) {\n $model =& $db->get_table($table);\n if (!($model && $model->can_create( $table )))\n $failed = true;\n }\n break;\n case 'delete':\n if (!($model && $model->can_delete( $request->resource )))\n $failed = true;\n break;\n default:\n $failed = true;\n }\n \n if (!$failed)\n return true;\n \n authenticate_with_openid();\n \n trigger_error( \"Sorry, you do not have permission to $action \".$request->resource, E_USER_ERROR );\n \n}", "title": "" } ]
c14fb013a7a5d1ae866d1593006695c7
Forces initialization of the proxy
[ { "docid": "ca22aa3f7df5d17ca9a273572f49c5e9", "score": "0.0", "text": "public function __load(): void\n {\n $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []);\n }", "title": "" } ]
[ { "docid": "2fa1e519c12279722430c7efc5894bb3", "score": "0.7299369", "text": "public function __construct(){\n $this->_proxies = array();\n }", "title": "" }, { "docid": "50998edd824342ff31b5778ab77123af", "score": "0.6685748", "text": "public static function initialize()\n {\n date_default_timezone_set('Asia/Shanghai');\n putenv('http_proxy=http://127.0.0.1:1081');\n putenv('https_proxy=http://127.0.0.1:1081');\n }", "title": "" }, { "docid": "d3a79bca633e15288706be6b44206c75", "score": "0.6606308", "text": "private function initializeOnDemand()\n {\n if ($this->initialized === false) {\n\n $this->initialized = true;\n $this->cache = $this->cacheMapper->fetchAll();\n\n // Run garbage collection on each HTTP request\n $this->gc();\n }\n }", "title": "" }, { "docid": "3dcba71682113d40f2278fa78db06b50", "score": "0.6476528", "text": "public function FLOW3_AOP_Proxy_construct() {}", "title": "" }, { "docid": "0bbbde589ea01b17526e3abdd74ecc93", "score": "0.63962084", "text": "public function _initialize()\n {\n $this->_reconfigure(); // hook for BC only.\n }", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.62994456", "text": "protected function init() {}", "title": "" }, { "docid": "2babdb86d84180576499bdb27da1d274", "score": "0.6223052", "text": "protected abstract function init();", "title": "" }, { "docid": "c1836c7d4e9e065d5a12edd9870088b4", "score": "0.6190085", "text": "protected function doInit()\n {\n }", "title": "" }, { "docid": "a99fa2014df7e2fcabcc0b9e4e7f5d55", "score": "0.6189399", "text": "public abstract function initialize();", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.61887115", "text": "protected function initialize() {}", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "ec9c3f89aeed607bddd462fab841f2c8", "score": "0.6166239", "text": "public abstract function init();", "title": "" }, { "docid": "76cf5f057d1a92bfb5630ad0523ec486", "score": "0.61531746", "text": "protected abstract function init(): void;", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.6141522", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.6141522", "text": "protected function init(){}", "title": "" }, { "docid": "afd423383115d0a421727f829902dfb6", "score": "0.6136019", "text": "protected function initCache() {\n\t\tself::$cacheObj = new SetupCacheHandler();\n\t}", "title": "" }, { "docid": "06f30f3da589605e9d0a723f6f9ae3ed", "score": "0.61348873", "text": "public function init() {\n return;\n }", "title": "" }, { "docid": "541162b6360dc91552857238e44e3ca8", "score": "0.61001503", "text": "public function __construct()\n {\n //self::disable_gzip();\n\n $this->settings = self::getSettings();\n $this->targetPath = rtrim($this->settings['url'], \"/\");\n $this->host = parse_url($this->targetPath)['host'];\n\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {\n $this->domainURL = 'https://' . $_SERVER['HTTP_HOST'];\n } else {\n $this->domainURL = 'http://' . $_SERVER['HTTP_HOST'];\n }\n\n $part = basename(__FILE__);\n $requestURI = $_SERVER['REQUEST_URI'];\n $pos = self::getPosition($requestURI, $part);\n\n if ($pos !== false) {\n $requiredURI = self::getActualURI($requestURI, $pos, $part);\n $this->url = $this->targetPath . $requiredURI;\n } else {\n echo \"Ensure correct location of proxy.php on server is set. Check $part variable.\";\n }\n\n }", "title": "" }, { "docid": "a6e07b8988157fa45ecb0b1406194e88", "score": "0.60995", "text": "protected function initialize();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "bbbfde5de3d2c79372dac8fb4c1b2248", "score": "0.60887957", "text": "abstract protected function init();", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "301b396f2e10e9368a994b407609017e", "score": "0.6078243", "text": "public function init() {}", "title": "" }, { "docid": "20a997f60f3086611e9b7f0b4088ff8f", "score": "0.60422856", "text": "abstract protected function initialize();", "title": "" }, { "docid": "20a997f60f3086611e9b7f0b4088ff8f", "score": "0.60422856", "text": "abstract protected function initialize();", "title": "" }, { "docid": "20dc36ac5cb150667a224377e95416a3", "score": "0.603298", "text": "abstract protected function internalInit();", "title": "" }, { "docid": "2c1091505b59ab13378f989153cb7715", "score": "0.6013329", "text": "public function initialize()\n\t{\n\t\t/* NOOP */\n\t}", "title": "" }, { "docid": "e60b0c620f508033aa5ad9c4e62395a1", "score": "0.60036385", "text": "public final function initialize() {\n\t\t$this->_ensureModuleExistance();\n\t\t$this->_memcache = new Memcache();\n\t\t$this->_memcache->connect($this->_host, $this->_port);\n\t}", "title": "" }, { "docid": "f704706161c27e40d2d119be70fe9e7f", "score": "0.6002679", "text": "private function init()\n {\n static $initialised = false;\n\n if (!$initialised) {\n $this->digitalOcean = new DigitalOceanV2(new GuzzleAdapter($this->params[self::TOKEN]));\n $initialised = true;\n }\n }", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.59969395", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.59969395", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "bfc60ddb34d41a565062b4986acd8c07", "score": "0.59952956", "text": "public function on_init_own()\n {\n // This is overriden in context-specific classes\n }", "title": "" }, { "docid": "d5d12fe2740a7e76f111c221da665534", "score": "0.59882396", "text": "public abstract function initiate();", "title": "" }, { "docid": "e1529f259a39f2f94f997c5e87d61a0f", "score": "0.5981248", "text": "abstract public function initialize();", "title": "" }, { "docid": "e1529f259a39f2f94f997c5e87d61a0f", "score": "0.5981248", "text": "abstract public function initialize();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "4437a4a6146f0492fabeeefabca22bd5", "score": "0.59722406", "text": "abstract public function init();", "title": "" }, { "docid": "99b3cabdfaa0a0f6b499afba8a1656e3", "score": "0.59658325", "text": "protected function _init()\n {\n \n }", "title": "" }, { "docid": "cbd0f89b64e8805f78b313b88abc7a2c", "score": "0.5961577", "text": "protected function _init () { /* Implement me. */ }", "title": "" }, { "docid": "5f7f699221f379de12d861def45f61fa", "score": "0.59597695", "text": "public function init()\n {\n parent::init();\n $this->oDownloader = new YouTubeDownloader();\n $this->oCurl = new curl\\Curl();\n }", "title": "" }, { "docid": "203c66b4705f2d77d74754ec5727cab7", "score": "0.5955027", "text": "public function init()\n {\n \treturn;\n }", "title": "" }, { "docid": "02d597a58dff7a327c0da414f7ea988e", "score": "0.595134", "text": "protected function init(): void\n {\n // nothing to do\n }", "title": "" }, { "docid": "a4ee4ff43df9b11e43934907e6c6b479", "score": "0.5950718", "text": "protected function _init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "4ce5fcfc2b0a4010196907e187fe6ac3", "score": "0.59445876", "text": "protected function _init()\n {\n if (! $this->initialized) {\n $this->initialize();\n $this->initialized = true;\n }\n }", "title": "" }, { "docid": "b984bb9161aaa444ce476baf7241d4b9", "score": "0.5944223", "text": "public function init() {\n\t\tparent::init();\n\t\t$this->afterRestore();\n\t}", "title": "" }, { "docid": "ddee5108542b9b6817d603fe96afc85a", "score": "0.59389657", "text": "protected function init() {\n\t\n }", "title": "" }, { "docid": "f311c761f107f24398421379d80ec5ef", "score": "0.5938893", "text": "public function init()\n {\n $this->openConnection();\n $this->decorateGateway();\n }", "title": "" }, { "docid": "6fda583db6a4264a58b2b10dfdbdfcf1", "score": "0.59291637", "text": "protected function INITIALIZE()\n {\n\n }", "title": "" }, { "docid": "71d65eca60e69c45ae563fd20d7a810c", "score": "0.5925656", "text": "protected function _init() // {{{\n {}", "title": "" }, { "docid": "e165abfeab90abbd63dbad721ddf08be", "score": "0.59239477", "text": "protected function init() {\n\n }", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.59037995", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.59037995", "text": "public function init(){}", "title": "" }, { "docid": "0ac4f674cdefdf0794ce45e17311fa16", "score": "0.59037995", "text": "public function init(){}", "title": "" }, { "docid": "df5f3b72867b85e3fa8772e2c5c104d0", "score": "0.5898062", "text": "public function init()\n {\n // method called before any other\n }", "title": "" }, { "docid": "a405f03abae8b0b40f91094c48c9dfc1", "score": "0.5897106", "text": "protected function _init()\n {\n // URIs\n if (empty($this->_uris)) {\n $this->_configureUris();\n }\n\n $httpClient = $this->getRestClient()->getHttpClient();\n $httpClient->resetParameters();\n $this->getRestClient()->setUri($this->getUri('api_ssl'));\n if (null == $this->_cookieJar) {\n $httpClient->setCookieJar();\n $this->_cookieJar = $httpClient->getCookieJar();\n } else {\n $httpClient->setCookieJar($this->_cookieJar);\n }\n }", "title": "" }, { "docid": "720314b40dadf4d5c4a7a26f4bb89987", "score": "0.5894084", "text": "protected function setUp()\r\n {\r\n $this->object = new DataStoreMemory();\r\n $response = new Response();\r\n $this->request = new ServerRequest([], [], '/foo');\r\n $this->delegator = new CallableDelegateDecorator(function ($req, $resp) {\r\n return $req;\r\n }, $response);\r\n }", "title": "" }, { "docid": "07b874c04dc00c6dd41a0951bf832a1f", "score": "0.5888115", "text": "public function init(){\r\n //implementation of init func-ty\r\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.58857244", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "cbaf3e228f647f8fdf0b494d67da48db", "score": "0.5884069", "text": "public function init();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "bade19e4bfdfc204bcb66096a566df35", "score": "0.5874206", "text": "public function initialize();", "title": "" }, { "docid": "b5d692f66de630b17741e6b371d97784", "score": "0.58711416", "text": "public function __construct()\n {\n $plugins = \\Piwik\\Plugin\\Manager::getInstance()->getLoadedPluginsName();\n foreach ($plugins as $plugin) {\n try {\n $className = Request::getClassNameAPI($plugin);\n Proxy::getInstance()->registerClass($className);\n } catch (Exception $e) {\n }\n }\n }", "title": "" }, { "docid": "a46059b938a5bf0484179d8029f21620", "score": "0.58668846", "text": "public function __construct()\n {\n parent::__construct();\n $this->log = LoggerFactory::get('proxy_scrap', 'Y-m-d', 20);\n }", "title": "" }, { "docid": "bb01749c18a46d0c66d6a69b668575b9", "score": "0.5864433", "text": "protected function initialize() {\n\t}", "title": "" } ]
98df80cc659fb2b9b2979fd8cf534b4c
The jQuery create field callback
[ { "docid": "0ce0d6e7ed1d97e5c2648a09a7767163", "score": "0.7113114", "text": "public function ajax_create_field() {\n\t\tglobal $wpdb;\n\n\t\t$data = array();\n\t\t$field_options = $field_validation = $parent = $previous = '';\n\n\t\tforeach ( $_REQUEST['data'] as $k ) {\n\t\t\t$data[ $k['name'] ] = $k['value'];\n\t\t}\n\n\t\tcheck_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );\n\n\t\t$form_id = absint( $data['form_id'] );\n\t\t$field_key = sanitize_title( $_REQUEST['field_type'] );\n\t\t$field_type = strtolower( sanitize_title( $_REQUEST['field_type'] ) );\n\n\t\t$parent = ( isset( $_REQUEST['parent'] ) && $_REQUEST['parent'] > 0 ) ? $_REQUEST['parent'] : 0;\n\t\t$previous = ( isset( $_REQUEST['previous'] ) && $_REQUEST['previous'] > 0 ) ? $_REQUEST['previous'] : 0;\n\n\t\t// If a Page Break, the default name is Next, otherwise use the field type\n\t\t$field_name = ( 'page-break' == $field_type ) ? 'Next' : $_REQUEST['field_type'];\n\n\t\t// Set defaults for validation\n\t\tswitch ( $field_type ) :\n\t\t\tcase 'select' :\n\t\t\tcase 'radio' :\n\t\t\tcase 'checkbox' :\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'email' :\n\t\t\tcase 'url' :\n\t\t\tcase 'phone' :\n\t\t\t\t$field_validation = $field_type;\n\t\t\t\tbreak;\n\n\t\t\tcase 'currency' :\n\t\t\t\t$field_validation = 'number';\n\t\t\t\tbreak;\n\n\t\t\tcase 'number' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\tbreak;\n\n\t\t\tcase 'min' :\n\t\t\tcase 'max' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'range' :\n\t\t\t\t$field_validation = 'digits';\n\t\t\t\t$field_options = serialize( array( '1', '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'time' :\n\t\t\t\t$field_validation = 'time-12';\n\t\t\t\tbreak;\n\n\t\t\tcase 'file-upload' :\n\t\t\t\t$field_options = serialize( array( 'png|jpe?g|gif' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ip-address' :\n\t\t\t\t$field_validation = 'ipv6';\n\t\t\t\tbreak;\n\n\t\t\tcase 'hidden' :\n\t\t\tcase 'custom-field' :\n\t\t\t\t$field_options = serialize( array( '' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'autocomplete' :\n\t\t\t\t$field_validation = 'auto';\n\t\t\t\t$field_options = serialize( array( 'Option 1', 'Option 2', 'Option 3' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'name' :\n\t\t\t\t$field_options = serialize( array( 'normal' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'date' :\n\t\t\t\t$field_options = serialize( array( 'dateFormat' => 'mm/dd/yy' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'rating' :\n\t\t\t\t$field_options = serialize( array( 'negative' => 'Disagree', 'positive' => 'Agree', 'scale' => '10' ) );\n\t\t\t\tbreak;\n\n\t\t\tcase 'likert' :\n\t\t\t\t$field_options = serialize( array( 'rows' => \"Ease of Use\\nPortability\\nOverall\", 'cols' => \"Strongly Disagree\\nDisagree\\nUndecided\\nAgree\\nStrongly Agree\" ) );\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\n\n\t\t// Get fields info\n\t\t$all_fields = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $this->field_table_name WHERE form_id = %d ORDER BY field_sequence ASC\", $form_id ) );\n\t\t$field_sequence = 0;\n\n\t\t// We only want the fields that FOLLOW our parent or previous item\n\t\tif ( $parent > 0 || $previous > 0 ) {\n\t\t\t$cut_off = ( $previous > 0 ) ? $previous : $parent;\n\n\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\tif ( $field->field_id == $cut_off ) {\n\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t}\n\t\t\tarray_shift( $all_fields );\n\n\t\t\t// If the previous had children, we need to remove them so our item is placed correctly\n\t\t\tif ( !$parent && $previous > 0 ) {\n\t\t\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\t\t\tif ( !$field->field_parent )\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$field_sequence = $field->field_sequence + 1;\n\t\t\t\t\t\tunset( $all_fields[ $field_index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Create the new field's data\n\t\t$newdata = array(\n\t\t\t'form_id' \t\t\t=> absint( $data['form_id'] ),\n\t\t\t'field_key' \t\t=> $field_key,\n\t\t\t'field_name' \t\t=> $field_name,\n\t\t\t'field_type' \t\t=> $field_type,\n\t\t\t'field_options' \t=> $field_options,\n\t\t\t'field_sequence' \t=> $field_sequence,\n\t\t\t'field_validation' \t=> $field_validation,\n\t\t\t'field_parent' \t\t=> $parent\n\t\t);\n\n\t\t// Create the field\n\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t$insert_id = $wpdb->insert_id;\n\n\t\t// VIP fields\n\t\t$vip_fields = array( 'verification', 'secret', 'submit' );\n\n\t\t// Rearrange the fields that follow our new data\n\t\tforeach( $all_fields as $field_index => $field ) {\n\t\t\tif ( !in_array( $field->field_type, $vip_fields ) ) {\n\t\t\t\t$field_sequence++;\n\t\t\t\t// Update each field with it's new sequence and parent ID\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), array( 'field_id' => $field->field_id ) );\n\t\t\t}\n\t\t}\n\n\t\t// Move the VIPs\n\t\tforeach ( $vip_fields as $update ) {\n\t\t\t$field_sequence++;\n\t\t\t$where = array(\n\t\t\t\t'form_id' \t\t=> absint( $data['form_id'] ),\n\t\t\t\t'field_type' \t=> $update\n\t\t\t);\n\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence ), $where );\n\n\t\t}\n\n\t\techo $this->field_output( $data['form_id'], $insert_id );\n\n\t\tdie(1);\n\t}", "title": "" } ]
[ { "docid": "dc5a2b44969762f2cfa4117a7d5393c8", "score": "0.7699485", "text": "public function create_field_callback() {\n\t\tglobal $wpdb;\n\t\t\n\t\t$data = array();\n\t\t$field_options = '';\n\t\t\n\t\tforeach ( $_REQUEST['data'] as $k ) {\n\t\t\t$data[ $k['name'] ] = $k['value'];\n\t\t}\n\t\t\n\t\tif ( isset( $_REQUEST['page'] ) && $_REQUEST['page'] == 'settings_page_visual-form-builder' && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'visual_form_builder_create_field' ) {\n\t\t\t$form_id = absint( $data['form_id'] );\n\t\t\t$field_key = sanitize_title( $_REQUEST['field_type'] );\n\t\t\t$field_name = esc_html( $_REQUEST['field_type'] );\n\t\t\t$field_type = strtolower( sanitize_title( $_REQUEST['field_type'] ) );\n\t\t\t\n\t\t\t/* Set defaults for validation */\n\t\t\tswitch ( $field_type ) {\n\t\t\t\tcase 'email' :\n\t\t\t\tcase 'url' :\n\t\t\t\tcase 'phone' :\n\t\t\t\t\t$field_validation = $field_type;\n\t\t\t\tbreak;\n\t\t\t\tcase 'currency' :\n\t\t\t\t\t$field_validation = 'number';\n\t\t\t\tbreak;\n\t\t\t\tcase 'number' :\n\t\t\t\t\t$field_validation = 'digits';\n\t\t\t\tbreak;\n\t\t\t\tcase 'time' :\n\t\t\t\t\t$field_validation = 'time-12';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file-upload' :\n\t\t\t\t\t$field_options = serialize( array( 'png|jpe?g|gif' ) );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcheck_ajax_referer( 'create-field-' . $data['form_id'], 'nonce' );\n\t\t\t\n\t\t\t/* Get the last row's sequence that isn't a Verification */\n\t\t\t$sequence_last_row = $wpdb->get_row( \"SELECT field_sequence FROM $this->field_table_name WHERE form_id = $form_id AND field_type = 'verification' ORDER BY field_sequence DESC LIMIT 1\" );\n\t\t\t\n\t\t\t/* If it's not the first for this form, add 1 */\n\t\t\t$field_sequence = ( !empty( $sequence_last_row ) ) ? $sequence_last_row->field_sequence : 0;\n\n\t\t\t$newdata = array(\n\t\t\t\t'form_id' => absint( $data['form_id'] ),\n\t\t\t\t'field_key' => $field_key,\n\t\t\t\t'field_name' => $field_name,\n\t\t\t\t'field_type' => $field_type,\n\t\t\t\t'field_options' => $field_options,\n\t\t\t\t'field_sequence' => $field_sequence,\n\t\t\t\t'field_validation' => $field_validation\n\t\t\t);\n\t\t\t\n\t\t\t/* Create the field */\n\t\t\t$wpdb->insert( $this->field_table_name, $newdata );\n\t\t\t$insert_id = $wpdb->insert_id;\n\t\t\t$update_these = array( 'verification', 'secret', 'submit' );\n\t\t\t\n\t\t\tforeach ( $update_these as $update ) {\n\t\t\t\t$where = array(\n\t\t\t\t\t'form_id' => absint( $data['form_id'] ),\n\t\t\t\t\t'field_type' => $update\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$wpdb->update( $this->field_table_name, array( 'field_sequence' => $field_sequence + 1 ), $where );\n\t\t\t\t$field_sequence++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\techo $this->field_output( $data['form_id'], $insert_id );\n\t\t}\n\t\t\n\t\tdie(1);\n\t}", "title": "" }, { "docid": "e1ef4cd54f08c048da07c58b8605ddb1", "score": "0.7176137", "text": "public function ajax_create_field() {\n global $wpdb;\n\n $data = array();\n $field_options = $field_validation = '';\n\n foreach ($_REQUEST['data'] as $k) {\n $data[$k['name']] = $k['value'];\n }\n\n check_ajax_referer('create-field-' . $data['form_id'], 'nonce');\n\n $form_id = absint($data['form_id']);\n $field_key = esc_html($_REQUEST['field_key']);\n $field_name = ucwords(esc_html(str_replace('_', ' ', $field_key)));\n $field_type = strtolower(sanitize_title($_REQUEST['field_type']));\n $field_description = ucwords(str_replace('_', ' ', $field_key));\n\n // Set defaults for validation\n switch ($field_type) {\n case 'select' :\n if ($field_key == 'gender') {\n $field_options = serialize(array('male' => 'Male', 'female' => 'Female', 'not specified' => 'Not Specified'));\n } else if ($field_key == 'title') {\n $field_options = serialize(array('mr' => 'Mr', 'mrs' => 'Mrs', 'ms' => 'Ms', 'dr' => 'Dr', 'not specified' => 'Not Specified'));\n } else {\n $field_options = serialize(array('Option 1', 'Option 2', 'Option 3'));\n }\n break;\n case 'radio' :\n case 'checkbox' :\n $field_options = serialize(array('Option 1', 'Option 2', 'Option 3'));\n break;\n case 'email' :\n case 'url' :\n case 'phone' :\n $field_validation = $field_type;\n break;\n\n case 'currency' :\n $field_validation = 'number';\n break;\n\n case 'number' :\n $field_validation = 'digits';\n break;\n\n case 'time' :\n $field_validation = 'time-12';\n break;\n\n case 'file-upload' :\n $field_options = ($field_key == 'profile_image') ? serialize(array('png|jpe?g|gif')) : '';\n break;\n }\n\n $newdata = array(\n 'form_id' => $form_id,\n 'field_key' => $field_key,\n 'field_name' => $field_name,\n 'field_type' => $field_type,\n 'field_options' => $field_options,\n 'field_validation' => $field_validation,\n 'field_description' => $field_description\n );\n\n $insert_id = $this->create_field($newdata);\n\n $query = $wpdb->prepare(\"SELECT form_id FROM $this->form_table_name WHERE form_type= 1 AND `form_membership_level` = \"\n . \" (SELECT `form_membership_level` FROM $this->form_table_name WHERE form_type= 0 AND `form_id` = %d)\", $form_id);\n $edit_form = $wpdb->get_var($query);\n if (!empty($edit_form)) {\n $newdata['form_id'] = $edit_form;\n $this->create_field($newdata, $insert_id);\n }\n\n echo $this->field_output($form_id, $insert_id);\n\n die(1);\n }", "title": "" }, { "docid": "3e6fc31c1237547d052aeb603158ae6a", "score": "0.6885567", "text": "function action_create_field()\n\t{\n\t\t// Loading form validation helper and the Markdown parser.\n\t\t$this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('name', 'Name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('address', 'Address', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('city', 'City', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('region', 'Region', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('pitch_type', 'Pitch Type', 'trim|required|xss_clean');\n\n\t\t$name = $this->input->post('name');\n\t\t$address = $this->input->post('address');\n\t\t$city = $this->input->post('city');\n\t\t$region = $this->input->post('region');\n\t\t$pitch_type = $this->input->post('pitch_type');\n\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\tif ($this->fields->insert($name, $address, $city, $region, $pitch_type))\n\t\t\t{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t'message' => 'Field added successfully!'\n\t\t\t\t));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\techo json_encode(array(\n\t\t\t'status' => 'danger',\n\t\t\t'message' => 'One or more of the fields are invalid.'\n\t\t));\n\t}", "title": "" }, { "docid": "9a86031c1adea4bc6c6fdaf75649141b", "score": "0.6814573", "text": "public function onCreateField()\n {\n $post = post();\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::createField(\n $post['name'],\n $post['code'],\n $post['description'],\n $validation,\n $post['type'],\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }", "title": "" }, { "docid": "b4f2fc03f9cf99edbc560b43cb7a1462", "score": "0.6691653", "text": "public function onAddField()\n {\n return $this->makePartial('create_field_form');\n }", "title": "" }, { "docid": "205636276727781303805e72178880dc", "score": "0.6656368", "text": "function new_field()\n\t{\n\t\t$data = array(\n\t\t\t'form_action' => 'action_create_field',\n\t\t\t'title' => 'Add a new Field',\n\t\t\t'js' => array('/js/admin/admin.js'),\n\t\t\t'css' => array('/styles/admin.css'),\n\t\t\t'name' => '',\n\t\t\t'address' => '',\n\t\t\t'city' => '',\n\t\t\t'region' => '',\n\t\t\t'pitch_type' => '',\n\t\t\t'msg' => 'Please enter the following information for the new field.',\n\t\t\t'submit_message' => 'Add Field',\n\t\t\t'sidenav' => self::$user_links\n\t\t);\n\n\t\t$this->load->helper(array('form'));\n\n\t\t$this->load->view('admin/field_edit.php', $data);\n\t}", "title": "" }, { "docid": "85e754d1904db72ab012c371a8175e4b", "score": "0.66305536", "text": "protected function createFormFields() {\n\t}", "title": "" }, { "docid": "b6a23549c77efaf68982688dc4dfa44c", "score": "0.65217674", "text": "public function create()\n\t{\n\t\t$form = $this->initForm(true);\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$properties = array(\n\t\t\t\t\"value_1\" => $form->getInput(\"val1\")//,\n\t\t\t\t//\"value_2\" => $form->getInput(\"val2\")\n\t\t\t);\n\t\t\tif ($this->createElement($properties))\n\t\t\t{\n\t\t\t\tilUtil::sendSuccess($this->lng->txt(\"msg_obj_modified\"), true);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$this->tpl->setContent($form->getHtml());\n\n\t}", "title": "" }, { "docid": "325686d461ee2d111db7fd210005f04b", "score": "0.640974", "text": "public function create_fields() {\n\t\tif ( count( $this->sections ) > 0 ) {\n\t\t\tforeach ( $this->fields as $k => $v ) {\n\t\t\t\t$method = $this->determine_method( $v, 'form' );\n\t\t\t\t$name = $v['name'];\n\t\t\t\tif ( $v['type'] == 'info' ) { $name = ''; }\n\t\t\t\tadd_settings_field( $k, $name, $method, $this->token, $v['section'], array( 'key' => $k, 'data' => $v ) );\n\n\t\t\t\t// Let the API know that we have a colourpicker field.\n\t\t\t\tif ( $v['type'] == 'range' && $this->_has_range == false ) { $this->_has_range = true; }\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5605f5a5e26fa0ac57c908c4630ac529", "score": "0.6372227", "text": "function create_form_field($name, $title, $icon_id, $icon_title) {\r\n $form_field = \"<br><label for='$name'>$title\";\r\n $form_field.= \"<input type='text' id='$name' name='$name' class='text ui-widget-content ui-corner-all' onkeyup='validate_on_input(this.name)'><i class='far fa-question-circle' style='color: blue' id='$icon_id' title='$icon_title'></i></label>\\n\";\r\n\r\n return $form_field;\r\n}", "title": "" }, { "docid": "e69a1b7830d40565333631f4c46089f8", "score": "0.6358758", "text": "function create_field($field)\n\t{\n\t\techo '<input type=\"text\" value=\"' . $field['value'] . '\" id=\"' . $field['name'] . '\" class=\"' . $field['class'] . '\" name=\"' . $field['name'] . '\" />';\n\t\techo '<div id=\"map\"></div>';\n\t}", "title": "" }, { "docid": "0455fe061ae940897b2fc64700fc8edb", "score": "0.63569015", "text": "function add_field() {\n\t\t\t$nonce = $_POST['security'];\n\t\t\tif (! wp_verify_nonce($nonce, 'aqpb-settings-page-nonce') ) die('-1');\n\t\t\t\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'aq-block-9999';\n\t\t\t\n\t\t\t//default key/value for the tab\n\t\t\t$field = array(\n\t\t\t\t'type'\t\t=> 'phone',\n\t\t\t\t'title'\t\t=> 'New Field',\n\t\t\t\t'content'\t=> ''\n\t\t\t);\n\t\t\t\n\t\t\tif($count) {\n\t\t\t\t$this->create_item($field, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\t\t\t\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "8b87190b78cd104aad4cb7742c138611", "score": "0.6318815", "text": "public function actionCreate(){\n $parents=CylTables::model()->findAll(\n array(\n 'condition'=>'isParent=\"1\" AND display_status = \"1\"',\n 'order'=>'menu_order'\n ));\n $model = new CylFields();\n $this->render('new-field', array('model' => $model,'parents' => $parents));\n }", "title": "" }, { "docid": "7d6f44b2414cd381f5d16cb3f4c1d4e5", "score": "0.6305323", "text": "public function fieldCreateAction() {\n parent::fieldCreateAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n //$form->setTitle('Add Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "12805b95bbcc7edfed7501a1128e96f1", "score": "0.6281993", "text": "function FieldHolder() {\n\t\t$d = Object::create('DateField_View_JQuery', $this); \n\t\t$d->onBeforeRender(); \n\t\t$html = parent::FieldHolder(); \n\t\t$html = $d->onAfterRender($html); \n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "4ef4c24fa032235edb17c155a246b1c8", "score": "0.6261104", "text": "public function field_callback($field){\n\t\t\t$value = get_option($field['id']);\n\t\t\tswitch($field['type']){\n\t\t\t\tcase 'color':\n\t\t\t\t\tprintf('<input name=\"%1$s\" id=\"%1$s\" type=\"text\" value=\"%2$s\" class=\"colorpicker-field\" />',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\tsanitize_hex_color($value)\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tprintf('<input name=\"%1$s\" id=\"%1$s\" type=\"checkbox\" value=\"1\" %3$s />',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\tsanitize_hex_color($value),\n\t\t\t\t\t \tchecked($value, true, false)\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprintf('<input name=\"%1$s\" id=\"%1$s\" type=\"%2$s\" value=\"%3$s\" />',\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tesc_attr($value)\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tif( array_key_exists('desc', $field ) && $field['desc'] ){\n\t\t\t\tprintf('<p class=\"description\">%s </p>', $field['desc']);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f989d75d28bfcde7544e2e09ad258d8b", "score": "0.6257976", "text": "public abstract function createFields();", "title": "" }, { "docid": "f9e4e6049c66db6e15623a9b8a669bc9", "score": "0.6196387", "text": "function create_field( $field )\n\t{\n\n\n\t\t// vars\n\t\t$o = array( 'id', 'name' );\n\t\t$e = '';\n\n\n\t\t$e .= '<textarea style=\"display:none\" ';\n\n\t\tforeach( $o as $k )\n\t\t{\n\t\t\t$e .= ' ' . $k . '=\"' . esc_attr( $field[ $k ] ) . '\"';\n\t\t}\n\t\t//field key\n\n\t\t$e .= ' data-key=\"'.$field['key'].'\"';\n\n\t\t\t\t// maxlength\n\t\tif( $field['maxrows'] !== '' ) $e .= ' data-maxrows=\"'.$field['maxrows'].'\"';\n\n\t\t\t\t// disable sort\n\t\tif( !empty($field['disable_sort']) ) $e .= ' data-disablesort=\"'.$field['disable_sort'].'\"';\n\n\t\t\t\t// fixed rows\n\t\tif( !empty($field['fixed_columns']) ) {\n\n\t\t\t$defaultheaders = preg_split( '/\\r\\n|\\r|\\n/', $field['default_headers'] );\n\n\t\t\t$e .= 'data-defaultheaders=\"'.implode(\",\", $defaultheaders) .'\"';\n\t\t\tif( empty($field['default_headers']) ) $e .= 'data-defaultheaders=\"No Default Headers Set\"';\n\n\t\t}\n\n\t\t$e .= '>';\n\t\t$e .= esc_textarea($field['value']);\n\t\t$e .= '</textarea>';\n\n\t\t// return\n\t\techo $e;\n\n\n\t}", "title": "" }, { "docid": "0b59136193bf682b7cbd191eda2dddc1", "score": "0.6186439", "text": "function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}", "title": "" }, { "docid": "a6414e1ff31b64f0897eecc32940ecbc", "score": "0.615971", "text": "abstract protected function createFields();", "title": "" }, { "docid": "dd29b16207e91269c790d65a914079a2", "score": "0.61576915", "text": "public static function register_custom_fields();", "title": "" }, { "docid": "8d0cbb71e9673c14a59649cb4fb271b4", "score": "0.6134195", "text": "public function returnFieldJS() {}", "title": "" }, { "docid": "975ad7c94794b76f80655aabdf233f7d", "score": "0.61137885", "text": "public function create() {\n\t\t$this->initForm();\n\t\t$this->getStandardValues();\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "b5a34d839eb2421a0d05e3fe82fdc5db", "score": "0.61085737", "text": "function custom_field_create( $p_name ) {\n\t$c_name = trim( $p_name );\n\n\tif( is_blank( $c_name ) ) {\n\t\terror_parameters( 'name' );\n\t\ttrigger_error( ERROR_EMPTY_FIELD, ERROR );\n\t}\n\n\tcustom_field_ensure_name_unique( $c_name );\n\n\tdb_param_push();\n\t$t_query = 'INSERT INTO {custom_field} ( name, possible_values )\n\t\t\t\t VALUES ( ' . db_param() . ',' . db_param() . ')';\n\tdb_query( $t_query, array( $c_name, '' ) );\n\n\treturn db_insert_id( db_get_table( 'custom_field' ) );\n}", "title": "" }, { "docid": "365240d5c68145fbc465e113ed590b90", "score": "0.61081356", "text": "public function register_field()\n {\n }", "title": "" }, { "docid": "a8478fa846bc251a3ea8f3726cacd48d", "score": "0.60968196", "text": "function createField($keyName, $uitype, $value, $name, $addToMap = false, $inCallback = null, $outCallback = null){\r\n\t\treturn $this->fields->createField($keyName, $uitype, $value, $name, $addToMap, $inCallback, $outCallback);\r\n\t}", "title": "" }, { "docid": "609ceb4f9327f1afa0e6817523f68483", "score": "0.60941344", "text": "public function createForm()\n\t{\n\t}", "title": "" }, { "docid": "c9c132c2993d1d511226efe31e0d167e", "score": "0.60836226", "text": "function create_field($field)\t{\n\t\t// vars\n $field['value'] = (array) $field['value'];\n\n\t\t$target = isset($field['value']['target']) ? $field['value']['target'] : ( isset($field['default_target']) ? $field['default_target'] : '_self');\n $class = isset($field['value']['class']) ? $field['value']['class'] : '';\n \n\t\t// html\n ?>\n <div class=\"acf-link-field-primary-row\">\n <label class=\"inline\"><?php _e('Text'); ?>:</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[text]\" value=\"<?php echo $field['value']['text']; ?>\" />\n\n <label class=\"inline\"><?php _e('URL'); ?>:</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[url]\" value=\"<?php echo $field['value']['url']; ?>\" />\n </div>\n\n <?php if( $field['show_title'] || $field['show_target'] || count($field['classes']) ): ?>\n <div class=\"acf-link-field-secondary-row\">\n <?php if( $field['show_title']): ?>\n <label class=\"inline\">Title Attribute</label>\n <input type=\"text\" name=\"<?php echo $field['name']; ?>[title]\" value=\"<?php echo $field['value']['title']; ?>\" />\n <?php endif; ?>\n\n <?php if( $field['show_target']): ?>\n <label class=\"inline\"><?php _e('Target'); ?></label>\n <select name=\"<?php echo $field['name']; ?>[target]\">\n <?php foreach( ACF_Link_Field::$targets as $k => $l ): ?>\n <option value=\"<?php echo $k; ?>\" <?php if($k == $target) echo 'selected=\"selected\"'; ?>><?php _e($l); ?></option>\n <?php endforeach; ?>\n </select>\n <?php endif; ?>\n\n <?php if( count($field['classes']) ): ?>\n <label class=\"inline\"><?php _e('Style'); ?></label>\n <select name=\"<?php echo $field['name']; ?>[class]\">\n <option value=\"\" <?php if(empty($class)) echo 'selected=\"selected\"'; ?>><?php _e('Default'); ?></option>\n <?php foreach( $field['classes'] as $c => $l ): ?>\n <option value=\"<?php echo $c; ?>\" <?php if($c == $class) echo 'selected=\"selected\"'; ?>><?php _e($l); ?></option>\n <?php endforeach; ?>\n </select>\n <?php endif; ?>\n </div>\n <?php endif; \n\t}", "title": "" }, { "docid": "d6dac351a8c95860e75bfeca636e777e", "score": "0.6039764", "text": "function Field() {\n\t\t$attributes = array(\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'text datepicker' . ($this->extraClass() ? $this->extraClass() : ''),\n\t\t\t'id' => $this->id(),\n\t\t\t'name' => $this->Name(),\n\t\t\t'value' => $this->Value(),\n\t\t\t'tabindex' => $this->getTabIndex(),\n\t\t\t'maxlength' => ($this->maxLength) ? $this->maxLength : null,\n\t\t\t'size' => ($this->maxLength) ? min( $this->maxLength, 30 ) : null \n\t\t);\n\t\t\n\t\tif($this->disabled) $attributes['disabled'] = 'disabled';\n\n\t\tRequirements::javascript(self::$jquery_path);\n\t\tRequirements::javascript('sapphire/javascript/jquery_improvements.js');\n\t\tRequirements::javascript(SSTOOLS_BASE.'/javascript/jquery-ui-1.7.2.custom.min.js');\n\t\tRequirements::css(SSTOOLS_BASE.'/css/smoothness/jquery-ui-1.7.2.custom.css');\n\t\t\n\t\t$cfg = json_encode($this->_cfg);\n\t\tRequirements::customScript(\"\n\t\t\tjQuery('#{$attributes['id']}').datepicker($cfg);\n\t\t\");\t\t\n\t\t\n\t\treturn $this->createTag('input', $attributes);\n\t}", "title": "" }, { "docid": "09cca443840f60e6b1a634832fdb6054", "score": "0.6030813", "text": "function create_field( $field )\n\t{\n\t\tif( 'object' == $field['save_format'] && 'null' !== $field['value'] )\n\t\t\t$field['value'] = array( $field['value']->class );\n\n\t\t// value must be array\n\t\tif( !is_array($field['value']) )\n\t\t{\n\t\t\t// perhaps this is a default value with new lines in it?\n\t\t\tif( strpos($field['value'], \"\\n\") !== false )\n\t\t\t{\n\t\t\t\t// found multiple lines, explode it\n\t\t\t\t$field['value'] = explode(\"\\n\", $field['value']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$field['value'] = array( $field['value'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// trim value\n\t\t$field['value'] = array_map('trim', $field['value']);\n\t\t\n\t\t// html\n\t\techo '<div class=\"fa-field-wrapper\">';\n\t\techo '<div class=\"fa-live-preview\"></div>';\n\t\techo '<select id=\"' . $field['id'] . '\" class=\"' . $field['class'] . ' fa-select2-field\" name=\"' . $field['name'] . '\" >';\t\n\t\t\n\t\t// null\n\t\tif( $field['allow_null'] )\n\t\t{\n\t\t\techo '<option value=\"null\">- ' . __(\"Select\",'acf') . ' -</option>';\n\t\t}\n\t\t\n\t\t// loop through values and add them as options\n\t\tif( is_array($field['choices']) )\n\t\t{\n\t\t\tunset( $field['choices']['null'] );\n\n\t\t\tforeach( $field['choices'] as $key => $value )\n\t\t\t{\n\t\t\t\t$selected = $this->find_selected( $key, $field['value'], $field['save_format'], $field['choices'] );\n\t\t\t\techo '<option value=\"'.$key.'\" '.$selected.'>'.$value.'</option>';\n\t\t\t}\n\t\t}\n\n\t\techo '</select>';\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "cb885c8669aeaf80c3a3b45d0ba5ccdf", "score": "0.602792", "text": "public function create()\n {\n return view ('fields.create');\n }", "title": "" }, { "docid": "fc28cb5cd3e9f83832ae6d90e6502ff1", "score": "0.60265243", "text": "function qw_callback_field($fields){\n\n $fields['callback_field'] = array(\n 'title' => 'Callback',\n 'description' => 'Arbitrarily execute a function.',\n 'form_callback' => 'qw_callback_field_form',\n 'output_callback' => 'qw_execute_the_callback',\n 'output_arguments' => true,\n );\n return $fields;\n}", "title": "" }, { "docid": "d9e091300616179788295f29e0908812", "score": "0.6025942", "text": "function create_field($id, $nama = null, $value = null)\n{\n return get_row_data('config_model', 'create_field', array('id' => $id, 'nama' => $nama, 'value' => $value));\n}", "title": "" }, { "docid": "fb1b13073ea7b99ca0ae1a0bf7241068", "score": "0.6020728", "text": "function render_field( $field ) { ?>\n <input type=\"text\" value=\"<?php echo esc_attr( $field[ 'value' ] ); ?>\" id=\"<?php echo esc_attr( $field[ 'id' ] ); ?>\" name=\"<?php echo esc_attr( $field[ 'name' ] ); ?>\" class=\"rhicomoon-select-field <?php echo esc_attr( $field[ 'class' ] ); ?>\" data-json-url=\"<?php echo esc_attr( $field[ 'json_url' ] ); ?>\"/>\n <?php }", "title": "" }, { "docid": "a4fdb7332b72955c0010378617c96bea", "score": "0.59886086", "text": "public function CreateForm();", "title": "" }, { "docid": "003ebf4f6d00c6112e46688a5cbc6a92", "score": "0.59841305", "text": "function after_validation_on_create() {}", "title": "" }, { "docid": "65e42fc448873609169d5a657421bf3e", "score": "0.59744936", "text": "public static function custom_field_gen($_function = FALSE, $_field = FALSE, $_name_prefix = FALSE, $_id_prefix = FALSE, $_classes = FALSE, $_styles = FALSE, $_tabindex = FALSE, $_attrs = FALSE, $_submission = FALSE, $_value = FALSE, $_editable_context = FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;\n\t\t\t\t\t\tdo_action(\"ws_plugin__s2member_before_custom_field_gen\", get_defined_vars());\n\t\t\t\t\t\tunset($__refs, $__v);\n\n\t\t\t\t\t\tif(!($gen = \"\") && $_function && is_array($field = $_field) && !empty($field[\"type\"]) && !empty($field[\"id\"]) && $_name_prefix && $_id_prefix)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;\n\t\t\t\t\t\t\t\tdo_action(\"ws_plugin__s2member_during_custom_field_gen_before\", get_defined_vars());\n\t\t\t\t\t\t\t\tunset($__refs, $__v);\n\n\t\t\t\t\t\t\t\t$field_var = preg_replace(\"/[^a-z0-9]/i\", \"_\", strtolower($field[\"id\"]));\n\t\t\t\t\t\t\t\t$field_id_class = preg_replace(\"/_/\", \"-\", $field_var);\n\n\t\t\t\t\t\t\t\t$name_suffix = (preg_match(\"/\\[$/\", $_name_prefix)) ? ']' : '';\n\t\t\t\t\t\t\t\t$field_name = trim($_name_prefix.$field_var.$name_suffix);\n\n\t\t\t\t\t\t\t\tif(in_array($field[\"type\"], array(\"text\", \"textarea\", \"select\"), TRUE))\n\t\t\t\t\t\t\t\t\t$_classes = trim($_classes.\" form-control\"); // Bootstrap.\n\n\t\t\t\t\t\t\t\t$common = /* Common attributes. */ '';\n\t\t\t\t\t\t\t\t$common .= ' name=\"'.esc_attr($field_name).'\"';\n\t\t\t\t\t\t\t\t$common .= ' id=\"'.esc_attr($_id_prefix.$field_id_class).'\"';\n\t\t\t\t\t\t\t\t$common .= ((!empty($field[\"required\"]) && $field[\"required\"] === \"yes\") ? ' aria-required=\"true\"' : '');\n\t\t\t\t\t\t\t\t$common .= ((strlen($_tabindex)) ? ' tabindex=\"'.esc_attr($_tabindex).'\"' : /* No tabindex if empty. */ '');\n\t\t\t\t\t\t\t\t$common .= (( /* Certain data expected? */!empty($field[\"expected\"])) ? ' data-expected=\"'.esc_attr($field[\"expected\"]).'\"' : '');\n\t\t\t\t\t\t\t\t$common .= (($_editable_context === \"profile-view\" || ($_editable_context === \"profile\" && !empty($field[\"editable\"]) && strpos($field[\"editable\"], \"no\") === 0)) ? ' disabled=\"disabled\"' : '');\n\t\t\t\t\t\t\t\t$common .= (($_classes || !empty($field[\"classes\"])) ? ' class=\"'.esc_attr(trim($_classes.((!empty($field[\"classes\"])) ? ' '.$field[\"classes\"] : ''))).'\"' : '');\n\t\t\t\t\t\t\t\t$common .= (($_styles || !empty($field[\"styles\"])) ? ' style=\"'.esc_attr(trim($_styles.((!empty($field[\"styles\"])) ? ' '.$field[\"styles\"] : ''))).'\"' : '');\n\t\t\t\t\t\t\t\t$common .= (($_attrs || !empty($field[\"attrs\"])) ? ' '.trim($_attrs.((!empty($field[\"attrs\"])) ? ' '.$field[\"attrs\"] : '')) : '');\n\n\t\t\t\t\t\t\t\tif($field[\"type\"] === \"text\")\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t$gen = esc_html((string)$_value);\n\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<input type=\"text\" maxlength=\"100\" autocomplete=\"off\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ' value=\"'.format_to_edit((!$_submission && isset($field[\"deflt\"]) && strlen((string)$field[\"deflt\"])) ? (string)$field[\"deflt\"] : (string)$_value).'\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common.' />';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"textarea\")\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t$gen = nl2br(esc_html((string)$_value));\n\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<textarea rows=\"3\"'.$common.'>';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= format_to_edit((!$_submission && isset($field[\"deflt\"]) && strlen((string)$field[\"deflt\"])) ? (string)$field[\"deflt\"] : (string)$_value);\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '</textarea>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"select\" && !empty($field[\"options\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($option_value === (string)$_value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen = $option_label;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<select'.$common.'>';\n\t\t\t\t\t\t\t\t\t\t\t\t$selected_default_option = false;\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '<option value=\"'.esc_attr($option_value).'\"'.(((($option_default && !$_submission) || ($option_value === (string)$_value && !$selected_default_option)) && ($selected_default_option = true)) ? ' selected=\"selected\"' : '').'>'.$option_label.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"selects\" && !empty($field[\"options\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($option_value, (array)$_value))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $option_label.\", \";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = c_ws_plugin__s2member_utils_strings::trim($gen, 0, \",\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$common = preg_replace('/ name\\=\"(.+?)\"/', ' name=\"$1[]\"', $common);\n\t\t\t\t\t\t\t\t\t\t\t\t$common = preg_replace('/ style\\=\"(.+?)\"/', ' style=\"height:auto; $1\"', $common);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<select multiple=\"multiple\" size=\"3\"'.$common.'>';\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '<option value=\"'.esc_attr($option_value).'\"'.((($option_default && !$_submission) || in_array($option_value, (array)$_value)) ? ' selected=\"selected\"' : '').'>'.$option_label.'</option>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '</select>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"checkbox\" && !empty($field[\"label\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t$gen = ((string)$_value) ? \"yes\" : \"no\";\n\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<input type=\"checkbox\" value=\"1\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= (((string)$_value) ? ' checked=\"checked\"' : '');\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common.' /> <label for=\"'.esc_attr($_id_prefix.$field_id_class).'\" style=\"display:inline !important; margin:0 !important;\">'.$field[\"label\"].'</label>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"pre_checkbox\" && !empty($field[\"label\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t$gen = ((string)$_value) ? \"yes\" : \"no\";\n\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<input type=\"checkbox\" value=\"1\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ((!$_submission || (string)$_value) ? ' checked=\"checked\"' : '');\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common.' /> <label for=\"'.esc_attr($_id_prefix.$field_id_class).'\" style=\"display:inline !important; margin:0 !important;\">'.$field[\"label\"].'</label>';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"checkboxes\" && !empty($field[\"options\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $i => $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($option_value, (array)$_value))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $option_label.\", \";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = c_ws_plugin__s2member_utils_strings::trim($gen, 0, \",\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$common = preg_replace('/ name\\=\"(.+?)\"/', ' name=\"$1[]\"', $common);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$sep = apply_filters(\"ws_plugin__s2member_custom_field_gen_checkboxes_sep\", \"&nbsp;&nbsp;\", get_defined_vars());\n\t\t\t\t\t\t\t\t\t\t\t\t$opl = apply_filters(\"ws_plugin__s2member_custom_field_gen_checkboxes_opl\", \"ws-plugin--s2member-custom-reg-field-op-l\", get_defined_vars());\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $i => $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$common_i = preg_replace('/ id\\=\"(.+?)\"/', ' id=\"$1---'.($i).'\"', $common);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ($i > 0) ? $sep : ''; // Separators can be filtered above.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '<input type=\"checkbox\" value=\"'.esc_attr($option_value).'\"';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ((($option_default && !$_submission) || in_array($option_value, (array)$_value)) ? ' checked=\"checked\"' : '');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common_i.' /> <label for=\"'.esc_attr($_id_prefix.$field_id_class.\"-\".$i).'\" class=\"'.esc_attr($opl).'\" style=\"display:inline !important; margin:0 !important;\">'.$option_label.'</label>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if($field[\"type\"] === \"radios\" && !empty($field[\"options\"]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $i => $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($option_value === (string)$_value)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen = $option_label;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$sep = apply_filters(\"ws_plugin__s2member_custom_field_gen_radios_sep\", \"&nbsp;&nbsp;\", get_defined_vars());\n\t\t\t\t\t\t\t\t\t\t\t\t$opl = apply_filters(\"ws_plugin__s2member_custom_field_gen_radios_opl\", \"ws-plugin--s2member-custom-reg-field-op-l\", get_defined_vars());\n\n\t\t\t\t\t\t\t\t\t\t\t\tforeach(preg_split(\"/[\\r\\n\\t]+/\", $field[\"options\"]) as $i => $option_line)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$common_i = preg_replace('/ id\\=\"(.+?)\"/', ' id=\"$1---'.($i).'\"', $common);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$option_value = $option_label = $option_default = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@list($option_value, $option_label, $option_default) = c_ws_plugin__s2member_utils_strings::trim_deep(preg_split(\"/\\|/\", trim($option_line)));\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ($i > 0) ? $sep : ''; // Separators can be filtered above.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= '<input type=\"radio\" value=\"'.esc_attr($option_value).'\"';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ((($option_default && !$_submission) || $option_value === (string)$_value) ? ' checked=\"checked\"' : '');\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common_i.' /> <label for=\"'.esc_attr($_id_prefix.$field_id_class.\"-\".$i).'\" class=\"'.esc_attr($opl).'\" style=\"display:inline !important; margin:0 !important;\">'.$option_label.'</label>';\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse // Default to a text field input type when nothing matches.\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($_editable_context === \"profile-view\")\n\t\t\t\t\t\t\t\t\t\t\t$gen = esc_html((string)$_value);\n\n\t\t\t\t\t\t\t\t\t\telse // Else handle normally.\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$gen = '<input type=\"text\" maxlength=\"100\" autocomplete=\"off\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= ' value=\"'.format_to_edit((!$_submission && isset($field[\"deflt\"]) && strlen((string)$field[\"deflt\"])) ? (string)$field[\"deflt\"] : (string)$_value).'\"';\n\t\t\t\t\t\t\t\t\t\t\t\t$gen .= $common.' />';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforeach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;\n\t\t\t\t\t\t\t\tdo_action(\"ws_plugin__s2member_during_custom_field_gen_after\", get_defined_vars());\n\t\t\t\t\t\t\t\tunset($__refs, $__v);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\treturn apply_filters(\"ws_plugin__s2member_custom_field_gen\", $gen, get_defined_vars());\n\t\t\t\t\t}", "title": "" }, { "docid": "23c2325559deecde76226e370b4cb376", "score": "0.597353", "text": "public function createForm()\n {\n }", "title": "" }, { "docid": "3e5b56e2f6e5a6955f2b5a8a1245ebb5", "score": "0.5908636", "text": "public function procNewField($ar=NULL) {\n $p=new XParam($ar,NULL);\n $field=$p->get('field');\n $ftype=$p->get('ftype');\n $fcount=$p->get('fcount');\n $forder=$p->get('forder');\n $compulsory=$p->get('compulsory');\n $queryable=$p->get('queryable');\n $browsable=$p->get('browsable');\n $translatable=$p->get('translatable');\n $multivalued=$p->get('multivalued');\n $published=$p->get('published');\n $label=$p->get('label');\n $target=$p->get('target');\n $options=$p->get('options');\n $options=array_stripslashes($options);\n $error=false;\n $table=$this->getTable();\n // Controle des donnees obligatoires\n if(!$this->newFieldDescIsCorrect($field,$ftype,$fcount,$forder,$compulsory,$queryable,$browsable,$translatable,$multivalued,\n\t\t\t\t $published,$target,$label) ) {\n $message='Incorrect description for field '.$label[TZR_DEFAULT_LANG].' ! Try again.<br/>';\n $error=true;\n }elseif($this->fieldExists($field)){\n $message='Field '.$label[TZR_DEFAULT_LANG].' already exists ! Try again ...<br/>';\n $error=true;\n }else{\n $this->newDesc($field,$ftype,$fcount,$forder,$compulsory,$queryable,$browsable,$translatable,$multivalued,$published,$target,$label,\n\t\t $options);\n $this->sql_newFieldDesc($field);\n $this->majUpOtherFieldOrder($field,$forder);\n $this->sql_newField($field);\n $message='Field '.$label[TZR_DEFAULT_LANG].' created<br/>';\n }\n XLogs::update('newfield',NULL,$table.':'.$field.' '.$message);\n $result=array('message'=>$message,'error'=>$error);\n return $result;\n }", "title": "" }, { "docid": "86a764f21d3400b7c177bec7cbc3cd07", "score": "0.5891483", "text": "function create_edit_field(string $field_name, ?string $value, ?string $label, $options = []) {\n\t$envelope = 'p';\n\tif (array_key_exists('envelope', $options)) {\n\t\t$envelope = $options ['envelope'];\n\t}\n\n\t$field_wrapper = 'span';\n\tif (array_key_exists('field-wrapper', $options)) {\n\t\t$field_wrapper = $options ['field-wrapper'];\n\t}\n\t$id = \"\";\n\t$table = \"\";\n\tif (array_key_exists('table', $options) && array_key_exists('id', $options)) {\n\t\t$table = $options ['table'];\n\t\t$id = $options ['id'];\n\t}\n\t/* The id is split with the \"-\" delimiter in javascript when the field is clicked */\n\t$output[] = format_string('<@envelope class=\"field-envelope\">', [\n\t\t'@envelope' => $envelope,\n\t]);\n\tif ($label != \"\") {\n\t\t$output [] = format_string('<label>@label:&nbsp;</label>', ['@label' => $label]);\n\t}\n\tif ($value == \"\") {\n\t\t$value = \"&nbsp;\";\n\t}\n\n\t/* add additional classes to the actual field */\n\t$classes [] = \"edit-field field\";\n\tif (array_key_exists(\"class\", $options)) {\n\t\t$classes [] = $options [\"class\"];\n\t}\n\tif (array_key_exists(\"override\", $options)) {\n\t\t$classes[] = \"override\";\n\t}\n\t$field_class = implode(\" \", $classes);\n\t$format = \"\";\n\tif (array_key_exists(\"format\", $options)) {\n\t\t$format = sprintf(\"format='%s'\", $options [\"format\"]);\n\t}\n\t$data_attributes = '';\n\t\n\t$primary_data_items = [\n\t\t'id' => $id,\n\t\t'table' => $table,\n\t\t'field' => $field_name,\n\t];\n\tif(empty($options['data'])){\n\t\t$options['data'] = [];\n\t}\n\t$options['data'] = array_merge($options['data'], $primary_data_items);\n\tif (array_key_exists('data', $options)) {\n\t\t\n\t\t$data = $options['data'];\n\t\tif (!is_array($data)) {\n\t\t\t$data = [$data];\n\t\t}\n\t\tforeach ($data as $data_key => $data_value) {\n\t\t\t$data_items[] = 'data-' . $data_key . '=\"' . $data_value . '\"';\n\t\t}\n\t\t$data_attributes = implode(\" \", $data_items);\n\t}\n\t\n\t$title = '';\n\tif (array_key_exists('title', $options)) {\n\t\t//$title = format_string(' title=\"@title\" ', ['@title' => $options['title']]);\n\t}\n\n\t/*\n\t * Attributes are non-standard html attributes that are used by javascript these can include the type of input to be generated\n\t */\n\t$attributes = \"\";\n\tif (array_key_exists('attributes', $options)) {\n\t\t$attributes = $options ['attributes'];\n\t}\n\n\t$output[] = format_string('<@field_wrapper class=\"@field_class\" @attributes @format name=\"@field_name\" @title @data_attributes>@field_value</@field_wrapper></@envelope>', [\n\t\t'@field_wrapper' => $field_wrapper,\n\t\t'@field_class' => $field_class,\n\t\t'@attributes' => $attributes,\n\t\t'@format' => $format,\n\t\t'@field_name' => $field_name,\n\t\t'@data_attributes' => $data_attributes,\n\t\t'@title' => $title,\n\t\t'@field_value' => $value,\n\t\t'@envelope' => $envelope,\n\n\t]);\n\treturn implode(\"\\r\", $output);\n}", "title": "" }, { "docid": "31c5ba0767b60861288d0434d5cf3846", "score": "0.5861901", "text": "public function create()\n {\n if (!Sentinel::hasAccess('custom_fields.create')) {\n Flash::warning(\"Permission Denied\");\n return redirect('/');\n }\n return view('custom_field.create', compact(''));\n }", "title": "" }, { "docid": "24d38ef7f9c2907060cfdc9a8550264d", "score": "0.586104", "text": "public function afterCreate()\n {\n $this->saveCustomFields();\n }", "title": "" }, { "docid": "ff21ac8cf3c97d81fabf2e4d7d5a5750", "score": "0.58419776", "text": "function custom_field_tag($name, $custom_value) {\t\n $custom_field = $custom_value['CustomField'];\n $field_name = 'custom_field_values.'.$custom_value['CustomField']['id'];\n\n switch($custom_field['field_format']) {\n case \"date\" :\n $out = $this->Form->input($field_name, array('type'=>'text', 'size'=>10, 'label'=>false, 'div'=>false)); \n // TODO : calender \n // $out .= calendar_for(field_id)\n break;\n case \"text\" :\n $out = $this->Form->input($field_name, array('type'=>'textarea', 'rows'=>3, 'style'=> 'width:90%', 'label'=>false, 'div'=>false ));\n break;\n case \"bool\" :\n $out = $this->Form->input($field_name, array('type'=>'checkbox', 'label'=>false, 'div'=>false));\n break;\n case \"list\" :\n $empty = true;\n $selected = null;\n $type = 'select';\n if($custom_field['is_required']) {\n $empty = false;\n if(empty($custom_field['default_value'])) {\n $options[] = '--- '.__('Please Select').' ---';\n } elseif(empty($this->request->data['custom_field_values'][$custom_value['CustomField']['id']])) {\n $selected = $custom_field['default_value'];\n }\n }\n App::Import('vendor', 'georgious-cakephp-yaml-migrations-and-fixtures/spyc/spyc');\n $list = Spyc::YAMLLoad($custom_value['CustomField']['possible_values']);\n $options = array();\n if(!empty($list)) {\n foreach($list as $item) {\n $options[$item] = $item;\n }\n }\n \n $out = $this->Form->input($field_name, array_merge(compact('type', 'empty', 'selected', 'options'), array('label'=>false, 'div'=>false)));\n break;\n default :\n $out = $this->Form->input($field_name, array('type'=>'text', 'label'=>false, 'div'=>false));\n break;\n }\n return $out;\n }", "title": "" }, { "docid": "b66d4886d911b9137da72b5037ae5669", "score": "0.5818246", "text": "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "title": "" }, { "docid": "b66d4886d911b9137da72b5037ae5669", "score": "0.5818246", "text": "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "title": "" }, { "docid": "b66d4886d911b9137da72b5037ae5669", "score": "0.5818246", "text": "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "title": "" }, { "docid": "b66d4886d911b9137da72b5037ae5669", "score": "0.5818246", "text": "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "title": "" }, { "docid": "b66d4886d911b9137da72b5037ae5669", "score": "0.5818246", "text": "public function admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' ) {}", "title": "" }, { "docid": "205154abdfa5e363695acc69d9c39d1c", "score": "0.58164454", "text": "function create_custom_field() {\n $args = array(\n 'id' => 'custom_field_brand',\n 'label' => __( 'Detalhes da Marca'),\n 'class' => 'brand-custom-field',\n 'desc_tip' => true,\n 'description' => __( 'Enter the brand details.'),\n );\n woocommerce_wp_textarea_input( $args );\n}", "title": "" }, { "docid": "997428ef5e141f70536e6fccf4a84762", "score": "0.5812468", "text": "protected function createField($name, $value) {\r\n\t\tif($this->blockTag == 'none' && $this->labelPos == 'none') {\r\n\t\t\t$this->fieldNode = $this;\r\n\t\t} else {\r\n\t\t\t$node = new Larc_Html_Element($this->fieldTag);\r\n\t\t\t$this->fieldNode = $this->appendChild($node);\r\n\t\t}\r\n\r\n\t\t$this->fieldNode->setAttribute(\"name\", $name);\r\n\t\t$this->fieldNode->setAttribute(\"id\", $name);\r\n\t\tif($value !== NULL) {\r\n\t\t\t$this->fieldNode->setAttribute(\"value\", $value);\r\n\t\t}\r\n\r\n\t\tif(isset($this->params['attributes'])) {\r\n\t\t\t$this->initAttributes($this->fieldNode, $this->params['attributes']);\r\n\t\t}\r\n\t\tif(isset($this->params['fieldAttributes'])) {\r\n\t\t\t$this->initAttributes($this->fieldNode, $this->params['fieldAttributes']);\r\n\t\t}\r\n\r\n\t\t$this->fieldNode->setAttribute(\"type\", \"text\");\r\n\t}", "title": "" }, { "docid": "c605188c416a087a5ae85be29d3e007a", "score": "0.5802501", "text": "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "title": "" }, { "docid": "7c5bc192ea0631894f17eb7cd33737a3", "score": "0.5792445", "text": "public function process()\n { \n $bHideOptions = true;\n $iDefaultSelect = 4;\n \n $this->template()->assign(array('aForms' => array()));\n \n $aFieldValidation = array(\n 'var_type' => Phpfox::getPhrase('resume.select_what_type_of_custom_field_this_is')\n );\n \n $oCustomValidator = Phpfox::getLib('validator')->set(array(\n 'sFormName' => 'js_custom_field', \n 'aParams' => $aFieldValidation,\n 'bParent' => true\n )\n ); \n \n $this->template()->assign(array(\n 'sCustomCreateJs' => $oCustomValidator->createJS(),\n 'sCustomGetJsForm' => $oCustomValidator->getJsForm() \n )\n ); \n \n if (($aVals = $this->request()->getArray('val')))\n {\n \t\n \tif(isset($aVals['name']))\n \t{\n \t\tforeach($aVals['name'] as $key=>$name)\n\t\t\t\t{\n\t\t\t\t\t$name['text'] = substr($name['text'],0,30);\t\n\t\t\t\t\t$aVals['name'][$key] = $name;\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\n if ($oCustomValidator->isValid($aVals))\n {\n if (Phpfox::getService('resume.custom.process')->add($aVals))\n {\n $this->url()->send('admincp.resume.custom.add', null, Phpfox::getPhrase('resume.field_successfully_added'));\n }\n }\n \n if (isset($aVals['var_type']) && $aVals['var_type'] == 'select')\n {\n $bHideOptions = false;\n $iCnt = 0;\n $sOptionPostJs = '';\n foreach ($aVals['option'] as $iKey => $aOptions)\n {\n if (!$iKey)\n {\n continue;\n }\n \n $aValues = array_values($aOptions);\n if (!empty($aValues[0]))\n {\n $iCnt++;\n }\n \n foreach ($aOptions as $sLang => $mValue)\n {\n $sOptionPostJs .= 'option_' . $iKey . '_' . $sLang . ': \\'' . str_replace(\"'\", \"\\'\", $mValue) . '\\','; \n }\n }\n $sOptionPostJs = rtrim($sOptionPostJs, ',');\n $iDefaultSelect = $iCnt; \n }\n } \n \n $this->template()->setTitle(Phpfox::getPhrase('resume.add_a_new_custom_field'))\n ->setBreadcrumb(Phpfox::getPhrase('resume.add_a_new_custom_field'), $this->url()->makeUrl('admincp.resume.custom.add'))\n ->setPhrase(array(\n 'resume.are_you_sure_you_want_to_delete_this_custom_option'\n )\n )\n ->setHeader(array(\n '<script type=\"text/javascript\"> var bIsEdit = false; </script>',\n 'admin.js' => 'module_custom',\n '<script type=\"text/javascript\">$(function(){$Core.custom.init(' . $iDefaultSelect . '' . (isset($sOptionPostJs) ? ', {' . $sOptionPostJs . '}' : '') . ');});</script>'\n )\n )\n ->assign(array(\n 'aLanguages' => Phpfox::getService('language')->getAll(),\n 'bHideOptions' => $bHideOptions,\n \n )\n );\n }", "title": "" }, { "docid": "273840c87d79ca3f32355e247d9c0053", "score": "0.5759415", "text": "function OnBeforeCreateEditControl(){\n }", "title": "" }, { "docid": "cd9c234699b550d4cf1de329ca2da4d4", "score": "0.5750985", "text": "public function create(){\n $form = new Form(array(\n 'id' => 'new-plugin-form',\n 'labelWidth' => '20em',\n 'fieldsets' => array(\n 'form' => array(\n new HtmlInput(array(\n 'name' => 'intro',\n 'value' => '<div class=\"alert alert-info\">' . Lang::get($this->_plugin . '.new-plugin-intro') . '</div>'\n )),\n new TextInput(array(\n 'name' => 'name',\n 'required' => true,\n 'pattern' => '/^[\\w\\-]+$/',\n 'label' => Lang::get($this->_plugin . '.new-plugin-name-label')\n )),\n new TextInput(array(\n 'name' => 'title',\n 'required' => true,\n 'label' => Lang::get($this->_plugin . '.new-plugin-title-label')\n )),\n new TextareaInput(array(\n 'name' => 'description',\n 'label' => Lang::get($this->_plugin . '.new-plugin-description-label')\n )),\n new TextInput(array(\n 'name' => 'version',\n 'required' => true,\n 'pattern' => '/^(\\d+\\.){2,3}\\d+$/',\n 'label' => Lang::get($this->_plugin . '.new-plugin-version-label'),\n 'default' => '0.0.1'\n )),\n new TextInput(array(\n 'name' => 'author',\n 'label' => Lang::get($this->_plugin . '.new-plugin-author-label'),\n )),\n ),\n 'submits' => array(\n new SubmitInput(array(\n 'name' => 'valid',\n 'value' => Lang::get('main.valid-button'),\n )),\n new ButtonInput(array(\n 'name' => 'cancel',\n 'value' => Lang::get('main.cancel-button'),\n 'onclick' => 'app.dialog(\"close\")'\n ))\n ),\n ),\n 'onsuccess' => 'app.dialog(\"close\"); app.load(app.getUri(\"manage-plugins\"));'\n ));\n\n if(!$form->submitted()) {\n // Display the form\n return View::make(Theme::getSelected()->getView('dialogbox.tpl'), array(\n 'title' => Lang::get($this->_plugin . '.new-plugin-title'),\n 'icon' => 'plug',\n 'page' => $form\n ));\n }\n else{\n // Create the plugin\n if($form->check()) {\n if(in_array($form->getData('name'), Plugin::$forbiddenNames)) {\n $message = Lang::get($this->_plugin . '.new-plugin-forbidden-name', array('forbidden' => implode(', ', Plugin::$forbiddenNames)));\n $form->error('name', $message);\n return $form->response(Form::STATUS_CHECK_ERROR, $message);\n }\n\n $namespace = Plugin::getNamespaceByName($form->getData('name'));\n\n // Check the plugin does not exists\n foreach(Plugin::getAll(false) as $plugin){\n if($namespace === $plugin->getNamespace()) {\n // A plugin with the same name already exists\n $form->error('name', Lang::get($this->_plugin . '.new-plugin-already-exists-error'));\n return $form->response(Form::STATUS_CHECK_ERROR, Lang::get($this->_plugin . '.new-plugin-already-exists-error'));\n }\n }\n\n // The plugin can be created\n $dir = PLUGINS_DIR . $form->getData('name') . '/';\n\n try{\n // Create the directories structure\n if(!mkdir($dir)) {\n throw new \\Exception('Impossible to create the directory ' . $dir);\n }\n\n $subdirs = array(\n 'controllers',\n 'crons',\n 'models',\n 'lib',\n 'lang',\n 'views',\n 'static',\n 'static/less',\n 'static/js',\n 'static/img',\n 'widgets'\n );\n\n foreach($subdirs as $subdir){\n if(!mkdir($dir . $subdir, 0755, true)) {\n throw new \\Exception('Impossible to create the directory ' . $dir . $subdir);\n }\n }\n\n\n // Create the file manifest.json\n $conf = array(\n 'title' => $form->getData('title'),\n 'description' => $form->getData('description'),\n 'version' => $form->getData('version'),\n 'author' => $form->getData('author'),\n 'dependencies' => array()\n );\n if(file_put_contents($dir . Plugin::MANIFEST_BASENAME, json_encode($conf, JSON_PRETTY_PRINT)) === false) {\n throw new \\Exception('Impossible to create the file ' . Plugin::MANIFEST_BASENAME);\n }\n\n $plugin = Plugin::get($form->getData('name'));\n $namespace = $plugin->getNamespace();\n\n // Create the file start.php\n $start = str_replace(\n array(\n '{{ $namespace }}',\n '{{ $name }}'\n ),\n array(\n $namespace,\n $plugin->getName()\n ),\n file_get_contents(Plugin::current()->getRootDir() . 'templates/start.tpl')\n );\n if(file_put_contents($dir . 'start.php', $start) === false) {\n throw new \\Exceptio('Impossible to create the file start.php');\n }\n\n // Create the file Installer.php\n $installer = str_replace(\n array(\n '{{ $namespace }}',\n '{{ $name }}'\n ),\n array(\n $namespace,\n $plugin->getName()\n ),\n file_get_contents(Plugin::current()->getRootDir() . 'templates/installer.tpl')\n );\n if(file_put_contents($dir . 'Installer.php', $installer) === false) {\n throw new \\Exception('Impossible to create the file classes/Installer.php');\n }\n\n // Create the file BaseController.php\n $controller = str_replace(\n '{{ $namespace }}',\n $namespace,\n file_get_contents(Plugin::current()->getRootDir() . 'templates/base-controller.tpl')\n );\n if(file_put_contents($dir . 'controllers/BaseController.php', $controller) === false) {\n throw new \\Exception('Impossible to create the file controllers/BaseController.php');\n }\n\n // Create the language file\n $language = file_get_contents(Plugin::current()->getRootDir() . 'templates/lang.tpl');\n if(file_put_contents($dir . 'lang/' . $plugin->getName() . '.en.lang', $language) === false) {\n throw new \\Exception('Impossible to create the file lang/' . $plugin->getName() . '.en.lang');\n }\n\n // Create the README file\n if(touch($dir . 'README.md') === false) {\n throw new \\Exception('Impossible to create the README file');\n }\n\n return $form->response(Form::STATUS_SUCCESS, Lang::get($this->_plugin . '.new-plugin-success'));\n }\n catch(\\Exception $e){\n if(is_dir($dir)) {\n App::fs()->remove($dir);\n }\n return $form->response(Form::STATUS_ERROR, DEBUG_MODE ? $e->getMessage() : Lang::get($this->_plugin . '.new-plugin-error'));\n }\n }\n }\n }", "title": "" }, { "docid": "a13bba31858ceb77e3a0417b07802ed9", "score": "0.57387805", "text": "public function create()\n {\n $this->resetInputFields();\n }", "title": "" }, { "docid": "1b5fdec1b90afdf7ccb87d3dff5a71dc", "score": "0.57330126", "text": "protected function initCreatingFields() : void\n\t{\n\n\t\t$this->creating_fields = ['text', 'user_id', 'parent_id'];\n\n\t}", "title": "" }, { "docid": "deba7ee0c42f935c0b3e84079b8c1055", "score": "0.5722421", "text": "public function send_field_to_form() {\r\n\t\t\tinclude YIKES_MC_PATH . 'admin/partials/ajax/add_field_to_form.php';\r\n\t\t\texit();\r\n\t\t}", "title": "" }, { "docid": "b23b0f83cac48262f5f3238f11441a7a", "score": "0.57180107", "text": "public function addFieldFromDb($FieldInfo){\n \n $form_field='';//scaffold\n \n //pass the array in vars to shorten things up\n if($FieldInfo)\n foreach($FieldInfo as $key=>$value)\n ${$key}=$value;\n\n \n //start with a span\n $form_field.='<span>';\n \n //add label\n if($type!='hidden' && $type!='checkbox')\n $form_field.=self::label($name,$mandatory);\n \n //add PRE_field to compare with previous value\n if($PRE_value!==NULL):\n $this->is_update=true;\n $form_field.=$this->hidden('PRE_'.$name,htmlentities($PRE_value));\n endif;\n \n #echo '$FieldInfo[name]='.$FieldInfo['name'].'\n #name='.$name.' type='.$type;\n \n \n //add right field\n //textarea|input|password|select|multipleselect|checkbox|timestamp|hidden\n \n if\n ($type=='textarea'):\n \n $form_field.=self::textarea($name,$value,$maxlength);\n \n elseif\n ($type=='input'):\n \n $form_field.=self::input($name,$value,$maxlength);\n \n elseif\n ($type=='password'):\n \n $form_field.=self::password($name,$value,$maxlength);\n $form_field.=self::label('rep_'.$name,$mandatory);\n $form_field.=self::password('rep_'.$name,$value,$maxlength);\n \n elseif\n ($type=='select' || $type=='multipleselect'):\n \n $ms = ( $type=='multipleselect' ) ? true : false ;\n $form_field.=self::select($name,$value,$SelectOptions,$use_select_values,$ms);\n \n elseif\n ($type=='checkbox'):\n \n $form_field.=self::checkbox($name,$value);\n \n elseif\n ($type=='timestamp'):\n \n $form_field.=self::timestamp($name,$value,$maxlength);\n \n elseif\n ($type=='hidden'):\n \n $form_field.=self::hidden($name,$value);\n \n elseif\n ($type=='file'):\n \n $form_field.=self::_file($name);\n \n endif;\n \n \n //display eventual after text\n $form_field.=$after_text;\n\n //display eventual error message\n $form_field.=(isset(Notify::$All['user_errors'][$name])) ? '<span class=\"FormError\">'.strtr(Notify::$All['user_errors'][$name],self::$Trans).'</span>' : '';\n \n //close span\n $form_field.='</span>';\n\t\n\t\n\t\n\t\n\t//echo youtube movie if it is\n\tif($name=='youtube_video')\n\t $form_field.=YouTube::display($value);\n\t\n \n //add field to form\n $this->Form.=$form_field;\n \n }", "title": "" }, { "docid": "f0e4df4871dc83b3ed1a5ab6a735bb60", "score": "0.57028705", "text": "protected function Form_Create() {\n\t\t\t// Define the Label\n\t\t\t$this->lblMessage = new QLabel($this);\n\t\t\t$this->lblMessage->Text = 'Click the button to change my message.';\n\n\t\t\t// Define the Button\n\t\t\t$this->btnButton = new QButton($this);\n\t\t\t$this->btnButton->Text = 'Click Me!';\n\n\t\t\t// Add a Click event handler to the button\n\t\t\t$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));\n\t\t}", "title": "" }, { "docid": "28f68788d7280bf026353ed98f6a1b3d", "score": "0.56970435", "text": "function setup_fields() {\n if (!empty($this->fields)) {\n foreach($this->fields as $field) $this->form_data->add_element([\"type\"=>\"text\",\"name\"=>$field,\"field\"=>$field]);\n $this->form_data->add_element([\"type\"=>\"submit\",\"name\"=>\"submit\",\"value\"=>\"Submit\"]);\n }\n return true;\n }", "title": "" }, { "docid": "b3f6986b535f26a872664922eb104ba1", "score": "0.56916034", "text": "protected function _created()\n {\n $element = new Zend_Form_Element_Text('date_create');\n $element->setLabel('Date create')\n ->addValidator(new Zend_Validate_Date('Y-m-d H:i:s'));\n\n return $element;\n }", "title": "" }, { "docid": "817581d4a9c885aace08770dc6161bc0", "score": "0.5683381", "text": "protected function createField($name, $value) {\r\n\t\tif(isset($this->params['valueFormat'])) {\r\n\t\t\t$this->valueFormat = $this->params['valueFormat'];\r\n\t\t}\r\n\t\tif(isset($this->params['keyFormat'])) {\r\n\t\t\t$this->keyFormat = $this->params['keyFormat'];\r\n\t\t}\r\n\t\t\r\n\t\t$options = Larc_Date::getMonths($this->valueFormat, $this->keyFormat);\r\n\t\t\r\n\t\t//$node = new Larc_Html_Element_Select($options, array('name' => $name), $this);\r\n\t\t$node = new Larc_Html_Element_Select($options, array('name' => $name), $this);\r\n\t\t$this->fieldNode = $this->appendChild($node);\r\n\t\t\r\n\t\tif(isset($this->params['attributes'])) {\r\n\t\t\t$this->initAttributes($this->fieldNode, $this->params['attributes']);\r\n\t\t}\r\n\t\tif(isset($this->params['fieldAttributes'])) {\r\n\t\t\t$this->initAttributes($this->fieldNode, $this->params['fieldAttributes']);\r\n\t\t}\r\n\t\t\r\n\t\tif($value) {\r\n \t\tif(is_numeric($value)) {\r\n \t\t\t$y = date('Y', strtotime('now'));\r\n \t\t\t$value = date($this->keyFormat, strtotime('01-'.$value.'-'.$y));\r\n \t\t} else {\r\n \t\t\t$value = date($this->keyFormat, strtotime($value));\r\n \t\t}\r\n \t} else {\r\n \t\t// default to current month\r\n \t\t$value = date($this->keyFormat, strtotime('now'));\r\n \t}\r\n \t\r\n\t\t$this->fieldNode->selectOptionWithValue($value);\r\n\t}", "title": "" }, { "docid": "0e0b299031e722fad47b13997198d62b", "score": "0.5677999", "text": "public function doGenerateJqueryValidation()\n {\n }", "title": "" }, { "docid": "f7742c95621c9c4b7e2c566b983e7dda", "score": "0.5670599", "text": "protected function customFieldPrepare()\n {\n\n /* @var $cs EClientScript */\n $cs = Yii::app()->clientScript;\n\n if (empty($this->render)) {\n if ($this->hasModel()) {\n $inputName = CHtml::activeName($this->model, $this->attribute);\n $inputId = CHtml::activeId($this->model, $this->attribute);\n } else {\n $inputName = $this->name;\n $inputId = 'recaptcha-' . $this->name;\n }\n if (empty($this->jsCallback)) {\n $jsCode = \"var recaptchaCallback = function(response){jQuery('#{$inputId}').val(response);};\";\n } else {\n $jsCode = \"var recaptchaCallback = function(response){jQuery('#{$inputId}').val(response); {$this->jsCallback}(response);};\";\n }\n $this->jsCallback = 'recaptchaCallback';\n if (empty($this->jsExpiredCallback)) {\n $jsExpCode = \"var recaptchaExpiredCallback = function(){jQuery('#{$inputId}').val('');};\";\n } else {\n $jsExpCode = \"var recaptchaExpiredCallback = function(){jQuery('#{$inputId}').val(''); {$this->jsExpiredCallback}};\";\n }\n $this->jsExpiredCallback = 'recaptchaExpiredCallback';\n\n\n $cs->registerScript(get_class($this) . '_options', $jsCode, CClientScript::POS_BEGIN);\n $cs->registerScript(get_class($this) . '_options_2', $jsExpCode, CClientScript::POS_BEGIN);\n\n echo CHtml::hiddenField($inputName, null, ['id' => $inputId]);\n\n } else {\n $vars = \"\";\n $widgets = \"\";\n $callbacks = \"\";\n $expCallbacks = \"\";\n $i = 1;\n foreach ($this->render as $variable => $params) {\n $vars .= \"var widget$i;\";\n $params['sitekey'] = $this->siteKey;\n if (isset($params['callback'])) {\n $callbacks .= 'var verifyCallback' . $i . ' = function(response){' . $params[\"callback\"] . '};';\n $params['callback'] = 'verifyCallback' . $i;\n }\n if (isset($params['expired-callback'])) {\n $expCallbacks .= 'var expCallback' . $i . ' = function(response){' . $params[\"expired-callback\"] . '};';\n $params['expired-callback'] = 'expCallback' . $i;\n }\n\n $options = CJavaScript::encode($params, true);\n $widgets .= \"widget$i = grecaptcha.render('$variable', $options);\";\n $i++;\n }\n\n $script = <<<JS\n \n $callbacks\n $expCallbacks\n $vars\n var onloadCallback = function() {\n $widgets \n }\nJS;\n $cs->registerScript(get_class($this) . '_explicit', $script, CClientScript::POS_BEGIN);\n }\n }", "title": "" }, { "docid": "6fcb52c6d42464c2dd470d0e357b68f5", "score": "0.56514555", "text": "function addField($type, $p){\n switch ($type){\n case 1: //text\n if ($check = $this -> verifyParams($p, 15, \"TEXTO\")){\n\n /*\n 1. nombre del campo = user_name -> $p[\"field_name\"]\n 2. etiqueta texto -> $p[\"label_field\"]\n 3. solo lectura -> $p[\"readonly\"]\n 4. deshabilitado -> $p[\"disabled\"]\n 5. value -> $p[\"val_field\"]\n 6. longitud maxima -> $p[\"maxlength\"]\n 7. tamaño -> $p[\"size\"]\n 8. style -> $[\"style\"]\n 9. javascript ->$p[\"js\"]\n 10.placeholder -> $p[\"placeholder\"]\n 11. required -> $p[\"required\"]\n 12. autofocus -> $p[\"autofocus\"]\n\n 13. class_label -> $p[\"class_label\"]\n 14. div_field -> $p[\"div_field\"]\n 15 input_class -> $p[\"input_class\"] --> form-control\n\n */\n\n echo '<div class=\"form-group\">\n <label class=\"' . $p[\"class_label\"] .'\" for=\"'. $p[\"field_name\"] . '\"><b> ' . $p[\"label_field\"] . '</b></label> \n <div class=\"' . $p[\"div_field\"] . '\">\n <input type=\"text\" name=\"' . $p[\"field_name\"] . '\" class=\"' . $p[\"input_class\"] . '\" id=\"' . $p[\"field_name\"] . '\" ' .\n $p[\"readonly\"] . ' ' . $p[\"disabled\"] . ' value=\"' . $p[\"value\"] . '\" maxlength=\"' . $p[\"maxlength\"] . '\" size=\"' .\n $p[\"size\"] . '\" style=\"'. $p[\"style\"] . '\" ' . $p[\"js\"] . ' placeholder=\"' . $p[\"placeholder\"] .\n '\" '. $p[\"required\"]. ' ' . $p[\"autofocus\"] . ' autocomplete=\"off\" />\n </div>\n </div>';\n echo '<div class=\"space\">&nbsp;</div>';\n\n\n\n }\n break;\n case 2: //password\n if ($check = $this -> verifyParams($p, 15, \"PASSWORD\")){\n /*echo \"<input type='password' name='$p[nombre]' maxlength='$p[maxlength]' size='$p[size]' style='$p[style]' $p[js]>\"; */\n /*\n 1. class_label\n 2. field_name\n 3. label_field\n 4. div_field\n 5. input_class\n 6. value\n 7. placeholder\n 8. required\n 9. autofocus\n $form -> addField(2, array(\n \"field_name\" => \"user_pass\",\n \"class_label\" => \"control-label col-md-3 col-sm-3 col-xs-12\",\n \"label_field\" => \"Contraseña Antigua\",\n \"div_field\" => \"col-md-6 col-sm-6 col-xs-12\",\n \"input_class\" => \"date-picker form-control col-md-7 col-xs-12\",\n \"value\" => \"\",\n \"placeholder\" => \"**********\",\n \"required\" => \"required\",\n \"autofocus\" => \"autofocus\"\n\n */\n\n echo '<div class=\"form-group\">\n <label class=\"' . $p[\"class_label\"] .'\" for=\"'. $p[\"field_name\"] . '\"><b> ' . $p[\"label_field\"] . '</b></label> \n <div class=\"' . $p[\"div_field\"] . '\">\n <input type=\"password\" name=\"' . $p[\"field_name\"] . '\" class=\"' . $p[\"input_class\"] . '\" id=\" ' . $p[\"field_name\"] . '\" ' .\n $p[\"readonly\"] . ' ' . $p[\"disabled\"] . ' value=\"' . $p[\"value\"] . '\" maxlength=\"' . $p[\"maxlength\"] .\n '\" size=\"' . $p[\"size\"] . '\" style=\"'. $p[\"style\"] . '\" ' . $p[\"js\"] . ' placeholder=\"' . $p[\"placeholder\"] .\n '\" '. $p[\"required\"]. ' ' . $p[\"autofocus\"] . '/>\n </div>\n </div>';\n\n }\n break;\n case 3: //submit-button\n if ($check = $this -> verifyParams($p, 6, \"SUBMIT\")){\n \n echo '<button type=\"submit\" name=\"' . $p[\"name\"] . '\" class=\"' . $p[\"type_button\"] . '\" ' . $p[\"disabled\"] . ' data-toggle=\"tooltip\" data-placement=\"top\" title=\"'. $p[\"tooltip\"] . '\"><i class=\"' . $p[\"icon\"] . '\"></i> &nbsp;&nbsp;' . $p[\"legend\"] . '</button>';\n }\n break;\n case 4: //hidden\n if ($check = $this -> verifyParams($p, 2, \"HIDDEN\")){\n /*echo \"<input name='$p[nombre]' type='hidden' value='$p[value]'/>\";*/\n /*<input type=\"hidden\" value=\"<?php echo $usuario->id ?>\" name=\"usuario_id\" />*/\n echo '<input type=\"hidden\" value=\"' . $p[\"value\"] . '\" name=\"' . $p[\"field_name\"] . '\" />';\n }\n break;\n case 5:\n if ($check = $this -> verifyParams($p, 5, \"EMAIL\")){\n /*\n 1. nombre del campo = user_name -> $p[\"field_name\"]\n 2. etiqueta texto -> $p[\"label_field\"]\n 3. value -> $p[\"value\"]\n 4. placeholder -> $p[\"placeholder\"]\n 5. required -> $p[\"required\"]\n */\n\n echo '<div class=\"form-group\">\n <label for=\"' . $p[\"field_name\"] . '\">' . $p[\"label_field\"] . '</label>\n <input type=\"email\" value=\"' .$p[\"value\"] . '\" name=\"' . $p[\"field_name\"] . '\" class=\"form-control\" id=\"' .\n $p[\"field_name\"] . '\" placeholder=\"' . $p[\"placeholder\"] . '\" ' . $p[\"required\"]. '/>\n </div>';\n }\n break;\n case 6:\n if ($check = $this -> verifyParams($p, 11, \"EMAIL\")){\n /*\n 1. nombre del campo = user_name -> $p[\"field_name\"] ->ok\n 2. etiqueta texto -> $p[\"label_field\"] -> ok\n 3. value -> $p[\"value\"] -> ok\n 4. placeholder -> $p[\"placeholder\"] ->\n 5. id -> $p[\"required\"]\n rows ->\n */\n\n echo '<div class=\"form-group\">\n <label for=\"' . $p[\"field_name\"] . '\">' . $p[\"label_field\"] . '</label>\n <textarea value=\"' .$p[\"value\"] . '\" name=\"' . $p[\"field_name\"] . '\" class=\"form-control\" id=\"' .\n $p[\"field_name\"] . '\" placeholder=\"' . $p[\"placeholder\"] . '\" ' . $p[\"required\"]. ' rows=' . $p[\"rows\"] . '>' . $p[\"value\"] . '</textarea>\n </div>';\n }\n break;\n case 7: //TEL\n if ($check = $this -> verifyParams($p, 15, \"TEL\")){\n\n /*\n 1. nombre del campo = user_name -> $p[\"field_name\"]\n 2. etiqueta texto -> $p[\"label_field\"]\n 3. solo lectura -> $p[\"readonly\"]\n 4. deshabilitado -> $p[\"disabled\"]\n 5. value -> $p[\"val_field\"]\n 6. longitud maxima -> $p[\"maxlength\"]\n 7. tamaño -> $p[\"size\"]\n 8. style -> $[\"style\"]\n 9. javascript ->$p[\"js\"]\n 10.placeholder -> $p[\"placeholder\"]\n 11. required -> $p[\"required\"]\n 12. autofocus -> $p[\"autofocus\"]\n 13. \"class_label\" => \"\",\n 14. \"div_field\" => \"\",\n 15. \"input_class\" => \"col-md-12\",\n */\n\n echo '<div class=\"form-group\">\n <label class=\"' . $p[\"class_label\"] .'\" for=\" '. $p[\"field_name\"] . ' \"><b> ' . $p[\"label_field\"] . '</b></label>\n <div class=\"' . $p[\"div_field\"] . '\"> \n <input type=\"tel\" name=\"' . $p[\"field_name\"] . '\" class=\"' . $p[\"input_class\"] . '\" id=\" ' . $p[\"field_name\"] . '\" ' .\n $p[\"readonly\"] . ' ' . $p[\"disabled\"] . ' value=\"' . $p[\"value\"] . '\" maxlength=' . $p[\"maxlength\"] .\n 'size=' . $p[\"size\"] . 'style='. $p[\"style\"] . ' ' . $p[\"js\"] . ' placeholder=\"' . $p[\"placeholder\"] .\n '\" '. $p[\"required\"]. ' ' . $p[\"autofocus\"] . '/>\n </div>\n </div>';\n echo '<div class=\"space\">&nbsp;</div>';\n\n\n\n }\n break;\n case 8: //EMAIL\n if ($check = $this -> verifyParams($p, 15, \"Email\")){\n\n\n\n echo '<div class=\"form-group\">\n <label class=\"' . $p[\"class_label\"] .'\" for=\" '. $p[\"field_name\"] . ' \"><b> ' . $p[\"label_field\"] . '</b></label>\n <div class=\"' . $p[\"div_field\"] . '\"> \n <input type=\"email\" name=\"' . $p[\"field_name\"] . '\" class=\"' . $p[\"input_class\"] . '\" id=\" ' . $p[\"field_name\"] . '\" ' .\n $p[\"readonly\"] . ' ' . $p[\"disabled\"] . ' value=\"' . $p[\"value\"] . '\" maxlength=' . $p[\"maxlength\"] .\n 'size=' . $p[\"size\"] . 'style='. $p[\"style\"] . ' ' . $p[\"js\"] . ' placeholder=\"' . $p[\"placeholder\"] .\n '\" '. $p[\"required\"]. ' ' . $p[\"autofocus\"] . '/>\n </div>\n </div>';\n\n\n\n }\n break;\n\n case 9: //textarea\n if ($checa = $this -> verifyParams($p, 12, \"TEXTAREA\")){\n\n /*\n \"field_name\" => \"about\",\n \"label_field\" => \"Breve descripción del Usuario:\",\n \"readonly\" => \"\",\n \"disabled\" => \"\",\n \"value\" => \"about\",\n \"rows\" => \"3\",\n \"cols\" => \"\",\n \"style\" => \"\",\n \"js\" => \"\",\n \"placeholder\" => \"Sobre el usuario...\",\n \"content\" => \"$about\",\n \"required\" => \"required\"\n <textarea name='$p[nombre]' $p[readonly] $p[disabled] rows='$p[rows]' cols='$p[cols]' style='$p[style]' $p[js]>$p[valor]</textarea>\";\n\n */\n\n echo '<div class=\"form-group\">\n <label for=\"'. $p[\"field_name\"] . '\"> ' . $p[\"label_field\"] . '</label>\n <textarea value=\"' . $p[\"value\"] . '\" name=\"' . $p[\"field_name\"] . '\" ' . $p[\"readonly\"] . ' ' . $p[\"disabled\"] . ' rows=\"' . $p[\"rows\"]\n . '\" cols=\"' . $p[\"cols\"] . '\" class=\"form-control\" style=\"' . $p[\"style\"] . '\" required=\"' . $p[\"required\"] . '\" ' . $p[\"js\"]\n . ' placeholder=\"'. $p[\"placeholder\"] . '\">' . $p[\"content\"] . '</textarea>\n </div>\n ';\n\n\n }\n break;\n\n case 10: //textarea\n if ($checa = $this -> verifyParams($p, 11, \"RADIO\")){\n\n /*\n \"field_name\" = \"yes_no_radio_create\",\n \"class_label\" = \"\",\n \"label_field\" = \"¿Este privilegio puede crear contenido?\",\n \"name_option\" => \"yes_no_create\",\n \"div_field\" => \"\",\n \"input_class\" => \"col-md-8\",\n \"readonly\" => \"\",\n \"disabled\" => \"\",\n \"value_no\" => \"N\",\n \"value_yes\" => \"Y\"\n\n */\n\n echo '\n <table border=\"0\" > \n <div class=\"form-group\" id=\"wrapper\">\n <tr>\n <td width=\"350\">\n \n <label for=\"' . $p[\"field_name\"] . '\"> ' . $p[\"label_field\"] . '</label> \n </td>';\n\n if ($p[\"selected\"] == false){\n\n echo '<td width=\"50\" align=\"center\">\n <input type=\"radio\" name=\"' . $p[\"name_option\"] . '\" value=\"' . $p[\"value_no\"] . '\" checked>No</input> \n </td>\n <td width=\"50\" align=\"center\">\n <input type=\"radio\" name=\"' . $p[\"name_option\"] . '\" value=\"' . $p[\"value_yes\"] . '\">Si</input>\n </td>';\n }else{\n echo '<td width=\"50\" align=\"center\">\n <input type=\"radio\" name=\"' . $p[\"name_option\"] . '\" value=\"' . $p[\"value_no\"] . '\" >No</input> \n </td>\n <td width=\"50\" align=\"center\">\n <input type=\"radio\" name=\"' . $p[\"name_option\"] . '\" value=\"' . $p[\"value_yes\"] . '\" checked>Si</input>\n </td>';\n\n }\n\n\n echo '</label>\n </tr>\n </div>\n </table>\n ';\n\n\n }\n break;\n\n case 11: //Checkboxes\n if ($checa = $this -> verifyParams($p, 6, \"CHECKBOX\")){\n /*\n \"field_name\" = \"checkbox_name\",\n \"label_field\" = \"¿Este privilegio puede crear contenido?\",\n \"readonly\" => \"\",\n \"disabled\" => \"\",\n \"value\" => \"\",\n \"legend\" => \"\" \n\n\n <!-- Default unchecked -->\n<div class=\"custom-control custom-checkbox\">\n <input type=\"checkbox\" class=\"custom-control-input\" id=\"defaultUnchecked\">\n <label class=\"custom-control-label\" for=\"defaultUnchecked\">Default unchecked</label>\n</div>\n\n */\n \n\n\n echo '\n <table border=\"0\" > \n <div class=\"form-group\" id=\"wrapper\">\n <tr>\n <td width=\"\">\n \n <label for=\"' . $p[\"field_name\"] . '\"> ' . $p[\"label_field\"] . '</label> \n \n <input type=\"checkbox\" name=\"' . $p[\"field_name\"] . '\" value=\"' . $p[\"value\"] . '\">' . $p[\"legend\"] . '</input> \n </td>\n ';\n \n\n echo '</label>\n </tr>\n </div>\n </table>\n ';\n\n\n }\n break;\n\n\n\n default: //\n echo 'Error al agregar el campo, opción no valida <b>' . ($type). '</b>...el programa abortó.';\n exit;\n\n }//switch\n\n }", "title": "" }, { "docid": "b9a7df4205255ed8d4c9be92398c7512", "score": "0.5649611", "text": "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$type = $this->_input->filterSingle('type', XenForo_Input::STRING);\n\t\t\n\t\t$fieldModel = $this->_getFieldModel();\n\t\t$fieldTypes = $fieldModel->getCountByType();\n\t\t\n\t\t$options = array();\n\t\t$options[] = array(\n\t\t 'value' => 'user',\n\t\t 'label' => new XenForo_Phrase('field'),\n\t\t 'selected' => true\n\t\t);\n\t\t\n\t\t// if global fields exist, include in the types\n\t\tif (array_key_exists('global', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'global',\n\t\t\t 'label' => new XenForo_Phrase('global_field')\n\t\t\t);\n\t\t}\n\t\t\n\t\t// if template fields exist, include in the types\n\t\tif (array_key_exists('template', $fieldTypes))\n\t\t{\n\t\t\t$options[] = array(\n\t\t\t 'value' => 'template',\n\t\t\t 'label' => new XenForo_Phrase('template_field') \n\t\t\t);\n\t\t}\n\t\t\n\t\t// if there are no options other than user, just send them to the add field page\n\t\tif (!$type && count($options) == 1)\n\t\t{\n\t\t\t$type = 'user';\n\t\t}\n\t\t\n\t\t// association a field to a form\n\t\tif ($formId && $type)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'field_id' => null,\n\t\t\t\t'form_id' => $this->_input->filterSingle('form_id', XenForo_Input::UINT),\n\t\t\t\t'display_order' => $this->_getFieldModel()->getGreatestDisplayOrderByFormId($formId) + 10,\n\t\t\t\t'field_type' => 'textbox',\n\t\t\t\t'field_choices' => '',\n\t\t\t\t'match_type' => 'none',\n\t\t\t\t'match_regex' => '',\n\t\t\t\t'match_callback_class' => '',\n\t\t\t\t'match_callback_method' => '',\n\t\t\t\t'max_length' => 0,\n\t\t\t\t'min_length' => 0,\n\t\t\t\t'required' => 0,\n\t\t\t\t'type' => $type,\n\t\t\t\t'active' => 1,\n\t\t\t\t'pre_text' => '',\n\t\t\t\t'post_text' => ''\n\t\t\t);\n\t\t\t\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t case 'global':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-global-field');\n\t\t }\n\t\t\t case 'template':\n\t\t {\n\t\t return $this->responseReroute('KomuKu_SimpleForms_ControllerAdmin_Form', 'add-template-field');\n\t\t }\n\t\t\t default:\n\t\t {\n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// adding a global/template field\n\t\telse if (!$formId && $type)\n\t\t{\n\t\t $default = array(\n\t 'field_id' => null,\n\t 'field_type' => 'textbox',\n\t 'field_choices' => '',\n\t 'match_type' => 'none',\n\t 'match_regex' => '',\n\t 'match_callback_class' => '',\n\t 'match_callback_method' => '',\n\t 'max_length' => 0,\n\t\t \t'min_length' => 0,\n\t 'type' => $type,\n\t\t \t'pre_text' => '',\n\t\t \t'post_text' => ''\n\t\t );\n\t\t \n\t\t if ($type != 'global')\n\t\t {\n\t\t \t$default['display_order'] = 1;\n\t\t \t$default['required'] = 0;\n\t\t \t$default['active'] = 1;\n\t\t }\n\t\t \n\t\t return $this->_getFieldAddEditResponse($default);\n\t\t}\n\t\t\n\t\t// association type\n\t\telse\n\t\t{\n\t\t\t$viewParams = array(\n\t\t\t\t'formId' => $formId,\n\t\t\t\t'options' => $options\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_Field_AddType', 'kmkform__field_add_type', $viewParams);\n\t\t}\n\t}", "title": "" }, { "docid": "f27b090fe8b33d41879e670f4447504b", "score": "0.56457907", "text": "function create_field($field)\n\t{\n\n\n global $post;\n\n ?>\n\n <div class=\"ve_map\">\n\n <?php \n \n /**\n * Get the meta\n * -------------------------------------------- */\n\n $data = $field['value'];\n $name = $this->try_get_value($data, 'name');\n $lat = $this->try_get_value($data, 'lat');\n $lng = $this->try_get_value($data, 'lng');\n $street = $this->try_get_value($data, 'street');\n $city = $this->try_get_value($data, 'city');\n $state = $this->try_get_value($data, 'state');\n $zip = $this->try_get_value($data, 'zip');\n $address = $this->try_get_value($data, 'address');\n $google_address = $this->try_get_value($data, 'google_address');\n \n ?>\n\n <fieldset>\n\n <p class=\"error-message\">Enter an address for the property.</p>\n\n <?php /* ?>\n <h4>How it works</h4>\n <ol>\n <li>Enter the property address into the \"Address Lookup Tool\" (directly below)</li>\n <li>Click \"Get Coordinates\"</li>\n <li>We fetch the latitude and longitude coordinates from Google, which are required for the search feature to work properly.</li>\n <li>The \"Street\", \"City\", \"State\", and \"Zip\" are for presentation purposes only and are not used in the search function, so feel free to change \"Pl\" to \"Place\", or \"Dr\" to \"Drive\"</li>\n </ol>\n\n <h4>Address Lookup Tool</h4>\n <?php */ ?>\n <p> <input type=\"text\" class=\"widefat\" placeholder=\"Enter the street address\" id=\"property-address\" name=\"<?php echo $field['name'] ?>[search_string]\" value=\"\" / > </p>\n <p> <a id=\"get-coordinates\" class=\"button-primary\" href=\"javascript:;\">Get Coordinates</a> </p>\n </fieldset>\n\n <div class=\"map\">\n <iframe id=\"property-iframe\" width=\"655\" height=\"350\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"<?php echo $url; ?>\"></iframe><br><a id=\"property-url\" target=\"_blank\" href=\"<?php echo $url ?>\">View Larger Map</a>\n </div>\n\n <fieldset class=\"address-info\">\n <p><b>Name</b> <input type=\"text\" id=\"property-name\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[name]\" value=\"<?php echo $name ?>\" / > </p>\n <p><b>Street</b> <input type=\"text\" id=\"property-street\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[street]\" value=\"<?php echo $street ?>\" / > </p>\n <p><b>City</b> <input type=\"text\" id=\"property-city\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[city]\" value=\"<?php echo $city ?>\" / > </p>\n <p><b>State</b> <input type=\"text\" id=\"property-state\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[state]\" value=\"<?php echo $state ?>\" / > </p>\n <p><b>Zip</b> <input type=\"text\" id=\"property-zip\" class=\"widefat\" name=\"<?php echo $field['name'] ?>[zip]\" value=\"<?php echo $zip ?>\" / > </p>\n <table>\n <tr>\n <td><b>Google Address:</b></td>\n <td><span id=\"google-address\"><?php echo $google_address ?></span></td>\n </tr>\n <tr>\n <td><b>Latitude:</b></td>\n <td><span id=\"lat\"><?php echo $lat ?></span></td>\n </tr>\n <tr>\n <td><b>Longitude:</b></td>\n <td><span id=\"lng\"><?php echo $lng ?></span></td>\n </tr>\n </table>\n <input class=\"required address\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[address]\" value=\"<?php echo $address ?>\" />\n <input class=\"required google-address\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[google_address]\" value=\"<?php echo $google_address ?>\" />\n <input class=\"required\" id=\"acf-property-lat\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[lat]\" value=\"<?php echo $lat ?>\" />\n <input class=\"required\" id=\"acf-property-lng\" type=\"hidden\" name=\"<?php echo $field['name'] ?>[lng]\" value=\"<?php echo $lng ?>\" />\n <input class=\"required\" id=\"property-lat\" type=\"hidden\" name=\"_address_lat\" value=\"<?php echo $lat ?>\" />\n <input class=\"required\" id=\"property-lng\" type=\"hidden\" name=\"_address_lng\" value=\"<?php echo $lng ?>\" />\n </fieldset>\n\n </div>\n\n <div class=\"clear\"> </div>\n\n <?php\n \n \t}", "title": "" }, { "docid": "f0112a54e1104b0081db994cefd0f9cc", "score": "0.5644868", "text": "function _field($field, $custom_options = array()) \n {\n $required = '';\n if ($field['required'] == 1) {\n $required = 'required';\n }\n $options = array();\n $out = '';\n if (!empty($field['type'])) {\n $class = '';\n if (empty($this->request->data['UserProfile']['address']) and empty($this->request->data['Project']['address'])) {\n $class = 'hide';\n }\n if (!empty($field['name'])) {\n if ($field['name'] == 'Project.name') {\n $options['class'] = \"js-preview-keyup js-no-pjax {'display':'js-name'}\";\n }\n if ($field['name'] == 'Project.needed_amount') {\n $options['info'] = sprintf(__l('Minimum Amount: %s%s <br/> Maximum Amount: %s') , Configure::read('site.currency') , $this->Html->cCurrency(Configure::read('Project.minimum_amount')) , Configure::read('site.currency') . $this->Html->cCurrency(Configure::read('Project.maximum_amount')));\n }\n if ($field['name'] == 'Pledge.is_allow_over_funding') {\n if ($_SESSION['Auth']['User']['role_id'] != ConstUserTypes::Admin && !Configure::read('Project.is_allow_user_to_set_overfunding')) {\n return;\n }\n }\n if ($field['name'] == 'Project.project_end_date') {\n $options['info'] = sprintf(__l('Ending date should be within %s days from today.') , Configure::read('maximum_project_expiry_day'));\n }\n if ($field['name'] == 'Project.country_id' || $field['name'] == 'State.name') {\n $options['class'] = 'location-input';\n }\n if ($field['name'] == 'Project.address') {\n $out.= '<div class=\"profile-block clearfix\"><div class=\"mapblock-info mapblock-info1\"><div class=\"clearfix address-input-block required col-md-9 no-pad\">';\n $options['class'] = 'js-preview-address-change';\n $options['id'] = 'ProjectAddressSearch';\n }\n if ($field['name'] == 'Pledge.min_amount_to_fund' || $field['name'] == 'Donate.min_amount_to_fund') {\n $out.= '<div class=\"js-min-amount hide\">';\n $options['class'] = 'js-min-amount-needed';\n }\n if ($field['name'] == 'Pledge.pledge_type_id' || $field['name'] == 'Donate.pledge_type_id') {\n $options['class'] = 'js-pledge-type';\n }\n if ($field['name'] == 'Attachment.filename') {\n if (!empty($this->request->data['Attachment']) && !empty($this->request->data['Project']['name'])) {\n $options['class'] = 'browse-field js-remove-error';\n $options['info'] = __l('Maximum allowed size ') . Configure::read('Project.image.allowedSize') . Configure::read('Project.image.allowedSizeUnits');\n $options['size'] = 33;\n $out.= '<div class=\"upload-image navbar-btn\">';\n $out.= $this->Html->showImage('Project', $this->request->data['Attachment'], array(\n 'dimension' => 'big_thumb',\n 'alt' => sprintf('[Image: %s]', $this->Html->cText($this->request->data['Project']['name'], false)) ,\n 'title' => $this->Html->cText($this->request->data['Project']['name'], false)\n ));\n $out.= '</div>';\n }\n $options['class'] = (!empty($options['class'])) ? $options['class'] : '';\n $options['class'].= \" {'UmimeType':'jpg,jpeg,png,gif', 'Uallowedsize':'5','UallowedMaxFiles':'1'}\";\n }\n if ($field['name'] == 'Project.address1') {\n $out.= '<div id=\"js-geo-fail-address-fill-block\" class=\"' . $class . '\"><div class=\"clearfix\"><div class=\"map-address-left-block address-input-block\">';\n $options['class'] = 'js-preview-address-change';\n $options['id'] = 'js-street_id';\n $out.= '</div>';\n }\n if ($field['name'] == 'Project.description') {\n $options['class'] = 'js-editor col-md-8 descblock {\"is_html\":\"false\"}';\n $options['rows'] = false;\n $options['cols'] = false;\n }\n if ($field['name'] == 'Pledge.is_allow_over_funding' || $field['name'] == 'Donate.is_allow_over_funding') {\n $options['before'] = '<div>';\n $options['after'] = '</div>';\n }\n if ($field['name'] == 'Project.country_id') {\n $options['id'] = 'js-country_id';\n }\n if (!empty($field['class'])) {\n $options['class'] = $field['class'];\n }\n if ($field['name'] == 'Project.feed_url') {\n $options['class'] = 'js-remove-error';\n }\n }\n switch ($field['type']) {\n case 'fieldset':\n if ($this->openFieldset == true) {\n $out.= '</fieldset>';\n }\n $out.= '<fieldset>';\n $this->openFieldset = true;\n if (!empty($field['name'])) {\n $out.= '<legend>' . Inflector::humanize($field['label']) . '</legend>';\n $out.= $this->Form->hidden('fs_' . $field['name'], array(\n 'value' => $field['name']\n ));\n }\n break;\n\n case 'textonly':\n $out = $this->Html->para('textonly', __l($field['label']));\n break;\n\n default:\n $options['type'] = $field['type'];\n $options['info'] = $field['info'];\n if (in_array($field['type'], array(\n 'select',\n 'checkbox',\n 'radio'\n ))) {\n if (!empty($field['options']) && !is_array($field['options'])) {\n $field['options'] = str_replace(', ', ',', $field['options']);\n $field['options'] = $this->explode_escaped(',', $field['options']);\n }\n if ($field['type'] == 'checkbox') {\n if (count($field['options']) > 1) {\n $options['type'] = 'select';\n $options['multiple'] = 'checkbox';\n $options['options'] = $field['options'];\n } else {\n\t\t\t\t\t\t\t\tif($field['name'] == 'Pledge.is_allow_over_funding' && isset($this->request->data['Pledge']) && $this->request->data['Pledge']['is_allow_over_funding'] == 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->request->data['Pledge']['is_allow_over_funding'] = $field['name'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($field['name'] == 'Donate.is_allow_over_donating' && isset($this->request->data['Pledge']) && $this->request->data['Donate']['is_allow_over_donating'] == 1)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->request->data['Donate']['is_allow_over_donating'] = $field['name'];\n\t\t\t\t\t\t\t\t}\n $options['value'] = $field['name'];\n }\n } else {\n $options['options'] = $field['options'];\n }\n if ($field['type'] == 'select' && !empty($field['multiple']) && $field['multiple'] == 'multiple') {\n $options['multiple'] = 'multiple';\n } elseif ($field['type'] == 'select') {\n $options['empty'] = __l('Please Select');\n }\n }\n if (!empty($field['depends_on']) && !empty($field['depends_value'])) {\n $options['class'] = 'dependent';\n $options['dependsOn'] = $field['depends_on'];\n $options['dependsValue'] = $field['depends_value'];\n }\n $options['info'] = str_replace(\"##MULTIPLE_AMOUNT##\", Configure::read('equity.amount_per_share') , $options['info']);\n $options['info'] = str_replace(\"##SITE_CURRENCY##\", Configure::read('site.currency') , $options['info']);\n $field['label'] = str_replace(\"##SITE_CURRENCY##\", Configure::read('site.currency') , $field['label']);\n if (!empty($field['label'])) {\n $options['label'] = __l($field['label']);\n if ($field['type'] == 'radio') {\n $options['legend'] = __l($field['label']);\n }\n }\n if ($field['type'] == 'file') {\n if ($field['name'] != 'Attachment.filename') {\n\t\t\t\t\t\t\t\t$options['class'] = 'upload';\n $options['class'] = (!empty($options['class'])) ? $options['class'] : '';\n $options['class'].= \" {'UmimeType':'*', 'Uallowedsize':'5','UallowedMaxFiles':'1'}\";\n }\n }\n if ($field['type'] == 'radio') {\n $options['div'] = true;\n $options['legend'] = false;\n $options['multiple'] = 'radio';\n }\n if ($field['type'] == 'slider') {\n for ($num = 1; $num <= 100; $num++) {\n $num_array[$num] = $num;\n }\n $options['div'] = 'input select slider-input-select-block clearfix' . ' ' . $required;\n $options['options'] = $num_array;\n $options['type'] = 'select';\n $options['class'] = 'js-uislider';\n $options['label'] = false;\n $i = 0;\n if (!empty($field['options'])) {\n foreach($field['options'] as $value) {\n if ($i == 0) {\n $options['before'] = '<div class=\"clearfix\"><span class=\"grid_left uislider-inner\">' . $value . '</span>';\n } else {\n $options['after'] = '<span class=\"grid_left uislider-right\">' . $value . '</span></div>';\n }\n $i++;\n }\n }\n $out.= $this->Html->div('label-block slider-label ' . $required, $field['label']);\n }\n if ($field['type'] == 'date') {\n $options['div'] = $required;\n $options['orderYear'] = 'asc';\n $options['minYear'] = date('Y') -10;\n $options['maxYear'] = date('Y') +10;\n }\n if ($field['type'] == 'datetime') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input text ' . ' ' . $required;\n $options['orderYear'] = 'asc';\n $options['minYear'] = date('Y') -10;\n $options['maxYear'] = date('Y') +10;\n }\n if ($field['type'] == 'time') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input text js-time' . ' ' . $required;\n $options['orderYear'] = 'asc';\n $options['timeFormat'] = 12;\n $options['type'] = 'time';\n }\n if ($field['type'] == 'color') {\n $options['div'] = 'input text clearfix' . ' ' . $required;\n $options['class'] = 'js-colorpick';\n if (!empty($field['info'])) {\n $info = $field['info'] . ' <br>Comma separated RGB hex code. You can use color picker.';\n } else {\n $info = 'Comma separated RGB hex code. You can use color picker.';\n }\n $options['info'] = __l($info);\n $options['type'] = 'text';\n }\n if ($field['type'] == 'thumbnail') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input text' . ' ' . $required;\n }\n if (!empty($field['default']) && empty($this->data['Form'][$field['name']])) {\n $options['value'] = $field['default'];\n }\n if ($field['type'] == 'text') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input text' . ' ' . $required;\n }\n if ($field['type'] == 'textarea') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input textarea' . ' ' . $required;\n }\n if ($field['type'] == 'select') {\n $options['div'] = 'clearfix';\n $options['div'] = 'input select' . ' ' . $required;\n if (!empty($field['multiple']) && $field['multiple'] == 'multiple') {\n $options['div'].= ' multi-select';\n }\n }\n $options = Set::merge($custom_options, $options);\n if ($field['type'] == 'date' || $field['type'] == 'datetime' || $field['type'] == 'time') {\n if ($field['name'] == 'Project.project_end_date') {\n $date_display = date('Y-m-d', strtotime('+' . Configure::read('maximum_project_expiry_day') . ' days'));\n } else {\n $date_display = date('Y-m-d');\n }\n if ($field['type'] == 'datetime') {\n $out.= '<div class=\"input js-datetimepicker clearfix ' . $required . '\"><div class=\"js-cake-date\">';\n } else {\n $out.= '<div class=\"input js-datetime clearfix ' . $required . '\"><div class=\"js-cake-date\">';\n }\n }\n if ($field['type'] == 'radio') {\n $out.= '<div class=\"input select radio-block clearfix\">';\n $out.= '<label class=\"label-block pull-left ' . $required . '\" for=\"' . $field['name'] . '\">' . __l($field['label']) . '</label>';\n }\n if ($field['name'] == 'Project.short_description') {\n $options['class'] = 'js-preview-keyup js-no-pjax js-description-count {\"display\":\"js-short-description\",\"field\":\"js-short-description-count\",\"count\":\"' . Configure::read('Project.project_short_description_length') . '\"}';\n $options['info'] = __l($field['info']) . ' ' . '<span class=\"character-info\">' . __l('You have') . ' ' . '<span id=\"js-short-description-count\"></span>' . ' ' . __l('characters left') . '</span>';\n }\n if (!empty($field['name']) && $field['name'] == 'Project.description') {\n $options['label'] = false;\n $options['info'] = false;\n $out.= '<div>';\n $out.= '<label class=\"control-label pull-left\" for=\"ProjectDescription\">' . __l('Description') . '</label>';\n $out.= '<div class=\"help\">';\n }\n if (!empty($field['name']) && $field['name'] == 'Project.needed_amount') {\n $options['label'] = __l('Needed amount') . ' (' . Configure::read('site.currency') . ')';\n }\n $out.= $this->Form->input($field['name'], $options);\n if (!empty($field['name']) && $field['name'] == 'Project.description') {\n $out.= '</div>';\n $out.= '<span class=\"info hor-space\"><i class=\"fa fa-info-circle\"></i> ' . __l('Entered description will display in view page') . '</span>';\n $out.= '</div>';\n }\n if ($field['type'] == 'date' || $field['type'] == 'datetime' || $field['type'] == 'time') {\n $out.= '</div></div>';\n }\n if ($field['type'] == 'radio') {\n $out.= '</div>';\n }\n if (!empty($field['name']) && $field['name'] == 'City.name') {\n $out.= '</div></div></div><div class=\"pull-left js-side-map-div col-md-3 ' . $class . '\"><h5>' . __l('Point Your Location') . '</h5><div class=\"js-side-map\"><div id=\"js-map-container\"></div><span>' . __l('Point the exact location in map by dragging marker') . '</span></div></div><div id=\"mapblock\"><div id=\"mapframe\"><div id=\"mapwindow\"></div></div></div></div></div>';\n }\n if (!empty($field['name']) && $field['name'] == 'Pledge.min_amount_to_fund' || $field['name'] == 'Donate.min_amount_to_fund') {\n $out.= '</div>';\n }\n break;\n }\n }\n return $out;\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56392056", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56392056", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "889c2f3224dec1e9de755f494b696bb3", "score": "0.56392056", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "789ff92e0ffb64ae802a5ea71dc48bd0", "score": "0.56380236", "text": "public function create()\n {\n return view('admin.field.create_and_edit');\n }", "title": "" }, { "docid": "3f872e77189bb594ad64a18a8914ed6b", "score": "0.56357664", "text": "public function onGenerateFormField($field){\n\t\treturn;\n\t}", "title": "" }, { "docid": "51dbb3641cad2bccac4c14589ffbfd78", "score": "0.56246513", "text": "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "title": "" }, { "docid": "420ff1b99d8924dcb5e3604d1a1a3207", "score": "0.56214833", "text": "public function _callback_add_field_Qty(){ // ->get(); \n return \"<input type='text' value='12' name='Qty'>\";\n /* foreach ($query->result() as $rown){\n \n */ // } \n \n }", "title": "" }, { "docid": "0796426f0a23b59e43f0b1c091ff2ecc", "score": "0.5608901", "text": "abstract public function createForm();", "title": "" }, { "docid": "3ffb657a44b7c37370dc8f478303aa90", "score": "0.5606462", "text": "function create_input_field( $args ) {\n\tif( count($args) > 4 ) {\n\t\techo '<input id=\"' . $args[0] . '\" name=\"'. $args[1] .'\" type=\"'. $args[2] .'\" value=\"'. $args[3] .'\" \n\t\t\tplaceholder=\"'. $args[4] .'\" class=\"' . $args[5] . '\" />';\n\t\treturn;\n\t}\n\n\techo '<input name=\"'. $args[0] .'\" type=\"'. $args[1] .'\" value=\"'. $args[2] .'\" \n\t\t\tplaceholder=\"'. $args[3] .'\" />';\n}", "title": "" }, { "docid": "eec579c911fbdbbaf08392d0045f3684", "score": "0.5605946", "text": "public function create()\n {\n //$custom_fields = Customfield::with('typeName')->with('fieldValues')->get();\n $custom_fields = Customfield::with(array('fieldValues'=>function($query){\n $query->select('value','field');\n }))\n ->with('typeName')\n ->get();\n\n //dd($custom_fields);\n \n return view('common::backend.sectioncustomfield.create' , compact('custom_fields'));\n }", "title": "" }, { "docid": "e153d337f2ca213c096a42d12b23dae8", "score": "0.5591998", "text": "public function form() {\r\n $field_id = isset( $_GET['field_id'] ) ? sanitize_text_field( $_GET['field_id'] ) : '';\r\n $cmb = new_cmb2_box( array(\r\n 'id' => self::FORM_ID, \r\n 'object_types' => array( 'post' ), \r\n 'hookup' => false,\r\n 'save_fields' => false, \r\n 'classes' => array( !empty( $field_id ) ? 'wpf-edit-form' : 'wpf-add-form' ), \r\n ) ); \r\n if ( !empty( $field_id ) ) {\r\n $cmb->add_field( array( \r\n 'id' => 'field_id', \r\n 'type' => 'hidden',\r\n 'default' => esc_attr( $field_id ), \r\n ) ); \r\n }\r\n $cmb->add_field( array(\r\n 'name' => 'Title', \r\n 'id' => 'title', \r\n 'type' => 'text', \r\n 'attributes' => array(\r\n 'autocomplete' => 'off',\r\n 'required' => 'required',\r\n 'pattern' => '.{3,}',\r\n 'title' => \"Start with a letter\",\r\n 'data-form-type' => !empty( $field_id ) ? 'edit' : 'add', \r\n ),\r\n ) );\r\n $cmb->add_field( array(\r\n 'name' => 'Name', \r\n 'id' => 'name', \r\n 'type' => 'text', \r\n 'after' => wc_help_tip( __( 'Must be unique.', 'wpf' ) ),\r\n 'attributes' => array( \r\n 'autocomplete' => 'off', \r\n 'pattern' => '[a-z][a-z0-9_]{3,}',\r\n 'title' => \"Start with a letter\", \r\n ),\r\n ) ); \r\n $cmb->add_field( array(\r\n 'name' => 'Required', \r\n 'id' => 'required',\r\n 'type' => 'checkbox',\r\n 'after' => wc_help_tip( __( 'After clicking on Add to cart button, the customers will see validation message untill this field is empty or no option is selected', 'wpf' ) ),\r\n 'default' => 0, \r\n ) );\r\n $cmb->add_field( array(\r\n 'name' => 'Active by default', \r\n 'id' => 'active_by_default',\r\n 'type' => 'checkbox',\r\n 'after' => wc_help_tip( __( 'Indicates weither the field should be shown for all products by default (new or existing ones). You can switch the field visibility per product inside <em>Front fields</em> section on the Product form', 'wpf' ), true ),\r\n 'default' => 0, \r\n ) );\r\n $widget_locked = false;\r\n if ( !empty( $field_id ) ) {\r\n $field = new WPF_Field( $field_id );\r\n $widget = $field->get_widget();\r\n global $wpf_widgets;\r\n $widget_locked = isset( $wpf_widgets[$widget]['libs'] ) && \r\n !empty( $wpf_widgets[$widget]['libs'] );\r\n } \r\n $cmb->add_field( array(\r\n 'name' => 'Type', \r\n 'id' => 'widget',\r\n 'type' => 'select',\r\n 'options' => wpf_get_widget_names(),\r\n 'after' => wc_help_tip( __( 'There are two groups of widgets: 1) Single option (Text, Checkbox) 2) Multi options (Select, Radio, Checkboxes). Per <em>Single option</em> type you set up a price field, per <em>Multi options</em> type you setup an options table where you add a variable amount of the options.', 'wpf' ), true ),\r\n 'default' => 'text',\r\n 'attributes' => array( \r\n 'data-locked' => $widget_locked,\r\n ),\r\n ) );\r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Options extra', \r\n 'id' => 'options_extra',\r\n 'type' => 'select',\r\n 'options' => array(\r\n '' => __( '---- None ----', 'wpf' ),\r\n 'image' => __( 'Image', 'wpf' ),\r\n // @TODO \r\n //'color' => __t( 'Color', 'wpf' ),\r\n ),\r\n //'after' => wc_help_tip( __( '', 'wpf' ), true ),\r\n 'default' => '',\r\n 'attributes' => array( \r\n 'data-locked' => $widget_locked,\r\n ),\r\n ) ); \r\n $cmb->add_field( array(\r\n 'name' => 'Chargeable', \r\n 'id' => 'chargeable',\r\n 'type' => 'checkbox',\r\n 'after' => wc_help_tip( __( 'Allows to setup a price to the field or its options to take part in the product price calculations', 'wpf' ) ),\r\n 'default' => 0, \r\n ) ); \r\n $cmb->add_field( array(\r\n 'name' => 'Charge type', \r\n 'id' => 'charge_type',\r\n 'type' => 'select',\r\n 'options' => array(), // the options will be loaded through ajax\r\n 'after' => wc_help_tip( __( 'The way by which the chare will interact with the field value', 'wpf' ), true ),\r\n 'default' => 'text',\r\n ) ); \r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Charge',\r\n 'id' => 'charge',\r\n 'type' => 'text',\r\n 'default' => '0.00',\r\n 'after' => wc_help_tip( __( 'Format ( 12.00, 9.50 ). This charge will be added to the product price after the customer fills up the field. Leave 0 or empty if no charge is needed for the field', 'wpf' ), true ), \r\n 'attributes' => array( \r\n 'autocomplete' => 'off',\r\n 'required' => 'required',\r\n 'pattern' => wpf_get_price_pattern(),\r\n ) )\r\n ); \r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Unit', \r\n 'id' => 'unit',\r\n 'type' => 'select',\r\n 'options' => array( '' => '---- None ----' ) + wpf_get_units(),\r\n 'default' => '',\r\n ) );\r\n\r\n if ( !empty( $field_id ) ) {\r\n $cmb->add_field( array(\r\n 'name' => 'Default', \r\n 'id' => 'field_default_text',\r\n 'type' => 'text', \r\n 'attributes' => array(\r\n 'autocomplete' => 'off', \r\n )\r\n ) );\r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Default',\r\n 'id' => 'field_default_checkbox',\r\n 'type' => 'radio',\r\n 'options' => array(\r\n 0 => __( 'Unchecked', 'wpf' ),\r\n 1 => __( 'Checked', 'wpf' ),\r\n ), \r\n 'default' => 0, \r\n ) );\r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Default',\r\n 'id' => 'field_default_option_single',\r\n 'type' => 'select',\r\n 'after' => wc_help_tip( __( 'Set up the default value for the field. The extra charge will be added per product price. <em>Notice:</em> If you\\'ve added / changed / removed some options then you\\'ll see the proper list of options only after Save button click ', 'wpf' ), true ), \r\n 'default' => '', \r\n 'options' => array() \r\n ) );\r\n\r\n $cmb->add_field( array(\r\n 'name' => 'Default',\r\n 'id' => 'field_default_option_multiple',\r\n 'type' => 'multicheck',\r\n 'after' => wc_help_tip( __( 'Set up the default value for the field. The extra charge will be added per product price. <em>Notice:</em> If you\\'ve added / changed / removed some options then you\\'ll see the proper list of options only after Save button click ', 'wpf' ), true ), \r\n 'default' => '0',\r\n 'options' => wpf_get_field_options( $field_id )\r\n ) );\r\n } \r\n $options_group = $cmb->add_field( array(\r\n 'id' => 'field_options_group',\r\n 'type' => 'group', \r\n 'name' => __( 'Options', 'wpf' ),\r\n 'options' => array(\r\n 'group_title' => __( '{#}', 'wpf' ),\r\n 'add_button' => __( 'Add new option', 'wpf' ),\r\n 'remove_button' => __( 'X', 'wpf' ),\r\n 'sortable' => true,\r\n ),\r\n ) ); \r\n $cmb->add_group_field( $options_group, array( \r\n 'id' => 'field_option_id',\r\n 'type' => 'text', \r\n 'attributes' => array(\r\n 'class' => 'field-option-id' \r\n ),\r\n ) ); \r\n $cmb->add_group_field( $options_group, array(\r\n 'name' => 'Image', \r\n 'id' => 'field_option_image',\r\n 'type' => 'file',\r\n // Optional:\r\n 'options' => array(\r\n 'url' => false, // Hide the text input for the url\r\n ),\r\n 'text' => array(\r\n 'add_upload_file_text' => 'Add Image' // Change upload button text. Default: \"Add or Upload File\"\r\n ),\r\n // query_args are passed to wp.media's library query.\r\n 'query_args' => array(\r\n //'type' => 'application/pdf', // Make library only display PDFs.\r\n // Or only allow gif, jpg, or png images\r\n 'type' => array(\r\n // 'image/gif',\r\n 'image/jpeg',\r\n 'image/png',\r\n ),\r\n ),\r\n 'preview_size' => array( 50, 50 ), // Image size to use when previewing in the admin.\r\n ) ); \r\n $cmb->add_group_field( $options_group, array(\r\n 'name' => 'Title',\r\n 'id' => 'field_option_title',\r\n 'type' => 'text', \r\n 'attributes' => array( \r\n 'required' => 'required', \r\n 'data-hidden-pattern' => '.{1,}',\r\n ) \r\n ) ); \r\n $cmb->add_group_field( $options_group, array(\r\n 'name' => 'Charge',\r\n 'id' => 'field_option_price',\r\n 'type' => 'text',\r\n 'default' => 0, \r\n 'attributes' => array(\r\n //'required' => 'required',\r\n 'data-hidden-pattern' => wpf_get_price_pattern(), \r\n )\r\n ) ); \r\n\r\n /* @TODO - Field dependency feature \r\n $cmb->add_field( array(\r\n 'name' => 'Add dependency', \r\n 'id' => 'add_dependency',\r\n 'type' => 'checkbox',\r\n 'after' => wc_help_tip( __( 'Specifies if this field should be shown when another field has specific value', 'wpf' ) ),\r\n 'default' => 0, \r\n ) );\r\n \r\n $dependency_group = $cmb->add_field( array(\r\n 'id' => 'field_dependency_group',\r\n 'type' => 'group', \r\n 'name' => __( 'Dependency field', 'wpf' ), \r\n ) );\r\n\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Default visibility', \r\n 'id' => 'dependency_default_visibility',\r\n 'type' => 'radio',\r\n 'options' => array(\r\n 0 => 'Hide',\r\n 1 => 'Show'\r\n ),\r\n //'after' => wc_help_tip( __( 'Specifies if this field should be shown when another field has specific value', 'wpf' ) ),\r\n 'default' => 0, \r\n ) ); \r\n $titles = array_column( wpf_get_fields(), 'title', 'name' );\r\n $field_id = isset( $_GET['field_id'] ) ? sanitize_text_field( $_GET['field_id'] ) : '';\r\n // if edit form - exclude current field from the dependency list\r\n if ( !empty( $field_id ) ) {\r\n $field = new WPF_Field( $field_id );\r\n $name = $field->get_name();\r\n unset( $titles[$name] );\r\n }\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Field', \r\n 'id' => 'dependency_field',\r\n 'type' => 'select',\r\n 'options' => array( '' => '-- Select field --' ) + $titles,\r\n //'after' => wc_help_tip( __( 'Specifies if this field should be shown when another field has specific value', 'wpf' ) ),\r\n 'default' => '', \r\n ) ); \r\n\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Operation', \r\n 'id' => 'dependency_operation',\r\n 'type' => 'select',\r\n 'options' => array( 'equal' => 'Equal', 'not_equal' => 'Not equal', 'gt' => 'Greater than', 'lt' => 'Lower than' ),\r\n //'after' => wc_help_tip( __( 'Specifies if this field should be shown when another field has specific value', 'wpf' ) ),\r\n 'default' => 'equal',\r\n ) );\r\n\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Value', \r\n 'id' => 'dependency_value_text',\r\n 'type' => 'text', \r\n 'default' => '', \r\n ) );\r\n\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Value', \r\n 'id' => 'dependency_value_checkbox',\r\n 'type' => 'checkbox', \r\n 'default' => 1,\r\n ) );\r\n\r\n $cmb->add_group_field( $dependency_group, array(\r\n 'name' => 'Value', \r\n 'id' => 'dependency_value_radio',\r\n 'type' => 'select',\r\n 'options' => array(), \r\n 'default' => '', \r\n ) ); \r\n */ \r\n }", "title": "" }, { "docid": "262f9e5b86f020046579be4b96a9e162", "score": "0.5588719", "text": "public function AddField() {\n\t\tglobal $db, $view, $site;\n\t\tif(!isset($_POST['fbname'])) {\n\t\t\t$view->AppendSiteTitle(\"Dodaj pole\");\n\t\t\t$view->set(\"header\", \"Dodaj Pole\");\n\t\t\t$content = \"\";\n\t\t\t\n\t\t\t$ftypesarr = $this->getFieldsTypeBtName();\n\t\t\tforeach($ftypesarr as $field) {\n\t\t\t\tif(!$field['name'])\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$selected = ($field['name'] == $row['type']) ? \"selected\" : \"\";\n\t\t\t\t$row['fieldtypes'] .= \"<option value='\".$field['name'].\"' \".$selected.\">\".$field['btname'].\"</option>\";\n\t\t\t}\n\t\t\t\n\t\t\t$content .= $view->getTemplate('dfields-add-form', $row);\n\t\t\t$view->set(\"content\", $content);\n\t\t\t$view->render();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$name = $_POST['fbname'];\n\t\t\n\t\t$stname = strtolower($name);\n\t\t$stname = rtrim($stname, ' ');\n\t\t$stname = ltrim($stname, ' ');\n\t\t$stname = iconv('utf-8', 'ascii//TRANSLIT', $stname);\n\t\t$stname = preg_replace('/[^A-Za-z0-9\\-]/', '', $stname);\n\t\t\n\t\t$query = $db->MakeQuery(\"SELECT COUNT(*) AS num FROM fields_def WHERE name='\".$stname.\"' OR beautyname='\".$name.\"';\");\n\t\t$r = $db->FetchRes($query);\n\t\tif($r['num'] > 0) {\n\t\t\t$_SESSION['notie'] = \"W bazie danych jest już pole o takiej nazwie!\";\n\t\t\t$_SESSION['notietype'] = 3;\n\t\t\theader(\"Location:\".$site->siteurl.\"data/addfield\");\n\t\t\t\n\t\t\treturn;\n\t\t} \n\t\t\n\t\t$query = $db->MakeQuery(\"INSERT INTO fields_def (name, beautyname, type) VALUES ('\".$stname.\"', '\".$name.\"', '\".$_POST['fieldtype'].\"');\");\n\t\t\n\t\t//EDYTUJ GLOWNA BAZE - BARDZO WAŻNE!!! ALTER TABLE pathfinders\n\t\t\n\t\tif($query) {\n\t\t\t$_SESSION['notie'] = \"Pomyślnie dodano nowe pole do bazy danych! Teraz możesz je edytować.\";\n\t\t\t$_SESSION['notietype'] = 1;\n\t\t\theader(\"Location:\".$site->siteurl.\"data/fields/\".$db->LastId());\n\t\t}\n\t}", "title": "" }, { "docid": "5d4a34fd22b73ae5acbdd99e1d3a19a3", "score": "0.5584315", "text": "public static function setupCustomFields();", "title": "" }, { "docid": "cdf0e777269fa9728a32428cb7c0aa24", "score": "0.5581929", "text": "public function CreateFieldDefinition($returnDDL = false, $oField = null)\n {\n return '';\n }", "title": "" }, { "docid": "ebaf6e7a6c2d6eb72e5f075b38b3e02f", "score": "0.55805176", "text": "function createCustomFields() {\n foreach ( $this->postTypes as $postType )\n add_meta_box( $this->id, $this->name, [&$this, 'displayCustomFields'], $postType, 'normal', 'high' );\n }", "title": "" }, { "docid": "d3be48b02edf5aa0cedb61b463d42a39", "score": "0.5578387", "text": "function _build($fieldName, $tinyoptions = array()) {\n\t\tif (!$this->_script) {\n\t\t\t// We don't want to add this every time, it's only needed once\n\t\t\t$this->_script = true;\n\t\t\t$this->Javascript->link('/js/tiny_mce/tiny_mce.js', false);\n\t\t}\n\t\t// Ties the options to the field\n\t\t$tinyoptions['mode'] = 'exact';\n\t\t$tinyoptions['elements'] = $this->__name($fieldName);\n\t\treturn $this->Javascript->codeBlock('tinyMCE.init(' . $this->Javascript->object($tinyoptions) . ');');\n\t}", "title": "" }, { "docid": "53f4c1d2c246667d27f74057ca246f38", "score": "0.5575432", "text": "function create_options($key, $field)\n {\n\n }", "title": "" }, { "docid": "5498303f72d70064eed942026dcf7a1e", "score": "0.55704886", "text": "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "title": "" }, { "docid": "5498303f72d70064eed942026dcf7a1e", "score": "0.55704886", "text": "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "title": "" }, { "docid": "aa63e5ed729d63f986db83abc79ea4cc", "score": "0.5565633", "text": "protected function newField($name=null, $data=null) {\r\n\t\tif($name !== null && isset($this[$name]))\r\n\t\t\treturn;\r\n\t\t$cb = $this->cb;\r\n\t\t$newelement = $cb($data);\r\n\t\tif(!$newelement)\r\n\t\t\treturn;\r\n\t\t$this->add($newelement, $name);\r\n\t\treturn $newelement;\r\n\t}", "title": "" }, { "docid": "056bd32f2e9a210ec42dc250961c080e", "score": "0.556537", "text": "function init_form_fields() {\n\n $this->form_fields = array(\n 'title' => array(\n 'title' => __('Title', 'woothemes'),\n 'type' => 'text',\n 'description' => __('This controls the title which the user sees during checkout.', 'woothemes'),\n 'default' => __('MyGate', 'woothemes')\n ),\n 'enabled' => array(\n 'title' => __('Enable/Disable', 'woothemes'),\n 'label' => __('Enable MyGate', 'woothemes'),\n 'type' => 'checkbox',\n 'description' => '',\n 'default' => 'yes'\n ),\n 'description' => array(\n 'title' => __('Description', 'woothemes'),\n 'type' => 'text',\n 'description' => __('This controls the description which the user sees during checkout.', 'woothemes'),\n 'default' => 'Pay via MyGate - pay by Visa or Mastercard.'\n ),\n 'merchant_ident' => array(\n 'title' => __('Merchant ID', 'woothemes'),\n 'type' => 'text',\n 'description' => __('Please enter your MyGate Merchant ID - this is needed in order to take payment!', 'woothemes'),\n 'default' => ''\n ),\n 'private_key' => array(\n 'title' => __('Application ID', 'woothemes'),\n 'type' => 'text',\n 'description' => __('Please enter your MyGate Application ID - this is needed in order to take payment!', 'woothemes'),\n 'default' => ''\n ),\n 'cancel_url' => array(\n 'title' => __('Cancel URL', 'woothemes'),\n 'type' => 'text',\n 'description' => __('NB! Rather leave this blank, only use this if you want to create a page with a special error message.', 'woothemes'),\n 'default' => ''\n )\n );\n }", "title": "" }, { "docid": "9a43249c904fddaf2a4f7d727be95c05", "score": "0.55533767", "text": "function wds_bb_custom_field_hook() {\n\tif ( ! class_exists( 'FLBuilder' ) ) {\n\t\treturn;\n\t}\n\n\t$plugin = wds_bb_custom_field_plugin();\n\t$plugin->register_hooks();\n}", "title": "" }, { "docid": "5343286a34d6c30b089fbbabdc87c76b", "score": "0.5551882", "text": "public function actionCreateAjax($fid, $dataField)\n {\n $this->setUpLayout('form');\n\n $this->model = new ProjectsMeasure();\n\n if (\\Yii::$app->request->isAjax && $this->model->load(Yii::$app->request->post()) && $this->model->validate()) {\n if ($this->model->save()) {\n //Yii::$app->getSession()->addFlash('success', Module::t('amoscore', 'Elemento creato correttamente.'));\n return json_encode($this->model->toArray());\n } else {\n //Yii::$app->getSession()->addFlash('danger', Module::t('amoscore', 'Elemento non creato, verificare i dati inseriti.'));\n }\n }\n\n return $this->renderAjax('_formAjax', [\n 'model' => $this->model,\n 'fid' => $fid,\n 'dataField' => $dataField\n ]);\n }", "title": "" }, { "docid": "bbff3159bd185ee0776915b77d3c14b5", "score": "0.5551633", "text": "function render_field($id, $label ,$fieldName, $fieldType = \"text\", $args = []){\n // Get the location data if it's already been entered\n $key_value = get_post_meta($id, $fieldName, true);\n\n // Output the field\n $output = \"<label style='font-size: 1.3em'>$label</label>\";\n switch ($fieldType) {\n\n case 'number' :\n $output .='<input type=\"number\" name=\"'. $fieldName. '\" value=\"' . $key_value . '\" class=\"form-control\">';\n break;\n\n case 'select' :\n $output .= '<br>';\n $output .= \"<Select name='\" .$fieldName. \"' class='form-control'>\";\n foreach($args as $arg){\n if($key_value == $arg){\n $output .='<option value=\"' . $arg . '\" class=\"form-control\" selected>'. ucfirst($arg) .'</option>';\n }\n $output .='<option value=\"' . $arg . '\" class=\"form-control\">'. ucfirst($arg) .'</option>';\n }\n $output .= \"</Select>\";\n break;\n\n case 'checkbox' :\n\n $output = '<div class=\" form-group form-check\">';\n $output .= '<input style=\"margin: 3px 0 0 -20px;\" id=\"'. $fieldName .'\" name=\"'. $fieldName .'\" class=\"form-check-input\" type=\"checkbox\" ' . ($key_value == 'on' ? 'checked' : '') .'>';\n $output .= \"<label for='\" . $fieldName . \"' class='form-check-label' style='font-size: 1.3em'>$label</label>\";\n $output .= '</div>';\n break;\n\n default:\n $extra_class = '';\n $styles = '';\n if(strpos($fieldName, 'color')){\n $extra_class = 'color-container';\n if(!empty($key_value)){\n $styles = \"background-color:\".$key_value.\"; color: white;\";\n }\n }\n\n $output .= '<input style=\"' . $styles . '\" type=\"text\" name=\"'. $fieldName. '\" value=\"' . $key_value . '\" class=\"form-control ' . $extra_class . '\">';\n break;\n \n }\n \n $output .= '<br>';\n echo $output;\n\n }", "title": "" }, { "docid": "1f04564b93350ae49ee3651c34df3813", "score": "0.5549647", "text": "public function add_fields() {\n\t\tglobal $wp_customize;\n\t\tforeach ( Kirki::$fields as $args ) {\n\n\t\t\t// Create the settings.\n\t\t\tnew Kirki_Settings( $args );\n\n\t\t\t// Check if we're on the customizer.\n\t\t\t// If we are, then we will create the controls, add the scripts needed for the customizer\n\t\t\t// and any other tweaks that this field may require.\n\t\t\tif ( $wp_customize ) {\n\n\t\t\t\t// Create the control.\n\t\t\t\tnew Kirki_Control( $args );\n\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f7d5d15700580744f023f61008f73f8f", "score": "0.5547813", "text": "public function add() \n { \n $data['delivery_method'] = $this->delivery_methods->add();\n $data['action'] = 'delivery_method/save';\n \n $this->template->js_add('\n $(document).ready(function(){\n // binds form submission and fields to the validation engine\n $(\"#form_delivery_method\").parsley();\n });','embed');\n \n $this->template->render('delivery_method/form',$data);\n\n }", "title": "" }, { "docid": "0403a696459822aed4c48fb4c49b7616", "score": "0.55444413", "text": "function before_validation_on_create() {}", "title": "" }, { "docid": "54ab6b45abb2bd1c90536f0a37cc9410", "score": "0.554178", "text": "public function create($fields = array(), \\Ice\\Validation $extra = null) {}", "title": "" }, { "docid": "d22c31051be37c19cfa16b9c3701a81f", "score": "0.55414104", "text": "public function create()\n {\n $this->resetFields();\n $this->created_id = request()->user()->id;\n //DAN MEMBUKA MODAL\n $this->openModal();\n }", "title": "" }, { "docid": "f2f148d77d760c38f198e247fd288a42", "score": "0.5535153", "text": "function field(array $data)\n{\n return new FilippoToso\\LaravelHelpers\\UI\\Field($data);\n}", "title": "" }, { "docid": "40ffdd0184427b2fe2b7102399d7860e", "score": "0.5525879", "text": "function createFields() {\n\tDB::exec(\"DROP TABLE IF EXISTS fields\");\n\t// create fields table\n\tDB::exec(\"CREATE TABLE fields (\n\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\tname VARCHAR(50) NOT NULL UNIQUE,\n\t\tcontent TEXT\n\t)\");\n\n\toutput(RESULT_INFO, \"Fields setup successfully completed\");\n\treturn 1;\n}", "title": "" }, { "docid": "13a2f146615b5d21d6aea6b36c3b7563", "score": "0.5522713", "text": "public function createEmptyField(){\n\t\treturn CrugeFactory::get()->getICrugeFieldCreate(CRUGEFIELDTYPE_TEXTBOX);\n\t}", "title": "" } ]
44fbd42728ad604d5f276c1b0f84ada0
Send an email reminder to the user.
[ { "docid": "72135c2f15a56276794e2e8bc0faa28b", "score": "0.7480454", "text": "public function sendEmailReminder(Request $request, $id=2)\n {\n $user = User::findOrFail($id);\n\n $this->notifier->send('Your Reminder!', 'email.welcome', $user);\n }", "title": "" } ]
[ { "docid": "08f20267b056bac2185cca61b3a5f726", "score": "0.73632306", "text": "public function sendEmailReminder(Request $request, $id)\n {\n $user = User::findOrFail($id);\n\n Mail::send('emails.mail', ['user' => $user], function ($m) use ($user) {\n $m->from('[email protected]');\n\n $m->to($user->email, $user->name)->subject('Enquiry Details');\n });\n }", "title": "" }, { "docid": "3f556c5d282430bbfbe7f987b47f6b64", "score": "0.72284794", "text": "function reminder() {\n $this->title = 'Send Email Reminder';\n $this->members = ORM::factory('finance_charge_member')->balances();\n \n if ($post = $this->input->post()) {\n $subject = Kohana::lang('finance_reminder.members.subject');\n if ($this->site->collections_enabled()) {\n $message = Kohana::lang('finance_reminder.members.message_finances');\n }\n else {\n $message = Kohana::lang('finance_reminder.members.message_basic');\n }\n \n foreach ($this->members as $member) {\n $replacements = array(\n '!name' => $member->name,\n '!due_amount' => money::display($member->balance),\n '!pay_link' => url::base(),\n );\n $email = array(\n 'subject' => strtr($subject, $replacements),\n 'message' => strtr($message, $replacements),\n );\n email::notify($member->email, 'finance_charge_reminder', $email, $email['subject']);\n }\n message::add(TRUE, 'An email reminder has been sent to all members who have an outstanding balance.');\n url::redirect('finances/members');\n }\n }", "title": "" }, { "docid": "ec9bbc3004d139abd9e0e2f92abc4437", "score": "0.7008202", "text": "public function sendImmediateEmail();", "title": "" }, { "docid": "362ceda63a0d7f042372dec5d4d8fbe2", "score": "0.6976126", "text": "public function doNotificate(){\n //build mail body\n $userData = array(\n 'project_name' => 'HackathonWildWest',\n 'pm_name' => 'Sorin',\n 'pm_surname' => 'Chircu',\n 'user_name' => 'WildWest1',\n 'missed_amount' => '2h', //can be in format \"2h 30m\"\n 'missed_date' => 'Monday 17 November' //eg: on Monday 17 November\n );\n //Mail::pretend();\n Mail::send('emails.user_notification', $userData, function($message)\n {\n $message->to('[email protected]', 'WildWest1')->subject('Missed hours on JIRA!');\n });\n return 'Notification successfully sent.';\n }", "title": "" }, { "docid": "8d78cb61f3d95abc8f174a674e50dc79", "score": "0.6802582", "text": "public static function sendReminder($user, $token, $callback) {\n \n }", "title": "" }, { "docid": "4281b72dff22486c05d87529bb93e14a", "score": "0.67710465", "text": "function sendEmailReminder($id)\n{\n return;\n\n $auto3dprintqueue = Auto3dprintqueue::findOrfail($id);\n $user = User::findOrFail($auto3dprintqueue->user->id);\n\n Mail::send('auto3dprintqueue.email', ['user' => $user, 'auto3dprintqueue' => $auto3dprintqueue], function ($m) use ($user, $auto3dprintqueue) {\n $m->from('[email protected]', '3d Print Complete.');\n\n\n $mysubject = \"3d Print id # (\" . $auto3dprintqueue->id . \") Status has changed to \" . $auto3dprintqueue->Status;\n $m->to($user->email, $user->name)->subject($mysubject);\n });\n}", "title": "" }, { "docid": "f4d82c7300a52574e2719810afaaa2d6", "score": "0.6689329", "text": "public function sendEmail()\n {\n // Users sign up\n $user = [\n 'name' => 'Alwesh',\n 'email' => '[email protected]',\n 'password' => Hash::make(time())\n ];\n // Record is created\n Event::fire('account.created', [$user]);\n }", "title": "" }, { "docid": "51d68e9f32437534a6c3eb7011400a2b", "score": "0.6629265", "text": "public function sendConfirmEmail( User $user );", "title": "" }, { "docid": "df28b510cd3b3a42ad200cbd9cd01868", "score": "0.66151774", "text": "public function sendReminder()\n\t{\n\t\t$response = Password::remind(Input::only('student_id'), function($message)\n\t\t{\n\t\t\t$message->subject('Wachtwoord resetten');\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response));\n\n\t\t\tcase Password::REMINDER_SENT:\n\t\t\t\treturn Redirect::back()->with('status', Lang::get($response));\n\t\t}\n\t}", "title": "" }, { "docid": "0dd102bbf3453c76691129a9c9593054", "score": "0.6585157", "text": "public function sendMail(Request $request)\n {\n $user = User::where('email', $request->email)->first();\n if($user == null) return redirect()->back()->with('thongbao1', 'Email not exist!');\n $passwordReset = PasswordReset::updateOrCreate([\n 'email' => $user->email,\n ], [\n 'token' => Str::random(60),\n ]);\n if ($passwordReset) {\n $user->notify(new ResetPasswordRequest($passwordReset->token));\n }\n \n return redirect()->back()->with('thongbao', 'We have e-mailed your password reset link!');\n }", "title": "" }, { "docid": "b246c7aa3163443a6a9422bc0edfb934", "score": "0.6581501", "text": "function send_validation_reminder_mail($user, $enddate, $pastdays)\n{\n $daysleft = $enddate - $pastdays;\n $site = elgg_get_site_entity();\n\n $link = $site->url . 'uservalidationbyemail/confirm?u=' . $user->guid;\n $link = elgg_http_get_signed_url($link);\n\n $subject = elgg_echo(\n 'validation_reminder:validate:token:subject',\n array(\n $user->name,\n $site->name\n ),\n $user->language\n );\n\n $body = elgg_echo(\n 'validation_reminder:validate:token:body',\n array(\n $user->name,\n $pastdays,\n $site->name,\n $user->token,\n $link,\n $daysleft,\n $site->name,\n $site->url\n ),\n $user->language\n );\n\n // Send validation email\n notify_user($user->guid, $site->guid, $subject, $body, array(), 'email');\n}", "title": "" }, { "docid": "c8daec0d5b215eb81a9362da9014ece0", "score": "0.65649265", "text": "function welcomeMail()\n {\n $to_email = '[email protected]';\n Mail::to($to_email)->send(new Reminder);\n return \"E-mail has been sent Successfully\"; \n }", "title": "" }, { "docid": "474626fc6ebd72bf164f7600881147c7", "score": "0.65580666", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail); // my notification\n }", "title": "" }, { "docid": "7a9d7f53372216cb775a975be48dac06", "score": "0.6555349", "text": "protected function reminder() {\n // TODO: password reminder: link valid for limited time emailed to user, if user-entered email address and\n // username, matches the existing username/email address combination.\n // Once the user presses the link, if valid link, a form is displayed to enter and confirm a new password for\n // that username. The user account will then be updated with the new password.\n }", "title": "" }, { "docid": "94be85f89aa13f39137d768882d2e3b2", "score": "0.6551654", "text": "public function mail_to_user($rid,$email,$user_id)\n {\n\t\t/* Update the ride information */\n\t\t$rideDetails = array('ride_status' => 'Expired', 'booking_information.expired_date' => MongoDATE(time()));\n\t\t$this->app_model->update_details(RIDES, $rideDetails, array('ride_id' => $rid));\n\t\t$newsid = '13';\n\t\t$query = $this->app_model->get_all_details(USERS, array('_id' => MongoID($user_id)));\n\t\t$user_name = $query->row()->user_name;\n \n\t\t$template_values = $this->user_model->get_email_template($newsid,$this->data['langCode']);\n\t\t$subject = 'From: ' . $this->config->item('email_title') . ' - ' . $template_values['subject'];\n\t\t$ridernewstemplateArr = array('email_title' => $this->config->item('email_title'), 'mail_emailTitle' => $this->config->item('email_title'), 'mail_logo' => $this->config->item('logo_image'), 'mail_footerContent' => $this->config->item('footer_content'), 'mail_metaTitle' => $this->config->item('meta_title'), 'mail_contactMail' => $this->config->item('site_contact_mail'));\n\t\textract($ridernewstemplateArr);\n\t\t$ride_id=$rid;\n\t\t$message = '<!DOCTYPE HTML>\n\t\t <html>\n\t\t <head>\n\t\t <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n\t\t <meta name=\"viewport\" content=\"width=device-width\"/>\n\t\t <title>' . $subject . '</title>\n\t\t <body>';\n\t\tinclude($template_values['templateurl']);\n\t\t$message .= '</body>\n\t\t </html>';\n\t\t$sender_email = $this->config->item('site_contact_mail');\n\t\t$sender_name = $this->config->item('email_title');\n\t\t\n\t\t$email_values = array('mail_type' => 'html',\n\t\t 'from_mail_id' => $sender_email,\n\t\t 'mail_name' => $sender_name,\n\t\t 'to_mail_id' => $query->row()->email,\n\t\t 'subject_message' =>'Your '.$this->config->item('email_title').' ride has been expired',\n\t\t 'body_messages' => $message\n\t\t);\n\t \n\t\t$email_send_to_common = $this->user_model->common_email_send($email_values);\n \n }", "title": "" }, { "docid": "77d8ad312e36a96f8e92440af02b73f8", "score": "0.654617", "text": "public function sendEmail($user,$code){\n Mail::send(\n 'email.reset_mail',\n ['user'=>$user,'code'=>$code],\n function($message) use ($user){\n $message->subject(\"Reset your password.\")->to(\"$user->email\");\n }\n );\n }", "title": "" }, { "docid": "8d98aaea7dc5b075ad421339fe2d6a12", "score": "0.6530358", "text": "public function notify()\r\n\t{\r\n\t\techo \"Notifying via Email<br>\";\r\n\t}", "title": "" }, { "docid": "4c2d0d1e5152a0a19a0a0ff647dfeeac", "score": "0.651405", "text": "public function actionSendVerificationEmail()\n\t{\n\t\t$this->requirePostRequest();\n\t\tblx()->userSession->requirePermission('administrateUsers');\n\n\t\t$userId = blx()->request->getRequiredPost('userId');\n\t\t$user = blx()->users->getUserById($userId);\n\n\t\tif (!$user)\n\t\t{\n\t\t\t$this->_noUserExists($userId);\n\t\t}\n\n\t\tblx()->users->sendVerificationEmail($user);\n\n\t\tblx()->userSession->setNotice(Blocks::t('Verification email sent.'));\n\t\t$this->redirectToPostedUrl();\n\t}", "title": "" }, { "docid": "aa2d2a6700b7981f62e45efea6a9bd5b", "score": "0.65089107", "text": "public function sendEmailNow($reminder_record) {\n $reminderdata = $reminder_record;\n $from = $reminderdata->reminder_from;\n $to = $reminderdata->reminder_to;\n $msgstring = $reminderdata->reminder_msg;\n \\Illuminate\\Support\\Facades\\Mail::queue(\n ['html' => 'emails.bdaymailhtml'], \n $msgstring, function($message){\n $message->from('[email protected]', 'ReemindMe');\n $message->to($to,$to)->subject('Happy Birthday to You!');\n }\n \n );\n }", "title": "" }, { "docid": "c0909c05ec2893b81c8d6c9c4f7cd069", "score": "0.6493376", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new UserVerifyMail());\n }", "title": "" }, { "docid": "e508f1b563a7be453cfb58c4aeddd480", "score": "0.6483647", "text": "private function send_reset_password_mail()\n\t{\n\t\t$time = time();\n\t\t\n\t\t$uri = Route::get('user_ops')->uri(array('action' => 'confirm_forgot_password'))\n\t\t\t\t. '?id=' . $this->id . '&auth_token='\n\t\t\t\t. Auth::instance()->hash(sprintf('%s_%s_%d', $this->email, $this->password, $time))\n\t\t\t\t. '&time=' . $time;\n\t\t\t\t\n\t\t$link = URL::site($uri, 'http');\n\t\t\t\n\t\t$mailer = new QaminiMailer($this->email, $this->username\n\t\t\t, Kohana::$config->load('config.website_name') . __(' - Reset Password') \n\t\t\t, Kohana::$config->load('config.website_name') . __(' Website'), 'confirm_reset_password'\n\t\t\t, array('url' => $link, 'username' => $this->username));\n\t\t\t\n\t\t$mailer->send();\n\t}", "title": "" }, { "docid": "48ee98375681082079762296e41263db", "score": "0.64684", "text": "public function sendEmail() {\n\t\t\techo \"E-mail to: \" . $this->to . \" Sent!\";\n\t\t}", "title": "" }, { "docid": "26e686d624fa51160421f7f8edbd2ef9", "score": "0.6464731", "text": "public function reminder($id) {\n $this->charge = ORM::factory('finance_charge', $id);\n \n if ( ! $this->charge->loaded)\n Event::run('system.404');\n if ( ! A2::instance()->allowed('finance', 'manage'))\n Event::run('system.403');\n if ($this->charge->site_id != $this->site->id)\n Event::run('system.403');\n \n $this->title = sprintf('Send Email Reminder for \"%s\" due on %s', $this->charge->title, date::display($this->charge->due, 'M d, Y'));\n \n if ($post = $this->input->post()) {\n if ($this->charge->notify_members()) {\n message::add(TRUE, 'Balance reminders sent successfully.');\n url::redirect('finances/charges/'. $this->charge->id);\n }\n else {\n message::add(FALSE, 'There was an error sending outstanding balance reminders. Please try again.');\n $this->form = $post;\n }\n }\n }", "title": "" }, { "docid": "a4ca0e926fe0a576fdfeacb233fde648", "score": "0.6448974", "text": "public function sendEmailVerificationNotification()\n {\n // TODO: Implement sendEmailVerificationNotification() method.\n }", "title": "" }, { "docid": "a4ca0e926fe0a576fdfeacb233fde648", "score": "0.6448974", "text": "public function sendEmailVerificationNotification()\n {\n // TODO: Implement sendEmailVerificationNotification() method.\n }", "title": "" }, { "docid": "2d88013c4b063444d26213bf4ea93710", "score": "0.6436864", "text": "function _sendNewUserMail($id) {\n\t\tApp::uses('CakeEmail', 'Network/Email');\n\t\t$user=$this->User->read(null,$id);//debug($id);debug($user);\n\t\tif ($user) {\n\t\t\t//found ok\n\t\t\t$mail=new CakeEmail('smtp');\n\t\t\t$mail->to($user['User']['email']);\n\t\t\t$mail->subject('Registration for AD2012');\n\t\t\t$mail->replyTo($this->User->supportEmail);\n\t\t\t$mail->from(array($this->User->supportEmail=>'AD2012 Registration'));\n//\t\t\t$mail->from(array('[email protected]'=>'My Site'));\n\t\t\t$mail->template('confirm_message');\n\t\t\t$mail->emailFormat('both');\n\t\t\t$mail->viewVars(array('user'=>$user));\n\t\t\t//mail options\n/*\t\t\t$mail->smtpOptions(array(\n\t\t\t 'port'=>'25',\n\t\t\t 'timeout'=>'30',\n\t\t\t 'host'=>'smtp.emailsrvr.com'\n\t\t\t));//*/\n\t\t\t$x=$mail->send();\n//debug($x);exit;\n\t\t}\n\t}", "title": "" }, { "docid": "aabe1f80485e3499f5bf79290ae2bf0b", "score": "0.643249", "text": "public function expired_send_mail()\r\n {\r\n /* get user meta */\r\n $meta = get_user_meta($this->ID);\r\n /* get the sent mail flag */\r\n $sent_mail_flag = $meta['sent-mail'][0] == 'sent' ? false : true;\r\n /* if mail was not sent then send an email */\r\n if(!$sent_mail_flag) :\r\n $emailaddress = $this->user->email;\r\n $to = $emailaddress;\r\n \t$email = new spinal_send_mail();\r\n $options = get_option('email-options');\r\n $message = $options['expired-membership'];\r\n $title = 'Renew Your Membership on '.get_bloginfo( 'name' );\r\n //$sent = $email->send($to, $title, $message);\r\n if($sent) :\r\n update_user_meta( $this->ID, 'sent-mail', 'sent');\r\n endif;\r\n endif;\r\n }", "title": "" }, { "docid": "6fa2946b37055f615ecb9a6bd02be49c", "score": "0.64162993", "text": "public function emailAction()\r\n\t{\r\n\t\t// not logged in ?\r\n\t\tif (!$this->auth->hasIdentity()) {\r\n\t\t\tPetolio_Service_Util::saveRequest();\r\n\t\t\t$this->msg->messages[] = $this->translate->_(\"Please log in or sign up to access this page.\");\r\n\t\t\treturn $this->_helper->redirector('index', 'site');\r\n\t\t}\r\n\r\n\t\t// no user ?\r\n\t\tif (is_null($this->user->getId())) {\r\n\t\t\t$this->msg->messages[] = $this->translate->_(\"User does not exists.\");\r\n\t\t\treturn $this->_helper->redirector('index', 'site');\r\n\t\t}\r\n\r\n\t\t// init form\r\n\t\t$form = new Petolio_Form_Email();\r\n\t\t$form->populate($this->user->getMapper()->toArray($this->user));\r\n\t\t$this->view->form = $form;\r\n\r\n\t\t// did we submit form ? if not just return here\r\n\t\tif(!($this->request->isPost() && $this->request->getPost('submit')))\r\n\t\t\treturn false;\r\n\r\n\t\t// is the form valid ? if not just return here\r\n\t\tif(!$form->isValid($this->request->getPost()))\r\n\t\t\treturn false;\r\n\r\n\t\t// save new email settings\r\n\t\t$data = $form->getValues();\r\n\t\t$this->user->setOptions($data)->save(true, true);\r\n\r\n\t\t// logout\r\n\t\t$this->msg->messages[] = $this->translate->_(\"You have succesfully changed your email notifications.\");\r\n\t\treturn $this->_redirect('accounts/profile');\r\n\t}", "title": "" }, { "docid": "2726c5d2a866a93487f4a0cb7667d1e1", "score": "0.6414826", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = Administrator::find()->where([\n 'status' => Administrator::STATUS_ACTIVE,\n 'email' => $this->email,\n ])->one();\n\n if ($user) {\n if (!Administrator::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n Email::create()\n ->html(Yii::$app->view->renderFile('@core/views/emails/passwordResetToken.php', ['user' => $user]))\n ->subject(\"Reset Password\")\n ->to(['email' => $user->email, 'name'=> $user->name])\n ->send();\n\n return true;\n } else {\n return false;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "8ac14380b877ff1cf9a17ffb6cb625d4", "score": "0.6384356", "text": "public static function cronMail()\n {\n // TODO : factoriser la config\n $configuration = require 'config/application.config.php';\n $smConfig = isset($configuration['service_manager']) ? $configuration['service_manager'] : array();\n $sm = new \\Zend\\ServiceManager\\ServiceManager(new \\Zend\\Mvc\\Service\\ServiceManagerConfig($smConfig));\n $sm->setService('ApplicationConfig', $configuration);\n $sm->get('ModuleManager')->loadModules();\n $sm->get('Application')->bootstrap();\n\n $mailService = $sm->get('playgrounduser_message');\n $gameService = $sm->get('playgroundgame_quiz_service');\n $options = $sm->get('playgroundgame_module_options');\n\n $from = \"[email protected]\"; // $options->getEmailFromAddress();\n $subject = \"sujet game\"; // $options->getResetEmailSubjectLine();\n\n $to = \"[email protected]\";\n\n $game = $gameService->checkGame('qooqo');\n\n // On recherche les joueurs qui n'ont pas partagé leur qquiz après avoir joué\n // entry join user join game : distinct user et game et game_entry = 0 et updated_at <= jour-1 et > jour - 2\n // $contacts = getQuizUsersNotSharing();\n\n // foreach ($contacts as $contact) {\n // $message = $mailService->createTextMessage('[email protected]', '[email protected]', 'sujetcron', 'playground-user/email/forgot', array());\n $message = $mailService->createTextMessage($from, $to, $subject, 'playground-game/email/share_reminder', array(\n 'game' => $game\n ));\n\n $mailService->send($message);\n // }\n }", "title": "" }, { "docid": "53c9fb6e422b6431cf8aa092b05c7ca3", "score": "0.63830256", "text": "public function sendEmailManually(Request $request,$user_id)\n {\n $user_id = base64_decode($user_id);\n $resetToken = str_random(40);\n $user = User::find($user_id);\n if($user){\n $user->password_reset = $resetToken;\n if($user->save()){\n $emaildata = [\n 'token_link' => url('/resetPassword/'.$resetToken),\n 'user_name' => $user->firstname\n ];\n Mail::to($user->email)->send(new ResetPassword($emaildata));\n return redirect()->back()->with('success','Email is send');\n }else{\n return redirect()->back()->withInput()->with('error', \"Email is not sent.\"); \n }\n }else{\n return redirect()->back()->withInput()->with('error', \"This email account is not registered.\");\n }\n }", "title": "" }, { "docid": "33f8cd9835afc81fbeffdd7b319846ea", "score": "0.6372506", "text": "private function sendForgotEmail($user)\n {\n Mail::send('simple-passport.forgot-password', ['user' => $user], function ($mail) use ($user) {\n $mail->from(config('simple-passport.mail_from'), config('simple-passport.mail_from_name'));\n $mail->to($user->email);\n $mail->subject(trans('simple-passport::forgot-password.mail_subject'));\n });\n }", "title": "" }, { "docid": "bbdd2fb13abd0be2741fec65f071cad2", "score": "0.636331", "text": "public function sendReminderNotification($order)\n {\n $senderInfo = [\n 'name' => $this->configurationService->getStoreRepresentiveName(),\n 'email' => $this->configurationService->getStoreRepresentiveEmail()\n ];\n $recieverInfo = [\n 'name' => sprintf('%s %s', $order->getCustomerFirstname(), $order->getCustomerLastname()),\n 'email' => $order->getCustomerEmail()\n ];\n $this->mailer->sendMail(\n $senderInfo,\n $recieverInfo,\n $this->configurationService->getReminderEmailTemplate(),\n null\n );\n $this->setNotifiedFlag($order);\n }", "title": "" }, { "docid": "ce938d958027a2ffd36fe3d14a6a2e3b", "score": "0.6360672", "text": "public static function do_cron()\n\t{\n\t\t$options = get_option( self::option_name );\n\t\t$admin_message = '';\n\t\t$headers = 'From: Comunicaciones Invertir Mejor <[email protected]>' . \"\\r\\n\";\n\t\t$headers .= \"Reply-To: [email protected]\" . \"\\r\\n\";\n\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=utf-8\\r\\n\";\n\n\t\t// Expire users\n\t\t$admin_message .= \"<h1>Expire Users Notification</h1>\";\n\t\t$range1 = date( 'Y-m-d H:i:s', date('U') );\n\t\t$range2 = date( 'Y-m-d H:i:s', strtotime( '+'.$options['notify_days'].' days' ) );\n\t\t$admin_message .= \"<p><strong>[Range: \". $range1 . \" to \" . $range2 . \"]</strong></p><p>Users:<br>\";\n\n\t\t$users = self::get_users_by_range( self::user_meta_expire_date, array( $range1, $range2 ), self::user_meta_expire_count );\n\t\t$admin_message .= self::send_mails( $users, $headers, $options['notify_subject'], $options['notify_text'], self::user_meta_expire_count);\n\n\t\t// Welcome message\n\t\t$admin_message .= \"</p><h1>Post User-Registration Notification</h1>\";\n\t\t$range1_temp = 4 + $options['welcome_days']; // The range is 4 since the shedule event is executed twice weekly (once 3.5 days), so 4 prevent for lost users notification\n\t\t$range1 = date( 'Y-m-d H:i:s', strtotime( '-'.$range1_temp.' days' ) );\n\t\t$range2 = date( 'Y-m-d H:i:s', strtotime( '-'.$options['welcome_days'].' days' ) );\n\t\t$admin_message .= \"<p><strong>[Range: \". $range1 . \" to \" . $range2 . \"]</strong></p><p>Users:<br>\";\n\n\t\t$users = self::get_users_by_range( self::user_meta_reg_date, array( $range1, $range2 ), self::user_meta_expire_welcome_messages_count );\n\t\t$admin_message .= self::send_mails( $users, $headers, $options['welcome_subject'], $options['welcome_text'], self::user_meta_expire_welcome_messages_count);\n\n\t\t$admin_message .= '</p>';\n\n\t\t// Report to admin\n\t\twp_mail( get_bloginfo('admin_email'), '[User Expire] Mensajes Enviados el Día de Hoy', $admin_message, $headers );\n\t}", "title": "" }, { "docid": "22892116f2a0ef2c68ae55289463038f", "score": "0.6349087", "text": "private function sendEmail($user, $code) {\n Mail::send('emails.reset-password', [\n 'user' => $user,\n 'code' => $code\n ], function($message) use ($user) {\n $message->to($user->email);\n $message->subject('TMS-Plus password reset');\n });\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.6344518", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.6344518", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.6344518", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "6d120e4d6632a01fcc49b46f96529d19", "score": "0.6344518", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "b927b019dbaff1fd6626550e7b768b70", "score": "0.63377726", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmailNotification());\n }", "title": "" }, { "docid": "b927b019dbaff1fd6626550e7b768b70", "score": "0.63377726", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new VerifyEmailNotification());\n }", "title": "" }, { "docid": "e7befc9facd5277de355080a187fd4e0", "score": "0.63339096", "text": "public function sendEmailToUser() \n {\n $to_email = \"[email protected]\";\n\n Mail::to($to_email)->send(new SendEmail);\n\n return \"<p> Your E-mail has been sent succssfully. </p>\";\n }", "title": "" }, { "docid": "a9e7eb7b99698485fd1189790ee22637", "score": "0.63012725", "text": "public function sendEmailVerificationNotification()\n {\n $code = $this->generateVerificationCode();\n\n $expire = now()->addMinutes(60);\n\n if ($mailable = config('awesio-auth.mailables.email_verification')) {\n\n VerifyEmail::toMailUsing(\n function ($notifiable) use ($mailable, $code, $expire) {\n \n $url = URL::temporarySignedRoute(\n 'verification.verify', \n $expire, \n ['id' => $notifiable->getKey()]\n );\n \n return (new $mailable($code, $url))\n ->to($notifiable->email);\n }\n );\n }\n Session::put(\n 'email_verification', \n ['code' => $code, 'expire' => $expire]\n );\n\n $this->notify(new VerifyEmail);\n }", "title": "" }, { "docid": "2aceac91f59f1e891ee82083c0b66838", "score": "0.6265115", "text": "public function send() {\n\n\t $response = Password::remind(Input::only('email'), function($message) {\n // TODO customise the reminder email in /app/views/emails/auth/reminder.blade.php\n\t $message->subject('Reset Password');\n\t });\n\n\t\tswitch ($response) {\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\treturn Redirect::back()->withErrors(['email'=>Lang::get($response)]);\n\n\t\t\tcase Password::REMINDER_SENT:\n\t\t\t\treturn Redirect::back()->with('message', Lang::get($response));\n\t\t}\n\t}", "title": "" }, { "docid": "3ed90bf294c243737de9f20d4b8c66e2", "score": "0.6240562", "text": "public function sendEmailNotificationTo(User $user)\n {\n $this->to = $user->email;\n\n $this->view = 'emails.notification';\n\n $this->data = compact('user');\n\n $this->deliver();\n }", "title": "" }, { "docid": "a7449df011ea3a156ba14117ce622b8d", "score": "0.6236343", "text": "public function sendEmailAlert()\n\t{\n\t\t$this->kuser = kuserPeer::retrieveByPK( $this->getKuserId() );\n\t\tif( $this->kuser )\n\t\t{\n\t\t\tkJobsManager::addMailJob(\n\t\t\t\tnull, \n\t\t\t\t0, \n\t\t\t\t$this->kuser->getPartnerId(), \n\t\t\t\t$this->getAlertType(), \n\t\t\t\tkMailJobData::MAIL_PRIORITY_NORMAL, \n\t\t\t\tkConf::get ( \"batch_notification_sender_email\" ), \n\t\t\t\tkConf::get ( \"batch_notification_sender_name\" ), \n\t\t\t\t$this->kuser->getEmail(), \n\t\t\t\t$this->getBodyParamsArray(), \n\t\t\t\t$this->getSubjectParamsArray());\n\t\t}\n\t}", "title": "" }, { "docid": "8a2643c542eb61f928d5f9c132b6b735", "score": "0.6231949", "text": "public function sendInvitation()\n {\n $data = [\n 'name' => $this->full_name,\n 'login' => $this->login,\n 'password' => $this->getOriginalHashValue('password'),\n 'link' => Backend::url('backend'),\n ];\n\n Mail::send('backend::mail.invite', $data, function ($message) {\n $message->to($this->email, $this->full_name);\n });\n }", "title": "" }, { "docid": "7ddba78151a1e3b35ee38e7bed1df780", "score": "0.6227982", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new Notifications\\SocioCriado);\n }", "title": "" }, { "docid": "de9f29fb36c2388de164b2c97234a8df", "score": "0.6202344", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "7345608628bb84d1671091f4fcfa9703", "score": "0.6197732", "text": "public function actionEmail()\n {\n $item = $this->model->getItem($this->model->getSavedVariable('last_stored_visit'));\n $body = $this->getVsisitEmailBody($item);\n $subject = '!MPROVE - Performance Dialog Observations - ' . $item->name . ' / ' . date('d M Y', $item->date_added);\n $this->sendItemEmail($body, $subject);\n }", "title": "" }, { "docid": "9e41fe8040b6e2dc4a210dc2a3b3652b", "score": "0.6192182", "text": "public function sendEmail($user, $code)\n {\n $mail_data = [\n 'user' => $user,\n 'code' => $code,\n ];\n\n Mail::send('email.forgotPassword', $mail_data, function ($message) use ($user) {\n $message->to($user->email)->subject(\"$user->name reset your passowrd\");\n });\n }", "title": "" }, { "docid": "76fdbc16dd896f763d58607ecb29b3f8", "score": "0.6182278", "text": "public function onSendMailForUsers()\n {\n /**\n * Send Mail For new User\n */\n $last_create_user = User::orderBy('id', 'desc')->first();\n Mail::to($last_create_user->email)->send(new UserMail);\n }", "title": "" }, { "docid": "6bdecad1a27fd9be0b2c69abe59253b0", "score": "0.61822176", "text": "public function sendNotification()\n {\n $admin = User::find(1);\n $user = User::find(2) ;\n event(new UserRegisteredEvent($user));\n $admin->notify(new NewUserRegisteredNotification($user));\n\n \treturn 'Notification sent!';\n }", "title": "" }, { "docid": "8a33121871772b7dead0896f73397471", "score": "0.6176639", "text": "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }", "title": "" }, { "docid": "03137d62c240ff6bb3c5952990cb6da9", "score": "0.6170702", "text": "public function sendNotification($user){\t\t\n\t\t$msg = '<p><strong>Congratulations!</strong></p>\n\t\t<p>You have been successfully registered at <a href=\"http://mynextrides.com\">mynextrides.com</a>. Here is your login info:</p>\n\t\t<p>Name: '.$user->name.'<br />\n\t\tUsername: '.$user->username.'<br />\n\t\tEmail: '.$user->email.'<br />\n\t\tPassword: '.$user->password1.'<br />\n\t\t</p>\n\t\t<p>Thank you for registering.</p>\n\t\t';\n\t\t$this->sendEmail($user->email,\"MyNextRide.com Login Info\",$msg);\n\t}", "title": "" }, { "docid": "2d776071f8b58dc6abb26d00f1d4da6a", "score": "0.616827", "text": "public function sendEmailVerification()\n {\n if (!empty($this->email)) {\n event(new NewEmailAddressRecorded($this));\n }\n }", "title": "" }, { "docid": "12aaf557534a18597a5a5bbf365772fd", "score": "0.61672795", "text": "public function getReminderEmail() {\n return $this->email;\n }", "title": "" }, { "docid": "fd0dc7008608a8931005afe101e2d4d8", "score": "0.61600536", "text": "public static function sendReminder($enrolmentHash = \"\")\n {\n $enrolment = self::getEnrolmentByID($enrolmentHash);\n\n $templateID = get_option('ax_enrol_resumption_template_id');\n $contactID = intval($enrolment['user_contact_id'], 10);\n\n if (!empty($templateID)) {\n self::_sendReminderTemplate($enrolmentHash, $enrolment, $contactID, intval($templateID, 10));\n } else {\n self::_sendReminderNoTemplate($enrolmentHash, $enrolment, $contactID);\n }\n\n }", "title": "" }, { "docid": "f4ed160b38417a1037f5e5f3080f0a68", "score": "0.61538374", "text": "public function actionNoteEmail()\n {\n $item = $this->model->getItem($this->model->getSubmittedVariableByName('note_id'));\n\n $body = $this->getNoteEmailBody($item);\n\n $subject = '!MPROVE - Note - ' . $item->name . ' / ' . date('d M Y', $item->date_added);\n\n $this->sendItemEmail($body, $subject);\n }", "title": "" }, { "docid": "fa6f973b0e137746758395cf42a91a65", "score": "0.6150414", "text": "public function sendEmailVerificationNotification()\n {\n $this->notify(new StudentVerifyEmail);\n }", "title": "" }, { "docid": "e86f598271e970f3ddaf3e96fdaf1ffb", "score": "0.61376214", "text": "public function email();", "title": "" }, { "docid": "a64a190bece752df37256c705be86641", "score": "0.61363417", "text": "public function getReminderEmail()\n\t{\n\t return $this->email;\n\t}", "title": "" }, { "docid": "ffd3a9835a03df80dfc6e4f0caeecd77", "score": "0.61258334", "text": "private function mail_for_downtime(){\n\t\t$config['priority'] = 1;\n\t\t$this->load->library('email');\t\n\t\t$this->email->initialize($config);\t\n\t\t$this->email->from('[email protected]', 'chetandalal.com');\n\t\t$this->email->to('[email protected]');\t\t\n\t\n\t\t$this->email->subject('Downtime user payment ');\n\t\t$template_email=\"\n\t\t\t\t<p>Name :\".$this->session->userdata('firstname').\" </p>\n\t\t\t\t<p>User Id : \".$this->session->userdata('user_id').\" </p>\n\t\t\t\t<p>email : \".$this->session->userdata('email').\" </p>\n\t\t\";\n\t\t$this->email->message($template_email);\t\t\n\t\t$this->email->send();\t\t\n\t\t//echo $this->email->print_debugger(); \n\t}", "title": "" }, { "docid": "c6460b6b53a977441acf10033b72a69e", "score": "0.61104184", "text": "public function sendRemindToUser(Reminder $reminder, $beforehand = 0)\n {\n $reminderLog = \\VOCApp::getInstance()->getService('reminderLogger');\n $reminderLog->addAlert(\"Start sending a reminder with id:\".$reminder->getId().\" to users\");\n $rUManager = \\VOCApp::getInstance()->getService('reminderUser');\n $reminderUsers = $rUManager->getReminderUsersByReminderId($reminder->getId());\n if (count($reminderUsers) == 0) {\n return false;\n }\n \n $email = new \\EMail(true);\n $from = AUTH_SENDER . \"@\" . DOMAIN;\n $messageSubject = \"Reminder \";\n\n $tpl = dirname(__FILE__) . '/../../../../../../design/user/tpls/reminderNotification.tpl';\n\n $iconPath = 'http://' . DOMAIN . '/vwm/images/gyantcompliance_small.jpg';\n\n $smarty = \\VOCApp::getInstance()->getService('smarty');\n $smarty->assign('reminder', $reminder);\n $smarty->assign('iconPath', $iconPath);\n $smarty->assign('isBeforehandReminder', $beforehand);\n\n $messageText = $smarty->fetch($tpl);\n $text = '';\n \n foreach ($reminderUsers as $reminderUser) {\n $result = $email->sendMail($from, $reminderUser->getEmail(), $messageSubject, $messageText);\n $reminderLog->addAlert('Reminder to ' . $reminderUser->getEmail() . ' sent successfully;');\n $text.='Reminder to ' . $reminderUser->getEmail() . ' sent successfully;';\n $text.=' ';\n }\n\n return $text;\n }", "title": "" }, { "docid": "a4aefd657acd2fcdf57b2e6992f0f2fb", "score": "0.6108049", "text": "public function notify($id, $email);", "title": "" }, { "docid": "b715bf981c974f805a81596e679c48fc", "score": "0.6103614", "text": "public function daily()\n {\n // get all the users\n $users = User::orderBy('name', 'ASC')->get();\n\n // cycle through all the users\n foreach ($users as $user) {\n $events = $user->getAttendingFuture()->take(100);\n\n Mail::send('emails.daily-events', ['user' => $user, 'events' => $events], function ($m) use ($user, $events) {\n $m->from('[email protected]', 'Event Repo');\n\n $m->to($user->email, $user->name)->subject('Event Repo: Daily Events Reminder');\n });\n }\n\n flash()->success('Success', 'You sent an email reminder to '.count($users).' users about events they are attending');\n\n return back();\n }", "title": "" }, { "docid": "daf1e14095e1453fe7c7421d546a15c8", "score": "0.6097924", "text": "protected function sendemail()\n\t{\n\n\t\tif (Input::get(\"sendemail\")==\"1\"){\n\t\t\t/*****************************************\n\t\t\t\t- MAIL SETTINGS -\n\t\t\t*****************************************/\n\t\t\t// I'm creating an array with user's info but most likely you can use $user->email or pass $user object to closure later\n\t\t\t$emailuser = array(\n\t\t\t\t'email'=>Input::get('email'),\n\t\t\t\t'name'=>Input::get('name'),\n\t\t\t\t'username'=>Input::get('username'),\n\t\t\t\t'password'=>Input::get('password')\n\t\t\t);\n\n\t\t\t// the data that will be passed into the mail view blade template\n\t\t\t$data = array(\n\t\t\t\t'name' => 'name: <b>'.$emailuser['name'].'</b>',\n\t\t\t\t'username' => 'username: <b>'.$emailuser['username'].'</b>',\n\t\t\t\t'email' => 'email: <b>'.$emailuser['email'].'</b>',\n\t\t\t\t'password' => 'password: <b>'.$emailuser['password'].'</b>'\n\t\t\t);\n\n\t\t\t// use Mail::send function to send email passing the data and using the $user variable in the closure\n\t\t\tMail::send('dcms::users/email', $data, function($message) use ($emailuser)\n\t\t\t{\n\t\t\t\t$message->from('[email protected]', 'New DCMS User');\n\t\t\t\t$message->to($emailuser['email'], $emailuser['name'])->subject('Welcome to My Laravel app!');\n\t\t\t});\n\t\t\t/*****************************************\n\t\t\t\t- END MAIL -\n\t\t\t*****************************************/\n\t\t}\n\t}", "title": "" }, { "docid": "a7f1b216f19e542b693644989bdeedd7", "score": "0.6090751", "text": "public function email()\n\t{\n\t\t$post['password'] = $this->password($this->config->item('min_password_length', 'ion_auth'));\n\t\t\n\t\t$this->email->clear();\n\t\t$this->email->from($this->config->item('noreply_mail'), $this->config->item('mail_name'));\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->subject('Отладка');\n\t\t$this->email->message($post['password']);\n\t\t\n\t\tvar_dump($this->email->send());\n\t\techo $this->email->print_debugger();\n\t}", "title": "" }, { "docid": "068830de22fc0a42358717226cc92485", "score": "0.6089328", "text": "public function NewRestaurantEmail($restaurant)\n { \n \n $user = Auth::user();\n //-------- Send to CService\n SendEmail::SendRestaurantEmail($restaurant,$user,$this->cs_email,$this->admin_email); \n }", "title": "" }, { "docid": "629cb729bc22adfc1c2ba09c759e4011", "score": "0.60892576", "text": "public function sendEmail(){\n\t\t\n\t $oEmail = oxNew(\\OxidEsales\\Eshop\\Core\\Email::class);\n\n\t // Get parameters from the view (pop-up form)\n\t $aParams = oxConfig::getRequestParameter('editval');\n\t $sName = $aParams['name'];\n\t $sEmail = $aParams['email'];\n\t $sSubject = $aParams['subject'];\n\t $sMessage = $aParams['message'];\n\n\t // Call the function for sending email with needed parameters\n\t $oEmail->sendAskForPriceMail($sName,$sEmail,$sSubject,$sMessage); \n\n\t $sUrl = $_SERVER['HTTP_REFERER'];\n\t\toxRegistry::getUtils()->redirect($sUrl, false);\n\n\n }", "title": "" }, { "docid": "4524202b3ce8d8259cd14594e8a657ba", "score": "0.60738283", "text": "public function sendEmailVerificationNotification(User $user)\n {\n $user->notify(new VerifyEmailNotification());\n }", "title": "" }, { "docid": "71fd6aa8aa04360784fabf84cde7229b", "score": "0.6067944", "text": "public function mail(Request $request)\n {\n $user = User::where('id', '=', Auth::user()->id)->first();\n\n $rand = mt_rand(100000, 999999);\n $user->otp = $rand;\n $user->save();\n $to_name = 'user';\n $to_email = Auth::user()->email;\n $data = array('name'=>Auth::user()->name, \"body\" => $rand);\n \n Mail::send('emails.mail', $data, function($message) use ($to_name, $to_email) {\n $message->to($to_email, $to_name)\n ->subject('otp verification system');\n $message->from('[email protected]','otp');\n });\n return redirect()->back();\n }", "title": "" }, { "docid": "6158420619860a6cec2127a60d4e0825", "score": "0.60665226", "text": "public function email($id)\n {\n $user = User::findOrFail($id);\n $candidateInfo = CandidateInfo::where('user_id', '=', $id)->first();\n\n\n $title = \"Congratulation!\"; // can also appen car name here\n $name = Auth::user()->first_name.' '.Auth::user()->last_name; //or \"RecruiterHub\"\n if (env('APP_ENV') == \"local\")\n {\n $email = '[email protected]';\n } else {\n $email = $user->email;\n }\n\n try {\n\n Mail::send('email.recruited', ['title' => $title, 'content' => $user], function ($message) use ( $email, $name, $title)\n {\n $message->from('[email protected]', 'RecruiterHub Team');\n $message->to($email, $name);\n $message->subject($title);\n });\n\n } catch (\\Exception $e) {\n\n }\n\n //set user type to 2\n User::find($id)\n ->update(['user_type_id' => 2]);\n\n return redirect('candidate')->with('success', 'Candidate Recruited Successfully');\n // return back()->with('success','Email Sent!');\n }", "title": "" }, { "docid": "6f399fd3ed28368ed41981700b4a911e", "score": "0.6061525", "text": "public function check_email(Request $request){\n $user=DB::table('users')->whereEmail($request->email)->first();\n\n if($user==null){\n return redirect()->back()->with(['error'=>'Email Not Exists.']);\n\n }\n\n $user=Sentinel::findById($user->id);\n $reminder=Reminder::create($user);\n $this->sendEmail($user,$reminder->code);\n\n return redirect()->back()->with(['success'=>'Password reset link has been sent to your email.']);\n }", "title": "" }, { "docid": "efa331fd702f6e71e5fc5b7ff9eab23b", "score": "0.60564333", "text": "public function getReminderEmail()\r\n\t{\r\n\t\treturn $this->email;\r\n\t}", "title": "" }, { "docid": "d7be2518cb35044b78f3d213075a5a3d", "score": "0.60445106", "text": "public function updateMail()\n { \n // is_cli_request() is provided by default input library of codeigniter\n if($this->input->is_cli_request())\n {\n //send email\n $this->Cron_Model->send_email();\n }\n else\n {\n show_404();\n }\n }", "title": "" }, { "docid": "bb71d36ca94d3762f9017059736559b6", "score": "0.60439646", "text": "public function send($user,$data)\n {\n\n //$this->emailVerificationLink($user,$data);\n\n //event(new VerificationEmailSent($user));\n }", "title": "" }, { "docid": "92568e479ab0be4ed3155b988f69e2c1", "score": "0.60267544", "text": "public function test_send_email()\n {\n $user = $this->login();\n\n Mail::to($user)->send(new TestEmail());\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "02dfda0f936c5d8b836d14cd62815483", "score": "0.6014574", "text": "public function getReminderEmail()\n {\n return $this->email;\n }", "title": "" }, { "docid": "dddda179ac11fa711034d8a3d9d0ae67", "score": "0.60099524", "text": "public function toMail() {\n\t\treturn (new MailMessage)\n\t\t\t->subject('Inspicio : Email updated !')\n\t\t\t->greeting('Hello ' . $this->user->name . ' ! You just updated your email')\n\t\t\t->line('Your account has been switched to limited access until you confirm your new email')\n\t\t\t->line('Just click the button below !')\n\t\t\t->action('Confirm my email', url(env('APP_URL') . '/confirm/' . $this->user->id . '/' . $this->user->confirm_token))\n\t\t\t->line('Thanks for using Inspicio for your reviews !');\n\t}", "title": "" }, { "docid": "66996b5cc8bc87570be4c28a550e91b5", "score": "0.6006664", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\n\t\t\t\t$mailer = Yii::$app->mailer;\n\t\t\t\t$setFrom = Yii::$app->view->params['siteinfo']->email;\n\t\t\t\t\n\t\t\t\tif(isset(Yii::$app->view->params['setting']) && !empty(Yii::$app->view->params['setting']) && isset(Yii::$app->view->params['setting']['smtp_host']) && !empty(Yii::$app->view->params['setting']['smtp_host'])){\n\t\t\t\t\t$transport = [\n\t\t\t\t\t\t'class' => 'Swift_SmtpTransport',\n\t\t\t\t\t\t'host' => Yii::$app->view->params['setting']['smtp_host'],\n\t\t\t\t\t\t'username' => Yii::$app->view->params['setting']['smtp_username'],\n\t\t\t\t\t\t'password' => Yii::$app->view->params['setting']['smtp_password'],\n\t\t\t\t\t\t'port' => Yii::$app->view->params['setting']['smtp_port'],\n\t\t\t\t\t\t'encryption' => Yii::$app->view->params['setting']['smtp_encryption'],\n\t\t\t\t\t];\n\t\t\t\t\t\n\t\t\t\t\t$mailer->setTransport($transport);\n\t\t\t\t\t$setFrom = Yii::$app->view->params['setting']['smtp_username'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Шаблон\n\t\t\t\t$emailTemp = \\app\\modules\\emailtemp\\components\\BlockEmailtemp::_(7);\n\t\t\t\t\n\t\t\t\t$this->sitename = Yii::$app->view->params['siteinfo']->title;\n\t\t\t\t$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['user/default/password-reset', 'token' => $user->password_reset_token]);\n\t\t\t\t$this->link = Html::a(Html::encode($resetLink), $resetLink);\n\t\t\t\t$this->name = $user->profile->name;\n\t\t\t\t\n\t\t\t\tif($emailTemp)\n\t\t\t\t{\n\t\t\t\t\tforeach(\\app\\modules\\emailtemp\\models\\Emailtemp::getVarsArray() as $var => $d)\n\t\t\t\t\t{\n\t\t\t\t\t\t$emailTemp->subject = str_replace('['.$var.']', (isset($this->{$var}))?$this->{$var}:'', $emailTemp->subject);\n\t\t\t\t\t\t$emailTemp->body = str_replace('['.$var.']', (isset($this->{$var}))?$this->{$var}:'', $emailTemp->body);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $mailer->compose()\n\t\t\t\t\t->setTo($this->email)\n\t\t\t\t\t->setFrom([$setFrom => $this->sitename])\n\t\t\t\t\t->setReplyTo([$setFrom => $this->sitename])\n\t\t\t\t\t->setSubject($emailTemp->subject)\n\t\t\t\t\t->setHtmlBody($emailTemp->body)\n\t\t\t\t\t->send();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn $mailer->compose('@app/modules/user/mails/passwordReset', ['user' => $user], ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'])\n ->setFrom([$setFrom => $this->sitename . ' robot'])\n\t\t\t\t\t->setReplyTo([$setFrom => $this->sitename])\n ->setTo($this->email)\n ->setSubject('Восстановление пароля на ' . $this->sitename)\n ->send();\n\t\t\t\t}\n }\n }\n return false;\n }", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" }, { "docid": "f4d198025e8c6d03c0e7fc47b8a6cb80", "score": "0.60045695", "text": "public function getReminderEmail()\n\t{\n\t\treturn $this->email;\n\t}", "title": "" } ]
f95a69f950864623cc3526f5c22009e7
/$module = Module::where('identifier',1)>first(); dd(Gate::allows('update', $module));
[ { "docid": "822b61eb6bc65fe6f95e48ecdb8a8021", "score": "0.0", "text": "public function list(Request $request)\n {\n\n\t\t$query = User::select('users.*',\n DB::raw('CONCAT(users.nombres,\" \",users.apellidos) as nombre'),\n DB::raw('CONCAT(municipios.nombre,\" - \",departamentos.nombre) as municipio')\n )\n\t\t\t\t->join('municipios','users.municipio_id','=','municipios.id')\n\t\t\t\t->join('departamentos','municipios.departamento_id','=','departamentos.id')\n\t\t\t\t->where('rol','Usuario');\n\n \t$table = new TableJL1805($query, $request->config);\n\n \treturn $table->make();\n }", "title": "" } ]
[ { "docid": "61bbc015dfa7687b433163a80cd7d854", "score": "0.68484634", "text": "public function authorize()\n {\n //$this->id = 1;\n $album = Album::find($this->id);\n /*if(\\Gate::denies('update',$album)){\n\n return false;\n }*/\n return true;\n }", "title": "" }, { "docid": "bed82ef22f48be7108f6edef433934d4", "score": "0.6759656", "text": "public function authorize()\n {\n // return Gate::allows('update', $this->route('project'));\n return Gate::allows('update', $this->project());\n }", "title": "" }, { "docid": "3a500b8b5d5ed21c8f5f31622cd0afa9", "score": "0.6609541", "text": "public function authorize()\n {\n return Gate::allows('edit_listing');\n }", "title": "" }, { "docid": "3a500b8b5d5ed21c8f5f31622cd0afa9", "score": "0.6609541", "text": "public function authorize()\n {\n return Gate::allows('edit_listing');\n }", "title": "" }, { "docid": "41ee273be2ff80d71a4d327e064488ea", "score": "0.66088074", "text": "public function authorize()\n {\n // return $this->user()->can('update', $this->route('id'));\n return true;\n }", "title": "" }, { "docid": "8dc5c93b31b2a0f7139676e8b7fa67ef", "score": "0.6512343", "text": "public function authorize()\n {\n return Gate::allows('update', $this->video);\n }", "title": "" }, { "docid": "2d84f86cc9c91724d59a8b95ac4cdd7f", "score": "0.64775074", "text": "public function authorize()\n {\n return \\Gate::allows('edit', $this->company);\n }", "title": "" }, { "docid": "cb11334e65810a763845b44eb40533b1", "score": "0.643004", "text": "public function authorize()\n {\n return Gate::allows('admin.brand.edit', $this->brand);\n }", "title": "" }, { "docid": "379227ee9b273ea7728f70dc15f88dd0", "score": "0.6366853", "text": "public function authorize()\n {\n $ability = $this->method()=='POST' ? 'store':'update';\n\t\t$params = $this->method()=='POST' ? Section::class : $this->route()->parameters()['section'];\n return Gate::allows($ability,$params);\n }", "title": "" }, { "docid": "164667b051da06fbe91c726038f3240e", "score": "0.636515", "text": "public function authorize()\n {\n\t\treturn true;//middleware handles authentication\n\n\t //$postId = $this->route('post');\n\t\t//return Gate::allows('update', Post::findOrFail($postId));\n }", "title": "" }, { "docid": "014d8f1dd648dc39fa2656577af3cc6a", "score": "0.6364853", "text": "public function authorize()\n {\n return true; //Gate::allows('admin.user.edit', $this->user);\n }", "title": "" }, { "docid": "a785d24dd28eced56fa6dfa4e4ed8a7c", "score": "0.6284363", "text": "public function authorize()\n {\n return Gate::authorize('update', $this->route('project'))->allowed();\n }", "title": "" }, { "docid": "617ec1ff93677112a046b0f17cede294", "score": "0.62687397", "text": "function checkAccess($module_id)\n{\n //Get user role\n $role_id = \\Auth()->user()->role_id;\n //Check if user has an access\n return \\App\\Models\\Access::checkAccess($role_id, $module_id); \n}", "title": "" }, { "docid": "cc63b6ebbef2634c1dc0cfbf6566605f", "score": "0.6232476", "text": "public function authorize()\n {\n $cour = $this->route('cour');//Cours::where('uuid',$this->route('cour'))->first();\n return $cour && $this->user()->can('cours-update', $cour);\n }", "title": "" }, { "docid": "226e9d50788e82dec7189cdce6f98b75", "score": "0.6221521", "text": "public function authorize()\n {\n return Gate::allows('return', Borrowing::class);\n }", "title": "" }, { "docid": "bcb3753635492f77f1cbe9e1bc4e6e70", "score": "0.620277", "text": "function checkAccess($module_id) {\n //Get user role\n $role_id = \\Auth()->user()->role_id;\n //Check if user has an access\n return \\App\\Models\\Access::checkAccess($role_id, $module_id);\n}", "title": "" }, { "docid": "0770d0a40e9cb9448cc3f770764694c2", "score": "0.6182501", "text": "public function authorize() {\n\t\t$this->sportManager = $this->route('sportManager');\n\t\treturn $this->user()->can('update', $this->sportManager);\n\t}", "title": "" }, { "docid": "89c92e0afe50c79ec1b1a344b3e73eb7", "score": "0.617039", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->getDemandItem());\n }", "title": "" }, { "docid": "97c1ce36eab6de75d019fcad049383d8", "score": "0.616714", "text": "public function authorize()\n {\n return fjord_user()->can('update fjord-role-permissions');\n }", "title": "" }, { "docid": "b528fffb11ead3587dc46c790bd5e357", "score": "0.6103761", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->company_gateway);\n }", "title": "" }, { "docid": "e95f3f6d190e9ce128042efce3a47beb", "score": "0.60849446", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('transaction'));\n }", "title": "" }, { "docid": "4ca584ec21664251a3e015d2a5555eb7", "score": "0.6050369", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('kiosk'));\n }", "title": "" }, { "docid": "6e253db068e00226c580b491913c897f", "score": "0.6043193", "text": "public function authorizePatch()\n {\n return $this->user()->can('scripts.update');\n }", "title": "" }, { "docid": "be8253d2fb681960d82362c65a9619c5", "score": "0.60369956", "text": "public function update()\n {\n // Update $user authorization to update $outlet here.\n // return true;\n return true;\n }", "title": "" }, { "docid": "b31e986857d2ca15ffd9b586581a7f89", "score": "0.6033435", "text": "public function getUpdateAttribute()\n {\n // $this ===> model en cours\n // dd($this->appends) ;\n return Gate::check('update-course', $this) ;\n\n }", "title": "" }, { "docid": "9d8ff9689c261af41b3dfb991ec7b49e", "score": "0.6022112", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('client'));\n }", "title": "" }, { "docid": "2550c29d20878873190e63b82f25b88e", "score": "0.6017009", "text": "public function authorize()\n {\n return Gate::allows('admin.tipo.edit', $this->tipo);\n }", "title": "" }, { "docid": "e4e3e3780c3741387467830133b68d65", "score": "0.60160196", "text": "public function authorize()\n {\n return $this->can('edit-unit');\n }", "title": "" }, { "docid": "8c802aea9b99d17f430117a76310627d", "score": "0.5987478", "text": "public function authorize()\n {\n return auth()->user()->can('update', $this->tax_rate);\n }", "title": "" }, { "docid": "e0c1f680b1d535de51279b8f866fefcc", "score": "0.5984091", "text": "public function authorize()\n {\n if ($this->route('import_mshp_charge_code')) { // If ID we must be changing an existing record\n return Auth::user()->can('import_mshp_charge_code update');\n } else { // If not we must be adding one\n return Auth::user()->can('import_mshp_charge_code add');\n }\n\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "5fcc7ba03cbc045a35c20a0a77b89bad", "score": "0.59813946", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "b51817a0715eb2844c455f62731366e1", "score": "0.5976071", "text": "public function authorize()\n {\n return true; //admin guard\n }", "title": "" }, { "docid": "19e3ed2f493c27435f6da211c7d44028", "score": "0.5966277", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "title": "" }, { "docid": "19e3ed2f493c27435f6da211c7d44028", "score": "0.5966277", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return \\Auth::check();\n }", "title": "" }, { "docid": "90653e7e24c4757471b6a34e8c94a840", "score": "0.59079653", "text": "public function authorize()\n {\n return Gate::allows('admin', $this->route('team'));\n }", "title": "" }, { "docid": "224b76b4676daafb071660927be575db", "score": "0.5905713", "text": "public function authorize()\n {\n return \\Auth::user()->can('edit-sport');\n }", "title": "" }, { "docid": "585ccfa1f4ae9ac8d360fdf47c086d2a", "score": "0.5893225", "text": "public function authorize()\n {\n return $this->user()->can('updateMembers', \\App\\Models\\Building::find($this->id));\n }", "title": "" }, { "docid": "d2c7d026d63c4c87f963abb5491600d3", "score": "0.581791", "text": "public function authorize()\n {\n // only allow updates if the user is logged in\n return true;\n }", "title": "" }, { "docid": "07858495ff40c040c94d193759e82445", "score": "0.5817186", "text": "public function authorize()\n {\n return true;\n // return policy(User::class)->updatePassword($this->user());\n }", "title": "" }, { "docid": "b0cc5e6825f1ac08c460464baa3f55a4", "score": "0.5805954", "text": "protected function gate()\n {\n Gate::define('accessNova', function (Account $account) {\n return $account->can('use-permission', 'nova');\n });\n }", "title": "" }, { "docid": "7d1b3db8b439d9feccd2d7664fbe2d47", "score": "0.5777609", "text": "public function authorize()\n {\n// return true;\n return $this->user()->isAdmin();\n }", "title": "" }, { "docid": "fde35a517103107f563ff40b3fa3df84", "score": "0.57703483", "text": "public function authorize()\n {\n $project = $this->route('project');\n return $project && $this->user()->can('update', $project);\n }", "title": "" }, { "docid": "d458b2b44b9f34c5c453248cb4ed0484", "score": "0.5770126", "text": "public function authorize()\n {\n return Gate::allows('admin.filter.create');\n }", "title": "" }, { "docid": "d5de01c1d859265c7c1fce173678c18e", "score": "0.57618743", "text": "public function testAdminsCanUpdateAnyBooking()\n {\n $admin = factory(User::class)->states('admin')->create();\n $user = factory(User::class)->create();\n\n $booking = factory(Booking::class)->create();\n\n $this->assertTrue($admin->can('update', $booking));\n $this->assertFalse($user->can('update', $booking));\n }", "title": "" }, { "docid": "67a2163306625d95c183e9c58e26b851", "score": "0.57451147", "text": "public function authorize()\n\t{\n $lesson = Lesson::find($this->input('lesson_id'));\n\n $product = $lesson->product;\n\n $users = $product->owner()->lists('id')->toArray();\n\n\t\treturn in_array(Auth::id(), $users);\n\n\n\n\n\n\t}", "title": "" }, { "docid": "33030f4ba76cfd33751e3d0382de24c9", "score": "0.5724321", "text": "public function authorize()\n {\n /** @var User $loggedInUser */\n $loggedInUser = Auth::user();\n /** @var Route $route */\n $route = $this->route();\n /** @var User $updateUser */\n $updateUser = $route->parameter('user');\n\n // Policyによる権限制御を行う\n return $loggedInUser->can('update', $updateUser);\n }", "title": "" }, { "docid": "0b226ca561b9e772e0b6439dc84750ac", "score": "0.5688671", "text": "public function authorize()\n {\n return Gate::allows('admin.mark.create');\n }", "title": "" }, { "docid": "712589f6398c2df5ce0cb2960f5d950e", "score": "0.56847906", "text": "public function authorize()\n {\n return access()->can('edit-project');\n }", "title": "" }, { "docid": "f7d456501c55b2a32a464d791fcc6879", "score": "0.56799585", "text": "public function authorize()\n {\n return access()->allow('store-product');\n }", "title": "" }, { "docid": "f7d456501c55b2a32a464d791fcc6879", "score": "0.56799585", "text": "public function authorize()\n {\n return access()->allow('store-product');\n }", "title": "" }, { "docid": "c818676a8659848b947846940ee23cf3", "score": "0.56693506", "text": "public function authorize()\n {\n $cause = Cause::find($this->route('cause'));\n\n return $cause && $this->user()->can('update', $cause);\n }", "title": "" }, { "docid": "b9c1ef957e3679cb230f341092c920ab", "score": "0.56668997", "text": "public function authorize(): bool\n {\n // Only allow updates if the user is a logged in Admin.\n return backpack_auth()->check();\n }", "title": "" }, { "docid": "30e74717b86ffd409e009d19ec255fe8", "score": "0.56520337", "text": "protected function _isAllowed()\n {\n return true;\n }", "title": "" }, { "docid": "30e74717b86ffd409e009d19ec255fe8", "score": "0.56520337", "text": "protected function _isAllowed()\n {\n return true;\n }", "title": "" }, { "docid": "50da7aa39879ba94e083b88c24d63e65", "score": "0.5649576", "text": "public function authorize()\n {\n return true;\n // $post = $this->route('post');\n // if ($this->user()->can('update', $post)) {\n // return true;\n // } else {\n // return false;\n // }\n }", "title": "" }, { "docid": "6005e38b12b62785d05ca199a6dfddeb", "score": "0.56455237", "text": "public function authorizePatch()\n {\n return $this->user()->can('taxonomies.update');\n }", "title": "" }, { "docid": "7c805879073c62894f1f547a2c9e20a8", "score": "0.56402904", "text": "public function authorize()\n {\n try{\n $user = (new UsersRepository(new User()))->findById($this->route()->parameter('customer_id'));\n return ($this->user()->can('edit','users',$user));\n }catch(\\Exception $e){\n return false;\n }\n }", "title": "" }, { "docid": "28fc8798783482c9e8bb3217c2abddee", "score": "0.56387854", "text": "public function authorize()\n {\n return Auth()->user()->can('isAdmin');\n }", "title": "" }, { "docid": "28fc8798783482c9e8bb3217c2abddee", "score": "0.56387854", "text": "public function authorize()\n {\n return Auth()->user()->can('isAdmin');\n }", "title": "" }, { "docid": "4262ba9326193c979b45d268ceffc983", "score": "0.5634713", "text": "public function authorize()\n {\n// $req_province = Province::find($this->route('admin.localization.save'));\n// return $req_province && $this->user()->can('update', $req_province);\n\treturn true;\n }", "title": "" }, { "docid": "ce54588fa87f302b9da4640381de52bd", "score": "0.5629997", "text": "public function __isAllowed();", "title": "" }, { "docid": "01c43f467a1eafa0f2ca52d19e881508", "score": "0.5624635", "text": "protected function _isAllowed()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "9b61fec3e7a69ac4cfb7dc190a1651b5", "score": "0.5618314", "text": "public function authorize()\n\t{\n\t\t// only allow updates if the user is logged in\n\t\treturn \\Auth::check();\n\t}", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "2179b64b45aef57f6733874dd8d4a887", "score": "0.56022406", "text": "public function authorize(){\n return true;\n }", "title": "" }, { "docid": "960e9631e044021e46f28c40ce4bba47", "score": "0.55986977", "text": "public function authorize()\n {\n return Gate::authorize('manage-discounts');\n }", "title": "" }, { "docid": "a6bb376108d1fed76036cb4c3602b36f", "score": "0.5591874", "text": "public function authorize()\n {\n// return true;\n return Auth::guard('admin')->check();\n }", "title": "" }, { "docid": "89d39d6f66a7fe392c572b9e911ae67c", "score": "0.55794907", "text": "public function authorize()\n {\n if ($this->route('applicant')) { // If ID we must be changing an existing record\n return Auth::user()->can('applicant edit');\n } else { // If not we must be adding one\n return Auth::user()->can('applicant add');\n }\n }", "title": "" }, { "docid": "ec1aae59c0cacdd143d7eab58b9fd988", "score": "0.55776614", "text": "public function __construct()\n {\n //$this->middleware('can:update,Text')->only('update');\n }", "title": "" }, { "docid": "3b7610c368797598fcf1aba629a803c9", "score": "0.5576245", "text": "public function authorize()\n {\n\t\t$business = Business::find($this->route('businessId'));\n return ($business && $this->user()->can('update', $business) && $this->user()->can('create', Service::class));\n }", "title": "" }, { "docid": "13b9c51700b3ebbf099b4743abcd1f21", "score": "0.5566712", "text": "public function authorize()\n {\n return true;\n }", "title": "" }, { "docid": "bda1140fb238bd4ef2e9656db86ec504", "score": "0.5565001", "text": "public function update(Request $request, string $name): bool\n {\n $module = Module::find($name);\n if ($module) {\n $command = 'module:' . ($request->get('status') ? 'enable ' : 'disable ');\n\n Artisan::call(\"$command$name\");\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c1ebca8e80f33918e7cdc7716b7c1f29", "score": "0.55616903", "text": "function hasAccessAssign($model, $method, $role)\n{\n if($role->all_access) {\n return true;\n } else {\n $access = Access::where([\n ['model_name', $model], ['method_name', $method]\n ])->first();\n\n if($access) {\n $access_role = AccessRole::where([\n ['access_id', '=', $access->id], ['role_id', $role->id]\n ])->first();\n\n return $access_role ? true : false;\n } else {\n return false;\n }\n }\n}", "title": "" }, { "docid": "f89159043d2e01869930c8afaa595ec4", "score": "0.5553729", "text": "public function authorize()\n {\n// if ((int)$this->get('kits_weighed') != $this->route('litters')->kitsCount())\n// return false;\n\n return true;\n }", "title": "" }, { "docid": "8961e901bb71731c45c8b22b836b0461", "score": "0.5544042", "text": "public function authorize()\n {\n return access()->allow('create-entrance-exam-score');\n }", "title": "" }, { "docid": "5318a611cc1d619748974fda8645034c", "score": "0.55435485", "text": "public function authorize()\n {\n return Gate::check('admin.can_manage_users');\n }", "title": "" }, { "docid": "7a4fe66b8631a5a65e1d64e64a732f5a", "score": "0.55402905", "text": "public function authorize()\n {\n return true;\n\n }", "title": "" }, { "docid": "aa6ab8ebd3610aea63f08344f99bbfbd", "score": "0.55365044", "text": "public function update(Request $request, Module $module)\n {\n $request->validate([\n 'name' => 'required',\n 'details' => 'required'\n ]);\n\n $module->update($request->all());\n \n return redirect()->route('admin.modules.index')\n ->with('success','Module is updated successfully');\n\n }", "title": "" }, { "docid": "4d64e7620a08f5d1c5d76fffff8799a3", "score": "0.5535126", "text": "public function authorize()\n { \n return true;\n\n }", "title": "" }, { "docid": "5c66d07e9adb06a5c89197a05d46b4dd", "score": "0.553404", "text": "public function isModeratable();", "title": "" }, { "docid": "134470b3c8b7029194da14f730ed05ef", "score": "0.5525567", "text": "public function authorize()\n {\n return $this->post\n ? $this->user()->can('update', $this->post)\n : $this->user()->can('store', Post::class);\n }", "title": "" }, { "docid": "2399bc20f6fa4cac10f1ea8c0c0688d1", "score": "0.5519974", "text": "public function authorize()\n { \n return true;\n }", "title": "" }, { "docid": "278e0022c0773da94d0e3454545785c3", "score": "0.5518238", "text": "public function update(Request $request, Ability $ability)\n {\n //\n }", "title": "" }, { "docid": "3cee86fa82cd8be090d68d6823f094a3", "score": "0.5514796", "text": "public function authorize() { \n return true;\n }", "title": "" }, { "docid": "b22624928958ba8916ec876cc65bd8ad", "score": "0.55132496", "text": "public function update(Request $request, $id)\n {\n $module = DB::table('module')->where('moduleID' ,$id)->first();\n\n $validate_moduleName = $request->input('module_name');\n\n // Validate for duplicate Module Name in other rows\n if(Module::where('moduleID', '!=', $module->moduleID )->where('moduleName', $validate_moduleName)->exists() ){\n\n return redirect()->back()->with('error', 'Module Name exists! Please enter a different name.');\n }\n else{\n\n DB::table('module')\n ->where('moduleID', $id)\n ->update(['lecturerID' => $request->input('module_lecturer'),\n 'moduleName' => $request->input('module_name'),\n 'credit_Unit' => $request->input('module_credit'),\n 'trimester' => $request->input('module_trimester')]);\n\n return redirect()->intended('view_module/'.$module->courseID)->with('message', 'Module have been updated successfully!');\n\n }\n// $module = DB::table('module')->where('moduleID' ,$id)->first();\n//\n// $validate_moduleName = $request->input('module_name');\n//\n// // if Module Name remain unchanged\n// if($validate_moduleName == $module->moduleName){\n// DB::table('module')\n// ->where('moduleID', $id)\n// ->update(['lecturerID' => $request->input('module_lecturer')]);\n//\n// DB::table('module')\n// ->where('moduleID', $id)\n// ->update(['credit_Unit' => $request->input('module_credit')],\n// ['trimester' => $request->input('module_trimester')]);\n//\n// return redirect()->intended('view_module/'.$module->courseID)->with('message', 'Module Lecturer In-Charge have been updated successfully!');\n//\n// }\n// // change in Module Name\n// else\n// {\n// // Validate for duplicate Module Name in other rows\n// if(Module::where('moduleID', '!=', $module->moduleID )->where('moduleName', $validate_moduleName)->exists() ){\n//\n// return redirect()->back()->with('error', 'Module Name exists! Please enter a different name.');\n// }\n// else{\n//\n// if ($request->input('module_lecturer') == $module->lecturerID)\n// {\n// DB::table('module')\n// ->where('moduleID', $id)\n// ->update(['moduleName' => $validate_moduleName]);\n//\n// return redirect()->intended('view_module/'.$module->courseID)->with('message', 'Module Name have been updated successfully!');\n// }\n// else{\n// DB::table('module')\n// ->where('moduleID', $id)\n// ->update(['lecturerID' => $request->input('module_lecturer'),\n// 'moduleName' => $validate_moduleName\n// ]);\n//\n// return redirect()->intended('view_module/'.$module->courseID)->with('message', 'Module Lecturer In-Charge and Name have been updated successfully!');\n//\n// }\n// }\n//\n// }\n\n\n }", "title": "" } ]
694aef84422ab55d163981e177fc7792
Returns the identifier of this node. This UUID is not the same as the technical persistence identifier used by Flow's persistence framework. It is an additional identifier which is unique within the same workspace and is used for tracking the same node in across workspaces. It is okay and recommended to use this identifier for synchronisation purposes as it does not change even if all of the nodes content or its path changes.
[ { "docid": "297a58d8c6c16b7e76bfe5dc15199a78", "score": "0.64191663", "text": "public function getIdentifier() {\n\t\treturn $this->identifier;\n\t}", "title": "" } ]
[ { "docid": "13fa10245baaad3cc40d3c1f6a959933", "score": "0.6928963", "text": "public function getIdentifier() {\n\n\t\t// String Prefix muss vorhanden sein -> reiner Zahlenwert wirft Exception nach dem Absenden\n\t\t// @see: https://wiki.typo3.org/Exception/CMS/1210858767\n\t\treturn md5($this->contentObject->data['uid']);\n\t}", "title": "" }, { "docid": "54351ed618a04263481c9364e26669c9", "score": "0.6896004", "text": "public function getNodeID() : string\n {\n return $this->nodeID;\n }", "title": "" }, { "docid": "720e8013da982d36c5d6320c22805805", "score": "0.68144643", "text": "public function getId()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "58957fc804b27f522c82343170102b3d", "score": "0.68137336", "text": "public function getNodeId();", "title": "" }, { "docid": "962608a653b4f1bbcc87d1a2d860a8d8", "score": "0.67642194", "text": "public function getNodeId()\n\t{\n\t\treturn $this->_node_id;\n\t}", "title": "" }, { "docid": "68902b512b3384e4836522c4aa77c20a", "score": "0.67510337", "text": "public function get_identifier() {\n return $this->identifier;\n }", "title": "" }, { "docid": "e3750d14d442556b5d4ce35105596a8c", "score": "0.674594", "text": "public function identifier()\n {\n return $this->id;\n }", "title": "" }, { "docid": "530e3e689eea6814025a5ba22ad2f0f5", "score": "0.67299557", "text": "public function getUniqueId() {\n return $this->id;\n }", "title": "" }, { "docid": "9b3b4072f105ec8a2991c47bb56e04db", "score": "0.6723465", "text": "public function getIdentifier()\n {\n return $this->id;\n }", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.6719953", "text": "public function getUniqueId();", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.6719953", "text": "public function getUniqueId();", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.6719953", "text": "public function getUniqueId();", "title": "" }, { "docid": "3b4e998fc640fbca64186e30a1309d06", "score": "0.66953814", "text": "public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}", "title": "" }, { "docid": "3b4e998fc640fbca64186e30a1309d06", "score": "0.66953814", "text": "public function getUuid() {\n\t\treturn $this->Persistence_Object_Identifier;\n\t}", "title": "" }, { "docid": "82232df25ca1412f516817cb0b811a04", "score": "0.6691564", "text": "public function getUniqueId()\n {\n return $this->uniqueId;\n }", "title": "" }, { "docid": "f4861d3f06a0ea12d04ec8028eb976c4", "score": "0.6682829", "text": "public function getIdentifier()\n {\n return $this->uid;\n }", "title": "" }, { "docid": "431ddfe90c434d41a661b7e675989b85", "score": "0.6655167", "text": "public function getUniqueId()\n {\n return $this->getParent()->getUniqueId() . \"_cg\" . $this->getId();\n }", "title": "" }, { "docid": "3ae8f5b08a758a314e3522148d2edb07", "score": "0.6643505", "text": "public function id(): string\n {\n if ($this->id) {\n return $this->id;\n }\n\n if ($this->name) {\n return $this->id = $this->generateIdByName();\n }\n\n return $this->id = Str::random(4);\n }", "title": "" }, { "docid": "36e7bd1368619811498f86417d97b2fb", "score": "0.6618131", "text": "public function getUniqueId()\n {\n return $this->unique_id;\n }", "title": "" }, { "docid": "bda8c4d069021797ee443c5af43a5012", "score": "0.6608551", "text": "public function getNodeId()\n {\n return $this->nodeId;\n }", "title": "" }, { "docid": "085f2ea989122ff45bc1a8fb0f015dc7", "score": "0.657842", "text": "public function getUniqueId()\n {\n return $this->_uniqueId;\n }", "title": "" }, { "docid": "1e603477b71eed50bc14c853e7bcbacb", "score": "0.6563999", "text": "public function getId()\n {\n return md5(serialize([\n $this->no,\n $this->price,\n $this->weight\n ]));\n }", "title": "" }, { "docid": "7749c7697d79a7eca145e33affef8064", "score": "0.6547322", "text": "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "7749c7697d79a7eca145e33affef8064", "score": "0.6547322", "text": "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "7749c7697d79a7eca145e33affef8064", "score": "0.6547322", "text": "public function getIdentifier(): string\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "2a49798df55828bea9ef89121b2a79fe", "score": "0.65086854", "text": "public function getIdentifier()\n {\n\n return $this->identifier;\n\n }", "title": "" }, { "docid": "7240235490d4e065d72fc74cd6364250", "score": "0.65036327", "text": "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "title": "" }, { "docid": "7240235490d4e065d72fc74cd6364250", "score": "0.65036327", "text": "public function getIdentifier() : string\n\t{\n\t\treturn $this->identifier;\n\t}", "title": "" }, { "docid": "016550c170fdacd565819b95971a5f07", "score": "0.64771223", "text": "public static function id()\n {\n if (!ServerHelper::coroutineIsEnabled()) {\n return 0;\n }\n\n return SwCoroutine::getuid();\n }", "title": "" }, { "docid": "156d8ad17eea32eead4dabb554ff21d0", "score": "0.64749104", "text": "abstract public function getUniqueId();", "title": "" }, { "docid": "529f2ad2afdf89283c3dda4e0c1ccabf", "score": "0.6456148", "text": "function getGuid() {\n\t return $this->node->getText();\n\t}", "title": "" }, { "docid": "26f22e99f78c4b9281bac9116032e79d", "score": "0.6453617", "text": "public function identifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "eec28a2692ba818804f5cd9e70a9e4c1", "score": "0.64444494", "text": "public function getUniqueId()\n {\n return '';\n }", "title": "" }, { "docid": "0eb1a0dd648b30e46128ca4159c71fa2", "score": "0.6434811", "text": "public function getIdentifier()\n\t{\n\t\treturn $this->identifier;\n\t}", "title": "" }, { "docid": "d4b00d26fd6bf2efc085d378a7f2fd30", "score": "0.64143836", "text": "public function getId()\n {\n if ($this->id === null) {\n return $this->getMyName();\n }\n\n return $this->id;\n }", "title": "" }, { "docid": "89517d578e9013b3486baf35dc95c51e", "score": "0.64136064", "text": "function celerity_generate_unique_node_id() {\n static $uniq = 0;\n $response = CelerityAPI::getStaticResourceResponse();\n $block = $response->getMetadataBlock();\n\n return 'UQ'.$block.'_'.($uniq++);\n}", "title": "" }, { "docid": "c64ce7296499c9382e6670265658089a", "score": "0.64108163", "text": "public function getIdentifier() {\n return $this->identifier;\n }", "title": "" }, { "docid": "c64ce7296499c9382e6670265658089a", "score": "0.64108163", "text": "public function getIdentifier() {\n return $this->identifier;\n }", "title": "" }, { "docid": "f85212ee17eac6ed96db5d338f70f08c", "score": "0.639588", "text": "public function uniqueId(): string\n {\n return $this->person->id;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "8a9613bfcbfeaa0fc6d8034b68bbeff3", "score": "0.6393428", "text": "public function getIdentifier()\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "695f770fdaa5e90e99af94c71f8f259d", "score": "0.6363048", "text": "public function getUUID()\n {\n return $this->uUID;\n }", "title": "" }, { "docid": "695f770fdaa5e90e99af94c71f8f259d", "score": "0.6363048", "text": "public function getUUID()\n {\n return $this->uUID;\n }", "title": "" }, { "docid": "695f770fdaa5e90e99af94c71f8f259d", "score": "0.6363048", "text": "public function getUUID()\n {\n return $this->uUID;\n }", "title": "" }, { "docid": "91068aa5727d1b46b0885a3b4eda7c74", "score": "0.6356276", "text": "public function getUuid(): string\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "0e7787cc505fe81b1555aa0ff8a20d06", "score": "0.6346477", "text": "public function getIdentifier()\n {\n return $this->_identifier;\n }", "title": "" }, { "docid": "0e7787cc505fe81b1555aa0ff8a20d06", "score": "0.6346477", "text": "public function getIdentifier()\n {\n return $this->_identifier;\n }", "title": "" }, { "docid": "0e7787cc505fe81b1555aa0ff8a20d06", "score": "0.6346477", "text": "public function getIdentifier()\n {\n return $this->_identifier;\n }", "title": "" }, { "docid": "0e7787cc505fe81b1555aa0ff8a20d06", "score": "0.6346477", "text": "public function getIdentifier()\n {\n return $this->_identifier;\n }", "title": "" }, { "docid": "2983ff70c6a27f93d93b1effabde52bf", "score": "0.6336234", "text": "public function getId()\n {\n if (!$this->id) {\n $this->id = md5(uniqid(rand(), true));\n }\n return $this->id;\n }", "title": "" }, { "docid": "f616a8ae171902075be21951e68d6fd6", "score": "0.63187504", "text": "public function getIdentifier() {\n\t\tif (empty($this->_id) && $this->_hasCategory) {\n\t\t\t$this->_id = $this->_getCategory()->getId();\n\t\t}\n\t\treturn $this->_id;\n\t}", "title": "" }, { "docid": "5ba5f9aba4024497eb63f57bf5184713", "score": "0.63126606", "text": "public function get_uuid() \n {\n return $this->uuid;\n }", "title": "" }, { "docid": "f80316301fad03e8ca22b4fdedcac336", "score": "0.6307221", "text": "public function getUuid()\n {\n return !empty($this->uuid) ? $this->uuid : '';\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.62929064", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.62929064", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "e5b1f6b2bb8d73230b10091452b7f432", "score": "0.62929064", "text": "public function getUuid()\n {\n return $this->uuid;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "cf086510bcaf21e525eb64fb3271a68f", "score": "0.62827206", "text": "public function getId(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "6ea85aaa7c84724f471ebbcb09f6e93d", "score": "0.62780505", "text": "public function getId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "6ea85aaa7c84724f471ebbcb09f6e93d", "score": "0.62780505", "text": "public function getId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "e810769a1c11ac125edf6a241ae398b3", "score": "0.62775385", "text": "protected function getUniqueId() {\n return -1; // Placeholder return for now\n }", "title": "" }, { "docid": "78b58e3efda9dcca264ffde62dd907ae", "score": "0.627066", "text": "public function uniqueId()\n {\n return $this->transaction->id;\n }", "title": "" }, { "docid": "8614bc4276454c807f170468f687f6c7", "score": "0.6266888", "text": "final public function getId(){\n\t\tif($this->_id === false){\n\t\t\t$this->_id = $this->getNextId();\n\t\t}\n\t\treturn get_class($this) . \"_\" . $this->_id;\n\t}", "title": "" }, { "docid": "c4fa683e0ebe94bdec529778166b13b4", "score": "0.6263113", "text": "public function getIdentifier()\n {\n return $this->slug ?: $this->id;\n }", "title": "" }, { "docid": "5f914df7faad8808b0725d8c7b25f6f8", "score": "0.62617797", "text": "public function getIdentifier()\n {\n return isset($this->Identifier) ? $this->Identifier : null;\n }", "title": "" }, { "docid": "fbdbf4c28b204a18b8d7c1820d43e608", "score": "0.6260678", "text": "public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }", "title": "" }, { "docid": "fb7e901ac6a3595239e08e905cd2bd43", "score": "0.6260345", "text": "public static function getId() {\n return isset(self::$id)\n ? self::$id\n : (self::$id = base_convert(crc32(self::getBaseDir()),16,32));\n\t}", "title": "" }, { "docid": "0d5dae43ed161ce244e29d6215e43a1f", "score": "0.6252603", "text": "public function getId()\n {\n return substr($this->_id, 0, 12);\n }", "title": "" }, { "docid": "b68000738a9069ea1b2ea028b16cd63e", "score": "0.62458", "text": "public function getSerialId()\n {\n return $this->get(self::_SERIAL_ID);\n }", "title": "" }, { "docid": "9904c7c660ffce1f0d32e115214b607f", "score": "0.62341547", "text": "public function getUniqueID()\n {\n return $this->uniqueID;\n }", "title": "" }, { "docid": "9904c7c660ffce1f0d32e115214b607f", "score": "0.62341547", "text": "public function getUniqueID()\n {\n return $this->uniqueID;\n }", "title": "" }, { "docid": "b1589255a1ac84d29b1ea228281c7ab0", "score": "0.62332976", "text": "public function getId()\n {\n return $this->_uid;\n }", "title": "" }, { "docid": "445890d9f664c7c1d12e2a8c220c19d2", "score": "0.62320495", "text": "public function getIdentifier()\n {\n $sellerId = ($this->getSeller()) ? $this->getSeller()->getId() : '';\n\n return $sellerId.$this->getAmount().$this->getCurrency();\n }", "title": "" }, { "docid": "caa750de9ebbef7bc8841cafd5f8cd95", "score": "0.6227521", "text": "public function getIdKey()\n {\n\n if (is_null($this->idKey))\n $this->idKey = BuizCore::uniqKey();\n\n return $this->idKey;\n\n }", "title": "" }, { "docid": "4a42ae38022de4da347108d14d363ba5", "score": "0.6223712", "text": "public function getId() : Uuid;", "title": "" }, { "docid": "a5a5d924f638055f430c9ac6839d79fd", "score": "0.6220918", "text": "public function getUuid() {\n return $this->uuid;\n }", "title": "" }, { "docid": "cf8e9a40a18f036762b38fc204bc1578", "score": "0.62183833", "text": "public function getId() : string {\n return $this->id;\n }", "title": "" }, { "docid": "e62fef728a4c739bccc10ba55ce14b87", "score": "0.6215832", "text": "public function id(): string\n {\n return $this->getAttribute('id');\n }", "title": "" }, { "docid": "76f05c88a28fcccb7f6f7eb8f251c9bf", "score": "0.62123305", "text": "public function getNodeKey(): string\n {\n return $this->nodeKey;\n }", "title": "" }, { "docid": "bcedbed2e008ee6c6a6027c81b9593d7", "score": "0.6208121", "text": "public function getId()\n {\n\t\treturn $this->_uid;\n\t}", "title": "" }, { "docid": "c1a7c9bc1b3611ee6329f28827f73f8d", "score": "0.62056226", "text": "public function getUUID()\n {\n return $this->getPointer();\n }", "title": "" }, { "docid": "e30902345222f7e736e6bcaea00b23fe", "score": "0.61992586", "text": "public function id() {\n\t\tif ( null === $this->_id ) {\n\t\t\t$this->_id = sha1( mt_rand() . microtime( true ) . mt_rand() );\n\t\t}\n\n\t\treturn $this->_id;\n\t}", "title": "" } ]
e717834e428c71668b3624c6debb8417
Delete the custom color schemes selected
[ { "docid": "7ce449ce6c0108d01dc3366aed4ccdd3", "score": "0.70209455", "text": "public function custom_colors_ajax_delete() {\n\n\t\tglobal $wpdb;\n\n\t\t// Check that the user has the right permissions.\n\t\tif ( ! current_user_can( 'switch_themes' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! empty( $_POST['data'] ) && isset( $_POST['data']['names'] ) && is_array( $_POST['data']['names'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification\n\n\t\t\t$existing_colors = get_option( 'avada_custom_color_schemes', [] );\n\t\t\t$post_data_names = wp_unslash( $_POST['data']['names'] ); // phpcs:ignore WordPress.Security\n\t\t\tforeach ( $post_data_names as $scheme_name ) {\n\t\t\t\t$scheme_name = sanitize_text_field( $scheme_name );\n\t\t\t\t// Remove from array of existing schemes.\n\t\t\t\tforeach ( $existing_colors as $key => $existing_color ) {\n\t\t\t\t\tif ( $existing_color['name'] === $scheme_name ) {\n\t\t\t\t\t\tunset( $existing_colors[ $key ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tupdate_option( 'avada_custom_color_schemes', $existing_colors );\n\n\t\t\techo wp_json_encode(\n\t\t\t\t[\n\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t'action' => '',\n\t\t\t\t]\n\t\t\t);\n\n\t\t}\n\t\tdie();\n\t}", "title": "" } ]
[ { "docid": "30af0036d3d21d05904c92dab30522fa", "score": "0.66294867", "text": "protected function removeColorPicker() {\n $setting = $this->getOptions();\n if (\n $setting['disable_color_picker'] == true\n ) {\n remove_action('admin_color_scheme_picker', 'admin_color_scheme_picker');\n }\n }", "title": "" }, { "docid": "32fdcf53f277cc87fe8dbe254ff7d975", "score": "0.6545703", "text": "function saveSchemesList() {\n global $_wp_admin_css_colors;\n\n if (count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker')) {\n update_option('wp_admin_color_schemes', $_wp_admin_css_colors);\n }\n }", "title": "" }, { "docid": "bf42e4276f876fa1b1e35529220c0b75", "score": "0.6433876", "text": "public function delete() {\n $this->load->auto('style/theme');\n if (($this->request->server['REQUEST_METHOD'] == 'POST')) {\n foreach ($this->request->post['selected'] as $id) {\n unlink(DIR_CSS . \"custom-\" . $id . \"-\" . $this->request->getQuery('template') . \".css\");\n $this->modelTheme->delete($id);\n }\n } else {\n unlink(DIR_CSS . \"custom-\" . $this->request->getQuery('id') . \"-\" . $this->request->getQuery('template') . \".css\");\n $this->modelTheme->delete($_GET['id']);\n }\n }", "title": "" }, { "docid": "0e49d1862fe40c9116dcbbb3ba7bcbc2", "score": "0.62509215", "text": "public static function uninstall() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"\n\t\t\tDELETE\n\t\t\tFROM $wpdb->postmeta\n\t\t\tWHERE meta_key LIKE 'im8_additional_css%'\";\n\t\t$wpdb->query($sql);\n\n\t\tdelete_option(self::get_instance()->option_name);\n\t}", "title": "" }, { "docid": "909397e101072e57078b5c40e71bb56f", "score": "0.62227446", "text": "function register_admin_color_schemes()\n {\n }", "title": "" }, { "docid": "e11fd51132bdc619947b3f2875c86af4", "score": "0.5788164", "text": "public function delete($id){\n\t\t$sql=\"DELETE FROM sy_color_codes WHERE id = ?\";\n\t\t$req = $this->runRequest($sql, array($id));\n\t}", "title": "" }, { "docid": "5798652ad0420c037e59b5d8677acaa6", "score": "0.5784699", "text": "function wooadmin_admin_color_scheme() {\n\n global $_wp_admin_css_colors;\n\n $_wp_admin_css_colors = 0;\n\n}", "title": "" }, { "docid": "e248f2950a026a885dc323924a26e39f", "score": "0.5774795", "text": "public function remove($scheme);", "title": "" }, { "docid": "c9452be0f188ddca6dbbb78a44561476", "score": "0.5676707", "text": "public function delete_color_once($id)\n {\n $item = $this->inuser_model->getFirstRowWhere('product_color',array(\n 'id' => $id\n ));\n\t\t// xoa anh trong thu muc\n\t\tif(file_exists($item->image)){\n @unlink($item->image);\n }\t\n\t\t$this->inuser_model->Delete_where('product_color',array('id' => $id));\n\t\t\n }", "title": "" }, { "docid": "eb4c48d51ec1606c04e0f36bd2f85d33", "score": "0.5660203", "text": "function remove_custom_background()\n {\n }", "title": "" }, { "docid": "eb5d940aaf876d1fb5b4f82d3649c9d3", "score": "0.5644371", "text": "function techfak_color_schemes() {\n\t$color_scheme_options = array(\n\t\t'blau' => array(\n\t\t\t'value' => 'blau',\n\t\t\t'label' => __( 'Blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-blau.png',\n\t\t),\n\t\t'graublau' => array(\n\t\t\t'value' => 'graublau',\n\t\t\t'label' => __( 'Blue-grey', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-graublau.png',\n\t\t),\n\t\t'karibikgruen' => array(\n\t\t\t'value' => 'karibikgruen',\n\t\t\t'label' => __( 'Caribic-green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-karibikgruen.png',\n\t\t),\n\t\t'gruen' => array(\n\t\t\t'value' => 'gruen',\n\t\t\t'label' => __( 'Green', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gruen.png',\n\t\t),\n\t\t'hellblau' => array(\n\t\t\t'value' => 'hellblau',\n\t\t\t'label' => __( 'Light-blue', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-hellblau.png',\n\t\t),\n\t\t'orange' => array(\n\t\t\t'value' => 'orange',\n\t\t\t'label' => __( 'Orange', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-orange.png',\n\t\t),\n\t\t'rot' => array(\n\t\t\t'value' => 'rot',\n\t\t\t'label' => __( 'Red', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-rot.png',\n\t\t),\n\t\t'gelb' => array(\n\t\t\t'value' => 'gelb',\n\t\t\t'label' => __( 'Yellow', '_rrze' ),\n\t\t\t'thumbnail' => get_template_directory_uri() . '/includes/images/color-scheme-gelb.png',\n\t\t),\n\n\t);\n\n\treturn apply_filters( 'techfak_color_schemes', $color_scheme_options );\n}", "title": "" }, { "docid": "d369322cc823af86bb4383b232a8c461", "score": "0.5620748", "text": "private function start_color_schemes() {\r\n\t\t$handler = 'unapp-style-overrides';\r\n\r\n\t\t$args = array(\r\n\t\t\t'fields' => $this->get_color_scheme(),\r\n\t\t\t'css' => Epsilon_Color_Scheme::load_css_overrides( get_template_directory() . '/assets/css/style-overrides.css' ),\r\n\t\t);\r\n\r\n\t\tEpsilon_Color_Scheme::get_instance( $handler, $args );\r\n\t}", "title": "" }, { "docid": "c2a9e664d315dc8d82a4979276481344", "score": "0.56187856", "text": "public static function uninstall() {\n // tenemos que borrar el custom post type\n // Es conveniente borrar todos los datos que ha generado el plugin en la BBDD\n }", "title": "" }, { "docid": "55cb79745a860e15d34ca3ae72e8c2cd", "score": "0.5591367", "text": "public function destroy(color $color)\n {\n \n }", "title": "" }, { "docid": "3de8fbf25eaeb2d613e67710d8c97e78", "score": "0.5548887", "text": "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "title": "" }, { "docid": "9664f388fcb51d744e0945808bdb9a3b", "score": "0.5518817", "text": "public function changeEditorColorPalette(): void\n\t{\n\t\t// Unable to use state due to this method is used in JS and store is not registered there.\n\t\t$colors = $this->getSettingsManifest()['globalVariables']['colors'] ?? [];\n\n\t\tif ($colors) {\n\t\t\t\\add_theme_support('editor-color-palette', $colors);\n\t\t}\n\t}", "title": "" }, { "docid": "ed9469ae5204ebfc54482adc24e75571", "score": "0.5514817", "text": "public static function uninstall()\n {\n global $wpdb;\n $query = \"DROP TABLE IF EXISTS \".$wpdb->prefix.\"glsl_background\";\n $wpdb->query($query);\n }", "title": "" }, { "docid": "3cf5b0df1d4798265632d573f09d6540", "score": "0.54993844", "text": "function opanda_sr_remove_style() { \n require_once OPANDA_SR_PLUGIN_DIR. '/includes/style-manager.class.php'; \n\n $themeId = isset( $_REQUEST['onp_theme_id'] ) ? $_REQUEST['onp_theme_id'] : null;\n $styleId = isset( $_REQUEST['onp_style_id'] ) ? $_REQUEST['onp_style_id'] : null; \n\n if ( !$themeId || !$styleId ) {\n echo json_encode( array('error' => '[Error] The theme id [onp_theme_id] or style id [onp_style_id] are not specified.') );\n exit;\n }\n\n $replaceWith = isset( $_REQUEST['onp_selected'] ) ? $_REQUEST['onp_selected'] : null;\n if ( $replaceWith ) {\n OnpSL_StyleManager::removeStyle($themeId, $styleId, $replaceWith);\n \n echo json_encode(array( 'success' => true ));\n exit;\n }\n\n $result = OnpSL_StyleManager::removeStyle($themeId, $styleId);\n if ( !$result ) {\n $styles = OnpSL_StyleManager::getStylesTitles( $themeId );\n unset($styles[$styleId]);\n \n echo json_encode(array(\n 'used' => true,\n 'styles' => $styles\n ));\n exit;\n }\n \n echo json_encode(array( 'success' => true ));\n exit;\n}", "title": "" }, { "docid": "05434feca87270c4350f7dd31db53b9d", "score": "0.5484316", "text": "public function custom_colors_ajax_save() {\n\n\t\tglobal $wpdb;\n\n\t\t// Check that the user has the right permissions.\n\t\tif ( ! current_user_can( 'switch_themes' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! empty( $_POST['data'] ) && isset( $_POST['data']['values'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification\n\n\t\t\t$existing_colors = get_option( 'avada_custom_color_schemes', [] );\n\n\t\t\tif ( ! empty( $_POST['data']['type'] ) && 'import' !== $_POST['data']['type'] ) { // phpcs:ignore WordPress.Security.NonceVerification\n\t\t\t\t$scheme = [];\n\t\t\t\t$scheme_colors = wp_unslash( $_POST['data']['values'] ); // phpcs:ignore WordPress.Security.NonceVerification, WordPress.Security.ValidatedSanitizedInput\n\t\t\t\t$scheme_name = isset( $_POST['data']['name'] ) ? sanitize_text_field( wp_unslash( $_POST['data']['name'] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification\n\n\t\t\t\tif ( defined( 'FUSION_BUILDER_PLUGIN_DIR' ) ) {\n\t\t\t\t\t$fb_options = get_option( 'fusion_options' );\n\t\t\t\t\tforeach ( $scheme_colors as $option => $value ) {\n\t\t\t\t\t\tif ( array_key_exists( $option, $fb_options ) ) {\n\t\t\t\t\t\t\t$scheme_colors[ $option ] = $fb_options[ $option ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$scheme[] = [\n\t\t\t\t\t'name' => $scheme_name,\n\t\t\t\t\t'values' => $scheme_colors,\n\t\t\t\t];\n\n\t\t\t\t// Check if scheme trying to be saved already exists, if so unset and merge.\n\t\t\t\tif ( isset( $_POST['data']['type'] ) && 'update' === $_POST['data']['type'] ) { // phpcs:ignore WordPress.Security.NonceVerification\n\t\t\t\t\t// Remove existing saved version and and merge in.\n\t\t\t\t\tforeach ( $existing_colors as $key => $existing_color ) {\n\t\t\t\t\t\tif ( $existing_color['name'] === $scheme_name ) {\n\t\t\t\t\t\t\tunset( $existing_colors[ $key ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$schemes = array_merge( $scheme, $existing_colors );\n\t\t\t\t} elseif ( is_array( $existing_colors ) ) {\n\t\t\t\t\t$schemes = array_merge( $scheme, $existing_colors );\n\t\t\t\t} else {\n\t\t\t\t\t$schemes = $scheme;\n\t\t\t\t}\n\n\t\t\t\t// Sanitize schemes.\n\t\t\t\t$schemes = $this->sanitize_color_schemes( $schemes );\n\n\t\t\t\tupdate_option( 'avada_custom_color_schemes', $schemes );\n\t\t\t\techo wp_json_encode(\n\t\t\t\t\t[\n\t\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t\t'action' => '',\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$schemes = stripslashes( stripcslashes( wp_unslash( $_POST['data']['values'] ) ) ); // phpcs:ignore WordPress.Security\n\t\t\t\t$schemes = json_decode( $schemes, true );\n\t\t\t\tif ( is_array( $existing_colors ) ) {\n\t\t\t\t\t// Add imported schemes to existing set.\n\t\t\t\t\t$schemes = array_merge( $schemes, $existing_colors );\n\t\t\t\t}\n\n\t\t\t\t// Sanitize schemes.\n\t\t\t\t$schemes = $this->sanitize_color_schemes( $schemes );\n\n\t\t\t\tupdate_option( 'avada_custom_color_schemes', $schemes );\n\n\t\t\t\techo wp_json_encode(\n\t\t\t\t\t[\n\t\t\t\t\t\t'status' => 'success',\n\t\t\t\t\t\t'action' => '',\n\t\t\t\t\t]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tdie();\n\t}", "title": "" }, { "docid": "686b94d0c7c25b9fe90a8fc40b9b084a", "score": "0.5471609", "text": "function uninstallCustom(){\n return null;\n }", "title": "" }, { "docid": "989279af8c1e82fc94c4dacb4e86839e", "score": "0.5447929", "text": "function hook_image_style_delete($style) {\n // Administrators can choose an optional replacement style when deleting.\n // Update the modules style variable accordingly.\n if (isset($style['old_name']) && $style['old_name'] == variable_get('mymodule_image_style', '')) {\n variable_set('mymodule_image_style', $style['name']);\n }\n}", "title": "" }, { "docid": "08b2ed2f87586287fc2beb323d0671a9", "score": "0.54381496", "text": "function remove_colors_from_deleted_listings()\n\t{\n\t\tglobal $ilance;\n\t\t$cronlog = '';\n\t\t$i = 0;\n\t\t$sql = $ilance->db->query(\"\n SELECT project_id\n FROM \" . DB_PREFIX . \"attachment_color\n\t\t\tGROUP BY project_id\n\t\t\tORDER BY colorid ASC\n \", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($sql) > 0)\n\t\t{\n\t\t\twhile ($res = $ilance->db->fetch_array($sql, DB_ASSOC))\n\t\t\t{\n\t\t\t\t$sql2 = $ilance->db->query(\"\n\t\t\t\t\tSELECT project_id\n\t\t\t\t\tFROM \" . DB_PREFIX . \"projects\n\t\t\t\t\tWHERE project_id = '\" . $res['project_id'] . \"'\n\t\t\t\t\tLIMIT 1\n\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\tif ($ilance->db->num_rows($sql2) == 0)\n\t\t\t\t{\n\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\tDELETE FROM \" . DB_PREFIX . \"attachment_color\n\t\t\t\t\t\tWHERE project_id = '\" . $res['project_id'] . \"'\n\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t$i++;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$cronlog .= 'Removed ' . $i . ' color extracts from deleted item listings that no longer exist, ';\n\t\treturn $cronlog;\n\t}", "title": "" }, { "docid": "6b2adb550927c2e25f75ba3723438ea1", "score": "0.5437699", "text": "function webbusiness_reset_cache_custom_css() {\n\tdelete_transient('webbusiness_custom_css_preview');\n\twebbusiness_cache_custom_css_preview();\n}", "title": "" }, { "docid": "32647e1a76860992169fe16a8c979ce5", "score": "0.5429145", "text": "protected function uninstallCustom(): void\n {\n }", "title": "" }, { "docid": "b45db2e3e5730727312b835c296bb9a2", "score": "0.5425055", "text": "function remove_theme_mods()\n {\n }", "title": "" }, { "docid": "3b4cc6f628266c4c17f56504a49edfcc", "score": "0.54211086", "text": "public function removeNodeThemes()\n\t{\n\t\t$this->removeNode( 'themes' );\n\t}", "title": "" }, { "docid": "d6820e501499f94dfab412058d66ae5e", "score": "0.54062307", "text": "function eliminar_color(){\t\n\t\t$id=$_GET['id'];\n\t\t$sql=\"DELETE FROM color WHERE id_color='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\theader(\"location:/admin/colores/\");\n\t}", "title": "" }, { "docid": "84c084fe04528bb6ba39ef988c9a5eb3", "score": "0.53897613", "text": "function remove_colors_from_deleted_attachments()\n\t{\n\t\tglobal $ilance, $ilconfig;\n\t\t$cronlog = '';\n\t\t$i = 0;\n\t\t$sql = $ilance->db->query(\"\n SELECT attachid\n FROM \" . DB_PREFIX . \"attachment_color\n\t\t\tGROUP BY attachid\n\t\t\tORDER BY colorid ASC\n \", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($sql) > 0)\n\t\t{\n\t\t\twhile ($res = $ilance->db->fetch_array($sql, DB_ASSOC))\n\t\t\t{\n\t\t\t\t$sql2 = $ilance->db->query(\"\n\t\t\t\t\tSELECT attachid\n\t\t\t\t\tFROM \" . DB_PREFIX . \"attachment\n\t\t\t\t\tWHERE attachid = '\" . $res['attachid'] . \"'\n\t\t\t\t\tLIMIT 1\n\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\tif ($ilance->db->num_rows($sql2) == 0)\n\t\t\t\t{\n\t\t\t\t\t$ilance->db->query(\"\n\t\t\t\t\t\tDELETE FROM \" . DB_PREFIX . \"attachment_color\n\t\t\t\t\t\tWHERE attachid = '\" . $res['attachid'] . \"'\n\t\t\t\t\t\", 0, null, __FILE__, __LINE__);\n\t\t\t\t\t$i++;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$cronlog .= 'Removed ' . $i . ' color extracts from deleted attachments that no longer exist, ';\n\t\treturn $cronlog;\n\t}", "title": "" }, { "docid": "9fb5d897d4e27e70af584e2c533e9109", "score": "0.5388383", "text": "protected function uninstallCustom() : void\n {\n }", "title": "" }, { "docid": "55c12403a5fddb0d299319204a7b83ea", "score": "0.53866154", "text": "function cmh_delete_plugin_options() {\r\n\tdelete_option('cmh_options');\r\n}", "title": "" }, { "docid": "c26725a03899da458e0b624c9193bf8c", "score": "0.53690743", "text": "function twentyfifteen_get_color_scheme_choices() {\n\t$color_schemes = twentyfifteen_get_color_schemes();\n\t$color_scheme_control_options = array();\n\n\tforeach ( $color_schemes as $color_scheme => $value ) {\n\t\t$color_scheme_control_options[ $color_scheme ] = $value['label'];\n\t}\n\n\treturn $color_scheme_control_options;\n}", "title": "" }, { "docid": "3bb592711927cc9a37c6a7c959d9c35f", "score": "0.5368307", "text": "public function destroycolor($id) {\n $delete = ProductsColor::find($id);\n \n $delete->delete();\n session()->flash('success',trans('admin.deleted'));\n return back();\n }", "title": "" }, { "docid": "905fc3a4fb5d649f2ac9c698239a052c", "score": "0.5357252", "text": "public function get_color_scheme() {\r\n\r\n return \tarray(\r\n 'epsilon_general_separator' => array(\r\n 'label' => esc_html__( 'Accent Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_accent_color' => array(\r\n 'label' => esc_html__( 'Accent Color #1', 'unapp' ),\r\n 'description' => esc_html__( 'Theme main color.', 'unapp' ),\r\n 'default' => '#798eea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_accent_color_second' => array(\r\n 'label' => esc_html__( 'Accent Color #2', 'unapp' ),\r\n 'description' => esc_html__( 'The second main color.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n 'epsilon_accent_color_third' => array(\r\n 'label' => esc_html__( 'Accent Color #3', 'unapp' ),\r\n 'description' => esc_html__( 'The third main color.', 'unapp' ),\r\n 'default' => '#499bea',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_separator' => array(\r\n 'label' => esc_html__( 'Typography Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_title_color' => array(\r\n 'label' => esc_html__( 'Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for titles.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for paragraphs.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for links.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for hovered links.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_separator' => array(\r\n 'label' => esc_html__( 'Navigation Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n \r\n\r\n 'epsilon_menu_item_color' => array(\r\n 'label' => esc_html__( 'Menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_background' => array(\r\n 'label' => esc_html__( 'Dropdown background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu background.', 'unapp' ),\r\n 'default' => '#000000',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item color.', 'unapp' ),\r\n 'default' => '#999999',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_hover_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item hover color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item hover color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_dropdown_menu_item_active_color' => array(\r\n 'label' => esc_html__( 'Dropdown menu item active color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the menu item active color.', 'unapp' ),\r\n 'default' => '#ffffff',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_separator' => array(\r\n 'label' => esc_html__( 'Footer Colors', 'unapp' ),\r\n 'section' => 'colors',\r\n 'separator' => true,\r\n ),\r\n\r\n 'epsilon_footer_contact_background' => array(\r\n 'label' => esc_html__( 'Footer Widget Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget background.', 'unapp' ),\r\n 'default' => '#303133',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_background' => array(\r\n 'label' => esc_html__( 'Footer Copyright Background', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer copyright background.', 'unapp' ),\r\n 'default' => '#262626',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_title_color' => array(\r\n 'label' => esc_html__( 'Footer Title Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer widget title.', 'unapp' ),\r\n 'default' => '#e6e6e6',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_text_color' => array(\r\n 'label' => esc_html__( 'Text Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer text.', 'unapp' ),\r\n 'default' => '#808080',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_color' => array(\r\n 'label' => esc_html__( 'Link Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link.', 'unapp' ),\r\n 'default' => '#4aca85',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n 'epsilon_footer_link_hover_color' => array(\r\n 'label' => esc_html__( 'Link Hover Color', 'unapp' ),\r\n 'description' => esc_html__( 'The color used for the footer link hover.', 'unapp' ),\r\n 'default' => '#5ed092',\r\n 'section' => 'colors',\r\n 'hover-state' => false,\r\n ),\r\n\r\n );\r\n\t}", "title": "" }, { "docid": "5efd84808086fe97152c2a2c562ba471", "score": "0.5351884", "text": "public function color_destroy(Request $request)\n {\n if (Attribute_value::destroy($request->color_id)) {\n $attribute_values = Attribute_value::getAllColorValues();\n $categories = Category::getAllCategoriesSecondLevel();\n return response()->json([\n 'message' => 'Xóa giá trị thành công',\n 'view' => view('backend.attribute_value.color.index')->with(['attribute_values' => $attribute_values, 'categories' => $categories])->render()\n ], 200);\n }\n }", "title": "" }, { "docid": "4cf56ff563d2d6019ec1c16fd3c2ee95", "score": "0.534587", "text": "function twentyfifteen_get_color_schemes() {\n\treturn apply_filters( 'twentyfifteen_color_schemes', array(\n\t\t'default' => array(\n\t\t\t'label' => esc_html__( 'Default', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#f1f1f1',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#333333',\n\t\t\t\t'#333333',\n\t\t\t\t'#f7f7f7',\n\t\t\t),\n\t\t),\n\t\t'dark' => array(\n\t\t\t'label' => esc_html__( 'Dark', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#111111',\n\t\t\t\t'#202020',\n\t\t\t\t'#202020',\n\t\t\t\t'#bebebe',\n\t\t\t\t'#bebebe',\n\t\t\t\t'#1b1b1b',\n\t\t\t),\n\t\t),\n\t\t'yellow' => array(\n\t\t\t'label' => esc_html__( 'Yellow', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#f4ca16',\n\t\t\t\t'#ffdf00',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#111111',\n\t\t\t\t'#111111',\n\t\t\t\t'#f1f1f1',\n\t\t\t),\n\t\t),\n\t\t'pink' => array(\n\t\t\t'label' => esc_html__( 'Pink', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#ffe5d1',\n\t\t\t\t'#e53b51',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#352712',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#f1f1f1',\n\t\t\t),\n\t\t),\n\t\t'purple' => array(\n\t\t\t'label' => esc_html__( 'Purple', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#674970',\n\t\t\t\t'#2e2256',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#2e2256',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#f1f1f1',\n\t\t\t),\n\t\t),\n\t\t'blue' => array(\n\t\t\t'label' => esc_html__( 'Blue', 'twentyfifteen' ),\n\t\t\t'colors' => array(\n\t\t\t\t'#e9f2f9',\n\t\t\t\t'#55c3dc',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#22313f',\n\t\t\t\t'#ffffff',\n\t\t\t\t'#f1f1f1',\n\t\t\t),\n\t\t),\n\t) );\n}", "title": "" }, { "docid": "4ffb6abc2b4787d58a9bc9a4b85eaa05", "score": "0.5337801", "text": "function eliminar_color($id)\n {\n $con = new DBmanejador;\n \tif($con->conectar()==true)\n \t{\n\t\t \t $consulta= \"delete from tcolores where color_id=('\".$id.\"')\";\n\t\t\t\t $resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\n\n\t\t\t\t if (!$resultado) return false;\n\t\t\t\t else return true;\n \t}\n }", "title": "" }, { "docid": "78243bccea645708fcf2496df7fa1edc", "score": "0.5337626", "text": "public function uninstall() {\n\t\tdelete_option( $this->options_key );\n\t}", "title": "" }, { "docid": "d9002e9b47793fe9f4786267e012e937", "score": "0.53319407", "text": "function remove($options='') {\n $sql = array();\n\n\tdolibarr_set_const($this->db,'MAIN_THEME','eldy');\n\tdolibarr_set_const($this->db,'MAIN_MENU_INVERT',0);\n\t\n\tdolibarr_del_const($this->db,'MAIN_MENU_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENU_SMARTPHONE_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_SMARTPHONE_FORCED');\n\t\t\n return $this->_remove($sql, $options);\n }", "title": "" }, { "docid": "8ae3d7c11d77e8ee229bdeab6af811e7", "score": "0.5327634", "text": "public function deleteThemeLangaugeAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteThemeLangauge($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "title": "" }, { "docid": "7d24952c8d9309c657884081f168dde7", "score": "0.5310006", "text": "public static function delete_font_selectors_cache() {\n\t\t$theme_mods = array_keys( get_theme_mods() );\n\n\t\tforeach ( $theme_mods as $theme_mod ) {\n\t\t\tif ( false !== strpos( $theme_mod, 'typolab_font_variants_and_sizes_output_' ) ) {\n\t\t\t\tremove_theme_mod( $theme_mod );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ecf5e0217c20f6345e499064c36986c2", "score": "0.5308604", "text": "public static function delete_themes_transient() {\n\t\tdelete_transient( self::THEMES_TRANSIENT );\n\t}", "title": "" }, { "docid": "06a646e595ea6b37872f66549262b552", "score": "0.52856463", "text": "function base_admin_set_default_color_scheme_bloom( $result ) {\n\treturn 'base';\n}", "title": "" }, { "docid": "9441706f82cb20c46f59157982c859a1", "score": "0.52747905", "text": "function alt_add_color_scheme()\n {\n wp_admin_css_color(\n 'alt-design',\n __('Alt Design', 'alt-design-color-scheme'),\n get_template_directory_uri() . '/lib/alt-admin/css/admin-color-scheme.css',\n array('#25282b', '#363b3f', '#ff6600', '#ff6600')\n );\n }", "title": "" }, { "docid": "fb97cd39b4894cfc2b45d7732d35d303", "score": "0.5261481", "text": "function admin_color_scheme_picker($user_id)\n {\n }", "title": "" }, { "docid": "a354f91a6bfa4ce2d8dd51c70574ba8e", "score": "0.52383333", "text": "public function clearRIssuesRtfplugins()\n {\n $this->collRIssuesRtfplugins = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "cae74327b9fa93ef906799d5356b4b97", "score": "0.52257144", "text": "function uninstall_hook()\n\t\t{\n\t\t\t// Delete plugin options\t\t\t\n\t\t\tdelete_option('verify-meta-tags');\n\t\t}", "title": "" }, { "docid": "23f9885f0600ee078317ace1cd6f8fad", "score": "0.5222078", "text": "function remove_forecolor_from_tinymce( $buttons ) {\n\t$remove = array( 'forecolor' );\n\treturn array_diff( $buttons, $remove );\n}", "title": "" }, { "docid": "52ed97d92972a226f24fd427fdbabf3a", "score": "0.5210549", "text": "function uninstall(){}", "title": "" }, { "docid": "ccd9a33f15f722d82d6ab9394d035135", "score": "0.5207557", "text": "static function uninstall(){\n $defaults = self::getdefaults();\n foreach ($defaults as $option ) {\n if ( !is_multisite() ) {\n delete_option($option);\n }\n else {\n delete_site_option($option);\n }\n }\n return;\n }", "title": "" }, { "docid": "dc8a5485b40006e65b95268ec78decca", "score": "0.5207501", "text": "public function remove_options()\n {\n }", "title": "" }, { "docid": "07a29991a3a82763f43fbd3e309547b9", "score": "0.52037793", "text": "function convertizer_remove() {\ndelete_option('convertizer_data');\n}", "title": "" }, { "docid": "0d2a0a644b6eed460f950b1a7a052a32", "score": "0.51980704", "text": "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "title": "" }, { "docid": "968dae8283ae31727d2c0156b938a644", "score": "0.51802504", "text": "function remove_default_admin_stylesheets() {\n \t// wp_deregister_style('wp-reset-editor-styles');\n }", "title": "" }, { "docid": "b307281e37f7ed77fef24a6f0e0d07b7", "score": "0.51711404", "text": "public function deleteColour($id){\n $color = ProductDetail::findOrFail($id);\n $color->delete();\n Cache::tags('products')->flush();\n return response()->json('done',200);\n }", "title": "" }, { "docid": "b9cef3fc1b8a8d27e4e9798a944609c4", "score": "0.5165445", "text": "public function clear_style_keys()\t{\n\t\tglobal $phpbbForum;\n\t\t\n\t\t$phpbbForum->erase_style_keys();\n\t\t$this->styleKeys = array();\n\t}", "title": "" }, { "docid": "4b7965cd20e75803446cd3513e51e0b7", "score": "0.5160108", "text": "static function hookUninstall() {\n\t \t// Remove all options\n\t \tforeach(self::$plugin_options as $k => $v) {\n\t \t\tdelete_option($k);\n\t \t}\n\t }", "title": "" }, { "docid": "94d395d971a24f422d259e989772f104", "score": "0.51469624", "text": "function remove_editor_styles()\n {\n }", "title": "" }, { "docid": "0e3d9d695c3380304ad05d2023a428a4", "score": "0.5121943", "text": "function restrict_users_from_changeing_admin_theme () {\n\t$users = get_users();\n\tforeach ($users as $user) {\n\t\tremove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );\n\t\tupdate_user_meta($user->ID, 'admin_color', 'brightlight');\n\t}\n\tif (!current_user_can('manage_options')) {\n\t\tremove_action('admin_color_scheme_picker','admin_color_scheme_picker');\n\t}\n}", "title": "" }, { "docid": "da085e8cedc20f98dab0d2ffe6bb9dd9", "score": "0.5119678", "text": "function change_admin_color () {\n\t$users = get_users();\n\tforeach ($users as $user) {\n\t\tremove_action( 'admin_color_scheme_picker', 'admin_color_scheme_picker' );\n\t\tupdate_user_meta($user->ID, 'admin_color', 'ectoplasm');\n\t\t// if (user_can( $user->ID, 'administrator' )) { // Editor and below\n\t\t// \tupdate_user_meta($user->ID, 'admin_color', 'coffee');\n\t\t// }\n\t\t// if (user_can( $user->ID, 'editor' )) { // Editor and below\n\t\t// \tupdate_user_meta($user->ID, 'admin_color', 'midnight');\n\t\t// }\n\t\t// if (user_can( $user->ID, 'author' )) { // Author\n\t\t// \tupdate_user_meta($user->ID, 'admin_color', 'ocean');\n\t\t// }\n\t\t// if (user_can( $user->ID, 'contributor' )) { // Contributor and below\n\t\t// \tupdate_user_meta($user->ID, 'admin_color', 'light');\n\t\t// }\n\t\t// if (user_can( $user->ID, 'subscriber' )) { // Subscriber and below\n\t\t// \tupdate_user_meta($user->ID, 'admin_color', 'ectoplasm');\n\t\t// }\n\t}\n\tif (!current_user_can('manage_options')) {\n\t\tremove_action('admin_color_scheme_picker','admin_color_scheme_picker');\n\t}\n}", "title": "" }, { "docid": "2c0dcca39c04a939d5123eaab047f0c9", "score": "0.5116263", "text": "function base_admin_register_color_scheme_bloom() {\n\twp_admin_css_color(\n\t\t'base',\n\t\tesc_html__( 'Base Theme', 'base' ),\n\t\tTHEME_CSS . '/admin.css',\n\t\tarray(\n\t\t\t'#217D94',\n\t\t\t'#363b3f',\n\t\t\t'#9098A0',\n\t\t\t'#8BC251',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "a496e1a115da81ff2dd5feabe7b6743c", "score": "0.50929224", "text": "public static function plantuml_colour_scheme(): array\n\t{\n\t\treturn [\n\t\t\t'background' => 'FireBrick',\n\t\t\t'border' => 'DarkRed',\n\t\t\t'text' => 'White',\n\t\t];\n\t}", "title": "" }, { "docid": "066ff1aa8688c4bcd9a9556ce604aac7", "score": "0.5089853", "text": "function classieraRemoveReduxDemoModeLink() { // Be sure to rename this function to something more unique\r\n if ( class_exists('ReduxFrameworkPlugin') ) {\r\n remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );\r\n }\r\n if ( class_exists('ReduxFrameworkPlugin') ) {\r\n remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); \r\n }\r\n}", "title": "" }, { "docid": "3988ca2cdd8512d0336397d815dc55b9", "score": "0.5082028", "text": "function wp_ajax_save_user_color_scheme()\n {\n }", "title": "" }, { "docid": "ed891580999f9ce784f1406934dd4bac", "score": "0.50786495", "text": "public function callbackDeleted($context, $dialog) {\n $this->papaya()->messages->dispatch(\n new PapayaMessageDisplayTranslated(\n PapayaMessage::TYPE_INFO,\n 'Theme set deleted.'\n )\n );\n }", "title": "" }, { "docid": "38f3f4361ca24d73ebcbf8f4b130ba79", "score": "0.5066656", "text": "public function uninstall();", "title": "" }, { "docid": "38f3f4361ca24d73ebcbf8f4b130ba79", "score": "0.5066656", "text": "public function uninstall();", "title": "" }, { "docid": "90350eb591b90881c605c56d92230dfe", "score": "0.50644827", "text": "function puzzle_modify_puzzle_colors($colors) {\n /* Edit existing theme colors */\n // $colors->theme_color('primary')->set_color('#f6a4cd')\n // ->set_name('Pink')\n // ->set_text_color_scheme('dark');\n \n /* Remove existing theme colors */\n // $colors->remove_theme_color('dark-gray');\n \n /* Add new colors */\n // $accent = new PuzzleColor(array(\n // 'name' => __('Accent Color'),\n // 'id' => 'accent',\n // 'color' => '#f00',\n // 'text_color_scheme' => 'light',\n // 'order' => 11\n // ));\n // $colors->add_theme_color($accent);\n \n /* Edit text colors */\n // $colors->set_text_colors(array(\n // 'headline_dark' => '#333',\n // 'text_dark' => '#555',\n // 'headline_light' => '#fff',\n // 'text_light' => '#fff'\n // ));\n \n /* Edit link colors */\n // $colors->set_link_colors(array(\n // 'link_dark' => '#3b54a5',\n // 'link_dark_hover' => '#2cb799',\n // 'link_light' => '#fff',\n // 'link_light_hover' => 'rgba(255, 255, 255, 0.75)'\n // ));\n}", "title": "" }, { "docid": "b63ad5617856ab0c845872936e3d9c84", "score": "0.5057065", "text": "public static function remove_photo_colors_column( $columns ) {\n\t\tif (\n\t\t\tfilter_input( INPUT_GET, 'post_type' ) === Registrations::get_post_type()\n\t\t&&\n\t\t\tin_array( filter_input( INPUT_GET, 'post_status' ), Photo::get_pending_post_statuses() )\n\t\t) {\n\t\t\tunset( $columns[ 'taxonomy-' . Registrations::get_taxonomy( 'colors' ) ] );\n\t\t}\n\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "db059a7a76b314466ee9c1d3e6f30868", "score": "0.5042483", "text": "public static function uninstall() {\r\n // $pop_ups = get_pages( array('post_type'=>DGDSCROLLBOXTYPE));\r\n // foreach($pop_ups as $pop_up) {\r\n // wp_delete_post($pop_up->ID, true);\r\n // }\r\n }", "title": "" }, { "docid": "ab335cc345708aabc1798c2121570ea7", "score": "0.5040398", "text": "function woodstock_removeDemoModeLink() {\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );\n }\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); \n }\n }", "title": "" }, { "docid": "14bcc189488b7b8f0d1f3c8597a74972", "score": "0.50375533", "text": "function uninstall() {\n $rec = SQLSELECT('Select distinct LINKED_OBJECT,LINKED_PROPERTY from myconditions');\n $total = count($rec);\n if ($total) {\n for($i=0;$i<$total;$i++) {\n removeLinkedProperty($rec[$i]['LINKED_OBJECT'], $rec[$i]['LINKED_PROPERTY'], 'myrules');\n }\n }\n SQLExec('DROP TABLE IF EXISTS myrules');\n SQLExec('DROP TABLE IF EXISTS myconditions');\n SQLExec('DROP TABLE IF EXISTS myactions');\n\n parent::uninstall();\n }", "title": "" }, { "docid": "7c29e94226c6ab09c9703c68d2e16884", "score": "0.50374424", "text": "public function colorList() {}", "title": "" }, { "docid": "492fb4693db9342c5554f1ae2c645b55", "score": "0.5033672", "text": "function del_stylesheets( $haystack )\n\t{\n\t\tpreg_match_all( '|<link(.*)=(.*)\"stylesheet\"(.*)/>|Us', $haystack, $tmp_array );\n\t\t$to_delete = $tmp_array[ 0 ];\n\t\tpreg_match_all( '|<style(.*)=(.*)\"text/css\">(.*)</style>|Us', $haystack, $tmp_array );\n\n\t\t// FIXME: Was ist das? ($this->cssfilter verwenden für eine verbesserung)\n\t\tforeach($tmp_array[0] as $file) {\n\t\t\tif(!strpos($file, \"IEFixes\") &&\n\t\t\t\t!strpos($file, \"ie6bar\") &&\n\t\t\t\t!strpos($file, \"awesome\") &&\n\t\t\t\t!strpos($file, \"dropdown\") &&\n\t\t\t\t!strpos($file, \"mobile\") &&\n\t\t\t\t!strpos($file, \"jquery\") &&\n\t\t\t\t!strpos($file, \"hreflang\")\n\t\t\t) {\n\t\t\t\t$to_delete = array_merge($to_delete, (array)$file);\n\t\t\t}\n\t\t}\n\t\tforeach($to_delete as $key => $file) {\n\t\t\tif(!strpos($file, \"IEFixes\") &&\n\t\t\t\t!strpos($file, \"ie6bar\") &&\n\t\t\t\t!strpos($file, \"awesome\") &&\n\t\t\t\t!strpos($file, \"mobile\") &&\n\t\t\t\t!strpos($file, \"dropdown\") &&\n\t\t\t\t!strpos($file, \"jquery\") &&\n\t\t\t\t!strpos($file, \"hreflang\")\n\t\t\t) {\n\t\t\t\t$to_delete2[$key] = $file;\n\t\t\t}\n\t\t}\n\t\tIfNotSetNull($to_delete2);\n\t\t$to_delete = $to_delete2;\n\n\t\tif(isset($this->not_delete) && is_array($this->not_delete)) {\n\t\t\tforeach($this->not_delete as $key => $value) {\n\t\t\t\tif(is_array($to_delete)) {\n\t\t\t\t\tforeach($to_delete as $key2 => $value2) {\n\t\t\t\t\t\tif(stristr($value2, basename($value))) {\n\t\t\t\t\t\t\t$this->special_css[] = $value2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $to_delete;\n\t}", "title": "" }, { "docid": "be224ac737ee71748bb46ec7ac5b1639", "score": "0.503346", "text": "public function destroy($id) {\n\t\t$this->color->find($id)->delete();\n\t\treturn Redirect::route('colors.index');\n\t}", "title": "" }, { "docid": "5d6c9cab4f5185e58f81bca6e48c79a4", "score": "0.5023544", "text": "function cec29_ald_functions_uninstall() {\n\t\t// remove all options and custom tables\n\t}", "title": "" }, { "docid": "9bc4483ac44088ebce04a24be85fed77", "score": "0.5021168", "text": "function action_clear() {\n\t\t\t$this->SESS->remove('objbrowser', 'choosen');\n\t\t}", "title": "" }, { "docid": "8bff49d652c812ea52dbf686c55699e3", "score": "0.5006647", "text": "public function deactivate()\n {\n $this->setTheme(null);\n $this->removeSymlink();\n }", "title": "" }, { "docid": "516baf8fcd7679bde734b0f9a19f3023", "score": "0.50004745", "text": "function cxense_remove_all_settings() {\n foreach(cxense_get_settings() as $setting)\n delete_option($setting['name']);\n}", "title": "" }, { "docid": "7d4f235f832b1a42a304b85674a7920e", "score": "0.49996984", "text": "public static function uninstall() {\n if ( !current_user_can( 'activate_plugins' ) || __FILE__ !== WP_UNINSTALL_PLUGIN ) {\n return;\n }\n\n check_admin_referer( 'bulk-plugins' );\n\n // Remove all stored clanpress options.\n $options = wp_load_alloptions();\n foreach ( $options as $key => $value ) {\n if ( substr( $key, 0, 9 ) === 'clanpress' ) {\n delete_option( $key );\n }\n }\n }", "title": "" }, { "docid": "ccde7696ac6cf778cc3351ee5af65e06", "score": "0.49974847", "text": "function first_edition_deregister_styles() {\n\tif ( '' != get_option( 'first_edition_font_pair' ) ) {\n\t\twp_dequeue_style( 'quattrocento' );\n\t\twp_dequeue_style( 'quattrocento-sans' );\n\t}\n}", "title": "" }, { "docid": "615e1573c5ad302e102907e07efc20ca", "score": "0.499353", "text": "function uultra_delete_custom_widgets()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\r\n\t\t\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets');\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets');\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$default_widgets = get_option('userultra_default_user_tabs_package_'.$package_id.'');\r\n\t\t\t$custom_widgets = get_option('userultra_custom_user_widgets_package_'.$package_id.'');\t\r\n\t\t\t$unused_widgets = get_option('uultra_unused_user_widgets_package_'.$package_id.'');\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$id = $_POST[\"widget_id\"];\t\t\r\n\t\t\r\n\t\tforeach($default_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($default_widgets[$key]);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($custom_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($custom_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($unused_widgets as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($unused_widgets[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\r\n\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets', $unused_widgets );\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tupdate_option('userultra_custom_user_widgets_package_'.$package_id.'', $custom_widgets );\r\n\t\t\tupdate_option('userultra_default_user_tabs_package_'.$package_id.'', $default_widgets );\r\n\t\t\tupdate_option('uultra_unused_user_widgets_package_'.$package_id.'', $unused_widgets );\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//print_r($modules_custom);\r\n\t\tdie();\r\n\t\r\n\t}", "title": "" }, { "docid": "6e5282e1ad67ea82d475b831e3705ae7", "score": "0.49933404", "text": "function uultra_delete_custom_link()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\r\n\t\t\t\t\r\n\t\t$modules = $this->uultra_get_user_navigator_for_membership($package_id);\t\t\t\t\r\n\t\t$modules_custom = $this->uultra_get_custom_modules_for_membership($package_id); \r\n\t\t\r\n\t\t$id = $_POST[\"link_id\"];\t\t\r\n\t\t\r\n\t\tforeach($modules as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($modules[$key]);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tforeach($modules_custom as $key => $module)\r\n\t\t{\r\n\t\t\tif($id==$key)\r\n\t\t\t{\r\n\t\t\t\tunset($modules_custom[$key]);\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($package_id=='')\r\n\t\t{\t\r\n\t\t\t\r\n\t\t\tupdate_option('userultra_default_user_features_custom',$modules);\r\n\t\t\tupdate_option('userultra_default_user_features_added_admin',$modules_custom);\t\t\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tupdate_option('userultra_default_user_features_custom_package_'.$package_id.'',$modules);\r\n\t\t\tupdate_option('userultra_default_user_features_added_admin_package_'.$package_id.'',$modules_custom);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint_r($modules_custom);\r\n\t\tdie();\r\n\t\r\n\t}", "title": "" }, { "docid": "eb17886c7fbd82ff514603322f4fd8c8", "score": "0.4990588", "text": "public function uninstall()\r\n {\r\n return parent::uninstall()\r\n && $this->unregisterHook('fieldBrandSlider')\r\n && $this->unregisterHook('displayHeader')\r\n && $this->_deleteConfigs()\r\n && $this->_deleteTab();\r\n }", "title": "" }, { "docid": "90d4633f3989416b390d65c231e506d0", "score": "0.49791086", "text": "function plasso_remove_customizer_settings($wp_customize){\n\t$wp_customize->remove_panel('nav_menus');\n\t$wp_customize->remove_section('custom_css');\n}", "title": "" }, { "docid": "ea2b1be635a230cf563542571e19dca0", "score": "0.49767572", "text": "function uninstall() {\n\t}", "title": "" }, { "docid": "c39c989ad250d58fe517b1cc4f625a8b", "score": "0.49754563", "text": "public function delete(){\n\t $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get(\"id\")))->delete();\n\t parent::delete();\n\t}", "title": "" }, { "docid": "aed6dc6a7ceaa1e11d7b866aec91d42c", "score": "0.4973814", "text": "public function removeAllButtons()\n {\n $this->mixButtons = array();\n $this->blnValidationArray = array();\n $this->blnModified = true;\n }", "title": "" }, { "docid": "8e7da41afdc2823ec05f6d5503d37042", "score": "0.4971461", "text": "public function deleteObsoleteConfigs();", "title": "" }, { "docid": "31682da567dd4af64147912b9d8571af", "score": "0.49710378", "text": "function delete_color($colorname){\n \t\t$check = $this->db->query(\"select * from color where color_name = '$colorname'\");\n \t\tif($check->result()->num_rows() == 0)\n \t\t\treturn \"delete_color(): NONEXISTENT\";\n \t\telse\n \t\t\t//Elimina la fuente de la base de datos\n \t\t \t$this->db->delete('color', array('color_name' => $colorname));\n \t}", "title": "" }, { "docid": "7e60c2cc4ef5f36b4515796bf8c574cd", "score": "0.49698806", "text": "function uninstall() {\n SQLExec('DROP TABLE IF EXISTS mixcloud_favorites');\n parent::uninstall();\n }", "title": "" }, { "docid": "e04ac9ca97b314455af4587b6b9910c5", "score": "0.4965392", "text": "public function removeStyleDec() {\n\t}", "title": "" }, { "docid": "f2e518f9647a0c4abd5563b04987e8d7", "score": "0.4964458", "text": "protected function removeOldOptions() {\n $storage_handler = \\Drupal::entityTypeManager()->getStorage('paragraph');\n // Get ids of paragraphs.\n $ids = array_map(function ($item) {\n return $item['target_id'];\n }, $this->entity->get('field_checkbox_answers')->getValue());\n\n $entities = $storage_handler->loadMultiple($ids);\n if ($entities) {\n $storage_handler->delete($entities);\n }\n }", "title": "" }, { "docid": "33685b7424c848a525fe77b79297e54a", "score": "0.49637207", "text": "public function deletes_category(){\n $ids = $this->input->post('checkone');\n foreach($ids as $id)\n {\n $this->delete_color_once($id);\n }\n\t\t$this->session->set_flashdata(\"mess\", \"Xóa thành công!\");\n redirect($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "5dc064087681c670a412a82211ad3201", "score": "0.49590012", "text": "public function cleanup() {\n\t\tforeach ( array(\n\t\t\t'leadin_portal_domain',\n\t\t\t'leadin_portalId',\n\t\t\t'leadin_pluginVersion',\n\t\t\t'hubspot_affiliate_code',\n\t\t\t'hubspot_acquisition_attribution',\n\t\t) as $option_name\n\t\t) {\n\t\t\tif ( get_option( $option_name ) ) {\n\t\t\t\tdelete_option( $option_name );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "983afc627b0580f1cc711dcc629b20d5", "score": "0.49575368", "text": "function image_features_override_export_render_deletion($alter, $element) {\n $code = array();\n if (isset($alter['keys'])) {\n $component_start = \"\\$data['$element']\";\n $code_line = features_override_export_keys($alter['keys']);\n $code[] = \"\";\n $code[] = \" if (\" . $component_start . \"['storage'] == IMAGE_STORAGE_DEFAULT) {\";\n $code[] = ' unset(' . $component_start . $code_line . ');';\n $code[] = \" }\";\n }\n return $code;\n}", "title": "" }, { "docid": "7c0f2d474f0a5fcf8368136d52a47960", "score": "0.49556112", "text": "function delete_stylesheet() {\n\t\t\t$css_file = $this->get_stylesheet();\n\t\t\tThemify_Filesystem::delete($css_file,'f');\n\t\t}", "title": "" }, { "docid": "ae2d1fe357039d7dd6f82b733f73f9dd", "score": "0.49539322", "text": "public function uninstall() {\n\n\n }", "title": "" }, { "docid": "a96bc0d65ad0423dbbe9967281e52547", "score": "0.49519533", "text": "public function wp_delete_theme(){\n\n\t\trequire_once( 'wp-load.php' );\n\t\trequire_once( 'wp-admin/includes/upgrade.php' );\n\n\t\tdelete_theme( 'twentyfourteen' );\n\t\tdelete_theme( 'twentythirteen' );\n\t\tdelete_theme( 'twentytwelve' );\n\t\tdelete_theme( 'twentyeleven' );\n\t\tdelete_theme( 'twentyten' );\n\t\t// We delete the _MACOSX folder (bug with a Mac)\n\t\tdelete_theme( '__MACOSX' );\n\t}", "title": "" }, { "docid": "b040032f308e0755e70cf6fca1cab0e3", "score": "0.49465755", "text": "public function get_admin_color_scheme() {\n\t\tglobal $_wp_admin_css_colors;\n\n\t\t$color_scheme = sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );\n\n\t\t// It's possible to have a color scheme set that is no longer registered.\n\t\tif ( empty( $_wp_admin_css_colors[ $color_scheme ] ) ) {\n\t\t\t$color_scheme = 'fresh';\n\t\t}\n\n\t\treturn $_wp_admin_css_colors[ $color_scheme ]->colors;\n\t}", "title": "" }, { "docid": "0d6269c9cea4910576364f2d15ab4c3f", "score": "0.49458823", "text": "function uninstall(){\n\n }", "title": "" } ]
607f415ddcc4f2c32ab08f22f67932b2
Mark the batch upload as completed (set actual date time).
[ { "docid": "10781bfa292041c7343e4726bdad3bfe", "score": "0.7087899", "text": "public function setUploadCompleted(bool $completed = true): void\n {\n $this->uploadCompletedAt = $completed ? new DateTime() : null;\n }", "title": "" } ]
[ { "docid": "9ef2a4e3da5b3ca943a540864ceac0b7", "score": "0.6838533", "text": "public function finished() {\n $this->setFinishedAt(new MongoDate());\n $this->save();\n }", "title": "" }, { "docid": "9c19f0312e1e268c04bf61062713fb5b", "score": "0.68272", "text": "function setCompleted() {\n global $connection, $user;\n\n $this->movePosition(1);\n\n $sql = 'update TR_BATCH set completed_date = now() where tr_batch_id = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"i\", $this->batch_id);\n $statement->execute();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n }", "title": "" }, { "docid": "60303dd760f9ede0f105da5d8bab6358", "score": "0.6773434", "text": "public function mark_complete() {\n // Create record\n $this->timecompleted = time();\n\n // Save record\n if ($this->id) {\n $this->update();\n } else {\n $this->insert();\n }\n\n // Mark course completion record as started (if not already)\n $cc = array(\n 'course' => $this->course,\n 'userid' => $this->userid\n );\n $ccompletion = new completion_completion($cc);\n $ccompletion->mark_inprogress($this->timecompleted);\n }", "title": "" }, { "docid": "600f356a5fac73a453ac7880bd8b57bb", "score": "0.6681208", "text": "public function completed() {\n\t}", "title": "" }, { "docid": "9876d7a8dd3a6455476f7a133b68cacf", "score": "0.6624012", "text": "public function done()\n {\n $this->setStatus(self::STATUS_DONE);\n }", "title": "" }, { "docid": "9dc8c59ca7cb03708c1fb7a18e264ae7", "score": "0.64513224", "text": "public function finishJob()\r\n {\r\n $this->done = true;\r\n }", "title": "" }, { "docid": "47a35a9f5d174c36c79b82e5938a317e", "score": "0.6316829", "text": "protected function complete() {\n\t\t\tparent::complete();\n\n\t\t\tastra_sites_error_log( esc_html__( 'All processes are complete', 'astra-sites' ) );\n\t\t\tupdate_site_option( 'astra-sites-batch-status-string', 'All processes are complete', 'no' );\n\t\t\tdelete_site_option( 'astra-sites-batch-status' );\n\t\t\tupdate_site_option( 'astra-sites-batch-is-complete', 'yes', 'no' );\n\n\t\t\tdo_action( 'astra_sites_site_import_batch_complete' );\n\t\t}", "title": "" }, { "docid": "835161dd20f92960802ede3fa098aaca", "score": "0.625909", "text": "protected function completeRunningJob()\n {\n $runningJob = $this->objFromFixture(QueuedJobDescriptor::class, 'runningjob');\n $runningJob->JobStatus = 'Complete';\n $runningJob->write();\n\n $runningJob = $this->objFromFixture(QueuedJobDescriptor::class, 'immediatependingjob');\n $runningJob->JobStatus = 'Complete';\n $runningJob->write();\n }", "title": "" }, { "docid": "5facb79538aaed81ac871a13ba3a94c5", "score": "0.6210154", "text": "public function done(){\n\t\t$this->done=true;\n\t}", "title": "" }, { "docid": "7e842e43d6c9fbe6558d5efffda7f375", "score": "0.6197187", "text": "public function markAsDone() {\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tisDone = 1\n\t\t\tWHERE\tthreadID = \".$this->threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "title": "" }, { "docid": "e9009509098158dee9c04a1e505d7ad3", "score": "0.6123183", "text": "public function complete()\n {\n $this->stopped();\n\n $this->setStatus(Job::STATUS_COMPLETE);\n\n $this->redis->zadd(Queue::redisKey($this->queue, 'processed'), time(), $this->payload);\n $this->redis->lrem(Queue::redisKey($this->queue, $this->worker->getId() . ':processing_list'), 1, $this->payload);\n Stats::incr('processed', 1);\n Stats::incr('processed', 1, Queue::redisKey($this->queue, 'stats'));\n\n Event::fire(Event::JOB_COMPLETE, $this);\n }", "title": "" }, { "docid": "9a116146c76092312d21a243806fa6f6", "score": "0.61227876", "text": "public function setTaskDone()\n {\n // Simply unlink our task file.\n unlink($this->taskFilePath);\n }", "title": "" }, { "docid": "95d9218830a38b48734c79c73e116dcd", "score": "0.61101454", "text": "public static function MarkOrderProcessAsCompleted()\n {\n $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS] = true;\n }", "title": "" }, { "docid": "c705a1f7082bb80dc3b56f65ddf077b6", "score": "0.60704935", "text": "public function complete($completed = true)\n {\n $this->update(compact('completed'));\n }", "title": "" }, { "docid": "5fba9b339905de0fb6a4b50a17c4e95a", "score": "0.60607004", "text": "public function iWaitForTheBatchJobToFinish() {\n $this->getSession()->wait(180000, 'jQuery(\"#updateprogress\").length === 0');\n }", "title": "" }, { "docid": "b57caa618027a7bce9a40f987026d27e", "score": "0.60421616", "text": "public function progressFinish() {}", "title": "" }, { "docid": "85bb132e2b86a97e8b9c744d6bb6741d", "score": "0.6013536", "text": "public function chunkCompleted()\n {\n $import = mw('Microweber\\Utils\\Import')->batch_save($this->content_items);\n $this->content_items = array();\n\n return true;\n }", "title": "" }, { "docid": "26e309a0a275cb7496b7b3c3ed519dc1", "score": "0.59391886", "text": "public function finished()\n {\n }", "title": "" }, { "docid": "ed956e2f5332379396a30d1b9c8e1688", "score": "0.5905939", "text": "public function finish()\n {\n $this->status = 'finished';\n return $this->save();\n }", "title": "" }, { "docid": "0d915362405026c71e6bbf1e60fa63a8", "score": "0.58988947", "text": "public function updateStatusFinish()\n {\n $this->resetStatuses();\n }", "title": "" }, { "docid": "b7239b11382f0f91e9c3828ac9aadb05", "score": "0.5892555", "text": "protected function completeJob() {\n\t\t$this->isComplete = 1;\n\t\t$nextgeneration = new CheckExternalLinksJob();\n\t\tsingleton('QueuedJobService')->queueJob($nextgeneration,\n\t\t\tdate('Y-m-d H:i:s', time() + self::$regenerate_time));\n\t}", "title": "" }, { "docid": "31a62ced0454ce21037d01112af8488b", "score": "0.5877161", "text": "protected function complete()\n {\n parent::complete();\n }", "title": "" }, { "docid": "ef224f348950e25dfa48ea1722038be4", "score": "0.5874992", "text": "protected function afterUpload()\n {\n $this->owner->trigger(self::EVENT_AFTER_UPLOAD);\n }", "title": "" }, { "docid": "425677f54fd8b8703d9f4e48a74fc938", "score": "0.5761341", "text": "public function refreshUploaded()\n {\n $this->setUploaded(new \\DateTime());\n }", "title": "" }, { "docid": "5e3e5956c8b18fd329e81c8d4e0f1ef6", "score": "0.57501256", "text": "public function complete()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_IN_PROGRESS) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_COMPLETED;\n $this->withdrawal->save();\n }\n }", "title": "" }, { "docid": "0c0f67c3cc080325b79062676aa63ef2", "score": "0.56820273", "text": "public function markCompeted() {\n $this->status = self::COMPLETED;\n }", "title": "" }, { "docid": "e6674df4eb75f118026ba7b247f2188e", "score": "0.56726706", "text": "protected function end_bulk_operation() {\n\t\t\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}", "title": "" }, { "docid": "e7bf9ead80efb3525fc1b1cd38f9228c", "score": "0.5650235", "text": "public function completed(JobLogInterface $jobLog): void;", "title": "" }, { "docid": "f1c154336b9aa0cb4fcb1c71cde29dd6", "score": "0.5645748", "text": "public function incomplete()\n {\n $this->update(['completion_date' => null]);\n LogController::set(get_class($this).'@'.__FUNCTION__);\n // $this->recordActivity('incompleted_task');\n }", "title": "" }, { "docid": "4b8e46307d6d0aa075508c2f9686c8f5", "score": "0.5640794", "text": "public function flushBatch()\n\t{\n\t\tif ($this->batching)\n\t\t{\n\t\t\t$this->batching = FALSE;\n\t\t\t\n\t\t\t$this->statpro->endBatch();\n\t\t}\n\t}", "title": "" }, { "docid": "a5fcfd1d6c2de2325e43914b87624cf5", "score": "0.5630519", "text": "protected function end_bulk_operation() {\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}", "title": "" }, { "docid": "41d9e905ce9a30da186ab708d77eca1b", "score": "0.5628642", "text": "public function taskComplete(){\n $taskId = $_POST[\"taskId\"];\n\n $this->individualGroupModel->changeTaskCompletion($taskId, true);\n\n //redirect\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }", "title": "" }, { "docid": "6a0e6c48220a89a55cfeaa93789a9cf7", "score": "0.5627466", "text": "public function complete();", "title": "" }, { "docid": "6a0e6c48220a89a55cfeaa93789a9cf7", "score": "0.5627466", "text": "public function complete();", "title": "" }, { "docid": "71dd60c5f3af840d5c8081598607e51a", "score": "0.5590389", "text": "public static function FINISH_USER_UPLOAD_TASK(){\n\t $SQL_String = \"UPDATE user_folder SET uploadtime='',_uploading=0 WHERE owner=:uno AND ufno=:ufno;\";\n\t return $SQL_String;\n\t}", "title": "" }, { "docid": "f2914a97f264665b1a3f42e4f0d45208", "score": "0.55870885", "text": "public function markAsCompleted()\n {\n $this->forceFill(['completed_at' => now()])->save();\n\n return $this;\n }", "title": "" }, { "docid": "507ee23bd73b2b1da5b55ec4e620fbe5", "score": "0.5569241", "text": "public function setCompletedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('completedDateTime', $value);\n }", "title": "" }, { "docid": "25ec98e1b544999fb7135b3327d5f374", "score": "0.5549511", "text": "public function afterBatch();", "title": "" }, { "docid": "50bd74a4b22506f750d30f7491fb6d23", "score": "0.5539566", "text": "public function finishAction()\n\t{\n\t\tif ($this->isExportCompleted && !$this->isCloudAvailable)\n\t\t{\n\t\t\t// adjust completed local file size\n\t\t\t$this->fileSize = $this->getSizeTempFile();\n\t\t}\n\n\t\t$result = $this->preformAnswer(self::ACTION_FINISH);\n\n\t\t$result['STATUS'] = self::STATUS_COMPLETED;\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4dd7fe9ae10d1d4ae996c7306a83bf8a", "score": "0.5512191", "text": "public function completing($task)\n {\n $task->update(['complete' => true]);\n\n $this->createActive('create_with_complete_task', 'App\\Models\\Task', $this->id);\n }", "title": "" }, { "docid": "9d28a5792bf421d7e69b7582a24e60c5", "score": "0.54652697", "text": "protected function _completeFlush() {\r\n\r\n }", "title": "" }, { "docid": "e3a5daf49ce7784b1d204b3d68418a1f", "score": "0.54383254", "text": "protected function finish()\n\t{\n\t\t$executionTime = round(((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000), 3);\n\t\tLog::info('Cron: execution time: ' . $executionTime . ' | ' . implode(', ', $this->messages));\n\t}", "title": "" }, { "docid": "6a7c89cc15a97c43d0fc688e21ed4b4c", "score": "0.54092383", "text": "public function setProcessed()\r\n {\r\n $this->processed = true;\r\n }", "title": "" }, { "docid": "b7611942087022e7415b3382ab7ac233", "score": "0.54055816", "text": "public function markCompletedFor($a_user_id) {\n\t\tglobal $ilAppEventHandler;\n\n\t\t$ilAppEventHandler->raise(\"Services/Tracking\", \"updateStatus\", array(\n\t\t\t\"obj_id\" => $this->getId(),\n\t\t\t\"usr_id\" => $a_user_id,\n\t\t\t\"status\" => ilLPStatus::LP_STATUS_COMPLETED_NUM,\n\t\t\t\"percentage\" => 100\n\t\t\t));\n\t}", "title": "" }, { "docid": "34eb0fdeb72ddc293f793340b24a2b66", "score": "0.5400226", "text": "public function onComplete(\n /** @noinspection PhpUnusedParameterInspection */\n SyncTaskCompleteEvent $event\n ) {\n $this->isCalled = true;\n }", "title": "" }, { "docid": "2e9ae41bec48fd49fa9810fd4daaa581", "score": "0.53976464", "text": "public function complete() {\n\t\t$this->indexable_helper->finish_indexing();\n\t}", "title": "" }, { "docid": "2cee269e6e3318d28e2df28d59a0c922", "score": "0.5388267", "text": "function saveCompletionStatus() \n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$complete = 0;\n\t\tif ($this->isComplete()) \n\t\t{\n\t\t\t$complete = 1;\n\t\t}\n if ($this->getSurveyId() > 0) \n\t\t{\n\t\t\t$affectedRows = $ilDB->manipulateF(\"UPDATE svy_svy SET complete = %s, tstamp = %s WHERE survey_id = %s\",\n\t\t\t\tarray('text','integer','integer'),\n\t\t\t\tarray($this->isComplete(), time(), $this->getSurveyId())\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "142a02e558365ae1cbd9a46b6395ee55", "score": "0.53701043", "text": "public function finalize()\n {\n list($usec, $sec) = explode(' ', microtime());\n $micro = sprintf(\"%06d\", (float) $usec * 1000000);\n $when = new \\DateTime(date('Y-m-d H:i:s.' . $micro));\n $when->setTimezone(new \\DateTimeZone('UTC'));\n $this->finalTime = $when->format('Y-m-d\\TH:i:s.u\\Z');\n $this->isFinalState = true;\n }", "title": "" }, { "docid": "ec28cc961d31e84f21e12fff6f7f897f", "score": "0.5343486", "text": "public function processAndComplete()\n {\n if ($this->withdrawal->status == Withdrawal::STATUS_CREATED) {\n // update withdrawal model\n $this->withdrawal->status = Withdrawal::STATUS_COMPLETED;\n $this->withdrawal->save();\n }\n }", "title": "" }, { "docid": "f1c5e84a169b06ec74e852fa9b7dacec", "score": "0.53251386", "text": "protected function finishSave()\n {\n $this->fireModelEvent('saved', false);\n $this->syncOriginal();\n }", "title": "" }, { "docid": "45b33c7b44ca4ebdeba5d0ea656c9bbe", "score": "0.53175783", "text": "protected function end_bulk_operation(){\n\t\twpcom_vip_end_bulk_operation();\n\t}", "title": "" }, { "docid": "9c83370e55390810c62ee78aed5479ff", "score": "0.52875227", "text": "protected function markImportDatabaseDone() {}", "title": "" }, { "docid": "7b4d9f712635b97953cc5edc0c127dd5", "score": "0.5267397", "text": "protected function _updateStatus()\n {\n $this->_writeStatusFile(\n array(\n 'time' => time(),\n 'done' => ($this->_currentItemCount == $this->_totalFeedItems),\n 'count' => $this->_currentItemCount,\n 'total' => $this->_totalFeedItems,\n 'message' => \"Importing content. Item \" . $this->_currentItemCount\n . \" of \" . $this->_totalFeedItems . \".\"\n )\n );\n }", "title": "" }, { "docid": "2c14af63f41e80133da3a5d8882a47fb", "score": "0.5255738", "text": "public function onFinish() {\n\t\t$this->onResponse->executeAll(false);\n\t\tparent::onFinish();\n\t}", "title": "" }, { "docid": "26238c04b69e389695c93381fea8a556", "score": "0.5253975", "text": "public function finish() {\n\t\tif ($this->isFinished())\n\t\t\treturn;\n\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::FINISHED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onFinish($this->runtimeContext);\n\n\t\tif ($this->onFinish) {\n\t\t\tforeach($this->onFinish as $callback) {\n\t\t\t\t$callback($this);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "25f47e513c0c4b6a58f0864d4655b927", "score": "0.52294624", "text": "public function paymentComplete()\n {\n // Create a unique download token\n do {\n $this->download_token = str_random(12);\n } while (self::whereDownloadToken($this->download_token)->exists());\n\n $this->logStatus('complete');\n\n // Send the success email\n Mail::send('bedard.photography::mail.complete', $this->attributes, function ($message) {\n $message->to($this->email, $this->name);\n });\n }", "title": "" }, { "docid": "b8597f5565e47933bd8523a45bbd102b", "score": "0.5226014", "text": "public function isComplete() {\n return $this->getDescription() == 'Done';\n }", "title": "" }, { "docid": "b426341b8d59997b60b8055c264f3994", "score": "0.52139086", "text": "public function completedTime() {\n return intval($this['completed']);\n }", "title": "" }, { "docid": "ca45573c84595fa1bda902234a7c32ab", "score": "0.5206088", "text": "public function isCompleted(): bool\n {\n return $this->status == 'completed';\n }", "title": "" }, { "docid": "972ff31924ac752871c71d2a28df7927", "score": "0.52046657", "text": "public function markComplete($id) {\n\n // Recover the task.\n $task = Task::find($id);\n\n // Verify it's actually recovered\n if(is_null($task)) {\n Session::flash('flash_message', 'Unable to locate task');\n return redirect('/tasks');\n }\n\n // Mark complete\n $task->complete = 1;\n\n // save\n $task->save();\n\n // Let the user know, get on with it.\n Session::flash('flash_message', 'Completed: '.$task->description);\n return redirect('/tasks');\n }", "title": "" }, { "docid": "2d71edc452d05dcd73364786f12c5027", "score": "0.52044797", "text": "public function isDone(): bool\n {\n $criteria = Criteria::create()\n ->where(\n new Comparison(\n 'status',\n Comparison::IN,\n array(\n File::FILE_NEW,\n File::FILE_IN_QUEUE\n )\n )\n );\n\n return count($this->files->matching($criteria)) === 0;\n }", "title": "" }, { "docid": "a62c606d1355f317d6b0e8e002b92fbc", "score": "0.51988363", "text": "protected function afterSave(){\n /*\n * Link Complete,if you wanna the status can be changed anyway,\n * no matter it was complete or not,then coment's out this line: if ($this->progressstatus == 4) {\n */\n if ($this->progressstatus == 4) {\n $cptmodel = CampaignTask::model()->findByAttributes(array('campaign_id'=>$this->campaign_id));\n if ($cptmodel) {\n $cptmodel->setIsNewRecord(false);\n $cptmodel->setScenario('update');\n $pcount = Task::model()->countByAttributes(array('campaign_id'=>$this->campaign_id, 'progressstatus'=>4));\n $cptmodel->published_count = $pcount;\n if ($cptmodel->total_count > 0) {\n $cptmodel->percentage_done = round($cptmodel->published_count / $cptmodel->total_count, 3);\n }\n $cptmodel->save();\n }\n }\n\n return parent::afterSave();\n }", "title": "" }, { "docid": "2efafedbcd2f22bfc29f35619a4e7fc3", "score": "0.5196409", "text": "function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }", "title": "" }, { "docid": "5002500b7a2a3e8a6bdc500d3d9b2b73", "score": "0.51768064", "text": "public function complete()\n {\n // Restore the current working directory, if we redirected it.\n if ($this->cwd) {\n chdir($this->savedWorkingDirectory);\n }\n $this->task('taskDeleteDir', $this->dirs)->run();\n }", "title": "" }, { "docid": "9cd1fbe270df433e90f10cda1c8e67ec", "score": "0.5176019", "text": "public function complete()\n {\n $this->restoreWorkingDirectory();\n $this->deleteTmpDir();\n }", "title": "" }, { "docid": "b7bbaaf9a447d69d8b74e339d1da391b", "score": "0.5150382", "text": "public static function maybe_mark_complete() {\n\t\t// The install notice still exists so don't complete the profiler.\n\t\tif ( ! class_exists( 'WC_Admin_Notices' ) || \\WC_Admin_Notices::has_notice( 'install' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$onboarding_data = get_option( self::PROFILE_DATA_OPTION, array() );\n\t\t// Don't make updates if the profiler is completed, but task list is potentially incomplete.\n\t\tif ( isset( $onboarding_data['completed'] ) && $onboarding_data['completed'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$onboarding_data['completed'] = true;\n\t\tupdate_option( self::PROFILE_DATA_OPTION, $onboarding_data );\n\t\tupdate_option( 'woocommerce_task_list_hidden', 'yes' );\n\t}", "title": "" }, { "docid": "007e0c81e5fcfb518cd709855c4cb050", "score": "0.51464593", "text": "public function is_complete() {\n return (bool) $this->timecompleted;\n }", "title": "" }, { "docid": "36c6487a41eff3a82ade5d407fddf293", "score": "0.5141809", "text": "public function isComplete()\n {\n return $this->status == 'success';\n }", "title": "" }, { "docid": "79a9b18895b45dd7770affc0f74ebeee", "score": "0.51344115", "text": "public function setCompletedAt(\\DateTime $completedAt);", "title": "" }, { "docid": "646d3454b8f3c9bac1c56d70da5c7f0e", "score": "0.513358", "text": "public function finish( $batch_id ) {\n\t\taffiliate_wp()->utils->data->delete_by_match( \"^{$batch_id}[0-9a-z\\_]+\" );\n\t}", "title": "" }, { "docid": "4006c2f40f96c6ebabf28dd197c8c597", "score": "0.5129142", "text": "public function setFinished($value)\t\r\n\t{\r\n\t\tif ( is_bool($value) )\r\n\t\t{\r\n\t\t\t$this->finished = $value;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new \\InvalidArgumentException(\"param 1 must be of type bool\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f96033c364ec81b5858cc52f1a1ceb5b", "score": "0.5107478", "text": "public static function finished($callback)\n {\n static::registerModelEvent('finished', $callback);\n }", "title": "" }, { "docid": "c5cc3b8a8f9cef4759589cf08cf561fb", "score": "0.5105778", "text": "public function markSubmitted(): void\n {\n $user = Auth::user()->callsign;\n $uploadDate = date('n/j/y G:i:s');\n $batchInfo = $this->batchInfo ?? '';\n\n foreach ($this->bmids as $bmid) {\n $bmid->status = Bmid::SUBMITTED;\n\n /*\n * Make a note of what provisions were set\n */\n\n $showers = [];\n if ($bmid->showers) {\n $showers[] = 'set';\n }\n\n if ($bmid->earned_showers) {\n $showers[] = 'earned';\n }\n if ($bmid->allocated_showers) {\n $showers[] = 'allocated';\n }\n if (empty($showers)) {\n $showers[] = 'none';\n }\n\n $meals = [];\n if (!empty($bmid->meals)) {\n $meals[] = $bmid->meals . ' set';\n }\n if (!empty($bmid->earned_meals)) {\n $meals[] = $bmid->earned_meals . ' earned';\n }\n if (!empty($bmid->allocated_meals)) {\n $meals[] = $bmid->allocated_meals . ' allocated';\n }\n\n if (empty($meals)) {\n $meals[] = 'none';\n }\n\n /*\n * Figure out which provisions are to be marked as submitted.\n *\n * Note: Meals and showers are not allowed to be banked in the case were the\n * person earned them yet their position (Council, OOD, Supervisor, etc.) comes\n * with a provisions package.\n */\n\n $items = [];\n if ($bmid->effectiveShowers()) {\n $items[] = Provision::WET_SPOT;\n }\n\n if (!empty($bmid->meals) || !empty($bmid->allocated_meals)) {\n // Person is working.. consume all the meals.\n $items = [...$items, ...Provision::MEAL_TYPES];\n } else if (!empty($bmid->earned_meals)) {\n // Currently only two meal provision types, All Eat, and Event Week\n $items[] = ($bmid->earned_meals == Bmid::MEALS_ALL) ? Provision::ALL_EAT_PASS : Provision::EVENT_EAT_PASS;\n }\n\n\n if (!empty($items)) {\n $items = array_unique($items);\n Provision::markSubmittedForBMID($bmid->person_id, $items);\n }\n\n $meals = '[meals ' . implode(', ', $meals) . ']';\n $showers = '[showers ' . implode(', ', $showers) . ']';\n $bmid->notes = \"$uploadDate $user: Exported $meals $showers\\n$bmid->notes\";\n $bmid->auditReason = 'exported to print';\n $bmid->batch = $batchInfo;\n $bmid->saveWithoutValidation();\n }\n }", "title": "" }, { "docid": "10d290c0e5690e8b26ace8e6d615b0c0", "score": "0.51024854", "text": "public function getCompletedAt()\n {\n return $this->completedAt;\n }", "title": "" }, { "docid": "0a8187007e5a1fa1885acb802c324299", "score": "0.5089159", "text": "public function complete($entity, $row) {\n // Make sure the messages have the proper timestamp.\n $this->messageInsertSave($entity, $row);\n }", "title": "" }, { "docid": "a1233dc8a95ae59115af8a94607a372f", "score": "0.5087389", "text": "public function onFinish(ImportFinishedEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }", "title": "" }, { "docid": "840a4e1672ce085f9419da7c4014550d", "score": "0.5079578", "text": "public function finaliza()\n {\n $this -> estadoAtual -> finaliza($this);\n }", "title": "" }, { "docid": "ef0f3f98cd4b35813f863be3033a6c7b", "score": "0.50668776", "text": "public function markAsUndone() {\n\t\t$sql = \"UPDATE\twbb\".WBB_N.\"_thread\n\t\t\tSET\tisDone = 0\n\t\t\tWHERE\tthreadID = \".$this->threadID;\n\t\tWCF::getDB()->sendQuery($sql);\n\t}", "title": "" }, { "docid": "8e0ef3b094a46b56521e6067667d57c5", "score": "0.5066638", "text": "public function isComplete() \n\t{\n\t\treturn (($this->status == self::STATUS_COMPLETED_IMPORT) || \n\t\t ($this->status == self::STATUS_COMPLETED_UNDO_IMPORT));\n\t}", "title": "" }, { "docid": "bc2ea67b393eb62f022b7b3dc6fb285f", "score": "0.5052106", "text": "public function isCompleted()\n\t{\n\t\treturn $this->status == AdFox::OBJECT_STATUS_COMPLETED;\n\t}", "title": "" }, { "docid": "3d781d8d9f5106452c6e93c17acb2814", "score": "0.5050093", "text": "public function complete($entity, $row) {\n yt_migration_save_message_thread($entity, $row);\n }", "title": "" }, { "docid": "66c9530bd71f98494360ef6db77b3a63", "score": "0.5047953", "text": "protected function finish() {}", "title": "" }, { "docid": "9d3913aa1fdd36802336615cc436ef5e", "score": "0.50375175", "text": "protected function _set_update_complete()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $software = new Software($this->package);\n\n if ($software->is_installed()) {\n $version = $software->get_version();\n $release = $software->get_release();\n } else {\n $version = 0;\n $release = 0;\n }\n\n $payload = $this->request('SetUpdateComplete', '&version=' . $version . '&release=' . $release);\n }", "title": "" }, { "docid": "1798a2008282c31496923e0855845b60", "score": "0.503097", "text": "public function transferEnd() {\n fclose($this->_transferFile);\n\n /* Reset the values */\n $this->_transferStarted = FALSE;\n $this->_transferFile = NULL;\n }", "title": "" }, { "docid": "69409523c1c024faf78e47178c549650", "score": "0.5030902", "text": "public function isCompleted()\n {\n return $this->completed;\n }", "title": "" }, { "docid": "be2bf306d9d9c3a1d1614655fa0601da", "score": "0.5028988", "text": "protected function resolveStatusAndSetCompletedFields()\n {\n if ($this->status != Task::STATUS_COMPLETED)\n {\n $this->completed = false;\n }\n else\n {\n $this->completed = true;\n }\n\n if ($this->completed == true)\n {\n if ($this->completedDateTime == null)\n {\n $this->completedDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time());\n }\n $this->unrestrictedSet('latestDateTime', $this->completedDateTime);\n }\n }", "title": "" }, { "docid": "3f2435f936804e773b7b5f72e70fdf24", "score": "0.50269717", "text": "function tsk_mark_complete() {\n\t$lesson_args = array(\n\t\t'post_type' => 'lesson',\n\t\t'posts_per_page' => '-1'\n\t);\n\n\t$lesson_arr = get_posts($lesson_args);\n\t\n\t// Is there a better way to do this?\n\tforeach ($lesson_arr as $lesson) { \n\t\tif ( isset( $_POST['_lesson_'.$lesson->ID.'_complete'] ) ) {\n\t\t\t$new_state = $_POST['_lesson_'.$lesson->ID.'_complete'];\n\t\t\t$user_id = get_current_user_id();\n\n\t\t\tupdate_user_meta( $user_id, '_lesson_'.$lesson->ID.'_complete', $new_state ); \n\n\t\t\tif ( is_wp_error( $user_id ) ) {\n\t\t\t\t// There was an error, probably that user doesn't exist.\n\t\t\t} else {\n\t\t\t\t// Success!\n\t\t\t}\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "d84398f1fbba1e784a92a00650ced851", "score": "0.5017052", "text": "public function isComplete()\n\t{\n\t\treturn $this->status == 'Complete';\n\t}", "title": "" }, { "docid": "6a5c22182ea8d416ae2c23a54b6b0a57", "score": "0.5014328", "text": "public function markForDeletion(): void\n {\n $this->oldFileName = $this->fileName;\n $this->fileName = null;\n }", "title": "" }, { "docid": "dfac5cbc5e5dccd44387174ac074d329", "score": "0.50123894", "text": "public function hasCompleted() : bool\n {\n return $this->completed_at !== null;\n }", "title": "" }, { "docid": "f59bbb0847f00bbf8349bf012686a327", "score": "0.50122344", "text": "public function register_end()\n {\n echo \"Ended the Action \";\n date_default_timezone_set('Europe/Berlin');\n //Array that keeps the localtime \n $arrayt = localtime();\n //calculates seconds rn for further use\n $timeRN = $arrayt[0] + ($arrayt[1] * 60) + ($arrayt[2] * 60 * 60); //in seconds\n\n $jsondecode = file_get_contents($this->save);\n $decoded = json_decode($jsondecode, true);\n for ($i = 0; $i < count($decoded); $i++) {\n if ($decoded[$i][0]['Endtime'] == NULL) {\n $decoded[$i][0]['Endtime'] = $timeRN;\n $encoded = json_encode($decoded);\n file_put_contents($this->save, $encoded);\n }\n }\n }", "title": "" }, { "docid": "ccb9867aa27929ad8692c25f2eb2326f", "score": "0.50105244", "text": "public function markWorkoutAsComplete(){\n $this->autoRender = false;\n \n $success = true;\n $message = 'Workout has been marked as complete.';\n \n //get user id and check authentication\n $userId = $this->Session->check('User.id')?$this->Session->read('User.id'):'';\n if(empty($userId)){\n $success = false;\n $message = 'Authentication Failed';\n }\n \n if(!$this->request->is('put')){\n $success = false;\n $message = 'Invalid request method';\n }\n \n $data = $this->request->input('json_decode', true); \n if(empty($data)){\n return;\n }\n $programWorkoutId = $data['programWorkoutId'];\n $completed = isset($data['completed'])?$data['completed']:1;\n \n $respData = [];\n $this->loadModel('UserWorkout');\n try{\n \n $userProgramWorkoutId = $this->chkUserPogramWorkout($userId, $programWorkoutId);\n \n $userWrokoutdata = [];\n $userWrokoutdata['UserWorkout']['user_id'] = $userId;\n $userWrokoutdata['UserWorkout']['program_workout_id'] = $programWorkoutId;\n $userWrokoutdata['UserWorkout']['completed_status'] = $completed;\n if(!empty($userProgramWorkoutId)){\n //update the data for given id\n $userWrokoutdata['UserWorkout']['id'] = $userProgramWorkoutId; \n }\n $this->UserWorkout->save($userWrokoutdata);\n } catch (Exception $ex) {\n $message = $ex->getMessage();\n $success = false;\n }\n \n //prepare response \n $resp = $this->UserWorkout->prepareResponse($success, $message, $respData); \n return $resp;\n }", "title": "" }, { "docid": "55bd6e37a4e9ea8abff42fed43305210", "score": "0.50076485", "text": "public function finish()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "0ebe37e11298e916fc4751fca6cf900a", "score": "0.500738", "text": "public function complete( $order ){\n\t\t$order->complete();\n\t}", "title": "" }, { "docid": "1185889c1c13e2a20bd00638b8e0b5c9", "score": "0.5001962", "text": "protected function done()\n {\n }", "title": "" }, { "docid": "837b5084770ceec87cbd2e4a9d1f1162", "score": "0.4998181", "text": "public function getCompleteTime()\n {\n return $this->complete_time;\n }", "title": "" }, { "docid": "e044c934b142ce9718cca0d1dd70428d", "score": "0.49959058", "text": "protected function cleanupOldCompleted(): void\n {\n // successful jobs and failed jobs are deleted after different periods of time\n $this->deleteAsyncJobByThreshold('aj.error IS NULL', $this->cleanupThreshold);\n $this->deleteAsyncJobByThreshold('aj.error IS NOT NULL', $this->cleanupFailedThreshold);\n }", "title": "" }, { "docid": "d51f12185d384f6ebef6d0b5c77b1ac7", "score": "0.4994211", "text": "public function getLastuploaddate() {}", "title": "" }, { "docid": "340c75087d1067f23824ccf9f6bae6ee", "score": "0.49911147", "text": "public function finish() {}", "title": "" }, { "docid": "340c75087d1067f23824ccf9f6bae6ee", "score": "0.4990993", "text": "public function finish() {}", "title": "" } ]
0a22b33d9edfcd05eaf2a675161db00b
Test send() + context options with array content.
[ { "docid": "8a671028513cfb17eb12a03d00fc5e29", "score": "0.80065006", "text": "public function testSendContextContentArray(): void\n {\n $request = new Request(\n 'http://localhost',\n 'GET',\n [\n 'Content-Type' => 'application/json',\n ],\n ['a' => 'my value']\n );\n\n $this->stream->send($request, []);\n $result = $this->stream->contextOptions();\n $expected = [\n 'Content-Type: application/x-www-form-urlencoded',\n 'Connection: close',\n 'User-Agent: CakePHP',\n ];\n $this->assertStringStartsWith(implode(\"\\r\\n\", $expected), $result['header']);\n $this->assertStringContainsString('a=my+value', $result['content']);\n $this->assertStringContainsString('my+value', $result['content']);\n }", "title": "" } ]
[ { "docid": "fe3dbb0e3372a4d4a86cb36071545807", "score": "0.6826122", "text": "public function testSendContextContentArrayFiles(): void\n {\n $request = new Request(\n 'http://localhost',\n 'GET',\n ['Content-Type' => 'application/json'],\n ['upload' => fopen(CORE_PATH . 'VERSION.txt', 'r')]\n );\n\n $this->stream->send($request, []);\n $result = $this->stream->contextOptions();\n $this->assertStringContainsString('Content-Type: multipart/form-data', $result['header']);\n $this->assertStringContainsString(\"Connection: close\\r\\n\", $result['header']);\n $this->assertStringContainsString('User-Agent: CakePHP', $result['header']);\n $this->assertStringContainsString('name=\"upload\"', $result['content']);\n $this->assertStringContainsString('filename=\"VERSION.txt\"', $result['content']);\n }", "title": "" }, { "docid": "aaa0c3f5e35874743c643a0b032e4ec8", "score": "0.6728527", "text": "function send(array $data = []);", "title": "" }, { "docid": "007cbcd492bae0f4d20537d86db379c6", "score": "0.65722466", "text": "public function testSendContextContentString(): void\n {\n $content = json_encode(['a' => 'b']);\n $request = new Request(\n 'http://localhost',\n 'GET',\n ['Content-Type' => 'application/json'],\n $content\n );\n\n $options = [\n 'redirect' => 20,\n ];\n $this->stream->send($request, $options);\n $result = $this->stream->contextOptions();\n $expected = [\n 'Content-Type: application/json',\n 'Connection: close',\n 'User-Agent: CakePHP',\n ];\n $this->assertSame(implode(\"\\r\\n\", $expected), $result['header']);\n $this->assertEquals($content, $result['content']);\n }", "title": "" }, { "docid": "fe8364382ce9b6ce25fb780221bb3f65", "score": "0.60187745", "text": "public function testGetArguments()\n {\n $data = array(\n 'to' => '1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq',\n 'amount' => 100000,\n );\n\n $cut = new Send();\n\n $cut->setTo($data['to']);\n $cut->setAmount($data['amount']);\n $this->assertEquals($data, $cut->getArguments());\n\n $data['from'] = '1Q1AtvCyKhtveGm3187mgNRh5YcukUWjQC';\n $cut->setFrom($data['from']);\n $this->assertEquals($data, $cut->getArguments());\n\n $data['shared'] = false;\n $cut->setShared($data['shared']);\n $this->assertEquals($data, $cut->getArguments());\n\n $data['fee'] = '100';\n $cut->setFee($data['fee']);\n $this->assertEquals($data, $cut->getArguments());\n\n $data['note'] = 'test';\n $cut->setNote($data['note']);\n $this->assertEquals($data, $cut->getArguments());\n }", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.57785505", "text": "public function send();", "title": "" }, { "docid": "eb721e9dca420c9cc828c799d320c72f", "score": "0.56725657", "text": "public function send() {}", "title": "" }, { "docid": "49287770146789d6db48f1c7713cdbb1", "score": "0.5629479", "text": "public function test_send_using_raw_parameters()\n {\n $mockHttpClient = Mockery::mock(HttpClient::class);\n $mockHttpClient->shouldReceive('send')->andReturn($this->getDummyResponse());\n\n $client = new Client($this->server);\n $client->setHttpClient($mockHttpClient);\n\n $response = $client->call('foo', 'bar', 'baz');\n\n $this->assertEquals(['foo' => 'bar'], $response->result());\n }", "title": "" }, { "docid": "846c829332b0fd29b8caba8977aaa202", "score": "0.56187856", "text": "public function send () {}", "title": "" }, { "docid": "846c829332b0fd29b8caba8977aaa202", "score": "0.56187856", "text": "public function send () {}", "title": "" }, { "docid": "846c829332b0fd29b8caba8977aaa202", "score": "0.56187856", "text": "public function send () {}", "title": "" }, { "docid": "8795fb9290404272112b373fb1dff50b", "score": "0.5596672", "text": "abstract public function send();", "title": "" }, { "docid": "8795fb9290404272112b373fb1dff50b", "score": "0.5596672", "text": "abstract public function send();", "title": "" }, { "docid": "f029c311c2fdc0b201717dd5252df4bd", "score": "0.55816174", "text": "public function testSendRequestWithRawData()\n {\n foreach ($this->methods as $method) {\n\n //No raw data for GET method\n if ($method == 'GET') {\n continue;\n }\n\n $response = self::$client->sendRequest(\n $method,\n self::$url,\n json_encode($this->testParams),\n [],\n true\n );\n\n $response = json_decode($response, true);\n\n $this->assertEquals($method, $response['method']);\n $this->assertEquals([json_encode($this->testParams) => ''], $response['params']);\n }\n }", "title": "" }, { "docid": "89df4bde97a2cf4a646af6067a6db97a", "score": "0.55708647", "text": "public function send($data) {}", "title": "" }, { "docid": "cbc86303441f8aea32ea1ee511a8191b", "score": "0.5542811", "text": "public function testSendSetsOptions()\n {\n $url = 'maybe-localhost';\n $handle = new Klarna_Checkout_HTTP_CURLHandleStub;\n $handle->expectedURL = $url;\n $this->factory->expects($this->once())\n ->method('handle')\n ->will($this->returnValue($handle));\n $request = $this->http->createRequest($url);\n $this->http->send($request);\n $this->assertEquals($url, $handle->options[CURLOPT_URL]);\n $this->assertFalse(\n array_key_exists(CURLOPT_POST, $handle->options) &&\n $handle->options[CURLOPT_POST]\n );\n $this->assertTrue($handle->options[CURLOPT_RETURNTRANSFER]);\n $this->assertSame(\n $this->http->getTimeout(),\n $handle->options[CURLOPT_CONNECTTIMEOUT]\n );\n $this->assertSame(\n $this->http->getTimeout(),\n $handle->options[CURLOPT_TIMEOUT]\n );\n }", "title": "" }, { "docid": "ec9485f796c45ef4df5ef2d278fd7574", "score": "0.5533865", "text": "public function testSendQueueWithParameterArrayConversion()\n {\n $objectMock = $this->getMockBuilder(TulipObjectInterface::class)\n ->getMock();\n $objectMock->expects($this->once())\n ->method('getTulipParameters')\n ->willReturn(array('array' => array(1 => 'foo', 5 => 'bar')));\n $objectMock->expects($this->once())\n ->method('setTulipId')\n ->with($this->equalTo('1'));\n\n $clientMock = $this->getMockBuilder(Client::class)\n ->disableOriginalConstructor()\n ->getMock();\n $clientMock->expects($this->exactly(2))\n ->method('getServiceUrl')\n ->willReturn('https://api.example.com');\n $clientMock->expects($this->once())\n ->method('callService')\n ->with($this->equalTo(strtolower(get_class($objectMock))), $this->equalTo('save'), $this->equalTo(array('array[0]' => 'foo', 'array[1]' => 'bar')), $this->equalTo(array()))\n ->willReturn(new Response(200, array(), '<?xml version=\"1.0\" encoding=\"UTF-8\"?><response code=\"1000\"><result offset=\"0\" limit=\"0\" total=\"0\"><object><id>1</id></object></result></response>'));\n\n $objectManagerMock = $this->getMockBuilder(ObjectManager::class)\n ->getMock();\n $objectManagerMock->expects($this->once())\n ->method('persist')\n ->with($this->equalTo($objectMock));\n $objectManagerMock->expects($this->once())\n ->method('flush');\n\n $queueManager = new QueueManager($clientMock);\n $queueManager->queueObject($objectMock);\n $queueManager->sendQueue($objectManagerMock);\n }", "title": "" }, { "docid": "c1e047336eed66a4ab23946c9586361d", "score": "0.55271703", "text": "abstract public function send($data);", "title": "" }, { "docid": "b661d0bad633710874171a2a0c2acef7", "score": "0.551586", "text": "abstract protected function send($data);", "title": "" }, { "docid": "ce2ea350540c37aff2266526980de321", "score": "0.5495583", "text": "public function sendCurlSetoptArrayFails()\n {\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_setopt_array',\n function () {\n return false;\n }\n );\n\n (new CurlAdapter())->send(new Request('not under test', 'get', [], []));\n }", "title": "" }, { "docid": "3fe4f5578fbcccdc5202aba70e3385ac", "score": "0.5492684", "text": "public function testSendContextSsl(): void\n {\n $request = new Request('https://localhost.com/test.html');\n $options = [\n 'ssl_verify_host' => true,\n 'ssl_verify_peer' => true,\n 'ssl_verify_peer_name' => true,\n 'ssl_verify_depth' => 9000,\n 'ssl_allow_self_signed' => false,\n 'proxy' => [\n 'proxy' => '127.0.0.1:8080',\n ],\n ];\n\n $this->stream->send($request, $options);\n $result = $this->stream->contextOptions();\n $expected = [\n 'peer_name' => 'localhost.com',\n 'verify_peer' => true,\n 'verify_peer_name' => true,\n 'verify_depth' => 9000,\n 'allow_self_signed' => false,\n 'proxy' => '127.0.0.1:8080',\n ];\n foreach ($expected as $k => $v) {\n $this->assertEquals($v, $result[$k]);\n }\n $this->assertIsReadable($result['cafile']);\n }", "title": "" }, { "docid": "c3dff6d3ee86ed8f5f993668cfea1af6", "score": "0.5460268", "text": "public function sendContent();", "title": "" }, { "docid": "315540eb3f44a0f6be17a746aff64686", "score": "0.5453114", "text": "public function testSendByUsingCakephpProtocol(): void\n {\n $stream = new Stream();\n $request = new Request('http://dummy/');\n\n /** @var \\Cake\\Http\\Client\\Response[] $responses */\n $responses = $stream->send($request, []);\n $this->assertInstanceOf(Response::class, $responses[0]);\n\n $this->assertSame(20000, strlen($responses[0]->getStringBody()));\n }", "title": "" }, { "docid": "62d9fcabfd582fa728533bd8f8924551", "score": "0.5452214", "text": "public function send()\n {\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_init',\n function () {\n return true;\n }\n );\n\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_setopt_array',\n function ($curl, array $options) {\n return true;\n }\n );\n\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_exec',\n function ($curl) {\n return \"HTTP/1.1 200 OK\\r\\nContent-Length: 13\\r\\nContent-Type: application/json\\r\\n\\n{\\\"foo\\\":\\\"bar\\\"}\";\n }\n );\n\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_error',\n function ($curl) {\n return '';\n }\n );\n\n \\Chadicus\\FunctionRegistry::set(\n __NAMESPACE__,\n 'curl_getinfo',\n function ($curl, $option) {\n if ($option === CURLINFO_HEADER_SIZE) {\n return 69;\n }\n\n if ($option === CURLINFO_HTTP_CODE) {\n return 200;\n }\n }\n );\n\n $response = (new CurlAdapter())->send(new Request('not under test', 'get', [], ['foo' => 'bar']));\n $this->assertSame(200, $response->getHttpCode());\n $this->assertSame(\n [\n 'Response Code' => 200,\n 'Response Status' => 'OK',\n 'Content-Length' => '13',\n 'Content-Type' => 'application/json',\n ],\n $response->getHeaders()\n );\n $this->assertSame(['foo' => 'bar'], $response->getBody());\n }", "title": "" }, { "docid": "ca86a8850f7c3d04dcfb888fd0834e88", "score": "0.53356904", "text": "public function testBulkSendEmailsUsingPOST()\n {\n }", "title": "" }, { "docid": "4e578aa1559326a414960066b6791e80", "score": "0.52648956", "text": "public function testSend(): void\n {\n $stream = new Stream();\n $request = new Request('http://localhost', 'GET', [\n 'User-Agent' => 'CakePHP TestSuite',\n 'Cookie' => 'testing=value',\n ]);\n\n try {\n $responses = $stream->send($request, []);\n } catch (CakeException $e) {\n $this->markTestSkipped('Could not connect to localhost, skipping');\n }\n $this->assertInstanceOf(Response::class, $responses[0]);\n }", "title": "" }, { "docid": "a06bc06fb5bc50ee0804c442283b9064", "score": "0.52574116", "text": "public function testSendRequest()\n {\n foreach ($this->methods as $method) {\n $response = self::$client->sendRequest(\n $method,\n self::$url,\n $this->testParams\n );\n\n $response = json_decode($response, true);\n\n $this->assertEquals($method, $response['method']);\n $this->assertEquals($this->testParams, $response['params']);\n }\n }", "title": "" }, { "docid": "cfeaa3c92ae824e5c68a69d79151af56", "score": "0.52424765", "text": "public function send(mixed $value) {}", "title": "" }, { "docid": "a05dcb309392c8d2f7466cced0d70e2c", "score": "0.5239878", "text": "public function It_should_set_Content_Length_on_Array_bodies_if_none_is_set()\n\t{\n\t\t$middleware_app = new Prack_Test_Echo( 200, array( 'Content-Type' => 'text/plain' ), array( 'Hello, World!' ) );\n\t\t$env = array();\n\t\t$response = Prack_ContentLength::with( $middleware_app )->call( $env );\n\t\t$this->assertEquals( '13', $response[ 1 ][ 'Content-Length' ] );\n\t}", "title": "" }, { "docid": "f57806fd66d56fbf49f206cb7d846b1b", "score": "0.5235475", "text": "abstract public function sendData($data);", "title": "" }, { "docid": "b52c7cd127caeb116468f65b164b23d3", "score": "0.5229248", "text": "public function send()\n {\n }", "title": "" }, { "docid": "b52c7cd127caeb116468f65b164b23d3", "score": "0.5229248", "text": "public function send()\n {\n }", "title": "" }, { "docid": "a0cbba17aaa25c385ad7edfb2ade3f6f", "score": "0.52209955", "text": "abstract protected function setParamsForSend(): void;", "title": "" }, { "docid": "67776ad867a6037809b2d7633e46b2b5", "score": "0.520642", "text": "public function testPerformSendAction()\n {\n }", "title": "" }, { "docid": "4fdb1d4b9ab051e3adb763ad4f48eb8d", "score": "0.5181054", "text": "public function send(): void;", "title": "" }, { "docid": "b304aaf8ba3ab983cdbb567991f79842", "score": "0.51796067", "text": "public function testPushMethodUsesSend()\n {\n $app = $this->app;\n $memory = $app['orchestra.memory'];\n $mailer = $app['mailer'];\n\n $memory->shouldReceive('get')->twice()->with('email.queue', false)->andReturn(false);\n $mailer->shouldReceive('setSwiftMailer')->once()->andReturn(null)\n ->shouldReceive('alwaysFrom')->once()->with('[email protected]', 'Orchestra Platform')\n ->shouldReceive('send')->twice()->with('foo.bar', array('foo' => 'foobar'), '')->andReturn(true);\n\n $stub = with(new Mailer($app))->attach($app['orchestra.memory']);\n $this->assertTrue($stub->push('foo.bar', array('foo' => 'foobar'), ''));\n $this->assertTrue($stub->push('foo.bar', array('foo' => 'foobar'), ''));\n }", "title": "" }, { "docid": "9f04133693686aed8fcdbf55e21a2812", "score": "0.5152145", "text": "public function testSendMessage(): void {\n\n $generatedMessage = $this->mailerHelper->buildMessage(\"subject\", \"body\", \"text/html\", \"utf8\");\n\n $failedRecipients = [];\n $sendResponse = $this->mailerHelper->sendMessage($generatedMessage, $failedRecipients);\n\n $this->assertEquals(1, $sendResponse);\n $this->assertEquals([], $failedRecipients);\n }", "title": "" }, { "docid": "b48a6c7fadfba57b55fe33abd15da46d", "score": "0.51207024", "text": "public function sendMessage()\n {\n\n $message = new Message();\n call_user_func_array([$message, 'bulkSet'], func_get_args());\n\n return $this->send($message);\n }", "title": "" }, { "docid": "b89429a5ede6ea78d6b790f6cb9e7c78", "score": "0.5115847", "text": "public function send($type, $body = '', $expectSplitResponse=false) {\n// \t\tdebug(\"Send $type\");\n// \t\tdebug(\"Send \".$body);\n\t\t$this->_sendPacket($type, $body);\n\t\t$r = $this->_receivePacket($expectSplitResponse);\n// \t\tdebug('Received packet ', $r);\n// \t\t$id = $this->_sendPacket(self::PACKET_COMMAND, $command);\n// \t\t$ret = $this->_receivePacket($expectSplitResponse);\n\t\treturn $r;\n// \t\treturn $this->_receivePacket();\n\t}", "title": "" }, { "docid": "e5bf748327a893f42d9d6b68f95c1813", "score": "0.5114451", "text": "public function test_send_will_call_send_on_adapter(): void\n {\n\n $request = $this->getMockBuilder(TCPRequest::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $streamAdapter = $this->getAdapterMock(StreamAdapter::class);\n\n $streamAdapter->expects($this->once())\n ->method('send')\n ->with($this->equalTo($request));\n\n $tcp = $this->getMockBuilder(TCP::class)\n ->disableOriginalConstructor()\n ->onlyMethods(['getDefaultAdapters'])\n ->getMock();\n\n $tcp->method('getDefaultAdapters')\n ->will($this->returnValue([\n $streamAdapter,\n ]));\n\n $tcp->send($request);\n }", "title": "" }, { "docid": "ce28a247f0d6ea9e89240ebe9ce477a1", "score": "0.5114421", "text": "public function testRequestOptions()\n {\n $reflection = new ReflectionClass($this->handler);\n $method = $reflection->getMethod('getRequestOptions');\n $method->setAccessible(true);\n\n $options = ['some-query-option' => true];\n\n $parameters = [\n 'key' => 'value',\n 'key2' => 'value2'\n ];\n\n $result = $method->invokeArgs($this->handler, [\n 'GET', $parameters, $options\n ]);\n\n $this->assertCount(2, $result);\n $this->assertEquals(true, $result['some-query-option']);\n $this->assertCount(2, $result['query']);\n $this->assertEquals('value', $result['query']['key']);\n $this->assertEquals('value2', $result['query']['key2']);\n\n $result = $method->invokeArgs($this->handler, [\n 'POST', $parameters, $options\n ]);\n\n $this->assertCount(2, $result);\n $this->assertEquals(true, $result['some-query-option']);\n $this->assertInstanceOf(\\StdClass::class, $result['json']);\n $this->assertCount(2, get_object_vars($result['json']));\n $this->assertEquals('value', $result['json']->key);\n $this->assertEquals('value2', $result['json']->key2);\n }", "title": "" }, { "docid": "acf81a14659299636762902d6254e31a", "score": "0.50893354", "text": "public function send(RequestInterface $request, array $options = []);", "title": "" }, { "docid": "346ba12852993c0c27de375bb335ad3f", "score": "0.5077094", "text": "public function testSendContentLength() {\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$response->body('the response body');\n\t\t$response->expects($this->once())->method('_sendContent')->with('the response body');\n\t\t$response->expects($this->at(0))\n\t\t\t->method('_sendHeader')->with('HTTP/1.1 200 OK');\n\t\t$response->expects($this->at(2))\n\t\t\t->method('_sendHeader')->with('Content-Type', 'text/html; charset=UTF-8');\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Content-Length', strlen('the response body'));\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body($body);\n\t\t$response->expects($this->once())->method('_sendContent')->with($body);\n\t\t$response->expects($this->at(0))\n\t\t\t->method('_sendHeader')->with('HTTP/1.1 200 OK');\n\t\t$response->expects($this->at(2))\n\t\t\t->method('_sendHeader')->with('Content-Type', 'text/html; charset=UTF-8');\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Content-Length', 116);\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', 'outputCompressed'));\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body($body);\n\t\t$response->expects($this->once())->method('outputCompressed')->will($this->returnValue(true));\n\t\t$response->expects($this->once())->method('_sendContent')->with($body);\n\t\t$response->expects($this->exactly(2))->method('_sendHeader');\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', 'outputCompressed'));\n\t\t$body = 'hwy';\n\t\t$response->body($body);\n\t\t$response->header('Content-Length', 1);\n\t\t$response->expects($this->never())->method('outputCompressed');\n\t\t$response->expects($this->once())->method('_sendContent')->with($body);\n\t\t$response->expects($this->at(1))\n\t\t\t\t->method('_sendHeader')->with('Content-Length', 1);\n\t\t$response->send();\n\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$body = 'content';\n\t\t$response->statusCode(301);\n\t\t$response->body($body);\n\t\t$response->expects($this->once())->method('_sendContent')->with($body);\n\t\t$response->expects($this->exactly(2))->method('_sendHeader');\n\t\t$response->send();\n\n\t\tob_start();\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$goofyOutput = 'I am goofily sending output in the controller';\n\t\techo $goofyOutput;\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent'));\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body($body);\n\t\t$response->expects($this->once())->method('_sendContent')->with($body);\n\t\t$response->expects($this->at(0))\n\t\t\t->method('_sendHeader')->with('HTTP/1.1 200 OK');\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('Content-Length', strlen($goofyOutput) + 116);\n\t\t$response->expects($this->at(2))\n\t\t\t->method('_sendHeader')->with('Content-Type', 'text/html; charset=UTF-8');\n\t\t$response->send();\n\t\tob_end_clean();\n\t}", "title": "" }, { "docid": "6236c0d46a7dd7645147850df2d9a706", "score": "0.50752836", "text": "abstract protected function send(string $method, string $uri, array $options = []);", "title": "" }, { "docid": "9cd173dc73689afb6161adbf25debe26", "score": "0.50695497", "text": "public function send() : void;", "title": "" }, { "docid": "e745700ba86eac23e7fe7c248f0f9c1f", "score": "0.50644696", "text": "private function send(array $data)\n {\n $this->connection->send(json_encode($data));\n }", "title": "" }, { "docid": "4df114762d5b7de32d37a004e5867084", "score": "0.5044543", "text": "function testOptionArray() {\n\t\tif (! JUnit_Setup::isTestEnabled(JVERSION, self::$version15up)) {\n\t\t\t$this -> markTestSkipped(self::VERSION_SKIP_MSG);\n\t\t\treturn;\n\t\t}\n\t\t$data = self::makeSampleOptions('array');\n\t\t$expect = self::expectingOptions();\n\t\t$html = JHtmlSelect::options($data);\n\t\t$this -> assertEquals($html, $expect, JUnit_TestCaseHelper::stringDiff($html, $expect));\n\t}", "title": "" }, { "docid": "f4d4929089ea3662c3855a2cf5bfea4a", "score": "0.50421804", "text": "function send($options) {\n\n $sender = new SmsZilla\\SmsSender(createAdapter($options));\n $sender->setText($options['m']);\n $sender->setRecipient($options['n']);\n $sender->send();\n if ($options['v']) {\n if ($sender->getAdapter()->getErrors()->count()) {\n foreach ($sender->getAdapter()->getErrors() as $error) {\n print $error->getMessage();\n\n }\n }\n else {\n printf (\"Message(s) to %s sended.\\n\", join(', ', $options['n']));\n }\n }\n}", "title": "" }, { "docid": "2e80a9a0aedd888e4f365f6c6a346751", "score": "0.50256586", "text": "public function send($type, $text);", "title": "" }, { "docid": "2c313792476784945f75710bea6479e9", "score": "0.50204694", "text": "public function test_send_called_passProperParamsToMandrill()\n {\n $this->markTestSkipped('we use Postmark provider');\n $template_name = 'template name';\n $template_vars = ['template', 'vars'];\n list($from_name, $from_email, $to, $subject, $html, $global_vars, $recipient_vars, $api_key, $message) = $this->getMessageArray();\n\n list($mandrill_double_revelation, $messages_double) = $this->getMessagesDouble();\n\n $messages_double->sendTemplate($template_name, $template_vars, $message)->shouldBeCalled();\n $mandrill_double_revelation->messages = $messages_double->reveal();\n\n $sut = new MandrillWrapper($api_key, $mandrill_double_revelation);\n $sut->send($from_name, $from_email, $to, $subject, $html, $global_vars, $recipient_vars, $template_name, $template_vars);\n }", "title": "" }, { "docid": "3a448eb2c0ff18a7bfc944d7ca7959bf", "score": "0.5008641", "text": "public function testSendContentLength() {\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$response->body ( 'the response body' );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( 'the response body' );\n\t\t$response->expects ( $this->at ( 0 ) )->method ( '_sendHeader' )->with ( 'HTTP/1.1 200 OK' );\n\t\t$response->expects ( $this->at ( 2 ) )->method ( '_sendHeader' )->with ( 'Content-Type', 'text/html; charset=UTF-8' );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Content-Length', strlen ( 'the response body' ) );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body ( $body );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( $body );\n\t\t$response->expects ( $this->at ( 0 ) )->method ( '_sendHeader' )->with ( 'HTTP/1.1 200 OK' );\n\t\t$response->expects ( $this->at ( 2 ) )->method ( '_sendHeader' )->with ( 'Content-Type', 'text/html; charset=UTF-8' );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Content-Length', 116 );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent',\n\t\t\t\t'outputCompressed' \n\t\t) );\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body ( $body );\n\t\t$response->expects ( $this->once () )->method ( 'outputCompressed' )->will ( $this->returnValue ( true ) );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( $body );\n\t\t$response->expects ( $this->exactly ( 2 ) )->method ( '_sendHeader' );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent',\n\t\t\t\t'outputCompressed' \n\t\t) );\n\t\t$body = 'hwy';\n\t\t$response->body ( $body );\n\t\t$response->header ( 'Content-Length', 1 );\n\t\t$response->expects ( $this->never () )->method ( 'outputCompressed' );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( $body );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Content-Length', 1 );\n\t\t$response->send ();\n\t\t\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$body = 'content';\n\t\t$response->statusCode ( 301 );\n\t\t$response->body ( $body );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( $body );\n\t\t$response->expects ( $this->exactly ( 2 ) )->method ( '_sendHeader' );\n\t\t$response->send ();\n\t\t\n\t\tob_start ();\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$goofyOutput = 'I am goofily sending output in the controller';\n\t\techo $goofyOutput;\n\t\t$response = $this->getMock ( 'CakeResponse', array (\n\t\t\t\t'_sendHeader',\n\t\t\t\t'_sendContent' \n\t\t) );\n\t\t$body = '長い長い長いSubjectの場合はfoldingするのが正しいんだけどいったいどうなるんだろう?';\n\t\t$response->body ( $body );\n\t\t$response->expects ( $this->once () )->method ( '_sendContent' )->with ( $body );\n\t\t$response->expects ( $this->at ( 0 ) )->method ( '_sendHeader' )->with ( 'HTTP/1.1 200 OK' );\n\t\t$response->expects ( $this->at ( 1 ) )->method ( '_sendHeader' )->with ( 'Content-Length', strlen ( $goofyOutput ) + 116 );\n\t\t$response->expects ( $this->at ( 2 ) )->method ( '_sendHeader' )->with ( 'Content-Type', 'text/html; charset=UTF-8' );\n\t\t$response->send ();\n\t\tob_end_clean ();\n\t}", "title": "" }, { "docid": "f3e4f2897dce75aee6063a87b2961612", "score": "0.4998985", "text": "final public function testSendMessage(): void {\n $this->_composeMessage->rcptTo('[email protected]');\n $this->_composeMessage->mailFrom('[email protected]');\n $this->_composeMessage->data('This is a message to test the delivery of messages.');\n $result = $this->_composeMessage->send();\n foreach ($result->recipients() as $email => $message) {\n $this->assertEquals('[email protected]', $email);\n }\n }", "title": "" }, { "docid": "d03e136a91a55eaf80df3f147cf864ab", "score": "0.49956056", "text": "public function testSendMethodViaSendMail()\n {\n $app = array(\n 'orchestra.memory' => $memory = m::mock('\\Orchestra\\Memory\\Provider')->makePartial(),\n 'mailer' => $mailer = m::mock('Mailer'),\n );\n\n $memory->shouldReceive('get')->with('email')->andReturn(array(\n 'driver' => 'sendmail',\n 'sendmail' => '/bin/sendmail -t',\n ))\n ->shouldReceive('get')->with('email.from')->andReturn(array(\n 'address' => '[email protected]',\n 'name' => 'Orchestra Platform',\n ));\n\n $mailer->shouldReceive('setSwiftMailer')->once()->andReturn(null)\n ->shouldReceive('alwaysFrom')->once()->with('[email protected]', 'Orchestra Platform')\n ->shouldReceive('send')->once()->with('foo.bar', array('foo' => 'foobar'), '')->andReturn(true);\n\n $stub = with(new Mailer($app))->attach($app['orchestra.memory']);\n $this->assertTrue($stub->send('foo.bar', array('foo' => 'foobar'), ''));\n }", "title": "" }, { "docid": "18e4c37057bc183f19e488ff397953b2", "score": "0.49943244", "text": "public function send($content = null) {\n\t\tif ($this->realRecipients) {\n\t\t\t$originalTo = $this->to();\n\t\t\t$originalCC = $this->cc();\n\t\t\t$originalBCC = $this->bcc();\n\t\t\t$this->to($this->realRecipients);\n\t\t\tif ($originalTo) {\n\t\t\t\t$this->addHeaders(array('X-intended-to' => join(', ', $originalTo)));\n\t\t\t}\n\t\t\tif ($originalCC) {\n\t\t\t\t$this->addHeaders(array('X-intended-cc' => join(', ', $originalCC)));\n\t\t\t\t$this->cc(array());\n\t\t\t}\n\t\t\tif ($originalBCC) {\n\t\t\t\t$this->addHeaders(array('X-intended-bcc' => join(', ', $originalBCC)));\n\t\t\t\t$this->bcc(array());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new InvalidArgumentException(__('Must set a real recipients'));\n\t\t}\n\n\t\treturn parent::send($content);\n\t}", "title": "" }, { "docid": "1bd15894ce8e2e66dae7d0745c7f020d", "score": "0.4972988", "text": "public function testSend() {\n\t\t$charge = (new Charge())\n\t\t\t->setClientId(\"asd\")\n\t\t\t->setClientSecret(\"zxc\")\n\t\t\t->setTestMode(true)\n\t\t\t->setSourceCode(\"1414\")\n\t\t\t->setAmount(1230)\n\t\t\t->setChargeToken(\"qwe\");\n\n\t\t$stub = test::double($charge, [\"getAccessToken\" => null, \"getError\" => \"Some error\"]);\n\n\t\t$result = $charge->send();\n\n\t\t$stub->verifyInvokedOnce(\"getAccessToken\");\n\t\t$stub->verifyInvokedOnce(\"getError\");\n\n\t\t$this->assertEmpty($result);\n\t\t$this->assertSame(\"Some error\", $charge->getError());\n\n\t\t// test successful execution with production env\n\t\t$charge = (new Charge())\n\t\t\t->setClientId(\"asd\")\n\t\t\t->setClientSecret(\"zxc\")\n\t\t\t->setTestMode(true)\n\t\t\t->setSourceCode(\"1414\")\n\t\t\t->setAmount(1230)\n\t\t\t->setChargeToken(\"qwe\");\n\n\t\t$stub = test::double($charge, [\"getAccessToken\" => \"access_token\"]);\n\t\t$url = test::double(\"\\ATDev\\Viva\\Transaction\\Url\", [\"getUrl\" => \"some-url\"]);\n\n\t\t$response = new Fixture();\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"transactionId\":\"this_is_transaction_id\"}');\n\n\t\t$client = test::double(\"\\GuzzleHttp\\Client\", [\"request\" => $response]);\n\n\t\t$result = $charge->send();\n\n\t\t$expected = new \\stdClass();\n\t\t$expected->transactionId = \"this_is_transaction_id\";\n\t\t$this->assertNull($charge->getError()); // No error\n\t\t$this->assertEquals($result, $expected); // Array with transaction id\n\n\t\t// Check the url is taken for production environment\n\t\t$url->verifyInvokedOnce(\"getUrl\", [true]);\n\t\t$url->verifyNeverInvoked(\"getUrl\", [false]);\n\n\t\t// Check access token and get when needed\n\t\t$stub->verifyInvokedMultipleTimes(\"getAccessToken\", 2);\n\n\t\t// Check request paramenters\n\t\t$client->verifyInvokedOnce(\"request\", [\n\t\t\t\"POST\",\n\t\t\t\"some-url/nativecheckout/v2/transactions\",\n\t\t\t[\n\t\t\t\t\"timeout\" => 60,\n\t\t\t\t\"connect_timeout\" => 60,\n\t\t\t\t\"exceptions\" => false,\n\t\t\t\t\"headers\" => [\n\t\t\t\t\t\"Authorization\" => \"Bearer access_token\",\n\t\t\t\t\t\"Accept\" => \"application/json\"\n\t\t\t\t],\n\t\t\t\t\"json\" => $charge\n\t\t\t]\n\t\t]);\n\n\t\t// test error status code with demo env but no error\n\t\t$charge->setTestMode(false);\n\n\t\t$response->setStatusCode(400);\n\t\t$response->setContents('{\"some_text\":\"text\"}');\n\n\t\t$result = $charge->send();\n\n\t\t$this->assertSame('{\"some_text\":\"text\"}', $charge->getError());\n\t\t$this->assertNull($result);\n\n\t\t$url->verifyInvokedOnce(\"getUrl\", [false]);\n\n\t\t// test error status code with error\n\t\t$response->setStatusCode(100);\n\t\t$response->setContents('{\"message\":\"this is error text\"}');\n\n\t\t$result = $charge->send();\n\n\t\t$this->assertSame(\"this is error text\", $charge->getError());\n\t\t$this->assertNull($result);\n\n\t\t// test error status code with empty response\n\t\t$response->setStatusCode(310);\n\t\t$response->setContents('');\n\n\t\t$result = $charge->send();\n\n\t\t$this->assertSame(\"An unknown error occured\", $charge->getError());\n\t\t$this->assertNull($result);\n\n\t\t// test success status code but no transaction id\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"no_transaction_id\":\"it_has_to_be_here\"}');\n\n\t\t$result = $charge->send();\n\n\t\t$this->assertSame(\"Transaction id is absent in response\", $charge->getError());\n\t\t$this->assertNull($result);\n\n\t\t// test success status code but unparsable response\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"ololol\"ere\"}');\n\n\t\t$result = $charge->send();\n\n\t\t$this->assertSame(\"Transaction id is absent in response\", $charge->getError());\n\t\t$this->assertNull($result);\n\t}", "title": "" }, { "docid": "f691cdc273519a310a4e9b4a69ff1d5f", "score": "0.49656904", "text": "abstract public function send(): void;", "title": "" }, { "docid": "f691cdc273519a310a4e9b4a69ff1d5f", "score": "0.49656904", "text": "abstract public function send(): void;", "title": "" }, { "docid": "4754965a94e76e4d8df88b14e2859f3b", "score": "0.49371305", "text": "public static function sendMessageArray(array $data, string $method)\n {\n \n $client = new Client();\n $client->query(1, $method, [$data]);\n $message = $client->encode();\n\n $guzzle = new \\GuzzleHttp\\Client;\n $send = $guzzle->post('http://topgenerator-webserver/', ['body' => $message]);\n $reply = $send->getBody();\n \n return true;\n }", "title": "" }, { "docid": "fb8e3128d9d1e885a4b922cd0a1b1e5c", "score": "0.49313986", "text": "public function send()\n {\n //\n\n\n }", "title": "" }, { "docid": "878814c18ecee40a3c95812f1ca062b3", "score": "0.4929301", "text": "public function test_send_calledWithoutTemplate_callSendMethod()\n {\n $this->markTestSkipped('we use Postmark provider');\n list($from_name, $from_email, $to, $subject, $html, $global_vars, $recipient_vars, $api_key, $message) = $this->getMessageArray();\n list($mandrill_double_revelation, $messages_double) = $this->getMessagesDouble();\n $messages_double->send($message)->shouldBeCalled();\n $mandrill_double_revelation->messages = $messages_double->reveal();\n $sut = new MandrillWrapper($api_key, $mandrill_double_revelation);\n $sut->send($from_name, $from_email, $to, $subject, $html, $global_vars, $recipient_vars);\n }", "title": "" }, { "docid": "f1ff255d803ed7cc6d485400e28137b2", "score": "0.49292386", "text": "public function send(array $inputs, array $outputs, int|string $fee = 0): array;", "title": "" }, { "docid": "809578a067313499842ba20f58992cd6", "score": "0.49210727", "text": "public function send() {\n $this->prepare();\n parent::send();\n }", "title": "" }, { "docid": "476d0657121f240ff09aafe6da4d98a4", "score": "0.4910586", "text": "public function SendData() {\n\t\tif($this->enabled && is_array($this->debug_objects)) {\n\t\t\tforeach($this->debug_objects as $dk=>$dv) {\n\t\t\t\tswitch($dk) {\n\t\t\t\t\tcase 'QuantumPHP':\n\t\t\t\t\t\t\t\\QuantumPHP::send();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}//END switch\n\t\t\t}//END foreach\n\t\t}//if($this->enabled && is_array($this->debug_objects))\n\t}", "title": "" }, { "docid": "49131f0eeca209fc680d8ceaad9319ff", "score": "0.48955205", "text": "public static function sendMessage (array $data) :array\n {\n return self::call (__FUNCTION__, $data);\n }", "title": "" }, { "docid": "b91354769a9051f458a28ac10721c249", "score": "0.48778346", "text": "public function send() : bool;", "title": "" }, { "docid": "09aa165d5a69d08182a720c4b7d54e51", "score": "0.487228", "text": "public function testSend() {\n\t\t$cancel = (new Cancel())\n\t\t\t->setClientId(\"asd\")\n\t\t\t->setClientSecret(\"zxc\")\n\t\t\t->setTestMode(true)\n\t\t\t->setSourceCode(\"1414\")\n\t\t\t->setAmount(1230)\n\t\t\t->setTransactionId(\"123-xx-123\");\n\n\t\t$stub = test::double($cancel, [\"getAccessToken\" => null, \"getError\" => \"Some error\"]);\n\n\t\t$result = $cancel->send();\n\n\t\t$stub->verifyInvokedOnce(\"getAccessToken\");\n\t\t$stub->verifyInvokedOnce(\"getError\");\n\n\t\t$this->assertEmpty($result);\n\t\t$this->assertSame(\"Some error\", $cancel->getError());\n\n\t\t// test successful execution with production env, no amount and source code\n\t\t$cancel = (new Cancel())\n\t\t\t->setClientId(\"asd\")\n\t\t\t->setClientSecret(\"zxc\")\n\t\t\t->setTestMode(true)\n\t\t\t->setTransactionId(\"123-xx-123\");\n\n\t\t$stub = test::double($cancel, [\"getAccessToken\" => \"access_token\"]);\n\t\t$url = test::double(\"\\ATDev\\Viva\\Transaction\\Url\", [\"getUrl\" => \"some-url\"]);\n\n\t\t$response = new Fixture();\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"transactionId\":\"this_is_transaction_id\"}');\n\n\t\t$client = test::double(\"\\GuzzleHttp\\Client\", [\"request\" => $response]);\n\n\t\t$result = $cancel->send();\n\n\t\t$expected = new \\stdClass();\n\t\t$expected->transactionId = \"this_is_transaction_id\";\n\t\t$this->assertNull($cancel->getError()); // No error\n\t\t$this->assertEquals($result, $expected); // Array with transaction id\n\n\t\t// Check the url is taken for production environment\n\t\t$url->verifyInvokedOnce(\"getUrl\", [true]);\n\t\t$url->verifyNeverInvoked(\"getUrl\", [false]);\n\n\t\t// Check access token and get when needed\n\t\t$stub->verifyInvokedMultipleTimes(\"getAccessToken\", 2);\n\n\t\t// Check request paramenters\n\t\t$client->verifyInvokedOnce(\"request\", [\n\t\t\t\"DELETE\",\n\t\t\t\"some-url/nativecheckout/v2/transactions/123-xx-123\",\n\t\t\t[\n\t\t\t\t\"timeout\" => 60,\n\t\t\t\t\"connect_timeout\" => 60,\n\t\t\t\t\"exceptions\" => false,\n\t\t\t\t\"headers\" => [\n\t\t\t\t\t\"Authorization\" => \"Bearer access_token\",\n\t\t\t\t\t\"Accept\" => \"application/json\"\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\n\t\t// test error status code with demo env but no error, with source code\n\t\t$cancel->setTestMode(false);\n\t\t$cancel->setSourceCode(\"2000\");\n\n\t\t$response->setStatusCode(400);\n\t\t$response->setContents('{\"some_text\":\"text\"}');\n\n\t\t$result = $cancel->send();\n\n\t\t$this->assertSame('{\"some_text\":\"text\"}', $cancel->getError());\n\t\t$this->assertNull($result);\n\n\t\t$url->verifyInvokedOnce(\"getUrl\", [false]);\n\t\t$client->verifyInvokedOnce(\"request\", [\n\t\t\t\"DELETE\",\n\t\t\t\"some-url/nativecheckout/v2/transactions/123-xx-123?sourceCode=2000\",\n\t\t\t[\n\t\t\t\t\"timeout\" => 60,\n\t\t\t\t\"connect_timeout\" => 60,\n\t\t\t\t\"exceptions\" => false,\n\t\t\t\t\"headers\" => [\n\t\t\t\t\t\"Authorization\" => \"Bearer access_token\",\n\t\t\t\t\t\"Accept\" => \"application/json\"\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\n\t\t// test error status code with error, with amount\n\t\t$cancel->setSourceCode(\"\");\n\t\t$cancel->setAmount(3000);\n\n\t\t$response->setStatusCode(100);\n\t\t$response->setContents('{\"message\":\"this is error text\"}');\n\n\t\t$result = $cancel->send();\n\n\t\t$this->assertSame(\"this is error text\", $cancel->getError());\n\t\t$this->assertNull($result);\n\n\t\t$client->verifyInvokedOnce(\"request\", [\n\t\t\t\"DELETE\",\n\t\t\t\"some-url/nativecheckout/v2/transactions/123-xx-123?amount=3000\",\n\t\t\t[\n\t\t\t\t\"timeout\" => 60,\n\t\t\t\t\"connect_timeout\" => 60,\n\t\t\t\t\"exceptions\" => false,\n\t\t\t\t\"headers\" => [\n\t\t\t\t\t\"Authorization\" => \"Bearer access_token\",\n\t\t\t\t\t\"Accept\" => \"application/json\"\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\n\t\t// test error status code with empty response, with amount and source code\n\t\t$cancel->setSourceCode(\"2000\");\n\n\t\t$response->setStatusCode(310);\n\t\t$response->setContents('');\n\n\t\t$result = $cancel->send();\n\n\t\t$this->assertSame(\"An unknown error occured\", $cancel->getError());\n\t\t$this->assertNull($result);\n\n\t\t$client->verifyInvokedOnce(\"request\", [\n\t\t\t\"DELETE\",\n\t\t\t\"some-url/nativecheckout/v2/transactions/123-xx-123?amount=3000&sourceCode=2000\",\n\t\t\t[\n\t\t\t\t\"timeout\" => 60,\n\t\t\t\t\"connect_timeout\" => 60,\n\t\t\t\t\"exceptions\" => false,\n\t\t\t\t\"headers\" => [\n\t\t\t\t\t\"Authorization\" => \"Bearer access_token\",\n\t\t\t\t\t\"Accept\" => \"application/json\"\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\n\t\t// test success status code but no transaction id\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"no_transaction_id\":\"it_has_to_be_here\"}');\n\n\t\t$result = $cancel->send();\n\n\t\t$this->assertSame(\"Transaction id is absent in response\", $cancel->getError());\n\t\t$this->assertNull($result);\n\n\t\t// test success status code but unparsable response\n\t\t$response->setStatusCode(200);\n\t\t$response->setContents('{\"ololol\"ere\"}');\n\n\t\t$result = $cancel->send();\n\n\t\t$this->assertSame(\"Transaction id is absent in response\", $cancel->getError());\n\t\t$this->assertNull($result);\n\t}", "title": "" }, { "docid": "dea2daf710b64fc62dac25a274698e9c", "score": "0.48644996", "text": "function send();", "title": "" }, { "docid": "ef958054b883722a87cb73e94021f4ff", "score": "0.48562077", "text": "public function testSend() {\n\t\t$response = $this->getMock('CakeResponse', array('_sendHeader', '_sendContent', '_setCookies'));\n\t\t$response->header(array(\n\t\t\t'Content-Language' => 'es',\n\t\t\t'WWW-Authenticate' => 'Negotiate',\n\t\t\t'Access-Control-Allow-Origin' => array('domain1', 'domain2'),\n\t\t));\n\t\t$response->body('the response body');\n\t\t$response->expects($this->once())->method('_sendContent')->with('the response body');\n\t\t$response->expects($this->at(0))->method('_setCookies');\n\t\t$response->expects($this->at(1))\n\t\t\t->method('_sendHeader')->with('HTTP/1.1 200 OK');\n\t\t$response->expects($this->at(2))\n\t\t\t->method('_sendHeader')->with('Content-Language', 'es');\n\t\t$response->expects($this->at(3))\n\t\t\t->method('_sendHeader')->with('WWW-Authenticate', 'Negotiate');\n\t\t$response->expects($this->at(4))\n\t\t\t->method('_sendHeader')->with('Access-Control-Allow-Origin', 'domain1');\n\t\t$response->expects($this->at(5))\n\t\t\t->method('_sendHeader')->with('Access-Control-Allow-Origin', 'domain2');\n\t\t$response->expects($this->at(6))\n\t\t\t->method('_sendHeader')->with('Content-Length', 17);\n\t\t$response->expects($this->at(7))\n\t\t\t->method('_sendHeader')->with('Content-Type', 'text/html; charset=UTF-8');\n\t\t$response->send();\n\t}", "title": "" }, { "docid": "ba1910ffaf620a3783c0fd636b2ac555", "score": "0.48506087", "text": "public function testIfRequestDataCanBeSet()\n {\n $cut = new Send();\n\n $amount = '10000';\n $fee = '100';\n $from = '1Q1AtvCyKhtveGm3187mgNRh5YcukUWjQC';\n $note = 'test';\n $shared = 'true';\n $to = '1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq';\n\n $cut->setAmount($amount);\n $cut->setFee($fee);\n $cut->setFrom($from);\n $cut->setNote($note);\n $cut->setShared($shared);\n $cut->setTo($to);\n\n $this->assertEquals((int) $amount, $cut->getAmount());\n $this->assertEquals((int) $fee, $cut->getFee());\n $this->assertEquals($from, $cut->getFrom());\n $this->assertEquals($note, $cut->getNote());\n $this->assertEquals((bool) $shared, $cut->getShared());\n $this->assertEquals($to, $cut->getTo());\n }", "title": "" }, { "docid": "90b8fc34e3b1c328755c88134d333193", "score": "0.48496115", "text": "public function sendRequest(){\r\n $ch = curl_init();\r\n curl_setopt_array($ch, $this->opts);\r\n $data = curl_exec($ch);\r\n return $data;\r\n }", "title": "" }, { "docid": "7d474c2df61c553a2db126c8a2efd3ef", "score": "0.48466703", "text": "public static function sendChatAction (array $data) :array\n {\n return self::call (__FUNCTION__, $data);\n }", "title": "" }, { "docid": "2a4f346ac427989cd66d5320e998ec59", "score": "0.4841791", "text": "public function testGetArgsAsArray()\n {\n\n // create an mock arg node\n $mockArgNode = $this->getMock('AppserverIo\\Provisioning\\Api\\Node\\ArgNode', array('getName', 'castToType'));\n $mockArgNode->expects($this->once())\n ->method('getName')\n ->will($this->returnValue($name = 'test'));\n $mockArgNode->expects($this->once())\n ->method('castToType')\n ->will($this->returnValue($value = 100));\n\n // attach the arg node\n $this->abstractArgsNode->attachArg($mockArgNode);\n\n // make sure we've the expected array\n $this->assertEquals(array($name => $value), $this->abstractArgsNode->getArgsAsArray());\n }", "title": "" }, { "docid": "1b9ea00b5c295936c41694684183236d", "score": "0.48338795", "text": "function SendMain($mylist) {\n // stuff\n}", "title": "" }, { "docid": "9d82fbd502fc8f8c2ca3302a12acc09a", "score": "0.48245516", "text": "public static function sendData(array $data)\n {\n self::init();\n self::$_instance->data($data);\n return self::$_instance->send();\n }", "title": "" }, { "docid": "9f91fada27dbfd6d104a7fc869e5a32f", "score": "0.48224893", "text": "public function testValidBatchUnordered()\n {\n\n $method = 'divide';\n $params1 = array(42, 6);\n $params2 = array(42, 7);\n\n $this->client->batchOpen();\n $this->client->call($method, $params1);\n $this->client->call($method, $params2);\n $this->client->call($method, $params1);\n $this->client->call($method, $params2);\n\n $json = '[\n {\"jsonrpc\": \"2.0\", \"result\": 6, \"id\": 2},\n {\"jsonrpc\": \"2.0\", \"result\": 6, \"id\": 4},\n {\"jsonrpc\": \"2.0\", \"result\": 7, \"id\": 1},\n {\"jsonrpc\": \"2.0\", \"result\": 7, \"id\": 3}\n ]';\n\n $this->transport->output = $json;\n\n $this->assertTrue($this->client->batchSend());\n\n $expects = '[\n {\"jsonrpc\": \"2.0\", \"result\": 7, \"id\": 1},\n {\"jsonrpc\": \"2.0\", \"result\": 6, \"id\": 2},\n {\"jsonrpc\": \"2.0\", \"result\": 7, \"id\": 3},\n {\"jsonrpc\": \"2.0\", \"result\": 6, \"id\": 4}\n ]';\n\n $batch = json_encode($this->client->batch);\n\n $this->assertEquals(Helpers::fmt($expects), Helpers::fmt($batch));\n $this->assertNull($this->client->result);\n\n }", "title": "" }, { "docid": "7d02de2949e9a5958e9e6a77a4dcdf7e", "score": "0.48106956", "text": "public function sendContent() {\n // NOOP\n }", "title": "" }, { "docid": "02add45582e0cb01fa787a2ce332603f", "score": "0.48072404", "text": "public function send(mixed $passable);", "title": "" }, { "docid": "3ae4f98f70cc8fd13a4efcf4fb119d31", "score": "0.48066998", "text": "public static function optsSend()\n {\n return [\n self::SEND_YES => Yii::t('app', 'Yes'),\n self::SEND_NO => Yii::t('app', 'No'),\n \n ];\n }", "title": "" }, { "docid": "a46859598cae177c6cef7e840fe33d67", "score": "0.48066518", "text": "public function test_request_instance_send()\n {\n $mockHttpClient = Mockery::mock(HttpClient::class);\n $mockHttpClient->shouldReceive('send')->andReturn($this->getDummyResponse());\n\n $client = new Client($this->server);\n $client->setHttpClient($mockHttpClient);\n\n $response = $client->send(new Request());\n\n $this->assertEquals(['foo' => 'bar'], $response->result());\n }", "title": "" }, { "docid": "f192bb2ca641581e5ff40adcaa2b9f85", "score": "0.48065934", "text": "public function testSendPlainText()\n {\n $projectRoot = ServiceLocator::instance()->get(Config::class)->get('projectRoot');\n\n $mock = $this->createPartialMock(Mailer::class, ['sendMail']);\n $mock->method('sendMail')->will($this->returnValue(true));\n\n $mock->addTo('[email protected]');\n $mock->addCc('[email protected]');\n $mock->addBcc('[email protected]');\n $mock->setFrom('[email protected]');\n $mock->setSubject('Testsubject');\n $mock->addAttachment('42_attachment.jpg', $projectRoot . '/public/images/img.jpg');\n $mock->addAttachment('42_inline.jpg', $projectRoot . '/public/images/img.jpg', true);\n $mock->setContent('Testmessage<br /><img src=\"cid:42_inline.jpg\">');\n\n $this->assertTrue($mock->send(false));\n }", "title": "" }, { "docid": "f0f7795b6d58b1616ac28a7f11660c1d", "score": "0.48062593", "text": "public function testSelectAll() {\n $testSender = [];\n $testSender[0] = new User();\n $testSender[0]->setUsername('testUser');\n $testSender[0]->create();\n\n $testSender[1] = new User();\n $testSender[1]->setUsername('testUser2');\n $testSender[1]->create();\n\n // Create a test message\n $testMessage = [];\n $testMessage[0] = new Message();\n $testMessage[0]->setSenderID($testSender[0]->getID());\n $testMessage[0]->setSubject('testSub');\n $testMessage[0]->setBody('test');\n $testMessage[0]->setTimestamp(123);\n $testMessage[0]->setHideInSentBox(false);\n $testMessage[0]->create();\n\n $testMessage[1] = new Message();\n $testMessage[1]->setSenderID($testSender[1]->getID());\n $testMessage[1]->setSubject('testSub2');\n $testMessage[1]->setBody('test2');\n $testMessage[1]->setTimestamp(12345);\n $testMessage[1]->setHideInSentBox(true);\n $testMessage[1]->create();\n\n // Check and pull multiple\n $selectedMultiple = Message::select(array());\n\n $this->assertTrue(\\is_array($selectedMultiple));\n $this->assertEquals(2, \\count($selectedMultiple));\n $this->assertInstanceOf(Message::class, $selectedMultiple[0]);\n $this->assertInstanceOf(Message::class, $selectedMultiple[1]);\n\n if($testMessage[0]->getID() == $selectedMultiple[0]->getID()) {\n $i = 0;\n $j = 1;\n }\n else {\n $i = 1;\n $j = 0;\n }\n\n $this->assertEquals($testMessage[0]->getID(), $selectedMultiple[$i]->getID());\n $this->assertEquals($testMessage[0]->getSenderID(), $selectedMultiple[$i]->getSenderID());\n $this->assertEquals($testMessage[0]->getSubject(), $selectedMultiple[$i]->getSubject());\n $this->assertEquals($testMessage[0]->getBody(), $selectedMultiple[$i]->getBody());\n $this->assertEquals($testMessage[0]->getTimestamp(), $selectedMultiple[$i]->getTimestamp());\n $this->assertEquals($testMessage[0]->getHideInSentBox(), $selectedMultiple[$i]->getHideInSentBox());\n\n $this->assertEquals($testMessage[1]->getID(), $selectedMultiple[$j]->getID());\n $this->assertEquals($testMessage[1]->getSenderID(), $selectedMultiple[$j]->getSenderID());\n $this->assertEquals($testMessage[1]->getSubject(), $selectedMultiple[$j]->getSubject());\n $this->assertEquals($testMessage[1]->getBody(), $selectedMultiple[$j]->getBody());\n $this->assertEquals($testMessage[1]->getTimestamp(), $selectedMultiple[$j]->getTimestamp());\n $this->assertEquals($testMessage[1]->getHideInSentBox(), $selectedMultiple[$j]->getHideInSentBox());\n\n // Clean up\n foreach($testMessage as $message) {\n $message->delete();\n }\n foreach($testSender as $sender) {\n $sender->delete();\n }\n }", "title": "" }, { "docid": "d0004b3a339e70127cb97e264f771efe", "score": "0.48036602", "text": "public function toSend()\n\t\t{\n\t\t}", "title": "" }, { "docid": "69f4c3e4837745b4d6bdb3c5b5802bdb", "score": "0.48008463", "text": "public function send($name, $data)\n {\n\n }", "title": "" }, { "docid": "a7e1a1341e57b0eab4b658f9335fad0d", "score": "0.4800636", "text": "public function testSendMessageWithKeyboardOptions()\n {\n $sendMessage = new SendMessage();\n $sendMessage->chat_id = 12341234;\n $sendMessage->text = 'Hello world';\n $sendMessage->reply_markup = new ReplyKeyboardMarkup();\n $sendMessage->reply_markup->keyboard = [['Yes', 'No']];\n\n // Important assert: ensure we send a serialized object to Telegram\n $this->assertEquals(\n trim(file_get_contents('tests/Mock/MockData/SendMessage-replyKeyboardMarkup.json')),\n json_encode($sendMessage->reply_markup)\n );\n\n $promise = $this->tgLog->performApiRequest($sendMessage);\n\n $promise->then(function (Message $result) use ($sendMessage) {\n $this->assertInstanceOf(Message::class, $result);\n $this->assertEquals(14, $result->message_id);\n $this->assertInstanceOf(User::class, $result->from);\n $this->assertInstanceOf(Chat::class, $result->chat);\n $this->assertEquals(123456789, $result->from->id);\n $this->assertEquals('unreal4uBot', $result->from->username);\n $this->assertEquals($sendMessage->chat_id, $result->chat->id);\n $this->assertEquals('unreal4u', $result->chat->username);\n\n $this->assertEquals(1452254253, $result->date);\n $this->assertNull($result->audio);\n\n $this->assertEquals($sendMessage->text, $result->text);\n });\n }", "title": "" }, { "docid": "4ee848490bdb689f1e8c2932c016d8b7", "score": "0.47885174", "text": "public function testGetSenderItem()\n {\n }", "title": "" }, { "docid": "fe609ce3e10d928ddde67a27f3027ef1", "score": "0.4787554", "text": "protected static function request(array $options): array\n {\n return json_decode((string) self::sendRequest($options)->getBody(), true);\n }", "title": "" }, { "docid": "15d35a6cfad42a2318e84a26998deee3", "score": "0.47871235", "text": "public function testGetSenderCollection()\n {\n }", "title": "" }, { "docid": "6040da6e0bc75d2f9074cc7df20ff9b1", "score": "0.4786523", "text": "public function send($string)\n {\n }", "title": "" }, { "docid": "dd8fa3989b2049cce55d6e1d887af89f", "score": "0.47862574", "text": "public function testGetRawSentEmailContents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "ac9efe142c9f4b61cacd9ebc59861b9e", "score": "0.47851336", "text": "public function sendContent(string $content): void;", "title": "" }, { "docid": "b67b482d39fb1464501e4d967d63ab49", "score": "0.47777507", "text": "public function test_getList_POST ()\n {\n $this->setBaseURL(\"http://localhost/libraries/ResponseHound/Samples/server/jsonPostServer.php\")\n ->addRequestParam(\"action\", \"getList\");\n\n /*\n * Note that $this->sendPost() is an alias to\n * $this->sendPostRequest().\n */\n $this->sendPost();\n\n $this->checkValue(\"transactionId\" ,\"\" ,\"int\" ,array(\"value\" => 1))\n ->checkValue(\"status\" ,\"\" ,\"string\" ,array(\"value\" => \"ok\"))\n ->checkValue(\"data\" ,\"\" ,\"array\")\n ->checkValue(\"colors\" ,\"data\" ,\"array\");\n\n // Test a group of elements\n $loc = \"data.colors\";\n $this->checkListValue(\"color\" ,$loc ,\"string\")\n ->checkListValue(\"value\" ,$loc ,\"string\");\n\n\n /*\n * Test a group of elements using the option: valueList.\n * This allows the user to pass in a list of required values that\n * must be matched exactly, including the order.\n */\n $loc = \"data.colors\";\n $colors = array(\"red\",\"green\",\"blue\",\"cyan\",\"magenta\",\"yellow\",\"black\");\n $hexValues = array(\"#f00\",\"#0f0\",\"#00f\",\"#0ff\",\"#f0f\",\"#ff0\",\"#000\");\n $this->checkListValue(\"color\" ,$loc ,\"string\" ,array(\"valueList\" => $colors))\n ->checkListValue(\"value\" ,$loc ,\"string\" ,array(\"valueList\" => $hexValues));\n\n\n /*\n * Test a group of elements using the option: valueIn.\n * This allows the user to pass in a list of possible values.\n * The actual value must appear in the list, somewhere.\n */\n $loc = \"data.colors\";\n $colors = array(\"grey\",\"red\",\"gold\",\"green\",\"blue\",\"white\",\"cyan\",\"magenta\",\"yellow\",\"black\");\n $hexValues = array(\"#fff\",\"#55d\",\"#f00\",\"#c33\",\"#0f0\",\"#00f\",\"#0ff\",\"#f0f\",\"#ff0\",\"#000\");\n $this->checkListValue(\"color\" ,$loc ,\"string\" ,array(\"valueIn\" => $colors))\n ->checkListValue(\"value\" ,$loc ,\"string\" ,array(\"valueIn\" => $hexValues));\n }", "title": "" }, { "docid": "80ac0d66c8bcbe5f148258bac7f59a8c", "score": "0.47777468", "text": "public function testGettingOptionsMethod()\n {\n $_SERVER['REQUEST_METHOD'] = 'OPTIONS';\n $this->request->getServer()->exchangeArray($_SERVER);\n $this->assertEquals(RequestMethods::OPTIONS, $this->request->getServer()->get('REQUEST_METHOD'));\n }", "title": "" }, { "docid": "f42bfc615a7ed2e0cf693b05e4dc5915", "score": "0.47774643", "text": "public function testBasicSend()\n {\n if (POSTMARK_TEST_SEND === true) {\n $message = $this->createTestMessage();\n $message->setFrom(POSTMARK_FROM);\n $message->setTo(POSTMARK_TO);\n $message->setSubject('Yii postmark test message');\n $message->setTextBody('Yii postmark test body');\n $this->assertTrue($message->send());\n }\n }", "title": "" }, { "docid": "9455fcd39b953ab1b29402e52ad03e2c", "score": "0.47768557", "text": "public static function generateGeneralFakeServerResponse(array $data = [])\n {\n //PARAM BINDED IN PHPUNIT TEST FOR TestServerResponse.php\n //Maybe this is not the best possible implementation\n\n //No value set in $data ie testing setWebhook\n //Provided $data['chat_id'] ie testing sendMessage\n\n $fake_response = ['ok' => true]; // :)\n\n if ($data === []) {\n $fake_response['result'] = true;\n }\n\n //some data to let iniatilize the class method SendMessage\n if (isset($data['chat_id'])) {\n $data['message_id'] = '1234';\n $data['date'] = '1441378360';\n $data['from'] = [\n 'id' => 123456789,\n 'first_name' => 'botname',\n 'username' => 'namebot',\n ];\n $data['chat'] = ['id' => $data['chat_id']];\n\n $fake_response['result'] = $data;\n }\n\n return $fake_response;\n }", "title": "" } ]
9e25d4440ab1999386d911d16791a823
The deserialization information for the current model
[ { "docid": "628d3c0fc13f9c8159f484f865b12c02", "score": "0.0", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'autoPilotProfileAssigned' => fn(ParseNode $n) => $o->setAutoPilotProfileAssigned($n->getBooleanValue()),\n 'autoPilotRegistered' => fn(ParseNode $n) => $o->setAutoPilotRegistered($n->getBooleanValue()),\n 'azureAdDeviceId' => fn(ParseNode $n) => $o->setAzureAdDeviceId($n->getStringValue()),\n 'azureAdJoinType' => fn(ParseNode $n) => $o->setAzureAdJoinType($n->getStringValue()),\n 'azureAdRegistered' => fn(ParseNode $n) => $o->setAzureAdRegistered($n->getBooleanValue()),\n 'cloudIdentityScore' => fn(ParseNode $n) => $o->setCloudIdentityScore($n->getFloatValue()),\n 'cloudManagementScore' => fn(ParseNode $n) => $o->setCloudManagementScore($n->getFloatValue()),\n 'cloudProvisioningScore' => fn(ParseNode $n) => $o->setCloudProvisioningScore($n->getFloatValue()),\n 'compliancePolicySetToIntune' => fn(ParseNode $n) => $o->setCompliancePolicySetToIntune($n->getBooleanValue()),\n 'deviceId' => fn(ParseNode $n) => $o->setDeviceId($n->getStringValue()),\n 'deviceName' => fn(ParseNode $n) => $o->setDeviceName($n->getStringValue()),\n 'healthStatus' => fn(ParseNode $n) => $o->setHealthStatus($n->getEnumValue(UserExperienceAnalyticsHealthState::class)),\n 'isCloudManagedGatewayEnabled' => fn(ParseNode $n) => $o->setIsCloudManagedGatewayEnabled($n->getBooleanValue()),\n 'managedBy' => fn(ParseNode $n) => $o->setManagedBy($n->getStringValue()),\n 'manufacturer' => fn(ParseNode $n) => $o->setManufacturer($n->getStringValue()),\n 'model' => fn(ParseNode $n) => $o->setModel($n->getStringValue()),\n 'osCheckFailed' => fn(ParseNode $n) => $o->setOsCheckFailed($n->getBooleanValue()),\n 'osDescription' => fn(ParseNode $n) => $o->setOsDescription($n->getStringValue()),\n 'osVersion' => fn(ParseNode $n) => $o->setOsVersion($n->getStringValue()),\n 'otherWorkloadsSetToIntune' => fn(ParseNode $n) => $o->setOtherWorkloadsSetToIntune($n->getBooleanValue()),\n 'ownership' => fn(ParseNode $n) => $o->setOwnership($n->getStringValue()),\n 'processor64BitCheckFailed' => fn(ParseNode $n) => $o->setProcessor64BitCheckFailed($n->getBooleanValue()),\n 'processorCoreCountCheckFailed' => fn(ParseNode $n) => $o->setProcessorCoreCountCheckFailed($n->getBooleanValue()),\n 'processorFamilyCheckFailed' => fn(ParseNode $n) => $o->setProcessorFamilyCheckFailed($n->getBooleanValue()),\n 'processorSpeedCheckFailed' => fn(ParseNode $n) => $o->setProcessorSpeedCheckFailed($n->getBooleanValue()),\n 'ramCheckFailed' => fn(ParseNode $n) => $o->setRamCheckFailed($n->getBooleanValue()),\n 'secureBootCheckFailed' => fn(ParseNode $n) => $o->setSecureBootCheckFailed($n->getBooleanValue()),\n 'serialNumber' => fn(ParseNode $n) => $o->setSerialNumber($n->getStringValue()),\n 'storageCheckFailed' => fn(ParseNode $n) => $o->setStorageCheckFailed($n->getBooleanValue()),\n 'tenantAttached' => fn(ParseNode $n) => $o->setTenantAttached($n->getBooleanValue()),\n 'tpmCheckFailed' => fn(ParseNode $n) => $o->setTpmCheckFailed($n->getBooleanValue()),\n 'upgradeEligibility' => fn(ParseNode $n) => $o->setUpgradeEligibility($n->getEnumValue(OperatingSystemUpgradeEligibility::class)),\n 'windowsScore' => fn(ParseNode $n) => $o->setWindowsScore($n->getFloatValue()),\n 'workFromAnywhereScore' => fn(ParseNode $n) => $o->setWorkFromAnywhereScore($n->getFloatValue()),\n ]);\n }", "title": "" } ]
[ { "docid": "ebb7172eabf827f2d7eb8d6b5bdff0db", "score": "0.61488765", "text": "protected function deserializeMetaData() {\n return Json::decode($this->meta_data, true);\n }", "title": "" }, { "docid": "726990b57850ab27dd7bc04ec7c31fb4", "score": "0.58828044", "text": "public function getDataFromSerialize()\n {\n return unserialize($this->object);\n }", "title": "" }, { "docid": "98a6a5dee25a4996a8d681869548ab8a", "score": "0.5866301", "text": "public function getInfo() {\n return $this->attributes;\n }", "title": "" }, { "docid": "922d8a933e50a0b9493218e0f38fb5c3", "score": "0.57552624", "text": "protected function deserializeAttributes()\n {\n if (!strlen($this->bytes)) {\n $this->attributes = [];\n }\n else {\n $this->attributes = Deserializer::deserialize($this->bytes);\n }\n }", "title": "" }, { "docid": "73bf5d0d54c4f355a952a6e24c711c87", "score": "0.5743948", "text": "protected function _getSerializableFields()\n {\n return array ( '_lastRequestHeaders',\n '_lastRequest',\n '_lastResponseHeaders',\n '_lastResponse');\n }", "title": "" }, { "docid": "f1f57981252de3a6c54f7bdd6d2b968f", "score": "0.5740634", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"RepairInfo\",$param) and $param[\"RepairInfo\"] !== null) {\n $this->RepairInfo = new RepairInfo();\n $this->RepairInfo->deserialize($param[\"RepairInfo\"]);\n }\n\n if (array_key_exists(\"VideoFrameInterpolationInfo\",$param) and $param[\"VideoFrameInterpolationInfo\"] !== null) {\n $this->VideoFrameInterpolationInfo = new VideoFrameInterpolationInfo();\n $this->VideoFrameInterpolationInfo->deserialize($param[\"VideoFrameInterpolationInfo\"]);\n }\n\n if (array_key_exists(\"SuperResolutionInfo\",$param) and $param[\"SuperResolutionInfo\"] !== null) {\n $this->SuperResolutionInfo = new SuperResolutionInfo();\n $this->SuperResolutionInfo->deserialize($param[\"SuperResolutionInfo\"]);\n }\n\n if (array_key_exists(\"HDRInfo\",$param) and $param[\"HDRInfo\"] !== null) {\n $this->HDRInfo = new HDRInfo();\n $this->HDRInfo->deserialize($param[\"HDRInfo\"]);\n }\n\n if (array_key_exists(\"VideoDenoiseInfo\",$param) and $param[\"VideoDenoiseInfo\"] !== null) {\n $this->VideoDenoiseInfo = new VideoDenoiseInfo();\n $this->VideoDenoiseInfo->deserialize($param[\"VideoDenoiseInfo\"]);\n }\n\n if (array_key_exists(\"ColorInfo\",$param) and $param[\"ColorInfo\"] !== null) {\n $this->ColorInfo = new ColorEnhanceInfo();\n $this->ColorInfo->deserialize($param[\"ColorInfo\"]);\n }\n\n if (array_key_exists(\"SharpInfo\",$param) and $param[\"SharpInfo\"] !== null) {\n $this->SharpInfo = new SharpEnhanceInfo();\n $this->SharpInfo->deserialize($param[\"SharpInfo\"]);\n }\n\n if (array_key_exists(\"FaceInfo\",$param) and $param[\"FaceInfo\"] !== null) {\n $this->FaceInfo = new FaceEnhanceInfo();\n $this->FaceInfo->deserialize($param[\"FaceInfo\"]);\n }\n\n if (array_key_exists(\"LowLightInfo\",$param) and $param[\"LowLightInfo\"] !== null) {\n $this->LowLightInfo = new LowLightEnhanceInfo();\n $this->LowLightInfo->deserialize($param[\"LowLightInfo\"]);\n }\n\n if (array_key_exists(\"ScratchRepairInfo\",$param) and $param[\"ScratchRepairInfo\"] !== null) {\n $this->ScratchRepairInfo = new ScratchRepairInfo();\n $this->ScratchRepairInfo->deserialize($param[\"ScratchRepairInfo\"]);\n }\n\n if (array_key_exists(\"ArtifactRepairInfo\",$param) and $param[\"ArtifactRepairInfo\"] !== null) {\n $this->ArtifactRepairInfo = new ArtifactRepairInfo();\n $this->ArtifactRepairInfo->deserialize($param[\"ArtifactRepairInfo\"]);\n }\n }", "title": "" }, { "docid": "2ccd859f86f320217750a7aadc723108", "score": "0.56883925", "text": "public function modelData()\n {\n return [\n\n 'nombres' => $this->nombres,\n 'apellidos' => $this->apellidos,\n 'tipo_documento' => $this->tipo_documento,\n 'nro_documento' => $this->nro_documento,\n 'genero' => $this->genero,\n 'fecha_nacimiento' => $this->fecha_nacimiento,\n 'celular1' => $this->celular1,\n 'celular2' => $this->celular2,\n 'direccion' => $this->direccion,\n 'estado_civil' => $this->estado_civil,\n 'lugar_trabajo' => $this->lugar_trabajo,\n 'cargo' => $this->cargo,\n 'independiente' => $this->independiente,\n 'foto' => $this->foto,\n ];\n }", "title": "" }, { "docid": "b9151d7c02629195655d4a2074f64921", "score": "0.5688041", "text": "protected function getSerializeData()\n\t{\n\t\treturn $this->getRawValues();\n\t}", "title": "" }, { "docid": "46cc564c216fd8ead76997e50506db4a", "score": "0.5671089", "text": "protected function getRawData()\n {\n return json_decode($this->model->getAttributes()[$this->getConfigKey()] ?? '{}', true);\n }", "title": "" }, { "docid": "ad76d92b5c4554e03a2e649a42550f44", "score": "0.56655484", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activeModalities' => fn(ParseNode $n) => $o->setActiveModalities($n->getCollectionOfEnumValues(Modality::class)),\n 'answeredBy' => fn(ParseNode $n) => $o->setAnsweredBy($n->getObjectValue([ParticipantInfo::class, 'createFromDiscriminatorValue'])),\n 'audioRoutingGroups' => fn(ParseNode $n) => $o->setAudioRoutingGroups($n->getCollectionOfObjectValues([AudioRoutingGroup::class, 'createFromDiscriminatorValue'])),\n 'callbackUri' => fn(ParseNode $n) => $o->setCallbackUri($n->getStringValue()),\n 'callChainId' => fn(ParseNode $n) => $o->setCallChainId($n->getStringValue()),\n 'callOptions' => fn(ParseNode $n) => $o->setCallOptions($n->getObjectValue([CallOptions::class, 'createFromDiscriminatorValue'])),\n 'callRoutes' => fn(ParseNode $n) => $o->setCallRoutes($n->getCollectionOfObjectValues([CallRoute::class, 'createFromDiscriminatorValue'])),\n 'chatInfo' => fn(ParseNode $n) => $o->setChatInfo($n->getObjectValue([ChatInfo::class, 'createFromDiscriminatorValue'])),\n 'contentSharingSessions' => fn(ParseNode $n) => $o->setContentSharingSessions($n->getCollectionOfObjectValues([ContentSharingSession::class, 'createFromDiscriminatorValue'])),\n 'direction' => fn(ParseNode $n) => $o->setDirection($n->getEnumValue(CallDirection::class)),\n 'incomingContext' => fn(ParseNode $n) => $o->setIncomingContext($n->getObjectValue([IncomingContext::class, 'createFromDiscriminatorValue'])),\n 'mediaConfig' => fn(ParseNode $n) => $o->setMediaConfig($n->getObjectValue([MediaConfig::class, 'createFromDiscriminatorValue'])),\n 'mediaState' => fn(ParseNode $n) => $o->setMediaState($n->getObjectValue([CallMediaState::class, 'createFromDiscriminatorValue'])),\n 'meetingCapability' => fn(ParseNode $n) => $o->setMeetingCapability($n->getObjectValue([MeetingCapability::class, 'createFromDiscriminatorValue'])),\n 'meetingInfo' => fn(ParseNode $n) => $o->setMeetingInfo($n->getObjectValue([MeetingInfo::class, 'createFromDiscriminatorValue'])),\n 'myParticipantId' => fn(ParseNode $n) => $o->setMyParticipantId($n->getStringValue()),\n 'operations' => fn(ParseNode $n) => $o->setOperations($n->getCollectionOfObjectValues([CommsOperation::class, 'createFromDiscriminatorValue'])),\n 'participants' => fn(ParseNode $n) => $o->setParticipants($n->getCollectionOfObjectValues([Participant::class, 'createFromDiscriminatorValue'])),\n 'requestedModalities' => fn(ParseNode $n) => $o->setRequestedModalities($n->getCollectionOfEnumValues(Modality::class)),\n 'resultInfo' => fn(ParseNode $n) => $o->setResultInfo($n->getObjectValue([ResultInfo::class, 'createFromDiscriminatorValue'])),\n 'ringingTimeoutInSeconds' => fn(ParseNode $n) => $o->setRingingTimeoutInSeconds($n->getIntegerValue()),\n 'routingPolicies' => fn(ParseNode $n) => $o->setRoutingPolicies($n->getCollectionOfEnumValues(RoutingPolicy::class)),\n 'source' => fn(ParseNode $n) => $o->setSource($n->getObjectValue([ParticipantInfo::class, 'createFromDiscriminatorValue'])),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(CallState::class)),\n 'subject' => fn(ParseNode $n) => $o->setSubject($n->getStringValue()),\n 'targets' => fn(ParseNode $n) => $o->setTargets($n->getCollectionOfObjectValues([InvitationParticipantInfo::class, 'createFromDiscriminatorValue'])),\n 'tenantId' => fn(ParseNode $n) => $o->setTenantId($n->getStringValue()),\n 'terminationReason' => fn(ParseNode $n) => $o->setTerminationReason($n->getStringValue()),\n 'toneInfo' => fn(ParseNode $n) => $o->setToneInfo($n->getObjectValue([ToneInfo::class, 'createFromDiscriminatorValue'])),\n 'transcription' => fn(ParseNode $n) => $o->setTranscription($n->getObjectValue([CallTranscriptionInfo::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "54f9241d306f6fa44e42ed847212de2b", "score": "0.5627804", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activity' => fn(ParseNode $n) => $o->setActivity($n->getStringValue()),\n 'availability' => fn(ParseNode $n) => $o->setAvailability($n->getStringValue()),\n 'outOfOfficeSettings' => fn(ParseNode $n) => $o->setOutOfOfficeSettings($n->getObjectValue([OutOfOfficeSettings::class, 'createFromDiscriminatorValue'])),\n 'statusMessage' => fn(ParseNode $n) => $o->setStatusMessage($n->getObjectValue([PresenceStatusMessage::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "4846f858634fb3c7183f752a312d1571", "score": "0.56264675", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'lastUsed' => fn(ParseNode $n) => $o->setLastUsed($n->getObjectValue([UsageDetails::class, 'createFromDiscriminatorValue'])),\n 'resource' => fn(ParseNode $n) => $o->setResource($n->getObjectValue([Entity::class, 'createFromDiscriminatorValue'])),\n 'resourceReference' => fn(ParseNode $n) => $o->setResourceReference($n->getObjectValue([ResourceReference::class, 'createFromDiscriminatorValue'])),\n 'resourceVisualization' => fn(ParseNode $n) => $o->setResourceVisualization($n->getObjectValue([ResourceVisualization::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "634cc1a8cc2728a02560145400801a23", "score": "0.56098044", "text": "public function getResponseDeserializer();", "title": "" }, { "docid": "9a999c17b4ae12f04585b5ccb3b2f423", "score": "0.5597127", "text": "public function getSerializer();", "title": "" }, { "docid": "d147304e3b756b1816a5b0d2017799b7", "score": "0.55911237", "text": "public function __serialize()\n {\n $values = [];\n\n $values['model'] = $this->getSerializedPropertyValue($this->model);\n\n return $values;\n }", "title": "" }, { "docid": "aa9b9ac1044b62a2c4f4f8b380d94c50", "score": "0.55769736", "text": "public function getSupportedSerializations();", "title": "" }, { "docid": "14416e17d3e3272ceda78b34db3d2f83", "score": "0.5570789", "text": "public function modelData()\n {\n return [\n 'vch_Nombres' => $this->Nombres,\n 'vch_A_Paterno' => $this->A_Paterno,\n 'vch_A_Materno' => $this->A_Materno,\n 'vch_Direccion' => $this->Direccion,\n 'vch_Telefono' => $this->Telefono,\n ];\n }", "title": "" }, { "docid": "5ab95189318f19f475e0860ccf2ed921", "score": "0.5553668", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'authMethod' => fn(ParseNode $n) => $o->setAuthMethod($n->getEnumValue(UsageAuthMethod::class)),\n 'eventDateTime' => fn(ParseNode $n) => $o->setEventDateTime($n->getDateTimeValue()),\n 'failureReason' => fn(ParseNode $n) => $o->setFailureReason($n->getStringValue()),\n 'feature' => fn(ParseNode $n) => $o->setFeature($n->getEnumValue(FeatureType::class)),\n 'isSuccess' => fn(ParseNode $n) => $o->setIsSuccess($n->getBooleanValue()),\n 'userDisplayName' => fn(ParseNode $n) => $o->setUserDisplayName($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "e8630e8179dc66f674a3c24a4d21a7b9", "score": "0.5534492", "text": "public function modelData()\n {\n return [ \n 'name' => $this->name\n ];\n }", "title": "" }, { "docid": "049c73626f1247b06ce5ab62459ec7c0", "score": "0.55302685", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'deviceName' => fn(ParseNode $n) => $o->setDeviceName($n->getStringValue()),\n 'domain' => fn(ParseNode $n) => $o->setDomain($n->getStringValue()),\n 'ipAddress' => fn(ParseNode $n) => $o->setIpAddress($n->getStringValue()),\n 'lastLoggedOnUser' => fn(ParseNode $n) => $o->setLastLoggedOnUser($n->getStringValue()),\n 'lastSeenDateTime' => fn(ParseNode $n) => $o->setLastSeenDateTime($n->getDateTimeValue()),\n 'location' => fn(ParseNode $n) => $o->setLocation($n->getStringValue()),\n 'macAddress' => fn(ParseNode $n) => $o->setMacAddress($n->getStringValue()),\n 'manufacturer' => fn(ParseNode $n) => $o->setManufacturer($n->getStringValue()),\n 'model' => fn(ParseNode $n) => $o->setModel($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'os' => fn(ParseNode $n) => $o->setOs($n->getStringValue()),\n 'osVersion' => fn(ParseNode $n) => $o->setOsVersion($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "42f7d40fe6bc942d623ead9955eb5f7e", "score": "0.55202216", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'assignedToMe' => fn(ParseNode $n) => $o->setAssignedToMe($n->getBooleanValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'justification' => fn(ParseNode $n) => $o->setJustification($n->getStringValue()),\n 'reviewedBy' => fn(ParseNode $n) => $o->setReviewedBy($n->getObjectValue([Identity::class, 'createFromDiscriminatorValue'])),\n 'reviewedDateTime' => fn(ParseNode $n) => $o->setReviewedDateTime($n->getDateTimeValue()),\n 'reviewResult' => fn(ParseNode $n) => $o->setReviewResult($n->getStringValue()),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "5a365448aa67e929ea9ed1534911c26d", "score": "0.55054754", "text": "public function savedSchemaLoad()\n {\n return json_decode(\n file_get_contents($this->serializePath()),\n true\n );\n }", "title": "" }, { "docid": "492986fec466f153b9a71103d117cdec", "score": "0.5503286", "text": "public function modelAttributes() {\n \n return self::$_attributes;\n }", "title": "" }, { "docid": "492986fec466f153b9a71103d117cdec", "score": "0.5503286", "text": "public function modelAttributes() {\n \n return self::$_attributes;\n }", "title": "" }, { "docid": "f558299b3abe17c8eb953a9edcc95dce", "score": "0.5498868", "text": "public function getModelData() {\n return $this->_dataModel->getData();\n }", "title": "" }, { "docid": "cf32517899819bb26fb0e073881aa55a", "score": "0.54866093", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'links' => fn(ParseNode $n) => $o->setLinks($n->getObjectValue([SynchronizationLinkedObjects::class, 'createFromDiscriminatorValue'])),\n 'objectId' => fn(ParseNode $n) => $o->setObjectId($n->getStringValue()),\n 'objectTypeName' => fn(ParseNode $n) => $o->setObjectTypeName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "043d6fa08dcc05b6db2322fe4c7aa6d0", "score": "0.5483524", "text": "public function jsonSerialize(){\n return (object) get_object_vars($this);\n }", "title": "" }, { "docid": "66463dfe651c5d5c8fc7d241fe43ac42", "score": "0.5480439", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'file' => fn(ParseNode $n) => $o->setFile($n->getObjectValue([File::class, 'createFromDiscriminatorValue'])),\n 'fileSystemInfo' => fn(ParseNode $n) => $o->setFileSystemInfo($n->getObjectValue([FileSystemInfo::class, 'createFromDiscriminatorValue'])),\n 'folder' => fn(ParseNode $n) => $o->setFolder($n->getObjectValue([Folder::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'image' => fn(ParseNode $n) => $o->setImage($n->getObjectValue([Image::class, 'createFromDiscriminatorValue'])),\n 'lastModifiedBy' => fn(ParseNode $n) => $o->setLastModifiedBy($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'package' => fn(ParseNode $n) => $o->setPackage($n->getObjectValue([Package::class, 'createFromDiscriminatorValue'])),\n 'parentReference' => fn(ParseNode $n) => $o->setParentReference($n->getObjectValue([ItemReference::class, 'createFromDiscriminatorValue'])),\n 'shared' => fn(ParseNode $n) => $o->setShared($n->getObjectValue([Shared::class, 'createFromDiscriminatorValue'])),\n 'sharepointIds' => fn(ParseNode $n) => $o->setSharepointIds($n->getObjectValue([SharepointIds::class, 'createFromDiscriminatorValue'])),\n 'size' => fn(ParseNode $n) => $o->setSize($n->getIntegerValue()),\n 'specialFolder' => fn(ParseNode $n) => $o->setSpecialFolder($n->getObjectValue([SpecialFolder::class, 'createFromDiscriminatorValue'])),\n 'video' => fn(ParseNode $n) => $o->setVideo($n->getObjectValue([Video::class, 'createFromDiscriminatorValue'])),\n 'webDavUrl' => fn(ParseNode $n) => $o->setWebDavUrl($n->getStringValue()),\n 'webUrl' => fn(ParseNode $n) => $o->setWebUrl($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "f147f72ff399b9256f21888cd0ef81e0", "score": "0.54615015", "text": "public function __debugInfo() {\n return (array)$this->model;\n }", "title": "" }, { "docid": "ae5e363e450faf9102acacad0f3bd8fc", "score": "0.54512846", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'iconType' => fn(ParseNode $n) => $o->setIconType($n->getEnumValue(TimeOffReasonIconType::class)),\n 'isActive' => fn(ParseNode $n) => $o->setIsActive($n->getBooleanValue()),\n ]);\n }", "title": "" }, { "docid": "48bf512f83021d11c498099aa2a1aac7", "score": "0.5446656", "text": "public function jsonSerialize() {\n # SERIA POR ESSA FUNÇÃO E COMO AMANTE EU TERIA ESSA INTERFACE (JsonSerializable)\n return get_object_vars($this);\n }", "title": "" }, { "docid": "f5e0eb5b471e69e85ba3914d59aa99ec", "score": "0.5443518", "text": "function jsonSerialize()\r\n\t{\r\n\t\treturn $this->fields;\r\n\t}", "title": "" }, { "docid": "bae588c28e3fa3a65cdb14a210204f9d", "score": "0.5439738", "text": "protected function attributes() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "49ae83bd9bfddd5db1392ea450094141", "score": "0.54356086", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'appDisplayName' => fn(ParseNode $n) => $o->setAppDisplayName($n->getStringValue()),\n 'appPublisher' => fn(ParseNode $n) => $o->setAppPublisher($n->getStringValue()),\n 'appVersion' => fn(ParseNode $n) => $o->setAppVersion($n->getStringValue()),\n 'deviceDisplayName' => fn(ParseNode $n) => $o->setDeviceDisplayName($n->getStringValue()),\n 'deviceId' => fn(ParseNode $n) => $o->setDeviceId($n->getStringValue()),\n 'eventDateTime' => fn(ParseNode $n) => $o->setEventDateTime($n->getDateTimeValue()),\n 'eventType' => fn(ParseNode $n) => $o->setEventType($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "58048368ff489df1e1cc6070b026e29a", "score": "0.54334867", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"InstanceDetail\",$param) and $param[\"InstanceDetail\"] !== null) {\n $this->InstanceDetail = new InstanceRelation();\n $this->InstanceDetail->deserialize($param[\"InstanceDetail\"]);\n }\n\n if (array_key_exists(\"SpecificationLimit\",$param) and $param[\"SpecificationLimit\"] !== null) {\n $this->SpecificationLimit = new BGPInstanceSpecification();\n $this->SpecificationLimit->deserialize($param[\"SpecificationLimit\"]);\n }\n\n if (array_key_exists(\"Usage\",$param) and $param[\"Usage\"] !== null) {\n $this->Usage = new BGPInstanceUsages();\n $this->Usage->deserialize($param[\"Usage\"]);\n }\n\n if (array_key_exists(\"Region\",$param) and $param[\"Region\"] !== null) {\n $this->Region = new RegionInfo();\n $this->Region->deserialize($param[\"Region\"]);\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"CreatedTime\",$param) and $param[\"CreatedTime\"] !== null) {\n $this->CreatedTime = $param[\"CreatedTime\"];\n }\n\n if (array_key_exists(\"ExpiredTime\",$param) and $param[\"ExpiredTime\"] !== null) {\n $this->ExpiredTime = $param[\"ExpiredTime\"];\n }\n\n if (array_key_exists(\"Name\",$param) and $param[\"Name\"] !== null) {\n $this->Name = $param[\"Name\"];\n }\n\n if (array_key_exists(\"PackInfo\",$param) and $param[\"PackInfo\"] !== null) {\n $this->PackInfo = new PackInfo();\n $this->PackInfo->deserialize($param[\"PackInfo\"]);\n }\n\n if (array_key_exists(\"EipProductInfos\",$param) and $param[\"EipProductInfos\"] !== null) {\n $this->EipProductInfos = [];\n foreach ($param[\"EipProductInfos\"] as $key => $value){\n $obj = new EipProductInfo();\n $obj->deserialize($value);\n array_push($this->EipProductInfos, $obj);\n }\n }\n\n if (array_key_exists(\"BoundStatus\",$param) and $param[\"BoundStatus\"] !== null) {\n $this->BoundStatus = $param[\"BoundStatus\"];\n }\n\n if (array_key_exists(\"DDoSLevel\",$param) and $param[\"DDoSLevel\"] !== null) {\n $this->DDoSLevel = $param[\"DDoSLevel\"];\n }\n\n if (array_key_exists(\"CCEnable\",$param) and $param[\"CCEnable\"] !== null) {\n $this->CCEnable = $param[\"CCEnable\"];\n }\n\n if (array_key_exists(\"TagInfoList\",$param) and $param[\"TagInfoList\"] !== null) {\n $this->TagInfoList = [];\n foreach ($param[\"TagInfoList\"] as $key => $value){\n $obj = new TagInfo();\n $obj->deserialize($value);\n array_push($this->TagInfoList, $obj);\n }\n }\n\n if (array_key_exists(\"IpCountNewFlag\",$param) and $param[\"IpCountNewFlag\"] !== null) {\n $this->IpCountNewFlag = $param[\"IpCountNewFlag\"];\n }\n\n if (array_key_exists(\"VitalityVersion\",$param) and $param[\"VitalityVersion\"] !== null) {\n $this->VitalityVersion = $param[\"VitalityVersion\"];\n }\n\n if (array_key_exists(\"Line\",$param) and $param[\"Line\"] !== null) {\n $this->Line = $param[\"Line\"];\n }\n\n if (array_key_exists(\"ElasticServiceBandwidth\",$param) and $param[\"ElasticServiceBandwidth\"] !== null) {\n $this->ElasticServiceBandwidth = $param[\"ElasticServiceBandwidth\"];\n }\n\n if (array_key_exists(\"GiftServiceBandWidth\",$param) and $param[\"GiftServiceBandWidth\"] !== null) {\n $this->GiftServiceBandWidth = $param[\"GiftServiceBandWidth\"];\n }\n\n if (array_key_exists(\"ModifyTime\",$param) and $param[\"ModifyTime\"] !== null) {\n $this->ModifyTime = $param[\"ModifyTime\"];\n }\n\n if (array_key_exists(\"BasicPlusFlag\",$param) and $param[\"BasicPlusFlag\"] !== null) {\n $this->BasicPlusFlag = $param[\"BasicPlusFlag\"];\n }\n }", "title": "" }, { "docid": "0e42e82597190819dc7dc22b8e7099ea", "score": "0.54300094", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'content' => fn(ParseNode $n) => $o->setContent($n->getBinaryContent()),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'meetingId' => fn(ParseNode $n) => $o->setMeetingId($n->getStringValue()),\n 'meetingOrganizerId' => fn(ParseNode $n) => $o->setMeetingOrganizerId($n->getStringValue()),\n 'recordingContentUrl' => fn(ParseNode $n) => $o->setRecordingContentUrl($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "ed31afb628fa2d1d20b090a3ba1af265", "score": "0.5428901", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'applicableArchitecture' => fn(ParseNode $n) => $o->setApplicableArchitecture($n->getEnumValue(WindowsArchitecture::class)),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'identityName' => fn(ParseNode $n) => $o->setIdentityName($n->getStringValue()),\n 'identityPublisher' => fn(ParseNode $n) => $o->setIdentityPublisher($n->getStringValue()),\n 'identityResourceIdentifier' => fn(ParseNode $n) => $o->setIdentityResourceIdentifier($n->getStringValue()),\n 'identityVersion' => fn(ParseNode $n) => $o->setIdentityVersion($n->getStringValue()),\n 'minimumSupportedOperatingSystem' => fn(ParseNode $n) => $o->setMinimumSupportedOperatingSystem($n->getObjectValue([WindowsMinimumOperatingSystem::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "7e850585de0bc45e90bd95721ae876d2", "score": "0.5421665", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'alignment' => fn(ParseNode $n) => $o->setAlignment($n->getEnumValue(ContentAlignment::class)),\n 'fontColor' => fn(ParseNode $n) => $o->setFontColor($n->getStringValue()),\n 'fontName' => fn(ParseNode $n) => $o->setFontName($n->getStringValue()),\n 'fontSize' => fn(ParseNode $n) => $o->setFontSize($n->getIntegerValue()),\n 'margin' => fn(ParseNode $n) => $o->setMargin($n->getIntegerValue()),\n 'text' => fn(ParseNode $n) => $o->setText($n->getStringValue()),\n 'uiElementName' => fn(ParseNode $n) => $o->setUiElementName($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "d90cd5a171dce02bdfd655661fc7b38a", "score": "0.541421", "text": "function getInfo() {\n return $this->info;\n }", "title": "" }, { "docid": "07463eaf2d9f247aa03bba0e1e75cdbe", "score": "0.540398", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'contentApplicability' => fn(ParseNode $n) => $o->setContentApplicability($n->getObjectValue([ContentApplicabilitySettings::class, 'createFromDiscriminatorValue'])),\n 'expedite' => fn(ParseNode $n) => $o->setExpedite($n->getObjectValue([ExpediteSettings::class, 'createFromDiscriminatorValue'])),\n 'monitoring' => fn(ParseNode $n) => $o->setMonitoring($n->getObjectValue([MonitoringSettings::class, 'createFromDiscriminatorValue'])),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'schedule' => fn(ParseNode $n) => $o->setSchedule($n->getObjectValue([ScheduleSettings::class, 'createFromDiscriminatorValue'])),\n 'userExperience' => fn(ParseNode $n) => $o->setUserExperience($n->getObjectValue([UserExperienceSettings::class, 'createFromDiscriminatorValue'])),\n ];\n }", "title": "" }, { "docid": "3957174b02332b3ad958375524e5d6b2", "score": "0.54021543", "text": "public function getInfo() {\n return $this->info;\n }", "title": "" }, { "docid": "a7282918c7e97b52e60e9adf624fce0f", "score": "0.5396215", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'fontColor' => fn(ParseNode $n) => $o->setFontColor($n->getStringValue()),\n 'fontSize' => fn(ParseNode $n) => $o->setFontSize($n->getIntegerValue()),\n 'text' => fn(ParseNode $n) => $o->setText($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "f61b68e5bf2207574b31bfae24612980", "score": "0.5394078", "text": "public function object()\n {\n return json_decode($this->body(), false);\n }", "title": "" }, { "docid": "5ecb9231875f0ab3981d5e680e96c263", "score": "0.53844476", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'activeDeviceCount' => fn(ParseNode $n) => $o->setActiveDeviceCount($n->getIntegerValue()),\n 'meanTimeToFailureInMinutes' => fn(ParseNode $n) => $o->setMeanTimeToFailureInMinutes($n->getIntegerValue()),\n 'osBuildNumber' => fn(ParseNode $n) => $o->setOsBuildNumber($n->getStringValue()),\n 'osVersion' => fn(ParseNode $n) => $o->setOsVersion($n->getStringValue()),\n 'osVersionAppHealthScore' => fn(ParseNode $n) => $o->setOsVersionAppHealthScore($n->getFloatValue()),\n ]);\n }", "title": "" }, { "docid": "f7fbacb055b387d4a24e07bea26a4e5b", "score": "0.5373054", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'driverClass' => fn(ParseNode $n) => $o->setDriverClass($n->getStringValue()),\n 'manufacturer' => fn(ParseNode $n) => $o->setManufacturer($n->getStringValue()),\n 'provider' => fn(ParseNode $n) => $o->setProvider($n->getStringValue()),\n 'setupInformationFile' => fn(ParseNode $n) => $o->setSetupInformationFile($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()),\n 'versionDateTime' => fn(ParseNode $n) => $o->setVersionDateTime($n->getDateTimeValue()),\n ]);\n }", "title": "" }, { "docid": "1e3bea1a2c2e8628cc6c815a92f0695b", "score": "0.53719825", "text": "public function __wakeup()\n\t{\n\t\ttrigger_error(\"Could not deserialize \". get_class($this) .\" class.\", E_USER_ERROR);\n\t}", "title": "" }, { "docid": "53197eb9c2b9bbaf2a2459ea06a9a961", "score": "0.5368497", "text": "public function getInfo() {\n return $this->info;\n }", "title": "" }, { "docid": "53197eb9c2b9bbaf2a2459ea06a9a961", "score": "0.5368497", "text": "public function getInfo() {\n return $this->info;\n }", "title": "" }, { "docid": "c8b5a73344bfebbe551b768e3eef998f", "score": "0.5361677", "text": "public function serializeData();", "title": "" }, { "docid": "dbbf6767c2e20e0f8ecb801c688ef606", "score": "0.53606755", "text": "private function getData() {\n\t\tif (isset($_POST)) {\n\t\t\t$this->modelName = $_POST['model'];\n\t\t}\n\t}", "title": "" }, { "docid": "0d68503f02ffd7202f6063d68bcf0012", "score": "0.5350732", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"DataId\",$param) and $param[\"DataId\"] !== null) {\n $this->DataId = $param[\"DataId\"];\n }\n\n if (array_key_exists(\"TaskId\",$param) and $param[\"TaskId\"] !== null) {\n $this->TaskId = $param[\"TaskId\"];\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"Name\",$param) and $param[\"Name\"] !== null) {\n $this->Name = $param[\"Name\"];\n }\n\n if (array_key_exists(\"BizType\",$param) and $param[\"BizType\"] !== null) {\n $this->BizType = $param[\"BizType\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"Suggestion\",$param) and $param[\"Suggestion\"] !== null) {\n $this->Suggestion = $param[\"Suggestion\"];\n }\n\n if (array_key_exists(\"MediaInfo\",$param) and $param[\"MediaInfo\"] !== null) {\n $this->MediaInfo = new MediaInfo();\n $this->MediaInfo->deserialize($param[\"MediaInfo\"]);\n }\n\n if (array_key_exists(\"Labels\",$param) and $param[\"Labels\"] !== null) {\n $this->Labels = [];\n foreach ($param[\"Labels\"] as $key => $value){\n $obj = new TaskLabel();\n $obj->deserialize($value);\n array_push($this->Labels, $obj);\n }\n }\n\n if (array_key_exists(\"CreatedAt\",$param) and $param[\"CreatedAt\"] !== null) {\n $this->CreatedAt = $param[\"CreatedAt\"];\n }\n\n if (array_key_exists(\"UpdatedAt\",$param) and $param[\"UpdatedAt\"] !== null) {\n $this->UpdatedAt = $param[\"UpdatedAt\"];\n }\n }", "title": "" }, { "docid": "8dc6ce134edba9ce3468fde56bacb45c", "score": "0.53503466", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'isOptional' => fn(ParseNode $n) => $o->setIsOptional($n->getBooleanValue()),\n 'label' => fn(ParseNode $n) => $o->setLabel($n->getStringValue()),\n 'recordType' => fn(ParseNode $n) => $o->setRecordType($n->getStringValue()),\n 'supportedService' => fn(ParseNode $n) => $o->setSupportedService($n->getStringValue()),\n 'ttl' => fn(ParseNode $n) => $o->setTtl($n->getIntegerValue()),\n ]);\n }", "title": "" }, { "docid": "65a67aca5f5a7cb5c692e604780abd05", "score": "0.53442276", "text": "public function unserializeProperties() {\n parent::unserializeProperties();\n $this->ratios = ($this->ratios) ? unserialize($this->ratios) : array();\n }", "title": "" }, { "docid": "df6cf37da90dc0ebb07db7c2bede3292", "score": "0.5342832", "text": "public function getMetadata(){return $this->metadata;}", "title": "" }, { "docid": "e4c8a0613795ca341331bd176472120c", "score": "0.5318027", "text": "function jsonSerialize(){\r\n return get_object_vars($this);\r\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.53109545", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "6e3974d47d0b78dbb22c1e34218dd438", "score": "0.53086495", "text": "public function jsonSerialize() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "6e3974d47d0b78dbb22c1e34218dd438", "score": "0.53086495", "text": "public function jsonSerialize() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "6e3974d47d0b78dbb22c1e34218dd438", "score": "0.53086495", "text": "public function jsonSerialize() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "6e3974d47d0b78dbb22c1e34218dd438", "score": "0.53086495", "text": "public function jsonSerialize() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "fdb1c79baa0ba7dd2f2d17932087f66d", "score": "0.53083086", "text": "public function jsonSerialize()\r\n {\r\n return get_object_vars($this);\r\n }", "title": "" }, { "docid": "bfc5797ecc771cd328ddab4a6c4ee056", "score": "0.5305058", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'discoverySource' => fn(ParseNode $n) => $o->setDiscoverySource($n->getEnumValue(DiscoverySource::class)),\n 'enrollmentState' => fn(ParseNode $n) => $o->setEnrollmentState($n->getEnumValue(EnrollmentState::class)),\n 'isDeleted' => fn(ParseNode $n) => $o->setIsDeleted($n->getBooleanValue()),\n 'isSupervised' => fn(ParseNode $n) => $o->setIsSupervised($n->getBooleanValue()),\n 'lastContactedDateTime' => fn(ParseNode $n) => $o->setLastContactedDateTime($n->getDateTimeValue()),\n 'platform' => fn(ParseNode $n) => $o->setPlatform($n->getEnumValue(Platform::class)),\n 'requestedEnrollmentProfileAssignmentDateTime' => fn(ParseNode $n) => $o->setRequestedEnrollmentProfileAssignmentDateTime($n->getDateTimeValue()),\n 'requestedEnrollmentProfileId' => fn(ParseNode $n) => $o->setRequestedEnrollmentProfileId($n->getStringValue()),\n 'serialNumber' => fn(ParseNode $n) => $o->setSerialNumber($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "02214d230d72f85010bbe2199d353c02", "score": "0.53039503", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'defaultLanguage' => fn(ParseNode $n) => $o->setDefaultLanguage($n->getStringValue()),\n 'descriptions' => fn(ParseNode $n) => $o->setDescriptions($n->getCollectionOfObjectValues([DisplayNameLocalization::class, 'createFromDiscriminatorValue'])),\n 'formula' => fn(ParseNode $n) => $o->setFormula($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "33e5a4c906923a35e3c046422ced4658", "score": "0.5302403", "text": "protected abstract function getSerializableProperties();", "title": "" }, { "docid": "c5d1c96e5028df3b888a2bb5a9dc5d8a", "score": "0.53005385", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'controlId' => fn(ParseNode $n) => $o->setControlId($n->getStringValue()),\n 'controlTypeId' => fn(ParseNode $n) => $o->setControlTypeId($n->getStringValue()),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'owner' => fn(ParseNode $n) => $o->setOwner($n->getObjectValue([UserIdentity::class, 'createFromDiscriminatorValue'])),\n 'program' => fn(ParseNode $n) => $o->setProgram($n->getObjectValue([Program::class, 'createFromDiscriminatorValue'])),\n 'programId' => fn(ParseNode $n) => $o->setProgramId($n->getStringValue()),\n 'resource' => fn(ParseNode $n) => $o->setResource($n->getObjectValue([ProgramResource::class, 'createFromDiscriminatorValue'])),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "93b3443718564aa92b4204c8c688e24f", "score": "0.5299013", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'createdBy' => fn(ParseNode $n) => $o->setCreatedBy($n->getObjectValue([AppIdentity::class, 'createFromDiscriminatorValue'])),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'tasks' => fn(ParseNode $n) => $o->setTasks($n->getCollectionOfObjectValues([PrintTask::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "7ce802666c47703eb25cba3e7f1b6944", "score": "0.529865", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'autonomousSystem' => fn(ParseNode $n) => $o->setAutonomousSystem($n->getObjectValue([AutonomousSystem::class, 'createFromDiscriminatorValue'])),\n 'countryOrRegion' => fn(ParseNode $n) => $o->setCountryOrRegion($n->getStringValue()),\n 'hostingProvider' => fn(ParseNode $n) => $o->setHostingProvider($n->getStringValue()),\n 'netblock' => fn(ParseNode $n) => $o->setNetblock($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "0a7c551fbdc64a6e58b86aae1898b92c", "score": "0.52969193", "text": "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "0a7c551fbdc64a6e58b86aae1898b92c", "score": "0.52969193", "text": "function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "bc5e25059e693a786af6a752a770939d", "score": "0.5294224", "text": "public function jsonSerialize()\n {\n return (object) get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "b05d4f6639fe6edb15232fa7ef2e82fd", "score": "0.5291741", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "22a557b2d2eb8a845661af6cce8ed11a", "score": "0.5288843", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'senderDomain' => fn(ParseNode $n) => $o->setSenderDomain($n->getStringValue()),\n 'useCompanyBranding' => fn(ParseNode $n) => $o->setUseCompanyBranding($n->getBooleanValue()),\n ];\n }", "title": "" }, { "docid": "059423becad84934d89c8df015c9f54b", "score": "0.52883685", "text": "public function jsonSerialize()\n {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "c6a85a45f0ee417a57c22d9fa1eb1e6f", "score": "0.5279815", "text": "protected function getLayoutData () {\r\n $file = PIMCORE_CLASS_DIRECTORY.\"/definition_\". $this->model->getId() .\".psf\";\r\n if(is_file($file)) {\r\n return Serialize::unserialize(file_get_contents($file));\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "d0e155dc4236685a1d561de62a87db86", "score": "0.5275922", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'endDateTime' => fn(ParseNode $n) => $o->setEndDateTime($n->getDateTimeValue()),\n 'joinWebUrl' => fn(ParseNode $n) => $o->setJoinWebUrl($n->getStringValue()),\n 'lastModifiedDateTime' => fn(ParseNode $n) => $o->setLastModifiedDateTime($n->getDateTimeValue()),\n 'modalities' => fn(ParseNode $n) => $o->setModalities($n->getCollectionOfEnumValues(Modality::class)),\n 'organizer' => fn(ParseNode $n) => $o->setOrganizer($n->getObjectValue([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'participants' => fn(ParseNode $n) => $o->setParticipants($n->getCollectionOfObjectValues([IdentitySet::class, 'createFromDiscriminatorValue'])),\n 'sessions' => fn(ParseNode $n) => $o->setSessions($n->getCollectionOfObjectValues([Session::class, 'createFromDiscriminatorValue'])),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n 'type' => fn(ParseNode $n) => $o->setType($n->getEnumValue(CallType::class)),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getIntegerValue()),\n ]);\n }", "title": "" }, { "docid": "1f6f58553c9da7e72442c559ab51a009", "score": "0.5275062", "text": "protected function processData()\n {\n if (null === $this->data) {\n if (null !== $this->rawData) {\n $this->data = $this->serializer->deserialize($this->rawData, $this->serializerParams);\n }\n }\n }", "title": "" }, { "docid": "48cf77bded876db5af510de009e1bf08", "score": "0.52725744", "text": "public function info(/* ... */) \n {\n return $this->_info;\n }", "title": "" }, { "docid": "2d77d5d994cbc03cffb3802c3a2fac06", "score": "0.52719593", "text": "public function JSONSerialize() {\n return get_object_vars($this);\n }", "title": "" }, { "docid": "e9c3f7a42565c51f020d6afb71e2672d", "score": "0.5265997", "text": "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"Id\",$param) and $param[\"Id\"] !== null) {\n $this->Id = $param[\"Id\"];\n }\n\n if (array_key_exists(\"Name\",$param) and $param[\"Name\"] !== null) {\n $this->Name = $param[\"Name\"];\n }\n\n if (array_key_exists(\"FrameworkName\",$param) and $param[\"FrameworkName\"] !== null) {\n $this->FrameworkName = $param[\"FrameworkName\"];\n }\n\n if (array_key_exists(\"FrameworkVersion\",$param) and $param[\"FrameworkVersion\"] !== null) {\n $this->FrameworkVersion = $param[\"FrameworkVersion\"];\n }\n\n if (array_key_exists(\"FrameworkEnvironment\",$param) and $param[\"FrameworkEnvironment\"] !== null) {\n $this->FrameworkEnvironment = $param[\"FrameworkEnvironment\"];\n }\n\n if (array_key_exists(\"ChargeType\",$param) and $param[\"ChargeType\"] !== null) {\n $this->ChargeType = $param[\"ChargeType\"];\n }\n\n if (array_key_exists(\"ChargeStatus\",$param) and $param[\"ChargeStatus\"] !== null) {\n $this->ChargeStatus = $param[\"ChargeStatus\"];\n }\n\n if (array_key_exists(\"ResourceGroupId\",$param) and $param[\"ResourceGroupId\"] !== null) {\n $this->ResourceGroupId = $param[\"ResourceGroupId\"];\n }\n\n if (array_key_exists(\"ResourceConfigInfos\",$param) and $param[\"ResourceConfigInfos\"] !== null) {\n $this->ResourceConfigInfos = [];\n foreach ($param[\"ResourceConfigInfos\"] as $key => $value){\n $obj = new ResourceConfigInfo();\n $obj->deserialize($value);\n array_push($this->ResourceConfigInfos, $obj);\n }\n }\n\n if (array_key_exists(\"TrainingMode\",$param) and $param[\"TrainingMode\"] !== null) {\n $this->TrainingMode = $param[\"TrainingMode\"];\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"RuntimeInSeconds\",$param) and $param[\"RuntimeInSeconds\"] !== null) {\n $this->RuntimeInSeconds = $param[\"RuntimeInSeconds\"];\n }\n\n if (array_key_exists(\"CreateTime\",$param) and $param[\"CreateTime\"] !== null) {\n $this->CreateTime = $param[\"CreateTime\"];\n }\n\n if (array_key_exists(\"StartTime\",$param) and $param[\"StartTime\"] !== null) {\n $this->StartTime = $param[\"StartTime\"];\n }\n\n if (array_key_exists(\"EndTime\",$param) and $param[\"EndTime\"] !== null) {\n $this->EndTime = $param[\"EndTime\"];\n }\n\n if (array_key_exists(\"Output\",$param) and $param[\"Output\"] !== null) {\n $this->Output = new CosPathInfo();\n $this->Output->deserialize($param[\"Output\"]);\n }\n\n if (array_key_exists(\"FailureReason\",$param) and $param[\"FailureReason\"] !== null) {\n $this->FailureReason = $param[\"FailureReason\"];\n }\n\n if (array_key_exists(\"UpdateTime\",$param) and $param[\"UpdateTime\"] !== null) {\n $this->UpdateTime = $param[\"UpdateTime\"];\n }\n\n if (array_key_exists(\"BillingInfo\",$param) and $param[\"BillingInfo\"] !== null) {\n $this->BillingInfo = $param[\"BillingInfo\"];\n }\n\n if (array_key_exists(\"ResourceGroupName\",$param) and $param[\"ResourceGroupName\"] !== null) {\n $this->ResourceGroupName = $param[\"ResourceGroupName\"];\n }\n\n if (array_key_exists(\"ImageInfo\",$param) and $param[\"ImageInfo\"] !== null) {\n $this->ImageInfo = new ImageInfo();\n $this->ImageInfo->deserialize($param[\"ImageInfo\"]);\n }\n\n if (array_key_exists(\"Message\",$param) and $param[\"Message\"] !== null) {\n $this->Message = $param[\"Message\"];\n }\n\n if (array_key_exists(\"Tags\",$param) and $param[\"Tags\"] !== null) {\n $this->Tags = [];\n foreach ($param[\"Tags\"] as $key => $value){\n $obj = new Tag();\n $obj->deserialize($value);\n array_push($this->Tags, $obj);\n }\n }\n\n if (array_key_exists(\"CallbackUrl\",$param) and $param[\"CallbackUrl\"] !== null) {\n $this->CallbackUrl = $param[\"CallbackUrl\"];\n }\n }", "title": "" }, { "docid": "28df602d149724cff0f4d99ee022215d", "score": "0.52648085", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'assignedTo' => fn(ParseNode $n) => $o->setAssignedTo($n->getStringValue()),\n 'category' => fn(ParseNode $n) => $o->setCategory($n->getEnumValue(DeviceAppManagementTaskCategory::class)),\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'creator' => fn(ParseNode $n) => $o->setCreator($n->getStringValue()),\n 'creatorNotes' => fn(ParseNode $n) => $o->setCreatorNotes($n->getStringValue()),\n 'description' => fn(ParseNode $n) => $o->setDescription($n->getStringValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'dueDateTime' => fn(ParseNode $n) => $o->setDueDateTime($n->getDateTimeValue()),\n 'priority' => fn(ParseNode $n) => $o->setPriority($n->getEnumValue(DeviceAppManagementTaskPriority::class)),\n 'status' => fn(ParseNode $n) => $o->setStatus($n->getEnumValue(DeviceAppManagementTaskStatus::class)),\n ]);\n }", "title": "" }, { "docid": "bc9f8c056fe4c95970793a7ae8bf687a", "score": "0.5264602", "text": "private function get_info()\n\t{\n\t\treturn $this->m_info;\n\t}", "title": "" }, { "docid": "24d3a7bc690436df63a55637859e3a0c", "score": "0.52633256", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'allowed' => fn(ParseNode $n) => $o->setAllowed($n->getBooleanValue()),\n 'codeRequirement' => fn(ParseNode $n) => $o->setCodeRequirement($n->getStringValue()),\n 'identifier' => fn(ParseNode $n) => $o->setIdentifier($n->getStringValue()),\n 'identifierType' => fn(ParseNode $n) => $o->setIdentifierType($n->getEnumValue(MacOSProcessIdentifierType::class)),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "6c673c2ba26a4988ea60d4848265bb11", "score": "0.5262258", "text": "final protected function getModelMetadata()\n {\n return [\n 'properties' => [\n 'id' => [\n 'type' => 'id'\n ],\n 'name' => [\n 'type' => 'string'\n ],\n 'title' => [\n 'type' => 'string',\n 'l10n' => true\n ],\n 'roles' => [\n 'type' => 'string',\n 'multiple' => true\n ]\n ],\n 'key' => 'id'\n ];\n }", "title": "" }, { "docid": "0f777e6186a6bb983accb8ef6c2f1259", "score": "0.52614063", "text": "public function getUnserializedBody();", "title": "" }, { "docid": "be2b8df6c3f64c04d9b399e54a64e6ac", "score": "0.5259399", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'createdDateTime' => fn(ParseNode $n) => $o->setCreatedDateTime($n->getDateTimeValue()),\n 'deviceId' => fn(ParseNode $n) => $o->setDeviceId($n->getStringValue()),\n 'key' => fn(ParseNode $n) => $o->setKey($n->getStringValue()),\n 'volumeType' => fn(ParseNode $n) => $o->setVolumeType($n->getEnumValue(VolumeType::class)),\n ]);\n }", "title": "" }, { "docid": "36aa2318d6c01ffd0f2d1be656ccdf82", "score": "0.5254073", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'assignedDateTime' => fn(ParseNode $n) => $o->setAssignedDateTime($n->getDateTimeValue()),\n 'completionDateTime' => fn(ParseNode $n) => $o->setCompletionDateTime($n->getDateTimeValue()),\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'trainingStatus' => fn(ParseNode $n) => $o->setTrainingStatus($n->getEnumValue(TrainingStatus::class)),\n ];\n }", "title": "" }, { "docid": "7d8e3a91b0faecba6f891aee5ffcce18", "score": "0.52517325", "text": "function getInfo()\n {\n\t\treturn $this->info;\n }", "title": "" }, { "docid": "199b1870475b81c6da474400865c3478", "score": "0.5249692", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'assignedTrainingsCount' => fn(ParseNode $n) => $o->setAssignedTrainingsCount($n->getIntegerValue()),\n 'completedTrainingsCount' => fn(ParseNode $n) => $o->setCompletedTrainingsCount($n->getIntegerValue()),\n 'compromisedDateTime' => fn(ParseNode $n) => $o->setCompromisedDateTime($n->getDateTimeValue()),\n 'inProgressTrainingsCount' => fn(ParseNode $n) => $o->setInProgressTrainingsCount($n->getIntegerValue()),\n 'isCompromised' => fn(ParseNode $n) => $o->setIsCompromised($n->getBooleanValue()),\n 'latestSimulationActivity' => fn(ParseNode $n) => $o->setLatestSimulationActivity($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'reportedPhishDateTime' => fn(ParseNode $n) => $o->setReportedPhishDateTime($n->getDateTimeValue()),\n 'simulationEvents' => fn(ParseNode $n) => $o->setSimulationEvents($n->getCollectionOfObjectValues([UserSimulationEventInfo::class, 'createFromDiscriminatorValue'])),\n 'simulationUser' => fn(ParseNode $n) => $o->setSimulationUser($n->getObjectValue([AttackSimulationUser::class, 'createFromDiscriminatorValue'])),\n 'trainingEvents' => fn(ParseNode $n) => $o->setTrainingEvents($n->getCollectionOfObjectValues([UserTrainingEventInfo::class, 'createFromDiscriminatorValue'])),\n ];\n }", "title": "" }, { "docid": "fc6e677dcd7ad4caf77891a49484eb58", "score": "0.524697", "text": "public function getInfo() {\n\t\treturn $this->info;\n\t}", "title": "" } ]
cc14e68265c9b17753c39131ede5a8e0
Determines if the browser provided a valid SSL client certificate
[ { "docid": "3e94fe36041562381b374dc959deda81", "score": "0.7526479", "text": "public function hasValidCert()\n {\n if (!isset($_SERVER['SSL_CLIENT_M_SERIAL'])\n || !isset($_SERVER['SSL_CLIENT_V_END'])\n || !isset($_SERVER['SSL_CLIENT_VERIFY'])\n || $_SERVER['SSL_CLIENT_VERIFY'] !== 'SUCCESS'\n || !isset($_SERVER['SSL_CLIENT_I_DN'])\n ) {\n return false;\n }\n\n if ($_SERVER['SSL_CLIENT_V_REMAIN'] <= 0) {\n return false;\n }\n\n return true;\n }", "title": "" } ]
[ { "docid": "bfe8e99160cbd3fd7c76bb751f489afc", "score": "0.6975687", "text": "public function validateCert(): bool\n {\n return ! $this->novalidatecert;\n }", "title": "" }, { "docid": "f8fb0d5ae87b04d94b6c94b895fbddad", "score": "0.68553984", "text": "public function https()\n {\n try {\n $data = SslCertificate::createForHostName($this->name());\n return $data->isValid();\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.6784763", "text": "public function isSsl();", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.6784763", "text": "public function isSsl();", "title": "" }, { "docid": "400b56a2a570f8c34274bcf5133e7656", "score": "0.6763651", "text": "protected function isValidSslCertificate()\n {\n $allowed = \\preg_split(\n '/\\s*,\\s*/',\n $this->Config()->get('ssl', 'allow_cn', ''),\n -1,\n PREG_SPLIT_NO_EMPTY\n );\n\n return \\in_array($this->getSslCn(), $allowed, true);\n }", "title": "" }, { "docid": "06c0b79cc5c297b6af3e7f15c9407b3a", "score": "0.66393375", "text": "protected static function checkSslIsInstalled(): bool\n {\n return !empty(Request::server('HTTPS')) && Request::server('HTTPS') != 'off';\n }", "title": "" }, { "docid": "78ac1c0d663b56c60c9a2555bb6e9f70", "score": "0.6494967", "text": "private function isSSLConnection() {\n\t\tif($this->getUrl()->getPort() == 443 || $this->getUrl()->getScheme() == 'https') {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fcadb64a02dad58485235f98ed8152c8", "score": "0.6475959", "text": "function has_ssl( $domain ) {\n\t$ssl_check = @fsockopen( 'ssl://' . $domain, 443, $errno, $errstr, 30 );\n\t$res = !! $ssl_check;\n\tif ( $ssl_check ) {\n\t\tfclose( $ssl_check );\n\t}\n\treturn $res;\n}", "title": "" }, { "docid": "dcc3c21f5b00c3050faebf234397848e", "score": "0.6474291", "text": "static public function isCertInfoAvailable() \n\t{\n\t\t$curlDetails = curl_version();\n\t\treturn version_compare($curlDetails['version'], '7.19.1') != -1;\n\t}", "title": "" }, { "docid": "44bc614a895a9604f01a820489672a8a", "score": "0.6454654", "text": "private function is_ssl() {\n\t\tif ($this->app->isSSLConnection())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d7b8b51311499bd636a5d4e0ce69f38e", "score": "0.64179397", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['HTTPS'] ) )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "17fc93a23ee7624fee8baeac30f4d183", "score": "0.641637", "text": "public function usingSSL() {\n\t\treturn $this->proto === 'https';\n\t}", "title": "" }, { "docid": "e9417d95f4ea3a81bac1c3cacd9ab590", "score": "0.6415738", "text": "function authenticate_certificate() {\n\tif(!isset($_SERVER[\"SSL_CLIENT_VERIFY\"])) {\n\t\treturn \"\";\n\t}\n\n\t// Check if the given client certificate is valid\n\tif($_SERVER[\"SSL_CLIENT_VERIFY\"] != \"SUCCESS\") {\n\t\treturn \"\";\n\t}\n\n\t// Check if the serial number is numeric\n\tif(!is_numeric(hexdec($_SERVER[\"SSL_CLIENT_M_SERIAL\"]))) {\n\t\terror_500(\"Client certificate does not have a numerical value as serial number\");\n\t}\n\n\t$serial = round(hexdec($_SERVER[\"SSL_CLIENT_M_SERIAL\"]));\n\n\t// Load certificate data\n\t$cert = core_ca(\"get_cert.php?serial={$serial}\");\n\n\t// Check if certificate exists\n\tif(!isset($cert[\"cert_data\"])) {\n\t\treturn \"\";\n\t}\n\n\t$cert = $cert[\"cert_data\"];\n\n\t// Check if the certificate has been revoked\n\tif(!is_null($cert[\"revoked\"])) {\n\t\treturn \"\";\n\t}\n\n\t// At this point, the user has a valid certificate\n\t$user = userdata(\"get_user.php?user={$cert[\"user\"]}\");\n\n\tif(!isset($user[\"uid\"]))\n\t\treturn \"\";\n\n\treturn $user[\"uid\"];\n}", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.63839257", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.63839257", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.63839257", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "af96f888fe2c3f1d96d2de31a6d25f23", "score": "0.63802344", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['https'] ) && ($_SERVER['HTTPS'] != 'off') )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "94a9d30374f67134e2457dff1646a9b5", "score": "0.63464475", "text": "protected function isSsl()\n {\n return 'https://' === \\substr($this->url, 0, 8);\n }", "title": "" }, { "docid": "d1f7f29c06b0f6618640036e246f8647", "score": "0.6305103", "text": "public function is_ssl() {\n\t\t\n\t\treturn substr( $this->url, 0, 5 ) === 'https';\n\t}", "title": "" }, { "docid": "6af669639ad55c309c9d5d3dbdccd041", "score": "0.6250457", "text": "public function isSSL()\n {\n if (!isset($this->app->_SERVER['HTTPS'])) {\n return false;\n }\n\n //Apache\n if ($this->app->_SERVER['HTTPS'] == 1) {\n return true;\n } //IIS\n elseif ($this->app->_SERVER['HTTPS'] === 'on') {\n return true;\n } //other servers\n elseif ($this->app->_SERVER['SERVER_PORT'] == 443) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0e18ccf9736acaeec6382f50a2bc3254", "score": "0.6236617", "text": "public function isSSL()\n {\n return $this->_isSSL;\n }", "title": "" }, { "docid": "f16b7442be9a01a88532f87559e856e8", "score": "0.6220877", "text": "public function check_ssl()\n\t{\n\t\tif ( 'yes' != get_option( 'woocommerce_force_ssl_checkout' ) )\n\t\t{\n\t\t\techo '<div class=\"error\"><p>WooCommerce IS NOT BEING FORCED OVER SSL; YOUR CUSTOMER\\'S CREDIT CARD DATA IS AT RISK.</p></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "fdcb45205cf278a7cbd037d0936d6a32", "score": "0.61988485", "text": "public function isCurrentPageRequiresSsl() {\n\t\tif ( $this->testmode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn is_checkout();\n\t}", "title": "" }, { "docid": "be94c57ecfee9beb178ae0843204de7c", "score": "0.6194787", "text": "public function hasCertificate(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "b270923f9a4f017b66a072db795c4f68", "score": "0.61766124", "text": "public function isEnableSSLVerification()\r\n {\r\n return !$this->isSandbox() || $this->_isEnableSSLVerification;\r\n }", "title": "" }, { "docid": "dc29703872af4e3db4ffcd9e112a491b", "score": "0.61335415", "text": "public function isSslEnabled(): bool\n {\n return isset($this->settings['ssl_cert_file']);\n }", "title": "" }, { "docid": "278039ab2dc1779bc484074e3b63e51f", "score": "0.6131328", "text": "public final function validateHttpsOnly()\n\t{\n\t\tif (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS']!='on'){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ddc6bbbe5429c2be40cfef1ba252c6ae", "score": "0.6119994", "text": "public function isCertificateAuthorityCheckRequired() {\n\t\treturn $this->isCertificateAuthorityCheckRequired;\n\t}", "title": "" }, { "docid": "2ecef4a96088568cef9810e7518d766a", "score": "0.6117935", "text": "function is_ssl() {\n if ( isset( $_SERVER['HTTPS'] ) ) {\n if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {\n return true;\n }\n \n if ( '1' == $_SERVER['HTTPS'] ) {\n return true;\n }\n } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "6e282a5beaacaf2b546f3535a297b01c", "score": "0.6116043", "text": "function is_ssl() {\n if ( isset( $_SERVER['HTTPS'] ) ) {\n if ( 'on' == strtolower( $_SERVER['HTTPS'] ) ) {\n return true;\n }\n\n if ( '1' == $_SERVER['HTTPS'] ) {\n return true;\n }\n } elseif ( isset($_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "c251ff403155d1441fdacc1c2370c99e", "score": "0.6108398", "text": "function is_ssl() {\n return $_SERVER['HTTPS'] != '' and $_SERVER['HTTPS'] != 'off';\n }", "title": "" }, { "docid": "0e34c9089bc0c87b4dbb0c33c9caafce", "score": "0.61073035", "text": "function yourls_is_ssl() {\n\t\tif ( isset($_SERVER['HTTPS']) ) {\n\t\t\tif ( 'on' == strtolower($_SERVER['HTTPS']) )\n\t\t\t\treturn true;\n\t\t\tif ( '1' == $_SERVER['HTTPS'] )\n\t\t\t\treturn true;\n\t\t} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b14a75ed9b8c55e502b15593b01d04c5", "score": "0.60855985", "text": "public function checkSSL() {\n\t\tif(\n\t\t\t// OC15\n\t\t\t$this->config->get( 'config_use_ssl' )\n\t\t\t// OC14\n\t\t\t|| $this->config->get( 'config_ssl' )\n\t\t)\n\t\t{\n\t\t\t$this->_useSSL = true;\n\t\t}\n\t}", "title": "" }, { "docid": "f80cef0d0bb2659cc00339a71e5d4d85", "score": "0.60739166", "text": "public function isSsl(): bool\n {\n return $this->ssl;\n }", "title": "" }, { "docid": "2ee6e1848f7e40586bcd1c9b3e3c37e0", "score": "0.60283214", "text": "protected function ssl()\n {\n return isset($this->options[\"ssl\"]) ? $this->options[\"ssl\"] : true;\n }", "title": "" }, { "docid": "2eb0bf223c342b3901f50069c1a00767", "score": "0.5996315", "text": "public function isSecure(): bool\n {\n return $this->isProtocol('https');\n }", "title": "" }, { "docid": "5808a38d3b9955f32ce3841dee4c6060", "score": "0.5983153", "text": "function ds_https_verify()\r\n{\r\n\tadd_filter( 'https_ssl_verify', '__return_false' );\r\n}", "title": "" }, { "docid": "ff581b4cbd85c1a70817b2f4aeb0ce62", "score": "0.59677947", "text": "public function isSecured()\n {\n return (isset($this->scheme) && strtolower($this->scheme) == 'https');\n }", "title": "" }, { "docid": "cd230b69be2b28cc8b31b6381748069f", "score": "0.59453934", "text": "private static function is_ssl()\n\t{\n\t\tif (isset($_SERVER['HTTPS']))\n\t\t{\n\t\t\tif ($_SERVER['HTTPS'] === 1)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telseif ($_SERVER['HTTPS'] === 'on')\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\tif ($_SERVER['SERVER_PORT'] == 443)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "4cb411b8eed26d517cb6c28020940b30", "score": "0.5943011", "text": "private function _is_https_capable()\n\t{\n\t\t// Get the current site protocol\n\t\t$protocol = Kohana::config('core.site_protocol');\n\n\t\t// Build an SSL URL\n\t\t$url = ($protocol == 'https')? url::base() : str_replace('http://', 'https://', url::base());\n\n\t\t$url .= 'index.php';\n\n\t\t// Initialize cURL\n\t\t$ch = curl_init();\n\n\t\t// Set cURL options\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\n\t\t// Disable following any \"Location:\" sent as part of the HTTP header\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);\n\n\t\t// Return the output of curl_exec() as a string instead of outputting it directly\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\n\t\t// Suppress header information from the output\n\t\tcurl_setopt($ch, CURLOPT_HEADER, FALSE);\n\n\t\t// Allow connection to HTTPS\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t// Perform cURL session\n\t\tcurl_exec($ch);\n\n\t\t// Get the cURL error number\n\t\t$error_no = curl_errno($ch);\n\n\t\t// Get the return code\n\t\t$http_return_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\n\t\t// Close the cURL handle\n\t\tcurl_close($ch);\n\n\t\t// Check if the cURL session succeeded\n\t\treturn (($error_no > 0 AND $error_no != 60) OR $http_return_code == 404)\n\t\t\t? FALSE\n\t\t\t: TRUE;\n\t}", "title": "" }, { "docid": "660f35333d34f131bdaee39341b15e4a", "score": "0.5940062", "text": "public static function is_https () {\n\t\t\n\t\treturn self::get_instance()->request_ssl;\n\t\t\n\t}", "title": "" }, { "docid": "5dbdd9e566681f43bad65ee2ccbb7480", "score": "0.5930246", "text": "function is_https()\n {\n return ( $_SERVER[\"HTTPS\"] == 'on' || $_SERVER[\"HTTP_FRONT_END_HTTPS\"] == 'on' \n || preg_match(\"/^https:/\", $_SERVER['SCRIPT_URI']) ) ? true : false;\n }", "title": "" }, { "docid": "b588c369d264e9cc4f5e11b5c4ec88e7", "score": "0.5922995", "text": "public function isSecure()\n\t{\n\t\treturn ($this->server->get('HTTPS') == true);\n\t}", "title": "" }, { "docid": "748c931cd2d067b2d92f946239924e17", "score": "0.5918104", "text": "public function do_ssl_check() {\n if( $this->enabled == \"yes\" ) {\n if( get_option( 'woocommerce_force_ssl_checkout' ) == \"no\" ) {\n echo \"<div class=\\\"error\\\"><p>\". sprintf( __( \"<strong>%s</strong> is enabled and WooCommerce is not forcing the SSL certificate on your checkout page. Please ensure that you have a valid SSL certificate and that you are <a href=\\\"%s\\\">forcing the checkout pages to be secured.</a>\" ), $this->method_title, admin_url( 'admin.php?page=wc-settings&tab=checkout' ) ) .\"</p></div>\"; \n }\n } \n }", "title": "" }, { "docid": "fa1bb238ca0cbe3637bf399fffa2e8a4", "score": "0.59168357", "text": "function is_https() {\n\n // Local server flags\n if (isset($_SERVER['HTTPS'])\n && strtolower($_SERVER['HTTPS']) == 'on')\n return true;\n\n // Check if SSL was terminated by a loadbalancer\n return (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])\n && !strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https'));\n }", "title": "" }, { "docid": "882cacd3870e93759897da6a5815ada6", "score": "0.5906334", "text": "public function isComodoCert($api, $package) {\n //@todo once we have purchased a cert we should store some details into config for so many days not recall api\n\t\t$row = $this->getModuleRow($package->module_row);\n\t\n\t\t$this->log($row->meta->api_username . \"|ssl-is-comodo-cert\", serialize($package->meta->gogetssl_product), \"input\", true);\n\t\ttry {\n\n\t\t\t$product = $this->parseResponse($api->getProductDetails($package->meta->gogetssl_product), $row);\n\t\t\treturn $product['product_brand'] == 'comodo';\n } catch (Exception $e) {\n\t\t\t// Error, invalid authorization\n\t\t\t$this->Input->setErrors(array('api' => array('internal' => Language::_(\"GoGetSSLv2.!error.api.internal\", true))));\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b4ca4213afef0173740ea716881720f2", "score": "0.5887396", "text": "function yourls_needs_ssl() {\n\t\tif ( defined('YOURLS_ADMIN_SSL') && YOURLS_ADMIN_SSL == true )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "28fed7c5da1ec682835f081588e6a644", "score": "0.58801556", "text": "function oa_loudvoice_is_https_on()\n{\n if (!empty($_SERVER['SERVER_PORT']))\n {\n if (trim($_SERVER['SERVER_PORT']) == '443')\n {\n return true;\n }\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']))\n {\n if (strtolower(trim($_SERVER['HTTP_X_FORWARDED_PROTO'])) == 'https')\n {\n return true;\n }\n }\n\n if (!empty($_SERVER['HTTPS']))\n {\n if (strtolower(trim($_SERVER['HTTPS'])) == 'on' or trim($_SERVER['HTTPS']) == '1')\n {\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "2acd269779ba97dd789c7ed0f0f005be", "score": "0.5870674", "text": "public function isSecure()\n {\n return $this->https;\n }", "title": "" }, { "docid": "c881e780e0935f20fb68936446ccace6", "score": "0.5855814", "text": "public function do_ssl_check()\n {\n if ($this->enabled == \"yes\") {\n if (get_option('woocommerce_force_ssl_checkout') == \"no\") {\n echo \"<div class=\\\"error\\\"><p>\" . sprintf(__(\"<strong>%s</strong> is enabled and WooCommerce is not forcing the SSL certificate on your checkout page. Please ensure that you have a valid SSL certificate and that you are <a href=\\\"%s\\\">forcing the checkout pages to be secured.</a>\"), $this->method_title, admin_url('admin.php?page=wc-settings&tab=checkout')) . \"</p></div>\";\n }\n }\n\n }", "title": "" }, { "docid": "1538d6ea9ec55dfded1465f0ec8a73ae", "score": "0.58493865", "text": "public function isRequestSecure(): bool\n {\n if ($proto = $this->headers->get('http-x-forwarded-proto')) {\n return in_array(strtolower($proto), ['https', 'on', 'ssl', '1'], true);\n }\n\n $https = strtolower($this->headers->get('https', '')) ;\n\n return (($https && $https !== 'off') || $this->headers->get('server-port') === self::HTTPS_PORT);\n }", "title": "" }, { "docid": "de52ec840871c7155b8a7374e7619b48", "score": "0.5824089", "text": "public function isValidForUse() {\n\t\tif ( $this->isCurrentPageRequiresSsl() && ! is_ssl() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->supported_currency() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->public_key ) && empty( $this->public_key_ca ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->private_key ) && empty( $this->private_key_ca ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3df01d538e080122bcee701833ef9ae2", "score": "0.58212817", "text": "private function _isValidHttps()\n\t{\n\t\t$userPicPersonal = $this->req->getPost('userpicpersonal', 'trim', '');\n\n\t\treturn !empty($userPicPersonal)\n\t\t\t&& substr($userPicPersonal, 0, 8) === 'https://'\n\t\t\t&& strlen($userPicPersonal) > 8;\n\t}", "title": "" }, { "docid": "2c2e151956cafbc9b4282328e4fd76ec", "score": "0.58198404", "text": "public function enableSSLVerifyPeer();", "title": "" }, { "docid": "2c70a658892be55b0c0d60737a1aa901", "score": "0.5809976", "text": "public function enableSSLChecks()\n {\n $this->sslChecks = OAUTH_SSLCHECK_BOTH;\n\n return true;\n }", "title": "" }, { "docid": "f29ef643955d6cfb738febf22c130ca2", "score": "0.5809105", "text": "function isSecure() {\n return\n (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')\n || $_SERVER['SERVER_PORT'] == 443;\n}", "title": "" }, { "docid": "7411bb638f0ed03fa03fe200c1c8cd7c", "score": "0.5804686", "text": "public function isSecureConnection() {\n\t\treturn $this->port === self::PORT_HTTPS;\n\t}", "title": "" }, { "docid": "a06d522157425a4b504e71fdb0aea9bf", "score": "0.5799184", "text": "function ssl_check($ssl=true)\r\n\t{\r\n\t\tif($_SERVER['SERVER_PORT']!=443 and $ssl==true){\r\n\t\t\theader('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\r\n\t\t\tdie();\r\n\t\t}elseif($_SERVER['SERVER_PORT']==443 and $ssl==false){\r\n\t\t\theader('Location: http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\r\n\t\t\tdie();\r\n }\r\n\t}", "title": "" }, { "docid": "7b78f5132f4cc0251413929bd792f6c2", "score": "0.57968557", "text": "public function getUseCertAuthentication()\n {\n return (bool)$this->_config->getValue('apiAuthentication');\n }", "title": "" }, { "docid": "cf3a6a92c7f66a614f81649b1d824446", "score": "0.57957804", "text": "public function isSecure(): bool\n\t{\n\t\treturn (array_key_exists('HTTPS', $this->server)\n\t\t\t&& $this->server['HTTPS'] !== 'off'\n\t\t);\n\t}", "title": "" }, { "docid": "908cd8dbdb2793fbeb46aa5749b7f5e0", "score": "0.5794416", "text": "public static function isSecure()\n {\n return (isset($_SERVER['HTTPS']) && $_SERVER['https'] == 'on') ||\n (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&\n (\n $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ||\n $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'on'\n )\n );\n }", "title": "" }, { "docid": "a5d5b2aeb6cbbcc33321d83d1b220443", "score": "0.5760589", "text": "public function getBForceAcceptSSLCertificate()\r\n {\r\n return $this->bForceAcceptSSLCertificate;\r\n }", "title": "" }, { "docid": "fe4b036880011340e4efdbc0edf20ec0", "score": "0.5745565", "text": "private function getIsCertificate($courseSeriesId){\n if (!$this->getAppCertificate()->getIsAvailable()) return false;\n\n $courseSeries = $this->getCourseSeriesById($courseSeriesId);\n return !empty($courseSeries->certificate_id);\n }", "title": "" }, { "docid": "40fdf79e07ff5257f3440980111932ee", "score": "0.5732123", "text": "function valid_cert($jsonRequest) \n\t{\n\n\t\t$data = json_decode($jsonRequest,true);\n\t\t$ECHO_CERT_CACHE = FCPATH . 'application/cache/';\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t // Determine if we need to download a new Signature Certificate Chain from Amazon\n \t$md5pem = $ECHO_CERT_CACHE . md5($_SERVER['HTTP_SIGNATURECERTCHAINURL']) . '.pem';\n\t\t$echoServiceDomain = 'echo-api.amazon.com';\n\n\t // If we haven't received a certificate with this URL before,\n \t// store it as a cached copy\n\t if (!file_exists($md5pem))\n\t {\n \tfile_put_contents($md5pem, file_get_contents($_SERVER['HTTP_SIGNATURECERTCHAINURL']));\n \t}\n\n\t // Validate certificate chain and signature\n \t$pem = file_get_contents($md5pem);\n\t\t$ssl_check = openssl_verify( $jsonRequest, base64_decode($_SERVER['HTTP_SIGNATURE']), $pem, 'sha1' );\n\t\tif ($ssl_check != 1) \n\t\t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: ' . openssl_error_string(),'NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\t// Parse certificate for validations below\n \t$parsedCertificate = openssl_x509_parse($pem);\n \tif (!$parsedCertificate) \n \t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: x509 Parsing Failure','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\t// Check that the domain echo-api.amazon.com is present in\n \t// the Subject Alternative Names (SANs) section of the signing certificate\n \tif(strpos( $parsedCertificate['extensions']['subjectAltName'],$echoServiceDomain) === false) \n \t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: subjectAltName Check Failed','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t // Check that the signing certificate has not expired\n \t// (examine both the Not Before and Not After dates)\n\t $validFrom = $parsedCertificate['validFrom_time_t'];\n \t$validTo = $parsedCertificate['validTo_time_t'];\n\t\t$time = time();\n\t\t\n\t\tif (!($validFrom <= $time && $time <= $validTo)) \n\t\t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: Expiration Check Failed','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "049a46b2a70861bbac818829997844f1", "score": "0.57309854", "text": "public function sslOn()\n {\n switch($this->_environment) {\n case 'integration':\n case 'development':\n $ssl = false;\n break;\n case 'production':\n case 'qa':\n case 'sandbox':\n default:\n $ssl = true;\n break;\n }\n\n return $ssl;\n }", "title": "" }, { "docid": "90670fd864d9e538e84f39ec2ce86405", "score": "0.5728071", "text": "function isOnHTTPS () {\n\n\tif ( isset( $_SERVER[ 'HTTPS' ] ) ) {\n\t\tif ( strtolower( $_SERVER['HTTPS'] ) == 'on' )\n\t\t\treturn true;\n\t\tif ( $_SERVER[ 'HTTPS' ] == '1' )\n\t\t\treturn true;\n\t}\n\n\tif ( isset( $_SERVER[ 'SERVER_PORT' ] ) )\n\t\tif ( $_SERVER[ 'SERVER_PORT' ] == '443' )\n\t\t\treturn true;\n\n\tif ( isset( $_SERVER[ 'REQUEST_SCHEME' ] ) )\n\t\tif ( $_SERVER[ 'REQUEST_SCHEME' ] == 'https' )\n\t\t\treturn true;\n\n\treturn false;\n\n}", "title": "" }, { "docid": "35e8f53011264cebf9b79e07b0406d45", "score": "0.569158", "text": "public static function secure()\n {\n return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';\n }", "title": "" }, { "docid": "1bdf716837ae2524d5f4c853314984d5", "score": "0.56894654", "text": "function is_secure() {\n if (getenv('NYMPH_PRODUCTION')) {\n return true;\n }\n if (isset($_SERVER['HTTPS'])) {\n return (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1');\n }\n return (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443');\n}", "title": "" }, { "docid": "de5e1aa4caf8307ea4ebbe4b5648e8fa", "score": "0.56849664", "text": "public function isSecure()\n {\n if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {\n return true;\n } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO']) {\n return true;\n } elseif (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "99cb05d179529e328c35113659f7b745", "score": "0.5676611", "text": "public static function https() {\n\t\treturn (static::protocol() === 'https');\n\t}", "title": "" }, { "docid": "747a226fd81187fa88b20a7ba970d344", "score": "0.5667142", "text": "function read_verify_cert($path) {\n\t\t$this->pubkey = NULL;\n\t\t$fp = fopen($path, \"r\");\n\t\tif (!$fp)\n\t\t\treturn FALSE;\n\t\t$filedata = fread($fp, 8192);\n\t\tfclose($fp);\n\t\t$this->pubkey = openssl_get_publickey($filedata);\n\t\tif ($this->pubkey == FALSE)\n\t\t\t$this->pubkey = NULL;\n\t\treturn $this->pubkey != NULL;\n\t}", "title": "" }, { "docid": "230f036cf28cdd652a4a4f76c031fbc7", "score": "0.5663962", "text": "public function isSecured()\r\n\t{\r\n\t\treturn isset($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'off');\r\n\t}", "title": "" }, { "docid": "1062749d249415f8acea068f79291938", "score": "0.5639769", "text": "public function hasCertificateFile(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "56efa4810a32541891b7df5266b261d8", "score": "0.5638875", "text": "public function isRequestHttps(){\n\t\treturn ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443) ? true : false;\n\t}", "title": "" }, { "docid": "20a1d87a93aee17a5cf76970a79f14e0", "score": "0.5632482", "text": "public function isSslEnabled(){\n return $this->ssl_enabled;\n }", "title": "" }, { "docid": "d9caabe62654def2f255de7c6a8d5092", "score": "0.5629315", "text": "public static function isHTTPS()\r\n\t{\r\n\t\tstatic $bRes = null;\r\n\t\tif ($bRes === null)\r\n\t\t\t$bRes = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443);\r\n\t\treturn $bRes;\r\n\t}", "title": "" }, { "docid": "f295ce95938ef4ce17eb81ef1c9661b8", "score": "0.561028", "text": "public static function https()\n {\n return isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS'];\n }", "title": "" }, { "docid": "c8855e758e77090c46e3767e27ffd545", "score": "0.56064516", "text": "protected function isSecure() : bool\n {\n if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {\n return true;\n }\n\n if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a88efccb57368b82ec0f65c77c714bfd", "score": "0.5596846", "text": "function _getCertificate() {\r\n\t\tswitch ($this->requestParameters['ctx_mode']\r\n\t\t\t\t->getValue()) {\r\n\t\t\tcase 'TEST':\r\n\t\t\t\treturn $this->keyTest;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'PRODUCTION':\r\n\t\t\t\treturn $this->keyProd;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn false;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2ef32c242e26a439f1234060331c44f7", "score": "0.5588563", "text": "function is_https()\n\t{\n\t\tif ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "50f1e26ae3ee40bcbc0e04778715ba01", "score": "0.5582813", "text": "public function forceSsl();", "title": "" }, { "docid": "7fe20273f91009fd8aab97749f479220", "score": "0.55826986", "text": "static function supports_https() {\r\n\t\t$wrappers = stream_get_wrappers();\r\n\t\treturn in_array('https', $wrappers);\r\n\t}", "title": "" }, { "docid": "f599f5328617a548d0032e99cca87122", "score": "0.55690473", "text": "public function shouldBeSecure($path)\r\n {\r\n return substr(Mage::getStoreConfig('web/unsecure/base_url'), 0, 5) === 'https'\r\n || Mage::getStoreConfigFlag('web/secure/use_in_frontend')\r\n && substr(Mage::getStoreConfig('web/secure/base_url'), 0, 5) == 'https'\r\n && Mage::getConfig()->shouldUrlBeSecure($path);\r\n }", "title": "" }, { "docid": "cdb5672f88056354b5fcdf9894470e6e", "score": "0.5561845", "text": "public function isHttps()\n {\n return isset($_SERVER[\"HTTPS\"]);\n }", "title": "" }, { "docid": "8698bbd0cd7c0539bd2ac70a711233b3", "score": "0.5557723", "text": "function isHttps()\n{\n\t// Standard\n\tif (empty($_SERVER[\"HTTPS\"]) || $_SERVER[\"HTTPS\"] !== \"on\") return false;\n\t\n\t// CloudFlare\n\tif (!empty($_SERVER[\"HTTP_CF_VISITOR\"]) && strpos($_SERVER[\"HTTP_CF_VISITOR\"], 'https') === false) return false;\n\t\n\treturn true;\n}", "title": "" }, { "docid": "357a87ad31224b5dc39286431ee9a5cc", "score": "0.5545811", "text": "public function isClientError()\n {\n return $this->httpResponse->isClientError();\n }", "title": "" }, { "docid": "5812ee2d2bc89d9ed17a70f4bead03d8", "score": "0.5542821", "text": "static function get_ssl_certificate(){\n\t\treturn get_option('gravity_form_crm_ssl_dir');\n\t}", "title": "" }, { "docid": "e717994a304f31d3c6aceb641bd996b0", "score": "0.553465", "text": "public function https()\n {\n return $this->server->hasKey('HTTPS') && !empty($this->server('HTTPS')) && $this->server('HTTPS') !== 'off';\n }", "title": "" }, { "docid": "ac7152f86988dedc90e63707c4523eb1", "score": "0.5534626", "text": "public static function secure_cookie() {\n\t\treturn ( is_ssl() and ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) ) );\n\t}", "title": "" }, { "docid": "074d8d370bde8315fc53649b89c82bb6", "score": "0.5505935", "text": "function IS_SECURE()\n{\n // $_SERVER['HTTPS'] will only be on if the user is connecting directly\n // to the web server, and not going through a reverse proxy. If traffic\n // is going through a reverse proxy such as a EC2 load balancer, we must check\n // HTTP_X_FORWAREDED_PROTO instead\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')\n return true;\n return (isset($_SERVER['HTTPS']) && strlen($_SERVER['HTTPS']) > 0);\n}", "title": "" }, { "docid": "ff27671f91aa136ff45de05ea0aab100", "score": "0.549897", "text": "public function hasClientCookie()\n {\n return $this->client_cookie !== null;\n }", "title": "" }, { "docid": "ff27671f91aa136ff45de05ea0aab100", "score": "0.549897", "text": "public function hasClientCookie()\n {\n return $this->client_cookie !== null;\n }", "title": "" }, { "docid": "ee64ae1e6fa73cdea3709babc9b7623b", "score": "0.5489416", "text": "function isHttps()\n {\n //if ( isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ) {\n //0.4.24 by Hinnack\n if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "32d006bc2d287af39fa4243862fcca1e", "score": "0.5482446", "text": "function get_cert($cert){\n $cert_json=array(\n 'cert_string'=>$cert\n );\n $res=$this->curl->gjson(\n $this->curl->peers__examine_cert\n (\n $cert_json)\n );\n if ($res['returncode'] == 'fail')\n return False;\n return $res;\n \n }", "title": "" }, { "docid": "bfc532ea5ed8028a16fc6112e9f0e905", "score": "0.5470355", "text": "public function get_certinfo($domain)\n {\n //check if the certificate is still valid, and send an email to the administrator if this is not the case.\n $url = $domain;\n $original_parse = parse_url($url, PHP_URL_HOST);\n\n if ($original_parse) {\n\n $get = stream_context_create(array(\"ssl\" => array(\"capture_peer_cert\" => TRUE)));\n if ($get) {\n set_error_handler(array($this, 'custom_error_handling'));\n $read = stream_socket_client(\"ssl://\" . $original_parse . \":443\", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $get);\n restore_error_handler();\n\n if ($errno == 0 && $read) {\n\n $cert = stream_context_get_params($read);\n $certinfo = openssl_x509_parse($cert['options']['ssl']['peer_certificate']);\n }\n }\n }\n\n if (!empty($certinfo)) return $certinfo;\n\n return false;\n }", "title": "" }, { "docid": "47e5cc0f45d531edeceff9aa1188e178", "score": "0.54682267", "text": "private function existCertificate()\n {\n if (isset($this->config['certificate'])) {\n $certificate = $this->config['certificate'];\n if (!file_exists($certificate)) {\n $this->messageNoExistCertificate();\n return false;\n }\n\n return true;\n }\n\n $this->messageNoExistCertificate();\n return false;\n }", "title": "" }, { "docid": "f110f889debae37461f5bb06e83c8f11", "score": "0.5466442", "text": "function requestCertificateFromAuthority($request) : bool\r\n{\r\n print PHP_EOL . \"***------------ Requesting Certificate ------------***\" . PHP_EOL;\r\n $requestCommand = ACMEPHP_COMMAND . \" request {$request}\";\r\n\r\n // output the command for reference if testing mode is live\r\n if(TESTING) {\r\n print $requestCommand . PHP_EOL;\r\n return true;\r\n }\r\n\r\n $output = shell_exec($requestCommand);\r\n\r\n // the user may or may not have been asked a series of questions for that cert, depending on whether\r\n // it is their first time or not. This actually still works.\r\n\r\n print $output . PHP_EOL;\r\n\r\n return true;\r\n\r\n}", "title": "" }, { "docid": "8bfa461a87fb95516c891b46be3f43a9", "score": "0.54574513", "text": "function SSLon() {\n\tif ($_SERVER ['HTTPS'] != 'on') {\n\t\t$url = \"https://\" . $_SERVER ['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\tredirect ( $url );\n\t}\n}", "title": "" }, { "docid": "1db7b94d1f69fd78b80a3b034a756010", "score": "0.5447118", "text": "private function isSecure(): bool\n {\n return Request::isSecure();\n }", "title": "" }, { "docid": "60498e7b96a8d2d3821444f36cd8141c", "score": "0.54447705", "text": "public function isDisableSSLValidation()\n {\n return $this->disableSSLValidation;\n }", "title": "" } ]
87846936179495e7e5762a78b804f9c4
Returns the value at specified offset. This method is executed when checking if offset is empty().
[ { "docid": "198e438861db4f1f292cfa820f0b3a75", "score": "0.76588655", "text": "public function offsetGet($offset)\n {\n return $this->__exists($offset) ? $this->__get($offset) : null;\n }", "title": "" } ]
[ { "docid": "1081fcf74a333145f91c736848a1d9f1", "score": "0.8216626", "text": "public function offsetGet(mixed $offset): mixed\n {\n return Arr::get($this->value, $offset);\n }", "title": "" }, { "docid": "0bbc9086b28db3df0c69fe977b438fd6", "score": "0.82028985", "text": "public function offsetGet($offset) {\n return $this->offsetExists($offset) ? $this->data[$offset] : NULL;\n }", "title": "" }, { "docid": "dc06663c356310c05978ac63e03aee3f", "score": "0.8152992", "text": "public function offsetGet($offset): mixed;", "title": "" }, { "docid": "cca74d0be7f9b89947b3c1a162a36e29", "score": "0.8121034", "text": "#[\\ReturnTypeWillChange]\n\tpublic function offsetGet($offset)\n\t{\n\t\tif (isset($this->values[$offset]) || array_key_exists($offset, $this->values))\n\t\t{\n\t\t\treturn $this->values[$offset];\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "416846d35f723a755c1863b7e12907ed", "score": "0.8077078", "text": "public function offsetGet($offset) {\n $value = null;\n if ($this->offsetExists($offset)) {\n $value = $this->items[$offset];\n }\n return $value;\n }", "title": "" }, { "docid": "565d0f4a5f6bc739dfb0fb67ff481d93", "score": "0.8076084", "text": "public function offsetGet($offset) {\n return isset($this->data[$offset]) ? $this->data[$offset] : null;\n }", "title": "" }, { "docid": "b4480fd59fa16e3994f8dfbfe447862a", "score": "0.8029919", "text": "public function __get($offset) {\n \tif (isset($this->data[$offset])) {\n \t\treturn $this->data[$offset];\n \t}\n }", "title": "" }, { "docid": "5cd7bb11908d5288cd13ca87fd0147bd", "score": "0.80288637", "text": "public function offsetGet($offset) : mixed {\n\t\t#If the key is found include into the array of used data.\n\t\t#This allows Spitfire to generate canonicals for you adequately.\n\t\tif (isset($this->data[$offset]) && !in_array($offset, $this->used)) {\t\n\t\t\t$this->used[] = $offset;\n\t\t}\n\t\t\n\t\treturn array_key_exists($offset, $this->data)? $this->data[$offset] : null;\n\t}", "title": "" }, { "docid": "5e275be1c74fe954dc8ef6da556f8494", "score": "0.8020138", "text": "public function offsetGet($offset)\n {\n return isset($this->data[$offset]) ? $this->data[$offset] : null;\n }", "title": "" }, { "docid": "2c2e1cacc5168b973ccf292d12eb407e", "score": "0.79873025", "text": "public abstract function value($offset = 0);", "title": "" }, { "docid": "8d98b6e4b4c62382e19a6bd65230037e", "score": "0.79603744", "text": "public function offsetGet($offset) {\n return $this->offsetExists($offset) ? $this->data[$offset] : null;\n }", "title": "" }, { "docid": "1c24061a2233e24db9b64eb343151993", "score": "0.79428697", "text": "public function offsetGet($offset);", "title": "" }, { "docid": "e29f53ae47c69574827f717e21faa234", "score": "0.7919577", "text": "public function offsetGet($offset) {\n return $this->offsetExists($offset) ? current($this->_data)[$offset] : null;\n }", "title": "" }, { "docid": "d7ff33acc1bb7df2b74d574ddd5c8048", "score": "0.7874837", "text": "public function offsetGet($offset)\n\t{\n\t\t$data = $this->getData();\n\t\treturn $data[$offset];\n\t}", "title": "" }, { "docid": "d5432e0db134836b57c781ff40f3ce2d", "score": "0.78733665", "text": "public function offsetGet($offset)\n {\n return $this->offsetExists($offset) ? $this->data[$offset] : null;\n }", "title": "" }, { "docid": "d5432e0db134836b57c781ff40f3ce2d", "score": "0.78733665", "text": "public function offsetGet($offset)\n {\n return $this->offsetExists($offset) ? $this->data[$offset] : null;\n }", "title": "" }, { "docid": "d1efd999a963c4e934f2b6885da8bad9", "score": "0.78657037", "text": "public function offsetGet($offset)\n {\n return $this->data[$offset];\n }", "title": "" }, { "docid": "d1efd999a963c4e934f2b6885da8bad9", "score": "0.78657037", "text": "public function offsetGet($offset)\n {\n return $this->data[$offset];\n }", "title": "" }, { "docid": "8747c0f614212a6f4b411c3d8e1fdc5e", "score": "0.7860937", "text": "public function offsetGet ( $offset){\n return $this->get($offset);\n }", "title": "" }, { "docid": "9f130a8afec8e4bce168efda02970a5f", "score": "0.7855962", "text": "public function offsetGet($_offset)\n {\n return parent::offsetGet($_offset);\n }", "title": "" }, { "docid": "4d1a74285b6f121b79eae87609277453", "score": "0.7830618", "text": "public function &offsetGet($offset){\n if( !is_null($this->$offset) ){\n $value = &$this->$offset;\n }else{\n $value = null;\n }\n return $value;\n }", "title": "" }, { "docid": "eb94ecf11133ece81730c4a54a832895", "score": "0.78163064", "text": "public function offsetGet($offset): mixed\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "54ab104ce2e7689428a993e7b40d5365", "score": "0.77974695", "text": "public function &offsetGet($offset)\r\n {\r\n return $this->data[$offset];\r\n }", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "d6be0daa0948040ac82f3ffe98bafc76", "score": "0.77939683", "text": "public function offsetGet($_offset)\n\t{\n\t\treturn parent::offsetGet($_offset);\n\t}", "title": "" }, { "docid": "73446dd548c403e093a1ce5b33986ac6", "score": "0.77882594", "text": "public function get($offset);", "title": "" }, { "docid": "d19f9ec9a246ea8ff3601d6569c7dfe5", "score": "0.7776698", "text": "public function offsetGet($offset)\n {\n return $this->__get($offset);\n }", "title": "" }, { "docid": "bc11912bf55a3fd1924cc9853237a8f7", "score": "0.77590877", "text": "public function offsetGet($offset)\n {\n return $this->elements[$offset];\n }", "title": "" }, { "docid": "9195f682e3d1f827b2237a769b908ddc", "score": "0.77422345", "text": "public function getValueAt($offset) {\n return $this->get(self::VALUE, $offset);\n }", "title": "" }, { "docid": "1736ed75016aa3f1565198fc76a95251", "score": "0.77106464", "text": "public function offsetGet($offset) {\n return $this->offsetExists($offset) ? $this->aData[$offset] : null;\n }", "title": "" }, { "docid": "f84298805c3a6db0b39d830e7e5dab13", "score": "0.76970434", "text": "public function offsetGet($offset)\n {\n return $this->item[$offset];\n }", "title": "" }, { "docid": "5de82b212b012c877d71aed292ebcfc8", "score": "0.7686434", "text": "public function offsetGet($offset)\n {\n $index = $this->getKeyIndex($offset);\n\n if ($index >= 0) {\n return $this->values[$index];\n }\n\n return null;\n }", "title": "" }, { "docid": "f02b9a9b48b65da1aa39ab89a4d22028", "score": "0.7673191", "text": "public function offsetGet($offset)\n {\n return $this->array[$offset];\n }", "title": "" }, { "docid": "2dac6831e94fdb9007e1b3fb22817a05", "score": "0.7670394", "text": "public function offsetGet($offset) {\n return $this->get($offset);\n }", "title": "" }, { "docid": "2dac6831e94fdb9007e1b3fb22817a05", "score": "0.7670394", "text": "public function offsetGet($offset) {\n return $this->get($offset);\n }", "title": "" }, { "docid": "8abdcb8de5e959ea5ad8ccc1b54039c5", "score": "0.7668912", "text": "public function offsetGet($offset)\n {\n return $this->__get($offset);\n }", "title": "" }, { "docid": "8abdcb8de5e959ea5ad8ccc1b54039c5", "score": "0.7668912", "text": "public function offsetGet($offset)\n {\n return $this->__get($offset);\n }", "title": "" }, { "docid": "8abdcb8de5e959ea5ad8ccc1b54039c5", "score": "0.7668912", "text": "public function offsetGet($offset)\n {\n return $this->__get($offset);\n }", "title": "" }, { "docid": "5e0cd0b2e7e3c836c6d8caa1ba1cccfb", "score": "0.76652974", "text": "public function offsetGet(mixed $offset): mixed\n {\n if (array_key_exists($offset, $this->items)) {\n return $this->items[$offset];\n }\n return null;\n }", "title": "" }, { "docid": "cf0d5e2bfecd6ca1984cc76904d49514", "score": "0.765757", "text": "public function offsetGet($offset) {\n return isset($this->userData[$offset]) ? $this->userData[$offset] : null;\n }", "title": "" }, { "docid": "710daf181926b327ba3d81ea51a5a1e3", "score": "0.7645373", "text": "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "title": "" }, { "docid": "cabba0a6af6658efe1543908976a1a70", "score": "0.7641803", "text": "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n return $this->__get($offset);\n }", "title": "" }, { "docid": "3f3bad7d68531812c3c93e7a8adf4e7f", "score": "0.76278293", "text": "public function offsetGet ($offset) {\n return $this->__fields[$offset]['data'];\n }", "title": "" }, { "docid": "3a525601770e4c7a2bfd115747e07380", "score": "0.76261634", "text": "public function offsetGet(mixed $offset)\n {\n }", "title": "" }, { "docid": "24241531b45b0a8cfa0831aa5a9adfae", "score": "0.7622365", "text": "public function offsetGet($offset) {\n // TODO: Implement offsetGet() method.\n }", "title": "" }, { "docid": "24241531b45b0a8cfa0831aa5a9adfae", "score": "0.7622365", "text": "public function offsetGet($offset) {\n // TODO: Implement offsetGet() method.\n }", "title": "" }, { "docid": "c66c3e2fe1d30e43fada1639aaf04e84", "score": "0.76020586", "text": "public function offsetGet($offset)\n {\n return $this->part($offset);\n }", "title": "" }, { "docid": "98152467c9b38a391c5915d689f56a7d", "score": "0.7595013", "text": "public function offsetGet($offset)\n {\n return (isset($this->row[$offset]) ? $this->row[$offset] : null);\n }", "title": "" }, { "docid": "79e12b3cb3b0624d336393aad591489e", "score": "0.7590032", "text": "public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "79e12b3cb3b0624d336393aad591489e", "score": "0.7590032", "text": "public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "79e12b3cb3b0624d336393aad591489e", "score": "0.7590032", "text": "public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "5f38beece8dba7c28f54c5b612591b59", "score": "0.7588313", "text": "public function offsetGet($offset)\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "36674c069f948ff5df7c90a03c079432", "score": "0.75763565", "text": "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "title": "" }, { "docid": "36674c069f948ff5df7c90a03c079432", "score": "0.75763565", "text": "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "title": "" }, { "docid": "36674c069f948ff5df7c90a03c079432", "score": "0.75763565", "text": "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "title": "" }, { "docid": "36674c069f948ff5df7c90a03c079432", "score": "0.75763565", "text": "public function offsetGet($offset)\n {\n return $this->$offset;\n }", "title": "" }, { "docid": "53c7967f100aef322e9165d7f5ac3b37", "score": "0.75675344", "text": "public function offsetGet($offset)\n {\n $value = $this->db->querySingle('SELECT value FROM cache WHERE key = \"'.$offset.'\"');\n if ($value === false || $value === null) {\n return null;\n }\n\n return unserialize($value);\n }", "title": "" }, { "docid": "aecadcfe4442e2d5f995fa5b320a6a9f", "score": "0.7567024", "text": "public function offsetGet($offset)\n\t{\n return $this->$offset;\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "dc984f46834cb8c739af0ed3f0c914f8", "score": "0.7529817", "text": "public function offsetGet($offset)\n {\n return $this->get($offset);\n }", "title": "" }, { "docid": "03c60afc15b5e02d7e7b65080d36c9ba", "score": "0.7524602", "text": "public function &offsetGet($offset)\n {\n $data = & $this->getData();\n return $data[$offset];\n }", "title": "" }, { "docid": "fbc31d11ff8458ff6d2a4ea89f066bb9", "score": "0.7502115", "text": "public function offsetGet($offset)\n {\n return $this->query[$offset];\n }", "title": "" }, { "docid": "60ec0ffaf26f9e2538c7874f33ddfeba", "score": "0.7477202", "text": "public function offsetGet($offset)\n {\n // TODO: Implement offsetGet() method.\n return Arr::get($this->toArray(), $offset);\n }", "title": "" }, { "docid": "aea6e716728d73ce7fd78e67eb3e2495", "score": "0.747683", "text": "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "aea6e716728d73ce7fd78e67eb3e2495", "score": "0.747683", "text": "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "aea6e716728d73ce7fd78e67eb3e2495", "score": "0.747683", "text": "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "title": "" }, { "docid": "aea6e716728d73ce7fd78e67eb3e2495", "score": "0.747492", "text": "#[\\ReturnTypeWillChange]\n public function offsetGet($offset)\n {\n }", "title": "" } ]
cd33496330ab09674f8baddaa0b62eab
Retrieves an AnalyzedClass by its fully qualified namespace.
[ { "docid": "790a4b3bd4029a710fbb6c72c0d314b0", "score": "0.6203198", "text": "public function getClass(string $fqcn): AnalyzedClass\n {\n foreach ($this->shared_classes as $class) {\n if ($class->getFqcn() === $fqcn) {\n return $class;\n }\n }\n\n throw new EntryNotFoundException(sprintf(\"Class '%s' does not exist in the collection.\", $fqcn));\n }", "title": "" } ]
[ { "docid": "8e4c19bd3bb989cfe73dc7ffc743a001", "score": "0.61801046", "text": "public static function classNamespace($class)\n {\n $parts = static::parseClass($class);\n\n return $parts[0];\n }", "title": "" }, { "docid": "5601dd611f6fc3abe8c47ce0cf66d29b", "score": "0.60563684", "text": "public function getDeclaringClass()\n\t{\n\t\t$className = $this->reflection->getDeclaringClassName();\n\t\treturn null === $className ? null : self::$parsedClasses[$className];\n\t}", "title": "" }, { "docid": "832fae0cf0457dc1f6d19187591b8b83", "score": "0.60260046", "text": "public function getDeclaringClass(){}", "title": "" }, { "docid": "497d1900e413d8a1d1019cd2fb507221", "score": "0.5936441", "text": "public function getDeclaringClass();", "title": "" }, { "docid": "5310015292e12152298b6d0d1eca984d", "score": "0.5865577", "text": "public function getFullClassName();", "title": "" }, { "docid": "a8e44a29f41e7fc56533a5414ae94949", "score": "0.5845682", "text": "private function getNonNamespacedCalledClass()\n\t{\n\t\treturn ClassHelper::getNonNamespacedClass(get_called_class());\n\t}", "title": "" }, { "docid": "de36673535ec019d7dfc822406a01ee4", "score": "0.5832559", "text": "public function getNamespace() {\n\n\t\treturn new ReflectionClassNamespace($this);\n\t}", "title": "" }, { "docid": "8df53ecf69e3d5644f106dccced4bcea", "score": "0.5801893", "text": "function papi_get_class_name( $file ) {\n\tif ( ! is_string( $file ) ) {\n\t\treturn '';\n\t}\n\n\t$content = file_get_contents( $file );\n\t$tokens = token_get_all( $content );\n\t$class_name = '';\n\t$namespace_name = '';\n\t$i = 0;\n\t$len = count( $tokens );\n\n\tfor ( ; $i < $len;$i++ ) {\n\t\tif ( $tokens[$i][0] === T_NAMESPACE ) {\n\t\t\tfor ( $j = $i + 1; $j < $len; $j++ ) {\n\t\t\t\tif ( $tokens[$j][0] === T_STRING ) {\n\t\t\t\t\t $namespace_name .= '\\\\' . $tokens[$j][1];\n\t\t\t\t} else if ( $tokens[$j] === '{' || $tokens[$j] === ';' ) {\n\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $tokens[$i][0] === T_CLASS ) {\n\t\t\tfor ( $j = $i + 1; $j < $len; $j++ ) {\n\t\t\t\tif ( $tokens[$j] === '{' ) {\n\t\t\t\t\t$class_name = $tokens[$i + 2][1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( empty( $namespace_name ) ) {\n\t\treturn $class_name;\n\t}\n\n\treturn $namespace_name . '\\\\' . $class_name;\n}", "title": "" }, { "docid": "12f559a0c07e26759c5aab1b8c6e91f5", "score": "0.5767933", "text": "private function findClass(string $fqcn): AnalyzedClass\n {\n foreach ($this->analyzed_functions as $analyzed_function) {\n if ($fqcn === $analyzed_function->getClass()->getFqcn()) {\n return $analyzed_function->getClass();\n }\n }\n\n throw new EntryNotFoundException(sprintf('Class %s does not exist', $fqcn));\n }", "title": "" }, { "docid": "cc3090785752743ea411ca3e455d010f", "score": "0.5714803", "text": "function find_class($ns, $class) {\n\t$class = ltrim($class, '\\\\');\n\t$ns = rtrim($ns, '\\\\');\n\t$full_class = preg_replace('~(\\\\\\\\)+~', '\\\\', $ns . '\\\\' . $class);\n\n\twhile (!class_exists($full_class)) {\n\t\tif (strlen($ns)) {\n\t\t\t$ns_a = explode('\\\\', $ns);\n\t\t\tarray_pop($ns_a);\n\t\t\t$ns = implode('\\\\', $ns_a);\n\t\t\t$full_class = preg_replace('~(\\\\\\\\)+~', '\\\\', $ns . '\\\\' . $class);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn $full_class;\n}", "title": "" }, { "docid": "8d72f6b9a928f8eaa84fe2d2ac60b710", "score": "0.5704895", "text": "protected function resolveNamespace()\n {\n if(isset($this->namespace))\n {\n return $this->namespace;\n }\n\n $reflection = new \\ReflectionClass($this);\n return $this->namespace = $reflection->getNamespaceName();\n }", "title": "" }, { "docid": "bfc99d9dca3e35c099483cb8559d6976", "score": "0.56807756", "text": "public function getClass()\n {\n try {\n $class = parent::getClass();\n } catch (\\Exception $e) {\n return null;\n }\n return is_object($class) ? new ClassReflection($class->getName()) : null;\n }", "title": "" }, { "docid": "248a50f89eb1b7b05d9b4e1c417d5bc1", "score": "0.567262", "text": "public static function getClazz($_with_namespace=FALSE) {\n $clazz = str_replace('\\\\','',substr('\\\\' . get_called_class(), strrpos(get_called_class(), '\\\\')+1));\n return $_with_namespace ? get_called_class() : $clazz;\n }", "title": "" }, { "docid": "d62c273900aa2b3ef053237fcddf83d3", "score": "0.55777377", "text": "public function getNamespace()\n {\n $class = get_class($this);\n\n return substr($class, 0, strrpos($class, '\\\\'));\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "72d5de9475eecdc20f5db4db8248708f", "score": "0.5550636", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "68ce6a22b6e809e1608e1c825f59e3fc", "score": "0.5549419", "text": "public function testWhenExtendsAClassWithRootNamespaceThenGetExtendedClassNameInResponse()\n {\n $response = Importer::getClassDetails($this->contents[4]);\n static::assertEquals('\\elements\\assets\\CountryA', $response->extendsAlias);\n }", "title": "" }, { "docid": "f4270c5304c9865a747a891c4caf731a", "score": "0.5533864", "text": "public function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "6bae16d2e3db570e2e081e026c93ed9a", "score": "0.55279356", "text": "public function getClass()\r\n {\r\n return $this->class;\r\n }", "title": "" }, { "docid": "2d4bdc43c37dc12b1dc24cb478dca4a0", "score": "0.5507028", "text": "public function testWhenExtendsAClassWithNamespacesThenGetExtendedClassNameInResponse()\n {\n $response = Importer::getClassDetails($this->contents[3]);\n\n static::assertEquals('Country', $response->className);\n static::assertEquals('assets\\CountryA', $response->extendsAlias);\n }", "title": "" }, { "docid": "66f64523f5eca3c97ab8b7903f393e07", "score": "0.55005383", "text": "public function getDeclaringClassName();", "title": "" }, { "docid": "868cdb169b4e024510c12e909119b4dd", "score": "0.54999113", "text": "public function getDeclaringClass()\n\t{\n\t\tif (null === $this->declaringClassName) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->getBroker()->getClass($this->declaringClassName);\n\t}", "title": "" }, { "docid": "2b077b86a377a825a3195ea908909251", "score": "0.54951006", "text": "public function getRootClass()\n {\n return $this->getClass(self::ROOT_CLASS);\n }", "title": "" }, { "docid": "5fb8ec58987f30d80bf3c3acfd86ad31", "score": "0.5477668", "text": "function getClassName($fullClassName)\n{\n $pos = 0;\n $offset = 1;\n while($pos = strpos($fullClassName, '\\\\', $offset))\n {\n $offset = $pos + 1;\n }\n if($offset != 1) {\n return substr($fullClassName, $offset);\n } else {\n return $fullClassName;\n }\n}", "title": "" }, { "docid": "afccca290e178fe7ff0d828d682178af", "score": "0.5477206", "text": "public static function getClassByFile(string $fileOrAlias, bool $shortName = false): ?string\n {\n $path = \\Yii::getAlias($fileOrAlias, false);\n if ($path === false || !\\file_exists($path)) {\n return null;\n }\n $code = file_get_contents($path);\n $tokens = PhpToken::tokenize($code);\n unset($code, $path);\n\n $namespace = '';\n if ($shortName) {\n foreach ($tokens as $index => $token) {\n if ($token->is(T_CLASS)) {\n return $tokens[$index + 2]->text;\n }\n }\n } else {\n foreach ($tokens as $index => $token) {\n if ($token->is([T_NAMESPACE, T_NS_SEPARATOR, T_CLASS])) {\n $index += $token->id === T_NS_SEPARATOR ? 1 : 2;\n if ($token->id === T_CLASS) {\n return $namespace . $tokens[$index]->text;\n }\n $namespace .= $tokens[$index]->text . '\\\\';\n }\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "f1b47e9b2d0cd4b75af50106e2374a71", "score": "0.5454243", "text": "protected function _namespace() {\n\t\treturn substr(get_class($this), 0, strrpos(get_class($this), '\\\\'));\n\t}", "title": "" }, { "docid": "1e19c32628c38545e41777e16cfe595e", "score": "0.54398346", "text": "public function getRealClass(string $class) : string;", "title": "" }, { "docid": "40f4b52ff38c6762c71f70ebe4e84c2e", "score": "0.5429503", "text": "public function getClass()\n\t\t{\n\t\t\treturn $this->class;\n\t\t}", "title": "" }, { "docid": "5340faa6fcc088c25019bb2bcf368240", "score": "0.5412974", "text": "public static function getClassNamespace($classOrObject): string\n {\n return (new ReflectionClass($classOrObject))->getNamespaceName();\n }", "title": "" }, { "docid": "45fb6cd828cb9d9b575f03dafa18c39c", "score": "0.5391368", "text": "public function getDeclaringClass() {\n return new XPClass($this->_reflect->getDeclaringClass());\n }", "title": "" }, { "docid": "6f8649757acad833a2819e91171b2256", "score": "0.5389913", "text": "protected static function getClass($alias)\n {\n if (array_key_exists($alias, self::$filters)) {\n return self::$filters[$alias];\n }\n\n if (!class_exists($alias)) {\n throw new InvalidArgumentException(\n \"Class {$alias} does not exists.\"\n );\n }\n return $alias;\n }", "title": "" }, { "docid": "2711e9e7c43163f248d7aef5d063e7ea", "score": "0.5376934", "text": "public function findClass($class) {\n $this->init();\n\n $fullQualifiedNamespace = $this->trimNamespace($class);\n\n foreach ($this->localCache as $phpClass) {\n if ($fullQualifiedNamespace === $phpClass->getFullQualifiedNamespace()) {\n return $phpClass;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "3d0779412f3cf7063ddc0cece297a074", "score": "0.5367602", "text": "function getClassViaPath($path)\n{\n $class = getSourcePath($path);\n\n if ('php' !== strtolower((string)pathinfo($class, PATHINFO_EXTENSION))) {\n return null;\n }\n\n $class = pathinfo($class, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . pathinfo($class, PATHINFO_FILENAME);\n\n $class = implode(\n '\\\\',\n array_filter(\n array_merge(\n [NAMESPACE_PREFIX],\n explode('/', str_replace('\\\\', '/', $class))\n ),\n function ($value) {\n return '' !== (string)$value;\n }\n )\n );\n\n try {\n return new \\ReflectionClass($class);\n } catch (\\Exception $e) {\n } catch (\\Throwable $e) {\n }\n\n return null;\n}", "title": "" }, { "docid": "c6cf3b2d44e4a1f999426b351a0623b0", "score": "0.53650916", "text": "protected function getClass()\n {\n return $this->class;\n }", "title": "" }, { "docid": "685b742d0f8479bd9b3456dc82209243", "score": "0.5363418", "text": "private function getFromRegisteredNamespace($strClass)\n {\n if (false !== $separatorPosition = strpos($strClass, '\\\\'))\n {\n $namespace = substr($strClass, 0, $separatorPosition);\n\n // exit if namespace is not in array of registered namespaces\n if (!array_key_exists($namespace,$this->namespaces)) {\n return false;\n }\n\n $className = substr($strClass, $separatorPosition + 1);\n\n // if Classname has a sub-namespace\n if (strpos($className,'\\\\') !== false) {\n $className = str_replace('\\\\',DIRECTORY_SEPARATOR,$className);\n }\n\n // loop through registered dirs\n foreach ($this->namespaces[$namespace] as $dir) {\n\n foreach ($this->classExtensions as $extension) {\n $file = $dir.DIRECTORY_SEPARATOR.$className.'.'.$extension;\n if (is_file($file)) {\n return $this->classMap[$strClass] = $file;\n }\n }\n\n }\n }\n return false;\n }", "title": "" }, { "docid": "a72f4ffb2ee98149ccded564977089d7", "score": "0.5362049", "text": "public static function getSubNamespaceClassName(): string\n {\n return static::getSubNamespace();\n }", "title": "" }, { "docid": "5de50585eb021f17ccefd67a38a37d54", "score": "0.5359703", "text": "public static function getClass() {\n\t\treturn get_called_class();\n\t}", "title": "" }, { "docid": "aa17da966a54d88a30464cf20c41b2fd", "score": "0.53473693", "text": "public function getDeclaringClass()\n {\n return $this->clazz;\n }", "title": "" }, { "docid": "c3515022b8e085dca6808e669b762ccd", "score": "0.53426653", "text": "static public function getClass()\n\t{\n\t\treturn 'Journey\\Collector';\n\t}", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.533573", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d3ba9d40e288ed33c0e40deced7902cb", "score": "0.533573", "text": "public function getClass(): string\n {\n return $this->class;\n }", "title": "" }, { "docid": "d1af137f066acac8bcd37750d6783987", "score": "0.531821", "text": "public function getRootClass(): string;", "title": "" }, { "docid": "7167a2040f009b8dfdfc01db9792b422", "score": "0.53078604", "text": "function getClass()\n {\n return $this->target->getClass();\n }", "title": "" }, { "docid": "68ba5c609e060b754502f92926ff358c", "score": "0.53068286", "text": "function wprss_get_namespace($class, $depth = null, $asString = false)\n {\n $ns = '\\\\';\n\n // Can accept an instance\n if (is_object($class)) {\n $class = get_class($class);\n }\n\n $namespace = explode($ns, (string) $class);\n\n // This was a root class name, no namespace\n array_pop($namespace);\n if (!count($namespace)) {\n return null;\n }\n\n $namespace = array_slice($namespace, 0, $depth);\n\n return $asString ? implode($ns, $namespace) : $namespace;\n }", "title": "" }, { "docid": "cac2a7600e81d7b30b47543c2cf1740a", "score": "0.52986604", "text": "public static function getClass(): string;", "title": "" }, { "docid": "c6f6c75d058b17dc8b7a422a01e6ab8f", "score": "0.5291187", "text": "protected static function getDocumentClass()\n {\n return get_called_class();\n }", "title": "" }, { "docid": "3878db686defae1837e4f916e5e6de6a", "score": "0.52878857", "text": "abstract protected function getSearchClass();", "title": "" }, { "docid": "7cf080c9df6443d0348cdb0c1353d80d", "score": "0.5285206", "text": "public static function sgetClass()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "7cf080c9df6443d0348cdb0c1353d80d", "score": "0.5285206", "text": "public static function sgetClass()\n {\n return __CLASS__;\n }", "title": "" }, { "docid": "07e07fe8e373130d8d298b93894ae9bc", "score": "0.52805144", "text": "public function findByNamespace($namespace)\n {\n return $this->where('namespace', $namespace)->first();\n }", "title": "" }, { "docid": "bb57b5a1047f1bc7e35f7a4a694cb6fd", "score": "0.5273456", "text": "protected function removeNamespace($class) {\n\t\t$name = strrchr($class, '\\\\');\n\n\t\tif (!$name) {\n\t\t\treturn $class;\n\t\t}\n\t\telse {\n\t\t\treturn substr($name, 1);\n\t\t}\n\t}", "title": "" }, { "docid": "73f2f0e89eb9045e83fd71d09e75a1ee", "score": "0.5261743", "text": "public static function getClassName() {\n return substr(strrchr(get_called_class(), '\\\\'), 1);\n }", "title": "" }, { "docid": "41c252c8ff220972794bfd9baf67f5b7", "score": "0.52423334", "text": "public function getClass(): string;", "title": "" }, { "docid": "fd007a4d3fcd8f6b0a60478784cb02eb", "score": "0.52421474", "text": "protected function getClassSource()\n {\n return new \\ReflectionClass($this);\n }", "title": "" }, { "docid": "7253968a50a32b983e5babf606cc88c1", "score": "0.5236863", "text": "public static function getNamespacedClass($className)\r\n {\r\n return static::getNamespace( get_called_class() ) . '\\\\' . $className;\r\n }", "title": "" }, { "docid": "c9521041d2a09e79f4426357ba29b002", "score": "0.52356815", "text": "public function getClass() : string\n {\n return $this->class;\n }", "title": "" }, { "docid": "c23159fa213096aadc44d13dc2a89774", "score": "0.5230139", "text": "public function get_class()\n {\n $class = lcfirst($this->class);\n if (ends_with($class, '_page')) {\n $class = substr($class, 0, 0 - strlen('_page'));\n }\n\n return $class;\n }", "title": "" }, { "docid": "87e34f8c4c1380bf91db79ecd879fd62", "score": "0.5215329", "text": "private function getClassForFile($file)\n {\n // Open a file pointer to the file\n $fp = fopen($file, 'r');\n\n // Initialise some variables\n $class = $namespace = $buffer = '';\n $i = 0;\n\n // Loop through each line of the file until a class is found\n while (!$class) {\n // If we reach the end of the file then exit the loop\n if (feof($fp)) {\n break;\n }\n\n // Read a portion from the file and append it to the buffer\n $buffer .= fread($fp, 512);\n\n // Scan the file for tokens\n //\n // We suppress errors here, as we expect errors because we are\n // only parsing a portion of the file at a time\n $tokens = @token_get_all($buffer);\n\n // Don't bother trying to parse the output until we\n // can see an opening curly brace\n if (strpos($buffer, '{') === false) {\n continue;\n }\n\n // Loop through each of the found tokens\n for (;$i < count($tokens);$i++) {\n // Check if the namespace keyword has been found yet\n if ($tokens[$i][0] === T_NAMESPACE) {\n // Continue looping through the found tokens\n for ($j = $i + 1;$j < count($tokens); $j++) {\n // A string immediately after the namespace keyword\n // is the name of the namespace\n if ($tokens[$j][0] === T_STRING) {\n // Add each section of the namespace to\n // our predefined variable\n $namespace .= '\\\\'.$tokens[$j][1];\n } elseif ($tokens[$j] === '{' || $tokens[$j] === ';') {\n // If we reach a curly brace or a semicolon\n // we've got the full namespace\n break;\n }\n }\n }\n\n // Check if the class keyword has been found yet\n if ($tokens[$i][0] === T_CLASS) {\n // Continue looping through the found tokens\n for ($j = $i + 1;$j < count($tokens);$j++) {\n // When we reach the curly brace, store the\n // class name in the predefined variable\n if ($tokens[$j] === '{') {\n $class = $tokens[$i + 2][1];\n }\n }\n }\n }\n }\n\n // If no class is found, return null\n if (!$class) {\n return;\n }\n\n // Return the fully-qualified class name\n return Str::namespaced(\"$namespace\\\\$class\");\n }", "title": "" }, { "docid": "64eddad0acd28c9ca162e540b5787f61", "score": "0.52131164", "text": "function fetch_class()\r\n\t{\r\n\t\t// class to error and method to error_404\r\n\t\t$this->check_method();\r\n \r\n\t\treturn $this->class;\r\n\t}", "title": "" }, { "docid": "2d7a3dc0ff5aaf96af6613ce6c1bab66", "score": "0.5206515", "text": "public function getClass(): string\n\t{\n\t\treturn $this->class;\n\t}", "title": "" }, { "docid": "d456b0e0be768e4963b71dcb0f4355e8", "score": "0.52064496", "text": "private function _getNamespace()\n {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }", "title": "" }, { "docid": "d1a3f8a7d01cbaedd08865f102a26571", "score": "0.5201125", "text": "public function getDeclaringClass()\n {\n return new ClassReflection(parent::getDeclaringClass()->getName());\n }", "title": "" }, { "docid": "86df8b371aad5a28386a0f1d0700977b", "score": "0.51856804", "text": "public function load($className)\n {\n $this->_classFilename = $className . '.php';\n $this->_includePaths = explode(PATH_SEPARATOR, get_include_path());\n $classFound = null;\n\n if(strpos($this->_classFilename, '\\\\') !== false)\n {\n $classFound = $this->searchForBackslashNamespacedClass();\n }\n elseif(strpos($this->_classFilename, '_') !== false)\n {\n $classFound = $this->searchForUnderscoreNamespacedClass();\n }\n else\n {\n $classFound = $this->searchForNonNamespacedClass();\n }\n\n return $classFound;\n }", "title": "" }, { "docid": "899649163eb64ff15cc19099009146e7", "score": "0.5184407", "text": "protected function getClass($name)\n {\n return $this->app['config'][\"graphql.schemas.{$name}\"];\n }", "title": "" }, { "docid": "7e1eb2a808a13e81ee44e4391a2148f6", "score": "0.5177332", "text": "private function getCalledClass()\n {\n $class = get_called_class();\n\n return substr($class, (strrpos($class, '\\\\') + 1));\n }", "title": "" }, { "docid": "59fe38cf4d629c6b55ea59f5cd7776b5", "score": "0.51759756", "text": "protected function getClass()\n {\n if (false !== strpos($this->class, ':')) {\n $this->class = $this->objectManager->getClassMetadata($this->class)->getName();\n }\n\n return $this->class;\n }", "title": "" }, { "docid": "6cefdef22bb80465d700378f2a1e9fe4", "score": "0.5170606", "text": "public static function searchNamespace()\n\t{\n\t\t$searchNamespace = 'course';\n\t\treturn $searchNamespace;\n\t}", "title": "" }, { "docid": "a00317ed9e88be7edebb61327ac9dc73", "score": "0.5168444", "text": "public static function searchNamespace();", "title": "" }, { "docid": "4e1d64390a01614a800872a850411226", "score": "0.5167872", "text": "public function __getClassName();", "title": "" }, { "docid": "0a16534fc6e91ec76be07fc15b54fcb7", "score": "0.5165809", "text": "function find_class($node, $namespace, $nmap) {\n\tglobal $classes;\n\n\tif(!($node instanceof \\ast\\Node) || $node->kind != \\ast\\AST_NAME) {\n\t\tLog::err(Log::EFATAL, \"BUG: Bad node passed to find_class\");\n\t\treturn null;\n\t}\n\t$name = strtolower(var_name($node->children[0]));\n\tif(empty($name)) return null;\n\n\tif($node->flags & \\ast\\flags\\NAME_NOT_FQ) {\n\t\tif(!empty($nmap[$name])) {\n\t\t\tif(!empty($classes[strtolower($nmap[$name] )])) {\n\t\t\t\treturn $classes[strtolower($nmap[$name])];\n\t\t\t}\n\t\t}\n\t\tif(!empty($classes[$namespace.$name])) {\n\t\t\treturn $classes[$namespace.$name];\n\t\t}\n\t} else {\n\t\tif(empty($classes[$name])) {\n\t\t\treturn null;\n\t\t} else return $classes[$name];\n\t}\n\treturn null;\n}", "title": "" }, { "docid": "2f65aa3ec444d02fd89655e03e062b1b", "score": "0.5161035", "text": "public function getClassName(): string\n {\n return $this->metadata->getName();\n }", "title": "" }, { "docid": "f1978092c98a5e457c384e40c1e8d350", "score": "0.5159764", "text": "function getRuleClass() {\n\n $name = $this->getRuleClassName();\n if ($name != '') {\n return new $name ();\n }\n return null;\n }", "title": "" }, { "docid": "14c2b0d1a50d29d92d9ce6a12c110abb", "score": "0.5158223", "text": "public function getDeclaringClass()\n {\n return $this->_declaringClass;\n }", "title": "" }, { "docid": "93513d64eccc2f5c8c7f82bf748c840c", "score": "0.51494056", "text": "protected static function getOnlyClassName()\n {\n return Classes::onlyName(__CLASS__);\n }", "title": "" }, { "docid": "af8b70f7685ee03c740e6ddeb9524ac0", "score": "0.5144561", "text": "public function getClass(){}", "title": "" }, { "docid": "ecd4582dd3331f5f65f050902c0e3c77", "score": "0.5141579", "text": "public static function getHandlerClass()\r\n {\r\n $config = static::getHandlerConfig();\r\n return static::getNamespace( get_called_class() ) . '\\\\' . $config['class'];\r\n }", "title": "" }, { "docid": "e78e8b766c71bbce6dd6769319946251", "score": "0.5139628", "text": "public function getReflector()\n {\n return new \\ReflectionClass(get_called_class());\n }", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.5133045", "text": "public function getClassName(): string;", "title": "" }, { "docid": "de976041cee68b13cde39b973ade81bd", "score": "0.5133045", "text": "public function getClassName(): string;", "title": "" }, { "docid": "ead893f59fec818efddf046e28d92b43", "score": "0.5124797", "text": "function getClass(){\n\t\treturn $this->_class;\n\t}", "title": "" }, { "docid": "dae9e3cf7ba4ae9449b7f7378bc60d18", "score": "0.5120242", "text": "protected function getGeneratedClassNamespace(): string\n {\n $parts = explode('/', $this->name);\n\n // Remove classname.\n array_pop($parts);\n\n $relativeNamespace = count($parts)\n ? '\\\\' . implode('\\\\', $parts)\n : '';\n\n return $this->engine->getEngineNamespace(\n \"{$this->getTargetNamespace()}{$relativeNamespace}\"\n );\n }", "title": "" }, { "docid": "f3d4bad138d6e524acebbc3fa4eac98a", "score": "0.51129395", "text": "protected function get_class_name( $file ) {\n\t\tif ( ! is_string( $file ) || ! file_exists( $file ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$content = file_get_contents( $file );\n\t\t$tokens = token_get_all( $content );\n\t\t$class_name = '';\n\t\t$namespace_name = '';\n\t\t$i = 0;\n\t\t$len = count( $tokens );\n\n\t\tfor ( ; $i < $len; $i++ ) {\n\t\t\tif ( $tokens[$i][0] === T_NAMESPACE ) {\n\t\t\t\tfor ( $j = $i + 1; $j < $len; $j++ ) {\n\t\t\t\t\tif ( $tokens[$j][0] === T_STRING ) {\n\t\t\t\t\t\t $namespace_name .= '\\\\' . $tokens[$j][1];\n\t\t\t\t\t} else if ( $tokens[$j] === '{' || $tokens[$j] === ';' ) {\n\t\t\t\t\t\t break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $tokens[$i][0] === T_CLASS ) {\n\t\t\t\tfor ( $j = $i + 1; $j < $len; $j++ ) {\n\t\t\t\t\tif ( $tokens[$j] === '{' ) {\n\t\t\t\t\t\t$class_name = $tokens[$i + 2][1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $class_name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( empty( $namespace_name ) ) {\n\t\t\treturn $class_name;\n\t\t}\n\n\t\treturn $namespace_name . '\\\\' . $class_name;\n\t}", "title": "" }, { "docid": "34e03da8c91b682948941cff388d2e6e", "score": "0.5111709", "text": "public function getClassType() {\n return explode(\"\\\\\",get_class($this->resource))[2];\n }", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.510351", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.510351", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.510351", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.510351", "text": "public function getClassName();", "title": "" }, { "docid": "e84582a35cb6efc276e1cc1d6aad8d07", "score": "0.510351", "text": "public function getClassName();", "title": "" }, { "docid": "6e7e9adaa6a1eb2a99e6e084d9519857", "score": "0.5099348", "text": "private function getClass($class)\n {\n return isset(self::$_classes[$class]) ? self::$_classes[$class] : null;\n }", "title": "" }, { "docid": "182c4cc8f3b11271f4af87bc54ea0327", "score": "0.5094109", "text": "public function loadClass($class) {\n\t\t\n\t\t// Check for direct file registration - a bit faster than searching in a sub folder\n\t\tif (isset($this->files[$class]) && $this->requireFile($this->files[$class])) {\n\t\t\treturn $this->files[$class];\n\t\t}\n\t\t\n\t\t// the current namespace prefix\n\t\t$prefix = $class;\n\t\t\n\t\t// work backwards through the namespace names of the fully-qualified\n\t\t// class name to find a mapped file name\n\t\twhile (false !== ($position = strrpos($prefix, '\\\\'))) {\n\t\t\n\t\t\t// retain the trailing namespace separator in the prefix\n\t\t\t$prefix = substr($class, 0, $position + 1);\n\t\t\n\t\t\t// the rest is the relative class name\n\t\t\t$relative = substr($class, $position + 1);\n\t\t\n\t\t\t// try to load a mapped file for the prefix and relative class\n\t\t\t$filename = $this->loadFile($prefix, $relative);\n\t\t\tif ($filename) {\n\t\t\t\treturn $filename;\n\t\t\t}\n\t\t\n\t\t\t// remove the trailing namespace separator for the next iteration\n\t\t\t// of strrpos()\n\t\t\t$prefix = rtrim($prefix, '\\\\');\n\t\t}\n\t\t\n\t\t// never found a mapped file\n\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "1f093003ec15578b67a874bc063af93e", "score": "0.50726527", "text": "protected function getClassName(string $namespace) : string\n {\n\n return ( $this->namespaces[$namespace]['aliasName'] ?? 'UnknownClass' );\n }", "title": "" }, { "docid": "3246310548f1d997cfdb7c44cb8271fc", "score": "0.50724447", "text": "public function getForeignClass()\n {\n return $this->dataQuery->getQueryParam('Foreign.Class');\n }", "title": "" } ]
a5b6db904eae28908a22b05264044523
Display a listing of the resource, by newest release date.
[ { "docid": "4297794e1bb0b91faef0d83af3b79d65", "score": "0.6175111", "text": "public function latest()\n {\n $toDay = Carbon::today();\n $movies = movie::orderBy('release_date', 'desc')\n ->whereDate('release_date','<=', $toDay)\n ->select('movie_id','title','poster')\n ->get();\n\n return view('Movie.movieFilter')->with('movies', $movies);\n }", "title": "" } ]
[ { "docid": "e686ae8c439312031e21c858a21e7092", "score": "0.69095266", "text": "protected function listReleases()\r\n {\r\n\r\n /*\r\n * List all the posts, eager load their lifestyles\r\n */\r\n $isPublished = !$this->checkEditor();\r\n\r\n $releases = R::listFrontEnd([\r\n 'page' => $this->property('pageNumber'),\r\n 'sort' => $this->property('sortOrder'),\r\n 'perPage' => $this->property('releasesPerPage'),\r\n 'skip' => $this->property('skip'),\r\n \r\n 'paginate' => $this->property('paginate'),\r\n 'featured_only' => $this->property('featured_only'),\r\n 'categories' => array_map('trim',explode(\",\",$this->property('categories'))),\r\n 'search' => trim(input('search')),\r\n 'published' => $isPublished\r\n ]);\r\n\r\n /*\r\n * Add a \"url\" helper attribute for linking to each post and lifestyle\r\n */\r\n $releases->each(function($release) {\r\n $release->setUrl($this->releasePage, $this->controller);\r\n });\r\n\r\n return $releases;\r\n }", "title": "" }, { "docid": "e372a28c623e872801ae726ccd4a832c", "score": "0.68208086", "text": "public function latest() {\n\t\t\t$view = $this->getView('latest');\n\t\t\t$view->show();\n\t\t}", "title": "" }, { "docid": "00451d771f43e3ef5a79f0b639c13b11", "score": "0.63589185", "text": "function latest($n=10)\n\t{\n\t\t$this -> load -> model('ResourceDB_model');\n\t\t# Get \n\t\t$data['latest_query'] = $this -> ResourceDB_model -> get_public_resources($n, 'metadata_created desc');\n\t\t$data['n'] = $n;\n\t\t// define some vars to pass to the nav and page views\n\t\t$data['title'] = \"Global Health: latest resources\";\n\t\t$data['heading'] = \"Latest resources\"; \t\t\n\t\t// for <meta> tags and DC\n\t\t$data['description'] = \"Latest $n resources added to the Global Health repository, a 'one-stop shop' for resources related to global health, with a specific emphasis on nursing's role and contribution\";\n\t\t$data['keywords'] = \"health, healthcare, nursing, millennium action goals, poverty, disease, latest, urbanisation\";\n\t\t$data['active_topnav'] = \"\"; \n\t\t$data['active_leftnav'] = \"Latest resources\"; // active menu item\n\t\t$data['active_submenu'] = \"Latest\";\n\t\t$template['content'] = $this -> load -> view('resource/latest_view', $data, TRUE);\n\t\n\t\t$this -> load -> view('template2_view', $template);\t\t\n\t}", "title": "" }, { "docid": "612940689e7873af300b211b7dd27315", "score": "0.6298769", "text": "public function recentAction()\n\t{\n\t\t$entries = $this->computeStatistics('recent');\n\t\t$this->view->assign('entries', $entries);\n\t}", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.62839025", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.6275235", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "cbabc3ece2f201133f2dc3045da5004b", "score": "0.62542903", "text": "public function listByDateAction($date)\n {\n\t\t$config = IndexController::getConfig();\t\n\t\t$date = $this->filter->sanitize($date,array('string','striptags'));\n\t\t\n\t\t// Use the same view as indexAction\n\t\t$this->view->pick(\"index/index\");\n\t\t$limit = $config->application->latestPostsLimit;\n\t\t$postsPerPage = $config->application->postsPerPage;\n\t\ttry{\n\t\t\t$posts = Posts::getLatestApprovedPosts(array(\n\t\t\t\t\t\t\t\"conditions\"=>\"date_format(creation_date,'%Y-%m') = ?1\",\n\t\t\t\t\t\t\t\"limit\"=> $limit,\n\t\t\t\t\t\t\t\"bind\"=>array(1=>$date)));\n\t\t\t\t\t\t\t\n\t\t\tif(count($posts)==$limit){\n\t\t\t\t$this->view->setVar(\"showViewLoadMore\", true);\n\t\t\t\t$this->view->setVar(\"loadTarget\", \"posts\");\n\t\t\t\t$this->view->setVar(\"currentPage\", $limit);\n\t\t\t\t$this->view->setVar(\"dateTag\", $date);\n\t\t\t}\n\t\t\t$this->view->setVar(\"posts\", $posts);\n\t\t\tif(count($posts)===$limit){\n\t\t\t\t$this->view->setVar(\"loadTarget\", \"posts\");\n\t\t\t\t$this->view->setVar(\"showViewLoadMore\", true);\n\t\t\t\t$this->view->setVar(\"itemsPerPage\", $postsPerPage);\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\tIndexController::log($e->getMessage());\n\t\t}\n\t\t\n\t\t// Store the referer to return to it\n\t\t// if we are redirected to login page\n\t\tif(!$this->member->has(\"referer\")){\n\t\t\t$this->member->set('referer', $this->router->getRewriteUri());\n\t\t}\n\t\t\n\t\t// Build the date Tag to display\n\t\tif($date){\n\t\t\t$adate = strtotime($date.\"-01\");\n\t\t\t$tagDateLink = date(\"Y-m\",$adate);\n\t\t\t$adate = date(\"M Y\",$adate);\n\t\t\t$this->view->setVar(\"tagDateLink\",$tagDateLink);\n\t\t\t$this->view->setVar(\"tagDate\",$adate);\n\t\t}\n\t\t$this->view->setVar(\"user\",$this->user );\n\t\t$this->view->setVar(\"member\",$this->member );\n\t\t$this->view->setVar('formToken', $this->security->getToken());\n\t\t$this->view->setVar('formTokenKey', $this->security->getTokenKey());\t\n }", "title": "" }, { "docid": "4af262934aa1d2d2bc4fc3b14a5feb67", "score": "0.6188118", "text": "public function index()\n {\n $formats = Format::all();\n $releases = Release::orderBy('created_at', 'DESC')->paginate(50);\n\n return view('releases.index')\n ->withReleases($releases)\n ->with('formats', $formats);\n }", "title": "" }, { "docid": "104971a9c6370eda1e5f525ec3001b8d", "score": "0.59887856", "text": "public function index()\n {\n $activities = Activity::latest('activitydate')->get();\n }", "title": "" }, { "docid": "2f71d11eacdb37a5584f086719546ca4", "score": "0.59828323", "text": "public function releases() {\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt_array($curl, array(\n\t\t CURLOPT_URL => \"https://api.spotify.com/v1/browse/new-releases\",\n\t\t CURLOPT_RETURNTRANSFER => true,\n\t\t CURLOPT_ENCODING => \"\",\n\t\t CURLOPT_MAXREDIRS => 10,\n\t\t CURLOPT_TIMEOUT => 30,\n\t\t CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t CURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t \"authorization: Bearer \" . $this->getToken(),\n\t\t \"cache-control: no-cache\"\n\t\t ),\n\t\t));\n\n\t\t $data['storage'] = json_decode(curl_exec($curl));\n\t\t $events = $data['storage']->albums->items;\n\n\t\treturn [\n \t'#theme' => 'events_listing_display',\n \t'#events' => $events,\n ];\n }", "title": "" }, { "docid": "b7a8e7d1541ad30fc5c4dfe482675949", "score": "0.59033436", "text": "public function index()\n {\n return YearResource::collection(Year::orderBy('start_date', 'desc')->get());\n }", "title": "" }, { "docid": "5ea07aff24f2c327321371ddf0856233", "score": "0.5884351", "text": "public function index()\n\t{\n\t\treturn $this->service->latestPlanList(Input::get('filter'), Input::get('fields'));\n\t}", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.58760345", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "8234c49efd8076e9caf6d08bb371c27e", "score": "0.57957053", "text": "public function index()\n {\n return WebinarResource::collection(\n Webinar::orderBy('holding_at', 'desc')->paginate(6)\n );\n }", "title": "" }, { "docid": "954a21a94c60b4569f28c882641e7298", "score": "0.57938397", "text": "public function index()\n {\n return view('admin.resources.index', [\n 'resources' => Resource::published()->get()\n ]);\n }", "title": "" }, { "docid": "b0a779b70c2ae8ae887be9f19e537ef1", "score": "0.5758261", "text": "public function getRecipesRecentAction()\n {\n $serializer = $this->get('jms_serializer');\n\n $em = $this->getDoctrine()->getManager();\n\n $recipeRepository = $em->getRepository(Recipe::class);\n $recipes = $recipeRepository->findBy([], ['date' => 'DESC'], 4);\n\n $recipes = $serializer->toArray($recipes);\n\n return new JsonResponse($recipes);\n }", "title": "" }, { "docid": "5075fe808ac963d95b43ce01ef19cbd9", "score": "0.5754235", "text": "public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$this->view->filters = array(\n\t\t\t'access' => -1\n\t\t);\n\t\t$this->view->filters['sort'] = trim($app->getUserStateFromRequest(\n\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t'filter_order',\n\t\t\t'title'\n\t\t));\n\t\t$this->view->filters['sort_Dir'] = trim($app->getUserStateFromRequest(\n\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t'filter_order_Dir',\n\t\t\t'ASC'\n\t\t));\n\n\t\t// Get paging variables\n\t\t$this->view->filters['limit'] = $app->getUserStateFromRequest(\n\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t'limit',\n\t\t\tConfig::get('list_limit'),\n\t\t\t'int'\n\t\t);\n\t\t$this->view->filters['start'] = $app->getUserStateFromRequest(\n\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t'limitstart',\n\t\t\t0,\n\t\t\t'int'\n\t\t);\n\n\t\t$obj = new Archive();\n\n\t\t// Get record count\n\t\t$this->view->total = $obj->products('count', $this->view->filters);\n\n\t\t// Get records\n\t\t$this->view->rows = $obj->products('list', $this->view->filters);\n\n\t\t// Set any errors\n\t\tif ($this->getError())\n\t\t{\n\t\t\tforeach ($this->getErrors() as $error)\n\t\t\t{\n\t\t\t\t$this->view->setError($error);\n\t\t\t}\n\t\t}\n\n\t\t// Output the HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "b27729c8f0912cc8f68918a786279f94", "score": "0.5748808", "text": "public function index()\n {\n return Post::published()\n ->orderBy('publish_date', 'desc')\n ->get()\n ->load('tags')\n ->each(function (Post $post) {\n $post->withDates();\n });\n }", "title": "" }, { "docid": "534836e5c94d0654ae681b9549671fd6", "score": "0.57392246", "text": "public function index()\n {\n return EventResource::collection(Event::latest()->paginate(16));\n }", "title": "" }, { "docid": "ffa4ab9d8165639a117e4bc3980fc30d", "score": "0.5735264", "text": "public function index()\n {\n //\n // $authors= Author::all();\n $authors = QueryBuilder::for(Author::class)->allowedSorts([\n 'name',\n 'created_at'\n ])->jsonPaginate();\n return AuthorsResource::collection($authors);\n }", "title": "" }, { "docid": "a2e685fbc6aa42f286facc25d487038f", "score": "0.5732069", "text": "protected function _getReleases() { }", "title": "" }, { "docid": "a05eb66c672277effebc91a4e6aa1e49", "score": "0.5729631", "text": "public function getReleaseDate() {\n\t}", "title": "" }, { "docid": "aa7a8c226e22f0fd7a0beb4d287478d1", "score": "0.57170856", "text": "public function index()\n {\n return VoteResource::collection(Vote::all()->sortBy('votes'));\n }", "title": "" }, { "docid": "e93a2bbd4bc43d6b844f5ca769f2ff14", "score": "0.5691785", "text": "public function recentPublishedListings(int $count=4)\n {\n return CraftRex::getInstance()->RexListingService->findRecent(true, $count);\n }", "title": "" }, { "docid": "9f7b3337a3230d6ae3fddd82c16c8ee6", "score": "0.56809753", "text": "public function index()\n {\n\n $status_releases = $this->status_release->all();\n \n return view('admin.status_release.index', compact('status_releases'));\n\n }", "title": "" }, { "docid": "2a86a5f6e8d85c57919013a00d1bf7ed", "score": "0.56760937", "text": "public function index()\n\t{\n\t\t//$articles = Article::latest('published_at')->where('published_at', '<=', Carbon::now())->get();\n\t\t$articles = Article::latest('published_at')->published()->get();\n\n\t\treturn view('articles.index', compact('articles'));\n\t}", "title": "" }, { "docid": "8890df08d4139578850621251d5ac77c", "score": "0.56752414", "text": "public function indexAction()\n {\n $cp=$this->get('symfonyse.tag.content_provider');\n $entries = $cp->getAllEntries();\n\n usort($entries, function($a, $b) {\n $timeDiff = $b->getCount() - $a->getCount();\n\n if ($timeDiff == 0){\n return strcmp($a->getTitle(), $b->getTitle());\n }\n\n return $timeDiff;\n });\n\n return array(\n 'entries'=>$entries,\n );\n }", "title": "" }, { "docid": "4f08dca5547ac2258fcdcd908b6328b6", "score": "0.5670124", "text": "public function index()\n {\n //\n// $hotels = Hotel::latest('published_at')->where('published_at','<=', Carbon::now())->get();\n $hotels = Hotel::latest('published_at')->published()->get();\n// return $hotels;\n return view('pages.hotels', compact('hotels'));\n }", "title": "" }, { "docid": "85c14a23152edf27d6c195563aa7c6e4", "score": "0.5646938", "text": "public function indexAction()\n {\n $projects = $this->projectRepository->findAllOrderedByDate();\n\n return $this->render('project/list.html.twig',\n [\n 'title' => $this->title,\n 'projects' => $projects,\n ]);\n }", "title": "" }, { "docid": "ec80f5dc1f36c248ea839fa68cdf8308", "score": "0.56304306", "text": "public function index()\n {\n $products = Product::latest()->get();\n\n return view('products.index', compact('products'));\n }", "title": "" }, { "docid": "19d0fc6c99aa5e5668af9cdc427fe038", "score": "0.5612002", "text": "public function action_list()\n\t{\n\t\tif ($this->_items === NULL OR empty($this->_items))\n\t\t{\n\t\t\t$config = Kohana::$config->load('page');\n\n\t\t\t// Cache is Empty so Re-Cache\n\t\t\t$posts = ORM::factory('post')\n\t\t\t\t->where('status', '=', 'publish')\n\t\t\t\t->where('promote', '=', 1)\n\t\t\t\t->order_by('pubdate', 'DESC')\n\t\t\t\t->limit($this->_limit)\n\t\t\t\t->offset($this->_offset)\n\t\t\t\t->find_all();\n\n\t\t\t$items = array();\n\n\t\t\tforeach($posts as $post)\n\t\t\t{\n\t\t\t\t$item = array();\n\t\t\t\t$item['id'] = $post->id;\n\t\t\t\t$item['title'] = $post->title;\n\t\t\t\t$item['link'] = URL::site($post->url, TRUE);\n\t\t\t\tif ($config->get('use_submitted', FALSE))\n\t\t\t\t{\n\t\t\t\t\t$item['author'] = $post->user->nick;\n\t\t\t\t}\n\t\t\t\t$item['description'] = $post->teaser;\n\t\t\t\t$item['pubDate'] = $post->pubdate;\n\n\t\t\t\t$items[] = $item;\n\t\t\t}\n\n\t\t\t$this->_cache->set($this->_cache_key, $this->_items, DATE::HOUR); // 1 Hour\n\t\t\t$this->_items = $items;\n\t\t}\n\n\t\tif (isset($this->_items[0]))\n\t\t{\n\t\t\t$this->_info['pubDate'] = $this->_items[0]['pubDate'];\n\t\t}\n\t}", "title": "" }, { "docid": "333a1b8dc78f83314486ef70358772b5", "score": "0.5598764", "text": "public function index()\n {\n return Project::with('user')->latest()->get();\n }", "title": "" }, { "docid": "4c5680a5191d1578dcb2ad183fd580f3", "score": "0.559123", "text": "public function latestRecipesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->lastVerifiedRecipes();\n $favorites = $em->getRepository('AppBundle:UserFavoriteRecipe')->mostPopular(0);\n\n return $this->render('@frontend/recipe/featured_recipe.html.twig', array(\n 'pageType' => 'populaires',\n 'recipes' => $favorites\n ));\n }", "title": "" }, { "docid": "2a5bcc4526a4fe91de8204a7a92f55bb", "score": "0.55836046", "text": "public function newestAction() {\n $em = $this->getDoctrine()->getManager();\n\n $ent = $em->getRepository('FrontendBundle:Widget')->findOneBy([\n 'widgetType' => WidgetType::NEWS\n ]);\n $form = $this->createForm(new WidgetTypeForm(), $ent);\n $form->add('submit', 'submit', [\n 'label' => 'Zapisz'\n ]);\n return array(\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "cd23018ad6e456410a833e81e497bb87", "score": "0.5583003", "text": "public function index()\n {\n $post = new Post();\n\n $list = $post->latest()->get();\n\n return view(\"post.index\",compact('list'));\n }", "title": "" }, { "docid": "d0fce96a170d1f56f700cdf8c7338086", "score": "0.5575845", "text": "public function latestBrandsAction()\n {\n return $this->render('ChoumeiLooksBundle:Brand:latest.html.twig');\n }", "title": "" }, { "docid": "7b9eb35b4e0e148842b945350ceaf51b", "score": "0.55691487", "text": "function getVersionList($area, $page, $limit = null, $max_dt = null)\n {\n $area = $this->quote($area);\n $page = $this->quote($page);\n $filter = \"area = $area AND page = $page\";\n if ($max_dt) {\n $max_dt = $this->quote($max_dt);\n $filter.= \" AND dt < $max_dt\";\n }\n $order = 'dt DESC';\n\n if (is_null($limit)) {\n return $this->select('list', $filter, $order);\n } else {\n return $this->select('list', $filter, $order, 0, $limit);\n }\n }", "title": "" }, { "docid": "857a00daa534d05a70bf942bbf395c52", "score": "0.5566703", "text": "public function historyAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$resourceid = $this->_request->getParam('id');\n\t\t$versions = StudentResourceService::getPreviousVersions($resourceid);\n\t\t$this->view->versions = $versions;\n\t}", "title": "" }, { "docid": "25700aa495b08a7d930e8d8d58bc9354", "score": "0.55407304", "text": "public static function getReleaseDate () {}", "title": "" }, { "docid": "901678e4ca1d10119628a2768429725f", "score": "0.5538331", "text": "public function index()\n {\n return AlbumResource::collection(\\App\\Album::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "8c119f764dc2eccdb74acc53f61a7c23", "score": "0.55353796", "text": "public function index()\n {\n return Auth::user()->subscriptions()\n ->with('feed:id,title,site_url,url')\n ->latest()\n ->paginate(15);\n }", "title": "" }, { "docid": "96921f53d19821eb58ec517db1c7baa2", "score": "0.5523403", "text": "public function index()\n {\n $items = Book::with('authors')->latest('updated_at')->get();\n\n return view('admin.books.index', compact('items'));\n }", "title": "" }, { "docid": "0491ed6e01882611fbefef1b9a3aa7ea", "score": "0.55233145", "text": "function wpmanga_listReleases() {\r\n\tglobal $wpdb;\r\n\t\r\n\t$projects = $wpdb->get_results(\"SELECT * FROM `{$wpdb->prefix}projects` ORDER BY `title` ASC\");\r\n\t\r\n\t$publishedstatus = wpmanga_get('wpmanga_release_statuspublished',0);\r\n\tif ($projects) {\r\n?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<?php screen_icon('edit-pages'); ?>\r\n\t\t\t<h2>Releases <a href=\"?page=manga/release\" class=\"add-new-h2\">Add a New Release</a></h2>\r\n\t\t\t\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tfunction toggleFinishedRelease(cb) {\r\n\t\t\t if (cb.checked)\r\n\t\t\t\tjQuery('.finished').css( \"display\", \"table-row\" );\r\n\t\t\t else\r\n\t\t\t\tjQuery('.finished').css( \"display\", \"none\" );\r\n\t\t\t}\r\n\r\n\t\t\tfunction catFilter(cbo) {\r\n\t\t\t var category = cbo.options[cbo.selectedIndex].value;\r\n\t\t\t if (category != '')\r\n\t\t\t {\r\n\t\t\t\tjQuery('.project').css( \"display\", \"none\" );\r\n\t\t\t\tjQuery('.cat'+category).css( \"display\", \"block\" );\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\tjQuery('.project').css( \"display\", \"block\" );\r\n\t\t\t }\r\n\t\t\t}\r\n\r\n\t\t\tfunction projectFilter(cbo) {\r\n\t\t\t var project = cbo.options[cbo.selectedIndex].value;\r\n\t\t\t if (project != '')\r\n\t\t\t {\r\n\t\t\t\tjQuery('.project').css( \"display\", \"none\" );\r\n\t\t\t\tjQuery('#proj'+project).css( \"display\", \"block\" );\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\tjQuery('.project').css( \"display\", \"block\" );\r\n\t\t\t }\r\n\t\t\t\tdocument.getElementById(\"categoryCombo\").selectedIndex=0;\r\n\t\t\t}\r\n\r\n\t\t\tjQuery(function($){ // DOM is now read and ready to be manipulated\r\n\t\t\t\tjQuery('.finished').css( \"display\", \"none\" );\r\n\t\t\t\tdocument.getElementById(\"categoryCombo\").selectedIndex=1;\r\n\t\t\t\tcatFilter(document.getElementById(\"categoryCombo\"));\r\n\t\t\t});\r\n\t\t</script>\r\n\r\n<?php if ($publishedstatus != 0)\r\n\t {\r\n?>\r\n\t\t<label><input type=\"checkbox\" onclick=\"toggleFinishedRelease(this);\">Show finished releases</label><br />\r\n<?php } ?>\r\n\t\t<span>Show only projects from this category </span>\r\n\t\t<select name=\"category\" id=\"categoryCombo\" onchange=\"catFilter(this)\" >\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$categories = get_sListCategories();\r\n\t\t\t\t\techo \"<option value='' selected=\\\"selected\\\">All</option>\";\r\n\t\t\t\t\tforeach ($categories as $category) {\r\n\t\t\t\t\t\techo \"<option value='{$category->id}'>{$category->name}</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t</select>\r\n\t\t<span> Or only this project</span>\r\n\t\t<select name=\"projects\" id=\"projectsCombo\" onchange=\"projectFilter(this)\" >\r\n\t\t\t\t<?php\r\n\t\t\t\t\techo \"<option value='' selected=\\\"selected\\\">All</option>\";\r\n\t\t\t\t\tforeach ($projects as $project) {\r\n\t\t\t\t\t\techo \"<option value='{$project->id}'>{$project->title}</option>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t</select>\r\n\r\n<?php\r\n\t\t\tforeach ($projects as $project) {\r\n\t\t\t\t$releases = $wpdb->get_results($wpdb->prepare(\"SELECT * FROM `{$wpdb->prefix}projects_releases` WHERE `project_id` = '%d' ORDER BY `volume` ASC, `chapter` ASC, `subchapter` ASC, `type` ASC\", $project->id));\r\n\t\t\t\t\r\n\t\t\t\tif ($releases) {\r\n?>\r\n\t\t\t\t\t<div class=\"project cat<?php echo $project->category; ?>\" id=\"proj<?php echo $project->id; ?>\">\r\n\t\t\t\t\t<br> &nbsp; <a href=\"admin.php?page=manga/project&action=edit&id=<?php echo $project->id; ?>\" style=\"text-decoration: none; font-weight: bold\"><?php echo $project->title; ?></a> &nbsp; <?php if ($project->title_alt) echo \"&#12302;{$project->title_alt}&#12303;\"; ?>\r\n\t\t\t\t\t<table class=\"wp-list-table widefat fixed\">\r\n\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t<th scope=\"col\" width=\"100px\">Date</th>\r\n\t\t\t\t\t\t\t<th scope=\"col\">Release</th>\r\n\t\t\t\t\t\t\t<th scope=\"col\" width=\"150px\">Action</th>\r\n\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<tbody id=\"the-list\">\r\n\t\t\t\t\t\t\t<?php $row = 1; ?>\r\n\t\t\t\t\t\t\t<?php foreach ($releases as $release) {\r\n\t\t\t\t\t\t\t\t\t$class = \"\";\r\n\t\t\t\t\t\t\t\t\tif ($publishedstatus != 0 && $release->status == $publishedstatus) \r\n\t\t\t\t\t\t\t\t\t\t$class = \"finished\";\r\n\t\t\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t<tr<?php if ($row % 2) $class.=\" alternate\";\r\n\t\t\t\t\t\t\t\t\techo \" class=\\\"{$class}\\\"\"; $row++ ?>>\r\n\t\t\t\t\t\t\t\t<td><?php echo date('Y.m.d', $release->unixtime); ?></td>\r\n\t\t\t\t\t\t\t\t<td><?php echo get_sFormatRelease($project, $release); if ($release->title) echo ' - <i>' . $release->title . '</i>'; ?></td>\r\n\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t<a href=\"admin.php?page=manga/release&action=edit&id=<?php echo $release->id; ?>\" title=\"Edit Release Information\">Edit</a> | \r\n\t\t\t\t\t\t\t\t\t<a href=\"admin.php?page=manga/release&action=delete&id=<?php echo $release->id; ?>\" title=\"Delete Release Information\">Delete</a> | \r\n\t\t\t\t\t\t\t\t\t<a href=\"<?php echo get_sPermalink($release->project_id); ?>#release-<?php echo $release->id; ?>\" title=\"View Release Information\">View</a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<?php } ?>\r\n\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t</table>\r\n\t\t\t\t\t</div>\r\n<?php\r\n\t\t\t\t}\r\n\t\t\t}\r\n?>\r\n\t\t</div>\r\n<?php\r\n\t} else {\r\n?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tlocation.replace(\"admin.php?page=manga/project\")\r\n\t\t</script>\r\n<?php\r\n\t}\r\n}", "title": "" }, { "docid": "b9967ad4028b8a36697e945ff994f293", "score": "0.5504118", "text": "public function latest();", "title": "" }, { "docid": "ab6920b49a9997e6a423553f5bbebc03", "score": "0.55011946", "text": "public function listarchivesAction()\n {\n $categoryID = $this->_getParam('categoryID');\n if (empty($categoryID))\n $categoryID = 2;\n\n $newsletterID = $this->_getParam('newsletterID');\n $back_to_newsletter = !empty($newsletterID) ? \"/ID/{$newsletterID}\" : '';\n\n $options[\"filtre\"] = $this->_request->getParam('listeFiltre');\n\n $newsletterSelect = new NewsletterReleases();\n $arraySelect = $newsletterSelect->getFilterArchive();\n $year = 0;\n $yearsList = array();\n foreach ($arraySelect as $value)\n {\n if ($value['Annee'] > $year)\n $year = $value['Annee'];\n\n $yearsList[$value['Annee']] = $value['Annee'];\n }\n if(!isset($yearsList)){\n $yearsList[0] = 0;\n }\n $options['dates'] = $yearsList;\n if($options['filtre'] == \"\")\n $options['filtre'] = $year;\n\n $form = new FormSelect($options);\n $this->view->formSelect = $form;\n if($this->_request->isPost())\n {\n $form->populate($this->_request->getPost());\n }\n\n // Get the Newsletter ID to dont show\n $select = $newsletterSelect->select()->setIntegrityCheck(false);\n $select->from('Newsletter_Releases')\n ->join('Languages', 'L_ID = NR_LanguageID', array())\n ->join('CategoriesIndex', 'CI_CategoryID = NR_CategoryID', array())\n ->join('Newsletter_Models_Index', 'NMI_NewsletterModelID = NR_ModelID', array())\n ->join('Newsletter_Models', 'NM_ID = NMI_NewsletterModelID', array())\n ->where('CI_LanguageID = ?', Zend_Registry::get(\"languageID\"))\n ->where('NR_LanguageID = ?', Zend_Registry::get(\"languageID\"))\n ->where('NR_Online = ?', 1)\n ->order('NR_Date DESC');\n $newsletterData = $newsletterSelect->fetchRow($select);\n $actualNewsletterOnline = $newsletterData['NR_ID'];\n\n if ($actualNewsletterOnline <> '')\n {\n if (empty($categoryID) || $categoryID == '')\n $categoryID = $newsletterData['NR_CategoryID'];\n\n //get all releases exept the one online\n $releasesSelect = new NewsletterReleases();\n $select = $releasesSelect->select()->setIntegrityCheck(false);\n $select->from('Newsletter_Releases')\n ->join('CategoriesIndex', 'CI_CategoryID = NR_CategoryID')\n ->join('Status', 'Newsletter_Releases.NR_Online = Status.S_ID')\n ->where('CI_LanguageID = ?', Zend_Registry::get(\"languageID\"))\n ->where('NR_LanguageID = ?', Zend_Registry::get(\"languageID\"))\n ->where('NR_Online = ?', 1)\n ->where(\"year(NR_Date) = ?\", $options[\"filtre\"])\n ->where('NR_CategoryID = ?', $categoryID)\n ->where('NR_ID <> ?', $actualNewsletterOnline)\n\n ->order('NR_Date DESC');\n\n $releasesData = $releasesSelect->fetchAll($select);\n\n $this->view->assign('listArchives', $releasesData);\n\n $this->view->assign('subscribeLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'subscribe', 8));\n $this->view->assign('unsubscribeLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'unsubscribe', 8));\n //$this->view->assign('detailsRelease', $this->view->baseUrl().\"/\".Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'details_release', 8));\n $this->view->assign('detailsRelease', Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'details_release', 8));\n //$this->view->assign('back_to_release', Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'details_release', 8));\n $this->view->assign('back_to_release', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'details_release', 8) . $back_to_newsletter);\n $this->view->assign('archivesLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($categoryID, 'list_archives', 8) . '/categoryID/' . $categoryID);\n }\n else\n {\n $this->view->assign('listArchives', array());\n $blockID = $this->_getParam('BlockID');\n\n $blockParams = Cible_FunctionsBlocks::getBlockParameters($blockID)->toArray();\n $newsletterCategoryID = $blockParams[0]['P_Value'];\n\n $this->view->assign('subscribeLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($newsletterCategoryID, 'subscribe', 8));\n $this->view->assign('unsubscribeLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($newsletterCategoryID, 'unsubscribe', 8));\n $this->view->assign('back_to_release', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($newsletterCategoryID, 'details_release', 8) . $back_to_newsletter);\n $this->view->assign('archivesLink', $this->view->baseUrl() . \"/\" . Cible_FunctionsCategories::getPagePerCategoryView($newsletterCategoryID, 'list_archives', 8) . '/categoryID/' . $newsletterCategoryID);\n }\n }", "title": "" }, { "docid": "ecd287988f4b7da6fd1ee3a4ce0dbbb4", "score": "0.5492319", "text": "public function index()\n {\n $tickets = TicketsModel::paginate(10);\n\n //passing data to resource\n return TicketsResource::collection($tickets);\n }", "title": "" }, { "docid": "a927d2cf8bbebe43df4fa3e00ee26e5c", "score": "0.54812104", "text": "public function index()\n {\n $pagination = config('blogged.settings.pagination');\n\n $articles = Article::orderBy('created_at', 'DESC')\n ->orderBy('publish_date', 'DESC')\n ->paginate($pagination);\n\n return ArticleMinimalResource::collection($articles)\n ->additional(['statistics' => [\n 'total' => $articles->total(),\n 'published' => Article::published()->count(),\n 'featured' => Article::featured()->count(),\n ]]);\n }", "title": "" }, { "docid": "a09540735f6df9d006dccdb05dc6b1e4", "score": "0.5477415", "text": "function view_latest() { # DONE FOR AJAX LOAD...\n\t\t$this->layout = 'xml';\n\t\t$this->MemberVideo->recursive = 0;\n\t\t$videos = $this->paginate('MemberVideo',\"is_active = 1 AND youtube_video_id != '' AND youtube_video_id IS NOT NULL AND disabled = FALSE \");\n\n\t\tforeach ($videos as &$video)\n\t\t{\n\t\t\t$video_id = $video['MemberVideo']['youtube_video_id'];\n\t\t\t$video['MemberVideo']['video_thumbnail_url'] = $this->Youtube->getThumbnailUrl($video_id);\n\t\t}\n\n\t\t$this->set('videos', $videos);\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.5474122", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "3aae0aafdaf378c6245ced1e7f365939", "score": "0.54713714", "text": "public function index()\n {\n $blog = blog::orderBy(\"created_at\")->get();\n\n return BlogResources::collection($blog);\n }", "title": "" }, { "docid": "5509d28122c561e86197cbcc735e8008", "score": "0.5466907", "text": "public function index()\n {\n $products = Product::filter()->paginate();\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3d372fc906413baeef9eea8a05c96b4c", "score": "0.5465638", "text": "public function index()\n {\n return TicketDescriptionResource::collection(ticketdescription::all());\n }", "title": "" }, { "docid": "e675e92fb01973246dbba54c68724a02", "score": "0.5461408", "text": "public function getLatestActivities() {\n\n return Rent::with('book', 'student', 'librarian')\n ->orderBy('rent_date', 'DESC')\n ->take(10)\n ->get();\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.5461055", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "a03d91a9eea080f70064e029799d10dd", "score": "0.54583144", "text": "public static function archiveList()\n {\n return static::selectRaw('DATE_FORMAT(uploaded_date, \"%y%m\") as value, DATE_FORMAT(uploaded_date, \"%Y %b (%m)\") as title')\n ->orderBy('uploaded_date', 'desc')\n ->lists('title', 'value');\n }", "title": "" }, { "docid": "8fbd23354d759c6fa181be00f68f9b6a", "score": "0.54542905", "text": "public function actionArchived($currentView = null)\n {\n Url::remember();\n\n if (empty($currentView)) {\n $currentView = 'list';\n }\n $this->setDataProvider($this->getModelSearch()->searchArchived(\\Yii::$app->request->getQueryParams()));\n\n $this->setUpLayout('list');\n $this->view->params['currentDashboard'] = $this->getCurrentDashboard();\n $this->setIndexParams();\n\n $this->setTitleAndBreadcrumbs(AmosEen::t('amoseen', 'Proposte een archiviate'));\n $this->setCurrentView($this->getAvailableView($currentView));\n\n\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews(),\n 'url' => ($this->url) ? $this->url : null,\n 'parametro' => ($this->parametro) ? $this->parametro : null,\n 'countryTypes' => $this->getModel()->getCountryTypes()\n ]);\n }", "title": "" }, { "docid": "52d573e56e7a04c8574cf1151ccae373", "score": "0.5451369", "text": "function action_list($date = false) {\n\t\tnoCacheHeaders();\n\t\t$view = View::factory('list');\n\n\t\t// Select date to use\n\t\tif(!$date) {\n\t\t\t$date = date('Y-m-d');\n\t\t}\n\n\t\t// Generate readable date strings\n\t\t$fDate = date('j.n.Y', strtotime($date));\n\t\t$fDate .= strtolower(strftime(' %A', strtotime($date)));\n\t\t$view->fDate = $fDate;\n\n\t\t// Get people who signed up for today\n\t\t$hto = new Model_HTO();\n\t\t$people = $hto->getPeopleForDate($date);\n\n\t\t// Get calendar contents\n\t\t$view->dates = $hto->getDates();\n\n\t\t// Assign variables to template\n\t\t$view->data = $people;\n\t\t$view->date = $date;\n\n\t\t$this->request->response = $view->render();\n\t}", "title": "" }, { "docid": "b6d850328b4285e9eeb161336c1006a0", "score": "0.5451362", "text": "public function index()\n {\n $posts = Post::latest()->paginate(20);\n\n return PostResource::collection($posts);\n }", "title": "" }, { "docid": "6fd4d485345ffaf93a6521e292700608", "score": "0.5447254", "text": "public function index()\n {\n $books = Book::with(['category', 'author'])->latest( 'publish_date')->get(['id', 'title', 'status', 'publish_date', 'created_at', 'updated_at', 'category_id', 'author_id']);\n return new BookCollection($books);\n }", "title": "" }, { "docid": "7654e3029bc9d8c659e172f735198351", "score": "0.5444149", "text": "public function index()\n {\n $sort_by_arr = [\"Time: newly listed\", \"A to Z\", \"Z to A\"];\n switch (request(\"sort_by\")) {\n case \"A to Z\":\n $sort = \"title\";\n $order = \"ASC\";\n break;\n case \"Z to A\":\n $sort = \"title\";\n $order = \"DESC\";\n break;\n case \"Time: newly listed\":\n default :\n $sort = \"created_at\";\n $order = \"DESC\";\n break;\n }\n\n $ads = Ad::where(\"show_in_items\", true)->orderBy('created_at', 'DESC')->take(3)->get();\n $news = News::orderBy($sort, $order)->paginate(10);\n return view('pages.news.index', compact([\"news\",\"sort_by_arr\", \"ads\"]));\n }", "title": "" }, { "docid": "14c30cba4e70d36b918571b292a7a11f", "score": "0.5440405", "text": "public function index()\n {\n $products = Product::latest()->get();\n return view('products.index', \\compact('products'));\n }", "title": "" }, { "docid": "e81f9b557e1347d91424aaf899bd79bb", "score": "0.54377", "text": "public function selectAllVersionsAction()\n {\n $params = array(\n 'isGlobal' => ($this->_getParam('isGlobal', 0) == 'true') ? 1 : 0, // the boolean comes through as string, filter to int\n 'routeName' => $this->_getParam('routeName'),\n 'handle' => $this->_getParam('handle'),\n );\n\n $contentTable = new Hobo_Db_Table_Content();\n $rows = $contentTable->selectAllVersions($params);\n $rows = $rows->toArray();\n foreach ($rows as &$row) {\n // pretty-up the date format\n $row['created'] = date('F jS, Y, g:i A', strtotime($row['created']));\n }\n $this->_helper->json($rows);\n }", "title": "" }, { "docid": "728c8d38ed837d194e0fe402e5728a84", "score": "0.5436644", "text": "public function index()\n {\n $films = Film::latest('release_date')->with('photo')\n ->paginate(1);\n return view('films', [\n 'films' => $films,\n ]);\n }", "title": "" }, { "docid": "dfe0e7aa74a68e6675802a9f6475e11a", "score": "0.5436002", "text": "public function index()\n {\n $products = StoreProduct::orderBy('sponsored','asc')->orderBy('downloads','desc')->orderBy('rating','desc')->get();\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.543515", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "7694b5f7e0e07889f36e94094458b384", "score": "0.54341674", "text": "public static function latest()\n {\n return self::get(self::BASE_URL . '/json.php');\n }", "title": "" }, { "docid": "e818247a8e6408345e81c3d50d11afd1", "score": "0.5433227", "text": "public function currentForAllResources()\n {\n // 1. Retrieve the most recent Status for each resource that's been updated within the last 30 days.\n // 2. Package the response into a JSON object and return.\n\n $max_age = config('app.days_until_updates_expire');\n $earliest_date = Carbon::now()->subDays($max_age); // The oldest Status that will be displayed\n\n $resources = DB::table('statuses as newest')\n ->leftjoin('statuses as newer', function($join) {\n $join->on('newer.statusable_id','=','newest.statusable_id');\n $join->on('newer.created_at','>','newest.created_at');\n })\n ->select('newest.*')\n ->whereNull('newer.created_at')\n ->where('newest.created_at','>=',$earliest_date)\n ->get();\n\n/* Here's the raw SQL query for testing and debugging:\n\n select newest.* from\n statuses as newest\n left outer join statuses as newer\n on newer.statusable_id = newest.statusable_id\n and newer.updated_at > newest.updated_at\n where newer.updated_at IS NULL;\n*/\n // sleep(4); // Test asynchronous loading on the map view\n return json_encode($resources);\n }", "title": "" }, { "docid": "948adb9f5517d720a875845867155e37", "score": "0.5432297", "text": "public function index()\n {\n $dates = Date::all();\n\n return view('equipment.admin.date.index', compact('dates'));\n }", "title": "" }, { "docid": "c2e892ccfc299ff49c0d2b55afeb81a2", "score": "0.5429561", "text": "public function show($id)\n {\n $items = $this->service->getReleaseDetails($id); \n\n $items = InfrastructureReleaseListResource::make($items); \n return $this->respondWithSuccess($items); \n }", "title": "" }, { "docid": "629569270186c168f2f698db8154b51a", "score": "0.54281867", "text": "public function index()\n {\n $articles = Article::query()->latest()->paginate(10);\n\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "643897bf104ea21171e81c3d6553389f", "score": "0.5422542", "text": "public function index()\n {\n\n $articles = Article::all()->sortByDesc('created_at');\n\n return view('articles.articles', compact('articles'));\n }", "title": "" }, { "docid": "865f3d9012ef5707860d9ff843aca2d1", "score": "0.5422195", "text": "public function selectLatestAction()\n {\n $params = array(\n 'isGlobal' => ($this->_getParam('isGlobal', 0) == 'true') ? 1 : 0, // the boolean comes through as string, filter to int\n 'routeName' => $this->_getParam('routeName'),\n 'handle' => $this->_getParam('handle'),\n );\n\n $contentTable = new Hobo_Db_Table_Content();\n $row = $contentTable->selectLatest($params);\n if ($row instanceof Hobo_Db_Table_Row_Content) {\n $rowArray = $row->toArray();\n } else {\n // no result, send back empty array\n $rowArray = array();\n }\n $this->_helper->json($rowArray);\n }", "title": "" }, { "docid": "70d9fb3c9bb75485007c7635e621b5f6", "score": "0.5421095", "text": "public function index(Articles $articles){\n \t//$articles = DB::table('articles')->latest()->get();\n\n \t//return view('Pages.articles', compact('articles'));\n\n// This is the code that was working.\n //$articles = Article::latest('published_at')->Published()->get();\n //$latest = Article::latest()->first();\n\n\n $articles = Article::latest()->filter(request(['month', 'year']))->get();\n\n\n\n\n //$archives = Article::archives();\n\n\n \t//return view('Articles.index')->with('articles', $articles);\n return view('Articles.index', compact('articles', 'latest', 'archives'));\n\n }", "title": "" }, { "docid": "a3804236317a6d5bfc4b71d53c252020", "score": "0.5419344", "text": "public function getReleaseDate()\n {\n return $this->releaseDate;\n }", "title": "" }, { "docid": "ce61097efbe91f58d7a9fed8e32b3dcc", "score": "0.54170597", "text": "public function index()\n {\n $articles = Article::latest('published_at')->published()->get();\n\n return view('articles.index', compact('articles'));\n\t}", "title": "" }, { "docid": "137cb59be5e79b1e39a59af8b669ec10", "score": "0.54164517", "text": "public function load_release_objects() {\n\n\t\tif ( empty( $this->ID ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$args = array(\n\t\t\t'post_type' => pkppgInit()->cpts->plugin_release_post_type,\n\t\t\t'posts_per_page' => 1000, // high upper limit\n\t\t\t'post_parent' => $this->ID,\n\t\t\t'post_status' => array( 'publish' ),\n\t\t\t'orderby' => 'title',\n\t\t\t'order'\t => 'DESC',\n\t\t);\n\n\t\t// Maintainers should always see submissions and updates\n\t\tif ( get_current_user_id() == $this->maintainer ) {\n\t\t\tarray_push( $args['post_status'], 'submission' );\n\t\t\t$args['with_updates'] = true;\n\t\t}\n\n\t\t// Show disabled releases and updates in admin to admins\n\t\tif ( is_admin() && current_user_can( 'manage_options' ) ) {\n\t\t\tarray_push( $args['post_status'], 'disable', 'submission' );\n\t\t}\n\n\t\t$query = new pkppgQuery( $args );\n\n\t\t$this->release_objects = $query->get_results();\n\n\t\treturn $this->release_objects;\n\t}", "title": "" }, { "docid": "2ca64d85df31eb685afcb4b6e679bf12", "score": "0.5414718", "text": "public function index(Request $request)\n {\n $this->checkPermission(\"fund_management_release_fund\");\n $items = $this->service->getAll($request);\n $items = InfrastructureReleaseListResource::collection($items);\n if(isset($request['page']) && !empty($request['page']))\n {\n $json_data = array(\n \"draw\" => intval($request['draw']), \n \"recordsTotal\" => $items->total(), \n \"recordsFiltered\" => $items->total(), \n \"data\" => $items,\n 'current_page' => $items->currentPage(),\n 'next' => $items->nextPageUrl(),\n 'previous' => $items->previousPageUrl(),\n 'per_page' => $items->perPage(), \n );\n return $this->respondWithSuccess($json_data); \n }else{\n return $this->respondWithSuccess($items);\n }\n \n }", "title": "" }, { "docid": "0b78d6375cbc506bb0ed16659cd992e2", "score": "0.54144126", "text": "public function getLastReleaseStatus() {\n $release_time = $this->getLastReleaseTime();\n\n $content = [\n '#type' => 'markup',\n '#markup' => $this->t('VA.gov last updated<br />@release_time', [\n '@release_time' => $release_time,\n ]),\n ];\n $output = $this->renderer->renderPlain($content);\n\n $response = Response::create($output);\n $response->setCache(['max_age' => 60]);\n\n return $response;\n }", "title": "" }, { "docid": "3fc3ff353de214dff3ac93efc36b338d", "score": "0.54101276", "text": "public function index()\n {\n $posts = Post::with('tags')\n ->latest()\n ->filter(request(['month', 'year']))\n ->get();\n\n $posts = Post::with('tags')\n ->latest()\n ->paginate('5');\n\n //return view('posts.index', compact('posts'));\n return view(config('app.theme').'.posts.index', compact('posts'));\n }", "title": "" }, { "docid": "1faf2b21e9227830f7a73e3caf0aab48", "score": "0.540904", "text": "public function getReleaseDate()\n {\n return $this->_releaseDate;\n }", "title": "" }, { "docid": "f1aaa1653d1ae4f50dc887e55e204d67", "score": "0.54084986", "text": "public function newReleases()\n {\n try {\n $httpRequest = $this->httpClient->request ('GET', 'https://api.spotify.com/v1/browse/new-releases', [\n 'headers' => [\n 'Authorization' => $this->dataAuth->token_type . ' ' . $this->dataAuth->access_token\n ]\n ]);\n $new_releases = json_decode ($httpRequest->getBody ()->getContents ());\n } catch (GuzzleException $e) {\n return \\Drupal::logger ('New releases api spotify')->error ($e);\n }\n $buildView['releases_page'] = [\n '#theme' => 'new_releases_spotify_page',\n '#new_releases' => $new_releases\n ];\n return $buildView;\n }", "title": "" }, { "docid": "31069543b448d5a992635b7af0740a2a", "score": "0.5406952", "text": "public function action_archive() {\n//\t\tKohana::$log->add(Kohana::DEBUG,\n//\t\t\t'Executing Controller_Blog::action_archive');\n//\t\tKohana::$log->add(Kohana::DEBUG,\n//\t\t\t'Route is '.Route::name($this->request->route));\n\t\t$this->template->content = View::factory('blog/front/list')\n\t\t\t->set('legend', __('Published Articles'))\n\t\t\t->bind('articles', $articles)\n\t\t\t->bind('pagination', $pagination);\n\n\t\t$date = $this->request->param('date');\n\t\t$search = Sprig::factory('blog_search');\n\t\t$articles = $search->search_by_date($date);\n\t\t$pagination = $search->pagination;\n\t}", "title": "" }, { "docid": "8c1ba08dc14041ce4721aca2174d9947", "score": "0.54008734", "text": "public function index()\n {\n $tags = Tag::all();\n $articles = Article::latest()->paginate(5);\n\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "c15b8594374bc65f321e65e2e2f9225f", "score": "0.53998107", "text": "public function index()\n {\n\n // $articles = DB::table('articles')\n // ->join('images', 'articles.image_id', '=', 'images.id')\n // ->select('articles.*', 'file')->latest('published_at')->get();\n\n $articles = Article::latest('published_at')->get();\n\n return view('admin.articles.index', compact('articles'));\n }", "title": "" }, { "docid": "bacdb8567dde93963b96d2fa5edd4569", "score": "0.53979135", "text": "public function getReleaseDate()\n {\n return $this->release_date;\n }", "title": "" }, { "docid": "3d09d5687bb1554e07b77476f05ad61a", "score": "0.5397542", "text": "public function index()\n\t{\n\t\t$slug = 'sermons';\n \t$page = \\Crockenhill\\Page::where('slug', $slug)->first();\n\n $last_6_weeks = \\Crockenhill\\Sermon::orderBy('date', 'desc')\n ->take(6)\n ->lists('date');\n\n $latest_sermons = [];\n\n foreach ($last_6_weeks as $week) {\n $latest_sermons[$week] = \\Crockenhill\\Sermon::where('date', $week)\n ->get();\n }\n\t \n\t\treturn view('sermons.index', array(\n\t 'slug' => $slug,\n\t 'heading' \t\t\t => $page->heading,\n\t 'description' \t\t\t => '<meta name=\"description\" content=\"Recent sermons preached at Crockenhill Baptist Church.\">',\n\t 'breadcrumbs' \t\t\t\t\t=> '<li class=\"active\">'.$page->heading.'</li>',\n\t 'content' \t\t\t\t\t=> $page->body,\n 'latest_sermons' => $latest_sermons\n\t\t));\n\t}", "title": "" }, { "docid": "a355d75f99f339a05ea063bed90c2fb0", "score": "0.5395531", "text": "public function index()\n {\n return $this->showAll(ReservedTImeDates::all());\n }", "title": "" }, { "docid": "f151de5f74be8bf5c75219c74db7d89a", "score": "0.5387722", "text": "public function index()\n {\n $query = Claim::getList(request('filter', ''))\n ->orderBy(request('order_by','Inserted_Date'),request('order','DESC'));\n\n return ClaimResource::collection($query->paginate(request('per_page', 25)));\n }", "title": "" }, { "docid": "5e32cc6c4bd5d372037d1c01abf15253", "score": "0.5381946", "text": "public function index()\n {\n $attendances = Attendance::oldest('date')->get();\n return view('attendances.index', compact('attendances'));\n }", "title": "" }, { "docid": "deb2139daff125afcc3ac3196480e3d9", "score": "0.5381093", "text": "public function index()\n {\n return BranchesResource::collection($this->branch->paginate());\n }", "title": "" }, { "docid": "0142fff543e1677a5f132fe3339719e4", "score": "0.5380136", "text": "public function index()\n {\n return Products::orderBy('created_at','desc')->paginate(10);\n }", "title": "" }, { "docid": "6d805fdd9c5c1152df9c785494d3fe4b", "score": "0.5378484", "text": "public function index()\n {\n return Post::latest('id')->paginate();\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.53763694", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "36cd4600ac5383ef262b60825f4921a2", "score": "0.5374194", "text": "public function getRelease_date()\n {\n return $this->release_date;\n }", "title": "" }, { "docid": "448d9b6f9f942ee2c839edba4884b31c", "score": "0.537391", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(5));\n }", "title": "" }, { "docid": "f7eeae115f4ed1dab0794bd8f72d65b4", "score": "0.5371025", "text": "public function index()\n {\n $p = Patient::whereDate('created_at', Carbon::today())->latest()->get();\n return new PatientCollection($p);\n }", "title": "" }, { "docid": "12547af2e11a039bcdd0aeaf831c5463", "score": "0.53635466", "text": "public function indexAction()\n {\n $this->sm = $this->getServiceLocator();\n $objectManager = $this->sm->get('Doctrine\\ORM\\EntityManager');\n $livraisons = $objectManager->getRepository('Holycow\\Entity\\Livraisons')->findBy(\n array(),\n array('datedernierdelai' => 'desc')\n );\n return array('livraisons' => $livraisons,);\n }", "title": "" }, { "docid": "d8b504a95687b61ea554fd457d66d8e9", "score": "0.5362556", "text": "public function index()\n {\n return Advert::latest()->get();\n }", "title": "" }, { "docid": "509ec0fcb45aed84effa1bcfb9b408aa", "score": "0.53623664", "text": "public function index()\n {\n $logs = Logs::Latest()->paginate(20);\n return $logs;\n }", "title": "" }, { "docid": "84610fd58d192a855f0c4d350dcee458", "score": "0.53606236", "text": "public function recentActivitiesAction()\n {\n $user = $this->getUser();\n $entries = $this->getRepository()->getRecentActivities($user, new \\DateTime('-1 year'));\n\n return $this->render(\n 'navbar/recent-activities.html.twig',\n ['entries' => $entries]\n );\n }", "title": "" } ]
0e6c6e4a81867e418036433f7c45c1f1
contador para la lista de deseos
[ { "docid": "7bbec9f7f21f70d0197cc7ae55601d1c", "score": "0.0", "text": "public function get_count_for_list_des($id_user)\n {\n $stmt = $this->conn->prepare(\"SELECT COUNT(*) FROM art_des WHERE id_user = ?\");\n $stmt->bind_param(\"i\", $id_user);\n if ($stmt->execute()) {\n $stmt->bind_result($cant);\n $stmt->fetch();\n $stmt->close();\n return $cant;\n } else {\n return NULL;\n }\n }", "title": "" } ]
[ { "docid": "c1ee2240813ff86057a0a86efeef949c", "score": "0.6826467", "text": "public function especificosList(){\n \n }", "title": "" }, { "docid": "3dda60c5d467219eebbc7a43d94090cb", "score": "0.6438634", "text": "public function remplireListe()\n {\n \n }", "title": "" }, { "docid": "eab038916a868c641e49118d6e5fb8ec", "score": "0.6421824", "text": "function listarOtrosgastos(){\n\t\t$this->procedimiento='snx.ft_ucsbotrosgastos_sel';\n\t\t$this->transaccion='SNX_UCSBEO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_unidadconstructivasb','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('otrosgastos','varchar');\n\t\t$this->captura('cantidadog','numeric');\n\t\t$this->captura('valorog','numeric');\n\t\t$this->captura('valorunitario','numeric');\t\n\t\t$this->captura('Id_Item','int4');\t\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "3b27a13f60e6e82d992a5c9db412f5ca", "score": "0.6366044", "text": "public function mostrar()\n\t{\n\t\t$db = Db::conectar();\n\t\t$sextarazon = null;\n\t\t$select = $db->query('SELECT * FROM sextarazonbeca;');\n\t\tforeach ($select->fetchAll() as $sextarazon) {\n\t\t\t$mysextarazonBeca = new Sextarazonbeca();\n\t\t\t$mysextarazonBeca->setSextaRazonBecaId($sextarazon['sextaRazonBecaId']);\n\t\t\t$mysextarazonBeca->setSextaRazonBeca($sextarazon['sextaRazonBeca']);\n\t\t\t$mysextarazonBeca->setSextarazonbecacodigo($sextarazon['sextarazonbecacodigo']);\n\t\t\t$mysextarazonBeca->setSextarazonbecaOculto($sextarazon['sextarazonbecaOculto']);\n\t\t\t$mysextarazonBeca->setSextarazonbecaAccion($sextarazon['sextarazonbecaAccion']);\n\t\t\t$mysextarazonBeca->setSextarazonbecafecha($sextarazon['sextarazonbecafecha']);\n\t\t\t$mysextarazonBeca->setSextarazonbecauser($sextarazon['sextarazonbecauser']);\n\t\t\t$mysextarazonBeca->setSextarazonbecabool($sextarazon['sextarazonbecabool']);\n\t\t\t$listasextarazon[] = $mysextarazonBeca;\n\t\t}\n\n\t\treturn $listasextarazon;\n\t}", "title": "" }, { "docid": "816ef9f95e6550b098783005778bf4d2", "score": "0.62703866", "text": "public function listarEditoriales(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $respuesta->setRespuesta(AccesoController::inExitoso);\n \n //echo \"Respuesta Idiomas: \".$respuesta->getRespuesta().\" \\n\";\n \n $editoriales = ManejoDataRepository::getListaEditoriales(); \n $editorial = new LbEditoriales();\n $arEditoriales = array();\n \n //$contador = 0;\n foreach ($editoriales as $editorial) {\n $arEditoriales[] = array(\"ideditor\"=>$editorial->getInideditorial(), \"nomeditor\"=>utf8_encode($editorial->getTxedinombre()));\n //echo \"Idioma=\".$idioma->getInididioma().\" - \".$idioma->getTxidinombre().\" \\n\";\n //$contador++;\n }\n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arEditoriales);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n $arEditoriales = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arEditoriales);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n $arEditoriales = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arEditoriales);\n }\n \n }", "title": "" }, { "docid": "09454ffe703dec975ee870c446f91422", "score": "0.6269409", "text": "function ListadoDetalladoOcupacion() {\n \n /*\n * Llenado de Salas Despachos Media y Completa\n */\n \n foreach($this->_serviciosOcupacion as $servicio){\n if($servicio['Tipo'] == 'Sala'){\n if($servicio['Tiempo'] == 'Media'){\n $serviciosOcupacionSalaMedia[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE);\n }\n if($servicio['Tiempo'] == 'Completa'){\n $serviciosOcupacionSalaCompleta[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE); \n }\n }\n if($servicio['Tipo'] == 'Despacho'){\n if($servicio['Tiempo'] == 'Media'){\n $serviciosOcupacionDespachoMedia[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE); \n }\n if($servicio['Tiempo'] == 'Completa'){\n $serviciosOcupacionDespachoCompleta[$servicio['Nombre']] = \n $this->cuentaServiciosPorMes($servicio['Nombre'], TRUE);\n }\n }\n }\n $datosOcupacionSalaMedia = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionSalaMedia as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionSalaMedia[$key] += $dato;\n \n $datosOcupacionSalaCompleta = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionSalaCompleta as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionSalaCompleta[$key] += $dato;\n \n $datosOcupacionDespachoMedia = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionDespachoMedia as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionDespachoMedia[$key] += $dato;\n \n $datosOcupacionDespachoCompleta = array_fill(0, $this->diferencia(), 0);\n foreach($serviciosOcupacionDespachoCompleta as $servicio)\n foreach($servicio as $key => $dato)\n $datosOcupacionDespachoCompleta[$key] += $dato;\n /*\n * Llenado datos despachos Hora\n */\n foreach($this->_horasDespacho as $servicio)\n $horasDespacho[$servicio] = $this->cuentaServiciosPorMes($servicio);\n \n $datosHorasDespacho = array_fill(0, $this->diferencia(), 0);\n foreach($horasDespacho as $servicio)\n foreach($servicio as $key => $dato)\n $datosHorasDespacho[$key] += $dato;\n \n \n \n /*\n * Ocupacion Puntual Salas\n */\n $totalSalaCompleta = array_sum($datosOcupacionSalaCompleta);\n $totalSalaMedia = array_sum($datosOcupacionSalaMedia);\n $totalDespachoCompleta = array_sum($datosOcupacionDespachoCompleta);\n $totalDespachoMedia = array_sum($datosOcupacionDespachoMedia);\n $totalSalas = $totalSalaCompleta + $totalSalaMedia;\n $totalDespachos = $totalDespachoCompleta + $totalDespachoMedia;\n \n $html = \"<h4><a name='puntualSalas'>Ocupación Puntual Salas</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Jornada Completa</td>\";\n foreach($datosOcupacionSalaCompleta as $key => $dato){\n $html .= \"<td class='ocupacion' id='Sala#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalSalaCompleta}</td>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Media Jornada</td>\";\n foreach($datosOcupacionSalaMedia as $key => $dato){\n $html .= \"<td class='ocupacion' id='Sala#Media#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalSalaMedia}</td>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Total</td>\";\n foreach($this->mesesRango() as $key => $mes){\n $totalMes = $datosOcupacionSalaCompleta[$key] + $datosOcupacionSalaMedia[$key];\n $html .= \"<td>{$totalMes}</td>\";\n }\n $html .= \"<td>{$totalSalas}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n /*\n * Ocupacion Puntual Despachos\n */\n $html .= \"<h4><a name='puntualDespachos'>Ocupación Puntual Despachos</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Jornada Completa</td>\";\n foreach($datosOcupacionDespachoCompleta as $key => $dato){\n $html .= \"<td class='ocupacion' id='Despacho#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalDespachoCompleta}</td>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Media Jornada</td>\";\n foreach($datosOcupacionDespachoMedia as $key => $dato){\n $html .= \"<td class='ocupacion' id='Despacho#Media#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalDespachoMedia}</td>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Total</td>\";\n foreach($this->mesesRango() as $key => $mes){\n $totalMes = \n $datosOcupacionDespachoCompleta[$key] + $datosOcupacionDespachoMedia[$key];\n $html .= \"<td>{$totalMes}</td>\";\n }\n $html .= \"<td>{$totalDespachos}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n \n /*\n * Despachos/Sala Horas\n */\n $totalHorasDespacho = array_sum($datosHorasDespacho);\n $html .= \"<h4><a name='despachosSalaHoras'>Despacho/Sala Horas</a></h4>\"; \n $html .= \"<table class='listadetallada'>\n <tr><th>&nbsp;</th>\";\n foreach($this->mesesRango() as $mes){\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\"; \n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $html .= \"<tr class='ui-widget-content celda'><td>Horas</td>\";\n foreach($datosHorasDespacho as $key => $dato){\n $html .= \"<td class='ocupacion' id='Horas#Completa#{$key}'>{$dato}</td>\";\n }\n $html .= \"<td>{$totalHorasDespacho}</td>\";\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n $html .= <<<EOD\n\t <script type=\"text/javascript\">\n\t \n \t$('.ocupacion').click(function(){\n \n \t\t$('.ocupacion').removeClass('ui-widget-header');\n \t\t$('.consumo').removeClass('ui-widget-header');\n \t\t$(this).addClass('ui-widget-header'); \n \t\t\n\t\t\t\t$('#dialog').html('');\n\t\t\t\t$('#dialog').dialog({ autoOpen: false, width: 600}); \t\t\t \n\t\t\t\t$.post('procesa.php',{ocupacion:this.id,inicial:$('#inicio').val(),fin:$('#fin').val()},function(data){ \n\t\t\t\t\t$('#dialog').html(data);\n \t\t\t}); \n\t\t \t\t$('.ocupacion').ajaxStop(function(){ $('#dialog').dialog('open');});\n\t\t\t});\n\t \n\t </script>\n \nEOD;\n \n return $html;\n }", "title": "" }, { "docid": "c86798f870365ff6105901d3803507a9", "score": "0.6267473", "text": "public function buscarTodo(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ProveedorDAO -> buscarTodo());\n $resList = array();\n while($res = $this -> Conexion -> extraer()){\n array_push($resList, new Proveedor($res[0], \"\", $res[1]));\n }\n $this -> Conexion -> cerrar();\n return $resList;\n }", "title": "" }, { "docid": "886e31f75fedf306d784c209059e1fdf", "score": "0.6263361", "text": "private function buscarSecciones() {\r\n\r\n\t\t\tlist($delim1,$delim2) = explode(\"*\", $this->delimitador_seccion);\r\n\t\t\t$desglose = explode($delim1, $this->archivo_leido);\r\n\t\t\tfor ($i=1; $i<count($desglose); $i++) { // desglose[0] nunca contendra una seccion\r\n\t\t\t\t$contenidoSeccion = trim($desglose[$i]);\r\n\t\t\t\t$inifin = substr($contenidoSeccion, 0, 3);\r\n\t\t\t\t$resto = trim(substr($contenidoSeccion, 3));\r\n\r\n\t\t\t\tlist($etiqueta, $contenido) = explode($delim2, $resto, 2);\r\n\t\t\t\t$etiqueta = trim($etiqueta);\r\n\t\t\t\t$contenido = trim($contenido);\r\n\r\n\t\t\t\tif ($inifin == \"INI\") {\r\n\t\t\t\t\t$this->secciones->add($etiqueta);\r\n\t\t\t\t} elseif ($inifin == \"FIN\") {\r\n\t\t\t\t\t$this->secciones->cerrar($etiqueta);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdie(\"ERROR: sintaxis incorrecta en secciones\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!$this->secciones->validar())\r\n\t\t\t\tdie(\"ERROR: sintaxis incorrecta en secciones\");\r\n\t\t}", "title": "" }, { "docid": "a9bbb2cee31481257fd30bc3399a5339", "score": "0.6166487", "text": "public function listadoDetalladoClientes ()\n {\n $html = \"\";\n $movimientos = $this->movimientos();\n $html .= $this->enlacesCategorias();\n foreach ($this->categorias() as $categoria) {\n $diferencia = array();\n $nombreCategoria = utf8_encode($categoria[\"Nombre\"]);\n $enlaceCategoria = urlencode($nombreCategoria);\n $idCategoria = ucfirst(strtolower($nombreCategoria));\n $movimiento = $movimientos[$nombreCategoria];\n $entradasInicial = \n $movimiento['acentradas'] - $movimiento['entradas'];\n $salidasInicial = \n $movimiento['acsalidas'] + $movimiento['salidas'];\n $arrayEntradas = \n $this->arrayEntradasClientes($nombreCategoria);\n $arraySalidas = \n $this->ArraySalidasClientes($nombreCategoria);\n \n /*\n\t\t\t * Inicio Tabla\n\t\t\t */\n $html .= \"<h4><a name='{$enlaceCategoria}'>{$nombreCategoria}</a></h4>\";\n $html .= \"<table class='listadetallada'>\";\n $html .= \"<tr><th >&nbsp;</th>\";\n foreach ($this->mesesRango() as $mes)\n $html .= \"<th class='datosdetallados'>{$mes}</th>\";\n $html .= \"</tr>\";\n \n /*\n\t\t\t * Entradas\n\t\t\t */\n $html .= '<tr class=\"ui-widget-content\">\n <td class=\"seccionlistadetallada\">Entradas</td>';\n foreach ($arrayEntradas as $key => $entrada) {\n if ($key >= 12) {\n $anyo = $this->anyoFinal;\n $month = $key - 11;\n } else {\n $anyo = $this->anyoInicial;\n $month = $key + 1;\n }\n \n $html .= \n \"<td id='{$nombreCategoria}#entrada#{$month}#{$anyo}' class='consumo'>{$entrada}</td>\";\n }\n $html .= \"</tr>\";\n \n /*\n\t\t\t * Salidas\n\t\t\t */\n $html .= \"<tr class='ui-widget-content'>\n <td class='seccionlistadetallada'>Salidas</td>\";\n foreach ($arraySalidas as $key => $salida) {\n if ($key >= 12) {\n $anyo = $this->anyoFinal;\n $month = $key - 11;\n } else {\n $anyo = $this->anyoInicial;\n $month = $key + 1;\n }\n $html .= \n \"<td id='{$nombreCategoria}#salida#{$month}#{$anyo}' class='consumo'>{$salida}</td>\";\n }\n $html .= \"</tr>\";\n \n /*\n\t\t\t * Entradas Acumuladas\n\t\t\t */\n $html .= \"<tr class='ui-widget-content'>\n <td class='seccionlistadetallada'>AC Entradas</td>\";\n $i = 0;\n foreach ($arrayEntradas as $entrada) {\n $entradasInicial += $entrada;\n $diferencia[$i ++] = $entradasInicial;\n $html .= \"<td>{$entradasInicial}</td>\";\n }\n $html .= \"</tr>\";\n \n /*\n\t\t\t * Salidas Acumuladas\n\t\t\t */\n $html .= \"<tr class='ui-widget-content'>\n <td class='seccionlistadetallada'>AC Salidas</td>\";\n $i = 0;\n foreach ($arraySalidas as $salida) {\n $salidasInicial -= $salida;\n $diferencia[$i ++] += $salidasInicial;\n $html .= \"<td>{$salidasInicial}</td>\";\n }\n $html .= \"</tr>\";\n \n /*\n\t\t\t * Diferencia\n\t\t\t */\n $html .= \"<tr class='ui-widget-content'>\n <td class='seccionlistadetallada'>Diferencia</td>\";\n foreach ($diferencia as $valor) {\n $html .= \"<td>{$valor}</td>\";\n }\n $html .= \"</tr>\";\n $html .= \"</table>\";\n $html .= \"<a class='enlacedetallada' href='#arriba'>Ir arriba</a>\";\n $html .= \"<br/><br/>\";\n unset($diferencia);\n }\n /*\n * Listado detallado de Ocupacion Puntual y despachos horas\n */\n $html .= $this->ListadoDetalladoOcupacion();\n $html .= <<<EOD\n <div id=\"dialog\">\n \t<div id=\"subcarga\">\n \t\t<img src='css/custom-theme/images/ajax-loader.gif' alt='Cargando' />\n \t</div>\n </div>\n <script type=\"text/javascript\">\n \t\t$('.consumo').click(function(){ \n \t\t\t$('.consumo').removeClass('ui-widget-header');\n \t\t\t$('.ocupacion').removeClass('ui-widget-header');\n \t\t\t\t$(this).addClass('ui-widget-header'); \n\t\t\t\tvar datos = this.id.split('#'); \n\t\t\t\tvar titulo = datos[1].toUpperCase() + 'S ' + datos[0] + ' ' + datos[2] +'-'+datos[3];\n\t\t\t\t$('#dialog').html('');\n\t\t\t\t$('#dialog').dialog({ autoOpen:false, title: titulo, width: 600 });\n\t\t\t\t$.post('procesa.php',{cliente:this.id},function(data){ \n\t\t\t\t\t$('#dialog').html(data);\n \t\t\t}); \n\t\t\t\t$('.consumo').ajaxStop(function(){ $('#dialog').dialog('open');});\t \n\t\t\t});\n </script>\nEOD;\n return $html;\n }", "title": "" }, { "docid": "e85bb87b26df7a54c89e89459060991a", "score": "0.6139853", "text": "public function getListAseguradora(){\n parent::conectar();\n $sql=\"SELECT * from Aseguradora\";\n $datos=parent::consultaArreglo($sql);\n return $datos;\n parent::cerrar();\n }", "title": "" }, { "docid": "90f926a4acd83ecd900c8700835ad3e5", "score": "0.61362815", "text": "function listarSolicitud(){\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_SOL_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\t\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t\t\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_solicitud','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_solicitud_ext','int4');\n\t\t$this->captura('presu_revertido','varchar');\n\t\t$this->captura('fecha_apro','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_funcionario_aprobador','int4');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('num_tramite','varchar');\n\t\t$this->captura('justificacion','text');\n\t\t$this->captura('id_depto','int4');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('extendida','varchar');\n\t\t\n\t\t$this->captura('posibles_proveedores','text');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('comite_calificacion','text');\n\t\t$this->captura('id_categoria_compra','int4');\n\t\t$this->captura('id_funcionario','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('fecha_soli','date');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('id_uo','integer');\n\t\t\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('desc_funcionario_apro','text');\n\t\t$this->captura('desc_uo','text');\n\t\t$this->captura('desc_gestion','integer');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_proceso_macro','varchar');\n\t\t$this->captura('desc_categoria_compra','varchar');\n\t\t$this->captura('id_proceso_macro','integer');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('desc_funcionario_rpc','text');\n\t\t$this->captura('obs','text');\n\t\t$this->captura('instruc_rpc','varchar');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('id_proveedor','integer');\n\t\t$this->captura('id_funcionario_supervisor','integer');\n\t\t$this->captura('desc_funcionario_supervisor','text');\n\t\t$this->captura('ai_habilitado','varchar');\n\t\t$this->captura('id_cargo_rpc','integer');\n\t\t$this->captura('id_cargo_rpc_ai','integer');\n\t\t$this->captura('tipo_concepto','varchar');\n\t\t$this->captura('revisado_asistente','varchar');\t\t\n\t\t$this->captura('fecha_inicio','date');\n\t\t$this->captura('dias_plazo_entrega','integer');\n\t\t$this->captura('obs_presupuestos','varchar');\n\t\t$this->captura('precontrato','varchar');\n\t\t$this->captura('update_enable','varchar');\n\t\t$this->captura('codigo_poa','varchar');\t\t\n\t\t$this->captura('obs_poa','varchar');\n\t\t$this->captura('contador_estados','bigint');\n\n\t\t$this->captura('nro_po','varchar');\n\t\t$this->captura('fecha_po','date');\n\t\t$this->captura('nro_cuotas','int4');\n\t\t$this->captura('fecha_ini_cot','date');\n\t\t$this->captura('fecha_ven_cot','date');\n\t\t$this->captura('proveedor_unico','boolean');\n $this->captura('fecha_fin','date');\n $this->captura('correo_proveedor','varchar');\n\n\t\t \n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d3ec554b584c13db0dc96bc365a27936", "score": "0.60975873", "text": "public function lista(){\n \t\n \t//define variaveis\n\t\t$limit = $this->limit;\n\t\t$busca = $this->busca;\n\t\t$categoria = $this->categoria;\n\t\t$destaque = $this->destaque;\n\t\t$ordem = $this->ordem;\n\n\t\t//retorno \n\t\t$dados = array();\n\t\t\n \t//FILTROS\n\t\t$query = \"SELECT * FROM noticia \";\n\t\t\n\t\t//se tiver busca ignora tudo e faz a busca\n\t\tif($busca != \"-\"){\n\t\t $query = \"SELECT * FROM noticia WHERE titulo LIKE '%$busca%' OR previa LIKE '%$busca%' \";\n\t\t} else {\n\t\t\t//se selecionou a categoria tem prioridade sobre o destaque\n\t\t\tif($categoria != 0){\n\t\t\t\t$query = \"SELECT * FROM noticia WHERE categoria='$categoria' \";\n\t\t\t} else {\n\t\t\t\t//destaque mostra todos os itens que estao marcados com destaque\n\t\t\t\tif($destaque != 0){\n\t\t\t\t\t$query = \"SELECT * FROM noticia WHERE destaque='$destaque' \";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//faz a busca no banco e retorno numero de itens para paginação\n\t\t$conexao = new mysql();\n\t\t$coisas_noticias = $conexao->Executar($query);\n\t\tif($coisas_noticias->num_rows) {\n\t\t $numitems = $coisas_noticias->num_rows;\n\t\t} else {\n\t\t $numitems = 0;\n\t\t}\n\t\t$dados['numitems'] = $numitems;\n\n\t\t$noticias = array();\n\t\t$mes = new model_datas();\n\n\t\t//ordena e limita aos itens da pagina\n\t\tif($ordem == 'rand'){\n\t\t\t$query .= \" ORDER BY RAND() LIMIT $limit\";\n\t\t} else {\n\t\t\t$query .= \" ORDER BY data desc LIMIT $limit\";\n\t\t}\n\n\t\t$conexao = new mysql();\n\t\t$coisas_noticias = $conexao->Executar($query);\n\t\t$n = 0;\n\t\twhile($data_noticias = $coisas_noticias->fetch_object()){\n\n\t\t\t//verfica se vai listar imagens\n\t\t\tif($this->imagens){\n\n\t\t\t\t$imagens = $this->imagens($data_noticias->codigo);\n\n\t\t\t\t$noticias[$n]['imagem'] = $imagens['principal'];\n\t\t\t\t$noticias[$n]['imagens'] = $imagens['lista'];\n\t\t\t\t\n\t\t\t}\n\n\t\t\t//verifica nome do grupo\n\t\t\t$conexao = new mysql();\n\t\t\t$coisas_noticias_cat = $conexao->Executar(\"SELECT titulo FROM noticia_grupo WHERE codigo='$data_noticias->categoria'\");\n\t\t\t$data_noticias_cat = $coisas_noticias_cat->fetch_object();\n\n\t\t\tif(isset($data_noticias_cat->titulo)){\n\t\t\t\t$noticias[$n]['categoria'] = $data_noticias_cat->titulo;\n\t\t\t\t$noticias[$n]['categoria_codigo'] = $data_noticias->categoria;\n\t\t\t} else {\n\t\t\t\t$noticias[$n]['categoria'] = \"\";\n\t\t\t\t$noticias[$n]['categoria_codigo'] = 0;\n\t\t\t}\n\n\t\t\tif($data_noticias->destaque){\n\n\t\t\t\t//verifica nome do grupo\n\t\t\t\t$conexao = new mysql();\n\t\t\t\t$coisas_noticias_des = $conexao->Executar(\"SELECT titulo FROM noticia_destaque WHERE codigo='$data_noticias->destaque'\");\n\t\t\t\t$data_noticias_des = $coisas_noticias_des->fetch_object();\n\t\t\t\t\n\t\t\t\t$noticias[$n]['destaque'] = $data_noticias_des->titulo;\n\t\t\t\t$noticias[$n]['destaque_codigo'] = $data_noticias->destaque;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$noticias[$n]['destaque'] = \"\";\n\t\t\t\t$noticias[$n]['destaque_codigo'] = 0;\n\t\t\t}\n\n\t\t\t//autor se tiver\n\t\t\tif($data_noticias->autor){\n\n\t\t\t\t$conexao = new mysql();\n\t\t\t\t$coisas_not_autor = $conexao->Executar(\"SELECT nome FROM noticia_autores WHERE codigo='$data_noticias->autor'\");\n\t\t\t\t$data_not_autor = $coisas_not_autor->fetch_object();\n\n\t\t\t\tif($data_not_autor->nome){\n\t\t\t\t\t$noticias[$n]['autor'] = $data_not_autor->nome;\n\t\t\t\t} else {\n\t\t\t\t\t$noticias[$n]['autor'] = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$noticias[$n]['autor'] = \"\";\n\t\t\t}\n\n\t\t\t//restante\n\t\t\t$noticias[$n]['id'] = $data_noticias->id;\n\t\t\t$noticias[$n]['codigo'] = $data_noticias->codigo;\n\t\t\t$noticias[$n]['titulo'] = $data_noticias->titulo;\n\t\t\t$noticias[$n]['previa'] = $data_noticias->previa;\n\t\t\t$noticias[$n]['data'] = date('d', $data_noticias->data).\" \".$mes->mes($data_noticias->data, 2).\" \".date('Y', $data_noticias->data);\n\t\t\t$noticias[$n]['data_cod'] = $data_noticias->data;\t\t\t \n\n\t\t$n++;\n\t\t}\n\t\t$dados['noticias'] = $noticias;\n\n\t\t//retorna para a pagina a array com todos as informações\n\t\treturn $dados;\n\t}", "title": "" }, { "docid": "686b8c1bfe76ded77ca9679dccd573b7", "score": "0.60926425", "text": "public function listarIdiomas(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $respuesta->setRespuesta(AccesoController::inExitoso);\n \n //echo \"Respuesta Idiomas: \".$respuesta->getRespuesta().\" \\n\";\n \n $idiomas = ManejoDataRepository::getListaIdiomas(); \n $idioma = new LbIdiomas();\n $arIdiomas = array();\n \n //$contador = 0;\n foreach ($idiomas as $idioma) {\n $arIdiomas[] = array(\"ididioma\"=>$idioma->getInididioma(), \"nomidioma\"=>utf8_encode($idioma->getTxidinombre()));\n //echo \"Idioma=\".$idioma->getInididioma().\" - \".$idioma->getTxidinombre().\" \\n\";\n //$contador++;\n }\n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arIdiomas);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n $arIdiomas = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arIdiomas);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n $arIdiomas = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arIdiomas);\n }\n \n }", "title": "" }, { "docid": "af63a8340aad213f4f987d404f2ad111", "score": "0.6083593", "text": "private function leeSucursal(){\r\n\t\t$xml_file= $this->SUCURSALES;\r\n\t\t$aux=array();\r\n\r\n\t\tif(!is_file($xml_file)) {\r\n\t\t\tdie(\"Error opening xml file\");\r\n\t\t}\r\n\r\n\t\t$dom = new DOMDocument(\"1.0\");\r\n\r\n\t\t$dom = new DomDocument;\r\n\t\t$dom->validateOnParse = true;\r\n\r\n\t\t$dom->load($xml_file);\r\n\t\t$params = $dom->getElementsByTagName('sucursal');\r\n\r\n\t\tforeach ($params as $param) {\r\n\t\t\t$aux[]=array('id'=>$param->getAttribute('id'),'nombre'=>$param->nodeValue);\r\n\t\t}\r\n\t\t$this->lista=$aux;\r\n\t}", "title": "" }, { "docid": "96f7cfbbce307692ea7c35934b862a9b", "score": "0.60401", "text": "public function traerTodosOcupacion() {\n $sql = \"SELECT * FROM ocupacion ORDER BY nombre\";\n\n $stmt = $this->conexion->prepare($sql);\n\n $stmt->execute();\n\n return $final = $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "c2f96bad134e4e2c8dfd865aa9bbc510", "score": "0.60356617", "text": "public function setList()\n {\n $this->OpenConnect(); // konexioa zabaldu - abrir conexión\n $sql = \"CALL spAllEditorial()\"; // SQL sententzia - sentencia SQL\n $this->list = array(); // objetuaren list atributua array bezala deklaratzen da - \n //se declara como array el atributo list del objeto\n \n $result = $this->link->query($sql); // result-en ddbb-ari eskatutako informazio dena gordetzen da\n // se guarda en result toda la información solicitada a la bbdd\n \n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\n $new=new self();\n $new->setIdEditorial($row['idEditorial']);\n $new->setNombreEditorial($row['nombreEditorial']);\n $new->setCiudad($row['ciudad']);\n \n require_once (\"libro_model.php\");\n /*\n * here we fill an array with all the books edited by the editorial,\n */\n $listaLibrosEditorial=new libro_model(); \n \n $new->objectLibros=$listaLibrosEditorial->findLibroPorIdEditorial($row['idEditorial']);\n // honek itzultzen digu editorial bateko liburu guztien zerrenda\n // elementu bakoitza \"libro objetu bat da\"\n \n array_push($this->list, $new); \n }\n mysqli_free_result($result); \n unset($listaLibrosEditorial);\n $this->CloseConnect();\n }", "title": "" }, { "docid": "26ad1cd86d43b485d463ae46b1c7d5cc", "score": "0.60319793", "text": "public function listar_secciones()\n {\n $sql = \" SELECT *\n FROM\n secciones AS b\";\n $datos = $this -> con -> consulta_retorno($sql);\n return $datos;\n }", "title": "" }, { "docid": "c412ace6524dfb08672b95030d99ca6e", "score": "0.60245657", "text": "public function mostrar()\n\t{\n\t\t$db = Db::conectar();\n\t\t$segundarazon = null;\n\t\t$select = $db->query('SELECT * FROM segundarazonbeca;');\n\t\tforeach ($select->fetchAll() as $segundarazon) {\n\t\t\t$mysegundarazonbeca = new Segundarazonbeca();\n\t\t\t$mysegundarazonbeca->setSegundaRazonBecaId($segundarazon['segundaRazonBecaId']);\n\t\t\t$mysegundarazonbeca->setSegundaRazonBeca($segundarazon['segundaRazonBeca']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecacodigo($segundarazon['segundarazonbecacodigo']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecaOculto($segundarazon['segundarazonbecaOculto']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecaAccion($segundarazon['segundarazonbecaAccion']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecafecha($segundarazon['segundarazonbecafecha']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecauser($segundarazon['segundarazonbecauser']);\n\t\t\t$mysegundarazonbeca->setSegundarazonbecabool($segundarazon['segundarazonbecabool']);\n\n\t\t\t$listasegundarazon[] = $mysegundarazonbeca;\n\t\t}\n\n\t\treturn $listasegundarazon;\n\t}", "title": "" }, { "docid": "2f0a939b53a4f463e07f92d57ed30d00", "score": "0.6015305", "text": "protected function listar() {\r\n\r\n\r\n\r\n\t\t$lista=\"\";\r\n\t\t//$valores_db = mysql_query();\r\n\r\n\t\t$query = \"SELECT * FROM chqclientes ORDER BY id DESC\";\r\n\r\n\t\t$valores_db = $this->model->query($query);\r\n\t\t$letra = \"B\";\r\n\r\n\r\n\r\n\t\twhile ($linha = mysql_fetch_array($valores_db)) {\r\n\r\n\t\t\tif ($letra==\"B\") {\r\n\t\t\t\t$letra=\"A\";\r\n\t\t\t}elseif ($letra==\"A\") {\r\n\t\t\t\t$letra = \"B\";\r\n\t\t\t}\r\n\r\n\t\t\t$cliente = $this->pegaDados(\"clientes\", $linha[\"cliente\"]);\r\n\r\n\t\t\t$compensados=0;\r\n\r\n\t\t\t\r\n\t\t\t//date[0] = dia\r\n\t\t\t//date[1] = mes\r\n\t\t\t//date[2] = ano\r\n\t\t\t$date = explode(\"-\", $linha[\"para\"]);\r\n\r\n\t\t\tif ($linha[\"quem\"]==\"\" && $linha[\"voltou\"]==0) {\r\n\t\t\t\t$total += $linha[\"valor\"];\r\n\t\t\t\t$qnt++;\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\tif($date[1]<=date(\"m\") && $date[2]<=date(\"Y\")){\r\n\r\n\t\t\t\t\tif ($date[1]==date(\"m\") && $date[0]<=date(\"d\")) {\r\n\t\t\t\t\t\t$compensados++;\r\n\t\t\t\t\t\t$numeros .= \",\".$linha[\"numero\"]; \r\n\t\t\t\t\t\t$vCompensados +=$linha[\"valor\"];\r\n\t\t\t\t\t}elseif ($date[1]<date(\"m\")) {\r\n\t\t\t\t\t\t$compensados++;\r\n\t\t\t\t\t\t$numeros .= \",\".$linha[\"numero\"];\r\n\t\t\t\t\t\t$vCompensados +=$linha[\"valor\"];\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$data = explode(\"-\", $linha[\"data\"]);\r\n\t\t\t$para = explode(\"-\", $linha[\"para\"]);\r\n\r\n\t\t\tif ($cliente[\"cidade\"]!=\"\") {\r\n\t\t\t\t$cidade = $this->pegaDadosCodigo(\"municipios\",$cliente[\"cidade\"]);\t\r\n\t\t\t}else{\r\n\t\t\t\t$cidade[\"nome\"] = \"xxxxx\";\r\n\t\t\t}\r\n\r\n\t\t\tif ($cliente[\"vendedor\"]!=\"\") {\r\n\t\t\t\t$vendedor = $this->pegaDados(\"funcionarios\",$cliente[\"vendedor\"]);\r\n\t\t\t}else{\r\n\t\t\t\t$vendedor[\"nome\"] = \"xxxxx\";\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t$lista.= \"\r\n\r\n\t\t\t<tr class='grade\".$letra.\"'>\r\n\t\t\t\t<td class='center'>\".$linha[\"id\"].\"</td>\r\n\t\t\t\t<td class='center'>\".$linha[\"numero\"].\"</td>\r\n\t\t\t\t<td class='center'><a href='\".URL.\"Clientes/Relatorio/\".$linha[\"cliente\"].\"' target='_blank'>\".html_entity_decode($cliente[\"nome\"]).\" - \".$cidade[\"nome\"].\"</a></td>\r\n\t\t\t\t<td class='center'>\".html_entity_decode($vendedor[\"nome\"]).\"</td>\r\n\t\t\t\t<td class='center'>\".html_entity_decode($linha[\"quem\"]).\"</td>\r\n\t\t\t\t<td class='center'>R$ \".number_format($linha[\"valor\"],2,\",\",\".\").\"</td>\r\n\t\t\t\t<td class='center'>\".$data[2].\"-\".$data[1].\"-\".$data[0].\"</td>\r\n\t\t\t\t<td class='center'>\".$para[2].\"-\".$para[1].\"-\".$para[0].\"</td>\r\n\t\t\t\t<td class='actBtns'>\r\n\t\t\t\t\t\";\r\n\t\t\t\t\tif ($linha[\"voltou\"]==0) {\r\n\t\t\t\t\t\t$lista.= \"\r\n\t\t\t\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Voltou/\".$linha[\"id\"].\"' title='Voltou' class='tipS'>\r\n\t\t\t\t\t\t\t<img src='\". Folder.\"images/icons/control/16/check.png' alt='' /> \r\n\t\t\t\t\t\t</a>\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$lista.= \"\r\n\t\t\t\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Pago/\".$linha[\"id\"].\"' title='Voltou' class='tipS'>\r\n\t\t\t\t\t\t\t<img src='\". Folder.\"images/icons/control/16/future-projects.png' alt='' /> \r\n\t\t\t\t\t\t</a>\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$lista.= \"\r\n\r\n\t\t\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Editar/\".$linha[\"id\"].\"' title='Editar' class='tipS'>\r\n\t\t\t\t\t\t<img src='\". Folder.\"images/icons/control/16/pencil.png' alt='' /> \r\n\t\t\t\t\t</a> \r\n\t\t\t\t\t<a href='\".URL.$_GET[\"var1\"].\"/Deletar/\".$linha[\"id\"].\"' title='Deletar' class='tipS'>\r\n\t\t\t\t\t\t<img src='\". Folder.\"images/icons/control/16/clear.png' alt='' />\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</td>\r\n\t\t\t</tr>\";\r\n\r\n\t\t}\r\n\r\n\t\tif ($vCompensados==0) {\r\n\t\t\t$vCompensados=\"0\";\r\n\t\t}\r\n\t\tif ($total==0) {\r\n\t\t\t$total=\"0\";\r\n\t\t}\r\n\r\n\t\t$this->view->compensados = $compensados;\r\n\t\t$this->view->numeros = $numeros;\r\n\t\t$this->view->vCompensados = $vCompensados;\r\n\t\t$this->view->total = $total.\" - \".$qnt.\" Cheques\";\r\n\t\t$this->view->lista = $lista;\r\n\r\n\t}", "title": "" }, { "docid": "9d44113d8cf55d7769f48ed484b5e5e2", "score": "0.5983921", "text": "public function listadoCSede(){\n\n\t\t$res = Admin::consultarCSede(\"novedad\");\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "51d2147c05ba50d275e0393b6997da86", "score": "0.59756255", "text": "function liste_salon_client()\r\n\t{\r\n\t\t\r\n\t\t$sql = \"SELECT\";\r\n\t\t$sql .= \" s.rowid, s.label\";\r\n\t\t$sql .= \" FROM `\".MAIN_DB_PREFIX.\"salon` as s\";\r\n\t\t$sql .= \" ORDER BY s.label ASC\";\r\n\t\t\r\n\t\t$resql = $this->db->query($sql);\r\n\t\t$nodes = '';\r\n\t\t$edges = '';\r\n\t\t$salons = array();\r\n\t\tif ($resql ){\r\n\t\t\t\r\n\t\t\tif( $this->db->num_rows($resql) !=0 ){\r\n\t\t\t\t$i=0;\r\n\t\t\t\t\r\n\t\t\t\t$obj = $this->db->fetch_object($resql);\r\n\t\t\t\t\t\r\n\t\t\t\t$nodes .= 'var nodes = ['.\"\\n\";//tableau des noeuds javascript\r\n\r\n\t\t\t\t\r\n\t\t\t\tdo{\r\n\r\n\t\t\t\t\t$nodes .= '{id: '.$i.', \"label\": \"'.$obj->label.'\", \"group\": 1},'.\"\\n\";//liste des salons\r\n\t\t\t\t\r\n\t\t\t\t\t$salons[$obj->rowid] = $i;\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}while($obj = $this->db->fetch_object($resql));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$sql = \"SELECT\";\r\n\t\t\t\t$sql .= \" x.fk_object,x.salon,s.nom\";\r\n\t\t\t\t$sql .= \" FROM `\".MAIN_DB_PREFIX.\"societe_extrafields` as x, `\".MAIN_DB_PREFIX.\"societe` as s\";\r\n\t\t\t\t$sql .= \" WHERE x.salon IS NOT NULL\";\r\n\t\t\t\t$sql .= \" AND x.fk_object = s.rowid\";\r\n\t\t\t\t\r\n\t\t\t\t$resql = $this->db->query($sql);\r\n\t\t\t\tif( $this->db->num_rows($resql) !=0 ){\r\n\t\t\t\t\t\t$obj = $this->db->fetch_object($resql);\r\n\t\t\t\t\t$edges .= 'var edges = ['.\"\\n\";//tableau des lignes javacript\r\n\t\t\t\t\t\r\n\t\t\t\t\tdo{\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t$nodes .= '{id: '.$i.', \"label\": \"'.$obj->nom.'\", \"group\": '.$i.'},'.\"\\n\";//liste des tiers rencontré sur un salon\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t$salon = explode(',',$obj->salon);\r\n\t\t\t\t\t\tfor($e=0 ; $e<count($salon) ; $e++){\r\n\t\t\t\t\t\t\t$edges .= ' {\"from\": '.$i.', \"to\": '.$salons[$salon[$e]].'},'.\"\\n\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$i++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}while($obj = $this->db->fetch_object($resql));\r\n\t\t\t\t\t$edges .= ' ];'.\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$nodes .= ' ];'.\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $nodes.$edges;\r\n\t}", "title": "" }, { "docid": "832ece64afc8b50f5c828b95ce6636e2", "score": "0.5959309", "text": "public function listarCursos()\n\t\t{\n\t\t\t$curso = new cursoBD();\n\t\t\t$plantilla = $this->leerPlantilla(\"aplicacion/vista/index.html\");\n\t\t\t$barraIzq = $this->leerPlantilla(\"aplicacion/vista/lateralIzquierdaDocente.html\");\n\t\t\t$barraIzq = $this->reemplazar($barraIzq, \"{{username}}\", $_SESSION[\"nombre\"]);\n\t\t\t$barraIzq = $this->reemplazar($barraIzq, \"{{fotoPerfil}}\", \"docente.png\");\n\t\t\t$plantilla = $this->reemplazar($plantilla, \"{{lateralIzquierda}}\", $barraIzq);\n\t\t\t$superiorDer = $this->leerPlantilla(\"aplicacion/vista/superiorDerecho.html\");\n\t\t\t$barraDer = $this->leerPlantilla(\"aplicacion/vista/listaCursos.html\");\n\t\t\t$posicion = $this->leerPlantilla(\"aplicacion/vista/posicionCurso.html\");\n\t\t\t$barraDer = $this->reemplazar($barraDer, \"{{superior}}\", $superiorDer);\n\t\t\t$footer = $this->leerPlantilla(\"aplicacion/vista/footer.html\");\n\t\t\t$cursos = $curso->listarCursos($_SESSION[\"nombre\"]);\n\t\t\t$tablaCurso = $this->leerPlantilla(\"aplicacion/vista/tablaCurso.html\");\n\t\t\t$tablas = \"\";\n\t\t\tfor($i=0;$i<sizeof($cursos);$i++){\n\t\t\t\t$cursoTemp = $tablaCurso;\n\t\t\t\t$tabla = \"\";\n\t\t\t\t$aux2 = $curso->obtenerAlumnos($cursos[$i]);\n\t\t\t\tfor($j=0;$j<sizeof($aux2);$j++){\n\t\t\t\t\t$aux = $posicion;\n\t\t\t\t\t$aux = $this->reemplazar($posicion, \"{{posicion}}\", ($j+1));\n\t\t\t\t\t$aux = $this->reemplazar($aux, \"{{username}}\", $aux2[$j][\"nombre\"]);\n\t\t\t\t\t$aux = $this->reemplazar($aux, \"{{nivel}}\", $aux2[$j][\"nivel\"]);\n\t\t\t\t\t$aux = $this->reemplazar($aux, \"{{subnivel}}\", $aux2[$j][\"subnivel\"]);\n\t\t\t\t\t$aux = $this->reemplazar($aux, \"{{puntaje}}\", $aux2[$j][\"puntaje\"]);\n\t\t\t\t\t$tabla = $aux.$tabla;\n\t\t\t\t}\n\t\t\t\t$cursoTemp = $this->reemplazar($cursoTemp, \"{{curso-nombre}}\", $cursos[$i]);\n\t\t\t\t$cursoTemp = $this->reemplazar($cursoTemp, \"{{tabla}}\", $tabla);\n\t\t\t\t$tablas .= $cursoTemp;\n\t\t\t}\n\t\t\t$barraDer = $this->reemplazar($barraDer, \"{{cursos}}\", $tablas);\n\t\t\t$plantilla = $this->reemplazar($plantilla, \"{{lateralDerecha}}\", $barraDer);\n\t\t\t$plantilla = $this->reemplazar($plantilla, \"{{footer}}\", $footer);\n\t\t\t$this->mostrarVista($plantilla);\n\t\t}", "title": "" }, { "docid": "f54287019f693e31305dd5450177b3d4", "score": "0.5945041", "text": "function listaTodosAniversariantesdeHojeControle(){\r\n require_once (\"control/dao.php\");\r\n \r\n $objDao = dao::getInstance();\r\n \r\n return $objDao->listaTodosAniversariantesdeHojeDao();\r\n \r\n }", "title": "" }, { "docid": "a8a9641f0796a2a3ae8a4ac96723a1e8", "score": "0.59390223", "text": "public static function TraerListaUsuarios()\r\n {\r\n \r\n $ListaDeUsuarios = array();\r\n //leo todos los productos del archivo\r\n $archivo=fopen(\"usuarios.txt\", \"r\");\r\n \r\n while(!feof($archivo))\r\n {\r\n if($archAux = fgets($archivo))\r\n {\r\n $Usuarios = explode(\"-\", $archAux);\r\n $Usuarios[0] = trim($Usuarios[0]);\r\n $Usuarios[1] = trim($Usuarios[1]);\r\n $Usuarios[2] = trim($Usuarios[2]);\r\n $Usuarios[3] = trim($Usuarios[3]);\r\n $Usuarios[4] = trim($Usuarios[4]);\r\n if($Usuarios[0] != \"\")\r\n {\t\t\t\t\r\n $ListaDeUsuarios[] = (new usuario($Usuarios[0], $Usuarios[1],$Usuarios[2],$Usuarios[3],$Usuarios[4]));\r\n }\r\n \r\n }\r\n } \r\n fclose($archivo);\r\n \r\n return $ListaDeUsuarios;\r\n }", "title": "" }, { "docid": "9209cca342022ed98783d592451f27f8", "score": "0.59338206", "text": "public function listarAutores(Solicitud $psolicitud)\n {\n $respuesta = new Respuesta(); \n $objLogica = $this->get('logica_service');\n try {\n //Valida que la sesión corresponda y se encuentre activa\n $respSesionVali= ManejoDataRepository::validaSesionUsuario($psolicitud);\n //echo \"<script>alert(' buscarEjemplares :: Validez de sesion \".$respSesionVali.\" ')</script>\";\n if ($respSesionVali==AccesoController::inULogged) \n { \n\n //SE INACTIVA PORQUE PUEDE GENERAR UNA GRAN CANTIDAD DE REGISTROS EN UNA SOLA SESION\n //Busca y recupera el objeto de la sesion:: \n //$sesion = ManejoDataRepository::recuperaSesionUsuario($usuario,$psolicitud);\n //echo \"<script>alert('La sesion es \".$sesion->getTxsesnumero().\" ')</script>\";\n //Guarda la actividad de la sesion:: \n //ManejoDataRepository::generaActSesion($sesion,AccesoController::inDatoUno,\"Recupera Feed de Ejemplares\".$psolicitud->getEmail().\" recuperados con éxito \",$psolicitud->getAccion(),$fecha,$fecha);\n //echo \"<script>alert('Generó actividad de sesion ')</script>\";\n \n $respuesta->setRespuesta(AccesoController::inExitoso);\n \n //echo \"Respuesta Idiomas: \".$respuesta->getRespuesta().\" \\n\";\n \n $autores = ManejoDataRepository::getListaAutores(); \n $autor = new LbAutores();\n $arAutores = array();\n \n //$contador = 0;\n foreach ($autores as $autor) {\n $arAutores[] = array(\"idautor\"=>$autor->getInidautor(), \"nomautor\"=>utf8_encode($autor->getTxautnombre()));\n //echo \"Idioma=\".$idioma->getInididioma().\" - \".$idioma->getTxidinombre().\" \\n\";\n //$contador++;\n }\n //echo \"esto es lo que hay en respuesta\";\n //print_r($respuesta);\n //echo $contador.\" - lugares hallados\";\n //$arIdiomas = array(\"Español\",\"Inglés\",\"Frances\",\"Alemán\",\"Ruso\",\"Portugues\",\n // \"Catalán\",\"Árabe\",\"Bosnio\",\"Croata\",\"Serbio\",\"Italiano\",\"Griego\",\"Turco\",\"Húngaro\",\"Hindi\");\n \n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arAutores);\n } else {\n $respuesta->setRespuesta($respSesionVali);\n $arAutores = array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arAutores);\n }\n } catch (Exception $ex) {\n $respuesta->setRespuesta(AccesoController::inPlatCai);\n $arAutores= array();\n return $objLogica::generaRespuesta($respuesta, $psolicitud, $arAutores);\n }\n \n }", "title": "" }, { "docid": "7a7e175234e1bd09d4ecc3a8e7c60c7a", "score": "0.5927884", "text": "public function mostrar()\n\t{\n\t\t$db = Db::conectar();\n\t\t$listasostenimiento = null;\n\t\t$select = $db->query('SELECT * FROM sostenimientos;');\n\t\tforeach ($select->fetchAll() as $sostenimiento) {\n\t\t\t$mysostenimiento = new Sostenimientos();\n\t\t\t$mysostenimiento->setIdSostenimiento($sostenimiento['idSostenimiento']);\n\t\t\t$mysostenimiento->setSostenimientoscodigo($sostenimiento['sostenimientoscodigo']);\n\t\t\t$mysostenimiento->setSostenimiento($sostenimiento['sostenimiento']);\n\t\t\t$mysostenimiento->setSostenimientosOculto($sostenimiento['sostenimientosOculto']);\n\t\t\t$mysostenimiento->setSostenimientosAccion($sostenimiento['sostenimientosAccion']);\n\t\t\t$mysostenimiento->setSostenimientosfecha($sostenimiento['sostenimientosfecha']);\n\t\t\t$mysostenimiento->setSostenimientosuser($sostenimiento['sostenimientosuser']);\n\t\t\t$listasostenimiento[] = $mysostenimiento;\n\t\t}\n\t\treturn $listasostenimiento;\n\t}", "title": "" }, { "docid": "2c7d3cdfcc08d31865f22cb402a4b29b", "score": "0.5911687", "text": "public function ListarInscritos(){\n\t\t\t$this->escolar=$_POST['escolar'];\n\t\t\t$this->grado=$_POST['grado'];\n\t\t\t$this->seccion=$_POST['seccion'];\n\t\t\tif(!empty($this->escolar) && empty($this->grado) && empty($this->seccion)){\n\t\t\t\t$sql=$this->db->query(\"SELECT a.id_alum, a.foto_carnet, a.cedula, a.nombres, a.apellidos, i.fecha, e.escolar, g.grado, s.seccion, i.condicion, i.id_inscripcion FROM inscripcion i INNER JOIN alumnos a ON i.id_alum=a.id_alum INNER JOIN escolar e ON i.id_escolar=e.id_escolar INNER JOIN grado g ON i.id_grado=g.id_grado INNER JOIN seccion s ON i.id_seccion=s.id_seccion WHERE i.id_escolar=$this->escolar ORDER BY a.cedula;\");\n\t\t\t}else if(!empty($this->escolar) && !empty($this->grado) && empty($this->seccion)){\n\t\t\t\t$sql=$this->db->query(\"SELECT a.id_alum, a.foto_carnet, a.cedula, a.nombres, a.apellidos, i.fecha, e.escolar, g.grado, s.seccion, i.condicion, i.id_inscripcion FROM inscripcion i INNER JOIN alumnos a ON i.id_alum=a.id_alum INNER JOIN escolar e ON i.id_escolar=e.id_escolar INNER JOIN grado g ON i.id_grado=g.id_grado INNER JOIN seccion s ON i.id_seccion=s.id_seccion WHERE i.id_escolar=$this->escolar AND i.id_grado=$this->grado ORDER BY a.cedula;\");\n\t\t\t}else if(!empty($this->escolar) && !empty($this->grado) && !empty($this->seccion)){\n\t\t\t\t$sql=$this->db->query(\"SELECT a.id_alum, a.foto_carnet, a.cedula, a.nombres, a.apellidos, i.fecha, e.escolar, g.grado, s.seccion, i.condicion, i.id_inscripcion FROM inscripcion i INNER JOIN alumnos a ON i.id_alum=a.id_alum INNER JOIN escolar e ON i.id_escolar=e.id_escolar INNER JOIN grado g ON i.id_grado=g.id_grado INNER JOIN seccion s ON i.id_seccion=s.id_seccion WHERE i.id_escolar=$this->escolar AND i.id_grado=$this->grado AND i.id_seccion=$this->seccion ORDER BY a.cedula;\");\n\t\t\t}\n\t\t\tif($this->db->rows($sql)>0){\n\t\t\t\tif($this->seccion!=\"\"){\n\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t<div class=\"col-md-2\">\n\t\t\t\t\t <p class=\"animated fadeInLeft\">\n\t\t\t\t\t \t<a class=\"btn btn-teal\" href=\"?view=inscripcion&mode=ListadoPdf&escolar=<?php echo $this->escolar;?>&grado=<?php echo $this->grado;?>&seccion=<?php echo $this->seccion;?>\" target=\"_blank\">Listado PDF <i class=\"fa fa-file-pdf-o\" aria-hidden=\"true\"></i></a>\n\t\t\t\t\t </p>\n\t\t\t\t\t </div>\n\t\t\t\t\t <div class=\"col-md-2\">\n\t\t\t\t\t <p class=\"animated fadeInLeft\">\n\t\t\t\t\t \t<a class=\"btn btn-teal\" href=\"?view=inscripcion&mode=ListadoExcel&escolar=<?php echo $this->escolar;?>&grado=<?php echo $this->grado;?>&seccion=<?php echo $this->seccion;?>\" target=\"_blank\">Listado Excel <i class=\"fa fa-file-excel-o\" aria-hidden=\"true\"></i></a>\n\t\t\t\t\t </p>\n\t\t\t\t\t </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\t<table id=\"datatables-example\" class=\"table table-striped table-bordered\" width=\"100%\" cellspacing=\"0\">\n \t\t<thead>\n \t\t\t<tr>\n \t\t\t<th style=\"width: 20px; text-align: center;\">N°</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Foto</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Cédula</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Nombres y Apellidos</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Fecha de Inscripción</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Año escolar</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Grado</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Sección</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Condición</th>\n \t\t<th style=\"text-align: center;\">Planilla</th>\t\t\n \t\t\t\t\t\t</tr>\n \t</thead>\n \t<tbody>\n \t\t<?php\n \t\t\t$contador=1;\n \t\t\twhile($data=$this->db->recorrer($sql)){\n \t\t\t\t?>\n \t\t\t\t\t<tr>\n\t\t \t\t\t\t\t<td style=\"width: 20px; text-align: center;\"><?php echo $contador;?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><img src=\"asset/images/<?php echo $data[1];?>\" class=\"img-circle avatar\" alt=\"user name\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"true\"/></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><a href=\"?view=alumno&mode=VerAlumno&id=<?php echo $data[0];?>\"><?php echo $data[2];?></a></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo $data[3].\" \".$data[4];?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo date(\"d-m-Y\", strtotime($data[5]));?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo $data[6];?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo $data[7];?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo $data[8];?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><?php echo $data[9];?></td>\n\t\t \t\t\t\t\t<td style=\"text-align: center;\"><a href=\"?view=inscripcion&mode=planillaInscripcion&id=<?php echo $data[10];?>\" target=\"_blank\"><i class=\"fa fa-file-pdf-o color-teal\" aria-hidden=\"true\"></i></a></td>\n\t\t \t\t\t\t</tr>\n \t\t\t\t<?php\n \t\t\t\t$contador++;\n \t\t\t}\n \t\t?>\n \t</tbody>\n \t</table>\n\t\t\t\t<?php\n\t\t\t}else{\n\t\t\t\t?>\n\t\t\t\t\t<table id=\"datatables-example\" class=\"table table-striped table-bordered\" width=\"100%\" cellspacing=\"0\">\n \t\t<thead>\n \t\t\t<tr>\n \t\t\t<th style=\"width: 20px; text-align: center;\">N°</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Foto</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Cédula</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Nombres y Apellidos</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Fecha de Inscripción</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Año escolar</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Grado</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Sección</th>\n \t\t\t\t\t\t\t<th style=\"text-align: center;\">Condición</th>\n \t\t<th style=\"text-align: center;\">Planilla</th>\t\t\n \t\t\t\t\t\t</tr>\n \t</thead>\n \t<tbody>\n \t\t<td colspan=\"10\" style=\"text-align: center;\">No hay registros.</td>\n \t</tbody>\n \t</table>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "de18c26968a21307efc6ca3d92569f0a", "score": "0.58954984", "text": "function listar_asignacion($objeto) {\n\t\t// Si el objeto viene vacio(llamado desde el index) se le asigna el $_REQUEST que manda el Index\n\t\t// Si no conserva su valor normal\n\t\t$objeto = (empty($objeto)) ? $_REQUEST : $objeto;\n\n\t\t$respuesta['status'] = 0;\n\n\t\t// Consulta los permisos del empleado y los regresa en un array\n\t\t$permisos = $_SESSION['permisos']['empleados'][$objeto['id']]['asignacion'];\n\n\t\t// Obtiene las mesas\n\t\t$respuesta['mesas'] = $_SESSION['permisos']['mesas'];\n\t\t//$mesas = $this -> repartidoresModel -> getTables2();\n\t\t//$respuesta['mesas'] = $mesas;\n\n\t\t// Comprueba si el empleado tiene permisos\n\t\tif (!empty($permisos)) {\n\t\t\t$respuesta['status'] = 1;\n\t\t\t$respuesta['permisos'] = explode(\", \", $permisos);\n\t\t} else {\n\t\t\t$respuesta['status'] = 2;\n\t\t}\n\n\t\techo json_encode($respuesta);\n\t}", "title": "" }, { "docid": "073eaaae655bda7cee75b31b2017d1ab", "score": "0.58935755", "text": "function listarObservaciones(){\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_SOLOBS_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_obs','int4');\n\t\t$this->captura('fecha_fin','timestamp');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('id_funcionario_resp','int4');\n\t\t$this->captura('titulo','varchar');\n\t\t$this->captura('desc_fin','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('codigo_tipo_estado','varchar');\n\t\t$this->captura('nombre_tipo_estado','varchar');\n\t\t$this->captura('nombre_tipo_proceso','varchar');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('desc_funcionario','text');\n\t\t$this->captura('email_empresa','varchar');\n\t\t$this->captura('desc_fun_obs','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t//var_dump($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\t\n\t}", "title": "" }, { "docid": "d885cfaddbd45483e192c0d199debfed", "score": "0.5891768", "text": "private function get_list(){\n $sql = \"SELECT * FROM szczegoly ORDER BY nazwa\";\n if($query = $this->connect()->query($sql)){\n\n $result = $query->fetchAll();\n $this->list = $result;\n } else {\n $this->error = 'Błąd połączenia z bazą';\n } \n }", "title": "" }, { "docid": "261f88b23d27565fefd43dfb81c570dd", "score": "0.58823407", "text": "static function listaStilova(){\n\t\t$stilovi=\"\";\n\t\treturn $stilovi;\n\t}", "title": "" }, { "docid": "7052c3b4188096de2374e71c96e4887e", "score": "0.5881139", "text": "public static function recuperartodo(){\r\n\t\t\t$consulta = \"SELECT * FROM v_alumnes_suscrits;\";\r\n\t\t\t$datos = Database::get()->query($consulta);//ejecutar la consulta\r\n\t\t\t$subs = array();\r\n\t\t\twhile($sub = $datos->fetch_object('SubscripcionModel'))\r\n\t\t\t\t$subs[] = $sub;\r\n\t\t\t$datos->free();\t\t\t//liberar memoria\r\n\t\t\treturn $subs;\r\n\t\t}", "title": "" }, { "docid": "2ec65e0ae11e0833fcc6aaba1bea6b51", "score": "0.5869843", "text": "function Listar($desde, $hasta){\r\n\tif(($desde!=null)and($hasta!=null)){\r\n\t\t$cont=0;\r\n\t\t//consulto maestro\r\n\t\t$rows=Maestro::getMaestro2(2,$desde,$hasta);\r\n\t\tif($rows->rowCount()!=0){\r\n\t\t\tforeach ($rows as $row) {\r\n\r\n\t\t\t\t$cont=$cont+1;\r\n\t\t\t\t//Cuota_Fija\r\n\t\t\t\t$rows1=Cuo_Fija::getCuo_Fija(0,$row['CONTRATO']);\r\n\t\t\t\tif($rows1->rowCount()!=0){\r\n\t\t\t\t\t$row1=$rows1->fetch(); $IMPORTE=$row1['IMPORTE']; \r\n\t\t\t\t}\r\n\t\t\t\telse { $IMPORTE=0; }\r\n\t\t\t\t\r\n\t\t\t\t//Grupo\r\n\t\t\t\tswitch ($row['GRUPO']) {\r\n\t\t\t\t\tcase 6 : $pago = \"POLICIA\"; break;\r\n\t\t\t\t\tcase 666 : $pago = \"POLICIA\"; break;\r\n\t\t\t\t\tcase 1000 : \r\n\t\t\t\t\t\t\t\tswitch ($row[\"ZONA\"]) {\r\n\t\t\t\t\t\t\t\t\tcase 1 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 3 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 5 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 60 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 99 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tdefault : $pago = \"COBRADOR\"; break;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1001 : \r\n\t\t\t\t\t\t\t\tswitch ($row[\"ZONA\"]) {\r\n\t\t\t\t\t\t\t\t\tcase 1 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 3 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 5 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 60 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tcase 99 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\t\t\t\tdefault : $pago = \"COBRADOR\"; break;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 8500 : $pago = \"OFICINA\"; break;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault : $pago = \"DEBITO\"; break;\r\n\r\n\t\t\t\t}\r\n\t\t\t\t//Productor\r\n\t\t\t\t$rows2=Productor::getProductor(0,$row['PRODUCTOR']);\r\n\t\t\t\tif($rows2->rowCount()!=0){\r\n\t\t\t\t\t$row2=$rows2->fetch(); $prod=$row2['DESCRIP']; \r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$prod=\" \"; \r\n\t\t\t\t}\r\n\t\t\t\t//Listar\r\n\t\t\t\techo \"<tr>\"\r\n\t\t\t\t.\"<td>\".$row['CONTRATO'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['NRO_DOC'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['APELLIDOS'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['NOMBRES'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['ALTA'].\"</td>\"\r\n\t\t\t\t.\"<td>$ \".$IMPORTE.\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['TELEFONO'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$pago.\"</td>\"\r\n\t\t\t\t.\"<td>\".$prod.\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['ADHERENTES'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['PLAN'].\"</td>\"\r\n\t\t\t\t.\"<td>\".$row['SUB_PLAN'].\"</td>\"\r\n\t\t\t\t.\"</tr>\";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\techo \"<tr><td colspan='10'>CONSULTA VACIA</td></tr>\";\r\n\t}\r\n}", "title": "" }, { "docid": "1db50514c1ed49cc2684dcbd4d7dc40e", "score": "0.5869296", "text": "public function listarInscripciones()\n {\n if (isset($_SESSION['rol_id'])) {\n // Almacenamos en el array 'parametros[]'los valores que vamos a mostrar en la vista\n $parametros = [\n \"datos\" => NULL,\n \"mensajes\" => []\n ];\n // Realizamos la consulta y almacenamos los resultados en la variable $resultModelo\n $resultModelo = $this->modelo->listadoInscripciones();\n\n if ($resultModelo[\"correcto\"]) {\n $parametros[\"datos\"] = $resultModelo[\"datos\"];\n\n $this->mensajes[] = [\n \"tipo\" => null,\n \"mensaje\" => null\n ];\n } else {\n $this->mensajes[] = [\n \"tipo\" => \"danger\",\n \"mensaje\" => \"El listado no pudo realizarse correctamente!! :( <br/>({$resultModelo[\"error\"]})\"\n ];\n }\n\n $parametros[\"mensajes\"] = $this->mensajes;\n $this->view->show(\"ListarClasesInscritas\", $parametros);\n } else {\n $this->view->show(\"inicio\");\n }\n }", "title": "" }, { "docid": "2b95e15f2c2130e5c52320a2db53db56", "score": "0.58572143", "text": "function listarDisp(){\n \t\n $sCampos=\" la50_i_atributo as item\";\n $sSql = cl_lab_examedisp::sql_query(\"\",$sCampos,\"\",\" la42_i_exame=$this->iExame \");\n $rResult = cl_lab_examedisp::sql_record($sSql);\n $aLista=Array();\n if ($rResult != false) {\n $oLista = db_utils::getColectionByRecord($rResult);\n for($x=0; $x < count($oLista); $x++){\n $aLista[$x]=$oLista[$x]->item;\n }\n $this->atributosdisp = $aLista;\n }\n }", "title": "" }, { "docid": "a63bbadb3638ed82baae506ec94e3825", "score": "0.58462447", "text": "function anticiposlista(){\n\t\t$sql = $this->query(\"select p.id,m.Cuenta from cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%'\n\t\tgroup by p.id\");\n\t\t$ids = \"0\";\n\t\twhile($r = $sql->fetch_assoc()){\n\t\t\t$deudor = $this->deudorNombre($r['id']);\n\t\t\t$cargodeudor = $this->cargosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$abonodeudor = $this->abonosDeudor($r['id'], $r['Cuenta']);\n\t\t\t$totalabono = $abonodeudor['abono'] + $deudor['cargo'];\n\t\t\tif(number_format($cargodeudor['cargo'],2) < number_format($totalabono,2) ){\n\t\t\t\t$total = $totalabono-$cargodeudor['cargo'];\n\t\t\t}else {$total =0; }\n\t\t\tif($total!=0 || ($abonodeudor['abono']==0 and $cargodeudor['cargo']==0)){\n\t\t\t\t$ids.=\",\".$r['id'];\n\t\t\t}\n\t\t}\n\t\t$sql2 = $this->query(\"select p.*,c.description from cont_polizas p,cont_movimientos m,cont_accounts c where \n\t\tp.Anticipo=1 and p.activo=1 and p.eliminado=0 and p.id=m.idPoliza and m.Activo=1 and m.Cuenta=c.account_id and m.TipoMovto like 'Cargo%'\n\t\tand p.id in ($ids)\");\n\t\treturn $sql2;\n\t}", "title": "" }, { "docid": "0d7db67aeb8d5660c11c9dd823df056e", "score": "0.5838926", "text": "function listar_mesas($objeto) {\n\t\t// Si el objeto viene vacio(llamado desde el index) se le asigna el $_REQUEST que manda el Index\n\t\t// Si no conserva su valor normal\n\t\n\t\t$objeto = (empty($objeto)) ? $_REQUEST : $objeto;\n\t/*\n\n\t\t// Valida que las mesas sean consultadas por primera vez\n\t\tif (empty($_SESSION['permisos']['mesas'])) {\n\t\t\t// Consulta las mesas y las regresa en un array\n\t\t\t$mesas = $this -> repartidoresModel -> getTables($objeto);\n\t\t\t$mesas = $mesas['rows'];\n\n\t\t\t$_SESSION['permisos']['mesas'] = $mesas;\n\t\t} else {\n\t\t\t$mesas = $_SESSION['permisos']['mesas'];\n\t\t}\n\t\t//echo json_encode($mesas);\n\t\t//exit();\n\t*/\n\t\t$mesas = $this -> repartidoresModel -> getTables($objeto);\n\t\t$mesas = $mesas['rows'];\n\n\t\t$_SESSION['permisos']['mesas'] = $mesas;\n\t\trequire ('views/repartidores/listar_mesas.php');\n\t}", "title": "" }, { "docid": "4f5742352add5fdc633cfa200a0ecf98", "score": "0.5836426", "text": "public function listar(){\n\t\t\t$usuario=Login::getUsuario();\n\t\t\tif(!$usuario) throw new Exception('Operació vàlida només usuaris enregistrats i Administradors');\n\t\t\tif($usuario->admin){\n\t\t\t\tif(!empty($_POST['filtrarea'])){\n\t\t\t\t\t$filtro=$_POST['filtroarea'];\n\t\t\t\t\t$subs = SubscripcionModel::recuperarfiltro($filtro);\n\t\t\t\t}else\t//recuperamos todas \n\t\t\t\t$subs = SubscripcionModel::recuperartodo();\n\t\t\t}elseif($usuario){\n\t\t\t\t//recuperamos las del usuario\n\t\t\t\t$subs = SubscripcionModel::recuperar($usuario->id);\n\t\t\t}\n\t\t\t//mostrar la vista de lista de subscripcions\n\t\t\t$datos = array();\n\t\t\t$datos['usuario'] = Login::getUsuario();\n\t\t\t$datos['subs'] = $subs;\n\t\t\t$this->load_view('view/subscripcions/lista.php', $datos);\n\t\t}", "title": "" }, { "docid": "6d536b66003ad8b2f7db555c2762830e", "score": "0.5824147", "text": "function muestraProductosSesion($cesta){\n\n foreach($cesta->getCesta() as $producto){\n \n echo \"<tr>\";\n\n echo \"<td>\".$producto->getCodigo().\"</td>\";\n echo \"<td>\".$producto->getNombre().\"</td>\";\n echo \"<td>\".$producto->getNombreCorto().\"</td>\";\n echo \"<td>\".$producto->getPrecio().\"</td>\";\n\n echo \"</tr>\";\n\n }\n\n }", "title": "" }, { "docid": "32a79cff7d91d32178b4cbaa832a1191", "score": "0.5809529", "text": "public function Select(){\n\t\t\t//Query para selecionar a tabela contatos\n\t\t\t$sql=\"SELECT * FROM tbl_slide_saude ORDER BY id_slide_saude DESC;\";\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t//Executa o select no banco de dados e guarda o retorno na variavel select\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Contador\n\t\t\t$cont = 0;\n\n\t\t\t//Estrutura de repetição para pegar dados\n\t\t\twhile ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t#Cria um array de objetos na classe contatos\n\t\t\t\t$lista_slide_saude[] = new Slide_saude();\n\n\t\t\t\t// Guarda os dados no banco de dados em cada indice do objeto criado\n\t\t\t\t$lista_slide_saude[$cont]->id_slide_saude = $rs['id_slide_saude'];\n\t\t\t\t$lista_slide_saude[$cont]->slide = $rs['imagem'];\n $lista_slide_saude[$cont]->status = $rs['status'];\n $lista_slide_saude[$cont]->ativo = $rs['ativo'];\n\n\t\t\t\t// Soma mais um no contador\n\t\t\t\t$cont+=1;\n\t\t\t}\n\n\t\t\t$conex::Desconectar();\n\n\t\t\t//Apenas retorna o $list_contatos se existir dados no banco de daos\n\t\t\tif (isset($lista_slide_saude)) {\n\t\t\t\t# code...\n\t\t\t\treturn $lista_slide_saude;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "03b454c2b4a6887903c26939612370b7", "score": "0.5807429", "text": "public function Out_listAction_Out ()\n {\n $expoMapper = new Core_Model_Mapper_Tblexpos;\n $expoList = $expoMapper->fetchAll(null, array('clause' => 'enligne = ?', \n 'params' => IS_PUBLISHED), \n 'dateajout DESC');\n \n /*\n [__id:Core_Model_Tblexpos:private] => 239\n [_idexpo:Core_Model_Tblexpos:private] => harley_davidson\n [_titre:Core_Model_Tblexpos:private] => Soirée Je veux une Harley \n [_sousTitre:Core_Model_Tblexpos:private] => \n [_annee:Core_Model_Tblexpos:private] => 2012\n [_idAlbums:Core_Model_Tblexpos:private] => \n [_idAuteurs:Core_Model_Tblexpos:private] => 1905, 1628\n [_idStats:Core_Model_Tblexpos:private] => 1205_harley\n [_date:Core_Model_Tblexpos:private] => Mercredi 23 mai 2012\n [_image:Core_Model_Tblexpos:private] => 1205_harley.jpg\n [_enligne:Core_Model_Tblexpos:private] => O\n [_dateajout:Core_Model_Tblexpos:private] => 2012-05-23 00:00:00\n */\n \n $resultSet = array();\n $utils = new Core_Service_Utilities;\n $auteurMapper = new Core_Model_Mapper_Tblauteurs;\n foreach($expoList as $expo){\n \n \n $result = new stdClass();\n $result->id = $expo->get_id();\n $result->idexpo = $expo->getIdexpo();\n $result->titre = str_replace('<br>', ' - ', strip_tags($expo->getTitre(), '<br>'));\n $result->soustitre = strip_tags($expo->getSousTitre(), '<br>');\n $result->annee = $expo->getAnnee();\n $result->enligne = $expo->getEnligne();\n $result->date = $expo->getDate();\n if(APPLICATION_ENV == 'development'){\n $result->imageUri = 'http://images.sceneario.com/expos/images_index/' . $expo->getImage();\n }else{\n $result->imageUri = '/images/expos/images_index/' . $expo->getImage();\n }\n \n \n if($expo->getIdAlbums() != ''){\n $idAlbums = explode(',', $expo->getIdAlbums());\n foreach($idAlbums as $idAlbum){\n $result->urlAlbum[] = $utils->getAlbumUrlFromId($idAlbum) ;\n }\n }\n \n if($expo->getIdAuteurs() != ''){\n $idAuteurs = explode(',', $expo->getIdAuteurs());\n foreach($idAuteurs as $idAuteur){\n $auteurInfos = $auteurMapper->find($idAuteur, new Core_Model_Tblauteurs);\n if($auteurInfos instanceof Core_Model_Tblauteurs){\n $result->auteurs[$idAuteur] = $auteurInfos->getPrenomAuteur() . ' ' . $auteurInfos->getNomAuteur() ;\n }\n }\n }\n\n $resultSet[] = $result;\n }\n \n /*\n * Resultat par page\n */\n $resultPerPageDefault = 10 ;\n $resulsPerPage = isset($_GET['results'])? $_GET['results'] : $_GET['results'] = $resultPerPageDefault ;\n $this -> view -> resultsPerPage = $resulsPerPage ;\n /*\n * Page requetée\n */\n $pageRequested = isset($_GET['page']) ? $_GET['page'] : 1 ;\n $this -> view -> pageRequested = $pageRequested;\n \n /*\n * Init de la pagination puis parametrage\n */\n $paginator = Zend_Paginator::factory($resultSet);\n $pageRequested = $paginator->setCurrentPageNumber($pageRequested);\n \n $paginator->setItemCountPerPage($resulsPerPage);\n \n $this->view->paginator = $paginator;\n \n $this->view->exposCount = count($expoList);\n \n }", "title": "" }, { "docid": "864203a38a7402c165b922b4edfa31aa", "score": "0.57992435", "text": "function getListaServiciosAsignados($datos) {\n $o_DRrhh = new DRrhh();\n $resultado = $o_DRrhh->getListasServiciosAsignados($datos);\n $resultadoArray = array();\n foreach ($resultado as $fila) {\n if ($fila[3] == '1') {\n if ($_SESSION[\"permiso_formulario_servicio\"][205][\"DESACTIVAR_SERVICIO_X_PUESTO\"] == 1) {\n $fila[4] = \"<a href='#' onclick=\\\"irActivaryDesactivarAsignacionxPuesto('\" . $fila[0] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/agt_action_success.png' title='Desactivar'/></a>\";\n } else {\n $fila[4] = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_success.png' title='Activado'/>\";\n }\n } else {\n if ($_SESSION[\"permiso_formulario_servicio\"][205][\"ACTIVAR_SERVICIO_X_PUESTO\"] == 1) {\n $fila[4] = \"<a href='#' onclick=\\\"irActivaryDesactivarAsignacionxPuesto('\" . $fila[0] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/agt_action_fail.png' title='Activar'/></a>\";\n } else {\n $fila[4] = \"<img src='../../../../fastmedical_front/imagen/icono/agt_action_fail.png' title='Desactivado'/>\";\n }\n }\n if ($_SESSION[\"permiso_formulario_servicio\"][205][\"ELIMINAR_SERVICIO_X_PUESTO\"] == 1) {\n $fila[5] = \"<a href='#' onclick=\\\"irEliminarAsignacion('\" . $fila[0] . \"');\\\"><img src='../../../../fastmedical_front/imagen/icono/delete.png' title='Eliminar Asignacion'/></a>\";\n }\n//$fila[6]=\"<a href='#' onclick=\\\"irAsignarAmbienteFisico('\".$fila[0].\"','\".$fila[2].\"');\\\"><img src='../../../../fastmedical_front/imagen/icono/gohome.png' title='Ambiente Fisico'/></a>\";\n array_push($resultadoArray, $fila);\n }\n return $resultadoArray;\n }", "title": "" }, { "docid": "83d7e1ac51a7918623480796e75928bb", "score": "0.5774096", "text": "public function listadoAcumuladoClientes ()\n {\n $html = <<<EOD\n <div class=\"serviciosAcumulados\">\n <table class=\"listaacumulada\">\n\t <tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<th colspan=\"2\">Anual</th>\n\t\t\t<th colspan=\"3\">Acumulado</th>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class=\"acumulada\">Categoria</th>\n\t\t\t<th class=\"datosacumulados\">Entradas</th>\n\t\t\t<th class=\"datosacumulados\">Salidas</th>\n\t\t\t<th class=\"datosacumulados\">Entradas</th>\n\t\t <th class=\"datosacumulados\">Salidas</th>\n\t\t\t<th class=\"datosacumulados\">Diferencia</th>\n\t\t</tr>\nEOD;\n foreach ($this->movimientos() as $key => $movimiento) {\n $entrada = \n urlencode(\"entrada#{$key}#{$this->anyoInicial}#{$this->anyoFinal}\");\n $salida = \n urlencode(\"salida#{$key}#{$this->anyoInicial}#{$this->anyoFinal}\");\n \n $html .= <<<EOD\n <tr class=\"ui-widget-content\">\n\t\t\t\t<td >{$key}</td>\n\t\t\t\t<td class=\"totales numero celdaServicio\" id=\"{$entrada}\">\n {$movimiento['entradas']} \n </td>\n\t\t\t\t<td class=\"totales numero celdaServicio\" id=\"{$salida}\">\n {$movimiento['salidas']}\n </td>\n\t\t\t\t<td class=\"numero\">\n {$movimiento['acentradas']}\n </td>\n\t\t\t\t<td class=\"numero\">\n {$movimiento['acsalidas']}\n </td>\n\t\t\t\t<td class=\"numero\">\n {$movimiento['diferencia']}\n </td>\n </tr>\nEOD;\n }\n /*Nueva seccion de las ocupaciones*/\n $ocupacionRango = $this->OcupacionPuntual();\n $ocupacionAcumulada = $this->OcupacionPuntual(TRUE);\n $idSalaCompleta = \n urlencode(\"Sala#Completa#100\");\n $idSalaMedia = \n urlencode(\"Sala#Media#100\");\n $idDespachoCompleta = \n urlencode(\"Despacho#Completa#100\");\n $idDespachoMedia = \n urlencode(\"Despacho#Media#100\");\n $idHorasOcupacion = \n urlencode(\"Horas#Completa#100\"); \n $html .=<<<EOD\n\t\t<tr class=\"ui-widget-content\">\n\t\t\t<th class=\"acumulada\">Tipo de Ocupación</th>\n\t\t\t<th class=\"datosacumulados\">Completa</th>\n\t\t\t<th class=\"datosacumulados\">Media</th>\n\t\t\t<th class=\"datosacumulados\">Completa</th>\n\t\t\t<th class=\"datosacumulados\">Media</th>\n\t\t\t<th class=\"datosacumulados\">&nbsp;</th>\n\t\t</tr>\n\t\t<tr class=\"ui-widget-content\">\n\t\t\t<td>Ocupacion Puntual Salas</td>\n\t\t\t<td class=\"puntual numero celdaServicio\" id=\"{$idSalaCompleta}\">\n {$ocupacionRango['salaCompleta']}\n </td>\n\t\t\t<td class=\"puntual numero celdaServicio\" id=\"{$idSalaMedia}\">\n {$ocupacionRango['salaMedia']}\n </td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t{$ocupacionAcumulada['salaCompleta']}\n\t\t\t</td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t{$ocupacionAcumulada['salaMedia']}\n\t\t\t</td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t&nbsp;\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr class=\"ui-widget-content\">\n\t\t\t<td>Ocupacion Puntual Despachos</td>\n\t\t\t<td class=\"puntual numero celdaServicio\" id=\"{$idDespachoCompleta}\">\n {$ocupacionRango['despachoCompleta']}\n </td>\n\t\t\t<td class=\"puntual numero celdaServicio\" id=\"{$idDespachoMedia}\">\n {$ocupacionRango['despachoMedia']}\n </td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t{$ocupacionAcumulada['despachoCompleta']}\n\t\t\t</td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t{$ocupacionAcumulada['despachoMedia']}\n\t\t\t</td>\n\t\t\t<td class=\"numero\">\n\t\t\t\t&nbsp;\n\t\t\t</td>\n\t\t</tr>\nEOD;\n \n /*Nueva seccion de despacho salas horas*/\n\t $horasDespachoSala = $this->HorasDespachoSala();\n\t $horasDespachoSalaAcumuladas = $this->HorasDespachoSala(TRUE);\n \n\t $html .=<<<EOD\n <tr>\n \t<th class=\"acumulada\">Despacho/Sala Horas</th>\n \t<th class=\"datosacumulados\" colspan=\"2\">D/S Horas</th>\n \t<th class=\"datosacumulados\" colspan=\"2\">D/S horas</th>\n \t<th class=\"datosacumulados\">&nbsp;</th>\n </tr>\n <tr class=\"ui-widget-content\">\n \t<td>Servicios Horas</td>\n \t<td class=\"puntual numero celdaServicio\" colspan=\"2\" id=\"{$idHorasOcupacion}\">\n \t {$horasDespachoSala}\n \t</td>\n \t<td class=\"numero\" colspan=\"2\">\n \t {$horasDespachoSalaAcumuladas}\n \t</td>\n \t<td>\n \t &nbsp;\n \t</td>\n </tr>\t\nEOD;\n /*Fin de la seccion de las ocupaciones y despachos salas/horas*/\n $html .= <<<EOD\n </table>\n </div>\n \n <div id=\"servicioDetallado\" class=\"serviciosAcumulados\"></div>\n <script type=\"text/javascript\">\n $('.totales').click(function(){ \n \t$('.numero').removeClass('ui-widget-header');\n \t$(this).addClass('ui-widget-header');\n \t\n \t$.post('procesa.php',{datos:this.id},function(data){ \n \t\t$('#servicioDetallado').html(data);\n \t});\n \t\t\n \t$('.totales').ajaxStop(function(){\n \tvar alto = $('#servicioDetallado').height() + $('.serviciosAcumulados').height() + 50;\n \t$('#resultado').height(alto)\n \t\t});\n \t});\n \t$('.puntual').click(function(){\n \t\t$('.numero').removeClass('ui-widget-header');\n \t$(this).addClass('ui-widget-header');\n \t\n \t$.post('procesa.php',{ocupacion:this.id,inicial:$('#inicio').val(),fin:$('#fin').val()},function(data){ \n \t\t$('#servicioDetallado').html(data);\n \t});\n \t\t\n \t$('.puntual').ajaxStop(function(){\n \tvar alto = $('#servicioDetallado').height() + $('.serviciosAcumulados').height() + 50;\n \t$('#resultado').height(alto)\n \t\t});\n \t});\n </script>\nEOD;\n \n return $html;\n }", "title": "" }, { "docid": "0a13af0b59126b3cef6be80a8f8a555d", "score": "0.577254", "text": "public function listar() {\r\n $anuncios = Anuncio::obtener_todos();\r\n\r\n //Inculir la vista \r\n require '../app/vistas/listar_anuncios.php';\r\n }", "title": "" }, { "docid": "e39255bbe4ec28ea449bbac6c4641fd0", "score": "0.5772084", "text": "function retornaListaNs($dados) {\n\n $resultado = new Siafi_Service_DadosExecucaoFinanceira();\n\n $listagem = new Simec_Listagem();\n $arrColunas = array('Data da Transação',\n 'UO da Origem',\n 'Nome da UO da Origem',\n 'UG da Origem',\n 'Nome da UG da Origem',\n 'Código da NS',\n 'CNPJ / CPF do Destino',\n 'Valor total (R$)');\n $listagem->setCabecalho($arrColunas)\n ->setDados($resultado->retornarListaNs($dados))\n ->addCallbackDeCampo('valortotal', 'mascaraMoeda')\n ->addCallbackDeCampo('cpfcnpjfavorecido', 'formataCpfCnpj')\n ->addCallbackDeCampo('unidsc', 'alinhaParaEsquerda')\n ->addCallbackDeCampo('ungdsc', 'alinhaParaEsquerda')\n ->turnOnPesquisator()\n ->addAcao('view', 'verNs')\n ->setTotalizador(Simec_Listagem::TOTAL_SOMATORIO_COLUNA, array('valortotal'))\n ->render(SIMEC_LISTAGEM::SEM_REGISTROS_MENSAGEM);\n}", "title": "" }, { "docid": "5c6b7462d1946e36cd5ee3a52cd7572b", "score": "0.5769593", "text": "public function listar()\n {\n $facturas_model = new Facturas_Model();\n $cliente_model = new Clientes_Model();\n\n session_start();\n //Le pedimos al modelo todos los Piezas\n $facturas = $facturas_model->readAll();\n $clientes_facturas = [];\n foreach ($facturas as $key => $factura) {\n $clientes_facturas[] = $cliente_model->read($factura->getCod_cliente());\n }\n //Pasamos a la vista toda la información que se desea representar\n if (isset($_SESSION['cliente'])) {\n $usuario[\"cliente\"] = $_SESSION['cliente'];\n }\n $variables = array();\n $usuario[\"usuario\"] = $_SESSION[\"usuario\"];\n $variables['facturas'] = $facturas;\n $variables['clientes_facturas'] = $clientes_facturas;\n\n //Finalmente presentamos nuestra plantilla\n $this->view->show(\"cabecera.php\");\n $this->view->show(\"plantilla_header.php\", $usuario);\n $this->view->show(RUTA_VISTAS . \"listar_header.php\");\n $this->view->show(RUTA_VISTAS . \"listar.php\", $variables);\n $this->view->show(\"plantilla_pie.php\");\n $this->view->show(\"pie.php\", $usuario);\n }", "title": "" }, { "docid": "532cb096496e77b521e81e09b9e0920b", "score": "0.5765276", "text": "public function traerTodosGenero() {\n $sql = \"SELECT * FROM genero ORDER BY nombre\";\n\n $stmt = $this->conexion->prepare($sql);\n\n $stmt->execute();\n\n return $final = $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "3dcc5a7cb21c3bb38f419fa83fed9a5a", "score": "0.57639956", "text": "function listaDesplegable($dwes){\n $sql = \"SELECT cod, nombre FROM tienda\";\n $resultado = $dwes->query($sql);\n if ($resultado) {\n $row = $resultado->fetch();\n while ($row != null) {\n $x =$row['cod'];\n $y = $row['nombre'];\n $_SESSION['cod']=$x;\n echo \"<option value='$x'>$y</option>\";\n $row = $resultado->fetch();\n }\n }\n \n\n }", "title": "" }, { "docid": "d4d67043fdef64c17496655674522d92", "score": "0.5762586", "text": "public function MuestraHijosP($id,$contar,$parametros=array()){\n\t\t$sql=\"select * from mos_arbol_procesos\n\t\t\t\tWhere parent_id = $id\";\n //echo $sql;\n\t\t//$resp = mysql_query($sql);\n $data = $this->dbl->query($sql, $atr);\n //print_r($data);\n $contador = 0;\n $data_hijo= array();\n\t\t$cabecera = \"<ul>\";\n foreach ($data as $arr) {//data-jstree='{ \\\"type\\\" : \\\"rojo\\\" }' \n $contador = array();\n $data_hijo = $this->MuestraHijosP($arr[id],$contar,$parametros);\n $extra .= \"<li id=\\\"phtml_\".$arr[id].\"\\\">\";\n switch ($contar) {\n case 1:\n $sql = \"SELECT COUNT(*) total \"\n . \"FROM mos_documentos_estrorg_arbolproc eao \"\n . \"INNER JOIN mos_documentos d ON d.IDDoc = eao.IDDoc \"\n . \"WHERE eao.id_organizacion_proceso IN (\". $this->BuscaOrgNivelHijos($arr[id]) . \") AND tipo = 'EO' AND d.vigencia = 'S' AND muestra_doc = 'S'\";\n $data_aux = $this->dbl->query($sql, $atr);\n $contador = $data_aux[0][total] + 0;\n $extra .= \"<a href=\\\"#\\\">\".($arr[title]).\" (\". ($contador) .\")</a>\";\n break;\n case 2:\n $sql = \"SELECT COUNT(DISTINCT(eao.IDDoc)) total \"\n . \"FROM mos_documentos_estrorg_arbolproc eao \"\n . \"INNER JOIN mos_documentos d ON d.IDDoc = eao.IDDoc \"\n . \"WHERE eao.id_organizacion_proceso IN (\". $this->BuscaOrgNivelHijos($arr[id]) . \") AND tipo = 'EO' AND d.vigencia = 'S' AND muestra_doc = 'S' AND formulario = 'S' \"\n . \" \"; \n $data_aux = $this->dbl->query($sql, $atr);\n $contador = $data_aux[0][total] + 0;\n //$cuerpo .= \"<a href=\\\"#\\\">\".($arrP[title]).\" (\". ($contador + $data_hijo[contador]) .\")</a>\";\n $extra .= \"<a href=\\\"#\\\">\".($arr[title]).\" (\". ($contador). \")</a>\";\n break;\n case 3:\n //print_r($arr);\n switch ($parametros[tipo_data]) {\n case 'YTD':\n $sql = \"SELECT \n count(id_organizacion) total,\n sum(case when estado=1 then 1 else 0 end) as atrasadas,\n sum(case when estado=2 then 1 else 0 end) as en_plazo,\n sum(case when estado=3 then 1 else 0 end) as realizada_atraso,\n sum(case when estado=4 then 1 else 0 end) as realizada\n FROM\n mos_acciones_correctivas\n where id_organizacion in ($arr[id]) and (fecha_generacion >= '\".date('Y').\"-01-01' or fecha_realizada is null)\"; \n $data_aux = $this->dbl->query($sql, $atr);\n\n break;\n\n default:\n break;\n }\n \n $contador[total] = $data_aux[0][total] + (isset($data_hijo[total])?$data_hijo[total]:0) ;\n $contador[atrasadas] = $data_aux[0][atrasadas] + (isset($data_hijo[atrasadas])?$data_hijo[atrasadas]:0) ;\n $contador[en_plazo] = $data_aux[0][en_plazo] + (isset($data_hijo[en_plazo])?$data_hijo[en_plazo]:0) ;\n $contador[realizada_atraso] = $data_aux[0][realizada_atraso] + (isset($data_hijo[realizada_atraso])?$data_hijo[realizada_atraso]:0) ;\n $contador[realizada] = $data_aux[0][realizada] + (isset($data_hijo[realizada])?$data_hijo[realizada]:0) ;\n\n \n $return[total] += $data_aux[0][total] + (isset($data_hijo[total])?$data_hijo[total]:0) ;\n $return[atrasadas] += $data_aux[0][atrasadas] + (isset($data_hijo[atrasadas])?$data_hijo[atrasadas]:0) ;\n $return[en_plazo] += $data_aux[0][en_plazo] + (isset($data_hijo[en_plazo])?$data_hijo[en_plazo]:0) ;\n $return[realizada_atraso] += $data_aux[0][realizada_atraso] + (isset($data_hijo[realizada_atraso])?$data_hijo[realizada_atraso]:0) ;\n $return[realizada] += $data_aux[0][realizada] + (isset($data_hijo[realizada])?$data_hijo[realizada]:0) ;\n //$cuerpo .= \"<a href=\\\"#\\\">\".($arrP[title]).\" (\". ($contador + $data_hijo[contador]) .\")</a>\";\n $extra .= \"<a href=\\\"#\\\">\".($arr[title]).\" ($contador[total];$contador[atrasadas];$contador[en_plazo];$contador[realizada_atraso];$contador[realizada] )</a>\";\n break;\n case 4:\n $sql=\"SELECT\n IFNULL(count(mos_registro_item.idRegistro),0) cant\n FROM\n mos_registro_item\n WHERE\n IDDoc= \".$_SESSION[IDDoc].\" and\n valor in (\".$this->BuscaOrgNivelHijos($arr[id]).\")\n and tipo = 12;\"; \n\n $data_aux = $this->dbl->query($sql, $atr);\n $contador='';\n if($data_aux[0][cant]>0) $contador=$data_aux[0][cant];\n //$cuerpo .= \"<a href=\\\"#\\\">\".($arrP[title]).\" (\". ($contador + $data_hijo[contador]) .\")</a>\";\n $extra .= \"<a href=\\\"#\\\">\".($arr[title]).\" (\". ($contador). \")</a>\";\n break;\n \n default:\n \n $extra .= \"<a href=\\\"#\\\">\".($arr[title]).\"</a>\";\n break;\n }\n\t\t\t$extra .= $data_hijo[html].\"\n\t\t\t\t\t\t</li>\";\t\t\n \n }\n\t\t$pie = \"</ul>\";\n //$return[contador] = $contador+$data_hijo[contador];\n $return[html] = $cabecera.$extra.$pie;\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "56dc2a533a2d1902c327db143f9d9714", "score": "0.57545865", "text": "public function listar() {\n $conexion = new Conexion();\n $consulta = $conexion->prepare('SELECT * FROM asignatura');\n $consulta->execute();\n $ces = null;\n $tabla_datos = $consulta->fetchAll(PDO::FETCH_ASSOC);\n $astraba = array();\n foreach ($tabla_datos as $con => $valor) {\n $ces = new pruebaDTO();\n $ces->setId($tabla_datos[$con][\"id\"]);\n $ces->setFecha($tabla_datos[$con][\"fecha\"]);\n $ces->setPorcentaje($tabla_datos[$con][\"porcentaje\"]);\n $ces->setId_prueba($tabla_datos[$con][\"id_prueba\"]);\n $ces->setId_unidad($tabla_datos[$con][\"id_unidad\"]);\n $ces->setId_tema($tabla_datos[$con][\"id_tema\"]);\n array_push($astraba, $ces);\n }\n return $astraba;\n }", "title": "" }, { "docid": "83b6503b793a880db55a60981cac48e3", "score": "0.5750488", "text": "function listarBoletaContrato(){\n\t\t$this->procedimiento='saj.f_tboleta_sel';\n\t\t$this->transaccion='SA_BOLETAPR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t//Definicion de la lista del resultado del query\n\t\t//$this->setParametro('id_proceso_contrato','id_proceso_contrato','integer');\n\t $this->setParametro('id_usuario','id_usuario','integer');\n\t\t$this->setParametro('tipoFiltro','tipoFiltro','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_boleta','int4');\n\t\t$this->captura('extension','varchar');\n\t\t$this->captura('doc_garantia','varchar');\n\t\t//$this->captura('id_alarma','int4');\n\t\t$this->captura('id_institucion_banco','int4');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('fecha_vencimiento','date');\n\t\t$this->captura('fecha_suscripcion','date');\n\t\t$this->captura('orden','int4');\n\t\t$this->captura('observaciones','varchar');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('tipo','varchar'); \n\t\t$this->captura('version','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_proceso_contrato','int4');\n\t\t$this->captura('fecha_ini','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','date');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','date');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n $this->captura('nombre','varchar');\n\t\t$this->captura('numero_contrato','varchar');\n\t\t$this->captura('desc_proveedor','varchar');\n\t\t$this->captura('doc_contrato','varchar');\n\t\t$this->captura('numero_requerimiento','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "95c68fc76ab66d77aa1f8948d7f3303f", "score": "0.5747066", "text": "function retornaListaOb($dados) {\n\n $resultado = new Siafi_Service_DadosExecucaoFinanceira();\n\n $listagem = new Simec_Listagem();\n $arrColunas = array('Data da Transação',\n 'UO da Origem',\n 'Nome da UO da Origem',\n 'UG da Origem',\n 'Nome da UG da Origem',\n 'Código da OB',\n 'CNPJ / CPF do Destino',\n 'Valor total (R$)');\n $listagem->setCabecalho($arrColunas)\n ->setDados($resultado->retornarListaOb($dados))\n ->addCallbackDeCampo('valortotal', 'mascaraMoeda')\n ->addCallbackDeCampo('cpfcnpjfavorecido', 'formataCpfCnpj')\n ->addCallbackDeCampo('unidsc', 'alinhaParaEsquerda')\n ->addCallbackDeCampo('ungdsc', 'alinhaParaEsquerda')\n ->turnOnPesquisator()\n ->addAcao('view', 'verOb')\n ->setTotalizador(Simec_Listagem::TOTAL_SOMATORIO_COLUNA, array('valortotal'))\n ->render(SIMEC_LISTAGEM::SEM_REGISTROS_MENSAGEM);\n}", "title": "" }, { "docid": "2314068ef80e46396df705545aa85cb3", "score": "0.5744694", "text": "public function tirarDados(){\n \n foreach($this->dados as $dado){\n $dado->tira();\n }\n \n }", "title": "" }, { "docid": "4627e4b33588cae742819d6db9e97f00", "score": "0.5744083", "text": "function listaCliente() {\n if($this->isLogged()) {\n $header = file_get_contents(\"plantilla/_header.html\");\n $this->getModel()->setDato('header', $header);\n $footer = file_get_contents(\"plantilla/_footer.html\");\n $this->getModel()->setDato('footer', $footer);\n $this->getModel()->setDato('archivo' , 'cliente/_listado_cliente.html');\n $linea = '<tr data-id=\"{{id}}\" data-name=\"{{name}} {{surname}}\">\n <td>{{name}}</td> \n <td>{{surname}}</td> \n <td>{{tin}}</td> \n <td>{{email}}</td> \n <td>\n <a href=\"client/editarCliente&id={{id}}\"\n data-toggle=\"tooltip\" title class=\"btn btn-effect-ripple btn-sm btn-success\" data-original-title=\"Ver más detalle\">\n <i class=\"fa fa-search\"></i> \n editar\n </a>\n </td> \n <td id=\"borrar\">\n <div data-toggle=\"tooltip\" title class=\"btn btn-effect-ripple btn-sm btn-danger\" data-original-title=\"Eliminar usuario\">\n <i class=\"fa fa-times\"></i> borrar\n </div>\n </td> \n </tr>';\n //$usuarios = $this->getModel()->getUsuarios();\n $page = Request::read('page');\n if($page === null){\n $page = 1;\n }\n $rows = $this->getModel()->countClientes();\n $rpp = 8;\n $pagination = new Pagination($rows , $page , $rpp);\n $clientes = $this->getModel()->getAllLimitClientes($pagination->getOffset() , $pagination->getRpp());\n $todo = '';\n foreach($clientes as $indice => $cliente) {\n $r = Util::renderText($linea, $cliente->getAttributesValues());\n $todo .= $r;\n }\n $this->getModel()->setDato('lineasUsuario', $todo);\n \n $clickPaginacion = '<li>\n <a title=\"Primero\" href=\"client/listaCliente&page=' . $pagination->getFirst() . '\" class=\"m-datatable__pager-link m-datatable__pager-link--first\">\n <i class=\"la la-angle-double-left\"></i></a>\n </li>\n <li>\n <a title=\"Anterior\" href=\"client/listaCliente&page=' . $pagination->getPrevius() . '\" class=\"m-datatable__pager-link m-datatable__pager-link--prev\">\n <i class=\"la la-angle-left\"></i></a></li>\n </li>';\n $rango = $pagination->getRange();\n foreach ($rango as $pagina) {\n $clickPaginacion .= '<li><a href=\"client/listaCliente&page=' . $pagina . '\" class=\"m-datatable__pager-link m-datatable__pager-link-number\">' . $pagina . '</a></li>';\n }\n $clickPaginacion .= '<li>\n <a title=\"Siguiente\" href=\"client/listaCliente&page=' . $pagination->getNext() . '\" class=\"m-datatable__pager-link m-datatable__pager-link--next\">\n <i class=\"la la-angle-right\"></i></a>\n </li>\n <li>\n <a title=\"Último\" href=\"client/listaCliente&page=' . $pagination->getLast() . '\" class=\"m-datatable__pager-link m-datatable__pager-link--last\" >\n <i class=\"la la-angle-double-right\"></i></a>\n </li>';\n $this->getModel()->setDato('clickPaginacion', $clickPaginacion);\n \n $this->getModel()->setDato('mensaje', $rows);\n \n } else {\n $this->index();\n }\n }", "title": "" }, { "docid": "0e42c2084dd2e0012384d1a44297f34e", "score": "0.574248", "text": "public function getEventos() {\n\n //Poner un were con el id del nivel porque asi solo los pertenecientes a ese nivel podran ver los eventos de ese nivel\n if (Auth::user()->hasRole('admin')) {\n $eventos = Evento::all();\n } else {\n //Primero buscamos los id que tienen el mismo nivel que el usuario y luego buscamos los eventos \n $id_eventos = DB::table('nivel_evento')->where('id_nivel', Auth::user()->miembro->nivel->id)->pluck('id_evento');\n $eventos = Evento::whereIn('id', $id_eventos->toArray())->get();\n }\n\n foreach ($eventos as $evento) {\n\n $evento->niveles;\n }\n\n return $eventos;\n }", "title": "" }, { "docid": "8f4f15991724945b2ebcf2c136fffa60", "score": "0.5737231", "text": "function listarGestion(){\n\t\t$this->procedimiento='param.ft_gestion_sel';// nombre procedimiento almacenado\n\t\t$this->transaccion='PM_GESTIO_SEL';//nombre de la transaccion\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->setParametro('estado','estado','varchar');\t\n\t\t//defino varialbes que se captran como retornod e la funcion\n\t\t$this->captura('id_gestion','integer');\n\t\t$this->captura('gestion','integer');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_reg','integer');\n $this->captura('id_usuario_mod','integer');\n $this->captura('desc_usureg','text');\n $this->captura('desc_usumod','text');\t\n\t\t\n\t\t//Ejecuta la funcion\n\t\t$this->armarConsulta();\n\t\t\n\t\t\n\t\t$this->ejecutarConsulta();\n//echo '---'.$this->getConsulta();\n\t\treturn $this->respuesta;\n\n\t}", "title": "" }, { "docid": "3a578b86466e7e7ffe4ddcc9289db4da", "score": "0.5736317", "text": "public function ListarOrdenados() {\n $consulta = $this->createQueryBuilder('p')\n ->where('p.estado = 1')\n ->orderBy('p.fechapublicacion', 'DESC');\n\n $lista = $consulta->getQuery()->getResult();\n return $lista;\n }", "title": "" }, { "docid": "b3ba92f16d662642a315f92fc97b1bd3", "score": "0.5733981", "text": "public function Listar() //Función para listar los extras\r\n\t {\r\n\t\t\t\t \r\n\t\t\t\t $this->Extras=array(); //Hay que vaciar el array de objetos extras\r\n\t\t\t\t \r\n\t\t\t\t $consulta=\"select * from extra\";\r\n\r\n $param=array(); //Creo un array para pasarle parámetros\r\n\r\n $this->Consulta($consulta,$param); //Ejecuto la consulta\r\n \t\t\t\r\n\t\t\t\t foreach ($this->datos as $fila) //Recorro el array de la consulta\r\n\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t $extra = new Extra(); //Creo un nuevo objeto\r\n //Le seteo las variables, y así me ahorro el constructor \r\n $extra->Id = $fila[\"Id\"]; //Accedo a la propiedad directamente\r\n\t\t\t\t\t $extra->__SET(\"Nombre\",$fila[\"Nombre\"]);\r\n\t\t\t\t\t $extra->__SET(\"Precio\",$fila[\"Precio\"]);\r\n \r\n $this->Extras[]=$extra; //Meto el extra en el array Extras\r\n\r\n\t\t\t\t }\r\n\t\t\t }", "title": "" }, { "docid": "2c2c189bec4fe8f5e3e6608565174273", "score": "0.57327586", "text": "public function ListaJueces() {\n $consultaListaJuez = $this->db->select(\"SELECT * FROM persona \" . \"WHERE tipoUsuario = '\" . 2 . \"' \");\n return $consultaListaJuez;\n }", "title": "" }, { "docid": "12cdcbedb948f6d86e87fc59516d37dc", "score": "0.5727964", "text": "public function lista()\n {\n $proveedor = $this->proveedormodel->obtenerproveedores();\n $lista = ['proveedor' => $proveedor];\n $this->vista('proveedor/viewlista', $lista);\n }", "title": "" }, { "docid": "c18db2d59f0c16ba3466d0bac1e4cc5b", "score": "0.57215303", "text": "private function cargar_Gestores(){\n\t\t$query = \"SELECT fk_usuario\n\t\t\t\t\tFROM clientes_rel_usuarios\n\t\t\t\t\tWHERE fk_cliente = '$this->id' \n\t\t\t\t\tORDER BY ha_insertado; \";\n\n\t\t$result = mysql_query($query);\n\n\t\t$this->gestores = array();\n\t\twhile($row = mysql_fetch_array($result))\n\t\t$this->gestores[] = $row['fk_usuario'];\n\t}", "title": "" }, { "docid": "16692511849a86e048c2c8f956ad5ee9", "score": "0.5719782", "text": "function listarDetalleBoletosWeb(){\r\n $this->procedimiento='obingresos.ft_detalle_boletos_web_sel';\r\n $this->transaccion='OBING_DETBOL_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->capturaCount('importe','numeric');\r\n $this->capturaCount('neto','numeric');\r\n $this->capturaCount('comision','numeric');\r\n\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_detalle_boletos_web','int4');\r\n $this->captura('billete','varchar');\r\n $this->captura('id_agencia','int4');\r\n $this->captura('id_periodo_venta','int4');\r\n $this->captura('id_moneda','int4');\r\n $this->captura('procesado','varchar');\r\n $this->captura('estado_reg','varchar');\r\n $this->captura('void','varchar');\r\n $this->captura('importe','numeric');\r\n $this->captura('nit','varchar');\r\n $this->captura('fecha_pago','date');\r\n $this->captura('razon_social','varchar');\r\n $this->captura('numero_tarjeta','varchar');\r\n $this->captura('comision','numeric');\r\n $this->captura('neto','numeric');\r\n $this->captura('entidad_pago','varchar');\r\n $this->captura('fecha','date');\r\n $this->captura('medio_pago','varchar');\r\n $this->captura('moneda','varchar');\r\n $this->captura('razon_ingresos','varchar');\r\n $this->captura('origen','varchar');\r\n $this->captura('nit_ingresos','varchar');\r\n $this->captura('endoso','varchar');\r\n $this->captura('conjuncion','varchar');\r\n $this->captura('numero_autorizacion','varchar');\r\n $this->captura('id_usuario_reg','int4');\r\n $this->captura('fecha_reg','timestamp');\r\n $this->captura('usuario_ai','varchar');\r\n $this->captura('id_usuario_ai','int4');\r\n $this->captura('id_usuario_mod','int4');\r\n $this->captura('fecha_mod','timestamp');\r\n $this->captura('usr_reg','varchar');\r\n $this->captura('usr_mod','varchar');\r\n $this->captura('pnr','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "f73def7d08b6656f2b2a1da3133f3abc", "score": "0.5715969", "text": "function listarBoleta(){\n\t\t$this->procedimiento='saj.f_tboleta_sel';\n\t\t$this->transaccion='SA_BOLETA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->setParametro('id_proceso_contrato','id_proceso_contrato','integer');\n\t\t\n\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_boleta','int4');\n\t\t$this->captura('extension','varchar');\n\t\t$this->captura('doc_garantia','varchar');\n\t\t//$this->captura('id_alarma','int4');\n\t\t$this->captura('id_institucion_banco','int4');\n\t\t$this->captura('fecha_fin','date');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('fecha_vencimiento','date');\n\t\t$this->captura('fecha_suscripcion','date');\n\t\t$this->captura('orden','int4');\n\t\t$this->captura('observaciones','varchar');\n\t\t$this->captura('monto','numeric');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('version','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_proceso_contrato','int4');\n\t\t$this->captura('fecha_ini','date');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','date');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','date');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n $this->captura('nombre','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "878e698547357c07c94e2a54423d9aa7", "score": "0.57154995", "text": "function retornaListaNe($dados) {\n\n $resultado = new Siafi_Service_DadosExecucaoFinanceira();\n\n $listagem = new Simec_Listagem();\n $arrColunas = array('Data da Transação',\n 'UO da Origem',\n 'Nome da UO da Origem',\n 'UG da Origem',\n 'Nome da UG da Origem',\n 'Código da NE',\n 'CNPJ / CPF do Destino',\n 'Valor total (R$)');\n $listagem->setCabecalho($arrColunas)\n ->setDados($resultado->retornarListaNe($dados))\n ->addCallbackDeCampo('valortotal', 'mascaraMoeda')\n ->addCallbackDeCampo('cpfcnpjfavorecido', 'formataCpfCnpj')\n ->addCallbackDeCampo('unidsc', 'alinhaParaEsquerda')\n ->addCallbackDeCampo('ungdsc', 'alinhaParaEsquerda')\n ->turnOnPesquisator()\n ->addAcao('view', 'verNe')\n ->setTotalizador(Simec_Listagem::TOTAL_SOMATORIO_COLUNA, array('valortotal'))\n ->render(SIMEC_LISTAGEM::SEM_REGISTROS_MENSAGEM);\n}", "title": "" }, { "docid": "8d4c96935406f8bd1b8fd4f28d9c1ff3", "score": "0.5713488", "text": "public function Select(){\n\t\t\t//Query para selecionar a tabela contatos\n\t\t\t//$sql=\"SELECT f.*, e.* FROM tbl_funcionario AS f INNER JOIN tbl_endereco AS e ON f.id_endereco = e.id_endereco WHERE ativo = 1;\";\n $sql=\"SELECT * FROM tbl_funcionario\";\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t//Executa o select no banco de dados e guarda o retorno na variavel select\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Contador\n\t\t\t$cont = 0;\n\n\t\t\t//Estrutura de repetição para pegar dados\n\n\t\t\twhile ($rs = $select->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t\t#Cria um array de objetos na classe contatos\n\n //var_dump($rs);exit();\n \n\t\t\t\t$listar_funcionario[] = new Funcionario();\n \n $listar_funcionario[$cont]->id_funcionario=$rs[\"id_funcionario\"];\n $listar_funcionario[$cont]->id_cargo=$rs[\"id_cargo\"];\n $listar_funcionario[$cont]->nome=$rs[\"nome\"];\n $listar_funcionario[$cont]->sobrenome=$rs[\"sobrenome\"];\n $listar_funcionario[$cont]->dt_nasc=$rs[\"dt_nasc\"];\n $listar_funcionario[$cont]->rg=$rs[\"rg\"];\n $listar_funcionario[$cont]->cpf=$rs[\"cpf\"];\n $listar_funcionario[$cont]->ativo=$rs[\"ativo\"];\n\n \n\t\t\t\t// Soma mais um no contador\n\t\t\t\t$cont+=1;\n\t\t\t}\n\n\t\t\t$conex::Desconectar();\n\n\t\t\t//Apenas retorna o $list_contatos se existir dados no banco de daos\n\t\t\tif (isset($listar_funcionario)) {\n\t\t\t\t# code...\n\t\t\t\treturn $listar_funcionario;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "9385dc2e64a27e744ec5e0a39f46a812", "score": "0.57102793", "text": "public function listePerso() {\n $idjoueur = CakeSession::read('nom')['id'];\n $data = $this->Fighter->afficherFighter($idjoueur);\n $this->set('list', $data);\n }", "title": "" }, { "docid": "9a5c4cd9802f5742b7625a2ca81c48fc", "score": "0.5703633", "text": "function lista()\n {\n $aCabeceras = $this->aCabeceras;\n $aDatos = $this->aDatos;\n $key = $this->ikey;\n $id_tabla = $this->sid_tabla;\n $clase = 'lista';\n //------------------------------------ html ------------------------------\n $Html = \"<table class=\\\"$clase\\\"><tr>\";\n foreach ($aCabeceras as $cabecera) {\n $Html .= \"<th>$cabecera</th>\";\n }\n $Html .= \"</tr>\";\n if (!empty($key)) {\n if (isset($aDatos[$key]) && is_array($aDatos[$key])) {\n $aDades = $aDatos[$key];\n } else {\n return \"<p>\" . _(\"no hay filas\") . \"</p>\";\n }\n } else {\n $aDades = $aDatos;\n }\n $Html .= \"<tbody class=\\\"$clase\\\">\";\n foreach ($aDades as $aFila) {\n $Html .= \"<tr>\";\n $clase = 'lista';\n if (!empty($aFila['clase'])) {\n $clase .= \" \" . $aFila['clase'];\n }\n foreach ($aFila as $col => $valor) {\n if ($col === \"clase\") {\n continue;\n }\n if ($col === \"order\") {\n continue;\n }\n if ($col === \"select\") {\n continue;\n }\n if ($col === \"sel\") {\n continue;\n }\n if (is_array($valor)) {\n $val = $valor['valor'];\n $td_id = empty($valor['id']) ? '' : \"id=\\\"\" . $valor['id'] . \"\\\"\";\n if (!empty($valor['ira'])) {\n $ira = $valor['ira'];\n $Html .= \"<td $td_id class=\\\"$clase\\\"><span class=link onclick=fnjs_update_div('#main','$ira') >$val</span></td>\";\n }\n if (!empty($valor['script'])) {\n $Html .= \"<td $td_id class=\\\"$clase\\\"><span class=link onclick=\\\"\" . $valor['script'] . \"\\\" >$val</span></td>\";\n }\n if (!empty($valor['span'])) {\n $Html .= \"<td $td_id class=\\\"$clase\\\" onclick=\\\"toggleFilterRow_$id_tabla()\\\" colspan=\\\"\" . $valor['span'] . \"\\\">$val</td>\";\n }\n if (!empty($valor['clase'])) {\n $Html .= \"<td $td_id class=\\\"$clase \" . $valor['clase'] . \"\\\">$val</td>\";\n }\n } else {\n $es_fecha = FALSE;\n // si es una fecha, pongo la clase fecha, para exportar a excel...\n $formato_fecha = DateTimeLocal::getFormat();\n if ($formato_fecha === 'd/m/Y') {\n if (preg_match(\"/^(\\d)+[\\/-](\\d)+[\\/-](\\d\\d)+$/\", $valor)) {\n list($d, $m, $y) = preg_split('/[:\\/\\.-]/', $valor);\n $es_fecha = TRUE;\n }\n }\n if ($formato_fecha === 'm/d/Y') {\n if (preg_match(\"/^(\\d)+[\\/-](\\d)+[\\/-](\\d\\d)+$/\", $valor)) {\n list($m, $d, $y) = preg_split('/[:\\/\\.-]/', $valor);\n $es_fecha = TRUE;\n }\n }\n if ($es_fecha) {\n $fecha_iso = date(\"Y-m-d\", mktime(0, 0, 0, $m, $d, $y));\n $clase = \"fecha $clase\";\n $Html .= \"<td class=\\\"$clase\\\" fecha_iso='$fecha_iso'>$valor</td>\";\n } else {\n $Html .= \"<td class=\\\"$clase\\\">$valor</td>\";\n }\n }\n }\n $Html .= \"</tr>\";\n }\n $Html .= \"</tbody></table>\";\n return $Html;\n }", "title": "" }, { "docid": "46603f89e41b04294c32767b42169f75", "score": "0.5699037", "text": "public function get_Lista_Sedes(){\n\t\t$array = array();\n\t\tforeach($this->sedes as $id)\n\t\t\tarray_push($array, new Sede ($id));\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "dabcc9e58c00057b638c0afa7fb98bc8", "score": "0.5694166", "text": "function CargarlistadoTodosCordinadoresFiltrado($datos) {\n\n if (isset($_SESSION[\"permiso_formulario_servicio\"][235][\"FILTRADO_BUSQUEDA_AREAS_X_COORDINADOR\"]) && ($_SESSION[\"permiso_formulario_servicio\"][235][\"FILTRADO_BUSQUEDA_AREAS_X_COORDINADOR\"] == 1)) {\n//activado\n $codEmpleado2 = '';\n } else {\n//desactivado\n $codEmpleado2 = $_SESSION['iCodigoEmpleado'];\n }\n\n\n\n parent::ConnectionOpen(\"CoordinadoresTurnos\", \"dbweb\");\n parent::SetParameterSP(\"accion\", '12');\n parent::SetParameterSP(\"iCodigoEmpleado\", $datos[\"IdcboSede\"]);\n parent::SetParameterSP(\"idSedeEmpresa\", $datos[\"txtNombreAreaAbuscar\"]);\n parent::SetParameterSP(\"idArea\", $codEmpleado2);\n parent::SetParameterSP(\"idSedeEmpresaArea\", '');\n parent::SetParameterSP(\"idPuestoEmpleadoPorArea\", '');\n parent::SetParameterSP(\"idPreProgramacionPersonal\", '');\n parent::SetParameterSP(\"mes\", '');\n parent::SetParameterSP(\"anno\", '');\n parent::SetParameterSP(\"user\", '');\n parent::SetParameterSP(\"host\", '');\n\n $resultado = parent::executeSPArrayX();\n parent::Close();\n return $resultado;\n }", "title": "" }, { "docid": "4eb8da7bdc6a99be683b24709c8622b1", "score": "0.5693984", "text": "private function buscarElementos() {\r\n\r\n\t\t\tlist($delim1,$delim2) = explode(\"*\", $this->delimitador_elemento);\r\n\t\t\t$desglose = explode($delim1, $this->archivo_leido);\r\n\t\t\tfor ($i=1; $i<count($desglose); $i++) { // desglose[0] nunca contendra un elemento\r\n\t\t\t\t$contenidoElemento = trim($desglose[$i]);\r\n\t\t\t\t$inifin = substr($contenidoElemento, 0, 3);\r\n\t\t\t\t$resto = trim(substr($contenidoElemento, 3));\r\n\r\n\t\t\t\tlist($etiqueta, $contenido) = explode($delim2, $resto, 2);\r\n\t\t\t\t$etiqueta = trim($etiqueta);\r\n\t\t\t\t$contenido = trim($contenido);\r\n\r\n\t\t\t\tif ($inifin == \"INI\") {\r\n\t\t\t\t\t$this->elementos->add($etiqueta, $contenido);\r\n\t\t\t\t} elseif ($inifin == \"FIN\") {\r\n\t\t\t\t\t$this->elementos->cerrar($etiqueta);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdie(\"ERROR: sintaxis incorrecta en elementos\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!$this->secciones->validar())\r\n\t\t\t\tdie(\"ERROR: sintaxis incorrecta en elementos\");\r\n\t\t}", "title": "" }, { "docid": "f96825f3d278c35982cc19ac2ce0ed71", "score": "0.5691203", "text": "function bottoneLista($fumetto){\n\t//print_r($fumetto[\"idSerie\"]);\n\tglobal $fumettiPosseduti;\n\tif(!isset($fumettiPosseduti))\n\t\t$fumettiPosseduti = getFumettiPosseduti($fumetto[\"idSerie\"]);\n\t//print_r($fumettiPosseduti);\n\tif($fumettiPosseduti && in_array($fumetto[\"idVolume\"], $fumettiPosseduti))\n\t\tbottoneRimuoviLista($fumetto[\"idVolume\"]);\n\telse\n\t\tbottoneAggiungiLista($fumetto[\"idVolume\"]);\n}", "title": "" }, { "docid": "0c32274b59dd4ca16c9ff41f509eea81", "score": "0.5686527", "text": "protected function corrigeReservas() {\n\n $oContrato = new Acordo($this->getAcordo());\n $iOrigemContrato = $oContrato->getOrigem();\n $oUltimaPosicao = $oContrato->getUltimaPosicao();\n $iAnousu = db_getsession(\"DB_anousu\");\n foreach ($oUltimaPosicao->getItens() as $oItem) {\n\n $oItem->removerReservas();\n if ($iOrigemContrato == 1 || $iOrigemContrato == 2) {\n\n $oOrigemItem = $oItem->getOrigem();\n if ($oOrigemItem->tipo == 1) {\n\n /**\n * Verificamos no processo de compras qual o codigo do item da solicitacao.\n */\n $oDaoPcProcitem = db_utils::getDao(\"pcprocitem\");\n $sSqlDadosDotacao = $oDaoPcProcitem->sql_query_dotac($oOrigemItem->codigo, \"pcdotac.*\");\n $rsDotacoes = $oDaoPcProcitem->sql_record($sSqlDadosDotacao);\n\n $oDaoReservalSolicitacao = db_utils::getDao(\"orcreservasol\");\n $oDaoReserva = db_utils::getDao(\"orcreserva\");\n if ($oDaoPcProcitem->numrows > 0) {\n\n for ($iDot = 0; $iDot < $oDaoPcProcitem->numrows; $iDot++) {\n\n $oDotacao = db_utils::fieldsMemory($rsDotacoes, $iDot);\n $oDotacaoSaldo = new Dotacao($oDotacao->pc13_coddot, $oDotacao->pc13_anousu);\n $nSaldoReservar = $oDotacao->pc13_valor;\n if (round($oDotacaoSaldo->getSaldoFinal() <= $oDotacao->pc13_valor, 2)) {\n $nSaldoReservar = $oDotacaoSaldo->getSaldoFinal();\n }\n if ($nSaldoReservar > 0 && $oDotacao->pc13_anousu >= $iAnousu) {\n\n $oDaoReserva->o80_anousu = $oDotacao->pc13_anousu;\n $oDaoReserva->o80_coddot = $oDotacao->pc13_coddot;\n $oDaoReserva->o80_dtini = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_dtfim = \"{$oDotacao->pc13_anousu}-12-31\";\n $oDaoReserva->o80_dtlanc = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_valor = $nSaldoReservar;\n $oDaoReserva->o80_descr = \"reserva de saldo\";\n $oDaoReserva->incluir(null);\n\n if ($oDaoReserva->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReserva->erro_msg}\";\n throw new Exception($sMessage);\n }\n\n $oDaoReservalSolicitacao->o82_codres = $oDaoReserva->o80_codres;\n $oDaoReservalSolicitacao->o82_solicitem = $oDotacao->pc13_codigo;\n $oDaoReservalSolicitacao->o82_pcdotac = $oDotacao->pc13_sequencial;\n $oDaoReservalSolicitacao->incluir(null);\n if ($oDaoReservalSolicitacao->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReservalSolicitacao->erro_msg}\";\n throw new Exception($sMessage);\n }\n }\n }\n }\n } else if ($oOrigemItem->tipo == 2) {\n\n /**\n * Verificamos na licitacao qual o codigo do item da solicitacao.\n */\n $oDaoLicLicitem = db_utils::getDao(\"liclicitem\");\n $sSqlDadosDotacao = $oDaoLicLicitem->sql_query_orc($oOrigemItem->codigo, \"pcdotac.*\");\n $rsDotacoes = $oDaoLicLicitem->sql_record($sSqlDadosDotacao);\n $oDaoReservalSolicitacao = db_utils::getDao(\"orcreservasol\");\n $oDaoReserva = db_utils::getDao(\"orcreserva\");\n if ($oDaoLicLicitem->numrows > 0) {\n\n for ($iDot = 0; $iDot < $oDaoLicLicitem->numrows; $iDot++) {\n\n $oDotacao = db_utils::fieldsMemory($rsDotacoes, $iDot);\n $oDotacaoSaldo = new Dotacao($oDotacao->pc13_coddot, $oDotacao->pc13_anousu);\n $nSaldoReservar = $oDotacao->pc13_valor;\n if (round($oDotacaoSaldo->getSaldoFinal() <= $oDotacao->pc13_valor, 2)) {\n $nSaldoReservar = $oDotacaoSaldo->getSaldoFinal();\n }\n if ($nSaldoReservar > 0 && $oDotacao->pc13_anousu >= $iAnousu) {\n\n $oDaoReserva->o80_anousu = $oDotacao->pc13_anousu;\n $oDaoReserva->o80_coddot = $oDotacao->pc13_coddot;\n $oDaoReserva->o80_dtini = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_dtfim = \"{$oDotacao->pc13_anousu}-12-31\";\n $oDaoReserva->o80_dtlanc = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoReserva->o80_valor = $nSaldoReservar;\n $oDaoReserva->o80_descr = \"reserva de saldo\";\n $oDaoReserva->incluir(null);\n\n if ($oDaoReserva->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReserva->erro_msg}\";\n throw new Exception($sMessage);\n }\n\n $oDaoReservalSolicitacao->o82_codres = $oDaoReserva->o80_codres;\n $oDaoReservalSolicitacao->o82_solicitem = $oDotacao->pc13_codigo;\n $oDaoReservalSolicitacao->o82_pcdotac = $oDotacao->pc13_sequencial;\n $oDaoReservalSolicitacao->incluir(null);\n if ($oDaoReservalSolicitacao->erro_status == 0) {\n\n $sMessage = \"Erro ao reservar saldo!\\n{$oDaoReservalSolicitacao->erro_msg}\";\n throw new Exception($sMessage);\n }\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "c83258a08bd5e994f3435cdf6cf428c9", "score": "0.5683281", "text": "function listar()\r\n{\r\n\t//arreglos para almacenar lo que arroje la base\r\n\t$id_serivice = array();\r\n\t$type = array();\r\n\t$price = array();\r\n\t//variable para almacenar el contenido html\r\n\t$html = \"<div class='row' id='backgroundMore'>\r\n\t\t\t\t<div class='col-lg-12' id='center'>\r\n\t\t\t\t\t<br><h3>Servicio a elegir:</h3><hr>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\";\r\n\t\r\n\t$id_serivice = extractColumnForTable('clave_servicio', 'catalogo_servicios', \"\");\r\n\t$type = extractColumnForTable('tipo', 'catalogo_servicios', \"\");\r\n\t$price = extractColumnForTable('precio', 'catalogo_servicios', \"\");\r\n\t\r\n\t\r\n\tfor($i = 0; count($id_serivice) > $i; $i++)\r\n\t{\r\n\t\t$com = $i % 2;\r\n\t\t$fondo = '';\r\n\t\r\n\t\tif ($com == 0) {\r\n\t\t\t$fondo = \"id='back-text'\";\r\n\t\t} else {\r\n\t\t\t$fondo = \"\";\r\n\t\t}\r\n\t\r\n\t\t$html .='<div class=\"row\" '.$fondo.'><div id=\"center\">\r\n\t\t\t\t<div class=\"col-lg-3\"></div>\r\n\t\t\t\t<div class=\"col-lg-1\">'.$id_serivice[$i].'</div>\r\n\t\t\t\t<div class=\"col-lg-4\">'.$type[$i].'</div>\r\n\t\t\t\t<div class=\"col-lg-1\">$'.$price[$i].'</div>\r\n\t\t\t\t<div class=\"col-lg-1\"><input type=\"checkbox\" name=\"'.$id_serivice[$i].'\" value=\"'.$id_serivice[$i].'\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t';\r\n\t\r\n\t}\r\n\t//informacion del vehiculo\r\n\t$html .= \"<div class='row' id='center'>\r\n\t\t\t\t<div class='col-lg-12' id='backgroundMore'>\r\n\t\t\t\t\t<hr>\r\n\t\t\t\t\t<h3>Informacion del Veh&iacute;culo:</h3> \r\n\t\t\t\t\t<hr>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t\";\r\n\t$html .= '<div class=\"row\">\r\n\t\t\t\t<div class=\"col-lg-3\"></div>\r\n\t\t\t\t<div class=\"col-lg-2\">\r\n\t\t\t\t\t<!-- Marca -->\r\n \t\t\t<input name=\"txtMarca\" id=\"marca\" title=\"Ingrese una marca verdadera\" pattern=\"[A-Za-z0-9&aacute&eacute&iacute&oacute&uacute&Aacute&Eacute&Iacute&Oacute&Uacute&Ntilde&ntilde ]{1,20}\" type=\"text\" class=\"text\" \r\n \t\t\t\tplaceholder=\"Marca\" required autocomplete=\"on\" maxlength=\"20\" >\r\n \t\t\t\t<p><label for=\"marca\">Marca:</label></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-lg-2\">\r\n\t\t\t\t\t<!-- SubMarca -->\r\n \t\t\t<input name=\"txtSubMarca\" id=\"subMarca\" title=\"Ingrese una submarca verdadera\" pattern=\"[A-Za-z0-9&aacute&eacute&iacute&oacute&uacute&Aacute&Eacute&Iacute&Oacute&Uacute&Ntilde&ntilde ]{1,20}\" type=\"text\" class=\"text\" \r\n \t\t\t\tplaceholder=\"Submarca\" required autocomplete=\"on\" maxlength=\"20\" >\r\n \t\t\t\t<p><label for=\"subMarca\">Submarca:</label></p>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"col-lg-2\">\r\n\t\t\t\t\t<!-- modelo -->\r\n \t\t\t<input name=\"txtModelo\" id=\"modelo\" title=\"Ingrese un modelo de 4 digitos\" pattern=\"[0-9]{4}\" type=\"text\" class=\"text\" \r\n \t\t\t\tplaceholder=\"Modelo\" required autocomplete=\"on\" maxlength=\"4\" >\r\n \t\t\t\t<p><label for=\"modelo\">Modelo:</label></p>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"row\">\r\n\t\t\t\t<div class=\"col-lg-12\" id=\"center\">\r\n\t\t\t\t\t<br>\r\n\t\t\t\t\t<button type=\"submit\" value=\"cita\" name=\"cita\">Registra tu cita</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>';\r\n\t\r\n\treturn $html;\r\n}", "title": "" }, { "docid": "0debb3bb61e47b1aada2ac2b51a85ecf", "score": "0.5683201", "text": "public function obtenerLista() {\n $sql = \"SELECT * FROM ASIENTO\";\n if(!$result = mysqli_query($this->con, $sql)) die();\n\t\t\t$asientos= array();\n\t\t\twhile ($row = mysqli_fetch_array($result)) {\n $tipoSillaDAO= new T_SillaDAO($this->con);\n $tipoSilla=$tipoSillaDAO->consultarTSilla($row[1]);\n\t\t\t\t$asientos[] = new Asiento($row[0], $tipoSilla,$row[2]);\n\t\t\t}\n\t\t\treturn $asientos;\n }", "title": "" }, { "docid": "1c5cf0b0c52fb2dac9d9bec42fca2a19", "score": "0.56799716", "text": "public function descargarEventonavegador(){\n\n }", "title": "" }, { "docid": "9eb6a58318f89d383d86a87d702ba74d", "score": "0.56759197", "text": "function getEventos()\n {\n $listado = array();\n $mysqli = $this->fullConnect();\n $query = 'SELECT id,fec_res,desde,hasta,personas,comentarios,fecha,estatus FROM eventos ';\n if ($stmt = $mysqli->prepare($query))\n {\n if ($stmt->execute())\n $stmt->bind_result($col1,$col2,$col3,$col4,$col5,$col6,$col7,$col8);\n while ($stmt->fetch())\n {\n $registro['id'] = $col1;\n $registro['fec_res'] = $col2;\n $registro['desde'] = $col3;\n $registro['hasta'] = $col4;\n $registro['personas'] = $col5;\n $registro['comentarios'] = $col6;\n $registro['fecha'] = $col7;\n $registro['estatus'] = $col8;\n $listado[] = $registro;\n }\n $stmt->free_result();\n $stmt->close();\n return $listado;\n }\n else\n return $mysqli->error;\n }", "title": "" }, { "docid": "dd61f3df226a32492ce95ba3073fce80", "score": "0.56744045", "text": "function listarDeptoFiltradoDeptoUsuarioConta(){\n $this->procedimiento='conta.ft_doc_compra_venta_sel';// nombre procedimiento almacenado\n $this->transaccion='CONTA_DEPFUNCON_SEL';//nombre de la transaccion\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\n //Definicion de la lista del resultado del query\n $this->setParametro('codigo_subsistema','codigo_subsistema','varchar');\n\n //defino varialbes que se captran como retornod e la funcion\n $this->captura('id_depto','integer');\n $this->captura('codigo','varchar');\n $this->captura('nombre','varchar');\n $this->captura('nombre_corto','varchar');\n $this->captura('id_subsistema','integer');\n\n $this->captura('estado_reg','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_reg','integer');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','integer');\n $this->captura('usureg','text');\n $this->captura('usumod','text');\n $this->captura('desc_subsistema','text');\n\n //Ejecuta la funcion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n return $this->respuesta;\n }", "title": "" }, { "docid": "4863afcc8ff79b25df522dfca05c07af", "score": "0.5674252", "text": "function get_listado($id_sede)\n\t{\n\t\t$sql = \"SELECT\n\t\t\tt_i.id_incidencia,\n\t\t\tt_i.fecha,\n\t\t\tt_i.hora,\n\t\t\tt_i.estado,\n\t\t\tt_i.id_aula,\n t_au.nombre,\n\t\t\tt_i.id_sede\n\t\tFROM\n\t\t\tincidencia as t_i\n JOIN aula t_au ON (t_i.id_aula=t_au.id_aula)\n WHERE t_i.id_sede=$id_sede \n AND t_i.estado <> 'FINALIZADA'\n\t\tORDER BY estado\";\n\t\treturn toba::db('rukaja')->consultar($sql);\n\t}", "title": "" }, { "docid": "951b686cc379e0a3543919b2b87cde06", "score": "0.567379", "text": "public function injeccionmultiple()\n {\n\n $menuitem = 4;\n\n $variableDemog = 0;\n $titulo = 'Indice';\n\n $primario = array();\n $secundario = array();\n\n if (isset($_GET['demografico1'])) {\n $variableDemog = $_GET['demografico1'];\n $titulo = $variableDemog;\n\n //traigo los filtros secundarios\n $demog1 = $_GET['demografico1'];\n $demog3 = $_GET['demografico3'];\n $demog4 = $_GET['demografico4'];\n $demog6 = $_GET['demografico6'];\n \n //controlo que los demograficos 1 y 4 sean distintos\n\n if ($demog1 != $demog4 && $demog6 != \"todos\"){\n array_push($primario,$demog4);\n array_push($secundario,$demog6);\n }\n \n }\n\n \n //dd($titulo);\n\n //consulta para los datos\n\n $select = 'select opc.opcion as descripcion, opc.id as id, count(r.id) as cantidad';\n $from = ' from respuestamultiple r';\n $join = ' inner join opcion opc on opc.id = r.opcion_id inner join encuestado en on en.id = r.encuestado_id';\n $where = ' where item_id = 54';\n $where2 = ' ';\n $group = ' group by opc.id, opc.opcion';\n $order = ' order by cantidad desc';\n\n switch ($titulo) {\n case 'Sede':\n $join2 = ' inner join sede dm on dm.id = en.sede_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Antiguedad':\n $join2 = ' inner join antiguedad dm on dm.id = en.antiguedad_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n\n break;\n\n case 'Area':\n $join2 = ' inner join area dm on dm.id = en.area_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Contrato':\n $join2 = ' inner join contrato dm on dm.id = en.contrato_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Estudio':\n $join2 = ' inner join estudio dm on dm.id = en.estudio_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Genero':\n $join2 = ' inner join genero dm on dm.id = en.genero_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Puesto':\n $join2 = ' inner join puesto dm on dm.id = en.puesto_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n case 'Edad':\n $join2 = ' inner join rangoedad dm on dm.id = en.rangoedad_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n case 'Sector':\n $join2 = ' inner join sector dm on dm.id = en.sector_id';\n if ($demog3 != \"todos\") {\n $where2 = ' and dm.id = ' . $demog3;\n }\n break;\n\n default:\n \n break;\n }\n\n\n$max =sizeof($primario);\n\n$join3 = ' ';\n$where3 = ' ';\n\n$countwhere = 0;\n\nfor ($i=0; $i < $max; $i++) { \n\n // filtro secundario que solo agrega filtros\n switch ($primario[$i]) {\n case 'Sede':\n $join3 = $join3 .' inner join sede filt'.$i.' on filt'.$i.'.id = en.sede_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Antiguedad':\n $join3 = $join3 .' inner join antiguedad filt'.$i.' on filt'.$i.'.id = en.antiguedad_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Area':\n $join3 = $join3 .' inner join area filt'.$i.' on filt'.$i.'.id = en.area_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Contrato':\n $join3 = $join3 .' inner join contrato filt'.$i.' on filt'.$i.'.id = en.contrato_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Estudio':\n $join3 = $join3 .' inner join estudio filt'.$i.' on filt'.$i.'.id = en.estudio_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Genero':\n $join3 = $join3 .' inner join genero filt'.$i.' on filt'.$i.'.id = en.genero_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Puesto':\n $join3 = $join3 .' inner join puesto filt'.$i.' on filt'.$i.'.id = en.puesto_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n case 'Edad':\n $join3 = $join3 .' inner join rangoedad filt'.$i.' on filt'.$i.'.id = en.rangoedad_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n case 'Sector':\n $join3 = $join3 .' inner join sector filt'.$i.' on filt'.$i.'.id = en.sector_id ';\n if ($countwhere > 0) {\n $where3 = $where3 . ' where filt'.$i.'.id ='.$secundario[$i];\n }else{\n $where3 = $where3 . ' and filt'.$i.'.id ='.$secundario[$i];\n }\n $countwhere++;\n \n break;\n\n default:\n \n break;\n }\n\n}\n\n\n $consulta = $select . $from . $join . $join2 . $join3 . $where . $where2 . $where3 . $group . $order;\n\n //dd($consulta);\n\n $consultadb = DB::select($consulta);\n\n\n $datosO1 = $consultadb;\n\n\n $datos = json_encode($consultadb);\n\n//correccion de total inicio\n\n\n $select2 = 'select count(en.id) as id from encuestado en ';\n\n //declaro un where4 que no filtra nada, para poder concatenar where2 y where3 sin problemas\n $where4 = ' where not en.id = 0';\n\n if ($demog3 == 'todos') {\n //no debe filtrar por el primario\n\n if ($demog6 == 'todos') {\n //no debe ablicar filtros\n $consulta2 = $select2 ;\n \n }else{\n $consulta2 = $select2 . $join2 . $join3 . $where4 . $where2 . $where3;\n\n }\n \n }else{\n $consulta2 = $select2 . $join2 . $join3 . $where4 . $where2 . $where3;\n }\n\n //$consulta2 = $select . $join2 . $join3 . $where4 . $where2 . $where3;\n\n //dd($consulta2);\n\n $consultadb2 = DB::select($consulta2);\n\n //dd($consultadb2[0]->id);\n\n $total = $consultadb2[0]->id;\n\n $encuestados = $total;\n\n//correccion de total fin\n\n\n $demograficos = array('Sede' => 'Sede',\n 'Antiguedad' => 'Antiguedad',\n 'Area' => 'Area',\n 'Contrato' => 'Contrato',\n 'Estudio' => 'Estudio',\n 'Genero' => 'Genero',\n 'Puesto' => 'Puesto',\n 'Edad' => 'Edad',\n 'Sector' => 'Sector');\n\n $demograficos2 = Sede::orderBy('descripcion', 'ASC')->lists('descripcion', 'id');\n\n $titulo2 = $titulo;\n $datos2 = $datos;\n $datosO2 = $datosO1;\n $total2 = $total;\n\n //dd($total);\n\n $funcion = \"multiple\";\n \n return view('encuesta.estadistica.injeccionmultiple')\n ->with('titulo2',$titulo2)\n ->with('encuestados',$encuestados)\n ->with('funcion',$funcion)\n ->with('menuitem',$menuitem)\n ->with('datos2',$datos2)\n ->with('total2',$total2)\n ->with('datosO2',$datosO2);\n \n }", "title": "" }, { "docid": "dbd618e91b93d1c15b8eed0433890beb", "score": "0.56637603", "text": "function listarEventos() {\n $cCrud = new Crud();\n $fila = $cCrud->buscarQueryAll(\"CALL mgc_mostrarSedeEvento_SP()\");\n return $fila;\n }", "title": "" }, { "docid": "a8fad546352fcdc73244a342d8cc8a50", "score": "0.56519735", "text": "public function listar()\n\t{\n\t\t$condicion=\"\";\n\t\tif($_POST['rut']!=\"\")\n\t\t{\n\t\t\t$condicion=\" and t2.rut = '\".$_POST['rut'].\"'\";\n\t\t}\n\t\t$sql=\"SELECT t1.tipo_producto,t1.estatus, t1.total,t1.id,t2.nombre,t2.rut,if(sum(t3.efectivo_monto + t3.tarjeta_monto + t3.transferencia_monto + t3.cheque_monto) is null,0,sum(t3.efectivo_monto + t3.tarjeta_monto + t3.transferencia_monto + t3.cheque_monto)) as monto_abonado FROM `tbl_facturas` t1 \n\t\t\tleft JOIN tbl_cliente t2 ON t2.rut=t1.rut \n\t\t\tleft JOIN tbl_pagos t3 ON t3.id_venta=t1.id\n\t\t\tWHERE t1.id_sucursal=\".session()->get('sucursal').\" \".$condicion.\"\n\t\t\tGROUP by t1.id\";\n\t\t\t \n\t\ttry {\n\t\t\t$datos=DB::select($sql);\n\t\t\techo json_encode($datos);\n\t\t} catch (Exception $e) {\n\t\t\techo \"error\";\n\t\t}\n\t}", "title": "" }, { "docid": "c7025f51d12d3cc5696be030454bfade", "score": "0.56513876", "text": "function listarTipoSolicitud(){\n\t\t$this->procedimiento='tes.ft_tipo_solicitud_sel';\n\t\t$this->transaccion='TES_TPSOL_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_solicitud','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo_proceso_llave_wf','varchar');\n\t\t$this->captura('codigo_plantilla_comprobante','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "ec57987f6b6548737ddad9044eb88a45", "score": "0.564951", "text": "function AfficheListAjoute()\n { \n $aMenu = genererMenu();\n AfficheEntete();\n //affiche le menu\n AfficheMenu($aMenu);\n //recupere l'Item de tableau n31_menu_admin\n $menuItem = recupereMenuInf($aMenu);\n //recupere le nom du tableau dynamiquement\n $tableau = $menuItem['tableau'];\n\n switch ($tableau) {\n case \"n31__coordonnees_CDJ\" :\n //affiche le formulaire pour entre les donnees\n AfficheAjouteCDJ($tableau);\n //si le command \"Insert\" est excecute avec succes\n if (AjouterNouveauInfNomCDJ())\n {\n echo \"<h1>Votre information est ajouté dans le base des donneée</h1>\";\n }\n break;\n\n case \"n31__service_de_garde\" :\n\n //affiche le formulaire pour entre les donnees\n AfficheAjouteSDG($tableau);\n if (verifSDG())\n {\n echo \"<h1>Il y a déjà information pour le choisi Camp de jour </h1>\";\n }\n else\n {\n //si le command \"Insert\" est excecute avec succes\n if (AjouterNouveauInfNomSDG())\n {\n echo \"<h1>Votre information est ajouté dans le base des donneée</h1>\";\n }\n }\n break;\n\n default :\n AfficheAjoute($tableau);\n if (AjouterNouveauInfNom($tableau))\n {\n echo \"<h1>Votre information est ajouté dans le base des donneée</h1>\";\n }\n break;\n\n }\n\n AffichePied();\n }", "title": "" }, { "docid": "9192ada52e6ef90be66856ddbb716792", "score": "0.56493473", "text": "function getListJeux() {\n\t$listJeux = array();\n\t\n\t// on créé la requête SQL\n\t$connexionBDD = getConnexionBDD();\n\t$sqlQuery = $connexionBDD->prepare(\"SELECT j.id , j.nom\n\t\tFROM er_jeu j\");\n\t\t\n\t$sqlQuery->execute();\n\twhile($lignes=$sqlQuery->fetch(PDO::FETCH_OBJ))\n {\n\t\t// On créé le jeu associé\n\t\t$jeu = new Jeu($lignes->nom); \n\t\t$jeu->id = $lignes->id;\n\t\n\t\t$listJeux[] = $jeu;\n\t}\n\t\t\n\treturn $listJeux;\n}", "title": "" }, { "docid": "115fa64430ce18416e76928052bae9cb", "score": "0.564476", "text": "public function cargarPersonas(){\r\n\t\t$personaDB = new personasBD();\r\n \t\t$datos = $personaDB->traerDatosPersonas();\r\n \t\tforeach ($datos as $key => $value) {\r\n \t\t\textract($value);\r\n \t\t\t$pers = new Persona($nombre, $apellido);\r\n \t\t\tarray_push($this->listado, $pers);\t\t\r\n \t\t}\r\n\t}", "title": "" }, { "docid": "5c147a800c08fee712abef7bb8a45d64", "score": "0.5644164", "text": "public function listar() {\n \t$stmt = $this->objPdo->prepare('SELECT *FROM medidas');\n \t\t $stmt->execute();\n \t $servidor = $stmt->fetchAll(PDO::FETCH_OBJ);\n \t\t return $servidor;\n }", "title": "" }, { "docid": "392f2c52f8488dcf43dd9ea63d3ce789", "score": "0.564326", "text": "function Funcion_clientes($clientes,$gastos){\n\n\t\t\tstatic $Cliente = 0;\n\n\t\t\t$i=0\n\n\n\t\t\tforeach ($gastos as $valor){\n\t\t\t\tif ($valor > 1000){\n\t\t\t\t\t$incremento_cliente=$Cliente + 1;\n\t\t\t\t\techo (\"\\n<br><br>$incremento_cliente\");\n\t\t\t\t\techo (\" - \");\n\t\t\t\t\techo $clientes[$i];\n\t\t\t\t\t$Cliente++; \n\t\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "3637c934408940f8586e7c3bdd3a7c8e", "score": "0.563642", "text": "function listaEspacios($configuracion, $registro, $totalEspacios, $registroPlan) {\r\n $variablesEvento=array('ano'=>$this->ano,\r\n 'periodo'=>$this->periodo);\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"buscarEventoGestionPlanes\",$variablesEvento);\r\n $fechasEventoPlanes = $this->accesoOracle->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n $fecha= date('Ymd');\r\n if($fecha>$fechasEventoPlanes[0]['FIN'])\r\n {\r\n $permiso=0;\r\n }else{$permiso=1;}\r\n \r\n $creditosRegistrados=0;\r\n $creditosNivel=0;\r\n $creditosTotal=0;\r\n $creditosAprobados = 0;\r\n $comentHoras=\"\";\r\n $idEncabezado = 0;\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"consultaNivelesPlan\", $registroPlan[0][0]);\r\n $registroNiveles = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n\r\n ?>\r\n<style type=\"text/css\">\r\n #toolTipBox {\r\n display: none;\r\n padding: 5;\r\n font-size: 12px;\r\n border: black solid 1px;\r\n font-family: verdana;\r\n position: absolute;\r\n background-color: #ffd038;\r\n color: 000000;\r\n }\r\n</style>\r\n<table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" >\r\n <tr class=\"cuadro_plano\">\r\n <td align=\"center\">\r\n <table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" >\r\n <tbody>\r\n <tr>\r\n <td>\r\n <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"5 px\" cellspacing=\"1px\" >\r\n <tr>\r\n <td>\r\n <table class='contenidotabla'>\r\n\r\n <?\r\n $ob = 0;\r\n $creob = 0;\r\n $obRegistrados=0;\r\n $oc = 0;\r\n $creoc = 0;\r\n $ocRegistrados=0;\r\n $ei = 0;\r\n $creei = 0;\r\n $eiRegistrados=0;\r\n $ee = 0;\r\n $creee = 0;\r\n $eeRegistrados=0;\r\n $cp = 0;\r\n $crecp = 0;\r\n $cpRegistrados=0;\r\n if(is_array($registroNiveles))\r\n {\r\n\r\n foreach ($registroNiveles as $key => $value) {\r\n\r\n //mensaje al inicio de cada semestre\r\n if ($value[0]==98)\r\n {\r\n echo \"<tr><td colspan='12' align='center'><h2>COMPONENTE PROPED&Eacute;UTICO</td></tr>\";\r\n }else{\r\n echo \"<tr><td colspan='12' align='center'><h2>PER&Iacute;ODO DE FORMACI&Oacute;N \" . $value[0] . \"</h2></td></tr>\";\r\n }\r\n ?>\r\n <tr class='cuadro_color'>\r\n <?\r\n /*<td class='cuadro_plano centrar'>Nivel </td>*/\r\n ?>\r\n <td class='cuadro_plano centrar'>Cod. </td>\r\n <td class='cuadro_plano centrar'>Nombre </td>\r\n <td class='cuadro_plano centrar'>N&uacute;mero<br>Cr&eacute;ditos</td>\r\n <td class='cuadro_plano centrar'>HTD </td>\r\n <td class='cuadro_plano centrar'>HTC </td>\r\n <td class='cuadro_plano centrar'>HTA </td>\r\n <td class='cuadro_plano centrar'>Clasificaci&oacute;n </td>\r\n <td class='cuadro_plano centrar' colspan=\"2\">Aprobar </td>\r\n <td class='cuadro_plano centrar' >Modificar</td>\r\n <?//se wadiciona para borrar espacios no aprobados por vice?>\r\n <td class='cuadro_plano centrar' >Borrar</td>\r\n <td class='cuadro_plano centrar'>Comentarios </td>\r\n </tr><?\r\n $valoresEncabezado = array($registroPlan[0][0], $value[0], $idEncabezado);\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"consultarEncabezado\", $valoresEncabezado);\r\n $registroEncabezados = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n\r\n \r\n if (is_array($registroEncabezados)) {\r\n for ($p = 0;$p < count($registroEncabezados);$p++) {\r\n if ($registroEncabezados[$p][10] == $value[0]) {\r\n ?>\r\n\r\n <tr>\r\n <?\r\n ?>\r\n <td class='cuadro_plano' colspan=\"2\" bgcolor=\"#ECF8E0\" ><font color=\"#090497\"><? echo $registroEncabezados[$p][1];?></font></td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\"><font color=\"#090497\"><? echo $registroEncabezados[$p][9];\r\n\r\n $porNotas = 0;\r\n $porInscripcion = 0;\r\n $porHorario = 0;\r\n ?></font></td>\r\n <?\r\n\r\n switch ($registroEncabezados[$p][7]) {\r\n case '0':\r\n $creditosNivel+= $registroEncabezados[$p][9];\r\n $creditosRegistrados+=$registroEncabezados[$p][9];\r\n\r\n switch ($registroEncabezados[$p][5]) {\r\n case '1':\r\n $obRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio B&aacute;sico\";\r\n break;\r\n case '2':\r\n $ocRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio Complementario\";\r\n break;\r\n case '3':\r\n $eiRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Intr&iacute;nseco\";\r\n break;\r\n case '4':\r\n $eeRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Extr&iacute;nseco\";\r\n $comentHoras = \"Sugerencia Plan de Estudio\";\r\n break;\r\n case '5':\r\n $cpRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Componente Proped&eacute;utico\";\r\n break;\r\n }\r\n ?>\r\n\r\n <td class='cuadro_plano centrar' colspan=\"3\" bgcolor=\"#ECF8E0\"><?echo $comentHoras?></td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\" >\r\n <font color=\"#090497\">\r\n <? echo $comentClasif; ?>\r\n </font>\r\n </td>\r\n\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\">\r\n <?\r\n if($permiso==1)\r\n {\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAprobarOpcionAsisVice\";\r\n $variables.= \"&opcion=aprobarEncabezado\";\r\n $variables.= \"&id_encabezado=\" . $registroEncabezados[$p][0];\r\n $variables.= \"&encabezado_nombre=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&planEstudio=\" . $registroEncabezados[$p][3];\r\n $variables.= \"&codProyecto=\" . $registroEncabezados[$p][4];\r\n $variables.= \"&clasificacion=\" . $registroEncabezados[$p][5];\r\n $variables.= \"&nroCreditos=\" . $registroEncabezados[$p][9];\r\n $variables.= \"&nivel=\" . $registroEncabezados[$p][10];\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/clean.png\" width=\"25\" height=\"25\" border=\"0\">\r\n </a>\r\n<?}?> \r\n </td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\">\r\n <?\r\n if($permiso==1)\r\n {\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAprobarOpcionAsisVice\";\r\n $variables.= \"&opcion=no_aprobarEncabezado\";\r\n $variables.= \"&id_encabezado=\" . $registroEncabezados[$p][0];\r\n $variables.= \"&encabezado_nombre=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&planEstudio=\" . $registroEncabezados[$p][3];\r\n $variables.= \"&codProyecto=\" . $registroEncabezados[$p][4];\r\n $variables.= \"&clasificacion=\" . $registroEncabezados[$p][5];\r\n $variables.= \"&nroCreditos=\" . $registroEncabezados[$p][9];\r\n $variables.= \"&nivel=\" . $registroEncabezados[$p][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n\r\n ?>\r\n\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/x.png\" width=\"25\" height=\"25\" border=\"0\">\r\n </a>\r\n<?}?> \r\n </td>\r\n <td class=\"cuadro_plano centrar\" bgcolor=\"#ECF8E0\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <?\r\n if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacioEncabezado\";\r\n $variables.= \"&id_encabezado=\" . $registroEncabezados[$p][0];\r\n $variables.= \"&encabezado_nombre=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&planEstudio=\" . $registroEncabezados[$p][3];\r\n $variables.= \"&codProyecto=\" . $registroEncabezados[$p][4];\r\n $variables.= \"&clasificacion=\" . $registroEncabezados[$p][5];\r\n $variables.= \"&nroCreditos=\" . $registroEncabezados[$p][9];\r\n $variables.= \"&nivel=\" . $registroEncabezados[$p][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?\r\n }\r\n }\r\n ?>\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n \r\n<?\r\n if($permiso==1)\r\n {\r\n\r\n $pagina=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\r\n $ruta=\"pagina=registroBorrarEACoordinador\";\r\n $ruta.=\"&opcion=solicitarEncabezado\";\r\n $ruta.=\"&id_encabezado=\".$registroEncabezados[$p][0];\r\n $ruta.=\"&encabezado_nombre=\".$registroEncabezados[$p][1];\r\n $ruta.=\"&nroCreditos=\".$registroEncabezados[$p][9];\r\n $ruta.=\"&nivel=\".$registroEncabezados[$p][10];\r\n $ruta.=\"&planEstudio=\".$registroEncabezados[$p][3];\r\n $ruta.=\"&codProyecto=\".$registroEncabezados[$p][4];\r\n $ruta.=\"&clasificacion=\".$registroEncabezados[$p][5];\r\n\r\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $ruta=$this->cripto->codificar_url($ruta,$configuracion);\r\n\r\n $borrarEncabezado=$pagina.$ruta;\r\n ?>\r\n <a href='<?echo $borrarEncabezado?>' class='centrar'>\r\n <img src='<?echo $configuracion['site'].$configuracion['grafico'];?>/delete.png' width='25' height='25' border='0'><br><font size='1'>Borrar</font>\r\n </a>\r\n <?}?>\r\n </td>\r\n <td class=\"cuadro_plano\" bgcolor=\"#ECF8E0\">\r\n </td>\r\n <?\r\n break;\r\n case '1':\r\n\r\n $creditosNivel+= $registroEncabezados[$p][9];\r\n $creditosTotal+= $registroEncabezados[$p][9];\r\n $creditosRegistrados+=$registroEncabezados[$p][9];\r\n\r\n switch ($registroEncabezados[$p][5]) {\r\n case '1':\r\n $ob++;\r\n $obRegistrados+=$registroEncabezados[$p][9];\r\n $creob+= $registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio B&aacute;sico\";\r\n break;\r\n case '2':\r\n $oc++;\r\n $ocRegistrados+=$registroEncabezados[$p][9];\r\n $creoc+= $registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio Complementario\";\r\n break;\r\n case '3':\r\n $ei++;\r\n $eiRegistrados+=$registroEncabezados[$p][9];\r\n $creei+= $registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Intr&iacute;nseco\";\r\n break;\r\n case '4':\r\n $ee++;\r\n $eeRegistrados+=$registroEncabezados[$p][9];\r\n $creee+= $registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Extr&iacute;nseco\";\r\n $comentHoras = \"Sugerencia Plan de Estudio\";\r\n break;\r\n case '5':\r\n $cp++;\r\n $cpRegistrados+=$registroEncabezados[$p][9];\r\n $crecp+= $registroEncabezados[$p][9];\r\n $comentClasif = \"Componente Proped&eacute;utico\";\r\n break;\r\n }\r\n ?>\r\n <td class='cuadro_plano centrar' colspan=\"3\" bgcolor=\"#ECF8E0\"><?echo $comentHoras?></td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\" >\r\n <font color=\"#090497\">\r\n <? echo $comentClasif; ?>\r\n </font>\r\n </td><?\r\n $creditosAprobados+= $registroEncabezados[$p][9];\r\n ?> <td class='cuadro_plano centrar' colspan=\"2\" bgcolor=\"#ECF8E0\">\r\n Aprobado\r\n </td>\r\n <td class=\"cuadro_plano centrar\" bgcolor=\"#ECF8E0\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacioEncabezado\";\r\n $variables.= \"&id_encabezado=\" . $registroEncabezados[$p][0];\r\n $variables.= \"&encabezado_nombre=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&planEstudio=\" . $registroEncabezados[$p][3];\r\n $variables.= \"&codProyecto=\" . $registroEncabezados[$p][4];\r\n $variables.= \"&clasificacion=\" . $registroEncabezados[$p][5];\r\n $variables.= \"&nroCreditos=\" . $registroEncabezados[$p][9];\r\n $variables.= \"&nivel=\" . $registroEncabezados[$p][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?}\r\n }\r\n ?>\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n </td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\">\r\n </td>\r\n <?\r\n break;\r\n case '2':\r\n $creditosRegistrados+=$registroEncabezados[$p][9];\r\n switch ($registroEncabezados[$p][5]) {\r\n case '1':\r\n //$ob++;\r\n //$creob+= $registroEncabezados[$p][9];\r\n $obRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio B&aacute;sico\";\r\n break;\r\n case '2':\r\n //$oc++;\r\n //$creoc+= $registroEncabezados[$p][9];\r\n $ocRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Obligatorio Complementario\";\r\n break;\r\n case '3':\r\n //$ei++;\r\n //$creei+= $registroEncabezados[$p][9];\r\n $eiRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Intr&iacute;nseco\";\r\n break;\r\n case '4':\r\n //$ee++;\r\n //$creee+= $registroEncabezados[$p][9];\r\n $eeRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Electivo Extr&iacute;nseco\";\r\n $comentHoras = \"Sugerencia Plan de Estudio\";\r\n break;\r\n case '5':\r\n //$ob++;\r\n //$creob+= $registroEncabezados[$p][9];\r\n $cpRegistrados+=$registroEncabezados[$p][9];\r\n $comentClasif = \"Componente Proped&eacute;utico\";\r\n break;\r\n }\r\n ?>\r\n <td class='cuadro_plano centrar' colspan=\"3\" bgcolor=\"#ECF8E0\"><?echo $comentHoras?></td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\" >\r\n <font color=\"#090497\">\r\n <? echo $comentClasif; ?>\r\n </font>\r\n </td>\r\n <td class='cuadro_plano centrar' colspan=\"2\" bgcolor=\"#ECF8E0\">\r\n No Aprobado</td>\r\n <td class=\"cuadro_plano centrar\" bgcolor=\"#ECF8E0\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacioEncabezado\";\r\n $variables.= \"&id_encabezado=\" . $registroEncabezados[$p][0];\r\n $variables.= \"&encabezado_nombre=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&planEstudio=\" . $registroEncabezados[$p][3];\r\n $variables.= \"&codProyecto=\" . $registroEncabezados[$p][4];\r\n $variables.= \"&clasificacion=\" . $registroEncabezados[$p][5];\r\n $variables.= \"&nroCreditos=\" . $registroEncabezados[$p][9];\r\n $variables.= \"&nivel=\" . $registroEncabezados[$p][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?}\r\n }\r\n ?>\r\n\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n </td>\r\n <td class='cuadro_plano centrar' bgcolor=\"#ECF8E0\">\r\n </td>\r\n <?\r\n break;\r\n }\r\n $idEncabezado = $registroEncabezados[$p][0];\r\n $encabezado = array($registroEncabezados[$p][0], $registroPlan[0][0]);\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"consultarEspaciosEncabezado\", $encabezado);\r\n $registroEspEncabezados = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n if (is_array($registroEspEncabezados)) {\r\n ?>\r\n <!--<td class='cuadro_plano centrar' colspan=\"8\" bgcolor=\"#ECF8E0\"><font color=\"#090497\">Espacios Acad&eacute;micos con Opciones</font></td>-->\r\n <?\r\n for ($q = 0;$q < count($registroEspEncabezados);$q++) {\r\n $espacioOpcion[0] = $registroEspEncabezados[$q][0];\r\n $espacioOpcion[1] = $registroPlan[0][0];\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"datosEspacioOpcion\", $espacioOpcion);\r\n $registroEspaciosOpcion = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n //Busca los comentarios no leidos\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"comentariosNoLeidos\", $espacioOpcion[0], $espacioOpcion[1]);\r\n $comentariosNoLeidos = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n $porNotas = 0;\r\n $porInscripcion = 0;\r\n $porHorario = 0;\r\n ?>\r\n\r\n <tr>\r\n <?\r\n /*<td class='cuadro_plano centrar'><strong><?echo $registroEspaciosOpcion[0][2]?></strong></td>*/\r\n ?>\r\n <td class='cuadro_plano derecha' width=\"40\"><font color=\"#049713\"><? echo $registroEspaciosOpcion[0][0] ?></font></td>\r\n <td class='cuadro_plano'>&nbsp;&nbsp;&nbsp;<font color=\"#049713\"><? echo $registroEspaciosOpcion[0][1] ?></font></td>\r\n <?\r\n //verificar que 3*creditos=HTD+HTC+HTA si no se cumple se muestran los registros en rojo\r\n if ((48 * $registroEspaciosOpcion[0][3]) == (($registroEspaciosOpcion[0][4] + $registroEspaciosOpcion[0][5] + $registroEspaciosOpcion[0][6]) * $registroEspaciosOpcion[0][13])) {\r\n ?>\r\n <td class='cuadro_plano derecha'><font color='#049713'><? echo $registroEspaciosOpcion[0][3] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color=\"#049713\"><? echo $registroEspaciosOpcion[0][4] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color=\"#049713\"><? echo $registroEspaciosOpcion[0][5] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color=\"#049713\"><? echo $registroEspaciosOpcion[0][6] ?></font></td>\r\n <?\r\n } else {\r\n ?>\r\n <td class='cuadro_plano derecha'><font color='red'><? echo $registroEspaciosOpcion[0][3] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color='red'><? echo $registroEspaciosOpcion[0][4] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color='red'><? echo $registroEspaciosOpcion[0][5] ?></font></td>\r\n <td class='cuadro_plano derecha'><font color='red'><? echo $registroEspaciosOpcion[0][6] ?></font></td>\r\n <?\r\n }\r\n ?>\r\n <td class='cuadro_plano'>&nbsp;&nbsp;&nbsp;<font color=\"#049713\"><? echo $registroEspaciosOpcion[0][7] ?></font></td>\r\n <?\r\n //verifica que este aprobado el espacio academico\r\n ?>\r\n <?\r\n // echo $registroEspaciosOpcion[0][11];exit;\r\n // echo $registroEspEncabezados[$q][1];exit;\r\n if ($registroEspaciosOpcion[0][11] == 1 && $registroEspEncabezados[$q][1] == 1) {\r\n ?> <td class='cuadro_plano centrar' colspan=\"2\">\r\n Aprobado\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&semanas=\" . $registroEspaciosOpcion[0][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?}\r\n }\r\n ?>\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td>\r\n <?\r\n } else if ($registroEspaciosOpcion[0][11] == 2 || $registroEspEncabezados[$q][1] == 2) {\r\n ?> <td class='cuadro_plano centrar' colspan=\"2\">\r\n No Aprobado</td>\r\n <td class=\"cuadro_plano centrar\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&semanas=\" . $registroEspaciosOpcion[0][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?}\r\n }\r\n ?>\r\n\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td>\r\n <?\r\n } else {\r\n ?>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAprobarOpcionAsisVice\";\r\n $variables.= \"&opcion=aprobar\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&nombreGeneral=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&idEncabezado=\" . $idEncabezado;\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n\r\n ?>\r\n\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/clean.png\" width=\"25\" height=\"25\" border=\"0\">\r\n </a>\r\n <?}?>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n if($permiso==1)\r\n {\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAprobarOpcionAsisVice\";\r\n $variables.= \"&opcion=no_aprobar\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&nombreGeneral=\" . $registroEncabezados[$p][1];\r\n $variables.= \"&idEncabezado=\" . $idEncabezado;\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n\r\n ?>\r\n\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/x.png\" width=\"25\" height=\"25\" border=\"0\">\r\n </a>\r\n <?}?>\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&semanas=\" . $registroEspaciosOpcion[0][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?\r\n }\r\n }\r\n ?>\r\n\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registroEspaciosOpcion[0][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registroEspaciosOpcion[0][2];\r\n $variables.= \"&creditos=\" . $registroEspaciosOpcion[0][3];\r\n $variables.= \"&htd=\" . $registroEspaciosOpcion[0][4];\r\n $variables.= \"&htc=\" . $registroEspaciosOpcion[0][5];\r\n $variables.= \"&hta=\" . $registroEspaciosOpcion[0][6];\r\n $variables.= \"&clasificacion=\" . $registroEspaciosOpcion[0][8];\r\n $variables.= \"&nombreEspacio=\" . $registroEspaciosOpcion[0][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td>\r\n <?\r\n }\r\n }\r\n }\r\n ?>\r\n </tr>\r\n <?\r\n } //$a++;\r\n\r\n }\r\n unset($registroEncabezados);\r\n }\r\n for ($a = 0;$a < $totalEspacios;$a++) {\r\n If ($registro[$a][2]==$value[0])\r\n {\r\n\r\n\r\n ?><tr>\r\n <?\r\n $porNotas = '0';\r\n $porInscripcion = '0';\r\n $porHorario = '0';\r\n //Cuenta los creditos por nivel y los creditos total del plan de estudio\r\n $creditosRegistrados+=$registro[$a][3];\r\n $creditosNivel+= $registro[$a][3];\r\n //Busca los comentarios no leidos\r\n $this->cadena_sql = $this->sql->cadena_sql($configuracion, \"comentariosNoLeidos\", $registro[$a][0], $registroPlan[0][0]);\r\n $comentariosNoLeidos = $this->accesoGestion->ejecutarAcceso($this->cadena_sql, \"busqueda\");\r\n ?>\r\n <td class='cuadro_plano centrar'><? echo $registro[$a][0] ?></td>\r\n <td class='cuadro_plano'><? echo $registro[$a][1];\r\n if ($registro[$a][13] == 32) {\r\n echo \" (Anualizado)\";\r\n } ?></td>\r\n <?\r\n //verificar que 48(horas)*creditos=(HTD+HTC+HTA)*(Nro Semanas) si no se cumple se muestran los registros en rojo\r\n if ((48 * $registro[$a][3]) == (($registro[$a][4] + $registro[$a][5] + $registro[$a][6]) * $registro[$a][13])) {\r\n ?>\r\n <td class='cuadro_plano centrar'><? echo $registro[$a][3] ?></td>\r\n <td class='cuadro_plano centrar'><? echo $registro[$a][4] ?></td>\r\n <td class='cuadro_plano centrar'><? echo $registro[$a][5] ?></td>\r\n <td class='cuadro_plano centrar'><? echo $registro[$a][6] ?></td>\r\n <?\r\n } else {\r\n ?>\r\n <td class='cuadro_plano centrar'><font color='red'><? echo $registro[$a][3] ?></font></td>\r\n <td class='cuadro_plano centrar'><font color='red'><? echo $registro[$a][4] ?></font></td>\r\n <td class='cuadro_plano centrar'><font color='red'><? echo $registro[$a][5] ?></font></td>\r\n <td class='cuadro_plano centrar'><font color='red'><? echo $registro[$a][6] ?></font></td>\r\n <?\r\n }\r\n ?>\r\n <td class='cuadro_plano'><? echo $registro[$a][7] ?></td>\r\n <?\r\n //verifica que este aprobado el espacio academico\r\n if ($registro[$a][11] == 1) {\r\n $creditosTotal+=$registro[$a][3];\r\n switch ($registro[$a][8]) {\r\n case '1':\r\n $ob++;\r\n $obRegistrados+=$registro[$a][3];\r\n $creob+= $registro[$a][3];\r\n break;\r\n case '2':\r\n $oc++;\r\n $ocRegistrados+=$registro[$a][3];\r\n $creoc+= $registro[$a][3];\r\n break;\r\n case '3':\r\n $ei++;\r\n $eiRegistrados+=$registro[$a][3];\r\n $creei+= $registro[$a][3];\r\n break;\r\n case '4':\r\n $ee++;\r\n $eeRegistrados+=$registro[$a][3];\r\n $creee+= $registro[$a][3];\r\n break;\r\n case '5':\r\n $cp++;\r\n $cpRegistrados+=$registro[$a][3];\r\n $crecp+= $registro[$a][3];\r\n break;\r\n }\r\n ?>\r\n <td class='cuadro_plano centrar' colspan=\"2\">\r\n Aprobado\r\n <?$creditosAprobados+=$registro[$a][3];?>\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&semanas=\" . $registro[$a][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?\r\n \r\n }\r\n }\r\n ?>\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n\r\n <?\r\n if($permiso==1)\r\n {\r\n \r\n $pagina=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\r\n $variables=\"pagina=registroBorrarEACoordinador\";\r\n $variables.=\"&opcion=confirmarBorrarEA\";\r\n $variables.=\"&codEspacio=\".$registro[$a][0];\r\n $variables.=\"&planEstudio=\".$registroPlan[0][0];\r\n $variables.=\"&nivel=\".$registro[$a][2];\r\n $variables.=\"&nroCreditos=\".$registro[$a][3];\r\n $variables.=\"&htd=\".$registro[$a][4];\r\n $variables.=\"&htc=\".$registro[$a][5];\r\n $variables.=\"&hta=\".$registro[$a][6];\r\n $variables.=\"&clasificacion=\".$registro[$a][8];\r\n $variables.=\"&nombreEspacio=\".$registro[$a][1];\r\n $variables.=\"&nombreProyecto=\".$registroPlan[0][7];\r\n $variables.=\"&codProyecto=\" . $registroPlan[0][10];\r\n $variables.=\"&aprobado=1\";\r\n\r\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $variables=$this->cripto->codificar_url($variables,$configuracion);\r\n ?>\r\n\r\n <a href=\"<?echo $pagina.$variables?>\" class=\"centrar\">\r\n <img src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/delete.png\" width=\"25\" height=\"25\" border=\"0\"><br><font size=\"1\">Inactivar</font>\r\n </a>\r\n <?}?> \r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td><?\r\n } else if ($registro[$a][11] == 2) {\r\n switch ($registro[$a][8]) {\r\n case '1':\r\n $obRegistrados+=$registro[$a][3];\r\n break;\r\n case '2':\r\n $ocRegistrados+=$registro[$a][3];\r\n break;\r\n case '3':\r\n $eiRegistrados+=$registro[$a][3];\r\n break;\r\n case '4':\r\n $eeRegistrados+=$registro[$a][3];\r\n break;\r\n case '5':\r\n $cpRegistrados+=$registro[$a][3];\r\n break;\r\n }\r\n ?>\r\n <td class='cuadro_plano centrar' colspan=\"2\">\r\n No aprobado</td>\r\n <td class=\"cuadro_plano centrar\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&semanas=\" . $registro[$a][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?\r\n }\r\n }\r\n ?>\r\n\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td><?\r\n } else {\r\n switch ($registro[$a][8]) {\r\n case '1':\r\n $obRegistrados+=$registro[$a][3];\r\n break;\r\n case '2':\r\n $ocRegistrados+=$registro[$a][3];\r\n break;\r\n case '3':\r\n $eiRegistrados+=$registro[$a][3];\r\n break;\r\n case '4':\r\n $eeRegistrados+=$registro[$a][3];\r\n break;\r\n case '5':\r\n $cpRegistrados+=$registro[$a][3];\r\n break;\r\n }\r\n ?>\r\n <td class='cuadro_plano centrar'>\r\n <?if($permiso==1)\r\n {?>\r\n <form enctype='multipart/form-data' method='POST' action='index.php' name='<? echo $this->formulario\r\n ?>'>\r\n <input type=\"hidden\" name=\"codEspacio\" value=\"<? echo $registro[$a][0] ?>\">\r\n <input type=\"hidden\" name=\"planEstudio\" value=\"<? echo $registroPlan[0][0] ?>\">\r\n <input type=\"hidden\" name=\"nivel\" value=\"<? echo $registro[$a][2] ?>\">\r\n <input type=\"hidden\" name=\"creditos\" value=\"<? echo $registro[$a][3] ?>\">\r\n <input type=\"hidden\" name=\"htd\" value=\"<? echo $registro[$a][4] ?>\">\r\n <input type=\"hidden\" name=\"htc\" value=\"<? echo $registro[$a][5] ?>\">\r\n <input type=\"hidden\" name=\"hta\" value=\"<? echo $registro[$a][6] ?>\">\r\n <input type=\"hidden\" name=\"clasificacion\" value=\"<? echo $registro[$a][8] ?>\">\r\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\r\n <input type=\"hidden\" name=\"opcion\" value=\"guardar\">\r\n <input type=\"image\" src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/clean.png\" width=\"25\" height=\"25\">\r\n </form>\r\n<?}?> \r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n if($permiso==1)\r\n {\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroNoAprobarEspacioAsisVice\";\r\n $variables.= \"&opcion=no_aprobar\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/x.png\" width=\"25\" height=\"25\" border=\"0\">\r\n </a>\r\n<?}?> \r\n\r\n </td>\r\n <td class=\"cuadro_plano centrar\">\r\n <?\r\n if ($porNotas == '1' || $porInscripcion == '1' || $porHorario == '1') {\r\n ?>\r\n <div class=\"centrar\">\r\n <span id=\"toolTipBox\" width=\"300\" ></span>\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/error.png\" width=\"25\" height=\"25\" border=\"0\"\r\n onmouseover=\"toolTip('Existen registros en la base datos <? if ($porNotas == '1') {\r\n echo \"<br>Notas\";\r\n }\r\n if ($porHorario == '1') {\r\n echo \"<br>Horarios\";\r\n }\r\n if ($porInscripcion == '1') {\r\n echo \"<br>Inscripciones\";\r\n } ?>',this)\">\r\n </div>\r\n <?\r\n } else {\r\n if($permiso==1)\r\n {\r\n \r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroModificarEspacioAsisVice\";\r\n $variables.= \"&opcion=modificarEspacio\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&semanas=\" . $registro[$a][13];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/modificar.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n </a> <?\r\n }\r\n }\r\n ?>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n if($permiso==1)\r\n {\r\n \r\n $pagina=$configuracion[\"host\"].$configuracion[\"site\"].\"/index.php?\";\r\n $variables=\"pagina=registroBorrarEACoordinador\";\r\n $variables.=\"&opcion=confirmarBorrarEA\";\r\n $variables.=\"&codEspacio=\".$registro[$a][0];\r\n $variables.=\"&planEstudio=\".$registroPlan[0][0];\r\n $variables.=\"&nivel=\".$registro[$a][2];\r\n $variables.=\"&nroCreditos=\".$registro[$a][3];\r\n $variables.=\"&htd=\".$registro[$a][4];\r\n $variables.=\"&htc=\".$registro[$a][5];\r\n $variables.=\"&hta=\".$registro[$a][6];\r\n $variables.=\"&clasificacion=\".$registro[$a][8];\r\n $variables.=\"&nombreEspacio=\".$registro[$a][1];\r\n $variables.=\"&nombreProyecto=\".$registroPlan[0][7];\r\n $variables.=\"&codProyecto=\" . $registroPlan[0][10];\r\n\r\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\r\n $this->cripto=new encriptar();\r\n $variables=$this->cripto->codificar_url($variables,$configuracion);\r\n ?>\r\n\r\n <a href=\"<?echo $pagina.$variables?>\" class=\"centrar\">\r\n <img src=\"<?echo $configuracion['site'].$configuracion['grafico']?>/delete.png\" width=\"25\" height=\"25\" border=\"0\"><br><font size=\"1\">Borrar</font>\r\n </a>\r\n <?}?>\r\n </td>\r\n <td class='cuadro_plano centrar'>\r\n <?\r\n $pagina = $configuracion[\"host\"] . $configuracion[\"site\"] . \"/index.php?\";\r\n $variables = \"pagina=registroAgregarComentarioEspacioAsisVice\";\r\n $variables.= \"&opcion=verComentarios\";\r\n $variables.= \"&codEspacio=\" . $registro[$a][0];\r\n $variables.= \"&planEstudio=\" . $registroPlan[0][0];\r\n $variables.= \"&nivel=\" . $registro[$a][2];\r\n $variables.= \"&creditos=\" . $registro[$a][3];\r\n $variables.= \"&htd=\" . $registro[$a][4];\r\n $variables.= \"&htc=\" . $registro[$a][5];\r\n $variables.= \"&hta=\" . $registro[$a][6];\r\n $variables.= \"&clasificacion=\" . $registro[$a][8];\r\n $variables.= \"&nombreEspacio=\" . $registro[$a][1];\r\n $variables.= \"&codProyecto=\" . $registroPlan[0][10];\r\n include_once ($configuracion[\"raiz_documento\"] . $configuracion[\"clases\"] . \"/encriptar.class.php\");\r\n $this->cripto = new encriptar();\r\n $variables = $this->cripto->codificar_url($variables, $configuracion);\r\n ?>\r\n <a href=\"<? echo $pagina . $variables ?>\" class=\"centrar\">\r\n <img src=\"<? echo $configuracion['site'] . $configuracion['grafico'] ?>/viewrel.png\" width=\"25\" height=\"25\" border=\"0\"><br>\r\n\r\n <?\r\n if (count($comentariosNoLeidos) > 0) {\r\n echo \"Nuevos(\" . count($comentariosNoLeidos) . \")\";\r\n } else {\r\n }\r\n ?>\r\n </a>\r\n </td>\r\n <?\r\n }\r\n ?>\r\n </tr>\r\n\r\n <?\r\n }\r\n\r\n }\r\n ?>\r\n <tr><td class='cuadro_plano centrar' colspan='6'>TOTAL CR&Eacute;DITOS:\r\n <?\r\n if ($registroPlan[0][0] == '261' || $registroPlan[0][0] == '262' || $registroPlan[0][0] == '263' || $registroPlan[0][0] == '269') {\r\n $creditosNiveles = '36';\r\n } else {\r\n $creditosNiveles = '18';\r\n }\r\n if ($creditosNivel > $creditosNiveles) {\r\n ?><font color=red><? echo $creditosNivel\r\n ?></font><?\r\n } else {\r\n ?><font color=blue><? echo $creditosNivel\r\n ?></font><?\r\n }\r\n ?>\r\n </td>\r\n <td class='cuadro_plano centrar' colspan='6'>TOTAL CR&Eacute;DITOS APROBADOS:\r\n <?\r\n if ($creditosAprobados > $creditosNiveles) {\r\n ?><font color=red><? echo $creditosAprobados;\r\n ?></font><?\r\n } else {\r\n ?><font color=blue><? echo $creditosAprobados;\r\n ?></font><?\r\n }\r\n ?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td colspan='12'></td>\r\n </tr><?\r\n $creditosNivel = 0;\r\n $creditosAprobados = 0;\r\n }\r\n /**\r\n * Fin presentar nivel\r\n */\r\n ?>\r\n </table>\r\n <table border=\"0\" width=\"100%\">\r\n\r\n <tr>\r\n <td class=\"cuadro_plano centrar\">\r\n H.T.D : Horas de Trabajo Directo<br>\r\n H.T.C : Horas de Trabajo Cooperativo<br>\r\n H.T.A : Horas de Trabajo Aut&oacute;nomo\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n <?\r\n }\r\n else\r\n {\r\n $this->presentarMensajeNoEspacios();\r\n }\r\n//USO DE LA CLASE planEstudios.class.php\r\n\r\n if ($registroPlan[0]['PLAN_PROPEDEUTICO']==0)\r\n {\r\n $creditosTotal=$creditosTotal-$crecp;\r\n }\r\n $mensajeEncabezado='CRÉDITOS APROBADOS POR VICERRECTORIA';\r\n $mensaje='Los cr&eacute;ditos aprobados por vicerrector&iacute;a, corresponden a la suma de cr&eacute;ditos de los espacios acad&eacute;micos<br>\r\n registrados por el coordinador y aprobados por vicerrector&iacute;a, para el plan de estudios.';\r\n $creditosAprobados=array(array('OB'=>$creob,\r\n 'OC'=>$creoc,\r\n 'EI'=>$creei,\r\n 'EE'=>$creee,\r\n 'CP'=>$crecp,\r\n 'TOTAL'=>$creditosTotal,\r\n 'ENCABEZADO'=>$mensajeEncabezado,\r\n 'MENSAJE'=>$mensaje,\r\n 'PROPEDEUTICO'=>$registroPlan[0]['PLAN_PROPEDEUTICO']));\r\n $this->parametrosPlan->mostrarParametrosRegistradosPlan($creditosAprobados);\r\n $mensajeEncabezado='RANGOS DE CR&Eacute;DITOS INGRESADOS POR EL COORDINADOR *';\r\n $mensaje='*Los rangos de cr&eacute;ditos, corresponden a los datos que el Coordinador registr&oacute; como par&aacute;metros iniciales<br>\r\n del plan de estudio, seg&uacute;n lo establecido en el art&iacute;culo 12 del acuerdo 009 de 2006.';\r\n $parametrosAprobados=array(array('ENCABEZADO'=>$mensajeEncabezado,\r\n 'MENSAJE'=>$mensaje,\r\n 'PROPEDEUTICO'=>$registroPlan[0]['PLAN_PROPEDEUTICO']));\r\n $this->parametrosPlan->mostrarParametrosAprobadosPlan($registroPlan[0]['PLAN'],$parametrosAprobados);\r\n\r\n\r\n\r\n//FIN USO CLASE\r\n\r\n ?>\r\n\r\n </table>\r\n </td>\r\n\r\n </tr>\r\n\r\n </table>\r\n </td>\r\n </tr>\r\n\r\n</tbody>\r\n</table>\r\n\r\n\r\n <?\r\n ?>\r\n</td>\r\n</tr>\r\n\r\n</table>\r\n\r\n\r\n <?\r\n }", "title": "" }, { "docid": "7566eb7a87249408bab07dd25d59dfad", "score": "0.563543", "text": "function listarObraciviles(){\n\t\t$this->procedimiento='snx.ft_ucsbobracivil_sel';\n\t\t$this->transaccion='SNX_UCSBEO_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_unidadconstructivasb','int4');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_obracivil','int4');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('obracivil','varchar');\n\t\t$this->captura('unidadbrev','varchar');\n\t\t$this->captura('cantidadpeso','numeric');\n\t\t$this->captura('valorobracivil','numeric');\n\t\t$this->captura('valorunitario','numeric');\t\t\n\t\t\n\t\t$this->setParametro('id_unidadconstructivasb','id_unidadconstructivasb','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "532e576fe48774589163caa9b781d983", "score": "0.5630526", "text": "public function listAllEstablecimientos() { \n $usuario = $this->usuarioMobileDao->findByUser( Session::get('usuario') ); \n \n $establecimientoArreglo = array();\n foreach( $usuario->getNegocios() as $indice => $establecimiento ){\n \n $direccion = array(\n \"latitud\" => $establecimiento->getLatitud(), \n \"longitud\" => $establecimiento->getLongitud(),\n \"callePrincipal\" => $establecimiento->getDireccion()->getCallePrincipal(),\n \"calle1\" => $establecimiento->getDireccion()->getCalle1(),\n \"calle2\" => $establecimiento->getDireccion()->getCalle2(),\n \"numeroExterior\" => $establecimiento->getDireccion()->getNumeroExterior(),\n \"numeroInterior\" => $establecimiento->getDireccion()->getNumeroInterior()\n ); \n\n $arreglo = array(\n \"id\" => $establecimiento->getId(),\n \"nombre\" => $establecimiento->getNombre(), \n \"razonSocial\" => $establecimiento->getRazonSocial(), \n \"tipoNegocio\" => $establecimiento->getTipoNegocio()->getEtiqueta(),\n \"piso\" => $establecimiento->getPiso(),\n \"referencia\" => $establecimiento->getReferencia(),\n \"direccion\" => $direccion,\n \"numeroEncargados\" => count($establecimiento->getEncargados()),\n \"numeroDispositivos\" => count($establecimiento->getDispositivos())\n ); \n $establecimientoArreglo[] = $arreglo;\n } \n return response( $establecimientoArreglo , 200)->header('Content-Type', 'application/json');\n }", "title": "" }, { "docid": "6348858d9075887d8951c386dd4640e6", "score": "0.56260437", "text": "public function listadoDetalladoServicios ()\n {\n foreach ($this->serviciosExternos() as $servicio) {\n $consumos[utf8_encode($servicio['Servicio'])] = \n array_fill(0, $this->diferencia(), 0);\n $fechas[utf8_encode($servicio['Servicio'])] = \n array_fill(0, $this->diferencia(), 0);\n }\n foreach ($this->serviciosExternos() as $servicio) {\n $nombreServicio = utf8_encode($servicio['Servicio']);\n $mesServicio = $this->fecha->verMes($servicio['fecha']);\n $anyoServicio = $this->fecha->verAnyo($servicio['fecha']);\n \n if ($this->anyoInicial < $anyoServicio) {\n $valor = 11;\n } else {\n $valor = -1;\n }\n \n $consumos[$nombreServicio][$mesServicio + $valor] += 1;\n $fechas[$nombreServicio][$mesServicio + $valor] = \n \"{$mesServicio}#{$anyoServicio}\";\n }\n \n $html = \"<table class='listadetallada'><tr><th>Servicio</th>\";\n foreach ($this->mesesRango() as $mes) {\n $html .= \"<th class='datosdetalladosservicios'>{$mes}</th>\";\n }\n $html .= \"<th class='datosdetalladosservicios'>Total</th>\";\n $html .= \"</tr>\";\n $j = 0;\n \n foreach ($this->serviciosExternos(TRUE) as $servicio) {\n \n $nombreServicio = utf8_encode($servicio['Servicio']);\n $tituloServicio = ucfirst(strtolower($nombreServicio));\n \n $html .= \"<tr id='{$j}' class='ui-widget-content celda'>\n <td class='seccionlistadetallada servicio{$j} celdaServicio'>{$tituloServicio}</td>\";\n $total = 0;\n \n foreach ($this->mesesRango() as $key => $mes) {\n $total += $consumos[$nombreServicio][$key];\n $html .= \n \"<td id='servicio#{$tituloServicio}#{$fechas[$nombreServicio][$key]}' \n class='servicio{$j} celdaServicio consumo'>{$consumos[$nombreServicio][$key]}\n </td>\";\n }\n $html .= \"<td class='servicio{$j} celdaServicio'>{$total}</td>\";\n $html .= \"</tr>\";\n $j ++;\n }\n \n $html .= \"</table>\";\n $html .= \"<div id='dialog'><div id='subcarga'>\n <img src='css/custom-theme/images/ajax-loader.gif' alt='Cargando'></img></div></div>\";\n $html .= <<<EOD\n <script type=\"text/javascript\">\n \t$('.celda').click(function(){ \n \t\t$('.celdaServicio').removeClass('ui-widget-header');\n \t\t$('.servicio'+this.id).addClass('ui-widget-header'); \n \t\t});\n \t$('.consumo').click(function(){\n\t\t\t\tvar datos = this.id.split('#'); \n\t\t\t\tvar titulo = decodeURI(datos[1]) + ' ' + datos[2] +'-'+datos[3];\n\t\t\t\t$('#dialog').html('');\n\t\t\t\t$('#dialog').dialog({ autoOpen: false, title: titulo, width: 600}); \t\t\t \n\t\t\t\t$.post('procesa.php',{servicio:this.id},function(data){ \n\t\t\t\t\t$('#dialog').html(data);\n \t\t\t}); \n\t\t \t\t$('.consumo').ajaxStop(function(){ $('#dialog').dialog('open');});\n\t\t\t});\n </script>\nEOD;\n return $html;\n }", "title": "" }, { "docid": "8682ceb102f4744fe0f69599ad851119", "score": "0.5622653", "text": "public function listaTracce($codDisco){\r\n \r\n //Avvio il database\r\n $mysqli=Database::avviaDatabase();\r\n $query = \"SELECT * FROM `Traccia` WHERE `codDisco`=\" . $codDisco. \" ORDER BY `numero`\";\r\n $risultato = Database::lanciaQuery($query, $mysqli);\r\n Database::chiudiDatabase($mysqli);\r\n $tracce = array();\r\n\t\r\n /*Il ciclo legge il risultato della query e salva i dati in array*/\r\n \r\n while($row = $risultato->fetch_row())\r\n {\r\n $traccia = new Traccia();\r\n $traccia->setCodTraccia($row[0]);\r\n $traccia->setNumero($row[1]);\r\n $traccia->setTitolo($row[2]);\r\n $traccia->setCodDisco($row[3]);\r\n\r\n $tracce[] = $traccia;\r\n }\r\n \r\n \r\n return $tracce;\r\n}", "title": "" }, { "docid": "a81e3d3784e13b1c3a63415bdf289be7", "score": "0.5622563", "text": "public function listeDesSaisons()\n\t\t{\n\t\t$liste = '';\n\t\tforeach ($this->lesSaisons as $uneSaison)\n\t\t\t{\t\n\t\t\t\t$laSerie=$uneSaison->getLaSerie();\n\t\t\t\t$liste = $liste.'Serie :'.$laSerie->getTitreSerie().' -> Saison N° : '.$uneSaison->getIdSaison().'><br>';\n\t\t\t}\n\t\treturn $liste;\n\t\t}", "title": "" }, { "docid": "ecaa30689d2d7b7944d8e1b3558c2ddc", "score": "0.5621264", "text": "public function listar_secciones($arrDatos) {\n $data = array();\n $cond = '';\n $i = 0;\n \n if (array_key_exists(\"id\", $arrDatos)) {\n $cond .= \" AND ID_SECCION3 = '\" . $arrDatos[\"id\"] . \"'\";\n }\n if (array_key_exists(\"id0\", $arrDatos)) {\n $cond .= \" AND ID_SECCION3 LIKE '%0%'\";\n }\n if (array_key_exists(\"cap\", $arrDatos)) {\n $cond .= \" AND CAPITULO = '\" . $arrDatos[\"cap\"] . \"'\";\n }\n if (array_key_exists(\"mod\", $arrDatos)) {\n $cond .= \" AND MODULO = '\" . $arrDatos[\"mod\"] . \"'\";\n }\n if (array_key_exists(\"pag\", $arrDatos)) {\n if (is_int($arrDatos[\"pag\"])) {\n $cond .= \" AND PAGINA = \" . $arrDatos[\"pag\"];\n } else if (is_string($arrDatos[\"pag\"])) {\n $cond .= \" AND PAGINA = '\" . $arrDatos[\"pag\"] . \"'\";\n } else if (is_array($arrDatos[\"pag\"])) {\n $cond .= \" AND PAGINA IN (\" . implode(\",\", $arrDatos[\"pag\"]) . \")\";\n }\n }\n \n $sql = \"SELECT * \n FROM ENIG_ADMIN_GMF_SECCIONES \n WHERE ID_SECCION3 IS NOT NULL \" . $cond . \n \" ORDER BY ID_SECCION3\";\n //pr($sql); exit;\n $query = $this->db->query($sql);\n while ($row = $query->unbuffered_row('array')) {\n $data[$i] = $row;\n $i++;\n }\n $this->db->close();\n return $data;\n }", "title": "" }, { "docid": "52cb576b7aecd8eaf9b939040cf187dd", "score": "0.5620901", "text": "public function listMisi(){\n\t $cnx=new util();\n\t $cn=$cnx->getConexion();\n\t $res=$cn->prepare('call mostMis');/*AQUI ESTOY LLAMANDO AL PROCEDIMIENTO: LISTAR TODOS LOS PRODUCTOS*/\n\t $res->execute();\n\t // foreach ($res as $row){\n\t // $lclient[]=$row;\n\t // }\n\t return $res->fetchAll(PDO::FETCH_OBJ);/*TE TRAE POR EL NOMBRE DE LA COLUMNA*/\n\t }", "title": "" }, { "docid": "4e7d87f5905f718ba467e34b86768a71", "score": "0.5618004", "text": "public function getEcomiendas() {\n $pdo = Database::connect();\n $sql = \"SELECT A.ID_ENCOMIENDA, B.NOMBRE_US, B.APELLIDO_US, B.TELEFONO_US, \n A.DIRECCION_ENC, A.DESCRIPCION_ENC \n FROM cat_encomienda A, cat_usuarios B\n WHERE A.ID_US = b.ID_US\n AND A.IDCONDUCTOR IS NULL\";\n $resultado = $pdo->query($sql);\n //transformamos los registros en objetos de tipo Factura:\n $listado = array();\n foreach ($resultado as $da) {\n $ped = new Pedidos();\n $ped->setId($da['ID_ENCOMIENDA']);\n $ped->setDescripcionPedido($da['DESCRIPCION_ENC']);\n $ped->setNombre($da['NOMBRE_US']);\n $ped->setApellido($da['APELLIDO_US']);\n $ped->setTelefono($da['TELEFONO_US']);\n $ped->setDireccionPedido($da['DIRECCION_ENC']); \n array_push($listado,$ped);\n }\n Database::disconnect();\n //retornamos el listado resultante:\n return $listado;\n }", "title": "" }, { "docid": "8986176e0adce7deb8e35fa982872f0a", "score": "0.5615095", "text": "public function lista_os()\r\n\t{\r\n\t\tdate_default_timezone_set(\"America/Recife\");\t\t//DEFININDO FUSO HORÁRIO\r\n\r\n\t\t$dataAtual = date('Y-m-d');\t\t//RECUPERANDO O DIA ATUAL PARA VERIFICAR NO WHERE\r\n\r\n\t\t$this->db->where('data_proximo_servico', $dataAtual);\r\n\t\treturn $this->db->get('od_ordem_de_servico')->result();\r\n\t}", "title": "" }, { "docid": "aee163756b28c967490e83e5b8212618", "score": "0.56144106", "text": "function listarConciliacionDetalle(){\r\n $this->procedimiento='obingresos.ft_detalle_boletos_web_sel';\r\n $this->transaccion='OBING_CONBINDET_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->setParametro('fecha_ini','fecha_ini','date');\r\n $this->setParametro('fecha_fin','fecha_fin','date');\r\n $this->setParametro('moneda','moneda','varchar');\r\n $this->setParametro('id_moneda','id_moneda','integer');\r\n $this->setParametro('banco','banco','varchar');\r\n $this->setCount(false);\r\n\r\n $this->captura('fecha_hora', 'varchar');\r\n $this->captura('fecha', 'varchar');\r\n $this->captura('pnr', 'varchar');\r\n $this->captura('monto_ingresos', 'numeric');\r\n $this->captura('monto_archivos', 'numeric');\r\n $this->captura('fecha_pago', 'varchar');\r\n $this->captura('observaciones', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n\r\n\r\n $this->ejecutarConsulta();\r\n\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "4331f72e731c42c6f2a73ccfcc6c4986", "score": "0.5603845", "text": "function listarReservasUsu($item)\r\n {\r\n $reserva = new reservacion();\r\n $mensaje = new Mensajes_JSON();\r\n\r\n $reservaciones = array();\r\n $res = $reserva->ObtenerReservasUsu($item);\r\n\r\n if($res->rowCount())\r\n {\r\n while($row = $res->fetch(PDO::FETCH_ASSOC))\r\n { \r\n $item = array(\r\n 'numReservacion' =>$row['numReservacion'],\r\n 'fechaReservacion' =>$row['fechaReservacion'],\r\n 'Horario' =>$row['idHorarioReservacion'],\r\n 'horaInicio' =>$row['horaInicio'],\r\n 'horaFin' =>$row['horaFin'],\r\n 'idCancha' =>$row['idCancha'],\r\n 'cancha' =>$row['cancha'],\r\n 'idEstado' =>$row['idEstado'],\r\n 'estado' =>$row['estado']\r\n );\r\n array_push($reservaciones, $item);\r\n }\r\n $mensaje->printJSON($reservaciones);\r\n }\r\n else\r\n {\r\n $mensaje->error('No hay elementos seleccionados');\r\n \r\n }\r\n }", "title": "" }, { "docid": "f4cf5a79dad150259313ff3110a2ca3e", "score": "0.5602147", "text": "public function tratarDados(){\r\n\t\r\n\t\r\n }", "title": "" }, { "docid": "50c5f6d52003883427379dda8b53193c", "score": "0.56013256", "text": "function getAll()\r\n {\r\n $mensaje = new Mensajes_JSON();\r\n \r\n //creo un objeto de la clase estadoUsuaario, donde esta la consulta\r\n $horario = new horarioReservacion();\r\n $horarios = array();\r\n\r\n $res = $horario->obtenerHorarios();\r\n\r\n if($res->rowCount())\r\n {\r\n while($row = $res->fetch(PDO::FETCH_ASSOC))\r\n {\r\n $item = array(\r\n 'id' =>$row['idHorarioReservacion'],\r\n 'horaInicio' =>$row['horaInicio'],\r\n 'horaFin' =>$row['horaFin']\r\n );\r\n array_push($horarios, $item);\r\n }\r\n header(\"HTTP/1.1 200 OK\");\r\n $mensaje->printJSON($horarios);\r\n }\r\n else\r\n {\r\n\r\n $mensaje->error('No hay elementos seleccionados');\r\n \r\n }\r\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "6fc6693a6752ea1b97c1d91a6c8b3b51", "score": "0.0", "text": "public function store(DeviceRequest $request)\n {\n Device::create($request->all());\n\n return redirect()->route('devices.index')->with('success', 'device successfully created.');\n }", "title": "" } ]
[ { "docid": "79da2146a3794a65b80951c7ea2a2404", "score": "0.6621547", "text": "public function save()\n {\n $this->storage->save();\n }", "title": "" }, { "docid": "f934191a4b4b75a1fb96952dd934d298", "score": "0.6508533", "text": "public function store()\n {\n $this->validate(\n $this->request,\n $this->validationRules('create'),\n [],\n $this->getLabelFields('create')\n );\n\n if ($new = $this->model()->create($this->request->all())) {\n return $this->afterStored($new);\n }\n\n return\n back()\n ->withInput()\n ->with(\n 'error',\n __(\n 'Error when creating :resource_name.',\n ['resource_name' => static::$title]\n )\n );\n\n }", "title": "" }, { "docid": "29b26d3072dbf3730f945274190fe8af", "score": "0.6508172", "text": "public function store(StoreResourceRequest $request)\n {\n abort_if(\n $request->user()->cannot('create', Resource::class),\n 403\n );\n\n // course not found\n Course::where('program_id', auth()->user()->program_id)->findOrFail($request->course_id);\n\n try {\n $batchId = Str::uuid();\n foreach ($request->file as $file) {\n $temporaryFile = TemporaryUpload::firstWhere('folder_name', $file);\n\n if ($temporaryFile) {\n $r = Resource::create([\n 'course_id' => $request->course_id,\n 'user_id' => auth()->id(),\n 'batch_id' => $batchId,\n 'description' => $request->description\n ]);\n\n $r->users()->attach($r->user_id, ['batch_id' => $batchId]);\n\n $r->addMedia(storage_path('app/public/resource/tmp/' . $temporaryFile->folder_name . '/' . $temporaryFile->file_name))\n ->toMediaCollection();\n rmdir(storage_path('app/public/resource/tmp/' . $file));\n\n // event(new ResourceCreated($r));\n\n $temporaryFile->delete();\n }\n }\n\n if ($request->check_stay) {\n return redirect()\n ->route('resources.create')\n ->with('success', 'Resource was created successfully');\n }\n\n return redirect()\n ->route('resources.index')\n ->with('success', 'Resource was created successfully');\n } catch (\\Throwable $th) {\n throw $th;\n }\n }", "title": "" }, { "docid": "195678750c701128998da1a792face59", "score": "0.64855534", "text": "public function store()\n\t{\n\t\t$input = Input::only('link', 'description', 'level', 'title', 'categorie_id');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required|url',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer',\n\t\t\t'categorie_id' => 'required|integer'\n\t\t];\n\t\t\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = new Resource($input);\n\t\t\t$user = Auth::user();\n\t\t\t$user->resources()->save($resource);\n\t\t\t$user->save();\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('Your resource was successfully created!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "20369ffaffacb701b25ed702ed26d8a3", "score": "0.6440966", "text": "public function save(): void\n {\n $this->handler->write($this->getId(), $this->prepareForStorage(\n serialize($this->attributes)\n ));\n\n $this->started = false;\n }", "title": "" }, { "docid": "3d9eb044ff6d55a39b2aa1f967b0a444", "score": "0.6406951", "text": "public function store()\n {\n $this->beginAction('store');\n $this->applyHooks(AuthorizeAction::class);\n $this->gatherInput();\n $this->validateInput();\n $this->createResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "ca58ec6302f4412d3ed2c815a424ff00", "score": "0.6401442", "text": "public function store()\n\t{\n\t\t// not yet required!\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
55c02daf22e969ba6b78e2ce0844efd9
Sets an array of names used to refer to this object Overwrites previous set ids. Ids are case insensitive and all turned into lowercase.
[ { "docid": "24f0867dece4c98c1c95a0ce63ccb5e0", "score": "0.7190015", "text": "function setIds($ids)\n {\n $this->mIds = array();\n foreach ($ids as $id) {\n $this->mIds[dp_strtolower($id)] = TRUE;\n }\n }", "title": "" } ]
[ { "docid": "f938a6fa15ac868c93e2b005e8a84555", "score": "0.64851415", "text": "public function setNames(array $names)\n {\n $this->names = $names;\n }", "title": "" }, { "docid": "c565adb97b8e6fa4a6e3ed0d0a5de7e1", "score": "0.637908", "text": "public function setIds(array $ids)\n {\n $this->ids = $ids;\n return $this;\n }", "title": "" }, { "docid": "2e0f07a5ceafc5690ae4b84a594bcedb", "score": "0.6357743", "text": "public function setObjectIds($args=array())\n {\n $ids = !empty($args[0]) ? $args[0] : null;\n $ids = is_array($ids) ? $ids : array($ids);\n\n // first destroy dependent records since we're redefining them\n $this->destroyDependent();\n $this->_loaded['getObjectIds'] = $ids;\n $this->_changed = true;\n }", "title": "" }, { "docid": "d6e0043addad59dc068690dd54ad4e21", "score": "0.6348659", "text": "public function setNameId($name_id)\n {\n $this->name_id = $name_id;\n }", "title": "" }, { "docid": "1099f2c39c25ad4dba8c991ca5c7fb24", "score": "0.62925893", "text": "public function setTeamNames(Array $names) {\n // Strategy, update as many as are the same, then remove old extra\n // ones, or add any new ones\n $top_rank = count($names);\n $curr = DB::getAll(DB::T(DB::TEAM_NAME_PREFS), new DBCond('school', $this));\n for ($i = 0; $i < count($names) && $i < count($curr); $i++) {\n $tnp = $curr[$i];\n $tnp->name = $names[$i];\n $tnp->rank = $top_rank--;\n DB::set($tnp);\n }\n for (; $i < count($curr); $i++)\n DB::remove($curr[$i]);\n for (; $i < count($names); $i++) {\n $tnp = new Team_Name_Prefs();\n $tnp->school = $this;\n $tnp->name = $names[$i];\n $tnp->rank = $top_rank--;\n DB::set($tnp);\n }\n }", "title": "" }, { "docid": "9cbcd3f2c15561c33da588d0eb3aa34b", "score": "0.598648", "text": "public function setNameIDFormat(array $nameIDFormat) : void\n {\n $this->NameIDFormat = $nameIDFormat;\n }", "title": "" }, { "docid": "0cb01d8aea5036debf9d91464eeac274", "score": "0.5928466", "text": "public function setRecordIds(array $ids): self\n {\n // Basic input filter\n $ids = array_filter(array_map('trim', $ids));\n\n return $this->param('ids', implode(',', $ids));\n }", "title": "" }, { "docid": "969170a14955ab713608b14dd7e58acc", "score": "0.5866763", "text": "public function setAll($setArray)\r\n\t{\r\n\t\t// format: \"id\"=>100, \"name\"=>\"Chicken Soup\"\r\n\t\tforeach($setArray as $var=>$value)\r\n\t\t{\r\n\t\t\t$this->$var = $value;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d47530406da6eb48e327246d34cd9089", "score": "0.58474797", "text": "public function setStateIds($newVal)\r\n {\r\n if ( !is_array($newVal) ) {\r\n $newVal = array($newVal);\r\n }\r\n \t$this->setJoinView( true );\r\n \t$this->stateIds = $newVal;\r\n return $this;\r\n }", "title": "" }, { "docid": "e2f34ec48d80ba66d9501d6f3a460b27", "score": "0.58268416", "text": "protected function assignId(): void\n {\n $this->id = static::nameToId($this->name);\n }", "title": "" }, { "docid": "278161bf36844fbce452c997bbfd6fa7", "score": "0.5820318", "text": "public function setIdList ( $id_list )\r\n\t{\r\n\t\t$this->id_list = $id_list;\r\n\t}", "title": "" }, { "docid": "51e02bb4c04832b2955fad9e6a40b27e", "score": "0.581937", "text": "public function setNames($names)\n {\n $stmt = $this->query(\"SET NAMES $names\");\n return $this;\n }", "title": "" }, { "docid": "156759f8f5582086aa370cd83e242e01", "score": "0.57650435", "text": "public function setIds($ids): self\n {\n if (\\is_array($ids)) {\n $this->_params['values'] = $ids;\n } else {\n $this->_params['values'] = [$ids];\n }\n\n return $this;\n }", "title": "" }, { "docid": "3a900a8fe040f8124b8fb8cd0dd8ebed", "score": "0.5748105", "text": "protected function set_attributes($name, $attributes = array())\n\t{\n\t\tif ( ! $this->name_as_id or isset($attributes['id']))\n\t\t{\n\t\t\treturn $attributes;\n\t\t}\n\t\t$attributes['id'] = $this->id_prefix . $name;\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "7fb60648132d67076b521e8d33c15c49", "score": "0.57292044", "text": "public function setNames($val)\n {\n $this->_propDict[\"names\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0cef3687e19650de0c90d67e5ebef252", "score": "0.5727933", "text": "public function setFieldNames() {\r\n\t//\tif ($this->fields) {\r\n\t\t\t$this->fieldNames = array_keys($this->fields);\r\n\t//\t}\r\n\t}", "title": "" }, { "docid": "52a9f7ede365d13c7e397f7dcb08eb68", "score": "0.568159", "text": "public function bulkSet(array $args = array()) {\n foreach ($args as $argName => $arg) {\n $this->__set($argName, $arg);\n }\n }", "title": "" }, { "docid": "a9cb9a5b8ba1f20f06f6b3ce84ac356c", "score": "0.5675596", "text": "public function saveIds(array $ids): void;", "title": "" }, { "docid": "707e26ff17253b3bc7841e85e6d6b22b", "score": "0.5638861", "text": "public function setStoreIds(array $ids)\n {\n $this->storeIds = $ids;\n return $this;\n }", "title": "" }, { "docid": "aeefbd5016f7da0b6593c37b78666a91", "score": "0.56112343", "text": "public function setCountryIds($newVal)\r\n\t{\r\n\t\tif ( !is_array($newVal) ) {\r\n\t\t\t$newVal = array($newVal);\r\n\t\t}\r\n\t\t$this->setJoinView( true );\r\n\t\t$this->countryIds = $newVal;\r\n return $this;\r\n\t}", "title": "" }, { "docid": "072ca355036944134b16e538e6ea05c5", "score": "0.560766", "text": "public function setKids(array $kids) {\n $this->kids = $kids;\n }", "title": "" }, { "docid": "36f0b13fd27497b42604b03f1d90b4fe", "score": "0.559327", "text": "public function setIdentifier(array $identifier)\n {\n $this->identifier = $identifier;\n }", "title": "" }, { "docid": "f11c49dc1038cae7e1552333762e04cf", "score": "0.5589262", "text": "public function setNameId(string $nameId):void {\r\n\t\t$this->setName($nameId);\r\n\t\t$this->setHtmlId($nameId);\r\n\t}", "title": "" }, { "docid": "32e7f2d15978de6533ddcf7bf9baae9d", "score": "0.55758137", "text": "public function setLocationIds(?array $locationIds): void\n {\n $this->locationIds = $locationIds;\n }", "title": "" }, { "docid": "5855912e1b66b367205e61154a07ad4b", "score": "0.55509883", "text": "public function setCityIds($newVal)\r\n {\r\n if ( !is_array($newVal) ) {\r\n $newVal = array($newVal);\r\n }\r\n \t$this->setJoinView( true );\r\n \t$this->cityIds = $newVal;\r\n return $this;\r\n }", "title": "" }, { "docid": "ee82ee85521de5fabe3ac772c226cc25", "score": "0.55479264", "text": "public function setName($name)\n {\n $this->name = $name;\n\n if ($this->id === null) {\n $this->id = $name;\n }\n }", "title": "" }, { "docid": "78cc80d4a80efc0811d2ae139245cd33", "score": "0.5547429", "text": "public function setByIDList($idList)\n {\n $has = [];\n\n // Index current data\n foreach ($this->column() as $id) {\n $has[$id] = true;\n }\n\n // Keep track of items to delete\n $itemsToDelete = $has;\n\n // add items in the list\n // $id is the database ID of the record\n if ($idList) {\n foreach ($idList as $id) {\n unset($itemsToDelete[$id]);\n if ($id && !isset($has[$id])) {\n $this->add($id);\n }\n }\n }\n\n // Remove any items that haven't been mentioned\n $this->removeMany(array_keys($itemsToDelete));\n }", "title": "" }, { "docid": "bc9a10222dd8b156895536ffbec6d0c8", "score": "0.55204225", "text": "function set_name($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_NAME, $id);\r\n }", "title": "" }, { "docid": "3dcabb332acef835d43e6cf194449ba2", "score": "0.5519265", "text": "public function setStoreIds(array $store_ids);", "title": "" }, { "docid": "6c77dd4e20528f049ed3d4dd0b1b53f2", "score": "0.5494733", "text": "public function setId()\n {\n $id = $this->type.'_'.substr(md5($this->name), 0, 5);\n $this->id = $this->form->id.'_'.$id;\n }", "title": "" }, { "docid": "39b127469c6513337d1d6beabfcfa9be", "score": "0.5478899", "text": "public function setIdentifier(array $identifier = [])\n {\n $this->identifier = [];\n if ([] === $identifier) {\n return $this;\n }\n foreach($identifier as $v) {\n if ($v instanceof FHIRIdentifier) {\n $this->addIdentifier($v);\n } else {\n $this->addIdentifier(new FHIRIdentifier($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "39b127469c6513337d1d6beabfcfa9be", "score": "0.5478899", "text": "public function setIdentifier(array $identifier = [])\n {\n $this->identifier = [];\n if ([] === $identifier) {\n return $this;\n }\n foreach($identifier as $v) {\n if ($v instanceof FHIRIdentifier) {\n $this->addIdentifier($v);\n } else {\n $this->addIdentifier(new FHIRIdentifier($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "b9633f8b367ee7dd7393e9b697a6733b", "score": "0.5464311", "text": "public function setName(array $name = []): object\n {\n if ([] !== $this->name) {\n $this->_trackValuesRemoved(count($this->name));\n $this->name = [];\n }\n if ([] === $name) {\n return $this;\n }\n foreach($name as $v) {\n if ($v instanceof FHIRMedicinalProductDefinitionName) {\n $this->addName($v);\n } else {\n $this->addName(new FHIRMedicinalProductDefinitionName($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "fd5cd186b3a8d56ca58d4c159dd6280f", "score": "0.54424703", "text": "public function setName($name) {\n if (!Strings::endsWith($name, \"[]\")) {\n $name .= \"[]\";\n }\n parent::setName($name);\n return $this;\n }", "title": "" }, { "docid": "d69fe8d45da05f53a83ff2ce5a441916", "score": "0.54245615", "text": "protected function setExistingIds(array $existingIds)\n {\n $this->existingIds = $existingIds;\n }", "title": "" }, { "docid": "31d420fb9ab551dd80b0da6e583ddb3e", "score": "0.5422455", "text": "public function setNameIDMappingService(array $nameIDMappingService)\n {\n $this->nameIDMappingService = $nameIDMappingService;\n return $this;\n }", "title": "" }, { "docid": "4c0098ae104bc9be7307340eadaa978d", "score": "0.54200447", "text": "public function setObjectIds(?array $objectIds): void\n {\n $this->objectIds['value'] = $objectIds;\n }", "title": "" }, { "docid": "6127f7048ef11eaeafb5ad04e943b6f5", "score": "0.5409106", "text": "public function setAssetIds($value)\n {\n \tif (is_null($value)) {\n \t\t$value = array();\n \t} else if (!is_array($value)) {\n \t\t$value = array($value);\n \t}\n \n \t$this->assets->clear();\n \n \tforeach($value as $id) {\n \t\t$asset = EntityUtils::getEntity('AssetLegacy', $id);\n \t\t$this->assets->add($asset);\n \t}\n }", "title": "" }, { "docid": "010eb68c94d97f8ac0393d507e57dd01", "score": "0.5406885", "text": "public function set_tag_ids( $term_ids ) {\n\t\t$this->set_prop( 'tag_ids', array_unique( array_map( 'intval', $term_ids ) ) );\n\t}", "title": "" }, { "docid": "702968494e59c4b6dc36b3211e100157", "score": "0.5406591", "text": "function setM_ID_NAME($M_ID_NAME){ $this->M_ID_NAME = $M_ID_NAME; }", "title": "" }, { "docid": "a786c2f804d641a7f6c6979296b6c708", "score": "0.5402569", "text": "function setAll($idIn,\n $nameIn,\n $ipAdressIn,\n $portIn,\n $unicastUrlIn,\n $lcnIn,\n $iconIn,\n $preRollIn,\n $postRollIn,\n $enabledIn) {\n $this->id = (int)$idIn;\n $this->name = $nameIn;\n $this->ipAdress = $ipAdressIn;\n $this->port = (int)$portIn;\n $this->unicastUrl = $unicastUrlIn;\n $this->lcn = (int)$lcnIn;\n $this->preRoll = (int)$preRollIn;\n $this->postRoll = (int)$postRollIn;\n $this->icon = $iconIn;\n $this->enabled = $enabledIn;\n }", "title": "" }, { "docid": "d7fbd53a526f8ed8d7463b3ddef64341", "score": "0.5381077", "text": "public function setIdentifier(array $identifier = []): object\n {\n if ([] !== $this->identifier) {\n $this->_trackValuesRemoved(count($this->identifier));\n $this->identifier = [];\n }\n if ([] === $identifier) {\n return $this;\n }\n foreach($identifier as $v) {\n if ($v instanceof FHIRIdentifier) {\n $this->addIdentifier($v);\n } else {\n $this->addIdentifier(new FHIRIdentifier($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "4043787a93a92749c26571e49850a28b", "score": "0.5379176", "text": "function setName($name) {\n $this->updateAttributes(array('name'=>$name));\n }", "title": "" }, { "docid": "bfcf3d0c1a4a58b21556491ab26c8b97", "score": "0.535711", "text": "public function ids(array $ids) {\n $query = [\n \"values\" => $ids\n ];\n\n $this->saveQueryInstance('ids', $query);\n\n return $this;\n }", "title": "" }, { "docid": "dd83c3f805c694bfe45f6dbb00af5f06", "score": "0.53560066", "text": "function setBillsIDs(){\n\t\t$billIds = [];\t\t\n\t\tforeach ($this->userBills as $bill){\n\t\t\t$id = $bill->getBillID();\n\t\t\tarray_push($billIds, $id);\n\t\t}\n\t\t$this->userBillIDs = $billIds;\n\t}", "title": "" }, { "docid": "cec4b262b0599dd14df6871f9896e68f", "score": "0.5351278", "text": "public function setName($name) {\r\n\t $this->_name = $name;\r\n }", "title": "" }, { "docid": "1a333f4ff9ca3999bb5d598b54f37671", "score": "0.5338541", "text": "public function setUuids(array $uuids): self;", "title": "" }, { "docid": "e017cc719a496b4c6e4a789c88aaeac5", "score": "0.53378946", "text": "function set_id($id) {\r\n\t\t$this->id_ens = $id;\r\n\t}", "title": "" }, { "docid": "7fa0e90cf32d012c1feed67ad46b2550", "score": "0.53358376", "text": "public function setFieldNames(array $field_names);", "title": "" }, { "docid": "07e686e553d87dc06ca70431cab83ed2", "score": "0.5330127", "text": "public function setRelated($name, array $ids, $deleteOld = false)\n {\n if (!$this->issetRelation($name)) {\n throw new UnknownPropertyException('Setting unknown property: ' . get_class($this->owner) . '::' . $name);\n }\n $this->_related[$name] = [\n 'deleteOld' => $deleteOld,\n 'ids' => $ids,\n 'meta' => $this->getRelationMeta($name),\n ];\n }", "title": "" }, { "docid": "27b2be8757d3f8b106f33f277e2f3612", "score": "0.53051007", "text": "public function setIdPropertyName($name)\n {\n $this->idPropertyName = $name;\n return $this;\n }", "title": "" }, { "docid": "33e2a3608b0584852e206523b756913d", "score": "0.5301524", "text": "public function setIdField($name)\n {\n $this->id = $name;\n return $this;\n }", "title": "" }, { "docid": "282645b0b4740f28d24c0b6a44f67304", "score": "0.5276648", "text": "public function setId($_id) { $this->id = $_id; }", "title": "" }, { "docid": "38bf77eaa3da068444dc36d52221c9ab", "score": "0.5262963", "text": "function chname($id, $name) {\n\t\t\t$this->updateAll(\n\t\t\t\tarray('name'=>\"'\".$name.\"'\"),\n\t\t\t\tarray('id'=>$id));\n\t}", "title": "" }, { "docid": "e9e2c9606d9431b9f14708f0be3c1e7a", "score": "0.5258467", "text": "public function setAll($array);", "title": "" }, { "docid": "b5f2445d7acaa14b636da85cf9334e94", "score": "0.5242196", "text": "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "title": "" }, { "docid": "7a374ef2f9fb5895d15d294ef600672a", "score": "0.52417094", "text": "function setId($id) {\r\n $this->_id = $id;\r\n }", "title": "" }, { "docid": "b3df67ebf496ee66aa6de781159860fe", "score": "0.5238915", "text": "public function setName($newName){\n \t$this->name = $newName;\n }", "title": "" }, { "docid": "2c6cc5ded31e2544e7eec1314a81548e", "score": "0.5225037", "text": "public static function setOriginal(array $nids) {\n self::$nids = $nids;\n }", "title": "" }, { "docid": "fe52c7cb2a1c0bcb5f4a6cb9afa8a4dc", "score": "0.5224365", "text": "function setId($id) \n {\n $this->_id = $id;\n }", "title": "" }, { "docid": "9718deadebbb89661b2fa094760d005f", "score": "0.5221089", "text": "public function testRegisteringArrayOfClassNames()\n\t{\n\t\t$entity1 = $this->getMockBuilder(User::class)\n\t\t ->setMockClassName(\"FooEntity\")\n\t\t ->disableOriginalConstructor()\n\t\t ->getMock();\n\t\t$entity1->expects($this->any())\n\t\t ->method(\"setId\")\n\t\t ->with(123);\n\t\t$entity2 = $this->getMockBuilder(User::class)\n\t\t ->setMockClassName(\"BarEntity\")\n\t\t ->disableOriginalConstructor()\n\t\t ->getMock();\n\t\t$entity2->expects($this->any())\n\t\t ->method(\"setId\")\n\t\t ->with(456);\n\t\t$getter = function ($entity)\n\t\t{\n\t\t\treturn 123;\n\t\t};\n\t\t$setter = function ($entity, $id)\n\t\t{\n\t\t\t/** @var User $entity */\n\t\t\t$entity->setId($id);\n\t\t};\n\t\t$this->registry->registerIdAccessors([\"FooEntity\", \"BarEntity\"], $getter, $setter);\n\t\t$this->assertEquals(123, $this->registry->getEntityId($entity1));\n\t\t$this->registry->setEntityId($entity1, 123);\n\t\t$this->assertEquals(123, $this->registry->getEntityId($entity2));\n\t\t$this->registry->setEntityId($entity2, 456);\n\t}", "title": "" }, { "docid": "4a94a1ed799d7c22bf670e68d625811e", "score": "0.5211237", "text": "function setName($name)\n {\n $this->updateAttributes(array('name' => $name));\n }", "title": "" }, { "docid": "a804316663ac2e0b046a9702799a5dc4", "score": "0.5204341", "text": "public function withId($stringArgs)\n {\n foreach (func_get_args() as $id) {\n $this->fields['Id']['FieldValue'][] = $id;\n }\n return $this;\n }", "title": "" }, { "docid": "d235eda8976b699b430f7721e3d05c9b", "score": "0.520384", "text": "public function set_category_ids( $term_ids ) {\n\t\t$this->set_prop( 'category_ids', array_unique( array_map( 'intval', $term_ids ) ) );\n\t}", "title": "" }, { "docid": "b01bb2c69c4f99c0eaecde47d364c00f", "score": "0.5197533", "text": "public function setId($id){$this->_id = $id;}", "title": "" }, { "docid": "42b548e39a56b421377186ae48e9cadf", "score": "0.51953244", "text": "public function setName($name) {\n\n $this->name = $name;\n }", "title": "" }, { "docid": "e79175343f39aaefbfd2371ec80bbe17", "score": "0.5194307", "text": "public function setIdentifier($entity, array $id) : void;", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" }, { "docid": "47fe3e778ad4bd06fcea8caf98dec216", "score": "0.51903373", "text": "public function setName($name);", "title": "" } ]
c45a342c6205df9a113379a4c9dea94a
Operation sessionDeleteWithHttpInfo Close the Session
[ { "docid": "cb87a2a464747164e9ab6e65002a59bc", "score": "0.79630363", "text": "public function sessionDeleteWithHttpInfo()\n {\n $returnType = '';\n $request = $this->sessionDeleteRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" } ]
[ { "docid": "35db61d705bdaa55481ff471195d7be3", "score": "0.72301674", "text": "public function sessionDelete()\n {\n $this->sessionDeleteWithHttpInfo();\n }", "title": "" }, { "docid": "77dbe25610a6bc1521d6d74e1799363f", "score": "0.6737849", "text": "public function sessionDeleteAsyncWithHttpInfo()\n {\n $returnType = '';\n $request = $this->sessionDeleteRequest();\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "771d0ab9083ace3a3701847ea3e5cb9d", "score": "0.66681373", "text": "public function delete_delete(){\n $response = $this->SessionM->delete_session(\n $this->delete('id')\n );\n $this->response($response);\n }", "title": "" }, { "docid": "4bc14ee75cce20f9648aaea1ffb9f4c1", "score": "0.6410925", "text": "public function deleteSession();", "title": "" }, { "docid": "c6eeafa57a4edc1db21625932dff42f0", "score": "0.59668356", "text": "public function delete() {\n\t\tcurl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t$this->exec_session();\n\t\treturn $this->response_info['http_code'];\n\t}", "title": "" }, { "docid": "02bf5c591f167b654681723e397f8163", "score": "0.5863263", "text": "public function destroy(){\n $this->client->endSession($this->session);\n }", "title": "" }, { "docid": "d73b5d1954e36d9439e95a78a630310c", "score": "0.5658234", "text": "public function deleteSession($idSession){\n\t\t$response = array('status' => 'Success');\n\t\tif(isset($idSession)){\n\t\t\t$this->db->where('id_sesion',$idSession);\n\t\t\t$this->Result_ = $this->db->get($this->Table_);\n\t\t\tif($this->Result_->num_rows() > 0){\n\t\t\t\t$this->db->where('id_sesion',$idSession);\n\t\t\t\t$this->db->delete($this->Table_);\n\t\t\t\t$response['msg'] = '3003';\n\t\t\t\t$response['data'] = $this->Result_->result_array();\n\t\t\t}else{\n\t\t\t\t$response['msg'] = '2001';\n\t\t\t}\n\t\t}else{\n\t\t\t$response['msg'] = '4000';\n\t\t}\n\t\t#enviamos los resultados\n\t\t$this->rest->_responseHttp($response,$this->CodeHttp_);\n\t}", "title": "" }, { "docid": "9c0da07b305ff11f07bf1bb4ee7b3b26", "score": "0.5625018", "text": "public function destroySession()\t{\n\t\treturn $this->deleteRequest(SESSION_PATH . $this->siteId);\n\t}", "title": "" }, { "docid": "5471dfdaed89db259bfe8e591c3acdd9", "score": "0.56115437", "text": "public static function closeSession ($session) {\n $sql = array (\n \"statement\" => \"delete\",\n \"from\" => \"sessions\",\n \"where\" => array (\n \"=\" => array (\n \"session\" => $session\n )\n )\n );\n \n return JsonSQL::sqlify ($sql);\n }", "title": "" }, { "docid": "463cd1f716e33fc42a65566948500e68", "score": "0.558376", "text": "public function disconnect()\n {\n $this->login();\n $url = $this->getDatabaseUrl() . \"/sessions/\" . $this->sessionToken;\n\n $response = Http::withToken($this->sessionToken)\n ->delete($url)\n ->json();\n\n // Check for errors\n $this->checkResponseForErrors($response);\n\n $this->forgetSessionToken();\n\n return $response;\n }", "title": "" }, { "docid": "d14140dec908bf879e053d5756a3501b", "score": "0.5575726", "text": "function _session_delete ($dbLink, $apiUserToken, $requestArgs) {\n /*\n * Initialize profiling if enabled in piClinicConfig.php\n */\n\t$profileData = array();\n\tprofileLogStart ($profileData);\n\n\t// format the return values and debugging info\n\t$returnValue = array();\n\t$dbInfo = array();\n\t$dbInfo ['requestArgs'] = $requestArgs;\n\n\t// Initalize the log entry for this call\n // more fields will be added later in the routine\n\t$logData = createLogEntry ('API', __FILE__, 'session', $_SERVER['REQUEST_METHOD'], $apiUserToken, $_SERVER['QUERY_STRING'], null, null, null, null);\n\n\tprofileLogCheckpoint($profileData,'PARAMETERS_VALID');\n\n\t// Make sure the record is currently active\n\t// and create query string to look up the token\n\t$getQueryString = 'SELECT * FROM `'.DB_TABLE_SESSION.'` WHERE `token` = \\''. $apiUserToken .'\\';';\n $dbInfo['queryString'] = $getQueryString;\n\n\t// Token is a unique key in the DB so no more than one record should come back.\n\t$testReturnValue = getDbRecords($dbLink, $getQueryString);\n\t\n\tif ($testReturnValue['httpResponse'] != 200) {\n $dbInfo['returnData'] = $testReturnValue;\n\t\t// can't find the record to delete. It could already be deleted or it could not exist.\n\t\t$returnValue['contentType'] = CONTENT_TYPE_JSON;\n\t\tif (API_DEBUG_MODE) {\n\t\t\t$returnValue['error'] = $dbInfo;\n\t\t}\n\t\t$returnValue['httpResponse'] = 404;\n\t\t$returnValue['httpReason']\t= \"User session to delete not found.\";\n $logData['logStatusCode'] = $returnValue['httpResponse'];\n $logData['logStatusMessage'] = $returnValue['httpReason'];\n writeEntryToLog ($dbLink, $logData);\n profileLogClose($profileData, __FILE__, $requestArgs, PROFILE_ERROR_NOTFOUND);\n return $returnValue;\n\t} else {\n\t\t$logData['logBeforeData'] = json_encode($testReturnValue['data']);\n\t}\n\n\t// if this session is already closed, exit without changing anything\n\tif (!$testReturnValue['data']['loggedIn']) {\n\t\t$returnValue['contentType'] = CONTENT_TYPE_JSON;\n\t\t// return not found because no valid session was found\n\t\t$returnValue['httpResponse'] = 404;\n\t\t$returnValue['httpReason']\t= \"User session was deleted in an earlier call.\";\n $logData['logStatusCode'] = $returnValue['httpResponse'];\n $logData['logStatusMessage'] = $returnValue['httpReason'];\n writeEntryToLog ($dbLink, $logData);\n profileLogClose($profileData, __FILE__, $requestArgs, PROFILE_ERROR_DELETED);\n return $returnValue;\n\t}\n\t\n\t// valid and open session record found so delete it\n\t// delete means only to clear the logged in flag\n\t// \t\tand set the logged out time\n $sessionUpdate = array();\n\t$now = new DateTime();\n $sessionUpdate['token'] = $apiUserToken;\n $sessionUpdate['loggedOutDate'] = $now->format('Y-m-d H:i:s');\n $sessionUpdate['loggedIn'] = 0;\n $dbInfo['sessionUpdate'] = $sessionUpdate;\n\n $columnsUpdated = 0;\n\tprofileLogCheckpoint($profileData,'UPDATE_READY');\n\n $deleteQueryString = format_object_for_SQL_update (DB_TABLE_SESSION, $sessionUpdate, 'token', $columnsUpdated);\n $dbInfo['deleteQueryString'] = $deleteQueryString;\n\n\t// try to update the record in the database \n\t$qResult = @mysqli_query($dbLink, $deleteQueryString);\n\tif (!$qResult) {\n\t\t// SQL ERROR\n\t\t// format response\n\t\t$returnValue['contentType'] = CONTENT_TYPE_JSON;\n\t\tif (API_DEBUG_MODE) {\n\t\t\t$dbInfo['deleteQueryString'] = $deleteQueryString;\n\t\t\t$dbInfo['sqlError'] = @mysqli_error($dbLink);\n\t\t\t$returnValue['debug'] = $dbInfo;\n\t\t}\n\t\t$returnValue['httpResponse'] = 500;\n\t\t$returnValue['httpReason']\t= \"Unable to delete user session. SQL DELETE query error.\";\n\t} else {\n\t\tprofileLogCheckpoint($profileData,'UPDATE_RETURNED');\n\t\t// successfully deleted\n\t\t$returnValue['contentType'] = CONTENT_TYPE_JSON;\n\t\tif (API_DEBUG_MODE) {\n\t\t\t$dbInfo['sqlError'] = @mysqli_error($dbLink);\n\t\t\t$returnValue['debug'] = $dbInfo;\n\t\t}\n\t\t$returnValue['httpResponse'] = 200;\n\t\t$returnValue['httpReason']\t= \"User session deleted.\";\n\t\t@mysqli_free_result($qResult);\n\t}\n $logData['logStatusCode'] = $returnValue['httpResponse'];\n $logData['logStatusMessage'] = $returnValue['httpReason'];\n writeEntryToLog ($dbLink, $logData);\n\n\t$returnValue['contentType'] = CONTENT_TYPE_JSON;\n\tif (API_DEBUG_MODE) {\n\t\t$returnValue['debug'] = $dbInfo;\n\t}\n\tprofileLogClose($profileData, __FILE__, $requestArgs);\n\treturn $returnValue;\n}", "title": "" }, { "docid": "a19807eafabf3dc06b90060d3488a6cb", "score": "0.55727154", "text": "public function sessionDestroy(){\n return session_destroy();\n }", "title": "" }, { "docid": "2bcace5d54af83e0059f02af58f866f4", "score": "0.55674434", "text": "public function deleteSessionAction()\n {\n try {\n $data = $this->Request()->getParam('data');\n\n if (is_array($data) && isset($data['id'])) {\n $data = array($data);\n }\n\n foreach ($data as $record) {\n $sessionId = $record['id'];\n\n if (empty($sessionId) || !is_numeric($sessionId)) {\n $this->View()->assign(array(\n 'success' => false,\n 'data' => $this->Request()->getParams(),\n 'message' => 'No valid Id'\n ));\n return;\n }\n\n $entity = $this->getSessionRepository()->find($sessionId);\n $this->getManager()->remove($entity);\n }\n\n //Performs all of the collected actions.\n $this->getManager()->flush();\n\n $this->View()->assign(array(\n 'success' => true,\n 'data' => $this->Request()->getParams()\n ));\n } catch (Exception $e) {\n $this->View()->assign(array(\n 'success' => false,\n 'data' => $this->Request()->getParams(),\n 'message' => $e->getMessage()\n ));\n }\n }", "title": "" }, { "docid": "b158602673e1fc4764af684cacd3f615", "score": "0.55664253", "text": "abstract public function closeSession();", "title": "" }, { "docid": "d0bd60d1e441cbc87a6adaf5a5d2e8a3", "score": "0.55605984", "text": "public function close() {\r\n\t\t$this->client->endSession($session);\r\n\t}", "title": "" }, { "docid": "46b31d02d87811519c9ee9757859bba5", "score": "0.55303395", "text": "public function deleteSession()\n {\n Cookie::put($this->cookie_prefix.'sessionhash', '', time() - 3600);\n Cookie::put($this->cookie_prefix.'userid', '', time() - 3600);\n Cookie::put($this->cookie_prefix.'password', '', time() - 3600);\n \n DB::table($this->dbprefix.'session')\n ->where('sessionhash', $this->info['sessionhash'])\n ->delete();\n }", "title": "" }, { "docid": "daab81f337b32895780fbb862bf3d9a9", "score": "0.55077916", "text": "public function destroySession();", "title": "" }, { "docid": "a86903ed10ae6adaa0a6f7cf599aaead", "score": "0.5488505", "text": "public function sessionDeleteAsync()\n {\n return $this->sessionDeleteAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "b71b5e6a1a86a0c8e7bc76cd23cd6522", "score": "0.5402469", "text": "public function delete($id){\r\n $this->session->delete(array('id'=>$id));\r\n }", "title": "" }, { "docid": "97819d0f41062036d557147f3138d2df", "score": "0.5321825", "text": "public function delete($request) {\n\n switch (count($request->url_elements)) {\n\n case 1:\n if (Common::checkAuthorization()) {\n $session = Session::find_by_id($_SESSION['session']);\n if ($session) {\n $session->delete();\n session_destroy();\n setcookie(\"u\", '', time()-3600);\n setcookie(\"s\", '', time()-3600);\n return json_decode($session->to_json());\n } else {\n throw new Exception(\"Session not found.\", 404);\n }\n } else {\n throw new Exception(\"Authorisation required.\", 403);\n }\n\n default:\n throw new Exception(\"Unknown request.\", 500);\n\n }\n\n }", "title": "" }, { "docid": "44f28ac856288404b4976017d8cec520", "score": "0.5303303", "text": "public static function dbSessionDelete ()\n {\n Resources::getInstance()->Database->execQuery(\n\t\t\t\"DELETE FROM ##sessions WHERE session_id=\".Connection::escape(Session::$sessionId)\n\t\t);\n }", "title": "" }, { "docid": "85f94afd6383bb107ba8fc107c47ba61", "score": "0.5288141", "text": "protected function sessionDeleteRequest()\n {\n\n $resourcePath = '/session';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8f6df3f3bf8067980f9808d56460ba3f", "score": "0.52464634", "text": "public static function destroy()\n {\n\t\tSession::$data = new Map();\n\n\t\tif (Session::$validSessionId == false)\n\t\t\treturn;\n\n\t\tif (Configuration::getInstance()->Session && Configuration::getInstance()->Session->database == 'true')\n\t\t{\n\t\t\tSession::dbSessionDelete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsession_destroy();\n\t\t}\n\n\t\tCookies::remove(Session::$sessionName);\n\n\t\tSession::$sessionOpen = false;\n\t\tSession::$validSessionId = false;\n\t}", "title": "" }, { "docid": "cba9e7260ac8fbf4a20af14e42fc0502", "score": "0.5245842", "text": "public function sessionClose() {\n\n }", "title": "" }, { "docid": "f1de0774450d1644a89dfd66c63bebe8", "score": "0.52177405", "text": "public function actionDelete()\n {\n $session = \\Yii::$app->session;\n\n if ($session->isActive) {\n $session->close();\n $session->destroy();\n }\n\n Numbers::deleteAll();\n\n return 200;\n }", "title": "" }, { "docid": "9088cedc28139a7a9d613c0cc50218f9", "score": "0.5132379", "text": "public function closeSession()\n {\n session_write_close();\n }", "title": "" }, { "docid": "3941628821fb1c56bd30374c676753c0", "score": "0.51055837", "text": "public function deleteSession($name)\n {\n $this->_startSession();\n Arr::delete($_SESSION, $name);\n }", "title": "" }, { "docid": "38598eb5aabffcc6d86dbdc42465dfef", "score": "0.5103758", "text": "public static function deleteSession(){\n session_unset(); // unset $_SESSION variable for the run-time \n session_destroy(); // destroy session data in storage\n setcookie(session_name(),'',time()-1); // deletes the session cookie containing the session ID\n }", "title": "" }, { "docid": "b934e07e35362e9aea77c538843bd5ae", "score": "0.5088104", "text": "function http_delete($url, $authbool, &$message = 0, $sessiondelete = false)\n{\n $answer = Request::delete($url, array(), '', $authbool);\n \n if (isset($answer['status']))\n $message = $answer['status']; \n \n if ($message == \"401\" && $sessiondelete == false) {\n Authentication::logoutUser();\n }\n\n return (isset($answer['content']) ? $answer['content'] : '');\n}", "title": "" }, { "docid": "87e37030426022128ff56b2794b700e1", "score": "0.5082919", "text": "public function logout () {\n if ($this->_token == NULL) {\n return;\n }\n\n $this->curl_setup($this->databasesUrl() . '/' .\n rawurlencode($this->_database) .\n '/sessions/' .\n rawurlencode($this->_token),\n 'DELETE');\n\n // Submit the requested operation to FileMaker Data API Server.\n $response = $this->curl_exec();\n\n // DEBUG\n //echo \"Closing response: \";\n //var_dump($response); echo \"\\n\";\n }", "title": "" }, { "docid": "168b6b0d64facd9b372ddf9e82b91a00", "score": "0.5045931", "text": "public function testDeleteSession()\n {\n }", "title": "" }, { "docid": "7adea6bb5fc05d2e592777a6b0ee7ed1", "score": "0.50244224", "text": "public function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "title": "" }, { "docid": "15ba6c3550001df81fa4358a53c62241", "score": "0.50148743", "text": "function destroy($sessId) {\r\n\t\t\tsessionLog('Destroy');\r\n\t\t\treturn $this->db->delete(\"php_session\", \"session_id = ?\", array($sessId), true);\r\n\t\t}", "title": "" }, { "docid": "814e8840ae9b0ff7e4bf8c9449877f3f", "score": "0.49970093", "text": "function remove_sess(){\n\n\t$result = false; \n\n\tglobal $client_id, $sess_token, $request_method,$db_settings1; \n\n\t/*Check if api key is valid*/\n\tif ($client_id != '13adfewasdf432dae'){\n\t\thttp_response_code(401); \n\t\techo json_encode(array('message' => 'Invalid client id.'));\n\t\treturn $result;\n\t}\n\n\t/*If there is no session token present*/\n\tif (!$sess_token){\n\t\thttp_response_code(401); \n\t\techo json_encode(array('message' => 'Session token expired. Please login again.'));\n\t\treturn $result;\n\t}\n\n\t/*Create db connection for main database*/\n\t$con = new mysqldb($db_settings1, false);\n\n\t$stmt = \"Delete From UserSessions Where UserSessionToken=:UserSessionToken\";\n\t$values = array(\":UserSessionToken\" => md5($sess_token));\n\t$value_prop = array(\":UserSessionToken\" => PDO::PARAM_STR);\n\t$result = $con->delete($stmt,$values,$value_prop);\n\n\tif ($result){\n\t\thttp_response_code(200);\n\t\techo json_encode(array('message' => 'OK'));\n\t}else{\n\t\thttp_response_code(400);\n\t\techo json_encode(array('message' => 'Bad request.'));\n\t}\n\n\treturn $result;\n\n}", "title": "" }, { "docid": "39c82c2ea068f909f07c9296e360a03b", "score": "0.4989494", "text": "public static function Close()\n {\n if (self::Connected())\n {\n session_unset();\n session_destroy();\n }\n }", "title": "" }, { "docid": "c35eded7ac65d8fb2713d7f677a32d60", "score": "0.4987144", "text": "public function destroy()\n\t{\n Auth::logout();\n\n return Response::json(array(\n 'message' => 'The session was destroyed',\n ), 400);\n\t}", "title": "" }, { "docid": "11579c6c9aa2504c3bdaa3e86f6eac62", "score": "0.49837002", "text": "public static function destroySession() {\n $model = UsersLogin::model()->findByAttributes(array('sessions'=>Yii::app()->session->getSessionID()));\n if ($model != null) $model->delete();\n }", "title": "" }, { "docid": "d147451558cf457cb9d1e4b5413081ad", "score": "0.4982179", "text": "function closeSession($received){\n\t//user to delete\n\t$delete=$received->username;\n\t//grab the newest session JSON\n\t$json=getSessions();\n\t$json=updateSessions($json);\n\t//delete the user from JSON\n\tunset($json->users->$delete);\n\t//SAVE THE FILE\n\t$newFile=fopen(\"courses/_system/sessions.json\", \"w\") or die(\"Unable to open file \");\n\tfwrite($newFile, json_encode($json));\n\tfclose($newFile);\n\t//destroy the session\n\tunset($_SESSION);\n\tsession_destroy();\n\t//report to browser\n\techo \"session closed\";\n}", "title": "" }, { "docid": "bf9f72a71b517b1ab90eb9c892694614", "score": "0.49606034", "text": "public function destroy($sessionID);", "title": "" }, { "docid": "861ef2e41765180a9893380bc921ff2d", "score": "0.49525258", "text": "public abstract function destroy($session_id);", "title": "" }, { "docid": "6a85ba63d3a29aa938002634a3baaf06", "score": "0.49302512", "text": "public /*void*/ function handleRequest() {\n\t\n\t\t\tdebug(\"Logout !\");\n\t\t\n\t\t\t// DELETE BACKEND SESSION\n\t\t\t$request = new Requestv2(\"v2/SessionRequestHandler\", DELETE);\n\t\t\t$request->addArgument(\"accessToken\", $_SESSION['user']->session);\n\t\t\t$request->addArgument(\"socialNetwork\", $_SESSION['user']->socialNetworkName);\n\n\t\t\t$responsejSon = $request->send();\n\t\t\t$responseObject = json_decode($responsejSon);\n\t\t\t\t\n\t\t\tif($responseObject->status != 200) {\n\t\t\t\t$this->error = $responseObject->description;\n\t\t\t}\n\t\t\t\t\n\t\t\t// DELETE FRONTEND SESSION\n\t\t\tsession_destroy();\n\t\t\t\n\t\t\t// Redirect to login\n\t\t\t$this->redirectTo(\"listAnnonces\");\t\n\t}", "title": "" }, { "docid": "678e0070b404605565c5de1b7efc148a", "score": "0.4923274", "text": "public static function delete($name) {\n if(self::exists($name)) {\n unset($_SESSION[$name]);\n }\n }", "title": "" }, { "docid": "84c696d24e2f5817a7b060a1bdf0b469", "score": "0.49197364", "text": "public static function delete($name) {\n unset($_SESSION[$name]);\n }", "title": "" }, { "docid": "a7520c3b8eba6474aa52f26b235b2028", "score": "0.48987213", "text": "function _SessionUtil__Close()\n{\n // nothing to do\n return true;\n}", "title": "" }, { "docid": "f1a7a4b8f097841a4994318d4571c839", "score": "0.487821", "text": "function SessionClose() {\n}", "title": "" }, { "docid": "27b4bea14fb856e2bc7f3f824046822a", "score": "0.48662603", "text": "public function completeSessionWithHttpInfo($body) {\n $returnType = '\\Ingrid\\Checkout\\Api\\Siw\\Model\\CompleteSessionResponse';\n $request = $this->completeSessionRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $curl = $this->curlFactory->create();\n $headers = $request->getHeaders();\n foreach($headers as $k => $v ){\n $curl->addHeader($k, $v[0]);\n }\n\n $arrayBody = [\n 'checkout_session_id' => $body->getId()\n ];\n $body->getExternalId() ? $arrayBody['external_id'] = $body->getExternalId():'';\n if ($body->getCustomer()) {\n if ($body->getCustomer()->getEmail()) {\n $body->getCustomer()->getPhone() ? $arrayBody['customer']['phone'] = $body->getCustomer()->getPhone():'';\n $body->getCustomer()->getEmail() ? $arrayBody['customer']['email'] = $body->getCustomer()->getEmail():'';\n $body->getCustomer()->getNationalIdentificationNumber() ? $arrayBody['customer']['national_identification_number'] = $body->getCustomer()->getNationalIdentificationNumber():'';\n if ($address = $body->getCustomer()->getAddress()) {\n //address v2\n $address->getName() ? $arrayBody['customer'][\"name\"] = $address->getName():'';\n $address->getCareOf() ? $arrayBody['customer'][\"care_of\"] = $address->getCareOf():'';\n $address->getAttn() ? $arrayBody['customer'][\"attn\"] = $address->getAttn():'';\n $address->getAddressLines() ? $arrayBody['customer'][\"address_lines\"] = $address->getAddressLines():'';\n $address->getCity() ? $arrayBody['customer'][\"city\"] = $address->getCity():'';\n $address->getRegion() ? $arrayBody['customer'][\"region\"] = $address->getRegion():'';\n $address->getPostalCode() ? $arrayBody['customer'][\"postal_code\"] = $address->getPostalCode():'';\n $address->getCountry() ? $arrayBody['customer'][\"country\"] = $address->getCountry():'';\n $address->getCoordinates() ? $arrayBody['customer'][\"coordinates\"] = $address->getCoordinates():'';\n $address->getDoorCode() ? $arrayBody['customer'][\"door_code\"] = $address->getDoorCode():'';\n };\n }\n };\n $jsonBody = $this->json->serialize($arrayBody);\n $uri = $request->getUri();\n $url = $uri->getScheme().\"://\".$uri->getHost().\"\".$uri->getPath();\n $curl->post($url, $jsonBody);\n $response = $curl;\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatus();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n\n if (gettype($responseBody) === \"string\") {\n $content = $responseBody;\n $content = json_decode($content);\n $returnType = \"Ingrid\\Checkout\\Api\\Siw\\Model\\CompleteSessionResponse\";\n\n } else {\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string', 'integer', 'bool'])) {\n $content = json_decode($content);\n }\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatus(),\n $response->getHeaders(),\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ingrid\\Checkout\\Api\\Siw\\Model\\CompleteSessionResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "a48caa893505da59a17cc49f41e738ec", "score": "0.48427948", "text": "public static function delete($name)\n {\n unset($_SESSION[$name]);\n }", "title": "" }, { "docid": "c2386009b007c97523b7129037d09c8a", "score": "0.48426655", "text": "public static function delete($name)\n {\n if (self::exists($name)) {\n unset($_SESSION[$name]);\n }\n }", "title": "" }, { "docid": "26b8196d23745085b9b39d229ccdcb8a", "score": "0.4830419", "text": "public static function destroySession()\n {\n if (session_status() === PHP_SESSION_NONE){\n session_start();\n }\n unset($_SESSION[self::$SESSION_ORCID_ID]);\n unset($_SESSION[self::$SESSION_ACCESS_TOKEN]);\n unset($_SESSION[self::$SESSION_REFRESH_TOKEN]);\n }", "title": "" }, { "docid": "9568786957886aaa5975a3f1fa4b6c08", "score": "0.48278284", "text": "public function close() {\n $this->session->close();\n }", "title": "" }, { "docid": "4719d21c29368d5594b63586a07efd3e", "score": "0.4814597", "text": "public function destroy()\n {\n unset($_SESSION[$this->sess_namespace]);\n }", "title": "" }, { "docid": "e57274949ebf7f2645a0e2ed7697e3f7", "score": "0.48089942", "text": "public static function destroy() {\n @session_destroy();\n }", "title": "" }, { "docid": "cb520866379b097210ffc08a6d55cfca", "score": "0.48029098", "text": "function simpleSessionDestroy() {\n session_destroy ();\n}", "title": "" }, { "docid": "2e9c0607401d69b3b14e2a6d5e7071f3", "score": "0.47805583", "text": "public static function close()\n\t{\n\t\tglobal $debug;\n\t\t$debug > 1 and debug( 'session', \"close\" );\n\t\t//file_put_contents(\"/tmp/webtools-session.log\", \"[\".date('c').\"] [{$_SERVER['REQUEST_URI']}] close session \".session_id(). \"\\n\", FILE_APPEND);\n\t\tsession_write_close();\n\t}", "title": "" }, { "docid": "33740c4ea91b7025daad0c8ac5a59f4c", "score": "0.477684", "text": "public function delete($session_key){\n\t\t$sql = 'DELETE FROM django_session WHERE session_key = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->set($session_key);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "3173646d63a4913e21841156edbb9d6a", "score": "0.47386852", "text": "public function logout() {\r\n try {\r\n $query = \"DELETE FROM utentiloggatitodo WHERE sessionid = :sessionid\";\r\n $rq = $this->PDO->prepare($query);\r\n $session_id = session_id();\r\n $rq->bindParam(\":sessionid\", $session_id, PDO::PARAM_STR);\r\n $rq->execute();\r\n } catch(PDOException $e) {\r\n echo \"Errore di logout\" . $e->getMessage();\r\n }\r\n session_destroy();\r\n header('location: index.php');\r\n }", "title": "" }, { "docid": "e926d9eab2b19842f2977930665a61e8", "score": "0.4732283", "text": "public function destroy($id)\n\t{\n\t\t$sessionUser = Mysession::where('id',$id)->find($id);\n\t\t$sessionUser->delete();\n\t\treturn Response::json(array(\n\t\t\t'error' =>false,\n\t\t\t'message' => 'Sessioin Deleted successfully'),\n\t\t\t200\n\t\t);\t\t\t\n\t}", "title": "" }, { "docid": "0566c5a3eb990603aac04c9ace4cd5cb", "score": "0.4729118", "text": "public function sess_destroy()\n\t{\n\t\tsession_destroy();\n\t}", "title": "" }, { "docid": "f8cdb3a7447f9c13c70c67457aa53140", "score": "0.47272894", "text": "public function destroySession()\t{\r\n\t\t//Logout from cows\r\n\t\t$cookie = $this->getCookieFile();\r\n\t\t$handle = new CurlWrapper($cookie);\r\n\t\t$handle->cowsLogout($this->siteId);\r\n\t\tunset($handle);\r\n\t\t//Clear cookie from DB\r\n\t\t$query = $this->dbHandle->prepare(\"UPDATE \" . DB_TABLE . \r\n\t\t\t\t\" SET cookieFile = '' WHERE publicKey = :key\");\r\n\t\t$query->bindParam(\":key\", $this->publicKey);\r\n\t\t$this->execute($query);\r\n\t\t//Destroy Cookie file\r\n\t\tif (file_exists($cookie)) unlink($cookie);\r\n\t\t//Clean up\r\n\t\tunset($this->dbHandle);\r\n\t\tunset($this->sessionVar);\r\n\t}", "title": "" }, { "docid": "c4093820dac1a2e34e1066342a5430e9", "score": "0.4724338", "text": "public function closeSession()\n {\n return true;\n }", "title": "" }, { "docid": "9a48e7656fdd8fd99f807302547e684d", "score": "0.47228038", "text": "public final function session_destroy()\n {\n global $sessionUsernameParameter;\n global $sessionPasswordParameter;\n global $sessionIsLoginOkParameter;\n\n unset($_SESSION[$sessionUsernameParameter]);\n unset($_SESSION[$sessionPasswordParameter]);\n unset($_SESSION[$sessionIsLoginOkParameter]);\n session_destroy();\n }", "title": "" }, { "docid": "295d37d17faf28117bb8bed164981206", "score": "0.4720164", "text": "function del($name)\n {\n return $this->CakeSession->delSessionVar($name);\n }", "title": "" }, { "docid": "48d92c593c01951551b04e4b22dc9765", "score": "0.4719205", "text": "public static function destroy()\n {\n session_destroy();\n }", "title": "" }, { "docid": "345faa9d0773a2b327199d4b0b44b664", "score": "0.47181043", "text": "public function delete()\r\n {\r\n // $this->session->unset_userdata(\"MagicTab\");\r\n $_SESSION = array();\r\n //on détruit la session\r\n $this->session->sess_destroy();\r\n }", "title": "" }, { "docid": "bf45b9a3212c7fb2260610fb6f44b81f", "score": "0.47081664", "text": "public static function destroy()\n {\n session_unset();\n }", "title": "" }, { "docid": "80f21b60841cdbbcca2328770945991c", "score": "0.47075257", "text": "public function delete(int $idSession){\n $sql = \"DELETE FROM `session` WHERE id_session = $idSession\";\n $exec = (Dao::getConnexion())->prepare($sql);\n try{\n $exec->execute();\n } \n catch (PDOException $e) {\n throw new LisaeException(\"Erreur\",1);\n }\n }", "title": "" }, { "docid": "ac9173bca162a9c5eefe67b4943a5469", "score": "0.4705046", "text": "function _SessionUtil__Destroy($sessid)\n{\n if (isset($GLOBALS['_ZSession'])) {\n unset($GLOBALS['_ZSession']);\n }\n\n // expire the cookie\n setcookie(session_name(), '', 0, ini_get('session.cookie_path'));\n\n // ensure we delete the stored session (not a regenerated one)\n if (isset($GLOBALS['_ZSession']['regenerated']) && $GLOBALS['_ZSession']['regenerated'] == true) {\n $sessid = $GLOBALS['_ZSession']['sessid_old'];\n } else {\n $sessid = session_id();\n }\n\n if (System::getVar('sessionstoretofile')) {\n $path = DataUtil::formatForOS(session_save_path(), true);\n return unlink(\"$path/$sessid\");\n } else {\n $res = DBUtil::deleteObjectByID('session_info', $sessid, 'sessid');\n return (bool)$res;\n }\n}", "title": "" }, { "docid": "de14f38d56b296a9440356bafb3c914a", "score": "0.47048387", "text": "public function destroy($session_id)\n {\n }", "title": "" }, { "docid": "c8e3a2ca8ed0fe3aeef530075c087e66", "score": "0.47026607", "text": "public function request_delete($id){\r\n $link = \"http://\" . $_SERVER['HTTP_HOST'] . $this->webroot.'rest_users/'.$id.'.json';\r\n \r\n $data = null;\r\n $httpSocket = new HttpSocket();\r\n $response = $httpSocket->delete($link, $data );\r\n $this->set('response_code', $response->code);\r\n $this->set('response_body', $response->body);\r\n \r\n $this -> render('/Client/request_response');\r\n }", "title": "" }, { "docid": "4371a6e7431fa1b11639c5e8751ba2c3", "score": "0.4697826", "text": "public function close()\n {\n if ($this->getIsActive()) {\n $this->_sessionStatus = PHP_SESSION_DISABLED;\n }\n $this->closeSession();\n $this->sessionData = [];\n $this->setId(null);\n }", "title": "" }, { "docid": "87e33a7bc72abc855b54c8bf5b8ad079", "score": "0.46968478", "text": "public function updateSessionWithHttpInfo($body) {\n $returnType = '\\Ingrid\\Checkout\\Api\\Siw\\Model\\UpdateSessionResponse';\n $request = $this->updateSessionRequest($body);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n //$response = $this->client->send($request, $options);\n $curl = $this->curlFactory->create();\n $headers = $request->getHeaders();\n foreach($headers as $k => $v ){\n $curl->addHeader($k, $v[0]);\n };\n $arrayBody = [\n 'checkout_session_id' => $body->getId()\n ];\n $body->getExternalId() ? $arrayBody['external_id'] = $body->getExternalId():'';\n if ($body->getSearchAddress()) {\n if ($body->getSearchAddress()->getPostalCode()) {\n $arrayBody['search_sddress'] = [\n $this->mapAddress($body->getSearchAddress())\n ];\n }\n }\n $body->getPurchaseCountry() ? $arrayBody['purchase_country'] = $body->getPurchaseCountry():'';\n $body->getPurchaseCurrency() ? $arrayBody[\"purchase_currency\"] = $body->getPurchaseCurrency():'';\n $body->getLocales() ? $arrayBody[\"locales\"] = $body->getLocales():'';\n if ($body->getCart()) {\n $body->getCart()->getTotalValue() ? $arrayBody[\"cart\"][\"total_value\"] = $body->getCart()->getTotalValue():'';\n $body->getCart()->getTotalDiscount() ? $arrayBody[\"cart\"][\"total_discount\"] = $body->getCart()->getTotalDiscount():'';\n $body->getCart()->getCurrency() ? $arrayBody[\"cart\"][\"currency\"] = $body->getCart()->getCurrency():'';\n $body->getCart()->getPreOrder() ? $arrayBody[\"cart\"][\"pre_order\"] = $body->getCart()->getPreOrder():'';\n $body->getCart()->getVoucher() ? $arrayBody[\"cart\"][\"voucher\"] = $body->getCart()->getVoucher():'';\n $body->getCart()->getShippingDate() ? $arrayBody[\"cart\"][\"shipping_date\"] = $body->getCart()->getShippingDate():'';\n $body->getCart()->getItems() ? $arrayBody[\"cart\"][\"items\"] = $this->mapItems($body->getCart()->getItems()):'';\n $body->getCart()->getCartId() ? $arrayBody[\"cart\"][\"cart_id\"] = $body->getCart()->getCartId():'';\n $body->getCart()->getVouchers() ? $arrayBody[\"cart\"][\"vouchers\"] = $body->getCart()->getVouchers():'';\n }\n if ($body->getCustomer()) {\n if ($body->getCustomer()->getEmail()) {\n $body->getCustomer()->getPhone() ? $arrayBody['customer']['phone'] = $body->getCustomer()->getPhone():'';\n $body->getCustomer()->getEmail() ? $arrayBody['customer']['email'] = $body->getCustomer()->getEmail():'';\n $body->getCustomer()->getNationalIdentificationNumber() ? $arrayBody['customer']['national_identification_number'] = $body->getCustomer()->getNationalIdentificationNumber():'';\n if ($body->getCustomer()->getAddress()) {\n $arrayBody['customer']['address'] = $this->mapAddress($body->getCustomer()->getAddress());\n };\n }\n };\n \n \n $jsonBody = $this->json->serialize($arrayBody);\n $uri = $request->getUri();\n $url = $uri->getScheme().\"://\".$uri->getHost().\"\".$uri->getPath();\n $curl->post($url, $jsonBody);\n $response = $curl;\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatus();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n $responseBody = $response->getBody();\n if (gettype($responseBody) === \"string\") {\n $content = $responseBody;\n $content = json_decode($content);\n $returnType = \"Ingrid\\Checkout\\Api\\Siw\\Model\\UpdateSessionResponse\";\n\n } else {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string', 'integer', 'bool'])) {\n $content = json_decode($content);\n }\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatus(),\n $response->getHeaders(),\n ];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Ingrid\\Checkout\\Api\\Siw\\Model\\UpdateSessionResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "2db419d039dbdb2d174fa5e39319c60e", "score": "0.46945754", "text": "public function delete() {\n $this->env->auth->user = null;\n unset($this->env->request->session['user_id']);\n return Net_HTTP::redirect_to(Core::if_not_set($this->env->request, 'url', '/'));\n }", "title": "" }, { "docid": "de6afa53de91365718f42e43b8e6632b", "score": "0.46801034", "text": "static function closeSession() {\n\t\tif(isset($_SESSION)) {\n\t\t\t$sess = LibTools::getSession();\n\t\t\t$sess->user->right = '';\n\t\t\t// session_destroy();\n\t\t}\n\t}", "title": "" }, { "docid": "c0e5abe1879178a75182f03c9e323a37", "score": "0.4676111", "text": "public static function logout() {\n\n $session_id = $GLOBALS->_USER['session_id'];\n Movabls_Session::delete_session($session_id);\n\n }", "title": "" }, { "docid": "48812af10a2cffd713dee858b581a115", "score": "0.46740952", "text": "protected function delete()\n\t{\n\t\t$this->memcached->forget($this->session['id']);\n\t}", "title": "" }, { "docid": "afe9116e560f55cfe339fcdff5d3e05f", "score": "0.46703973", "text": "public function testDelete()\n {\n $size = 999;\n $mimeType = 'application/json';\n\n /**\n * setup\n */\n list($fileContent, $fileName) = $this->generateTestFile(200);\n $fileHash = $this->getFactory()->createFileHash($fileName);\n\n $this->session->init();\n $chunkFile = $this->session->upload($fileName, $mimeType, $size);\n $this->session->createOrUpdateFile('/test.txt', $chunkFile);\n $commit1 = $this->session->commit('added test.txt');\n\n /**\n * do it\n */\n $this->session->deleteFile('/test.txt');\n $this->session->commit('removed test.txt');\n $result = $this->session->download('/test.txt', $commit1);\n $this->assertEquals($fileHash, $result->getFileHash());\n $this->session->download('/test.txt');\n }", "title": "" }, { "docid": "c0202486a23a45bd680203e720da4022", "score": "0.46641782", "text": "public function _destroy($id)\n {\n /* create a query to delete a session */\n $delete = \"DELETE FROM\n `sessions`\n WHERE `id` = '\" . $id . \"';\";\n\n /* send delete statement */\n $result = $this->db->query($delete);\n\n return $result;\n }", "title": "" }, { "docid": "37c377209653c25c6915f8ccd1899506", "score": "0.4656623", "text": "public function DeleteSession($id){\n\n FollowupSessions::destroy($id);\n return back();\n }", "title": "" }, { "docid": "8414981a5f93eac6462fb784123d6290", "score": "0.46523732", "text": "public function removeSession()\n\t{\n\t\t$objSession = \\Session::getInstance();\n\t\t$objSession->remove($this->strSessionName);\n\t}", "title": "" }, { "docid": "8ac2b84716eca4d6ce8dc35ec49c7aec", "score": "0.46480918", "text": "public function sess_destroy()\n\t{\n\t\t# Cargar el modelo de datos de AuthUser | Libreria Manager Auth | User Agent\n\t\t$this->load->model('AuthUserModel', 'auth', TRUE);\n\t\t$this->load->library('session');\n\t\t# Cambiar el estutus del usuario\n\t\t$this->auth->change_status_session_user($this->session->userdata['user']['id_client'], NULL, FALSE);\n\t\t# Cerrar el seguimiento del usuario\n\t\t$this->auth->log_exit($this->session->userdata['user']['log']);\n\t\t# Eliminar sesion\n\t\t$this->session->sess_destroy();\n\t\t# Redireccionar al login\n\t\tredirect();\n\t}", "title": "" }, { "docid": "2d11719074b7065435b65f0aa4e38b36", "score": "0.46472007", "text": "public function unsetSession();", "title": "" }, { "docid": "370a4269bf128b13029eebfd43e112dc", "score": "0.46420202", "text": "public function delete()\n\t{\n\t\tif ($this->config->loginAttemptCookie)\n\t\t{\n\t\t\thelper('cookie');\n\t\t\t$cookieName = $this->config->loginAttemptCookie === true ? 'logins' : $this->config->loginAttemptCookie;\n\t\t\t$this->response->deleteCookie($cookieName);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$agent = $this->request->getUserAgent();\n\t\t\t$builder = $this->builder();\n\t\t\t$builder->where('user_agent', md5($agent->getBrowser() . ' - ' . $agent->getVersion() . ' - ' . $agent->getPlatform()));\n\t\t\t$builder->where('ip_address', $this->request->getIPAddress());\n\t\t\t$builder->where('updated_at >=', date('Y-m-d H:i:s', strtotime('-' . $this->config->loginAttemptLimitTimePeriod)));\n\t\t\t$builder->delete();\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e7cbe8936613a39e5e7ed61178f6d690", "score": "0.4638213", "text": "public function actionEliminarSession()\r\n\t\t{\r\n\t\t\t//unset(Yii::app()->session['var']);\r\n\t\t\tsession_unset();\r\n\t\t\treturn $this->render('/buscar-general/view-ok',['mostrarMenuPrincipal' => 0]);\r\n\t\t}", "title": "" }, { "docid": "9c2458c5f4078a1206c92d7f1bcc382b", "score": "0.462388", "text": "public function destroy_session($params){\n unset($_SESSION['username']);\n unset($_SESSION['user_id']);\n\n header('Location: /sign_in');\n }", "title": "" }, { "docid": "da8cb4862177c22451cb0ad704d99dd8", "score": "0.46205232", "text": "public static function destroy()\n\t{\n\t\tif ( '' !== session_id() ) {\n\t\t\t$_SESSION = [];\n\n\t\t\t// If it's desired to kill the session, also delete the session cookie.\n\t\t\t// Note: This will destroy the session, and not just the session data!\n\t\t\tif ( ini_get( \"session.use_cookies\" ) ) {\n\t\t\t\t$params = session_get_cookie_params();\n\t\t\t\tsetcookie( session_name(), '', time() - 42000,\n\t\t\t\t\t$params[ \"path\" ], $params[ \"domain\" ],\n\t\t\t\t\t$params[ \"secure\" ], $params[ \"httponly\" ]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tsession_destroy();\n\t\t}\n\t}", "title": "" }, { "docid": "be19695ef3ab1348dd254902762d4264", "score": "0.46204397", "text": "public function actionLogout()\n {\n \t$session=new CHttpSession;\n \t\t$session->open();\n \t\t$session->destroy();\n Yii::app()->user->logout();\n $this->redirect(Yii::app()->homeUrl);\n }", "title": "" }, { "docid": "5ca24fd9228ef0ffd4b7012770b4a919", "score": "0.4615993", "text": "public function destroy()\n {\n $id = Input::get('id', FALSE);\n\n return Evercisesession::deleteById($id);\n }", "title": "" }, { "docid": "89a85bdb5d5921098f2cd6768112c9f8", "score": "0.46158051", "text": "public function sessionDestroy($id) {\n memcache_delete($this->memcache,$this->prefix.$this->getParameter('session_name').\":\".$id);\n return true;\n }", "title": "" }, { "docid": "3cfd2c5fdb0e938ae4c0edb17117666e", "score": "0.46011364", "text": "function sess_destroy(){\n\t\t// Kill the session DB row\n\t\tif ($this->savepath == 'db' AND isset($this->userdata['session_id'])){\n\t\t\tDb::getInstance()->delete($this->dbtable,array('session_id'=>$this->userdata['session_id']));\n\t\t}\n\t\t// Kill the cookie\n cookie::del($this->sess_cookie_name);\n\t}", "title": "" }, { "docid": "c5fc4e302e712656ec0f4e727853ca5a", "score": "0.45999855", "text": "public function testDestroy() {\n $session = $this->createSession();\n\n $session->start();\n $session->write('hello', 'world');\n $this->assertEquals('world', $session->read('hello'));\n\n $session->destroy();\n\n $this->assertEquals('', $session->getId());\n $this->assertNull($session->read('hello'));\n $this->assertSame(array(), $session->read());\n }", "title": "" }, { "docid": "5dc10bab5cdd71a2b8766cd159c56823", "score": "0.45978355", "text": "public function delete($optParams = array()) {\n $params = array();\n $params = array_merge($params, $optParams);\n $data = $this->__call('delete', array($params));\n return $data;\n }", "title": "" }, { "docid": "afdbcaad2576cc998fa037d1c4f5a07b", "score": "0.45945388", "text": "public static function destroy(){\n session_destroy();\n header(\"Location:../index.php\");\n }", "title": "" }, { "docid": "33c78b814ec97d9f89366af94d73baf0", "score": "0.4587735", "text": "private function endSession()\n\t{\n\t\t$this->api_obj->Session_End($this->session_id);\n\t}", "title": "" }, { "docid": "db2df938a873d94e5bdfd017dd4ae1b4", "score": "0.45865592", "text": "public function destroy()\r\n {\r\n session_destroy();\r\n }", "title": "" }, { "docid": "61f484744bf9a98573e296ec106c91d5", "score": "0.45865536", "text": "public static function destroy() {\n if ('' !== session_id()) {\n $_SESSION = array();\n\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000, $params[\"path\"], $params[\"domain\"], $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\n session_destroy();\n }\n }", "title": "" }, { "docid": "a43c4cbd2943da6df4a046961d349644", "score": "0.458648", "text": "public function removeSessionData(): void;", "title": "" }, { "docid": "453979ac394e22454e7d55e8cee7d92a", "score": "0.4582946", "text": "function logout() {\n\n /* Do not allow logout call when not logged in */\n if (session_status() != PHP_SESSION_ACTIVE) {\n return api_response(400, 'Cant log out, no active session: ' . session_status());\n }\n\n session_unset();\n session_destroy();\n return api_response(200, 'Successfully logged out');\n}", "title": "" }, { "docid": "d3ad42895a9f31931a8312f33d88e406", "score": "0.45805967", "text": "public function __destruct()\n {\n if ($this->autoCloseSession && $this->client) {\n $this->client->call('endSession', array($this->getConfig('session')));\n }\n }", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.45669886", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "a942c8df714fd5ec079486d149f7d90d", "score": "0.45665503", "text": "public function close()\n {\n session_write_close();\n }", "title": "" } ]
0a31cefb705aca856817f29c516011cf
Recursively get matching files.
[ { "docid": "c8eb63cb1edae078f00d58ea2e4183b5", "score": "0.7087569", "text": "function getMatchingFilesRecursive($src, $dir = '')\n{\n $files = array();\n if (!file_exists($src)) {\n echo 'ERROR: '.$src.' does not exist';\n exit;\n }\n if (!is_dir($src)) {\n $files[] = $src;\n } else {\n $root = opendir($src);\n if ($root) {\n while ($file = readdir($root)) {\n // We ignore the current and parent directory links\n if ($file == '.' || $file == '..') {\n continue;\n }\n if (is_dir($src.'/'.$file)) {\n $files = array_merge($files, getMatchingFilesRecursive($src.'/'.$file, $dir.'/'.$file));\n } else {\n $pathParts = pathinfo($file);\n if (array_key_exists('extension', $pathParts)) {\n if ($pathParts['extension'] == 'php') {\n $files[] = $src.'/'.$file;\n }\n }\n }\n }\n }\n }\n\n return $files;\n}", "title": "" } ]
[ { "docid": "be4e7f88b3a2146ecd8d11b0c81a20c7", "score": "0.7187862", "text": "protected function findFiles() {\n $file_list = [];\n foreach ($this->directories as $provider => $directories) {\n $directories = (array) $directories;\n foreach ($directories as $directory) {\n // Check if there is a subdirectory with the specified name.\n if (is_dir($directory) && is_dir($directory . '/' . $this->subdirectory)) {\n // Now iterate over all subdirectories below the specifically named\n // subdirectory, and check if a .yml file exists with the same name.\n // For example:\n // - Assuming $this->subdirectory === 'fancy'\n // - Then this checks for 'fancy/foo/foo.yml', 'fancy/bar/bar.yml'.\n $iterator = new \\FilesystemIterator($directory . '/' . $this->subdirectory);\n /** @var \\SplFileInfo $file_info */\n foreach ($iterator as $file_info) {\n if ($file_info->isDir()) {\n $yml_file_in_directory = $file_info->getPath() . '/' . $file_info->getBasename() . '/' . $file_info->getBasename() . '.yml';\n if (is_file($yml_file_in_directory)) {\n $file_list[$yml_file_in_directory] = $provider;\n }\n }\n }\n }\n }\n }\n return $file_list;\n }", "title": "" }, { "docid": "b061bf97274b1beca02e51001178b01b", "score": "0.69345975", "text": "function find_files(&$matches, $directory=APP_ROOT, $filename=null, $extension=null, $limit=null,\r\n\t\t$case_sensitive=true, $subdirs=true) {\r\n\t// File system objects\r\n\t$fsos = scandir($directory);\r\n\tforeach ($fsos as $fso) {\r\n\t\t$fso_full = $directory . DS . $fso; \r\n\t\t$parts = pathinfo($fso_full); \r\n\t\tif (is_file($fso_full)\r\n\t\t\t\t&& (empty($filename)\r\n\t\t\t\t\t|| ($case_sensitive && $filename == $parts['filename'])\r\n\t\t\t\t\t|| (!$case_sensitive && strcasecmp($filename, $parts['filename'])))\r\n\t\t\t\t&& (empty($extension)\r\n\t\t\t\t\t|| ($case_sensitive && $extension == $parts['extension'])\r\n\t\t\t\t\t|| (!$case_sensitive && strcasecmp($extension, $parts['extension'])))) { \r\n\t\t\t$matches[] = $fso_full;\r\n\t\t\tif ($limit > 0 && count($matches) >= $limit) return;\r\n\t\t} \r\n\t\telse if (is_dir($fso_full) && $subdirs && $fso != '.' && $fso != '..') {\r\n\t\t\tfind_files($matches, $fso_full, $filename, $extension, $limit, $case_sensitive, $subdirs);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "05fe02703e473bc4c334d8ce03bda155", "score": "0.66187114", "text": "function find_files( $folder, $args = array() ) {\n\t\n\t\t$folder = untrailingslashit($folder);\n\t\n\t\t$defaults = array( 'pattern' => '', 'levels' => 100, 'relative' => false );\n\t\t$r = wp_parse_args($args, $defaults);\n\n\t\textract($r, EXTR_SKIP);\n\t\t\n\t\t//Now for recursive calls, clear relative, we'll handle it, and decrease the levels.\n\t\tunset($r['relative']);\n\t\t--$r['levels'];\n\t\n\t\tif ( ! $levels )\n\t\t\treturn array();\n\t\t\n\t\tif ( ! is_readable($folder) )\n\t\t\treturn false;\n\n\t\tif ( true === $relative )\n\t\t\t$relative = $folder;\n\t\n\t\t$files = array();\n\t\tif ( $dir = @opendir( $folder ) ) {\n\t\t\twhile ( ( $file = readdir($dir) ) !== false ) {\n\t\t\t\tif ( in_array($file, array('.', '..') ) )\n\t\t\t\t\tcontinue;\n\t\t\t\tif ( is_dir( $folder . '/' . $file ) ) {\n\t\t\t\t\t$files2 = DD32::find_files( $folder . '/' . $file, $r );\n\t\t\t\t\tif( $files2 )\n\t\t\t\t\t\t$files = array_merge($files, $files2 );\n\t\t\t\t\telse if ( empty($pattern) || preg_match('|^' . str_replace('\\*', '\\w+', preg_quote($pattern)) . '$|i', $file) )\n\t\t\t\t\t\t$files[] = $folder . '/' . $file . '/';\n\t\t\t\t} else {\n\t\t\t\t\tif ( empty($pattern) || preg_match('|^' . str_replace('\\*', '\\w+', preg_quote($pattern)) . '$|i', $file) )\n\t\t\t\t\t\t$files[] = $folder . '/' . $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@closedir( $dir );\n\t\n\t\tif ( ! empty($relative) ) {\n\t\t\t$relative = trailingslashit($relative);\n\t\t\tforeach ( $files as $key => $file )\n\t\t\t\t$files[$key] = preg_replace('!^' . preg_quote($relative) . '!', '', $file);\n\t\t}\n\t\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "4e69fa1acd983296b4489b6d1fe159cd", "score": "0.6610014", "text": "function rglob($pattern, $flags = 0, $traversePostOrder = false)\n {\n if (strpos($pattern, '/**/') === false) {\n return glob($pattern, $flags);\n }\n\n $patternParts = explode('/**/', $pattern);\n\n // Get sub dirs\n $dirs = glob(array_shift($patternParts) . '/*', GLOB_ONLYDIR | GLOB_NOSORT);\n\n\n // Get files for current dir\n $files = glob($pattern, $flags);\n\n foreach ($dirs as $dir) {\n $subDirContent = rglob($dir . '/**/' . implode('/**/', $patternParts), $flags, $traversePostOrder);\n\n if (!$traversePostOrder) {\n $files = array_merge($files, $subDirContent);\n } else {\n $files = array_merge($subDirContent, $files);\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "39b1ca809feabb8cfccd476877df7f1d", "score": "0.65948755", "text": "function getAllFiles() {\n $fileList = array();\n\n $dirQueue[0] = $this->root;\n $dirQueueCount = 1;\n\n while($dirQueueCount > 0) {\n $dir = $dirQueue[--$dirQueueCount];\n $handle = opendir($dir);\n\n while($file = readdir($handle)) {\n\t$fullPath = $dir.\"/\".$file;\n\n\t// skip all dot files\n\tif(substr($file, 0, 1) == \".\")\n\t continue;\n\n\t// do not follow symlinks\n\t// no looping can occur\n\tif(is_link($fullPath))\n\t continue;\n\n\t// traverse sub-directories recursively\n\tif(is_dir($fullPath)) {\n\t $dirQueue[$dirQueueCount++] = $fullPath;\n \t continue;\n\t}\n\n\t$fileList[] = $fullPath;\n }\n closedir($handle);\n }\n\n return $fileList;\n }", "title": "" }, { "docid": "957d164a8774bd936548870d3a19d112", "score": "0.6590097", "text": "public function getSearchFiles(){\n if (null==$this->finds){\n $this->generateFindCommands();\n }\n if (null==$this->files) {\n $this->populateFilesList();\n }\n return $this->files;\n }", "title": "" }, { "docid": "86cfae1df6a223b35c8bfb3f8065dede", "score": "0.6579631", "text": "function glob_recursive($pattern, $flags = 0) {\r\t\t$files = glob($pattern, $flags);\r\t\tforeach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {\r\t\t\t$files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\r\t\t}\r\t\treturn $files;\r\t}", "title": "" }, { "docid": "8f101451bfe3416911528417378f525e", "score": "0.65666115", "text": "function filesystem_rglob($pattern, $flags = 0)\n{\n $files = glob($pattern, $flags); \n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {\n $files = array_merge($files, filesystem_rglob($dir.'/'.basename($pattern), $flags));\n }\n return $files;\n}", "title": "" }, { "docid": "690c7016cc21d2781439fb9157adf339", "score": "0.6550977", "text": "static private function find_contents($dir){\n $result = array();\n $root = scandir($dir);\n foreach($root as $value){\n if($value === '.' || $value === '..') {continue;}\n if(is_file($dir.DIRECTORY_SEPARATOR.$value)){\n if(!self::$ext_filter || in_array(strtolower(pathinfo($dir.DIRECTORY_SEPARATOR.$value, PATHINFO_EXTENSION)), self::$ext_filter)){\n self::$files[] = $result[] = $dir.DIRECTORY_SEPARATOR.$value;\n }\n continue;\n }\n if(self::$recursive){\n foreach(self::find_contents($dir.DIRECTORY_SEPARATOR.$value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "title": "" }, { "docid": "61d067f7da4b93e866952a822d51ad97", "score": "0.6514414", "text": "abstract public function getFiles();", "title": "" }, { "docid": "b08fe2f4cdd06bf337bae665c3af2072", "score": "0.6505858", "text": "function files_scan($path, $ext = false, $depth = 1, $relative = true) {\n $files = array();\n\n // Scan for all matching files\n NAVT::_files_scan($path, '', $ext, $depth, $relative, $files);\n return $files;\n }", "title": "" }, { "docid": "10f80967e9e8c4ae31b36ac0c959fab5", "score": "0.6504865", "text": "function find_all_files($dir)\n\t\t\t{\n\t\t\t\t$root = scandir($dir);\n\t\t\t\tforeach($root as $value)\n\t\t\t\t{\n\t\t\t\t\tif($value === '.' || $value === '..') {continue;}\n\t\t\t\t\tif(is_file(\"$dir/$value\")) {$result[]=\"$dir/$value\";continue;}\n\t\t\t\t\t\tforeach(find_all_files(\"$dir/$value\") as $value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result[]=$value;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn $result;\n\t\t\t}", "title": "" }, { "docid": "66dfec1bb9fe6b570f2ee2abe7eb6720", "score": "0.6493983", "text": "function glob_recursive($pattern, $flags = 0)\n {\n $files = glob($pattern, $flags);\n\n foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {\n $files = array_merge($files, glob_recursive($dir . '/' . basename($pattern), $flags));\n }\n\n return $files;\n }", "title": "" }, { "docid": "ed87e1358c893262e60f7fae68d81920", "score": "0.649287", "text": "function glob_recursive($pattern, $flags = 0)\n {\n $files = glob($pattern, $flags);\n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)\n {\n $files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\n }\n return $files;\n }", "title": "" }, { "docid": "6686d1a01bf45d5dfa38d0c3870a9823", "score": "0.64797825", "text": "function glob_recursive($pattern, $flags = 0) {\n $files = glob($pattern, $flags);\n if (is_array($files)) {\n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {\n $files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));\n }\n }\n return $files;\n }", "title": "" }, { "docid": "c272d122ceed695642fc0f0c1c0ec2e3", "score": "0.647585", "text": "public function getFiles()\n {\n $ignorefiles = $this->getGitIgnoreFiles();\n $all = array();\n $dir = $this->path;\n while ($dirs = glob($dir . '*')) {\n $dir .= '/*';\n $files = array_diff($all, $ignorefiles);\n if (!$all) {\n $all = $dirs;\n } else {\n $all = array_merge($all, $dirs);\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "c0f7f996d883130df246e079bcb11e5a", "score": "0.64743084", "text": "function get_files() {\n return explore_dir(xContext::$basepath, 'in');\n}", "title": "" }, { "docid": "b57c7a118ee9b48e1bbf90a6c462484c", "score": "0.64400893", "text": "private function rglob ($pattern, $flags = 0, $traversePostOrder = false) {\n // Keep away the hassles of the rest if we don't use the wildcard anyway\n if (strpos($pattern, '/**/') === false) {\n return glob($pattern, $flags);\n }\n\n $patternParts = explode('/**/', $pattern);\n\n // Get sub dirs\n $dirs = glob(array_shift($patternParts) . '/*', GLOB_ONLYDIR | GLOB_NOSORT);\n\n // Get files for current dir\n $files = glob($pattern, $flags);\n\n foreach ($dirs as $dir) {\n $subDirContent = $this->rglob($dir . '/**/' . implode('/**/', $patternParts), $flags, $traversePostOrder);\n\n if (!$traversePostOrder) {\n $files = array_merge($files, $subDirContent);\n } else {\n $files = array_merge($subDirContent, $files);\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "697ed68673d4507ebe0ef1e0ee15f85a", "score": "0.64207023", "text": "function getFiles(&$arr, $dir, $pattern = null) {\n\tif(!is_dir($dir))return;\n \t$d = dir($dir);\n \twhile($e =$d->read()){\n \t\tif(substr($e, 0, 1) == '.')continue;\n \t\t$file = $dir . '/' . $e;\n \t\tif(is_dir($file)){\n \t\t\tgetFiles($arr, $file, $pattern);\n \t\t}else{\n \t\t\tif(empty($pattern)) $arr[] = $file;\n else if(preg_match($pattern, $file))\n $arr[] = $file;\n \t\t}\n \t}\n}", "title": "" }, { "docid": "fead97650c5af9426e82b82500bf7405", "score": "0.6395312", "text": "function fsFind($in_from_path, $in_opt_mask=FALSE)\n{\n\t$result = array();\n\t$in_from_path = realpath($in_from_path);\n\t$root = scandir($in_from_path); \n\t\n foreach($root as $basename) \n { \n if ($basename === '.' || $basename === '..') { continue; }\n \t\t$path = $in_from_path . DIRECTORY_SEPARATOR . $basename;\n\t\t\n if (is_file($path))\n\t\t{\n\t\t\tif (FALSE !== $in_opt_mask)\n\t\t\t{ if (0 === preg_match($in_opt_mask, $basename)) { continue; } }\n\t\t\t$result[] = $path;\n\t\t\tcontinue;\n\t\t}\n\t\t\n foreach(fsFind($path, $in_opt_mask) as $basename) \n { $result[] = $basename; } \n } \n return $result;\n}", "title": "" }, { "docid": "87ca5f00db8e82af4bdba59d4f11cb40", "score": "0.63850474", "text": "function file_recurse(string $dirname, string $include_regex_filter = NULL, string $exclude_regex_filter = NULL, $max_files = 20000) : \\Generator {\n if (!is_dir($dirname)) { return; }\n\n if ($dh = \\opendir($dirname)) {\n while(($file = \\readdir($dh)) !== false && $max_files-- > 0) {\n if (!$file || $file === '.' || $file === '..') {\n continue;\n }\n $path = $dirname . '/' . $file;\n if (is_file($path)) {\n // check if the path matches the regex filter\n if (($include_regex_filter != NULL && preg_match($include_regex_filter, $path)) || $include_regex_filter == NULL) {\n // skip if it matches the exclude filter\n if ($exclude_regex_filter != NULL && preg_match($exclude_regex_filter, $path)) {\n continue;\n }\n yield $path;\n }\n }\n // recurse if it is a directory, don't follow symlinks ...\n if (is_dir($path) && !is_link($path)) {\n if (!preg_match(\"#\\/uploads\\/?$#\", $path)) {\n yield from file_recurse($path, $include_regex_filter, $exclude_regex_filter, $max_files);\n }\n\t\t\t}\n }\n \\closedir($dh);\n }\n}", "title": "" }, { "docid": "b0be8a737151d8ad9f16cf259c743dc3", "score": "0.6381471", "text": "function get_files($directory, $ext = '')\n{\n $array_items = array();\n if($handle = opendir($directory)){\n while(false !== ($file = readdir($handle))){\n if($file != \".\" && $file != \"..\"){\n if(is_dir($directory. \"/\" . $file)){\n $array_items = array_merge($array_items, $this->get_files($directory. \"/\" . $file, $ext));\n } else {\n $file = $directory . \"/\" . $file;\n if(!$ext || strstr($file, $ext)) $array_items[] = preg_replace(\"/\\/\\//si\", \"/\", $file);\n }\n }\n }\n closedir($handle);\n }\n return $array_items;\n}", "title": "" }, { "docid": "6578abe0d2b2862461275e9abe72b8ed", "score": "0.6369549", "text": "function globr($sDir, $sPattern, $nFlags = NULL)\n {\n $sp = DIRECTORY_SEPARATOR; \n if((strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')) \n {\n $sDir = escapeshellcmd($sDir); \n }\n \n // Get the list of all matching files currently in the\n // directory.\n $tmp = trim(`dir /A/b {$sDir}{$sp}{$sPattern}`); \n $aFiles = ARRAY();\n foreach(explode(\"\\n\",$tmp) as $v)\n {\n //echo \"\\n\\n\\n{$v}\\n\\n\\n\";\n //exit();\n if(is_dir(\"{$sDir}{$sp}{$v}\"))\n {\n $aSubFiles = globr(\"{$sDir}{$sp}{$v}\", $sPattern, $nFlags);\n $aFiles = array_merge($aFiles, $aSubFiles);\n }\n else\n {\n array_push($aFiles , \"{$sDir}{$sp}{$v}\");\n }\n }\n //$aFiles = glob(\"{$sDir}{$sp}{$sPattern}\", $nFlags);\n print_r($aFiles);\n // Then get a list of all directories in this directory, and\n // run ourselves on the resulting array. This is the\n // recursion step, which will not execute if there are no\n // directories.\n// echo \"\\n1:GGGG\\n{$sDir}\\n\";\n// foreach (glob(\"{$sDir}{$sp}*\", GLOB_ONLYDIR) as $sSubDir)\n// {\n// echo \"\\n1:GGGG\\n\";\n// print_r($sSubDir);\n// echo \"\\n2:GGGGG\\n\";\n// $aSubFiles = globr($sSubDir, $sPattern, $nFlags);\n// $aFiles = array_merge($aFiles, $aSubFiles);\n// }\n // The array we return contains the files we found, and the\n // files all of our children found.\n return $aFiles;\n }", "title": "" }, { "docid": "393a146aa4b7d63c01b41ee2ac767fe6", "score": "0.63306195", "text": "function _files_scan($base_path, $path, $ext, $depth, $relative, &$files) {\n if (!empty($ext)) {\n if (!is_array($ext)) {\n $ext = array($ext);\n }\n $ext_match = implode('|', $ext);\n }\n\n // Open the directory\n if(($dir = @dir($base_path . $path)) !== false) {\n // Get all the files\n while(($file = $dir->read()) !== false) {\n // Construct an absolute & relative file path\n $file_path = $path . $file;\n $file_full_path = $base_path . $file_path;\n\n // If this is a directory, and the depth of scan is greater than 1 then scan it\n if(is_dir($file_full_path) && $depth > 1 && !($file == '.' || $file == '..')) {\n NAVT::_files_scan($base_path, $file_path . '/', $ext, $depth - 1, $relative, $files);\n\n // If this is a matching file then add it to the list\n } elseif(is_file($file_full_path) && (empty($ext) || preg_match('/\\.(' . $ext_match . ')$/i', $file))) {\n $files[] = $relative ? $file_path : $file_full_path;\n }\n }\n\n // Close the directory\n $dir->close();\n }\n }", "title": "" }, { "docid": "7cd03c7e3bad2a26e7a878051623d998", "score": "0.6310769", "text": "protected function traverseRecursively()\n {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->path), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $fileInfo) {\n if (($fileInfo->getFilename() != '.') && ($fileInfo->getFilename() != '..')) {\n // If absolute path flag was passed, store the absolute path.\n if ($this->absolute) {\n $f = null;\n if (!$this->filesOnly) {\n $f = ($fileInfo->isDir()) ?\n (realpath($fileInfo->getPathname())) : realpath($fileInfo->getPathname());\n } else if (!$fileInfo->isDir()) {\n $f = realpath($fileInfo->getPathname());\n }\n if (($f !== false) && (null !== $f)) {\n $this->files[] = $f;\n }\n // If relative path flag was passed, store the relative path.\n } else if ($this->relative) {\n $f = null;\n if (!$this->filesOnly) {\n $f = ($fileInfo->isDir()) ?\n (realpath($fileInfo->getPathname())) : realpath($fileInfo->getPathname());\n } else if (!$fileInfo->isDir()) {\n $f = realpath($fileInfo->getPathname());\n }\n if (($f !== false) && (null !== $f)) {\n $this->files[] = substr($f, (strlen(realpath($this->path)) + 1));\n }\n // Else, store only the directory or file name.\n } else {\n if (!$this->filesOnly) {\n $this->files[] = ($fileInfo->isDir()) ? ($fileInfo->getFilename()) : $fileInfo->getFilename();\n } else if (!$fileInfo->isDir()) {\n $this->files[] = $fileInfo->getFilename();\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.6274416", "text": "public function getFiles();", "title": "" }, { "docid": "9780bc9fa86312763e0ea4703f796975", "score": "0.6274416", "text": "public function getFiles();", "title": "" }, { "docid": "ac77963e00cd965b1dc58173e4a6e2cf", "score": "0.6273744", "text": "function core_io_FileSearch($filename, $location, $debugmode=FALSE, &$matches=NULL)\n{\n $result = $matches!==NULL ? $matches : array();\n $path = core_io_ParsePath($location);\n if ( $path===FALSE ) {\n RETURN FALSE;\n }\n\n $files = glob($path.'*');\n\n if ( $debugmode ) echo '-- Searching at '.$path.'<br>';\n if ( $debugmode ) echo '<ul style=\"list-style:none;\">';\n foreach ( $files as $file )\n {\n if ( realpath($path)==realpath($file) ) {\n // prevent infinite recursions\n continue;\n }\n\n if ( is_dir($file) ) {\n core_io_FileSearch($filename, $file, $debugmode, $result);\n }\n else {\n $baseFilename = pathinfo(realpath($file), PATHINFO_BASENAME);\n\n if ( $debugmode ) echo '<li><b>-- Comparing file '. $baseFilename .'</b></li>';\n\n if ( strpos(strtolower($file),strtolower($filename))!==FALSE ) {\n array_push($result, realpath($file));\n }\n }\n }\n if ( $debugmode ) echo '</ul>';\n\n if ( $matches===NULL ) {\n RETURN $result;\n }\n else {\n $matches = $result;\n }\n}", "title": "" }, { "docid": "19cf596e1abfae6dd29f846c883e7777", "score": "0.6251939", "text": "protected function discoverFiles()\n {\n foreach ($this->sources as $source) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($source), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $fileInfo) {\n if (($fileInfo->getFilename() != '.') && ($fileInfo->getFilename() != '..')) {\n $f = null;\n if (!$fileInfo->isDir()) {\n $f = realpath($fileInfo->getPathname());\n }\n if (($f !== false) && (null !== $f) && (substr(strtolower($f), -4) == '.php')) {\n $this->files[] = $f;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "d9251af20a639843b453f0ebbb60b394", "score": "0.6248369", "text": "public function getFilesInFolder($filePath);", "title": "" }, { "docid": "eec9fe02096db0a08e30734fb3a56c0f", "score": "0.62253785", "text": "private function glob_recursive($pattern, $flags = 0)\n {\n $files = glob($pattern, $flags);\n\n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)\n {\n $files = array_merge($files, $this->glob_recursive($dir.'/'.basename($pattern), $flags));\n }\n\n return $files;\n }", "title": "" }, { "docid": "84e68fdf6bb38acef1548d473fa4aafd", "score": "0.62082833", "text": "function scanForImages($directory)\n{\n $directoryIterator = new RecursiveDirectoryIterator($directory);\n $fileIterator = new RecursiveIteratorIterator($directoryIterator);\n $regexIterator = new RegexIterator($fileIterator, '/^.+\\.(png|jpe?g|gig)$/i', RecursiveRegexIterator::GET_MATCH);\n $files = array();\n foreach ($regexIterator as $image) {\n $files[] = $image[0];\n }\n return $files;\n}", "title": "" }, { "docid": "abfca27c8c022907969483da38d0227b", "score": "0.6206202", "text": "function preg_ls($path = \".\", $rec = false, $pat = \"/.*/\") {\r\n\t//$pat=preg_replace(\"|(/.*/[^S]*)|s\", \"\\\\1S\", $pat);\r\n\t//Remove trailing slashes from path\r\n\twhile (substr($path, -1, 1) == \"/\") $path = substr($path, 0, -1);\r\n\t//also, make sure that $path is a directory and repair any screwups\r\n\tif (!is_dir($path)) $path = dirname($path);\r\n\t//assert either truth or falsehoold of $rec, allow no scalars to mean truth\r\n\tif ($rec !== true) $rec = false;\r\n\t//get a directory handle\r\n\t//$firephp->log($path,\"¤ÀªR¸ô®|\");\r\n\tif (!is_dir($path)) {\r\n\t\treturn false;\r\n\t}\r\n\t$d = @dir($path);\r\n\t//initialise the output array\r\n\t$ret = Array();\r\n\t//loop, reading until there's no more to read\r\n\twhile (false !== ($e = $d->read())) {\r\n\t\t//Ignore parent- and self-links\r\n\t\tif (($e == \".\") || ($e == \"..\")) continue;\r\n\t\t//If we're working recursively and it's a directory, grab and merge\r\n\t\tif ($rec && is_dir($path . DIRECTORY_SEPARATOR . $e)) {\r\n\t\t\t$ret = array_merge($ret, preg_ls($path . DIRECTORY_SEPARATOR . $e, $rec, $pat));\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t//If it don't match, exclude it\r\n\t\tif (!preg_match($pat, $e)) continue;\r\n\t\t$ret[] = $path . DIRECTORY_SEPARATOR . $e;\r\n\t}\r\n\t//finally, return the array\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "4139caa9cfbdd9ea1a051e26f6c3dcb2", "score": "0.620569", "text": "function recursiveSearch($dir){\n $list = scandir($dir);\n $testList = findSrcFiles($list);\n $testMat = array($dir => $testList); \n foreach($list as $item){\n if(is_dir($dir.\"/\".$item) && $item != \".\" && $item != \"..\"){\n $testMat = array_merge($testMat, recursiveSearch($dir.\"/\".$item));\n }\n } \n return $testMat;\n }", "title": "" }, { "docid": "549431641c25503bc9a4343423cbe748", "score": "0.6198392", "text": "public function getFilesToParse(): array\n {\n $foundFiles = glob(rtrim($this->config->docsFolder, '/') . '/' . '*.' . $this->config->getDocsExtension());\n sort($foundFiles);\n\n foreach ($foundFiles as $key => $path) {\n $foundFiles[$key] = new File($path);\n }\n return $foundFiles;\n }", "title": "" }, { "docid": "c36c414c95360d6a4425ff5625dc47ad", "score": "0.6159923", "text": "function find_files_raw($dir, &$dir_array)\n{\n $files = scandir($dir);\n \n if(is_array($files)){\n foreach($files as $val){\n // Skip home and previous listings\n if($val == '.' || $val == '..')\n continue;\n \n // If directory then dive deeper, else add file to directory key\n // if(is_dir($dir.'/'.$val)){\n // // Add value to current array, dir or file\n // $dir_array[$dir][] = $val;\n \n // find_files($dir.'/'.$val, $dir_array);\n // }\n // else{\n $dir_array[] = $val;\n // }\n }\n }\n ksort($dir_array);\n}", "title": "" }, { "docid": "1d476e76d12ef0fd3254d13b925f101d", "score": "0.61517906", "text": "function get_files($path, $recursive = false)\n {\n $result = array();\n\n if (is_dir($path)) {\n $files = scandir($path);\n foreach ($files as $f) {\n $sub_path = (str_end_with($path, '/') ? $path : $path . '/') . $f;\n if ($f == '.' || $f == '..') {\n continue;\n } else if (is_dir($sub_path) && $recursive) {\n $sub_files = get_files($sub_path, $recursive);\n if (sizeof($sub_files) > 0) {\n array_push($result, ...$sub_files);\n }\n } else {\n array_push($result, $sub_path);\n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "713e7e10dd2837dc5afc7671c5263e22", "score": "0.61438584", "text": "function findFiles($fName) {\n\t\t$path = array();\n\t\t$realPath = realpath($fName);\n\t\t$rdi = new RecursiveDirectoryIterator($realPath);\n\t\t$rii = new RecursiveIteratorIterator($rdi);\n\t\tforeach ($rii as $foundFile) {\n\t\t\t$isHeader = pathinfo($foundFile, PATHINFO_EXTENSION);\n\t\t\tif($isHeader == 'h')\n\t\t\tarray_push($path, $foundFile);\t\t\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "7d500c98e95710bc5db769390bc38b29", "score": "0.6130526", "text": "public function find()\n\t{\n\t\t$paths = array();\n\t\tforeach($this as $file){\n\t\t\t$paths[] = $file->getRealPath();\n\t\t}\n\t\treturn $paths;\n\t}", "title": "" }, { "docid": "d792ae45374dac5382cb40030df15280", "score": "0.61287045", "text": "public function getFilesRecursive()\n {\n if (! $this->exists()) {\n throw FilesystemException::createDirectoryDoesNotExist($this->getPath());\n }\n \n // create file iterator for all files in bundles asset sub directories.\n $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS;\n $directoryIterator = new RecursiveDirectoryIterator($this->path, $flags);\n $fileIterator = new RecursiveIteratorIterator($directoryIterator);\n \n // for each found file in bundle assets subdirectories.\n $files = array();\n /** @noinspection PhpUnusedLocalVariableInspection */\n foreach ($fileIterator as $file) {\n $files[] = new File(realpath($fileIterator->key()));\n }\n \n return $files;\n }", "title": "" }, { "docid": "318b2498cb40daa2d34557c1f4f25bfb", "score": "0.61266893", "text": "function getFiles($cd) {\n\t$links = array();\n\t$directory = ($cd) ? $cd . '/' : '';//Add the slash only if we are in a valid folder\n\n\t$files = glob($directory . $GLOBALS['file_mask']);\n\tforeach($files as $link) {\n\t\t//Use this only if it is NOT on our ignore lists\n\t\tif(in_array($link,$GLOBALS['ignore_files'])) continue; \n\t\tif(in_array(basename($link),$GLOBALS['always_ignore'])) continue;\n\t\tarray_push($links, $link);\n\t}\n\t//asort($links);//Sort 'em - to get the index at top.\n\n\t//Get All folders.\t\n\t$folders = glob($directory . '*',GLOB_ONLYDIR);//GLOB_ONLYDIR not avalilabe on windows.\n\tforeach($folders as $dir) {\n\t\t//Use this only if it is NOT on our ignore lists\n\t\t$name = basename($dir);\n\t\tif(in_array($name,$GLOBALS['always_ignore'])) continue;\n\t\tif(in_array($dir,$GLOBALS['ignore_folders'])) continue; \n\t\t\n\t\t$more_pages = getFiles($dir); // :RECURSION: \n\t\tif(count($more_pages)) $links = array_merge($links,$more_pages);//We need all thing in 1 single dimentional array.\n\t}\n\t\n\treturn $links;\n}", "title": "" }, { "docid": "318b2498cb40daa2d34557c1f4f25bfb", "score": "0.61266893", "text": "function getFiles($cd) {\n\t$links = array();\n\t$directory = ($cd) ? $cd . '/' : '';//Add the slash only if we are in a valid folder\n\n\t$files = glob($directory . $GLOBALS['file_mask']);\n\tforeach($files as $link) {\n\t\t//Use this only if it is NOT on our ignore lists\n\t\tif(in_array($link,$GLOBALS['ignore_files'])) continue; \n\t\tif(in_array(basename($link),$GLOBALS['always_ignore'])) continue;\n\t\tarray_push($links, $link);\n\t}\n\t//asort($links);//Sort 'em - to get the index at top.\n\n\t//Get All folders.\t\n\t$folders = glob($directory . '*',GLOB_ONLYDIR);//GLOB_ONLYDIR not avalilabe on windows.\n\tforeach($folders as $dir) {\n\t\t//Use this only if it is NOT on our ignore lists\n\t\t$name = basename($dir);\n\t\tif(in_array($name,$GLOBALS['always_ignore'])) continue;\n\t\tif(in_array($dir,$GLOBALS['ignore_folders'])) continue; \n\t\t\n\t\t$more_pages = getFiles($dir); // :RECURSION: \n\t\tif(count($more_pages)) $links = array_merge($links,$more_pages);//We need all thing in 1 single dimentional array.\n\t}\n\t\n\treturn $links;\n}", "title": "" }, { "docid": "9d76c88ffaaebfb362c2467e7afbae7a", "score": "0.6118698", "text": "function rglob($sDir, $regEx, $nFlags = NULL)\n {\n\t$result=array();\n if ($handle = opendir($sDir)) {\n while (false !== ($file = readdir($handle))) {\n\t //echo \"$file\\n\";\n\t preg_match($regEx, $file, $matches);\n\t if ($file != '.' && $file != '..' && count($matches) > 0) {\n\t\t $result[]=$file;\n\t\t //print(\"<pre>$regEx $sDir $file \\n=\");\n\t }\n\t \n\t }\n\t}\n\t//print \"array:\".is_array($result).\"\\n\";\n\treturn $result;\n \n}", "title": "" }, { "docid": "e4d244ef276a4da82ff0ed8d270444a6", "score": "0.6050568", "text": "static function recursiveFind( $dir, $suffix )\n {\n $returnFiles = array();\n if ( $handle = @opendir( $dir ) )\n {\n while ( ( $file = readdir( $handle ) ) !== false )\n {\n if ( ( $file == \".\" ) || ( $file == \"..\" ) )\n {\n continue;\n }\n if ( is_dir( $dir . '/' . $file ) )\n {\n if ( $file[0] != \".\" )\n {\n $files = eZDir::recursiveFind( $dir . '/' . $file, $suffix );\n $returnFiles = array_merge( $files, $returnFiles );\n }\n }\n else\n {\n if ( preg_match( \"/$suffix$/\", $file ) )\n $returnFiles[] = $dir . '/' . $file;\n }\n }\n @closedir( $handle );\n }\n return $returnFiles;\n }", "title": "" }, { "docid": "9d49e56de979e09ef3fe638e847a65ce", "score": "0.6036987", "text": "private static function rglob($pattern, $flags = 0) {\n\t\t$files = glob($pattern, $flags);\n\t\tforeach (glob(dirname($pattern) . DIRECTORY_SEPARATOR .'*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir)\n\t\t\t$files = array_merge(self::rglob($dir . DIRECTORY_SEPARATOR . basename($pattern), $flags), $files);\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "bbfd5f015cd39e0dc4ff97619e1c1c3b", "score": "0.60297203", "text": "static function getFiles($directory, $base='', $bRecursive = true, $bReturnFullPath = true, $bReturnAll= false, $fileTypes = array(), $exclude = array()) {\n\n\n\t\tif(is_file($directory)) return false;\n\t\tif(!is_dir($directory)) return false;\n\n\t\t$directory = rtrim($directory, '\\\\/');\n\n\t\tif(!is_dir($directory)) return false;\n\t\t// Try to open the directory\n\t\tif($dir = opendir($directory)) {\n\t\t\t// Create an array for all files found\n\t\t\t$tmp = Array();\n\t\t\t// Add the files\n\t\t\twhile($file = readdir($dir)) {\n \n if($file==='.' || $file==='..')\n continue; \n\n $isFile = is_file($directory.'/'.$file);\n if(!self::validatePath($base, $file, $isFile, $fileTypes, $exclude))\n continue;\n \n\t\t\t\tif($isFile)\n\t\t\t\t{\n if($bReturnAll)\n {\n $arr_item = array('item'=>$file, 'fullitem'=>$directory .'/'. $file, 'isFile'=>true);\n array_push($tmp, $arr_item);\n }\n else if ($bReturnFullPath)\n array_push($tmp, $directory.'/'.$file);\n else\n array_push($tmp, $file);\n\t\t\t\t} else { // If it's a directory, list all files within it \n if($bRecursive)\n {\n $tmp2 = self::getFiles($directory.'/'.$file, $base.'/'.$file, $bRecursive, $bReturnFullPath, $bReturnAll, $fileTypes, $exclude);\n if(!empty($tmp2)) {\n $tmp = array_merge($tmp, $tmp2);\n }\n }\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\n\t\t\t// Finish off the function\n\t\t\tclosedir($dir);\n\t\t\treturn $tmp;\n\t\t}\n \n\t\treturn array();\n\t}", "title": "" }, { "docid": "4585a772d2e4ba896cac8a4cb3443bf9", "score": "0.6007159", "text": "public function findFiles()\n {\n // we want to look in all active themes\n $themes = xarMod::apiFunc('themes', 'admin', 'getlist',\n array('filter' => array('Class' => 2, 'State' => xarTheme::STATE_ACTIVE)));\n // we want to look in all active modules\n $modules = xarMod::apiFunc('modules', 'admin', 'getlist',\n array('filter' => array('State' => xarMod::STATE_ACTIVE)));\n // set default paths and filenames\n $libName = $this->name;\n $baseDir = xarTpl::getBaseDir();\n $themeDir = xarTpl::getThemeDir();\n $themeName = xarTpl::getThemeName();\n $commonDir = xarTpl::getThemeDir('common');\n $codeDir = sys::code();\n $libBase = xarCSS::LIB_BASE;\n $libBaseAlt = xarCSS::LIB_BASE_ALT;\n\n $paths = array();\n $themes[] = array('osdirectory' => 'common');\n // first we want to look in each active theme...\n foreach ($themes as $theme) {\n $themeOSDir = $theme['osdirectory'];\n // look in themes/<theme>/lib/libname/*\n $paths['theme'][$themeOSDir] = \"{$baseDir}/{$themeOSDir}/{$libBase}/{$libName}\";\n // then in each active module, this theme\n foreach ($modules as $mod) {\n $modOSDir = $mod['osdirectory'];\n // look in themes/<theme>/modules/<module>/lib/libname/*\n $paths['module'][$modOSDir] = \"{$baseDir}/{$themeOSDir}/modules/{$modOSDir}/{$libBaseAlt}/{$libName}\";\n }\n }\n // now we look in each active module\n foreach ($modules as $mod) {\n $modOSDir = $mod['osdirectory'];\n // look in code/modules/<module>/xartemplates/lib/libname/*\n $paths['module'][$modOSDir] = \"{$codeDir}modules/{$modOSDir}/{$libBaseAlt}/{$libName}\";\n }\n \n // Load the version class to check versions\n sys::import('xaraya.version');\n \n // find files in all lib folders, all themes, all modules, all properties\n $this->scripts = array();\n $this->styles = array();\n foreach ($paths as $scope => $packages) {\n foreach ($packages as $package => $path) {\n if (!is_dir($path)) continue;\n $versions = xarCSS::getFolders($path, 1);\n if (empty($versions)) continue;\n foreach (array_keys($versions) as $version) {\n // Check if this is a valid version folder\n $valid = xarVersion::parse($version);\n if(!$valid) continue;\n \n $subpath = $path . \"/\" . $version;\n// echo \"<pre>\";var_dump($subpath);//exit;\n $files = xarCSS::getFiles($subpath);\n if (empty($files)) continue;\n foreach ($files as $folder => $items) {\n foreach ($items as $file => $filepath) {\n // store script as scope - package - libbase/libname - file\n // eg, scripts[theme][common][lib/jquery][jquery-1.4.4.min.js] =\n // /themes/common/lib/jquery/jquery-1.4.4.min.js\n // init the actual tag info used to init this lib\n $tag = array(\n 'lib' => $libName,\n 'scope' => $scope,\n 'type' => 'lib',\n 'origin' => 'local',\n );\n switch ($scope) {\n case 'theme':\n case 'common':\n $tag['theme'] = $package;\n break;\n case 'module':\n case 'block':\n $tag['module'] = $package;\n break;\n case 'property':\n $tag['property'] = $package;\n break;\n }\n $ext = pathinfo($file, PATHINFO_EXTENSION);\n switch ($ext) {\n case 'js':\n $tag['src'] = $file;\n $tag['version'] = $version;\n $tag['package'] = $package;\n $base = \"{$libBase}/{$libName}\";\n // remove the filename from the path\n $basepath = str_replace(\"/$file\", '', $filepath);\n // remove anything before the base\n $basepath = preg_replace(\"!^.*\".$base.\"+(.*)$!\", $base.\"$1\", $basepath);\n // if this isn't base, keep everything after base\n if ($basepath != $base)\n $base = preg_replace(\"!^.*\".$base.\"+(.*)$!\", $base.\"$1\", $basepath);\n $tag['base'] = $base;\n $this->scripts[$version][$scope][$package][$base][$file] = $tag;\n// var_dump($this->scripts);\n break;\n case 'css':\n $tag['file'] = $file;\n $tag['version'] = $version;\n $tag['package'] = $package;\n $base = \"{$libBase}/{$libName}\";\n // remove the filename from the path\n $basepath = str_replace(\"/$file\", '', $filepath);\n // remove anything before the base\n $basepath = preg_replace(\"!^.*\".$base.\"+(.*)$!\", $base.\"$1\", $basepath);\n // if this isn't base, keep everything after base\n if ($basepath != $base)\n $base = preg_replace(\"!^.*\".$base.\"+(.*)$!\", $base.\"$1\", $basepath);\n $tag['base'] = $base;\n $this->styles[$version][$scope][$package][$base][$file] = $tag;\n// var_dump($this->styles);\n break;\n case 'xt':\n $tag['template'] = str_replace('.xt', '', $file);\n $this->templates[$version][$scope][$package][$base][$file] = $tag;\n break;\n case 'xml':\n break;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "80dc4c3397f5e95d094f3062e45c7fb8", "score": "0.60029626", "text": "private function iterateDirectories()\n {\n $dir = $_SERVER['DOCUMENT_ROOT']. '/WoofWorrior/Uploaded' ;\n $files = array();\n if ($handle = opendir($dir))\n {\n while (false !== ($file = readdir($handle)))\n {\n if ('.' === $file) continue;\n if ('..' === $file) continue;\n\n // do something with the file\n $files[] = $file;\n }\n closedir($handle);\n }\n return $files;\n }", "title": "" }, { "docid": "155da1ff1570d47a59c4737b6cee09dc", "score": "0.5990051", "text": "protected static function findFilesRecursive($dir, $base, array $filterOptions, $level)\n\t{\n\t\t$list = array();\n\t\t$handle = opendir($dir);\n\t\twhile (($file = readdir($handle)) !== false) {\n\t\t\tif ($file === '.' || $file === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$path = $dir . DIRECTORY_SEPARATOR . $file;\n\t\t\t$isFile = is_file($path);\n\t\t\tif (static::validatePath($base, $file, $isFile, $filterOptions)) {\n\t\t\t\tif ($isFile) {\n\t\t\t\t\t$list[] = $path;\n\t\t\t\t} elseif ($level) {\n\t\t\t\t\t$list = array_merge($list, static::findFilesRecursive($path, $base . DIRECTORY_SEPARATOR . $file, $filterOptions, $level-1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "e45871151a1364d4e396167cb97108ac", "score": "0.5989385", "text": "static public function globRecursive($pattern, $flags = 0)\n {\n $files = glob($pattern, $flags);\n foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)\n {\n $files = array_merge($files, self::globRecursive($dir.'/'.basename($pattern), $flags));\n }\n return $files;\n }", "title": "" }, { "docid": "bdc3fb9b50ae16616231007d9130d2bd", "score": "0.5987871", "text": "public function fileList($revision = null){\n $this->verbose && print(\"Generating list of files to search for translation calls...\\n\");\n $cwd = Yii::app()->basePath;\n $fileList = array();\n $basePath = realpath($cwd.'/../');\n $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basePath), RecursiveIteratorIterator::SELF_FIRST); // Build PHP File Iterator to loop through valid directories\n foreach($objects as $name => $object){\n if(!$object->isDir()){ // Make sure it's actually a file if we're going to try to parse it.\n $relPath = str_replace(\"$basePath/\", '', $name); // Get the relative path to it.\n if(!$this->excludePath($relPath)){ // Make sure the file is not in one of the excluded diectories.\n $fileList[] = $name;\n }\n }\n }\n return $fileList;\n }", "title": "" }, { "docid": "b8d23b7a70ced7d51d74dc8b6c5baffe", "score": "0.5981696", "text": "public function getFiles($file = null, $fixture_type = self::OWN)\n {\n $pattern = is_null($file) ? '*'.$this->_getExt() : $file.$this->_getExt();\n\n return sfFinder::type('file')->name($pattern)->maxdepth(0)->in($this->getDir($fixture_type));\n }", "title": "" }, { "docid": "a92812a343b837d1a567050b4afa7fda", "score": "0.59586996", "text": "function _getDirectoryContents($recursive = FALSE);", "title": "" }, { "docid": "390ef969f70e68937a4262cbc2528efb", "score": "0.5943254", "text": "function getFiles(string $dir=NULL, bool $includePath=FALSE) : array\n\t{\n\t\t$dir \t\t\t= substr($dir, strlen($dir) - 1) == \"/\" ? $dir : $dir.\"/\";\n\t\t$dirContents \t= array_diff(dirScanner($dir), ['.', '..']);\n\t\t$files \t\t\t= [];\n\t\tforeach ($dirContents as $dirContent):\n\t\t\t$file = $dir.$dirContent;\n\t\t\tif (is_file($file) && file_exists($file)):\n\t\t\t\t$files[] = ($includePath) ? $file : $dirContent;\n\t\t\tendif;\n\t\tendforeach;\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "47b8a48eda926fb875d92aa3b4acf4b6", "score": "0.5941384", "text": "static function recursiveFindRelative( $baseDir, $subDir, $suffix )\n {\n $dir = $baseDir;\n if ( $subDir != \"\" )\n {\n if ( $dir != '' )\n $dir .= \"/\" . $subDir;\n else\n $dir .= $subDir;\n }\n\n if ( !is_dir( $dir ) )\n {\n return array();\n }\n\n $returnFiles = array();\n if ( $handle = @opendir( $dir ) )\n {\n while ( ( $file = readdir( $handle ) ) !== false )\n {\n if ( ( $file == \".\" ) || ( $file == \"..\" ) )\n {\n continue;\n }\n if ( is_dir( $dir . '/' . $file ) )\n {\n if ( $file[0] != \".\" )\n {\n $files = eZDir::recursiveFindRelative( $baseDir, $subDir . '/' . $file, $suffix );\n $returnFiles = array_merge( $files, $returnFiles );\n }\n }\n else\n {\n if ( preg_match( \"/$suffix$/\", $file ) )\n $returnFiles[] = $subDir . '/' . $file;\n }\n }\n @closedir( $handle );\n }\n return $returnFiles;\n }", "title": "" }, { "docid": "cfca11ea5c603e9f39777545f9cd8bb1", "score": "0.592493", "text": "function rglob($pattern, $flags = 0, $path = '') {\r\n if (!$path && ($dir = dirname($pattern)) != '.') {\r\n if ($dir == '\\\\' || $dir == '/') $dir = '';\r\n return $this->rglob(basename($pattern), $flags, $dir . '/');\r\n }\r\n $paths = glob($path . '*', GLOB_ONLYDIR | GLOB_NOSORT);\r\n $files = glob($path . $pattern, $flags);\r\n foreach ($paths as $p)\r\n $files = array_merge($files, $this->rglob($pattern, $flags, $p . '/'));\r\n return $files;\r\n }", "title": "" }, { "docid": "e0a294f5b1fb91799a429d925ae5819e", "score": "0.59184295", "text": "public function findFiles($where);", "title": "" }, { "docid": "a47300d5aa2f3b859292116438da2a29", "score": "0.5901996", "text": "public function GetFiles() {\n $this->Files->GetAll($this->self->Path());\n }", "title": "" }, { "docid": "7ecc929979948be996625f06f36c99ec", "score": "0.59012043", "text": "function scanFiles($dir)\r\n{\r\n $files = array();\r\n // Is there actually such a folder/file?\r\n if(file_exists($dir)){\r\n foreach(scandir($dir) as $f) {\r\n if(!$f || $f[0] == '.') {\r\n continue; // Ignore hidden files\r\n }\r\n if(is_dir($dir . '/' . $f)) {\r\n // The path is a folder\r\n $files[] = array(\r\n \"id\" => str_replace('//','/', $dir . '/' . $f),\r\n //\"text\" => str_replace('/','',$f),\r\n \"text\" => $f,\r\n \"type\" => \"folder\",\r\n //\"path\" => $dir . '/' . $f,\r\n \"children\" => scanFiles($dir . '/' . $f) // Recursively get the contents of the folder\r\n );\r\n } else {\r\n // It is a file\r\n //$id = 'fileadmin' . array_pop(explode('fileadmin', str_replace('//','/',$dir . $f)));\r\n $ext = strpos($f, '.') !== FALSE ? substr($f, strrpos($f, '.') + 1) : '';\r\n $files[] = array(\r\n //\"id\" => str_replace('/','',$f),\r\n \"id\" => $f,\r\n //\"text\" => str_replace('/','',$f),\r\n \"text\" => $f,\r\n \"type\" => 'file',\r\n 'icon' => 'file file-'.substr($f, strrpos($f,'.') + 1),\r\n //\"path\" => $dir . '/' . $f,\r\n //\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\r\n );\r\n }\r\n }\r\n }\r\n return $files;\r\n}", "title": "" }, { "docid": "fec81d63c9643d0269e0d77096d638c1", "score": "0.58733994", "text": "function byrd_files($path, $filter = '.', $recurse = false, $fullpath = false, $exclude = array('.svn', 'CVS'))\n\t{\n\t\t// Initialize variables\n\t\t$arr = array();\n\n\t\t// Check to make sure the path valid and clean\n\t\t$path = TwcPath::clean($path);\n\n\t\t// Is the path a folder?\n\t\tif (!is_dir($path))\n\t\t{\n\t\t\ttrigger_error('BFolder::files: ' . 'Path is not a folder '.'Path: ' . $path);\n\t\t\treturn false;\n\t\t}\n\n\t\t// read the source directory\n\t\t$handle = opendir($path);\n\t\twhile (($file = readdir($handle)) !== false)\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..') && (!in_array($file, $exclude)))\n\t\t\t{\n\t\t\t\t$dir = $path . DS . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir)\n\t\t\t\t{\n\t\t\t\t\tif ($recurse)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_integer($recurse))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr2 = TwcPath::files($dir, $filter, $recurse - 1, $fullpath);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr2 = TwcPath::files($dir, $filter, $recurse, $fullpath);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$arr = array_merge($arr, $arr2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (preg_match(\"/$filter/\", $file))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($fullpath)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr[] = $path . DS . $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$arr[] = $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\n\t\tasort($arr);\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "92850424400634ccb29071f52a9bf972", "score": "0.5862569", "text": "function __find($file, $recursive = true) {\n\t\tstatic $appPath = false;\n\t\t\n\t\tif (empty ( $this->search )) {\n\t\t\treturn null;\n\t\t} elseif (is_string ( $this->search )) {\n\t\t\t$this->search = array (\n\t\t\t\t\t$this->search \n\t\t\t);\n\t\t}\n\t\t\n\t\tif (empty ( $this->__paths )) {\n\t\t\t$this->__paths = Cache::read ( 'dir_map', '_cake_core_' );\n\t\t}\n\t\t\n\t\tforeach ( $this->search as $path ) {\n\t\t\tif ($appPath === false) {\n\t\t\t\t$appPath = rtrim ( APP, DS );\n\t\t\t}\n\t\t\t$path = rtrim ( $path, DS );\n\t\t\t\n\t\t\tif ($path === $appPath) {\n\t\t\t\t$recursive = false;\n\t\t\t}\n\t\t\tif ($recursive === false) {\n\t\t\t\tif ($this->__load ( $path . DS . $file )) {\n\t\t\t\t\treturn $path . DS;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif (! isset ( $this->__paths [$path] )) {\n\t\t\t\tif (! class_exists ( 'Folder' )) {\n\t\t\t\t\trequire LIBS . 'folder.php';\n\t\t\t\t}\n\t\t\t\t$Folder = & new Folder ();\n\t\t\t\t$directories = $Folder->tree ( $path, array (\n\t\t\t\t\t\t'.svn',\n\t\t\t\t\t\t'.git',\n\t\t\t\t\t\t'CVS',\n\t\t\t\t\t\t'tests',\n\t\t\t\t\t\t'templates' \n\t\t\t\t), 'dir' );\n\t\t\t\tsort ( $directories );\n\t\t\t\t$this->__paths [$path] = $directories;\n\t\t\t}\n\t\t\t\n\t\t\tforeach ( $this->__paths [$path] as $directory ) {\n\t\t\t\tif ($this->__load ( $directory . DS . $file )) {\n\t\t\t\t\treturn $directory . DS;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "4a03512730162ed3bb70d33915a4108c", "score": "0.5856749", "text": "public function getDirectoryFilesRecursively($dir, &$results = array()){\n // The first time this function is called a new array is created\n \n // Get all files and folders in this directory\n $files = scandir($dir);\n\n foreach($files as $key => $fileName){\n // Returns canonicalized absolute pathname\n $path = realpath($dir.DIRECTORY_SEPARATOR.$fileName);\n \n if (is_file($path) && preg_match('/\\.php$/', $fileName)) {\n // If this is a a valid PHP file save it in the results\n $results[] = $path;\n } else if(is_dir($path) && $fileName != \"vendor\" && $fileName != \".\" && $fileName != \"..\") {\n // If this is a directory recursivly get its contents\n $this->getDirectoryFilesRecursively($path, $results);\n }\n }\n\n // Return the list of results\n return $results;\n \n }", "title": "" }, { "docid": "a5f497e44c23ba7f6958dd6547cd7c82", "score": "0.5854002", "text": "public function files()\n {\n return $this->siblingsCollection();\n }", "title": "" }, { "docid": "03601d8e20012e9995413eb5e4377b4d", "score": "0.58536047", "text": "public static function files($path,$_r=false,$subdir='',$_s=true)\n\t{\n\t\t$files = array();\n\t\tif (!$path) return $files;\n\t\t$subdir = ($subdir&&$_s) ? $subdir.self::_ : '';\n\t\t$contents = self::contents($path);\n\t\tforeach ($contents as $n) {\n\t\t\t$p = $path.self::_.$n;\n\t\t\tif (is_file($p)) $files[$subdir.$n] = $p;\n\t\t\telseif ($_r&&is_dir($p))\n\t\t\t\t$files = array_merge($files,\n\t\t\t\t\tself::files($p,true,$subdir.$n,$_s));\n\t\t}\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "a1059e93c8414d1a387f6a3fdb4312c4", "score": "0.58522934", "text": "public function getAllFiles() {\n\t\tif ($this->_allFiles === null) {\n\t\t\t$this->loadElements();\n\t\t}\n\t\treturn $this->_allFiles;\n\t}", "title": "" }, { "docid": "530d4fbf749ce5d427a6ca7933af71e9", "score": "0.58469594", "text": "public static function findFiles($dir, array $options = array())\n\t{\n\t\t$level = array_key_exists('level', $options) ? $options['level'] : -1;\n\t\t$filterOptions = $options;\n\t\t$list = static::findFilesRecursive($dir, '', $filterOptions, $level);\n\t\tsort($list);\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "a0c1806c5d7d2b200197b3e3199dc7cf", "score": "0.5845451", "text": "public function _getFiles(){\n if (defined('TEST_MODE')){\n $files = array('test.php');\n return $files;\n }\n \n // Get a list of all the files in the template directory\n $directory = realpath($_SERVER['DOCUMENT_ROOT'].'/../cms/templates');\n\n $handler = opendir($directory);\n $files = array();\n\n // open directory and walk through the filenames\n while ($file = readdir($handler)) {\n // if file isn't this directory or its parent, add it to the results\n if ($file != \".\" && $file != \"..\") {\n // check to make sure not file with . at start\n if (substr($file, 0, 1) != \".\"){\n $files[] = $file;\n }\n }\n }\n // tidy up: close the handler\n closedir($handler);\n \n return $files;\n \n }", "title": "" }, { "docid": "07c4564bf62e57917114200c6b63b62c", "score": "0.58351433", "text": "function getMatches(){\n\t\t$wpath = dirname(dirname(__FILE__).\"..\").\"/modules\";\n\t\tif (is_dir($wpath)){\n\t\t\t$handle = opendir($wpath);\n\t\t\t\n\t\t\t$arr_files = array();\n\n\t\t\t//Get files in module root directory into array, then sort the array\n\t\t while (false !== ($file = readdir($handle))) {\n\t\t \tif ($file == \".\" || $file == \"..\") continue;\n\t\t \t$arr_files[] = $file;\n\t\t\t}\n\t \tclosedir($handle);\n\t\t\tsort($arr_files);\n\t\t\t\n\t\t\t//process each file\n\t\t\tforeach($arr_files as $file){\n\n\t\t \tif (is_dir($wpath.\"/\".$file)) {\n\t\t\t\t\tif (is_dir($wpath.\"/\".$file.\"/controllers\")){\n\t\t\t \t\t$this->processPath($wpath.\"/\".$file.\"/controllers\", $file);\n\t\t\t\t\t} \n\t\t \t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_matchedClasses;\n\t}", "title": "" }, { "docid": "eddc2b9dae1d4e20070fa9d36127a3b9", "score": "0.58261126", "text": "public function getFilesToResolve()\n {\n $query = FileQuery::create()\n ->addFilespec(File::ALL_FILES)\n ->setLimitToChangelist($this->getId())\n ->setLimitToNeedsResolve(true)\n ->setLimitToOpened(true);\n return File::fetchAll($query, $this->getConnection());\n }", "title": "" }, { "docid": "f3961b5fbb3bdb2ca3034c81ef2e11a3", "score": "0.58248574", "text": "private function getFiles() {\n\t\tif (!$dirHandle = opendir($this->recordsDir)) {\n\t\t\tthrow new ServerException('Cannot open data directory', $this->recordsDir);\n\t\t}\n\t\twhile ($filename = readdir($dirHandle)) {\n\t\t\tif ($filename[0] != '.') {\n\t\t\t\tyield \"$filename\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "951c96d2f18a40e3781912e32eb22be9", "score": "0.5819495", "text": "function get_files_recursive($absolute_path,$make_relative_to)\n\t{\n\t\t$dirs = array();\n\t\t$files = array();\n\t\t//traverse folder\n\t\tif ( $handle = @opendir( $absolute_path )){\n\t\t\twhile ( false !== ($file = readdir( $handle ))){\n\t\t\t\tif (( $file != \".\" && $file != \"..\" )){\n\t\t\t\t\tif ( is_dir( $absolute_path.'/'.$file )){\n\t\t\t\t\t\t$tmp=$this->get_files_recursive($absolute_path.'/'.$file,$make_relative_to);\n\t\t\t\t\t\tforeach($tmp['files'] as $arr){\n\t\t\t\t\t\t\tif (isset($arr[\"name\"])){\n\t\t\t\t\t\t\t\t$files[]=$arr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach($tmp['dirs'] as $arr){\n\t\t\t\t\t\t\tif (isset($arr[\"name\"])){\n\t\t\t\t\t\t\t\t$dirs[]=$arr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$dirs[]=$this->get_file_relative_path($make_relative_to,$absolute_path.'/'.$file);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$tmp=get_file_info($absolute_path.'/'.$file, array('name','date','size','fileperms'));\n\t\t\t\t\t\t$tmp['name']=$file;\n\t\t\t\t\t\t$tmp['size']=format_bytes($tmp['size']);\n\t\t\t\t\t\t$tmp['fileperms']=symbolic_permissions($tmp['fileperms']);\n\t\t\t\t\t\t$tmp['path']=$absolute_path;\n\t\t\t\t\t\t$tmp['relative']=$this->get_file_relative_path($make_relative_to,$absolute_path);\n\t\t\t\t\t\t$files[]=$tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir( $handle );\n\t\t\tsort( $dirs );\n\t\t}\n\t\treturn array('files'=>$files, 'dirs'=>$dirs);\n\t}", "title": "" }, { "docid": "0386c0cecf1b5a8702b5dbe3df48f027", "score": "0.5816641", "text": "abstract public function get_all( $relative_path );", "title": "" }, { "docid": "4b523d45ea7494b5c94229ee7a277ccf", "score": "0.580711", "text": "protected function callWatchersForAllFiles() {\n\t\t$recursiveDirectoryIterator = new \\RecursiveDirectoryIterator($this->path);\n\t\tforeach (new \\RecursiveIteratorIterator($recursiveDirectoryIterator, \\RecursiveIteratorIterator::LEAVES_ONLY) as $fileName => $file) {\n\t\t\t$this->callWatchersForFile($fileName);\n\t\t}\n\t}", "title": "" }, { "docid": "e7d0c6d133846d05ee0c68058cc868f9", "score": "0.58059865", "text": "public function getFiles(...$args);", "title": "" }, { "docid": "dea5014eba8892097cd875099fad5292", "score": "0.58033174", "text": "function GetAllMediaPaths(){\r\n $dir = $this->mediaDir;\r\n $dirhandle = opendir($dir);\r\n $files = array();\r\n\r\n $patten = array($this->prefix,'.'.$this->extension);\r\n $replace = array('','');\r\n while($name = readdir($dirhandle)){\r\n if (strpos($name,$this->extension)!==false){\r\n $path = $dir.'/'.$name;\r\n $id = str_replace($patten,$replace,$name);\r\n $files[$id] = $path;\r\n }\r\n }\r\n closedir();\r\n return $files;\r\n }", "title": "" }, { "docid": "0db08ee8a9cfbd8690b8717ab92e68b9", "score": "0.5803152", "text": "public function getAllDataFiles()\n\t{\n\t\tif(!is_dir($this->file))\n\t\t\treturn array($this->file);\n\t\telse\n\t\t\t$dir = $this->file;\n\n\t\treturn glob($dir . '/*');\n\t}", "title": "" }, { "docid": "5d93a46ab72275725258a644664e29f9", "score": "0.5783398", "text": "public function getFiles() {\n $list = [];\n if ($handle = opendir($this->modelPath)) {\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\" && !is_dir($this->modelPath.$entry)) {\n $list[] = $entry;\n }\n }\n closedir($handle);\n }\n return $list;\n }", "title": "" }, { "docid": "77773bd065c92ec6b760011bf625369f", "score": "0.57642", "text": "function rscandir($dir, $filter_pattern = '/.*/') {\n $dir = realpath($dir);\n\n if (!is_dir($dir)) {\n return [];\n }\n\n $directoryIteratorFlags = (\n \\FilesystemIterator::KEY_AS_PATHNAME |\n \\FilesystemIterator::CURRENT_AS_FILEINFO |\n \\FilesystemIterator::SKIP_DOTS |\n \\FilesystemIterator::UNIX_PATHS\n #| \\FilesystemIterator::FOLLOW_SYMLINKS\n );\n\n $recursiveIteratorFlags = (\n \\RecursiveIteratorIterator::SELF_FIRST |\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n $it = new \\RecursiveDirectoryIterator($dir, $directoryIteratorFlags);\n $it = new \\RecursiveIteratorIterator($it, $recursiveIteratorFlags);\n $it = new \\RegexIterator($it, $filter_pattern);\n\n $found = iterator_to_array($it);\n $files = array_filter(array_keys($found), 'is_file');\n $files = array_intersect_key($found, array_flip($files));\n\n return $files;\n}", "title": "" }, { "docid": "9949503d9264c98cd65be3618ff5ec1b", "score": "0.574845", "text": "private function globRecursive(string $pattern, int $flags = 0): array\n {\n $files = glob($pattern, $flags);\n\n foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) {\n $files = array_merge($files, $this->globRecursive($dir . '/' . basename($pattern), $flags));\n }\n\n return $files;\n }", "title": "" }, { "docid": "b10e49c684d7d660f08720328be53c01", "score": "0.5746612", "text": "public function getFlatListOfFiles()\n\t{\n\t\tif (!isset($this->flatData))\n\t\t{\n\t\t\t$this->flatData = [];\n\n\t\t\tforeach ($this as $entity)\n\t\t\t{\n\t\t\t\tif ($entity->isFile())\n\t\t\t\t{\n\t\t\t\t\t$this->flatData[] = $entity;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The result of this is already flat, so no need for recursion\n\t\t\t\t\tforeach ($entity->listContents(true) as $sub)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($sub->isfile())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->flatData[] = $sub;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->flatData;\n\t}", "title": "" }, { "docid": "ce82f20c8f285be967ed7756bdef06bb", "score": "0.57392603", "text": "function wpu_muplugin_get_all_files($dir) {\n $results = array();\n $files = scandir($dir);\n\n /* Parse all files */\n foreach ($files as $file) {\n $path = realpath($dir . DIRECTORY_SEPARATOR . $file);\n if (!is_dir($path)) {\n $extension = substr(strrchr($file, \".\"), 1);\n if ($extension == 'php') {\n $results[] = $path;\n }\n } else if ($file != \".\" && $file != \"..\") {\n\n /* Check if it's a plugin folder */\n $pluginfile = $path . '/' . basename($path) . '.php';\n if (file_exists($pluginfile)) {\n /* Include only plugin file */\n $results[] = $pluginfile;\n } else {\n /* Parse folder */\n $results = array_merge($results, wpu_muplugin_get_all_files($path));\n }\n }\n }\n\n return $results;\n}", "title": "" }, { "docid": "e46fb336cc5e5c0e1afb251a19ed868d", "score": "0.5731552", "text": "function readDirectory($path, $d=0) {\n global $basePath, $excludeSpecificDirectory;\n\n $pattern = preg_quote( implode('|', $excludeSpecificDirectory), '/' );\n $pattern = str_replace(array('\\*', '\\|'), array('.*','|'), $pattern);\n\n $fullPath = $path;\n \n if ( $d == FALSE )\n $fullPath = $basePath.$path;\n\n $basePathLength = strlen($basePath);\n $files = array();\n\n $list = glob($fullPath);\n foreach ($list as $file) {\n\n if ( $pattern != '' && preg_match('/'.$pattern.'/i', $file, $match) != 0 ) {\n continue;\n }\n\n if ( is_file($file) ) {\n $files[] = $file;\n } else if ( is_dir($file) && $path != '*' ) {\n $files = array_merge($files, readDirectory( $file.'/*', 1 ));\n }\n }\n\n return $files;\n}", "title": "" }, { "docid": "08d0eb3c56d7772134459f43d578501f", "score": "0.5728674", "text": "private function getFilesAndContents($dir, $fileName = null, $contents = true)\n {\n $files = array();\n foreach (new DirectoryIterator($dir) as $fileInfo) {\n if ($fileInfo->isDot()) {\n continue;\n } else if ($fileInfo->isDir() && !in_array($fileInfo->getFilename(), $this->blockedDirectories)) {\n $files = array_merge($files, $this->getFilesAndContents($fileInfo->getPathname(), $fileName, $contents));\n } else if ($fileInfo->isFile()) {\n if (IsSet($fileName) && substr($fileInfo->getPathname(), strlen($this->absoluteLocation) + 1) !== $fileName) {\n continue;\n }\n $file = $this->prepareFileInfo($fileInfo, $contents);\n if(!IsSet($file))\n\t\t\t\t\treturn null;\n $files[] = $file;\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "b3e8840e78d587ff09c8d0b7edc461ef", "score": "0.57269794", "text": "protected function getAllFiles()\n {\n return Storage::files($this->path);\n }", "title": "" }, { "docid": "bcc74734212a1f6aa6ffe5b20b3eeae3", "score": "0.57234913", "text": "public function testGettingFilesWithRecursion()\n {\n $this->assertCount(0, array_diff([\n __DIR__ . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'subdirectory' . DIRECTORY_SEPARATOR . 'subdirectory' . DIRECTORY_SEPARATOR . 'bar.txt',\n __DIR__ . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'subdirectory' . DIRECTORY_SEPARATOR . 'foo.txt',\n __FILE__\n ], $this->fileSystem->getFiles(__DIR__, true)));\n }", "title": "" }, { "docid": "6f77038afb57542e61882c7b89b49738", "score": "0.57153285", "text": "public function listFiles()\n {\n //Extracts all php files (No check class exists)\n $filesArray = new \\ArrayObject();\n foreach ($this->getFileSystem()->keys() as $file) {\n switch ($file) {\n case '.';\n case '..';\n break;\n default:\n $filesArray[] = $file;\n break;\n }\n }\n\n return $filesArray;\n }", "title": "" }, { "docid": "f4e0eb14de06068c5a8bbc466f5bae12", "score": "0.5713529", "text": "function read_recursiv($path, $scan_subdirs)\n\t{ \n\t\t$result = array(); \n\n\t\t$handle = opendir($path); \n\n\t\tif ($handle) \n\t\t{ \n\t\t\twhile (false !== ($file = readdir($handle))) \n\t\t\t{ \n\t\t\t\tif ($file !== '.' && $file !== '..') \n\t\t\t\t{ \n\t\t\t\t\t$name = $path . '/' . $file; \n\t\t\t\t\tif (is_dir($name) && $scan_subdirs) \n\t\t\t\t\t{ \n\t\t\t\t\t\t$ar = read_recursiv($name, true); \n\t\t\t\t\t\tforeach ($ar as $value) \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tif(in_array(substr($value, strrpos($value, '.')), $GLOBALS['FILETYPES']))\n\t\t\t\t\t\t\t\t$result[] = $value; \n\t\t\t\t\t\t} \n\t\t\t\t\t} else if(in_array(substr($name, strrpos($name, '.')), $GLOBALS['FILETYPES'])) \n\t\t\t\t\t{ \n\t\t\t\t\t\t$result[] = $name; \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t\tclosedir($handle); \n\t\treturn $result; \n\t}", "title": "" }, { "docid": "c5b981a9f4fc88701d49639d5de9370d", "score": "0.57103884", "text": "private function expand_regex_paths($path, $template = false) {\n $path = array_values(array_filter(explode(\"/\", $path)));\n if (is_string($template)) {\n $template = \"^\" . $template . \"$\";\n }\n\n // Directories still satisfying the regex\n // Start with root\n $directories = [\n [\n \"id\" => 0,\n \"path\" => \"/\"\n ]\n ];\n\n $len = count($path);\n $last_segment = false;\n\n $files = [];\n\n for ($i = 0; $i < $len; $i++) {\n // Check if it is the last segment\n if ($i == $len - 1) {\n $last_segment = true;\n }\n\n $files = [];\n\n foreach ($directories as $parent) {\n $query_type = $last_segment ? \"file\" : \"directory\";\n $query_template = $last_segment ? $template : false;\n\n if ($path[$i] == \"**\") {\n $new_files = $this->get_files_recursive(\n $parent,\n $query_type,\n $query_template\n );\n } else {\n $new_files = $this->get_directory(\n $parent[\"id\"],\n \"^\" . $path[$i] . \"$\",\n $query_type,\n $query_template\n );\n }\n\n if (!$new_files) {\n continue;\n }\n\n foreach ($new_files as $file) {\n if (!isset($file[\"path\"])) {\n $file[\"path\"] = $parent[\"path\"] . $file[\"slug\"] . \"/\";\n }\n array_push($files, $file);\n }\n }\n\n if (!$last_segment) {\n $directories = $files;\n }\n }\n\n return $files;\n }", "title": "" }, { "docid": "5e6c4567a54531afb1efd4068f85119e", "score": "0.570619", "text": "public function getFiles()\n {\n $files = $this->getFileSetFiles();\n $covers = [];\n\n foreach ($files as $file) {\n // We only support PDFs at the moment, skip everything else.\n if ('application/pdf' === $file->getMimetype()) {\n $cover = $this->getFileCover($file);\n $covers[] = [\n 'cover_exists' => $cover['cache_exists'],\n 'cover' => $cover['relative_path'],\n 'version' => $file,\n ];\n }\n }\n\n // We chunk the results into rows.\n return array_chunk($covers, $this->numPerRow);\n }", "title": "" }, { "docid": "6d972ecffe365daa024701175a47054b", "score": "0.5702906", "text": "public function getFileList($path);", "title": "" }, { "docid": "85e558d25beb1d9bdf2130d5039a2e25", "score": "0.5700113", "text": "function getFileList($dir, $recurse=false, $depth=false)\n {\n $types = array(\n \"doc\" => \"word_icon.png\",\n \"gif\" => \"image_icon.png\",\n \"jpeg\" => \"image_icon.png\",\n \"jpg\" => \"image_icon.png\",\n \"html\" => \"ie_icon.png\",\n \"txt\" => \"document_icon.png\",\n \"pdf\" => \"pdf_icon.png\",\n \"ppt\" => \"powerpoint_icon.png\",\n \"xls\" => \"excel_icon.png\"\n );\n\n $retval = array();\n// add trailing slash if missing\n if (substr($dir, -1) != \"/\") $dir .= \"/\";\n// open pointer to directory and read list of files\n $d = @dir($dir) or die(\"getFileList: Failed opening directory $dir for reading\");\n while (false !== ($entry = $d->read())) {\n // skip hidden files\n if ($entry[0] == \".\") continue;\n if (is_dir(\"$dir$entry\")) {\n $retval[] = array(\n \"path\" => \"$dir$entry/\",\n \"name\" => \"$entry\",\n \"type\" => filetype(\"$dir$entry\"),\n \"size\" => 0,\n \"lastmod\" => filemtime(\"$dir$entry\")\n );\n if ($recurse && is_readable(\"$dir$entry/\")) {\n if($depth === false) {\n $retval = array_merge(\n $retval, getFileList(\"$dir$entry/\", true));\n } elseif($depth > 0) {\n $retval = array_merge(\n $retval, getFileList(\"$dir$entry/\", true, $depth-1));\n }\n }\n } elseif (is_readable(\"$dir$entry\")) {\n $ic = explode(\".\", \"$entry\");\n $type = $ic[1];\n $name = ucwords(str_replace(\"_\",\" \",$ic[0]));\n $call = $ic[0];\n $icon = $types[$ic[1]];\n $retval[] = array(\n \"path\" => \"$dir$entry\",\n \"call\" => \"$call\",\n \"name\" => \"$name\",\n \"type\" => \"$ic[1]\",\n \"icon\" => \"$icon\",\n \"size\" => filesize(\"$dir$entry\"),\n \"lastmod\" => filemtime(\"$dir$entry\") );\n }\n }\n $d->close();\n return $retval;\n }", "title": "" }, { "docid": "325ab5f1d949d57a2aa58e0f53ffe6d8", "score": "0.5698093", "text": "abstract protected function getFiles() : array;", "title": "" }, { "docid": "03f7f800d94c42b3e24baae75e00655a", "score": "0.5692003", "text": "function vsp_get_file_paths($path) {\n return glob($path);\n }", "title": "" }, { "docid": "d04be90f8a900df864b20f1a9811078c", "score": "0.56885344", "text": "function directory_list($directory_base_path, $filter_dir = false, $filter_files = false, $exclude = \".|..|.DS_Store|.svn\", $recursive = true){\n $directory_base_path = rtrim($directory_base_path, \"/\") . \"/\";\n\n if (!is_dir($directory_base_path)){\n error_log(__FUNCTION__ . \"File at: $directory_base_path is not a directory.\");\n return false;\n }\n\n $result_list = array();\n $exclude_array = explode(\"|\", $exclude);\n\n if (!$folder_handle = opendir($directory_base_path)) {\n error_log(__FUNCTION__ . \"Could not open directory at: $directory_base_path\");\n return false;\n }else{\n while(false !== ($filename = readdir($folder_handle))) {\n if(!in_array($filename, $exclude_array)) {\n if(is_dir($directory_base_path . $filename . \"/\")) {\n if($recursive && strcmp($filename, \".\")!=0 && strcmp($filename, \"..\")!=0 ){ // prevent infinite recursion\n error_log($directory_base_path . $filename . \"/\");\n $result_list[$filename] = directory_list(\"$directory_base_path$filename/\", $filter_dir, $filter_files, $exclude, $recursive);\n }elseif(!$filter_dir){\n $result_list[] = $filename;\n }\n }elseif(!$filter_files){\n $result_list[] = $filename;\n }\n }\n }\n closedir($folder_handle);\n return $result_list;\n }\n}", "title": "" }, { "docid": "0855e53ffae056d910e9466656dab7b7", "score": "0.56798434", "text": "public function getFilesMatching($pattern) {\n\t\treturn preg_grep($pattern, $this->getAllFiles());\n\t}", "title": "" }, { "docid": "ca8c3bc9c748e25f1ca185b7b0e2dc5e", "score": "0.567474", "text": "function get_files( $extensions, $directory = '' ) {\n\t\t\n\t\t$files = array(); # Init files array\n\t\t$directory = ( $directory ) ? $directory : get_template_directory(); # Use template directory or $directory\n\n\t\tif ( $handle = opendir( $directory ) ) :\n\n\t\t\twhile ( false !== ( $file = readdir($handle) ) ) :\n\n\t\t\t\tif ( '.' != $file && '..' != $file ) :\n\n\t\t\t\t\tif ( is_dir($directory. \"/\" . $file) ) :\n\n\t\t\t\t\t\t$files = array_merge($files, $this->get_files( $extensions, $directory. '/' . $file)); # Recursive\n\n\t\t\t\t\telse :\n\n\t\t\t\t\t\tif ( preg_match('&^.+\\.(js|css)$&', $file)) :\n\n\t\t\t\t\t\t\t$file = $directory . \"/\" . $file;\n\t\t\t\t\t\t\t$files[] = str_replace(get_template_directory().'/', '', $file);\n\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\tendif;\n\n\t\t\t\tendif;\n\n\t\t\tendwhile;\n\n\t\t\tclosedir($handle);\n\n\t\tendif;\n\n\t\tasort($files);\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "4174eba2e1130967eaba6067047029c4", "score": "0.56717896", "text": "function find_files_with_dir($dir, &$dir_array)\n{\n $files = scandir($dir);\n \n if(is_array($files))\n {\n foreach($files as $val)\n {\n // Skip home and previous listings\n if($val == '.' || $val == '..')\n continue;\n \n // If directory then dive deeper, else add file to directory key\n if(is_dir($dir.'/'.$val))\n {\n // Add value to current array, dir or file\n $dir_array[$dir][] = $val;\n \n find_files($dir.'/'.$val, $dir_array);\n }\n else\n {\n $dir_array[$dir][] = $val;\n }\n }\n }\n ksort($dir_array);\n}", "title": "" }, { "docid": "08e21baa8f8c17f96aaf665e53689502", "score": "0.5667849", "text": "public function findAll()\n {\n $ritems = $this->getBackend()->findAllFiles();\n\n $items = array();\n foreach($ritems as $ritem) {\n $item = $this->_fileItemFromArray($ritem);\n $items[] = $item;\n }\n return $items;\n }", "title": "" }, { "docid": "37994b914a89577b39f74a0288bc5652", "score": "0.5666415", "text": "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "title": "" }, { "docid": "2ac319c89f6b47aa22c0b9f563ed373a", "score": "0.5664465", "text": "function getFileList($dir, $recurse=false, $depth=false)\r\n {\r\n $types = array(\r\n \"doc\" => \"word_icon.png\",\r\n \"gif\" => \"image_icon.png\",\r\n \"jpeg\" => \"image_icon.png\",\r\n \"jpg\" => \"image_icon.png\",\r\n \"html\" => \"ie_icon.png\",\r\n \"txt\" => \"document_icon.png\",\r\n \"pdf\" => \"pdf_icon.png\",\r\n \"ppt\" => \"powerpoint_icon.png\",\r\n \"xls\" => \"excel_icon.png\"\r\n );\r\n\r\n $retval = array();\r\n// add trailing slash if missing\r\n if (substr($dir, -1) != \"/\") $dir .= \"/\";\r\n// open pointer to directory and read list of files\r\n $d = @dir($dir) or die(\"getFileList: Failed opening directory $dir for reading\");\r\n while (false !== ($entry = $d->read())) {\r\n // skip hidden files\r\n if ($entry[0] == \".\") continue;\r\n if (is_dir(\"$dir$entry\")) {\r\n $retval[] = array(\r\n \"path\" => \"$dir$entry/\",\r\n \"name\" => \"$entry\",\r\n \"type\" => filetype(\"$dir$entry\"),\r\n \"size\" => 0,\r\n \"lastmod\" => filemtime(\"$dir$entry\")\r\n );\r\n if ($recurse && is_readable(\"$dir$entry/\")) {\r\n if($depth === false) {\r\n $retval = array_merge(\r\n $retval, getFileList(\"$dir$entry/\", true));\r\n } elseif($depth > 0) {\r\n $retval = array_merge(\r\n $retval, getFileList(\"$dir$entry/\", true, $depth-1));\r\n }\r\n }\r\n } elseif (is_readable(\"$dir$entry\")) {\r\n $ic = explode(\".\", \"$entry\");\r\n $type = $ic[1];\r\n $name = ucwords(str_replace(\"_\",\" \",$ic[0]));\r\n $call = $ic[0];\r\n $icon = $types[$ic[1]];\r\n $retval[] = array(\r\n \"path\" => \"$dir$entry\",\r\n \"call\" => \"$call\",\r\n \"name\" => \"$name\",\r\n \"type\" => \"$ic[1]\",\r\n \"icon\" => \"$icon\",\r\n \"size\" => filesize(\"$dir$entry\"),\r\n \"lastmod\" => filemtime(\"$dir$entry\") );\r\n }\r\n }\r\n $d->close();\r\n return $retval;\r\n }", "title": "" } ]
888ccfb7a4854c575a89d4db05df4a3d
Clean up after running all test cases
[ { "docid": "e7bbc9a236453f2c87265a2bf8372202", "score": "0.0", "text": "public static function tearDownAfterClass()\n {\n }", "title": "" } ]
[ { "docid": "9f3d312881bd28694d82fe3989df315c", "score": "0.78126353", "text": "function teardown() {\n // clean any files you've created, close database handles, etc.\n @unlink('sometestfile');\n }", "title": "" }, { "docid": "b0aaac782a2875520f2fa38b9123d07c", "score": "0.7750415", "text": "abstract function clean_up();", "title": "" }, { "docid": "83c921ab4a34e25f2bacc8d41e002c05", "score": "0.77407694", "text": "public function cleanup() {\n\t\t//TODO\n\t}", "title": "" }, { "docid": "325d351c69a0c007556e72863010cf64", "score": "0.7656714", "text": "public function cleanUp(): void;", "title": "" }, { "docid": "974542422ef9b957a4954fd0db80155d", "score": "0.76512516", "text": "public function cleanup()\n {\n // nothing to do\n }", "title": "" }, { "docid": "3cd0f501310d298bbd57fd8294479c71", "score": "0.76485807", "text": "public function tearDown()\n {\n $this->cleanUp();\n }", "title": "" }, { "docid": "f534ef9d650af83c75a2e11438b2334d", "score": "0.76356727", "text": "protected function tearDown() {\r\n\t\t$this->cabinaFactory = null;\r\n\t\t$this->verificador = null;\r\n\t}", "title": "" }, { "docid": "031cb3006b5943c84b0bf05acc860684", "score": "0.75975674", "text": "public function _cleanup() {\n }", "title": "" }, { "docid": "749407c38c12a8006ed6535b7272bdfb", "score": "0.7587987", "text": "protected function tearDown()\n {\n unset($this->refIndex);\n unset($this->t3libRefindex);\n unset($this->typo3Db);\n }", "title": "" }, { "docid": "0e379895e487a1c83d89513f56dd7fe3", "score": "0.75870264", "text": "public function tearDown() {\n $this->preparation = null;\n $this->request = null;\n $this->container = null;\n $this->event = null;\n }", "title": "" }, { "docid": "0e379895e487a1c83d89513f56dd7fe3", "score": "0.75870264", "text": "public function tearDown() {\n $this->preparation = null;\n $this->request = null;\n $this->container = null;\n $this->event = null;\n }", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.75847656", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.75847656", "text": "public function cleanup();", "title": "" }, { "docid": "2f2ab1b83d572d6a84e1fa6ae8b7801d", "score": "0.75811327", "text": "public function cleanup() {\n\t\t// no-op\n\t}", "title": "" }, { "docid": "76d27eb570a0ead3702c7b840e4ee0ea", "score": "0.7560215", "text": "protected function teardown () {\n\t\t$this->urls\t\t\t\t\t= [];\n\t\t$this->titles\t\t\t\t= [];\n\t\t$this->html_hashes\t\t\t= [];\n\t\t/**\n\t\t * Clearing Extra-specific variables.\n\t\t */\n\t\t$this->footnotes\t\t\t= [];\n\t\t$this->footnotes_ordered\t= [];\n\t\t$this->footnotes_ref_count\t= [];\n\t\t$this->footnotes_numbers\t= [];\n\t\t$this->abbr_descriptions\t= [];\n\t\t$this->abbr_word_re\t\t\t= '';\n\t}", "title": "" }, { "docid": "22d4326327d41f84c5ac463f91741806", "score": "0.7559812", "text": "public function _cleanup()\n {\n }", "title": "" }, { "docid": "93af169e4351d760a2e5172f1ad5da13", "score": "0.7532518", "text": "public function endTest() {\n unset($this->GenericContent);\n unset($this->Article);\n ClassRegistry::flush();\n }", "title": "" }, { "docid": "7aaf015e65948eb819dec0e2d9bf9d8d", "score": "0.75293595", "text": "public function cleanUp()\n\t{\n\t}", "title": "" }, { "docid": "7aaf015e65948eb819dec0e2d9bf9d8d", "score": "0.75293595", "text": "public function cleanUp()\n\t{\n\t}", "title": "" }, { "docid": "9ca23a6d340e2c3e86d4045a4f2634fb", "score": "0.7520327", "text": "public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeCacheFileDir);\n $fs->remove($this->fakeProjectFileDir);\n\n unset($this->fetch);\n unset($this->fs);\n unset($this->config);\n unset($this->zippy);\n unset($this->finderFactory);\n unset($this->finder);\n }", "title": "" }, { "docid": "0d7528f9a8d3ef574195467d7015a7a4", "score": "0.75175405", "text": "public function tearDown() {\n $this->checklist = null;\n }", "title": "" }, { "docid": "bed9c90f62bcf1b401c51929ebfbdade", "score": "0.74990606", "text": "public function tearDown()\n {\n $this->clean($this->workspace);\n\n parent::tearDown();\n }", "title": "" }, { "docid": "3e725d43173e801f070de9f23845b7fc", "score": "0.7489957", "text": "protected function tearDown()\n {\n parent::tearDown();\n\n unset($this->testInstance);\n unset($this->publisherScanner);\n unset($this->inputMock);\n unset($this->outputMock);\n\n $this->prepareFolder();\n }", "title": "" }, { "docid": "733432786f1652d89d0d74612cf4671f", "score": "0.74841833", "text": "public function cleanup()\n {\n }", "title": "" }, { "docid": "0e14130a029279974a7a9e264a6c757a", "score": "0.74788666", "text": "function cleanup() {\n\t\t\n }", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.7473982", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.7473982", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.7473982", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "283485f45ae06456e9989aba7cf18458", "score": "0.74731576", "text": "public function cleanup()\n {}", "title": "" }, { "docid": "ef05a0b3b74d7132216af51e7313c2af", "score": "0.7459289", "text": "protected function tearDown() {\r\n\t\tunset ( $this->cleanerStrategy );\r\n\t}", "title": "" }, { "docid": "eee7992c1cbd9aca631f3f9ce5803cf0", "score": "0.7457576", "text": "public function tearDown(): void\n {\n R::nuke();\n R::close();\n $this->bbs = null;\n system(\"rm -rf \".self::DATA);\n }", "title": "" }, { "docid": "3f4b8db21ad858e8fc5e9865e87f8087", "score": "0.7445776", "text": "protected function tearDown()\n {\n unlink(\"{$this->dir}/file1.mock\");\n unlink(\"{$this->dir}/file2.mock\");\n unlink(\"{$this->dir}/dir1/file3.mock\");\n unlink(\"{$this->dir}/dir1/file4.mock\");\n rmdir(\"{$this->dir}/dir1\");\n rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "title": "" }, { "docid": "0a94d86bec40b72be68c58ccee543680", "score": "0.74409163", "text": "public function _cleanup(){\n\n\t\tunset($this->result);\n\t\tunset($this->{'full_table_'.static::$table});\n\t\tunset(static::$_inst->{'full_table_'.static::$table});\n\t\t$this->sleep();\n\t\t$this->__sleep();\n\t\t$this->__destruct();\n\t}", "title": "" }, { "docid": "8517ee4fafb41b3c3d2829381706cc21", "score": "0.74396837", "text": "public function tearDown()\n {\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "title": "" }, { "docid": "cef5232c7583380514bb5c7ef796cdcc", "score": "0.7427876", "text": "public function tearDown()\n {\n unset($this->rubricData);\n unset($this->level);\n }", "title": "" }, { "docid": "dafe32ecbc0e9d794f143b2f2b8c4248", "score": "0.7423639", "text": "protected function tearDown(): void\n {\n $this->instance = null;\n $this->container = null;\n $this->config = null;\n $this->layerReflector = null;\n $this->tokenTool = null;\n }", "title": "" }, { "docid": "7a65abdf0eb11519fd919868fcefd0d6", "score": "0.7419603", "text": "protected function tearDown()\n {\n unset($this->app);\n unset($this->command);\n }", "title": "" }, { "docid": "22543c330f025f664411ee0e9ab26323", "score": "0.7409488", "text": "public function teardown()\r\n\t{\t\r\n\t\tglobal $wisconsin, $iowacity;\r\n\r\n\t\t//delete test apartments\r\n\t\tdeleteTestApartment($wisconsin['apartment_id']);\r\n\t\tdeleteTestApartment($iowacity['apartment_id']);\r\n\t}", "title": "" }, { "docid": "d94cff4974ea084222af4e3b5abf6d6b", "score": "0.7392892", "text": "public static function cleanup();", "title": "" }, { "docid": "c166b42108c9e3193024903c67f43b57", "score": "0.73824596", "text": "function endTest() {\n\t\tunset($this->Article);\n\t\tunset($this->User);\n\n\t\tClassRegistry::flush();\n\t}", "title": "" }, { "docid": "8b41e2fd2d5a7cfa36eec1c9d00d68dc", "score": "0.7382173", "text": "public function tearDown()\n\t{\n\t\t$this->calculator = null;\n\t}", "title": "" }, { "docid": "67c3824315e434e273e1edf84fe6c39f", "score": "0.7378476", "text": "protected function tearDown(): void\n {\n $finder = rex_finder::factory(rex_path::addonCache('structure'))\n ->recursive()\n ->childFirst()\n ->ignoreSystemStuff(false);\n rex_dir::deleteIterator($finder);\n\n // reset static properties\n $class = new ReflectionClass(rex_article::class);\n $classVarsProperty = $class->getProperty('classVars');\n $classVarsProperty->setValue(null);\n\n rex_article::clearInstancePool();\n }", "title": "" }, { "docid": "f4b9eeda5c7b0b38d87d92eb8bf2c9c0", "score": "0.73718256", "text": "public function tearDown() {\n $this->manager = null;\n $this->container = null;\n }", "title": "" }, { "docid": "8b691aa2fcda1858a5c709ed2e3a667e", "score": "0.7369826", "text": "public function tearDown(): void\n {\n unset($this->dataMapper);\n unset($this->pdo);\n unset($this->adapter);\n unset($this->logger);\n\n if (\\file_exists($this->dbFile))\n \\unlink($this->dbFile);\n }", "title": "" }, { "docid": "b5b0a22a6d10bfa41bd81ed369675fc4", "score": "0.7357083", "text": "protected function tearDown()\n {\n $this->_clearFile();\n }", "title": "" }, { "docid": "2d789d4e41a8f692612decde78b2ab60", "score": "0.7352691", "text": "protected function tearDown()\n {\n $this->cleanPoolsData();\n Magento_PHPUnit_Initializer_Factory::cleanInitializers();\n }", "title": "" }, { "docid": "5c4754d2a800b8f7968ffbbad212898d", "score": "0.73491806", "text": "public function _afterSuite()\n {\n $this->unloadFixtures();\n }", "title": "" }, { "docid": "aa5cfae133c75577941102350590ff99", "score": "0.73389953", "text": "function cleanup() {\n\t}", "title": "" }, { "docid": "0262d0b5c9e3926695e6359106c6b396", "score": "0.73349476", "text": "protected function tearDown()\n {\n /* @TODO allow to configure purging during tearDown execution\n $purger = new MongoDBPurger(static::$dm);\n $purger->purge();\n */\n if (null !== static::$kernel) {\n static::$kernel->shutdown();\n }\n $this->speedUpTestExecution();\n }", "title": "" }, { "docid": "244e5d88e99840ac78eeae81aad2c0dc", "score": "0.7321208", "text": "public function teardown() {\n foreach (IO_FS::Dir('test/data/Mail/List')->query(IO_FS::Query()->recursive()) as $f)\n IO_FS::rm($f);\n foreach (IO_FS::Dir('test/data/Mail/List') as $d)\n IO_FS::rm($d->path);\n }", "title": "" }, { "docid": "3cf863fe068bcfe3dcb068183b5f10ce", "score": "0.73194146", "text": "protected function tearDown()\n\t{\n\t\t// We need this to be empty.\n\t}", "title": "" }, { "docid": "d5977541be9895d1ec480aaec8f7e7ea", "score": "0.73190564", "text": "public function tearDown()\n {\n foreach (glob($this->dir . '/*') as $file) {\n unlink($file);\n }\n rmdir($this->dir);\n }", "title": "" }, { "docid": "83e71f7333e665afb206623ee21a2d42", "score": "0.73088443", "text": "protected function tearDown() {\n $this->osapiIdSpec = null;\n $this->jsonspec = null;\n $this->type = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "c9cd527d2f0f4974b53531bfe4eb8614", "score": "0.73079926", "text": "function _cleanup() {\r\n\t\tglobal $database,$JPConfiguration;\r\n\r\n\t\tCJPLogger::WriteLog(_JP_LOG_INFO,_JP_CLEANUP);\r\n\t\t// Define which entries to keep in #__jp_packvars\r\n\t\t$keepInDB = array('CUBEArray');\r\n\r\n\t\t$folderPath = $JPConfiguration->TempDirectory;\r\n\t\t$file1 = $folderPath.'/joostina.sql';\r\n\t\t$file2 = $folderPath.'/sample_data.sql';\r\n\r\n\t\t$this->_unlinkRecursive($file1);\r\n\t\t$this->_unlinkRecursive($file2);\r\n\r\n\t\t// Clean database\r\n\t\t// ---------------------------------------------------------------------\r\n\t\t$sql = 'SELECT `key` FROM #__jp_packvars';\r\n\t\t$database->setQuery($sql);\r\n\t\t$keys = $database->loadResultArray();\r\n\r\n\t\tforeach($keys as $key) {\r\n\t\t\tif(!in_array($key,$keepInDB)) {\r\n\t\t\t\t$JPConfiguration->DeleteDebugVar($key);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tunset($keys);\r\n\t}", "title": "" }, { "docid": "5f56dd3154e69c4c81d72b4ce9be5a55", "score": "0.7307782", "text": "public function tearDown() {\n $this->calculadora = null;\n }", "title": "" }, { "docid": "b2680488ffa17e06791c2a262cbeccfc", "score": "0.73047906", "text": "public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }", "title": "" }, { "docid": "6672f6425998d09904dfb22741029bb1", "score": "0.72981477", "text": "protected function tearDown() {\n\t\t$this->assertNoLogEntries();\n\n\t\t$this->expectedLogEntries = 0;\n\n\t\t$GLOBALS['TCA'] = $this->originalTca;\n\t\tunset($this->originalTca);\n\n\t\t$GLOBALS['TYPO3_CONF_VARS'] = $this->originalConvVars;\n\t\tunset($this->originalConvVars);\n\n\t\t$GLOBALS['BE_USER'] = $this->originalBackendUser;\n\t\tunset($this->originalBackendUser);\n\t\tunset($this->backendUser);\n\n\t\tunset($GLOBALS['T3_VAR']['getUserObj']);\n\n\t\tt3lib_div::purgeInstances();\n\t\t$this->dropDatabase();\n\t}", "title": "" }, { "docid": "ae697c2497e93b549eb825e6d7de46fe", "score": "0.7294778", "text": "public function tearDown(): void\n {\n parent::tearDown();\n foreach ($this->files as $file) {\n @unlink($file);\n }\n @rmdir(self::TEST_NESTED_DIR_TMP);\n @rmdir(self::TEST_TEST_DIR_TMP);\n }", "title": "" }, { "docid": "618db687011acd336446dd567c04ba5c", "score": "0.7292882", "text": "protected function tearDown(): void\n\t{\n\t\t// remove useless data.\n\t\t// leave database in initial state!\n\t}", "title": "" }, { "docid": "f9af805ed8bbd51b7087a4a56ba2a329", "score": "0.72792333", "text": "protected function tearDown(): void\n {\n static::cleanEnvsAndConfigs();\n }", "title": "" }, { "docid": "8f7b20aad17ed039ae8705d2f5f317cc", "score": "0.727897", "text": "public function tearDown()\n {\n $this->factory = null;\n }", "title": "" }, { "docid": "7f71a81eddbcecfe2a3118251419fe3c", "score": "0.7268359", "text": "protected function tearDown()\n {\n unset($this->ubuntuData);\n unset($this->droplet);\n }", "title": "" }, { "docid": "c0d1855f7208d93b55f000be820ef110", "score": "0.7266316", "text": "public function tearDown()\r\n {\r\n\r\n // clear cache\r\n $this->setUpFiles();\r\n }", "title": "" }, { "docid": "eb478a727049559187aa8197e32bde9e", "score": "0.7242298", "text": "protected function tearDown()\n {\n unset($this->rmvApiMock);\n unset($this->infoParserMock);\n }", "title": "" }, { "docid": "7a3320701ca806446b34eb27e6fb3afe", "score": "0.7241122", "text": "protected function tearDown()\r\n {\r\n unset($this->css);\r\n }", "title": "" }, { "docid": "d3080d4f2ee965b5978e2a526643e0d5", "score": "0.72345066", "text": "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->kernelBrowser);\n foreach ($this->testFiles as $path) {\n $this->fileSystem->remove($path);\n }\n unset($this->fs);\n unset($this->fileSystem);\n }", "title": "" }, { "docid": "0667a9447b96c72cd2d68ddffcc17474", "score": "0.72335684", "text": "public function tearDown()\n {\n unset($this->unit);\n }", "title": "" }, { "docid": "b7ec876bee82ced38f013d805630ac1d", "score": "0.72058344", "text": "protected function tearDown()\n\t{\n\t Output::clear(); \n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "e17d09b14526f9858e55765671ca1b0b", "score": "0.7199413", "text": "protected function tearDown(): void\n {\n $this->cleanUp();\n parent::tearDown();\n }", "title": "" }, { "docid": "d4ef7a3dca94d86c2fca35cebccb7b38", "score": "0.7195907", "text": "public function cleanUp()\n {\n $this->listenerTimes = null;\n $this->content = null;\n $this->tokens = null;\n $this->metricTokens = null;\n $this->tokenizer = null;\n $this->fixer = null;\n $this->config = null;\n $this->ruleset = null;\n\n }", "title": "" }, { "docid": "13000fb9668ae5e6a688b4759866de46", "score": "0.7182063", "text": "protected function tearDown()\n {\n // deleting articles+variants\n if ($this->oArticle) {\n $this->oArticle->delete();\n $this->oArticle = null;\n }\n\n // deleting category\n if ($this->oCategory) {\n $this->oCategory->delete();\n $this->oCategory = null;\n }\n\n // deleting selection lists\n if ($this->oSelList) {\n $this->oSelList->delete();\n $this->oSelList = null;\n }\n\n // deleting delivery address info\n if ($this->oDelAdress) {\n $this->oDelAdress->delete();\n $this->oDelAdress = null;\n }\n\n // deleting demo wrapping\n if ($this->oCard) {\n $this->oCard->delete();\n $this->oCard = null;\n }\n\n if ($this->oWrap) {\n $this->oWrap->delete();\n $this->oWrap = null;\n }\n\n // deleting vouchers\n if ($this->aVouchers) {\n foreach ($this->aVouchers as $oVoucher) {\n $oVoucher->delete();\n }\n $this->aVouchers = null;\n }\n\n if ($this->oVoucherSerie) {\n $this->oVoucherSerie->delete();\n $this->oVoucherSerie = null;\n }\n\n // deleting discounts\n if ($this->aDiscounts) {\n foreach ($this->aDiscounts as $oDiscount) {\n $oDiscount->delete();\n }\n $this->aDiscounts = null;\n }\n\n $this->oVariant = null;\n\n\n oxDb::getDb()->execute('delete from oxuserbaskets');\n oxDb::getDb()->execute('delete from oxuserbasketitems');\n\n $sName = $this->getName();\n if ($sName == 'testBasketCalculationWithSpecUseCaseDescribedAbove' ||\n $sName == 'testBasketCalculationWithSpecUseCaseDescribedAboveJustDiscountIsAppliedByPrice' ||\n $sName == 'testUpdateBasketTwoProductsWithSameSelectionList'\n ) {\n $this->_cleanupDataAfterTestBasketCalculationWithSpecUseCaseDescribedAbove();\n }\n\n $this->cleanUpTable('oxdiscount');\n $this->cleanUpTable('oxartextends');\n $this->cleanUpTable('oxseo', 'oxobjectid');\n $this->cleanUpTable('oxprice2article');\n $this->cleanUpTable('oxobject2discount');\n\n $this->addTableForCleanup('oxarticles');\n $this->addTableForCleanup('oxseo');\n $this->addTableForCleanup('oxobject2selectlist');\n $this->addTableForCleanup('oxselectlist');\n\n $this->addTableForCleanup('oxselectlist2shop');\n $this->addTableForCleanup('oxarticles2shop');\n $this->addTableForCleanup('oxdiscount2shop');\n\n oxArticleHelper::cleanup();\n $this->getConfig()->setConfigParam('bl_perfLoadSelectLists', $this->blPerfLoadSelectLists);\n parent::tearDown();\n }", "title": "" }, { "docid": "36552fd0448d61c04df63f3154859942", "score": "0.7181089", "text": "protected function tearDown()\n {\n $oActShop = $this->getConfig()->getActiveShop();\n $oActShop->setLanguage(0);\n oxRegistry::getLang()->setBaseLanguage(0);\n $this->cleanUpTable('oxuser');\n $this->cleanUpTable('oxorderarticles');\n $this->cleanUpTable('oxarticles');\n\n $this->cleanUpTable('oxremark', 'oxparentid');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "28d879697a897d441bc644f225a4cb7a", "score": "0.7179665", "text": "public function tearDown()\n {\n unset($this->helper, $this->view);\n }", "title": "" }, { "docid": "d3313b584b67d5830961af945f6a6381", "score": "0.71743244", "text": "protected function tearDown()\n {\n \tunset($this->object);\n }", "title": "" }, { "docid": "d3313b584b67d5830961af945f6a6381", "score": "0.71743244", "text": "protected function tearDown()\n {\n \tunset($this->object);\n }", "title": "" }, { "docid": "21bfdf435ac8dbdd3af261d25b370fb6", "score": "0.717396", "text": "public function tearDown()\n {\n // call p4 library shutdown functions\n if (class_exists('P4\\Environment\\Environment', false)) {\n P4\\Environment\\Environment::runShutdownCallbacks();\n }\n\n // disconnect the p4 connection, if exists\n if (isset($this->p4)) {\n $this->p4->disconnect();\n }\n\n // clear default connection\n if (class_exists('P4\\Connection\\Connection', false)) {\n Connection::clearDefaultConnection();\n }\n\n // clear out shutdown callbacks\n if (class_exists('P4\\Environment\\Environment', false)) {\n P4\\Environment\\Environment::setShutdownCallbacks(null);\n }\n\n // forces collection of any existing garbage cycles\n // so no open file handles prevent files/directories\n // from being removed.\n gc_collect_cycles();\n\n // remove testing directory\n $this->removeDirectory(DATA_PATH);\n\n parent::tearDown();\n\n // if phpunit wants to use a bunch of memory after a test runs (e.g. for code coverage) so be it\n ini_set('memory_limit', -1);\n }", "title": "" }, { "docid": "2152bbf453c5bde27398dfd96a014ea1", "score": "0.71629137", "text": "public function tearDown() {\n\n $allFiles = array_merge($this->sourceFiles, $this->destFiles, $this->sharedFiles);\n\n foreach($allFiles as $filename) {\n foreach($this->folders as $folderPath) {\n $filePath = \"{$folderPath}/{$filename}\";\n\n if(file_exists($filePath)) unlink($filePath);\n }\n }\n\n /*\n * Remove the folders\n */\n\n foreach($this->folders as $folderPath) {\n rmdir($folderPath);\n }\n }", "title": "" }, { "docid": "bdf16eabefd01886e028e7b3abf7c617", "score": "0.71584874", "text": "public function tearDown() {\n unset($this->Vehicle);\n unset($this->VehiclePart);\n\t\tunset($this->Mongo);\n\t\tunset($this->mongodb);\n parent::tearDown();\n\t}", "title": "" }, { "docid": "6bfe7704bd2bdc04025d6386ce6207e3", "score": "0.7157075", "text": "private function cleanup()\n {\n if ($this->cleanup) {\n ($this->cleanup)();\n }\n\n $this->cleanup = null;\n }", "title": "" }, { "docid": "6bfe7704bd2bdc04025d6386ce6207e3", "score": "0.7157075", "text": "private function cleanup()\n {\n if ($this->cleanup) {\n ($this->cleanup)();\n }\n\n $this->cleanup = null;\n }", "title": "" }, { "docid": "7323d2a08baf9536b41a78b0c644a4b9", "score": "0.7149418", "text": "protected function tearDown()\n {\n $this->filesystem->remove($this->baseDir);\n\n $this->filesystem = null;\n $this->cache = null;\n }", "title": "" }, { "docid": "500a1ad9c99fbf7f8186882d52b9b827", "score": "0.71426636", "text": "protected function teardown()\n\t{\n\t\t$allposts = Posts::get(array('nolimit' => 1));\n\t\t$allposts->delete();\n\t}", "title": "" }, { "docid": "94820c4eb489b6fb74b76691f1ad73a7", "score": "0.7140071", "text": "public function tearDown()\n {\n parent::tearDown();\n\n foreach (glob($this->getPath('*')) as $file) {\n //@codingStandardsIgnoreLine\n unlink($file);\n }\n }", "title": "" }, { "docid": "cfb0a464347e1739bbcfe6add2fda7eb", "score": "0.71350807", "text": "public function tearDown() {\n\t\tunset($this->Article);\n\t\tunset($this->User);\n\t\tunset($this->Tag);\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "0e4c22a87632a170f70e419dc0ec9a52", "score": "0.71331936", "text": "protected function tearDown()\n {\n unset($this->extConf, $this->subject, $GLOBALS['TSFE'], $_SESSION);\n parent::tearDown();\n }", "title": "" }, { "docid": "cebb97dcbcdaafda1a82e7494513dee2", "score": "0.71277136", "text": "protected function tearDown() {\r\n\t\tunset ( $this->contentProcessorDefinition );\r\n\t}", "title": "" }, { "docid": "6cbf72cb409155bbb2d49bfc690cb10c", "score": "0.7123712", "text": "protected function tearDown(): void\n {\n $this->cleanUpTable('oxlinks');\n $this->cleanUpTable('oxorder');\n $this->cleanUpTable('oxcontents');\n $this->cleanUpTable('oxobject2category');\n\n if (isset($_POST['oxid'])) {\n unset($_POST['oxid']);\n }\n\n $this->getConfig()->setGlobalParameter('ListCoreTable', null);\n\n parent::tearDown();\n }", "title": "" }, { "docid": "a0f0182570baf0dcdbe158728c976228", "score": "0.712308", "text": "public static function tearDownAfterClass():void {\n\n Env::reset();\n\n }", "title": "" }, { "docid": "28328d21c17fd8b4ac16f0675c5556aa", "score": "0.7121731", "text": "public function testCleanup()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "2d918169898a497ce8a97d3ffee9fa58", "score": "0.71176285", "text": "protected function tearDown()\n {\n system(\"rm -rf \".escapeshellarg('logs'));;\n }", "title": "" }, { "docid": "5a61c5796459be2bbf5bb61a5ff9946e", "score": "0.71131194", "text": "public function tearDown()\n\t{\n\t\t$this->req = null;\n\t\t$this->res = null;\n\t}", "title": "" }, { "docid": "2321639c7b4cb2db3e74533259016dea", "score": "0.7107902", "text": "function endTest()\n {\n unset($this->SlugArticle);\n\n ClassRegistry::flush();\n }", "title": "" }, { "docid": "8d1ea84cbc2b80427e30fd0abb7584c3", "score": "0.70992726", "text": "public function tearDown() {\n unset($this->Calculator);\n }", "title": "" }, { "docid": "9cba007c99caa1693cd5eac5dde6a0de", "score": "0.70951366", "text": "public function tearDown() {\n $this->event = null;\n $this->request = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->manager = null;\n $this->event = null;\n }", "title": "" }, { "docid": "4880310818472c9973a828538bc34a86", "score": "0.709393", "text": "public static function tearDownAfterClass(): void\n {\n self::$url = null;\n self::$content = null;\n }", "title": "" }, { "docid": "2989c5935d3a340a7d7ead09460d18df", "score": "0.7092757", "text": "public function tearDown()\n {\n self::_removeTempFiles();\n }", "title": "" }, { "docid": "14566fb6f30bee7c002bab41146503b3", "score": "0.708912", "text": "private function _resetTests() {\n $this->_test = null;\n $this->_result = null;\n $this->_testsData = [];\n //--array structure--//\n $this->_testsData[0] = [\"status\" => null, \"test\" => null, \"result\" => null];\n }", "title": "" }, { "docid": "9442dde313db57f050e6ce84bdfa2887", "score": "0.70835465", "text": "protected function tearDown()\n {\t\n foreach ($this->_toDelete['phone'] as $phone) {\n $phoneTemplate = $this->_json->getSnomTemplate($phone['template_id']['value']);\n $this->_json->deleteSnomPhones(array($phone['id']));\n $this->_json->deleteSnomLocations(array($phone['location_id']['value']));\n $this->_json->deleteSnomSettings(array($phoneTemplate['setting_id']['value']));\n $this->_json->deleteSnomTemplates(array($phone['template_id']['value']));\n $this->_json->deleteSnomSoftwares(array($phoneTemplate['software_id']['value']));\n }\n \n foreach ($this->_toDelete['sippeer'] as $sippeer) {\n $this->_json->deleteAsteriskSipPeers(array($sippeer['id']));\n }\n\n // delete all contexts\n $search = $this->_json->searchAsteriskContexts('', '');\n foreach ($search['results'] as $result) {\n try {\n $this->_json->deleteAsteriskContexts($result['id']);\n } catch (Zend_Db_Statement_Exception $zdse) {\n // integrity constraint\n }\n }\n }", "title": "" }, { "docid": "0bea69aa42fac7fd703a069ed89e1273", "score": "0.7078398", "text": "public static function tearDownAfterClass() {\r\n // remove all records\r\n //self::$instance->deleteAll();\r\n }", "title": "" }, { "docid": "1f2d22588ba738db5586737a476e45a2", "score": "0.707661", "text": "protected function tearDown() {\n\t\t$this->object = NULL;\n\t}", "title": "" }, { "docid": "a76160b62e83abbfd26ab1bfc70d6683", "score": "0.70758224", "text": "public function tearDown()\n {\n// $filesystem->cleanDirectory(static::$jsDir);\n// $filesystem->cleanDirectory(static::$cssDir);\n }", "title": "" } ]
e4858e3c1238b2446c76d8b3c8a1477c
Set the iban id client2.
[ { "docid": "68b070b188861323b4e623d092ff2925", "score": "0.6560029", "text": "public function setIbanIdClient2(?string $ibanIdClient2): Etablissements2 {\n $this->ibanIdClient2 = $ibanIdClient2;\n return $this;\n }", "title": "" } ]
[ { "docid": "a8a72919bbc56048ffe42e1f208f75f8", "score": "0.7156237", "text": "public function getIbanIdClient2(): ?string {\n return $this->ibanIdClient2;\n }", "title": "" }, { "docid": "acb7413f7aa877982ff48523d9ee3439", "score": "0.67893136", "text": "public function setclient_id($value);", "title": "" }, { "docid": "b65abe8b91826dc242a01aef28919f9f", "score": "0.6224447", "text": "public function setId_client($id_client)\n {\n $this->id_client = $id_client;\n \n return $this;\n }", "title": "" }, { "docid": "23e7b800388a696476e03fde941dcc26", "score": "0.62036777", "text": "public function setClientId($id) {\n $this->clientid = $id;\n }", "title": "" }, { "docid": "5f89fcd0637dbf3eccaed6fdfbd82f89", "score": "0.5959905", "text": "abstract protected function setClient();", "title": "" }, { "docid": "13dd3921e1403bb4ff14443d6376e4f1", "score": "0.57632655", "text": "public function getIbanIdClient3(): ?string {\n return $this->ibanIdClient3;\n }", "title": "" }, { "docid": "3233c0ed44cbfad1984158ba4141fe1e", "score": "0.56931704", "text": "public function setClientId($value)\n {\n if (!empty($value)) {\n $this->config['client_id'] = $value;\n } else {\n throw new \\Exception('setter value for client ID provided is empty');\n }\n }", "title": "" }, { "docid": "6865e5f5e0e08ffa391ca7c31c1325e0", "score": "0.56233287", "text": "public function setClientId($client_id)\n\t{\n\t\t$this->_clientId = $client_id;\n\t\t$this->setAttributeToRender('id', $client_id);\n\t}", "title": "" }, { "docid": "0342ba0da2a5238a6487ffbd4b9fc878", "score": "0.5590372", "text": "public function setYahooClientId($clientId) {\n $this->clientIds['yahoo'] = $clientId;\n }", "title": "" }, { "docid": "528fb09e9f1f771c788c6dd77b7a598c", "score": "0.5589491", "text": "public function setClient(Client &$client);", "title": "" }, { "docid": "18965ac55eb4431b368924a793cf0767", "score": "0.55283076", "text": "function oci_set_client_identifier ($connection, $client_identifier) {}", "title": "" }, { "docid": "be8817f34fe26da1ce3cb242bbb7736a", "score": "0.5519388", "text": "public function getId_client($id_client=null)\n {\n if ($id_client != null && is_array($this->client) && count($this->client)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE id_client = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$id_client]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_client($d['id_client']);\n$this->setNom($d['nom']);\n$this->setPrenom($d['prenom']);\n$this->setTel($d['tel']);\n$this->setEmail($d['email']);\n$this->setFonction($d['fonction']);\n$this->setNationalite($d['nationalite']);\n$this->setIs_account($d['is_account']);\n$this->client =$data; \n return $this;\n }\n \n } else {\n return $this->id_client;\n }\n \n }", "title": "" }, { "docid": "482c573b697272b9423a0726dda59504", "score": "0.54431653", "text": "public function setTwitterConsumerKey($clientId) {\n $this->clientIds['twitter'] = $clientId;\n }", "title": "" }, { "docid": "249f70b34bbd4e3a3a51487b855478ea", "score": "0.54115653", "text": "public function setIdClients($_idClients)\r\n {\r\n $this->_idClients = $_idClients;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "6197cc8c23f82c3c7a6894dc450a1ee3", "score": "0.5378388", "text": "public function setIbanIdClient3(?string $ibanIdClient3): Etablissements2 {\n $this->ibanIdClient3 = $ibanIdClient3;\n return $this;\n }", "title": "" }, { "docid": "0c92f9e310a09ac2f50cf180c8b6d589", "score": "0.53205645", "text": "function setClientSite(){\n\t//POST client ID dan Site ID\n}", "title": "" }, { "docid": "9f1f899d174520da8b61e33dd8a47cf4", "score": "0.53071964", "text": "public function setClientObjectId(?string $clientObjectId): void\n {\n $this->clientObjectId['value'] = $clientObjectId;\n }", "title": "" }, { "docid": "e3c28707a98ca31593b80d8c7c19645b", "score": "0.5289257", "text": "public function setClientId($client)\r\n {\r\n $this->client_id = $client;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "a2e965aae98b7c813be2e1f7a0cd6c11", "score": "0.52883357", "text": "public static function setClientId($clientId)\n {\n self::$clientId = $clientId;\n }", "title": "" }, { "docid": "7b5cfb695f8acaa670bbc5f1263b7d88", "score": "0.5279911", "text": "public function setClientId ($client_id)\n {\n $this->_client_id = (string) $client_id;\n return $this;\n }", "title": "" }, { "docid": "b5d4855eacaf2575b5b6072c24ec3fa5", "score": "0.5252292", "text": "public function setId($id)\n\t{\n\t\tif(!$this->_id) $this->_id = $id;\n\t\t$this->setClientId($id);\n\t}", "title": "" }, { "docid": "84b88f4a59ff8dbb8adc4699b2764385", "score": "0.5229807", "text": "public function setLiveClientId($clientId) {\n $this->clientIds['live'] = $clientId;\n }", "title": "" }, { "docid": "016fab0ea32daff766d8c7097cdeb90d", "score": "0.52031416", "text": "public function id2($id)\n {\n $this->id2 = $id;\n\n return $this;\n }", "title": "" }, { "docid": "edad09b998ce05a7ca263ee083002b6c", "score": "0.5202964", "text": "public function setClientId($clientId)\n {\n $this->clientId = $clientId;\n }", "title": "" }, { "docid": "38e35a21581481a7cbb23cc2a4b03632", "score": "0.51852244", "text": "public function setClientId($id = '')\n {\n\n if ($id == '')\n {\n throw new InvalidArgumentException('Invalid client ID');\n }\n\n $this->_client_id = $id;\n\n return $this;\n\n }", "title": "" }, { "docid": "4be9de845b08a603866d8dd842a201f3", "score": "0.51820666", "text": "public function obtenerSelectClientes2()\n\t{\n\t\t// Obtenemos todos los clientes\n\t\t$clientes = $this->obtenerTodosClientes();\n\t\t\n\t\t// Creamos un array con los clientes para el select del formulario\n\t\t$ar_clientes[0] = \"-------\";\n\t\t\n\t\tforeach($clientes as $cliente)\n\t\t{\n\t\t\t$cliente_nombre = $cliente->getNombre();\n\t\t\t$i = $cliente->getIdCliente();\n\t\t\t$ar_clientes[$i] = $cliente_nombre;\n\t\t}\n\t\t\n\t\t// Array con el nombre de los clientes y llave el id\n\t\treturn $ar_clientes;\n\t}", "title": "" }, { "docid": "b693c9dfe54b255a96933c21c464ff0d", "score": "0.5180723", "text": "public function setClientIdAttribute($input)\n {\n $this->attributes['client_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "c3ef3c213354a33dc363d483800ffdc9", "score": "0.51778954", "text": "public function setLinkedInClientId($clientId) {\n $this->clientIds['linked_in'] = $clientId;\n }", "title": "" }, { "docid": "44fb88542fe8f79972bf900644ed1615", "score": "0.5152131", "text": "public function setClient($client)\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "d6542c35a7d74e83faccd2f6c9b90657", "score": "0.51441455", "text": "public function setClientId($client_id) {\n $this->options['client_id'] = $client_id;\n return $this;\n }", "title": "" }, { "docid": "6c8f5e5ce88bd8900404a69955361807", "score": "0.513194", "text": "public function setCustomID2($customID2) {\n $this->customID2 = $customID2;\n }", "title": "" }, { "docid": "04d7f09c1933947016e798ecc485c6cd", "score": "0.5119575", "text": "public function setYandexClientId($clientId) {\n $this->clientIds['yandex'] = $clientId;\n }", "title": "" }, { "docid": "1c1dcd7f61411623d2f88c9273cb7ca2", "score": "0.51008373", "text": "public function setClient(ClientInterface $client);", "title": "" }, { "docid": "bdcf7305be4838cf694d265674120d1f", "score": "0.5063874", "text": "public function setClient(ClientEntityInterface $client)\n {\n $this->clientSetter($client);\n $this->type = Oauth2AccessToken::TYPE_BEARER; // Fixed for now.\n }", "title": "" }, { "docid": "095ede93d42b2eac894f0ac99b2d7273", "score": "0.5037281", "text": "public function __construct(Client $client1){\n $this->client = $client1;\n\n }", "title": "" }, { "docid": "965d84d0062974cc00aff5cfcdf5ef10", "score": "0.503579", "text": "public function setAppid($appid)\n{\n$this->appid = $appid;\n}", "title": "" }, { "docid": "1b3142574319995f481d358645f37765", "score": "0.5023557", "text": "public function setClient(BaseClient $client): void;", "title": "" }, { "docid": "24c5b20816ebcfcd54e95a3105cfd4f2", "score": "0.49916038", "text": "public function init()\n {\n\n $this->clientId = 'AQpHxAqOLeouvXl-uwkESRcuqGuNlZCpQbbw8c9vrk-ryeFA9VLYCWuCDgduHkgnwBM1IgS4yZnOyIQ7';\n $this->clientSecret = 'EMBxvqpcupjFjFX_VSZOBuBsNhJBG6-nmlBhOhfNE0VqhMScW0TnrxYvLX50oJWD1s8doYERfdbLKzsB';\n\n }", "title": "" }, { "docid": "60254dce99ead3ac8ed2ee2eacb1b2ac", "score": "0.49901965", "text": "public function setClientID(string $client_id = null): self\n {\n $this->options['clientID'] = $client_id;\n return $this;\n }", "title": "" }, { "docid": "a675081f8bf7d38800b122ee70229b0e", "score": "0.49901944", "text": "public function set_client_and_license( $_post_id, $_client_id ) {\n\t\tif ( empty( $_client_id ) ) {\n\t\t\treturn;\n\t\t}\n\t\tadd_post_meta( $_post_id, 'pn_market', $_client_id, true );\n\n\t\t$_licenses = Ajax::get_license_options( $_client_id );\n\t\tif ( ! empty( $_licenses ) && isset( $_licenses[0] ) && isset( $_licenses[0]['value'] ) ) {\n\t\t\tadd_post_meta( $_post_id, 'pn_wcm_license', $_licenses[0]['value'], true );\n\t\t}\n\t}", "title": "" }, { "docid": "b8de56a5503c1b8e6b462a616b2fb5dc", "score": "0.49844", "text": "public function setClient(ClientInterface $client): void\n {\n $this->client = $client;\n }", "title": "" }, { "docid": "071929f980dbc429ebceb06ad97c414c", "score": "0.49801958", "text": "function ILIAS($a_client_id = 0)\n\t{\n\t\tglobal $ilErr, $ilDB, $ilIliasIniFile, $ilClientIniFile, $ilAuth;\n\n\t\t$this->ini_ilias =& $ilIliasIniFile;\n\t\t$this->client_id = CLIENT_ID;\n\t\t$this->ini =& $ilClientIniFile;\n\t\t$this->db =& $ilDB;\n\t\t$this->error_obj =& $ilErr;\n\t\t$this->auth =& $ilAuth;\n\n\t\t// create instance of object factory\n\t\tinclude_once(\"./Services/Object/classes/class.ilObjectFactory.php\");\n\t\t$this->obj_factory =& new ilObjectFactory();\n\t}", "title": "" }, { "docid": "989727607d79eddd283b49a757d2b1f1", "score": "0.49765334", "text": "public function &setIDCLIENTE($idcliente) {\n $this->IDCLIENTE = $idcliente;\n return $this;\n }", "title": "" }, { "docid": "83d92cd6edc29de716f9a7d51e3ebd0e", "score": "0.49763572", "text": "public function setIdUsuario($idUsu)\n\t{\n\t\t$this->mId_Cliente=$idUsu;\n\t}", "title": "" }, { "docid": "9560132d043074c2954598c1da091db8", "score": "0.4973803", "text": "public function setClientId($client_id)\n {\n $this->client_id = $client_id;\n return $this;\n }", "title": "" }, { "docid": "158a2a959618c01711676896ba733225", "score": "0.49656302", "text": "function setidusuario($val) {$this->idusuario=$val;}", "title": "" }, { "docid": "da96a569b3c3a8681abaa0df3588d3ee", "score": "0.49579906", "text": "public function setGoogleClientId($clientId) {\n $this->clientIds['google'] = $clientId;\n }", "title": "" }, { "docid": "c3b82e88878149f51f6c6852d40eb9b9", "score": "0.49498543", "text": "public function set_cliente(Cliente $object)\n {\n $this->cliente = $object;\n $this->cliente_id = $object->id;\n }", "title": "" }, { "docid": "eda8749a173afa6722195d9e0f91a054", "score": "0.49383813", "text": "public function getIdCliente(){\n\t\t\treturn $this->idCliente;\n\t\t}", "title": "" }, { "docid": "5d8b68f371bf2dddf7587cbfda22531f", "score": "0.49359477", "text": "public function getIdAlliance2()\n {\n return $this->idAlliance2;\n }", "title": "" }, { "docid": "eb777cdc646e8c8e33eb7c942bbf0832", "score": "0.4934645", "text": "public function getClient_id()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "5fcb90490097f5bc465b5811ab4682d9", "score": "0.49345037", "text": "function setIntegerField2($value) {\n return $this->setFieldValue('integer_field_2', $value);\n }", "title": "" }, { "docid": "25550317dd87c7040102f42f745178ab", "score": "0.49313894", "text": "public function setClientId($client_id)\n {\n $this->vkarg_client_id = $client_id;\n\n return $this;\n }", "title": "" }, { "docid": "94c18be5cf1fe6d49acc186bf336760b", "score": "0.49278718", "text": "public static function setClientId($clientId)\n {\n self::$authToken = null;\n self::$clientId = $clientId;\n }", "title": "" }, { "docid": "eeef584256578c8febd02d3e040a58b0", "score": "0.49161682", "text": "public function getClientId()\r\n {\r\n return $this->client_id;\r\n }", "title": "" }, { "docid": "0d8eea4a713f344f421a12e25a098428", "score": "0.49138722", "text": "public function oAuth2Client()\n {\n return $this->belongsTo(OAuth2Client::class, 'oauth2_client_id');\n }", "title": "" }, { "docid": "c2f1dc30b6dd5ee7868b7726852fc002", "score": "0.49072075", "text": "public function setGitHubClientId($clientId) {\n $this->clientIds['git_hub'] = $clientId;\n }", "title": "" }, { "docid": "8a7f6e80cf2a073d5e5e469a321d8c0a", "score": "0.48997155", "text": "function SetId($value) { $this->id=$value; }", "title": "" }, { "docid": "80fe2fd17e33c4953ea51bcf2195678e", "score": "0.48965794", "text": "public function getClientId ()\n {\n return $this->_client_id;\n }", "title": "" }, { "docid": "ca535faf16f8816779b7ce542ede528d", "score": "0.489286", "text": "public function setClient($client)\n {\n if ($client->getUser() !== null) {\n $fixedClientData = array(\n 'userId' => $client->getUser()->getUserId(),\n 'householdId' => $client->getHouseholdId(),\n 'maritalStatus' => $client->getMaritalStatus(),\n 'createdDate' => $client->getCreatedDate(),\n );\n\n if ($client->isMarried()) {\n $fixedClientData['spouseId'] = $client->getSpouse()->getId();\n }\n } else {\n $fixedClientData = null;\n }\n\n $safeSerializedFixedClientData = $this->_safeSerializeService->serialize($fixedClientData);\n\n $this->fixedClientData->setValue($safeSerializedFixedClientData['serial']);\n $this->fixedClientDataHash->setValue($safeSerializedFixedClientData['hash']);\n\n // Populate user-visible client fields.\n if ($this->_id !== null) {\n $this->clientId->setValue($this->_id);\n $this->userName->setValue($client->getUser()->getFullName());\n $this->createdDate->setValue(App_Formatting::formatDate($client->getCreatedDate()));\n }\n\n $this->firstName->setValue($client->getFirstName());\n $this->lastName->setValue($client->getLastName());\n $this->otherName->setValue($client->getOtherName());\n $this->maritalStatus->setValue($client->getMaritalStatus());\n $this->birthDate->setValue(App_Formatting::formatDate($client->getBirthDate()));\n $this->ssn4->setValue($client->getSsn4());\n $this->doNotHelp->setChecked($client->isDoNotHelp());\n $this->doNotHelpReason->setValue($client->getDoNotHelpReason());\n $this->veteran->setChecked($client->isVeteran());\n $this->parish->setValue($client->getParish());\n $this->homePhone->setValue($client->getFormattedHomePhone());\n $this->cellPhone->setValue($client->getFormattedCellPhone());\n $this->workPhone->setValue($client->getFormattedWorkPhone());\n\n if ($client->getCurrentAddr() !== null) {\n $this->addr->setAddr($client->getCurrentAddr());\n }\n\n if ($client->isMarried()) {\n $spouse = $client->getSpouse();\n $this->spouseName->setValue($spouse->getFirstName());\n $this->spouseBirthDate->setValue(App_Formatting::formatDate($spouse->getBirthDate()));\n $this->spouseSsn4->setValue($spouse->getSsn4());\n }\n }", "title": "" }, { "docid": "6a6034621b769ef5b859824523938c00", "score": "0.48921677", "text": "protected function setId() \n {\n // user id (0 if user not logged)\n $this->id = $this->sdk->getUser();\n }", "title": "" }, { "docid": "32921bd8812673ed7f82e6e8ec4ded62", "score": "0.48726535", "text": "public function setID($id){\n $this->_id = $id;\n }", "title": "" }, { "docid": "d6347015563293f7bf488e0c1917ced9", "score": "0.4868981", "text": "public function __construct(Client $client, int $id)\n {\n parent::__construct($client);\n\n $this->id = $id;\n }", "title": "" }, { "docid": "1fa82a1611e21d263a2743494fb1ab63", "score": "0.4864813", "text": "function set_CID($ID) {\n $this->ID = $ID;\n }", "title": "" }, { "docid": "c431598a261b80daec9491e6f78af692", "score": "0.48639116", "text": "protected function setClient(): void\n {\n $this->client = new Authentication([\n 'domain' => 'api.test.local',\n 'clientId' => '__test_client_id__',\n 'redirectUri' => uniqid(),\n ]);\n }", "title": "" }, { "docid": "f8787429dadbcf1a9cefc6b3ce8dce05", "score": "0.48608693", "text": "function oci_set_client_info ($connection, $client_info) {}", "title": "" }, { "docid": "5ad735ce2142acf78104143085cc95e4", "score": "0.48570216", "text": "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "title": "" }, { "docid": "5ad735ce2142acf78104143085cc95e4", "score": "0.48570216", "text": "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "title": "" }, { "docid": "709366f3ef22a0219e1489e43f6b9134", "score": "0.4849145", "text": "public function setIdentifier(\\ClientIdentifier $value=null)\n {\n return $this->set(self::IDENTIFIER, $value);\n }", "title": "" }, { "docid": "2aaeda129b035fe1aaea4791ac22a674", "score": "0.48450747", "text": "protected function init()\n {\n $this->client = new Client(\n $this->getOption('user_id'),\n $this->getOption('license_key'),\n $this->getOption('locales', ['en'])\n );\n }", "title": "" }, { "docid": "89a6375ea0b5caedf75f5342f50d5af4", "score": "0.48441368", "text": "public function set_cliente(Cliente $object)\n {\n $this->cliente = $object;\n $this->cliente_id = $object->id;\n }", "title": "" }, { "docid": "7ceaf0e86de5cfacd35efd0a0486cac0", "score": "0.4839895", "text": "public function setClientId($value): CheckoutGateway\n {\n return $this->setParameter('clientId', $value);\n }", "title": "" }, { "docid": "f5083dc360c171e45904d10840e92064", "score": "0.48307338", "text": "public function setAuth2( string $value ) : Asset\n {\n $this->getProperty()->auth2 = $value;\n return $this;\n }", "title": "" }, { "docid": "00ce3fca6aacd63434b916961eaac977", "score": "0.48287934", "text": "public function setClienteAction()\n\t{\n\t}", "title": "" }, { "docid": "9a89311a64839157c61030031e107cd9", "score": "0.48256743", "text": "public function setFoursquareClientId($clientId) {\n $this->clientIds['foursquare'] = $clientId;\n }", "title": "" }, { "docid": "78b5c691de479fd5812e911b4b27482a", "score": "0.48132086", "text": "public function setClientID($client_id) {\n $this->client_id = $client_id;\n\n $this->logger->setMessage('DEBUG', 'Client ID set to ' . $client_id);\n\n return $this;\n }", "title": "" }, { "docid": "b709898ea8dad2765b8aa67cf58be3c7", "score": "0.48090354", "text": "public function actionUpdate($id)\n {\n\t\ttry{\n\t\t\t//guest redirect\n\t\t\tif (Yii::$app->user->isGuest)\n\t\t\t{\n\t\t\t\treturn $this->redirect(['/login']);\n\t\t\t}\n\t\t\tself::requirePermission(\"clientUpdate\");\n\t\t\t$getUrl = 'client%2Fview&' . http_build_query([\n\t\t\t\t'id' => $id,\n\t\t\t]);\n\t\t\t$getResponse = json_decode(Parent::executeGetRequest($getUrl, Constants::API_VERSION_2), true);\n\n\t\t\t$model = new Client();\n\t\t\t$model->attributes = $getResponse;\n\t\t\t\t \n\t\t\t//generate array for Active Flag dropdown\n\t\t\t$flag = \n\t\t\t[\n\t\t\t\t1 => \"Active\",\n\t\t\t\t0 => \"Inactive\",\n\t\t\t];\n\t\t\t\n\t\t\t//get clients for form dropdown\n\t\t\t//Route is no longer in place may be re added in the future\n\t\t\t// $clientAccountsUrl = \"client-accounts%2Fget-client-account-dropdowns\";\n\t\t\t// $clientAccountsResponse = Parent::executeGetRequest($clientAccountsUrl);\n\t\t\t// $clientAccounts = json_decode($clientAccountsResponse, true);\n\t\t\t$clientAccounts = ['' => ''];\n\t\t\t\n\t\t\t//get states for form dropdown\n\t\t\t$stateUrl = 'dropdown%2Fget-state-codes-dropdown';\n\t\t\t$stateResponse = Parent::executeGetRequest($stateUrl, Constants::API_VERSION_2);\n\t\t\t$states = json_decode($stateResponse, true);\n\t\t\t\t \n\t\t\tif ($model->load(Yii::$app->request->post()))\n\t\t\t{\n\t\t\t\t$data =array(\n\t\t\t\t\t'ClientAccountID' => $model->ClientAccountID,\n\t\t\t\t\t'ClientName' => $model->ClientName,\n\t\t\t\t\t'ClientContactTitle' => $model->ClientContactTitle,\n\t\t\t\t\t'ClientContactFName' => $model->ClientContactFName,\n\t\t\t\t\t'ClientContactMI' => $model->ClientContactMI,\n\t\t\t\t\t'ClientContactLName' => $model->ClientContactLName,\n\t\t\t\t\t'ClientPhone' => $model->ClientPhone,\n\t\t\t\t\t'ClientEmail' => $model->ClientEmail,\n\t\t\t\t\t'ClientAddr1' => $model->ClientAddr1,\n\t\t\t\t\t'ClientAddr2' => $model->ClientAddr2,\n\t\t\t\t\t'ClientCity' => $model->ClientCity,\n\t\t\t\t\t'ClientState' => $model->ClientState,\n\t\t\t\t\t'ClientZip4' => $model->ClientZip4,\n\t\t\t\t\t'ClientTerritory' => $model->ClientTerritory,\n\t\t\t\t\t'ClientActiveFlag' => $model->ClientActiveFlag,\n\t\t\t\t\t'ClientDivisionsFlag' => $model->ClientDivisionsFlag,\n\t\t\t\t\t'ClientComment' => $model->ClientComment,\n\t\t\t\t\t'ClientCreateDate' => $model->ClientCreateDate,\n\t\t\t\t\t'ClientCreatorUserID' => $model->ClientCreatorUserID,\n\t\t\t\t\t'ClientModifiedDate' => $model->ClientModifiedDate,\n\t\t\t\t\t'ClientModifiedBy' => Yii::$app->session['userID'],\n\t\t\t\t\t);\n\n\t\t\t\t$json_data = json_encode($data);\n\t\t\t\t\n\t\t\t\t$putUrl = 'client%2Fupdate&' . http_build_query([\n\t\t\t\t\t'id' => $id,\n\t\t\t\t]);\n\t\t\t\t$putResponse = Parent::executePutRequest($putUrl, $json_data, Constants::API_VERSION_2);\n\t\t\t\t\n\t\t\t\t$obj = json_decode($putResponse, true);\n\t\t\t\t\n\t\t\t\treturn $this->redirect(['view', 'id' => $model[\"ClientID\"]]);\n\t\t\t} else {\n\t\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'flag' => $flag,\n\t\t\t\t\t'clientAccounts' => $clientAccounts,\n\t\t\t\t\t'states' => $states,\n\t\t\t\t]);\n\t\t\t}\n\t\t} catch (UnauthorizedHttpException $e){\n Yii::$app->response->redirect(['login/index']);\n } catch(ForbiddenHttpException $e) {\n throw $e;\n } catch(ErrorException $e) {\n throw new \\yii\\web\\HttpException(400);\n } catch(Exception $e) {\n throw new ServerErrorHttpException();\n }\n }", "title": "" }, { "docid": "a4fde6c372c173de4e468d427a92ce7e", "score": "0.48056138", "text": "function setID($id) {\r\n $this->id = $id;\r\n }", "title": "" }, { "docid": "2a3fecce8a207c8a76fd30e68aaa7e08", "score": "0.48025605", "text": "function test_setClient()\n { //Arrange\n $client = \"sarah\";\n $id = 1;\n $test_client = new Client($client, $id);\n\n //Act\n $test_client->setClient(\"rachel\");\n $result = $test_client->getClient();\n\n //Assert\n $this->assertEquals(\"rachel\", $result);\n\n }", "title": "" }, { "docid": "837138e5f69d8f1c164f97c8ab0957ee", "score": "0.48014095", "text": "public function getCarritoClienteId(){\n \treturn $this->carritoClienteId;\n\t}", "title": "" }, { "docid": "c1426d0dd7b7cfd2f41dac4906ef8a49", "score": "0.47955632", "text": "public function setClient(string $key, string $change=\"set\"){\n /*\n $which_key = \"FriendlyName\";\n $which_value = $ClientName;\n\n $key = $this->search_key($which_key, $which_value, $Client_Array);\n $this->SendDebug('Send','setze Client '.$ClientName , 0);\n $Client_Array[$key]['DeviceActiveIcon'] = \"image/button_ok_blue_80x80.png\";\n */\n if ($change == \"dec\"){\n $key = $this->GetValue(\"upnp_ClientKey\") - 1;\n } \n else if($change ==\"inc\"){\n $key = $this->GetValue(\"upnp_ClientKey\") + 1;\n }\n else{\n $key = $key;\n }\n $array = $this->GetValue(\"upnp_ClientArray\");\n $Client_Array = json_decode($array, JSON_OBJECT_AS_ARRAY);\n $ctClient = count($Client_Array);\n if($key > $ctClient){$key = $ctClient-1;}\n if($key < 0){$key = 0;}\n\n $ClientIP = $Client_Array[$key]['DeviceIP'];\n $ClientPort = $Client_Array[$key]['DevicePort'];\n $friendlyName = $Client_Array[$key]['FriendlyName'];\n $ClientControlServiceType = $Client_Array[$key]['DeviceControlServiceType'];\n $ClientControlURL = $Client_Array[$key]['DeviceControlURL'];\n $ClientRenderingServiceType = $Client_Array[$key]['DeviceRenderingServiceType'];\n $ClientRenderingControlURL = $Client_Array[$key]['DeviceRenderingControlURL'];\n $ClientIconURL = $Client_Array[$key]['IconURL'];\n $this->SetValue(\"upnp_ClienIP\", $ClientIP);\n $this->SetValue(\"upnp_ClientPort\", $ClientPort);\n $this->SetValue(\"upnp_ClientName\", $friendlyName);\n $this->setvalue(\"upnp_ClientKey\", $key);\n //SetValue(UPNP_Device_ControlServiceType, $DeviceControlServiceType);\n $this->SetValue(\"upnp_ClientControlURL\", $ClientControlURL);\n //SetValue(UPNP_Device_RenderingServiceType, $DeviceRenderingServiceType);\n $this->SetValue(\"upnp_ClientRenderingControlURL\", $ClientRenderingControlURL);\n $this->SetValue(\"upnp_ClientIcon\", $ClientIconURL);\n return $key;\n\t}", "title": "" }, { "docid": "cf8b2292bdf01631837142b45745d186", "score": "0.47942367", "text": "public function setConSelect2($bandera){\n\t $this->con_select2 = $bandera;\n\t}", "title": "" }, { "docid": "a47a93b53d03d3545c40bda17bfd1ea9", "score": "0.479403", "text": "public function testSetOidcDynamicClient()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "925f3972fb0924c6bf496784e344a548", "score": "0.4793474", "text": "public function setFacebookClientId($clientId) {\n $this->clientIds['facebook'] = $clientId;\n }", "title": "" }, { "docid": "673850cb77f47940255eeb80ab531828", "score": "0.4790453", "text": "public function useAPI2()\n {\n $this->apiVersion = 2;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.47875223", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "b1fadaeb018e8b6d69e69c98425b676e", "score": "0.47875223", "text": "public function getClientId()\n {\n return $this->client_id;\n }", "title": "" }, { "docid": "1e3d77c1caa7ddd99eed7e34d544bb6e", "score": "0.47750443", "text": "public function setID($id){\n\t\t$this->id = $id;\t\n\t}", "title": "" }, { "docid": "7cde7358e3e1762f7538c70384170e11", "score": "0.47582474", "text": "public function unsetClientObjectId(): void\n {\n $this->clientObjectId = [];\n }", "title": "" }, { "docid": "d63856aeb59b2c34b2c600cd3a45aadb", "score": "0.47576636", "text": "public function __construct(string $clientId)\n {\n $this->client_id = $clientId;\n }", "title": "" }, { "docid": "22bf7d8707c0dc5f5a835abecf524651", "score": "0.4755731", "text": "public function setBundleId(?string $value): void {\n $this->getBackingStore()->set('bundleId', $value);\n }", "title": "" }, { "docid": "6fe7f7e4dc9d9374f686d83eab805dad", "score": "0.47532168", "text": "public function switchApiClient(MollieApiClient $client)\n {\n $this->gwMollie->switchClient($client);\n }", "title": "" }, { "docid": "962d07300e21fd77882a71ebc13aac45", "score": "0.4752052", "text": "public function setclient($client)\n {\n $this->client = $client;\n return $this;\n }", "title": "" }, { "docid": "6dd27e0c34d21a38d408906f0d333a5d", "score": "0.4746227", "text": "public function setId($value){ $this->id = $value; }", "title": "" }, { "docid": "e0698a218734b94b82468036dc729076", "score": "0.4744416", "text": "public function setIdSobe($value){ $this->idSobe = $value; }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4736522", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4736522", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4736522", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "4d4c551183f7887b44a2144cbe59fe0a", "score": "0.4736522", "text": "public function getClientId()\n {\n return $this->clientId;\n }", "title": "" }, { "docid": "3edbd4021f9d4ea0d0d663f3f47354c3", "score": "0.47352606", "text": "public function getClientID(): string\n {\n return $this->options['clientID'];\n }", "title": "" } ]
a6bf20f4e828dc547dee7b889b0ff420
get created Category Type based on it's parent id.
[ { "docid": "2f3877ec72e118d6ab5ecd4231945a1a", "score": "0.63285995", "text": "public function types() {\n return $this->hasMany(\"Modules\\Admin\\Entities\\CategoryType\",\"parent_id\");\n }", "title": "" } ]
[ { "docid": "5c2c1fcb500be9ca29c6155f6f780988", "score": "0.68577486", "text": "public function getCategoryType();", "title": "" }, { "docid": "614b526d8dcb3ad819de2e7b0b0ae2ed", "score": "0.6515172", "text": "public function getParentCategory()\n {\n return $this->hasOne(self::className(), ['id' => 'parentID']);\n }", "title": "" }, { "docid": "33cc18b4e71cb4075d96c23b744ee345", "score": "0.64211535", "text": "protected function get_category_type()\n\t{\n\t\t$children = $this->get_children_ids();\n\t\t$type_id = ($this->category !== null) ? $this->category->category_type : false;\n\n\t\t// If the category is the top most parent, we'll try to get the type from the first child\n\t\tif (!$type_id && !empty($children))\n\t\t{\n\t\t\t$type_id = $this->categories[$children[0]]['category_type'];\n\t\t}\n\t\treturn ($type_id) ? $this->types->get($type_id) : false;\n\t}", "title": "" }, { "docid": "aca956d99c4e75385c91ccbed718c5cb", "score": "0.6364801", "text": "public function getParent()\n {\n return $this->hasOne(Category::className(), ['uuid' => 'parent_uuid']);\n }", "title": "" }, { "docid": "8f45bbbeb8225ee54012df800c1d6399", "score": "0.6326059", "text": "static function findBy($parent = null, $type = null) {\n $conditions = array();\n \n if($parent) {\n if($parent instanceof ICategoriesContext) {\n $conditions[] = DB::prepare('(parent_type = ? AND parent_id = ?)', get_class($parent), $parent->getId());\n } else {\n throw new InvalidInstanceError('parent', $parent, 'ICategoriesContext', '$parent is expected to be ICategoriesContext instance');\n } // if\n } // if\n \n if($type) {\n $conditions[] = DB::prepare('(type = ?)', $type);\n } // if\n \n return Categories::find(array(\n 'conditions' => count($conditions) ? implode(' AND ', $conditions) : null, \n 'order' => 'name', \n ));\n }", "title": "" }, { "docid": "1a60fbc6bda7febca3ad8817ea1046f3", "score": "0.63104564", "text": "public function getCategory($parent_id){\n $data = $this->category->all();\n //\n $recursive = new Recursive($data);\n $htmlOption = $recursive->categoryRecursive($parent_id);\n return $htmlOption;\n }", "title": "" }, { "docid": "0a50c871c210350c04c5bafdf8422570", "score": "0.62913364", "text": "protected function getCategory()\n {\n if( !$this->category )\n {\n list($type, $category_id) = explode('/', $this->getData('id_path'));\n $this->category = Mage::getModel('catalog/category')->load($category_id);\n }\n\n return $this->category;\n }", "title": "" }, { "docid": "d698792128f14ab1b121bc77d57e1f8e", "score": "0.6271373", "text": "public function getTree()\n {\n return Type::with('categories')->get();\n }", "title": "" }, { "docid": "53be954bf04e7470c17e93ee307955dd", "score": "0.62422824", "text": "public function parentCategory() {\n return Category::whereNull('parent_id')->get();\n }", "title": "" }, { "docid": "2795d3c468a80fc58d350edc30dbc00d", "score": "0.6239699", "text": "public function parentCategory()\n {\n return $this->hasOne(Category::class,'id','parent');\n }", "title": "" }, { "docid": "08a17d8c377d7ee4334f6814a9bf0c7f", "score": "0.62188333", "text": "public function getUserType($parentCategoryId = 0, $categoryType = 1, $categoryStatus = 0) {\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t\n\t\t//$from for entity name (table name)\n\t\t$from = \"DB\\\\Bundle\\\\AppBundle\\Entity\\\\Category category \";\n\t\t\n\t\t$whereCondition = \"\";\n\t\t\n\t\tif(is_numeric($parentCategoryId) && $parentCategoryId > -1) {\n\t\t\t$whereCondition .= \"category.parentCategoryId = \" . $parentCategoryId . \" \";\n\t\t}\n\t\t\n\t\tif(is_numeric($categoryStatus) && $categoryStatus > -1) {\n\t\t\t$whereCondition .= \" AND category.categoryStatus = \" . $categoryStatus . \" \";\n\t\t}\n\t\t\n\t\tif(is_numeric($categoryType) && $categoryType > -1) {\n\t\t\t$whereCondition .= \" AND category.categoryType = \" . $categoryStatus . \" \";\n\t\t}\n\t\t\n\t\t$sql = \"SELECT category.categoryId, category.parentCategoryId, category.category, category.categoryType, category.image, \" .\n\t\t\t\t\"category.fromTime, category.language, category.size, category.sortBy, \" .\n\t\t\t\t\"category.includeKeywords, category.excludeKeywords, category.includePublisher, category.excludePublisher, \" .\n\t\t\t\t\"category.includeCountry, category.excludeCountry, category.includeTopic, category.excludeTopic, category.categoryStatus \" .\n\t\t\t\t\"FROM \" . $from;\n\t\t\n\t\tif(!empty($whereCondition)) {\n\t\t\t$sql .= \" WHERE \" . $whereCondition . \" \";\n\t\t}\n\t\t\n\t\t$sql .= \"ORDER BY category.categoryId ASC \";\n\t\t\n\t\t//echo $sql;\n\t\t\n\t\t$query = $em->createQuery($sql);\n\t\t\n\t\t$result = $query->getResult();\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "19bfeef78eb0771c9eae30c5ef7adb4f", "score": "0.6216223", "text": "public function getCategory()\n {\n return $this->hasOne(Category::class, ['id' => 'parent_page']);\n }", "title": "" }, { "docid": "4c13928c50655519fa827680efcc0da4", "score": "0.6135624", "text": "private function getParentCategory($parent_id)\n {\n $parent = Category::where('cat_id', $parent_id)\n ->select('cat_id', 'cat_name', 'parent_cat_id')\n ->get()\n ->first();\n return $parent;\n }", "title": "" }, { "docid": "7f07576cbd80a8e5f9afd33b72f72ef0", "score": "0.60413224", "text": "function find_or_create_category($title, $parent_title) {\n global $DB;\n if ($category = $DB->get_record(\"course_categories\", array(\"name\" => $title\n ))) {\n return $category;\n }\n $parent = empty($parent_title) ? 0 : (find_or_create_category($parent_title, null)->id);\n $parent = empty($parent) ? 0 : $parent;\n $newcategory = new stdClass();\n $newcategory->name = $title;\n $newcategory->idnumber = null;\n $newcategory->parent = $parent;\n $newcategory->description = \"\";\n $newcategory->sortorder = 999;\n $newcategory->id = $DB->insert_record('course_categories', $newcategory);\n $newcategory->context = context_coursecat::instance($newcategory->id);\n $categorycontext = $newcategory->context;\n mark_context_dirty($newcategory->context->path);\n $DB->update_record('course_categories', $newcategory);\n fix_course_sortorder();\n return $newcategory;\n}", "title": "" }, { "docid": "96477e6517f46f00afead580503454cc", "score": "0.59971404", "text": "public function getCategory($parent_id)\n {\n $categories = $this->category->all();\n $recursive = new Recursive($categories);\n $htmlOption = $recursive->categoryRecursive($parent_id);\n return $htmlOption;\n }", "title": "" }, { "docid": "96477e6517f46f00afead580503454cc", "score": "0.59971404", "text": "public function getCategory($parent_id)\n {\n $categories = $this->category->all();\n $recursive = new Recursive($categories);\n $htmlOption = $recursive->categoryRecursive($parent_id);\n return $htmlOption;\n }", "title": "" }, { "docid": "65d5a082ebd0e0eb14917ab15d01fad7", "score": "0.59928775", "text": "protected function createCategory($parentCategory)\n {\n /** @var \\Magento\\Catalog\\Model\\Category $category */\n $category = $this->objectManager->create('Magento\\Catalog\\Model\\Category');\n $category->setStoreId(self::DEFAULT_STORE_ID)\n ->setParentId($parentCategory->getId())\n ->setName(self::NAMES_PREFIX . $this->titlesGenerator->generateCategoryTitle())\n ->setAttributeSetId($category->getDefaultAttributeSetId())\n ->setLevel($parentCategory->getLevel() + 1)\n ->setPath($parentCategory->getPath())\n ->setIsActive(1)\n ->save();\n\n return $category;\n }", "title": "" }, { "docid": "e0f2a95fac78e3a28f8af7a2bc71e87b", "score": "0.5982092", "text": "public function getExistingCategory($parentpath, $cattr)\n {\n $cet = $this->tablename(\"catalog_category_entity\");\n $cetv = $this->tablename(\"catalog_category_entity_varchar\");\n $parentid = array_pop($parentpath);\n $sql = \"SELECT cet.entity_id FROM $cet as cet\n JOIN $cetv as cetv ON cetv.entity_id=cet.entity_id AND cetv.attribute_id=? AND cetv.value=?\n WHERE cet.parent_id=? \";\n $catid = $this->selectone($sql, array($this->_cattrinfos[\"varchar\"][\"name\"][\"attribute_id\"], $cattr[\"name\"], $parentid), \"entity_id\");\n return $catid;\n }", "title": "" }, { "docid": "225e5480b7186b74a237d41825de8b2a", "score": "0.59301037", "text": "public function getCheckboxCategory($categoryType, $parent, $name = 'parent')\n {\n $category = Category::getCategoryByType($categoryType);\n\n $template = $this->getTemplateCheckboxCategory($category, $parent, $name);\n\n return $template;\n }", "title": "" }, { "docid": "8280968dd403a5138cf4d272a8b614b9", "score": "0.59199786", "text": "public function getCategory()\n {\n return $this->hasOne(Categories::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "8280968dd403a5138cf4d272a8b614b9", "score": "0.59199786", "text": "public function getCategory()\n {\n return $this->hasOne(Categories::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "8280968dd403a5138cf4d272a8b614b9", "score": "0.59199786", "text": "public function getCategory()\n {\n return $this->hasOne(Categories::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "c13552d36c5cc54377f23fc37dc95fb9", "score": "0.59169704", "text": "public function getCategory( ){\n return $this->hasOne( Category::Classname(), [ 'id' => 'category_id'] );\n }", "title": "" }, { "docid": "37c6ede75148f5d5336e725c905494c2", "score": "0.59078205", "text": "public function getParent()\n {\n return $this->parent instanceof CategoryResourceIdentifierBuilder ? $this->parent->build() : $this->parent;\n }", "title": "" }, { "docid": "4cd062dced680cb81f5cde7496b9c543", "score": "0.58866763", "text": "public function parentCategory()\n {\n }", "title": "" }, { "docid": "59807451b2c519598776f0171114d786", "score": "0.5880246", "text": "public function parent()\n {\n $parent = $this->instantiate();\n $parent->entity = $this->entity->getParentCategory();\n\n return $parent;\n }", "title": "" }, { "docid": "bc549691469c811973526c8c06a4f0b4", "score": "0.58772373", "text": "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "bc549691469c811973526c8c06a4f0b4", "score": "0.58772373", "text": "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "bc549691469c811973526c8c06a4f0b4", "score": "0.58772373", "text": "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "bc549691469c811973526c8c06a4f0b4", "score": "0.58772373", "text": "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "7ea29e639ec308d4c0f0ed7d82bab079", "score": "0.58759147", "text": "function get_categories_by_parent($parent)\n\t{\n\t\t$arr = array();\n\t\t$this->db->from('categories')->orderby('cat_order', 'DESC')->orderby('cat_name', 'asc')->where('cat_parent', $parent)->where('cat_display', 'Y');\n\t\t$query = $this->db->get();\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "00d0ce90aeaf71a5b971d7383dfd9a7d", "score": "0.58660585", "text": "public function getParent()\n \t{\n \t\t\tif ($this->parent_id > 0) {\n \t\t\t\t/*\n\t\t\t\tswitch ($this->category) {\n\t\t\t\t\tcase self::$config_category ['News'] :\n\t\t\t\t\t\t$parent = News::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::$config_category ['Product'] :\n\t\t\t\t\t\t$parent = Product::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::$config_category ['Album'] :\n\t\t\t\t\t\t$parent = Album::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::$config_category ['StaticPage'] :\n\t\t\t\t\t\t$parent = StaticPage::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::$config_category ['Banner'] :\n\t\t\t\t\t\t$parent = Banner::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::$config_category ['GalleryVideo'] :\n\t\t\t\t\t\t$parent = GalleryVideo::model ()->findByPk ( $this->parent_id );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t*/\n \t\t\t\t$class=$this->category;\n\t\t\t\t$object=new $class;\n \t\t\t\t$parent = $object->findByPk($this->parent_id);\n\t\t\t\treturn $parent;\n \t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n \t}", "title": "" }, { "docid": "6c78dc75bdec5a180f670c834210d60c", "score": "0.58639556", "text": "public function pmdt_parent_init(){\r\n\t\t// We don't need this function because we are not dealing with the parents of the types right now.\r\n\t\t//return new Pressbooks_Metadata_[schema-parent-type]($this->type_level);\r\n\t}", "title": "" }, { "docid": "d6415f8aed824a0f200fdd27c456a494", "score": "0.5849941", "text": "public function getCategory()\n {\n return $this->hasOne(Category::className(), ['category_id' => 'id']);\n }", "title": "" }, { "docid": "fb092edd7f353c7cd0332bc358eb798f", "score": "0.5848776", "text": "public function getCategory($parent_id)\n {\n $menus = $this->menu->all();\n $recursive = new MenuRecursive($menus);\n $htmlOption = $recursive->MenuRecursive($parent_id);\n return $htmlOption;\n }", "title": "" }, { "docid": "fd9b42b86a88802229704078a8bc046a", "score": "0.5820639", "text": "public static function getByParent ($parent_id,$parent_obj=NULL) {\n\treturn self::getLabelCategory(\"parent_id\",$parent_id,$parent_obj);\n }", "title": "" }, { "docid": "600df35a11c4abec6de956b5932009d8", "score": "0.57925993", "text": "public function getParent(): string\n {\n return ChoiceType::class;\n }", "title": "" }, { "docid": "2c16a0c261ebcb7d29cff2a039ae1f05", "score": "0.5781994", "text": "public function parent() {\n return $this->belongsTo(Category::class, 'parent_id');\n }", "title": "" }, { "docid": "dbe56a720ba43930f55396b326f9a622", "score": "0.5776379", "text": "function category_get_parent($catid) {\n// if (ALFRESCO_DEBUG_TRACE) mtrace('category_get_parent(' . $catid . ')');\n\n $pid = get_field('alfresco_categories', 'parent', 'id', $catid);\n\n if ($pid > 0) {\n if ($cat = get_record('alfresco_categories', 'id', $pid)) {\n return $cat;\n }\n }\n\n return NULL;\n }", "title": "" }, { "docid": "095b50967e401a1dfbb142343fee2285", "score": "0.5761791", "text": "function get_property_type($property_id) {\n $parent_id = get_term_by('id', $property_id, 'socialdb_property_type')->parent;\n $parent = get_term_by('id', $parent_id, 'socialdb_property_type');\n return $parent->name;\n}", "title": "" }, { "docid": "2a4929c63ecb1c658f1c194449d30d9f", "score": "0.57495284", "text": "public function getCategory()\n {\n return $this->hasOne(BlgCategory::class, ['id' => 'id_category']);\n }", "title": "" }, { "docid": "cfc2cd9798fdf5c60f7c99c11b537f74", "score": "0.5746483", "text": "public function parentCategory()\n {\n return $this->belongsTo('Category','parent_id','id');\n }", "title": "" }, { "docid": "28a39126aee75ed97600d55c89ba623d", "score": "0.5741187", "text": "public function getParentAttribute()\n {\n return $this->belongsTo('App\\Category', 'category_id')->first();\n }", "title": "" }, { "docid": "3791cc1b2d2d0e78a2be3431786b079f", "score": "0.5721", "text": "public function getMainCategory()\n {\n foreach($this->categories as $key=>$value)\n {\n if ($value->trash=='no' && $value->languagekey==$this->languagekey)\n {\n return $value;\n break;\n }\n }\n }", "title": "" }, { "docid": "a4a4f59970ec8448871277cc39105dc2", "score": "0.5719673", "text": "public function getById($id): Category;", "title": "" }, { "docid": "6ca366a27332c7223a113a9ba59bfdcc", "score": "0.5715149", "text": "public function parent() {\n return $this->belongsTo('App\\Category', 'parent_id');\n }", "title": "" }, { "docid": "f2f55b5969d7766e6849d0cc749fc2aa", "score": "0.5713049", "text": "public function relatedType()\n\t{\n\t\treturn $this->belongsToOne('Type', 'type', 'id');\n\t}", "title": "" }, { "docid": "c29e53b7e1cce55884ef641987c0f51a", "score": "0.5701279", "text": "public function parent()\n {\n return $this->belongsTo(Category::class, 'parent_id');\n }", "title": "" }, { "docid": "5db9953de720d05d1eb9a633e3d20be5", "score": "0.56915957", "text": "public function parent_category($id = \"\") {\n if (!empty($id)) {\n $this->db->where('category_id!=', $id);\n }\n $this->db->where('parent_id', 0);\n $this->db->where('status', 1);\n $query = $this->db->get('category');\n return $query->result_array();\n }", "title": "" }, { "docid": "5781184a95271422e8df38d584fce859", "score": "0.56880206", "text": "public static function getIdCategory() {\n $categorys = new ProductCategory();\n \n $categorys = $categorys->select(\n 'id',\n 'name',\n )->where('parent_id',null)->get();\n return $categorys;\n }", "title": "" }, { "docid": "58b8691c1096419fc18f0e17dbd965cd", "score": "0.5672599", "text": "public function getParent($clang = null) {\n\t\treturn sly_Util_Category::findById($this->getParentId(), $clang);\n\t}", "title": "" }, { "docid": "9a7617863ea5033fc0021a09cd64b6e2", "score": "0.56722355", "text": "public function getCatType()\n {\n return $this->catType;\n }", "title": "" }, { "docid": "6b4ea247a0b28225caf15bb170631a8e", "score": "0.56585324", "text": "function getIdCategoryParentFromCode($code) {\n $db = new MySQL();\n $query = \"SELECT id_category,level_depth FROM ps_category WHERE code = '{$code}'\";\n $result = $db->QuerySingleRow($query);\n return $result;\n }", "title": "" }, { "docid": "8870de168404b7c9c9455678931436ac", "score": "0.5653718", "text": "public function parent()\n {\n return $this->belongsTo('App\\Category', 'parent_id');\n }", "title": "" }, { "docid": "39095081f63a63a53331a89aaf906757", "score": "0.5644998", "text": "public function getTypeCategory()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "704da688f1aea2b0d62b58657d61c477", "score": "0.5640932", "text": "function SubCategoryLookup($s_cat_value,$parent_cat_id,$p_cat_path) { \t\n\t$cat_entity = findCategory($s_cat_value );\n\t$cat_entity_id = $cat_entity[0][\"entity_id\"];\n\tif($cat_entity_id != '') {\t\t\n\t\t$cat_details_arr[\"id\"]='';\n\t\t// if we have some values then we check if it's the child of the parent category in that\n\t\t// case only it's a desired sub-category\n\t\tfor($i=0;$i<count($cat_entity);$i++) {\n\t\t\t$sql = \"SELECT path,parent_id FROM \" . CATALOG_CATEGORY_ENTITY . \" where entity_id = \" . $cat_entity[$i][\"entity_id\"];\n\t\t\t$result = mysql_query($sql);\n\t\t\twhile($cat_details = mysql_fetch_array($result)) {\n\t\t\t\t// checks parent category of the category\t\t\t\t\t\n\t\t\t\tif($cat_details[\"parent_id\"] == $parent_cat_id) {\n\t\t\t\t\t$cat_details_arr[\"path\"]= $cat_details[\"path\"];\n\t\t\t\t\t$cat_details_arr[\"id\"]= $cat_entity[$i][\"entity_id\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if not found then creates new category\t\t\t\n\t\tif($cat_details_arr[\"id\"] == '')\n\t\t\t$cat_details_arr = createSubCategory($s_cat_value,$parent_cat_id,$p_cat_path,$s_cat_value);\n\n\t} else {\n\t\t// if not found then creates new category\t\t\t\n\t\t$cat_details_arr = createSubCategory($s_cat_value,$parent_cat_id,$p_cat_path,$s_cat_value);\n\t}\n\n\treturn $cat_details_arr;\n}", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5598921", "text": "public function getCategory();", "title": "" }, { "docid": "67948d0b394da11d42e25a73965ae20a", "score": "0.5598921", "text": "public function getCategory();", "title": "" }, { "docid": "d24c3b6ada043664332b1066456beeca", "score": "0.55930793", "text": "public function getCategoryType()\n {\n if (method_exists($this, 'categoryType')) {\n return $this->categoryType();\n }\n\n return property_exists($this, 'categoryType') ? $this->categoryType : '';\n }", "title": "" }, { "docid": "b4656bae45b3562b43c4243f2e1d5a56", "score": "0.5590857", "text": "public function getCategory()\n {\n $category=Mage::getModel('vassallo_news/category')->load($this->getData('category_id'));\n\n if($category && $category->getId()){\n return $category;\n }\n return false;\n }", "title": "" }, { "docid": "bd501377716fa58f969209a3f7e7efff", "score": "0.55780655", "text": "public function getParent()\n {\n $parentCategory = new Order_Model_ProductCategory();\n return $parentCategory->find($this->getParentId());\n }", "title": "" }, { "docid": "e6050b3acd26d7f184a3debb9bea4d1e", "score": "0.5576815", "text": "function CategoryLookup($p_cat_value) {\n\tglobal $base_cat; \t\n\t// finds all the categories with the name of the category\n\t$cat_entity = findCategory($p_cat_value );\n\t$cat_entity_id = $cat_entity[0][\"entity_id\"];\n\t// if we have some values then we check if it's the child of the base category in that\n\t// case only it's a main category\n\tif($cat_entity_id != '') {\t\t\t\n\t\t// echo \"Many Sub Match Main Catfound\";\n\t\t$cat_details_arr[\"id\"]='';\n\t\tfor($i=0;$i<count($cat_entity);$i++) {\n\t\t\t// find the path and parent id of all the categories that matches the name of the ctagory\t\t\t\t\n\t\t\t$sql = \"SELECT path,parent_id FROM \" . CATALOG_CATEGORY_ENTITY . \" where entity_id = \" . $cat_entity[$i][\"entity_id\"];\n\t\t\t$result = mysql_query($sql);\n\t\t\twhile($cat_details = mysql_fetch_array($result)) {\n\t\t\t\t// if parent of the category is same as base category then we return that id\t\t\t\t\n\t\t\t\tif($cat_details[\"parent_id\"] == $base_cat) {\n\t\t\t\t\t$cat_details_arr[\"path\"]= $cat_details[\"path\"];\n\t\t\t\t\t$cat_details_arr[\"id\"]= $cat_entity[$i][\"entity_id\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// if we do not find any such category we create new\n\t\tif($cat_details_arr[\"id\"] == '')\n\t\t\t$cat_details_arr = createCategory($p_cat_value);\n\t\t\t\n\t} else { // if no value is retured then we create new category\n\t\t// echo \"creating sub cat\";\n\t\t$cat_details_arr = createCategory($p_cat_value);\n\t}\n\n\treturn $cat_details_arr;\n}", "title": "" }, { "docid": "014850e6c84321db1dee101f489c034f", "score": "0.5554524", "text": "public function type()\n\t{\n\t\treturn $this->belongsTo(Type::class, 'type_id', 'id');\n\t}", "title": "" }, { "docid": "f10f63abb7598788caf7502d1cb2d4a8", "score": "0.5548463", "text": "public static function getCategory() {\n $main_categories = Category::where(\"parent\", 0)->where(\"is_active\", 1)->get();\n $category_set = array();\n foreach ($main_categories as $main_category) {\n $category_set[] = array(\"id\" => $main_category->id, \"name\" => $main_category->name,\n \"parent\" => $main_category->parent);\n $category_set_sub = HelperController::getSubCategory($main_category->id, \" \");\n $category_set = array_merge($category_set, $category_set_sub);\n }\n\n return $category_set;\n }", "title": "" }, { "docid": "4f469f580fe88f5af1306f5135f936e8", "score": "0.5545595", "text": "public function getPCat()\n {\n return $this->hasOne(ParentCategories::className(), ['id' => 'p_cat']);\n }", "title": "" }, { "docid": "daf0e6a50446d3d66400c3cb91ce5253", "score": "0.5542961", "text": "public function getCategory()\n {\n return $this->hasOne(TaskCategory::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "454904c617847780a11d8db2b7b92b6b", "score": "0.5539923", "text": "public function store()\n {\n $request = Request::all();\n $choosedCategory = Category::findOrFail( $request['parent_id'] );\n\n $validator = Validator::make($request, Category::$rules);\n //dd($request);\n if ($validator->passes()) {\n \n $category = new Category();\n $category->name = $request['name'];\n $category->status = $request['status'];\n $category->save();\n\n switch ($request['type']) {\n case 'root':\n $category->makeRoot();\n break;\n case 'child':\n $category->makeChildof($choosedCategory);\n break;\n case 'sibling':\n $category->makeSiblingof($choosedCategory);\n break;\n default:\n // todo\n break;\n }\n \n // create speichert automatisch den datensatz schon ab\n //$category->save();\n\n return redirect('categories');\n\n } else {\n\n return redirect('categories/create')\n ->withErrors($validator)\n ->withInput();\n }\n }", "title": "" }, { "docid": "40ad9d152bb53171d4a5d5575e5a404f", "score": "0.5516955", "text": "public function get_specific_category($p_obj_type = null, $p_nRecStatus = C__RECORD_STATUS__NORMAL, $p_category_id = null, $p_cats_childs = null)\n {\n if (empty($p_nRecStatus))\n {\n $p_nRecStatus = C__RECORD_STATUS__NORMAL;\n } // if\n\n $l_sql = \"SELECT * FROM isysgui_cats\n\t\t\tJOIN isys_tree_group ON isys_tree_group__id = 1\n\t\t\tINNER JOIN isys_obj_type ON isys_obj_type__isysgui_cats__id = isysgui_cats__id\n\t\t\tWHERE isysgui_cats__status = \" . $this->convert_sql_int($p_nRecStatus);\n\n if (!is_null($p_category_id))\n {\n $l_sql .= \" AND isysgui_cats__id = \" . $this->convert_sql_id($p_category_id);\n } // if\n\n if (!is_null($p_obj_type))\n {\n $l_sql .= \" AND isys_obj_type__id = \" . $this->convert_sql_id($p_obj_type);\n } // if\n\n if ($p_cats_childs)\n {\n $l_row = $this->retrieve($l_sql . ';')\n ->get_row();\n $l_spec_cats = [$l_row['isysgui_cats__id']];\n $l_childRes = $this->retrieve(\n \"SELECT * FROM isysgui_cats_2_subcategory\n\t\t\t\tINNER JOIN isysgui_cats ON isysgui_cats__id = isysgui_cats_2_subcategory__isysgui_cats__id__child\n\t\t\t\tWHERE isysgui_cats_2_subcategory__isysgui_cats__id__parent = \" . $this->convert_sql_id($l_row['isysgui_cats__id'])\n );\n\n if ($l_childRes->num_rows() > 0)\n {\n while ($l_row = $l_childRes->get_row())\n {\n $l_spec_cats[] = $l_row[\"isysgui_cats__id\"];\n } // while\n\n if (count($l_spec_cats) > 0)\n {\n return $this->retrieve(\"SELECT * FROM isysgui_cats WHERE isysgui_cats__id IN(\" . implode(\",\", $l_spec_cats) . \")\");\n }\n else\n {\n return false;\n } // if\n } // if\n } // if\n\n return $this->retrieve($l_sql);\n }", "title": "" }, { "docid": "7e2618109c0dc2a3a1ddd31c6fd2850f", "score": "0.55119556", "text": "public function category()\n {\n\n return $this->hasOne(Category::class, 'id', 'category_id');\n }", "title": "" }, { "docid": "129ca810cee193d6b70b16422da64a57", "score": "0.55079275", "text": "public function getTypeId();", "title": "" }, { "docid": "364ed548bc5b080c47b198f2dcc528d4", "score": "0.5497955", "text": "public function getCategory()\n {\n return $this->hasOne(Store::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "535738e3df852937fe1e74ad7c69f310", "score": "0.5494047", "text": "public function getCat()\n {\n return $this->hasOne(Cat::className(), ['id' => 'cat_id']);\n }", "title": "" }, { "docid": "182b5dd4504da7dc52d72bb6bac22018", "score": "0.5492283", "text": "public function category() {\n\n return $this->hasOne(Category::class, 'id', 'category_id');\n }", "title": "" }, { "docid": "93abab2ea5d6d482a8634585e5d674cb", "score": "0.54888797", "text": "public function createRandomCategory()\n {\n $id = count($this->dataStore['categories'])+1;\n $category = array(\n 'id' => $id,\n 'name' => \"Category $id\"\n );\n $this->dataStore['categories'][$id] = $category;\n\n return $category;\n }", "title": "" }, { "docid": "b17ceb3798eddf69894099823f898c7f", "score": "0.5483254", "text": "public function create(array $input): Category;", "title": "" }, { "docid": "cc60325bf6c1156c987c24a706d8e587", "score": "0.5482286", "text": "public function setParentTypeId($parentTypeId);", "title": "" }, { "docid": "ef41525b4e1f8c1f00d54cd499594e52", "score": "0.5459519", "text": "public function getCategory() {\n\t\t$this->populateBasicData();\n\t\treturn $this->category;\n\t}", "title": "" }, { "docid": "4ed2537876fc40826638a62c73ff98fa", "score": "0.5444556", "text": "public function actionCreateSubCategory()\n {\n if ( ($id = Yii::$app->request->post(\"id\")) && ($model = Category::findOne($id)) && ($name = Yii::$app->request->post(\"name\")) )\n {\n //get last order_by for level one categories and increment it by 1\n $subCategory_tmp=CategoriesLevelOne::find()->where(['parent_category'=>$model->id])->orderBy('order_by DESC')->limit(1)->one();\n $subcategory = new CategoriesLevelOne();\n $subcategory->parent_category = $id;\n $subcategory->name = $name;\n $subcategory->order_by = $subCategory_tmp->order_by+1;\n if($subcategory->save())\n return json_encode(array(\"success\" => true, \"id\" => $subcategory->id));\n\n }\n Yii::$app->end(200);\n }", "title": "" }, { "docid": "bfe3c4c3274cf3bfb382ca09ab12dc4d", "score": "0.54442096", "text": "public function getCategoryId($parentpath, $cattrs)\n {\n // Search for existing category and returns its ID of it exists\n $cattrs[\"name\"] = str_replace($this->_escapedtsep, $this->_tsep, $cattrs[\"name\"]);\n $catid = $this->getExistingCategory($parentpath, $cattrs);\n if ($catid != null) {\n return $catid;\n }\n\n // otherwise, get new category values from parent & siblings\n $cet = $this->tablename(\"catalog_category_entity\");\n $path = implode(\"/\", $parentpath);\n $parentid = array_pop($parentpath);\n // get child info using parent data\n $sql = \"SELECT cce.entity_type_id,cce.attribute_set_id,cce.level+1 as level,COALESCE(MAX(eac.position),0)+1 as position\n FROM $cet as cce\n LEFT JOIN $cet as eac ON eac.parent_id=cce.entity_id\n WHERE cce.entity_id=?\n GROUP BY eac.parent_id\";\n $info = $this->selectAll($sql, array($parentid));\n $info = $info[0];\n // insert new category\n $sql = \"INSERT INTO $cet (entity_type_id,attribute_set_id,parent_id,position,level,path,children_count) VALUES (?,?,?,?,?,?,?)\";\n // insert empty path until we get category id\n $data = array($info[\"entity_type_id\"],$info[\"attribute_set_id\"],$parentid,$info[\"position\"],$info[\"level\"],\"\",0);\n // insert in db,get cat id\n $catid = $this->insert($sql, $data);\n\n unset($data);\n // set category path with inserted category id\n $sql = \"UPDATE $cet SET path=?,created_at=NOW(),updated_at=NOW() WHERE entity_id=?\";\n $data = array(\"$path/$catid\",$catid);\n $this->update($sql, $data);\n unset($data);\n // set category attributes\n foreach ($this->_cattrinfos as $tp => $attinfo) {\n $inserts = array();\n $data = array();\n $tb = $this->tablename(\"catalog_category_entity_$tp\");\n\n foreach ($attinfo as $attrcode => $attdata) {\n if (isset($attdata[\"attribute_id\"])) {\n $inserts[] = \"(?,?,?,?,?)\";\n $data[] = $info[\"entity_type_id\"];\n $data[] = $attdata[\"attribute_id\"];\n $data[] = 0; // store id 0 for categories\n $data[] = $catid;\n $data[] = $cattrs[$attrcode];\n }\n }\n\n $sql = \"INSERT INTO $tb (entity_type_id,attribute_id,store_id,entity_id,value) VALUES \" .\n implode(\",\", $inserts) . \" ON DUPLICATE KEY UPDATE value=VALUES(`value`)\";\n $this->insert($sql, $data);\n unset($data);\n unset($inserts);\n }\n return $catid;\n }", "title": "" }, { "docid": "f34c94fb7ac2a5ed23609f2d5b88a2be", "score": "0.542773", "text": "function _tagCategoryParentList()\n {\n $tags = Tag::where('type','category')->where('parent_id', '==', 0)->get();\n\n $tagList = array();\n if ( count($tags) > 0) {\n foreach ($tags as $tag) {\n // check if type is a category\n if($tag->type == 'category'){\n $tagList[ $tag->id ] = $tag->name;\n }\n }\n }\n\n return $tagList;\n }", "title": "" }, { "docid": "a21703f4bd05b4fc13fdc8ec27d528c3", "score": "0.5426568", "text": "public function getCategory()\n {\n return $this->hasOne(\\lispa\\amos\\news\\models\\NewsCategorie::className(), ['id' => 'news_categorie_id']);\n }", "title": "" }, { "docid": "b40cc3feda09d35a0532709ec4f99487", "score": "0.54063106", "text": "public function getType() {\n \n if(is_null($this->type) AND !empty($this->table->type_id)) {\n \n jimport(\"crowdfunding.type\");\n $this->type = new CrowdFundingType($this->table->type_id);\n $this->type->setTable(new CrowdFundingTableType(JFactory::getDbo()));\n $this->type->load($this->table->type_id);\n \n if(!$this->type->getId()) { \n $this->type = null;\n }\n }\n \n return $this->type;\n }", "title": "" }, { "docid": "fc6cb27ac9b7fa26aac1f9e0f3774243", "score": "0.5399713", "text": "public static function getCategory($id)\n {\n return Category::find($id);\n }", "title": "" }, { "docid": "d44fa423eeb95c3c2ed230176d5a15bf", "score": "0.5386572", "text": "public function getCategory()\n {\n return $this->hasOne(ProductCategory::className(), ['id' => 'category_id']);\n }", "title": "" }, { "docid": "7289fc387d59023c3a8b47ff37810401", "score": "0.5382768", "text": "public function getParent()\n {\n if( null == $this->parent ) {\n switch( $this->getType() ) {\n case 'kommune': \n $this->parent = new Kommune( $this->getId() );\n break;\n case 'fylke':\n $this->parent = Fylker::getById( $this->getId() );\n break;\n }\n $this->name = $this->parent->getNavn();\n }\n return $this->parent;\n }", "title": "" }, { "docid": "ff076ded2f5d08c0a1f2a5a803da54e0", "score": "0.5367013", "text": "public static function getCategoryNotNull() {\n $categorys = new ProductCategory();\n \n $categorys = $categorys->select(\n 'id',\n 'name',\n )->whereNotNull('parent_id')->get();\n return $categorys;\n }", "title": "" }, { "docid": "90858ad430e32e3ed3a87b3a18c52b2c", "score": "0.5363935", "text": "public function sub_category()\n {\n\n return $this->hasOne(Category::class, 'id', 'sub_category_id');\n }", "title": "" }, { "docid": "a008b63b17635d512a725f25131c2290", "score": "0.53621286", "text": "public function category(){\n return $this->hasOne(Category::class);\n }", "title": "" }, { "docid": "bd93f3e4fa750433b222ffa18b74607a", "score": "0.53596574", "text": "public function getParents($type);", "title": "" }, { "docid": "2064ce06c873bf796756ebb6cc0d5f59", "score": "0.53558254", "text": "public function get_categoria()\n {\n \n // loads the associated object\n if (empty($this->categoria))\n $this->categoria = new Categoria($this->categoria_id);\n \n // returns the associated object\n return $this->categoria;\n }", "title": "" }, { "docid": "ad227f2fec78fd275ffab426506b781e", "score": "0.53552663", "text": "function getCategories($cat, $parent_id = true)\n {\n $_query = '';\n $query = 'SELECT id, lang, parent_id, name, description FROM '.SQLPREFIX.'faqcategories WHERE ';\n if (true == $parent_id) {\n $query .= 'parent_id = 0';\n }\n foreach (explode(';', $cat) as $cats) {\n $_query .= ' OR parent_id = '.$cats;\n }\n if (false == $parent_id && 0 < strlen($_query)) {\n $query .= substr($_query, 4);\n }\n if (isset($this->language) && preg_match(\"/^[a-z\\-]{2,}$/\", $this->language)) {\n $query .= ' AND lang = \"'.$this->language.'\"';\n }\n $query .= \" ORDER BY id\";\n $result = $this->db->query($query);\n while ($row = $this->db->fetch_assoc($result)) {\n $this->categories[] = $row;\n }\n return $this->categories;\n }", "title": "" }, { "docid": "4beed35c6b396485f7942bb7f2084eb3", "score": "0.53521615", "text": "function getcategory_with_child($category){\n\t$cats = array();\n\tforeach ($category as $cat){\n\t\tif ($cat->category_parent!=0){\n\t\t\tarray_push($cats, $cat);\n\t\t}\n\t}\n\treturn $cats;\n}", "title": "" }, { "docid": "6133914646a2352362a75b9c05e40412", "score": "0.53469145", "text": "function getTypeId() {\n\t\treturn $this->getData('typeId');\n\t}", "title": "" }, { "docid": "41225ab3ac450c5ab828b759b43aebfb", "score": "0.5344149", "text": "public function category() \n\t{\n\t\treturn $this->hasOne('Category','id','category_id');\n\t}", "title": "" }, { "docid": "dc890663cdd5c83167ab7fbd94e69923", "score": "0.53419346", "text": "public function category()\n {\n return $this->belongsTo('Delatbabel\\NestedCategories\\Models\\Category');\n }", "title": "" }, { "docid": "6880fb2e7078204cb8418406a256ec18", "score": "0.53418666", "text": "function tmpl_get_the_category_by_ID( $cat_ID,$texonomy ) {\r\n $cat_ID = (int) $cat_ID;\r\n $category = get_term( $cat_ID, $texonomy );\r\n\t\r\n\t if ( is_wp_error( $category ) )\r\n return $category;\r\n\r\n\t return ( $category ) ? $category->name : '';\r\n}", "title": "" }, { "docid": "e091b2e20375c3d6665c107de46d30fa", "score": "0.53414387", "text": "public function create()\n {\n return view('admin/category/create_category_parent');\n\n }", "title": "" }, { "docid": "b8efcb6496cf6d924fce521e1cf8180e", "score": "0.53401524", "text": "public function getParentsOfType($parentType);", "title": "" }, { "docid": "c7cd54c46e3736f6651c4b35c56c350c", "score": "0.5338732", "text": "function model()\n {\n return Category::class;\n }", "title": "" }, { "docid": "9d1664a7e638ff1c3fbba79b1a486e62", "score": "0.53386843", "text": "public static function getSubCategoryIdByName(string $name)\n {\n $typeId = DB::table('subcategories')->select('subcategories.id as type_id')\n ->where('subcategories.url_name', $name)->first();\n return $typeId ? $typeId : false;\n }", "title": "" } ]
e4c82a30c6190897434b6b7432df475d
Download a pdf with a preview with the notes report, same for java & html5
[ { "docid": "45a19fe37e524b650c8212c55d4e8787", "score": "0.6943833", "text": "protected function actDownloadHiresNotes() {\n $lDoc = $this->getReq('doc');\n $lUtil = new CApi_Dalim_Utils ();\n $lPdf = $lUtil->getHires($lDoc);\n header('Content-Type: application/pdf');\n header('Content-Disposition: attachment; filename=\"' . basename ($lDoc) . '\"');\n echo $lPdf;\n exit ();\n }", "title": "" } ]
[ { "docid": "bedb512f6d2e2db7f301a801769cf5e2", "score": "0.792905", "text": "protected function actDownloadNotes() {\n $lDoc = $this->getReq('doc');\n $lName = $this->getReq('fn');\n $lUtil = new CApi_Dalim_Utils();\n $lPdf = $lUtil->getPdfReport($lDoc);\n header('Content-Type: application/pdf');\n header('Content-Disposition: attachment; filename=\"'.$lName.'\"');\n echo $lPdf;\n exit;\n }", "title": "" }, { "docid": "a244fb4cf26bbba6005def41e1d1cb08", "score": "0.7409035", "text": "public function downloadPdf(){\n }", "title": "" }, { "docid": "88882da11014edbbf43bdaa81e578976", "score": "0.73781085", "text": "private function getPdf($idJob,$previewName){\n //todo sanitize $name\n \n $file= jboConf::$jobsPath.$idJob.D_S.$previewName;\n \n if(file_exists($file)) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename='.basename($file));\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n header('Content-Length: ' . filesize($file));\n ob_clean();\n flush();\n readfile($file);\n exit;\n }\n}", "title": "" }, { "docid": "1f22dc7faa0cc2971c9fe2b6daa99716", "score": "0.7271009", "text": "function download_pdf() {\n\t$result = get_mcpdf_nid();\n\t$node_load = node_load($result);\n\t\n\t$path = $node_load->field_generated_pdf['und'][0]['uri'];\n\t$file_name = $node_load->field_generated_pdf['und'][0]['filename'];\n\t$url = file_create_url($path);\n\t//$url = \"https://sandbox.escalet.com/sites/default/files/PDF/downloaded_pdf_8730.pdf\";\n\t\n\t//$url = \"https://sandbox.escalet.com/sites/default/files/lms/agent-7/conciergeservicespec-rev1.pdf\";\n\theader('Content-disposition: attachment; filename=\"'.$file_name.'\"');\n\theader(\"Content-Type: application/octet-stream\");\n\treadfile($url);\n\t//print readfile($url);\n}", "title": "" }, { "docid": "cb8e43c6d18a37acaa76e2d1b830ce9c", "score": "0.7145855", "text": "public function actionDownloadPDF()\n {\n if (r()->isPostRequest) {\n $html = $_POST['html_string'];\n $html = str_replace(\"\\\\\", \"\", $html);\n $html2pdf = new HTML2PDF();\n $html2pdf->writeHTML($html);\n $html2pdf->Output('leaflet-team.pdf');\n\n }\n }", "title": "" }, { "docid": "1e5f295ab810479945798cfc7ba0b59c", "score": "0.706777", "text": "public function fetchPdf()\n {\n $theObject = new jsonPdf($this->caseId);\n $theObject->generatePage();\n $filename = \"pdfs/\".$thisCase.\".pdf\";\n header('Content-Disposition: attachment; filename='.$filename);\n header('Content-Type: application/pdf-stream');\n header('Content-Length: '.filesize($filename));\n readfile($filename);\n unlink($filename);\n }", "title": "" }, { "docid": "98be8e3cbfd9f683012ea2368d8f5b01", "score": "0.7041842", "text": "public function downloadPDF(){\n $products = Product::where('product_status',1)->get();\n $orders = Order::all();\n $last_order_id = OrderDetail::max('order_id');\n $order_receipt = OrderDetail::where('order_id',$last_order_id)->get();\n $pdf = PDF::loadView('admin.reports.receipt', compact('products','order_receipt','orders'));\n return $pdf->download('invoice.pdf');\n }", "title": "" }, { "docid": "683084cf0ec2f56851ca432bd832dd17", "score": "0.7036412", "text": "public function downloadPdf(){\n $posisi = \"results/pdf/2020-07-07_12-10-03lppkm_pkm.pdf\";\n $data = file_get_contents($posisi);\n force_download($posisi, $data);\n \n \n \n // header('Content-Type: application/json');\n // $b64Doc = chunk_split(base64_encode(file_get_contents($posisi)));\n // $send = array(\n // 'status' =>200,\n // 'error' =>false,\n // 'pdf' =>$b64Doc,\n // 'message' =>'sukses'\n // );\n // $kirim = json_encode($send);\n // echo $kirim;\n }", "title": "" }, { "docid": "980d9cc77215390524933e96007ed9ff", "score": "0.70153", "text": "\r\n\t$this->Datahandler->Files->GetFileLink();\r\n\t\r\n\t//$file is the path to the file, $filename is the name that is displayed. PDF is opened on the same tab\r\n\tpublic function ReadPDF() {\r\n\t\t$file = '';\r\n\t\t$fileName = '';\r\n\r\n\t\theader('Content-type: application/pdf');\r\n\t\theader('Content-Disposition: inline; filename=\"'.$fileName.'\"');\r\n\t\theader('Content-Transfer-Encoding: binary');\r\n\t\theader('Content-Length: '.filesize($file));\r\n\t\theader('Accept-Ranges: bytes');\r\n\r\n\t\t@readfile($file);\r\n\t}", "title": "" }, { "docid": "7c629de38552ec338fafaae50c8a4f43", "score": "0.69539887", "text": "function pdf() {\n if($this->active_invoice->isNew()) {\n $this->httpError(HTTP_ERR_NOT_FOUND);\n } // if\n \n if(!$this->active_invoice->canView($this->logged_user)) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \n require_once(INVOICING_MODULE_PATH.'/models/InvoicePdf.class.php');\n InvoicePDF::download($this->active_invoice, lang(':invoice_id.pdf', array('invoice_id' => $this->active_invoice->getName())));\n die();\n }", "title": "" }, { "docid": "4f2b8a15d453d8d59ee4a736f906437e", "score": "0.69427925", "text": "public function pdf();", "title": "" }, { "docid": "80940ce8a247b7e49d49be6426cb4137", "score": "0.6893864", "text": "public function displayPDF() {\n // i prikazati ga na ekranu (preko View-a DisplayPDF (trebas ga sam napraviti)\n // ako biblioteka rradi na ddrugaciji nacin javi\n }", "title": "" }, { "docid": "634048c699de53106c35fd4a42a6e130", "score": "0.6745164", "text": "function advjobofferfile(){\n $this->load->helper('download');\n $attachFile = SENT_JOB_OFFER_PATH . 'job_adv_offer.pdf';\n $data = file_get_contents($attachFile); // Read the file's contents\n $name = 'job_adv_offer.pdf';\n force_download($name, $data); \n }", "title": "" }, { "docid": "434598b39273ee678b006b96cec01ea6", "score": "0.67292964", "text": "public function pdf()\n {\n $data = $this->getDataForPrint();\n $pdf = PDF::loadView($this->printPreview, compact('data'));\n return $pdf->download($this->filename() . '.pdf');\n }", "title": "" }, { "docid": "434598b39273ee678b006b96cec01ea6", "score": "0.67292964", "text": "public function pdf()\n {\n $data = $this->getDataForPrint();\n $pdf = PDF::loadView($this->printPreview, compact('data'));\n return $pdf->download($this->filename() . '.pdf');\n }", "title": "" }, { "docid": "be414c98d57b844fd5a9ab06a4b0e319", "score": "0.67020565", "text": "public function meeting_report_preview_download(Request $request){\n $meeting=DB::table('tb_meetings')->where('id',$request->meeting_id)->first();\n\n $assign_member=DB::table('tb_meeting_employee')->where('meeting_id',$meeting->id)\n ->leftjoin('tb_employee','tb_meeting_employee.emp_id','=','tb_employee.id')\n ->select('tb_employee.employeeId','tb_employee.emp_first_name','tb_employee.emp_lastName','tb_employee.emp_photo')\n ->get();\n $company=$this->settings->companyInformation();\n if($request->preview){\n return view('backend.report.meeting.preview.meeting_report_preview',compact('meeting','assign_member'));\n }else{\n $pdf = \\PDF::loadView('backend.report.meeting.pdf.meeting_report_download',compact('meeting','assign_member','company'));\n return $pdf->download('meeting_list.pdf');\n }\n }", "title": "" }, { "docid": "e5e827ad196ed5e8d837c58aec558db1", "score": "0.6687935", "text": "function pdf_documentation($sid=null)\n\t{\n\t\tif (!is_numeric($sid)){\n\t\t\tshow_404();\n\t\t}\n\n\t\t$survey=$this->get_survey_info($sid);\n\t\t$report_file=unix_path($survey['storage_path'].'/ddi-documentation-'.$this->config->item(\"language\").'-'.$survey['id'].'.pdf');\n\n\t\tif (!file_exists($report_file)){\n\t\t\tshow_error(\"PDF_NOT_AVAILABLE\");\n\t\t}\n\n\t\t$this->load->helper('download');\n\t\t@log_message('info','Downloading file <em>'.$report_file.'</em>');\n\t\tforce_download2($report_file);exit;\n\t}", "title": "" }, { "docid": "f62b931caf23783f47c9bf320be2c5bb", "score": "0.6682398", "text": "function pdfViewEvent($pdf)\n {\n $pdf = $_REQUEST ['pdf'];\n $shop_id = $_REQUEST ['shop_id'];\n $ownerName = ModUtil::apiFunc('ZSELEX', 'admin', 'getOwner',\n $args = array(\n 'shop_id' => $shop_id\n ));\n $pdf = urldecode($pdf);\n // echo $pdf; exit;\n\n $path_parts = pathinfo($pdf);\n $extension = $path_parts ['extension'];\n // echo \"<pre>\"; print_r($path_parts); echo \"</pre>\"; exit;\n // $file = \"zselexdata/$ownerName/events/docs/\" . $pdf;\n $file = \"zselexdata/$shop_id/events/docs/\".$pdf;\n if (!file_exists($file)) {\n return LogUtil::registerError($this->__(\"file not found!\"));\n }\n if ($extension == 'doc') {\n header('Content-disposition: inline');\n header('Content-type: application/msword'); // not sure if this is the correct MIME type\n readfile($file);\n exit();\n }\n $this->view->assign('file', $file);\n return $this->view->fetch('user/pdfview.tpl');\n /*\n * if (file_exists($file)) {\n *\n * header('Content-Description: File Transfer');\n * header('Content-Type: application/' . $extension);\n * header('Content-Disposition: attachment; filename=' . basename($file));\n * header('Content-Transfer-Encoding: binary');\n * header('Expires: 0');\n * header('Cache-Control: must-revalidate');\n * header('Pragma: public');\n * header('Content-Length: ' . filesize($file));\n * ob_clean();\n * flush();\n * readfile($file);\n * exit;\n * }\n *\n */\n }", "title": "" }, { "docid": "e728d901cd2f5bfef9e51d5559de0572", "score": "0.6677455", "text": "public function test_download_reports_in_pdf_format()\n {\n $item = Report::where('name', '=', 'Report2')->first();\n\n $this->actingAs($this->operator)\n ->visit(\"/reports/$item->id\")\n ->see(\"Reports\")\n ->see($item->name)\n ->see('Patient Name')\n ->click('Download');\n }", "title": "" }, { "docid": "9012decad557d7a36d391eed63c99d80", "score": "0.6676772", "text": "public function action_pdf()\n\t{\n\t\tif (HTTP_Request::GET == $this->request->method())\n { \n\t\t\t$files = ORM::factory('File')\n\t\t\t\t\t->where('type','=','application/pdf')\n\t\t\t\t\t->where('active','=','1')\n\t\t\t\t\t->order_by('filename', 'asc')\n\t\t\t\t\t->find_all()\n\t\t\t\t\t->as_array();\n\n\t\t\t$filesArr = array_map(\n\t\t\t\tcreate_function(\n\t\t\t\t\t'$obj',\n\t\t\t\t\t'return $obj->as_array();'\n\t\t\t\t),\n\t\t\t\t$files\n\t\t\t);\n\n\t\t\tfor($i=0; $i < count($filesArr); $i++)\n\t\t\t{\n\t\t\t\t$user = ORM::factory('User', $filesArr[$i]['user_id']);\n\t\t\t\t$filesArr[$i]['user_id'] = $user->username;\n\n\t\t\t\t$filesArr[$i]['link'] = UPLOADDIR.'/'.UPLOADPDFDIR.'/'.$filesArr[$i]['filename'];\n\t\t\t}\n\n\t\t\t$this->template->result = $filesArr;\n\t\t}\n\t}", "title": "" }, { "docid": "bc92c1784a184ac87b86a313120220d3", "score": "0.66759735", "text": "public function fun_pdf(){\n \t$pdf = PDF::loadView('prueba');\n \treturn $pdf->download('hola.pdf');\n }", "title": "" }, { "docid": "f64c30956c90291a3feabc3718d9c112", "score": "0.6675448", "text": "public function preview_pdf_cv($id)\n\t{\n\t\t$obj1=new User;\n\t\t$pdf=$obj1->where('id','=',$id)->get();\n \t \n\t\tforeach($pdf as $p)\n\t\t{\n \t return response()->file($p->cv, [\n\n 'Content-Type' => 'application/pdf'\n\n ]);\n }\n}", "title": "" }, { "docid": "3c732a2fe9796655010373177c32ef3e", "score": "0.6658217", "text": "public function downloadPdf()\n {\n //si existe el directorio\n if (is_dir(\"./files/pdfs\")) {\n //ruta completa al archivo\n $route = base_url(\"files/pdfs/cotizacion.pdf\");\n //nombre del archivo\n $filename = \"cotizacion.pdf\";\n //si existe el archivo empezamos la descarga del pdf\n if (file_exists(\"./files/empresas/1/cotizaciones/1Wne37xEaHvwxOH8dvJ9-XHuNfMq8NtfPawpbQqLB7w/sistema\" . $filename)) {\n header(\"Cache-Control: public\");\n header(\"Content-Description: File Transfer\");\n header('Content-disposition: attachment; filename=' . basename($route));\n header(\"Content-Type: application/pdf\");\n header(\"Content-Transfer-Encoding: binary\");\n header('Content-Length: ' . filesize($route));\n readfile($route);\n }\n }\n }", "title": "" }, { "docid": "f2392e1ff6e54a5fe94d59f7e66ea1f3", "score": "0.6647288", "text": "public function downloadHistoryPDF($history_id);", "title": "" }, { "docid": "033ffd263e752e62761ff75bc855bf5a", "score": "0.66129935", "text": "public function pdfOut() {\n\t\t// send PDF-file in browser\n\t\t$this->cb->Output('scheduler.pdf', 'I');\n\t}", "title": "" }, { "docid": "33aa4b84dad2d2ed37b9271bc0aa55c8", "score": "0.65933526", "text": "public function dogenerate()\n {\n \n // $pdf = PDF::loadView('testpdf', $data);\n // return $pdf->download('testpdf.pdf');\n }", "title": "" }, { "docid": "b10d3229cd263a1cf9edef729698a139", "score": "0.65806454", "text": "public function createPDF() {\n $data = Karyawan::all();\n\n // share data to view\n $pdf = PDF::loadView('karyawan.pdf_view', compact('data', $data));\n\n // download PDF file with download method\n return $pdf->download('karyawan-pdf.pdf');\n }", "title": "" }, { "docid": "643b1149c904784c87fe6d8ad94129c9", "score": "0.6571247", "text": "public function download_job_application_letter($id){\n\n $employee_data=DB::table('tb_employee')->where('id',$id)->first();\n $pdf = \\PDF::loadView('backend.employee.download.job_application.letter', compact('employee_data'));\n return $pdf->download('job_application_letter.pdf');\n }", "title": "" }, { "docid": "83390a1429e0da6dc1db15ce64a5adbf", "score": "0.65572226", "text": "public function createPDF() {\n // retreive all records from db\n $data = glpi_computers::all();\n\n // share data to view\n view()->share('employee',$data);\n $pdf = PDF::loadView('pdf_view', $data);\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "title": "" }, { "docid": "6ccca77f069570fe45340c0372926261", "score": "0.6541416", "text": "public function pdf()\n {\n $presentacion = Presentacion::all();\n $cont = 0;\n\n $pdf = PDF::loadView('pdf.reporte', compact('presentacion', 'cont'));\n $pdf->setPaper('A4', 'landscape');\n $fecha = date('Y-m-d');\n return $pdf->download('Listado-'.$fecha.'.pdf');\n }", "title": "" }, { "docid": "a4994e9b8215ce2a8c35673edb000048", "score": "0.6516115", "text": "function viewpdf($stock_id)\n\t{\n\t\t$data \t\t = array();\n\t\t$data['title'] \t = $this->title;\n\t\t\n\t\t$stock_details = $this->stock_model->previewstock($stock_id);\n\t\t$this->load->helper('pdf');\n\t\t$pdf_stock = generate_pdf_stock($stock_details, true, NULL);\n\t}", "title": "" }, { "docid": "6b177b9344cdb4e2b0b59e3feb35c74a", "score": "0.64691633", "text": "public function get_export_form_pdf(){\n $param = \\Input::param();\n $format = isset($param['format']) ? $param['format'] : 'user';\n $action = ($format == 'user') ? 'print_format_user' : 'print_format_keiri'; \n $build_query = http_build_query($param);\n $url_download = \\Uri::create('/client/pdf/'. $action .'?p=' . base64_encode($build_query));\n $data['url'] = $url_download;\n\n /*==================================================\n * Response Data\n *==================================================*/\n $response = ['status' => 'success',\n 'code' => Exception::E_ACCEPTED,\n 'message' => Exception::getMessage(Exception::E_ACCEPTED),\n 'data' => $data];\n return $this->response($response);\n }", "title": "" }, { "docid": "ec55f5ffe9c2f533ad020027d2f92466", "score": "0.64615655", "text": "function flc_pdf($html,$papersize='A4',$orientation='P',$filename='file.pdf',$destination='I',$headerhtml=null,$footerhtml=null)\n{\n\t$_SESSION['tcpdf_params']['html'] = $html;\n\t$_SESSION['tcpdf_params']['papersize'] = $papersize;\n\t$_SESSION['tcpdf_params']['orientation'] = $orientation;\n\t$_SESSION['tcpdf_params']['filename'] = $filename;\n\t$_SESSION['tcpdf_params']['destination'] = $destination;\n\t$_SESSION['tcpdf_params']['headerhtml'] = $headerhtml;\n\t$_SESSION['tcpdf_params']['footerhtml'] = $footerhtml;\n\n\techo \"<script>window.open('system_pdf_writer.php')</script>\";\n}", "title": "" }, { "docid": "9b84180c93ff72a68c515c3badd5990e", "score": "0.64592594", "text": "public function show() {\n\t\t\theader('Content-type: application/pdf');\n\t\t\tprint $this->pdf_content;\n\t\t}", "title": "" }, { "docid": "d2ee13637c26dafc83090ad90d51130a", "score": "0.6455739", "text": "public function pdf()\n {\n $movies= Movie::all(); \n \n $pdf =PDF::loadView('movie.pdf',compact('movies'));\n return $pdf->download('listado peliculas.pdf');\n }", "title": "" }, { "docid": "a99c854895bc13c8068741c4b0454109", "score": "0.64447486", "text": "function getPdfUrl() {\n return Router::assemble('invoice_pdf', array(\n 'invoice_id' => $this->getId(),\n 'force' => true,\n 'disposition' => 'attachment'\n ));\n }", "title": "" }, { "docid": "92116f446c32434d93fa80b15f8986f7", "score": "0.6430294", "text": "public function DownloadOrderPDF($id, $order_date_microtime,$html)\n\t\t\t{\t\t\n\t\t\t\t//echo __DIR__;\n\t\t\t\t$gid = $_GET['id'];\t\t\n\t\t\t\t\n\t\t\t\t//\n\t\t\t\t\n\t\t\t\trequire_once(\"../dompdf_config.inc.php\");\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// We check wether the user is accessing the demo locally\n\t\t\t\t$local = array(\"::1\", \"localhost\");\n\t\t\t\t$is_local = in_array($_SERVER['REMOTE_ADDR'], $local);\n\t\t\t\t$dompdf = new DOMPDF();\n\t\t\t\t//$dompdf->load_html_file('<p></p>');\n\t\t\t\t$dompdf->load_html($html);\n\t\t\t\t$dompdf->set_paper('a4','portrait');\n\t\t\t\t$dompdf->render();\n\n\t\t\t\t/* If you want password protected */\n\t\t\t\t//$dompdf->get_canvas()->get_cpdf()->setEncryption(\"pass\", \"pass\");\n\t\t\t\t\n\t\t\t\t$dompdf->stream(\"invoice.pdf\", array(\"Attachment\" =>true));\n\n \n\t\n\t}", "title": "" }, { "docid": "f4e2abcca8301abfa2842df962c0e142", "score": "0.6425433", "text": "public function createPDF() {\n $data = Delivery::all();\n\n // share data to view\n view()->share('deliveries',$data);\n $pdf = PDF::loadView('admin.pdf.delivery_pdf', $data);\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "title": "" }, { "docid": "61de2334f39ee8e50b4a50bf9c80025b", "score": "0.6419282", "text": "public function documentofinalfraccinamiento()\n {\n $data = array('ID' => $this->input->post('ID'));\n\n\n//$this->load->view(\"documentos/documentoterminacionobrafinal\",$data);\n $html = $this->load->view('documentos/documentoclavecatastral', $data, true);\n\n//$html=\"asdf\";\n//this the the PDF filename that user will get to download\n $pdfFilePath = \"permiso_anuncio_\" . $this->input->post(\"d1\") . \".pdf\";\n\n//load mPDF library\n $this->load->library('M_pdf');\n//$mpdf = new mPDF('c', 'A4');\n//$mpdf->WriteHTML($html);\n//$mpdf->Output($pdfFilePath, \"D\");\n// //generate the PDF from the given html\n $this->m_pdf->pdf->WriteHTML($html);\n\n// //download it.\n $this->m_pdf->pdf->Output($pdfFilePath, \"D\");\n }", "title": "" }, { "docid": "f7ac07710c35519c231a0267cae3d4ce", "score": "0.6419057", "text": "public function pdf(){\n // $pdf = PDF::loadView('reports.clientes.report_geral_clientes',compact('clientes'));\n // return $pdf->download('cliente.pdf');\n}", "title": "" }, { "docid": "8dfea89796911ebfcffc509e4fbd9517", "score": "0.6412087", "text": "public function createPDF() {\n $data = Employee::all();\n\n // share data to view\n view()->share('employee',$data);\n $pdf = PDF::loadView('showdata', $data);\n\n // download PDF file with download method\n return $pdf->download('Testpdf_file.pdf');\n }", "title": "" }, { "docid": "8b9e648bee55b63458e1c85a9972480d", "score": "0.63914734", "text": "public function cetak_pdf()\n {\n \t$payments= Payment::select('payments.id_pay as id_pay',\n 'payments.payment_status as payment_status','order_menus.id_order as id_order','order_menus.total_order as total_order',\n 'order_menus.user_cost as user_cost','order_menus.user_cost_remaining as user_cost_remaining',\n 'order_menus.order_date as order_date','users.id as id','users.name as name','users.level as level')\n ->join('order_menus', 'payments.id_order', '=', 'order_menus.id_order')\n ->join('users', 'payments.id', '=', 'users.id')\n ->get();\n \t$pdf = PDF::loadview('Admin.payment_pdf',['payments'=>$payments]);\n \treturn $pdf->stream();\n }", "title": "" }, { "docid": "ad09642ceadd5da7ee1b445aa4f506f3", "score": "0.63866764", "text": "public static function displayPDF($pdf_path) {\n // toglie eventuale output\n while (ob_get_level() > 0) {ob_end_clean();}\n header('Content-type: application/pdf');\n header(sprintf('Content-Disposition: attachment; filename=\"%s\"', basename($pdf_path)));\n header('Pragma: no-cache');\n readfile($pdf_path);\n }", "title": "" }, { "docid": "981ee77ea8e3f49164df4ec403403886", "score": "0.6366409", "text": "function downloadFile($path, $url){ \n\t#save the desired pdf into local tmp place\n\tfile_put_contents($path, fopen($url, 'r'));\n}", "title": "" }, { "docid": "032dda6d95a17b7761ca4ab53533bd2a", "score": "0.63624954", "text": "static function file_get_pdf($file) {\n self::_file_force_download($file,'application/pdf',false);\n }", "title": "" }, { "docid": "b823d97cf04f2b4fa6cee0d03f0972ea", "score": "0.63596547", "text": "public function actionPdf()\n {\n $this->getSearchCriteria();\n $this->layout = static::BLANK_LAYOUT;\n $this->dataProvider->pagination = false;\n $content = $this->render('pdf', [\n 'dataProvider' => $this->dataProvider,\n ]);\n if (isset($_GET['test'])) {\n return $content;\n } else {\n $mpdf = new \\mPDF();\n $mpdf->WriteHTML($content);\n\n Yii::$app->response->getHeaders()->set('Content-Type', 'application/pdf');\n Yii::$app->response->getHeaders()->set('Content-Disposition', 'attachment; filename=\"' . $this->getCompatibilityId() . '.pdf\"');\n return $mpdf->Output($this->getCompatibilityId() . '.pdf', 'S');\n }\n }", "title": "" }, { "docid": "2cb972e0853e265ea950ebf61760a568", "score": "0.63588095", "text": "public function createPDF()\n {\n\t\t\n }", "title": "" }, { "docid": "b99fedab8542068be4ecce67f64fce94", "score": "0.63550943", "text": "public function PDF(){\n $pdf = PDF::loadView('graficos.livewire.pdf'); \n \n //dd($pdf->download('cuestionario.pdf'));\n return redirect()->route('graficos.pdf');\n }", "title": "" }, { "docid": "2a727583d43850f2697f2f0c4f8d2599", "score": "0.6351367", "text": "public function get_pdf() {\r\n\t\t//return ($this->news_new_array);\r\n\t}", "title": "" }, { "docid": "2530bcaf0e104c35ffa66e28b8174018", "score": "0.6342904", "text": "public function createPDF() \n {\n $dadosPaciente = Patient::where('id', '=', $patient->id);\n\n // share data to view\n view()->share('employee',$data);\n $pdf = PDF::loadView('pdf_view', $data);\n\n // download PDF file with download method\n return $pdf->stream('pdf_file.pdf');\n }", "title": "" }, { "docid": "903ff0628db5c9a61e0c9f75bd5a65e0", "score": "0.63274467", "text": "public function createPDF()\n {\n }", "title": "" }, { "docid": "b0ae65d943f8f98e39450473cea2772b", "score": "0.63269264", "text": "function downloadPDF($id, $path, $res='invoice-sent', $hstyle='') {\r\n echo $id;\r\n $opts = array(\r\n\t\t 'http'=>array(\r\n\t\t\t\t'method'=>\"GET\",\r\n\t\t\t\t'header'=>\"Authorization: Basic \".base64_encode($this->api->apitoken.':x').\"\\r\\n\" \r\n\t\t\t\t)\r\n\t\t );\r\n $context = stream_context_create($opts);\r\n $data = file_get_contents(\"https://{$this->api->domain}/API-pdf?id=$id&res={$res}&format=PDF&doctitle=Invoice%20No.&lang=si&hstyle={$hstyle}\", false, $context);\r\n\t\t\r\n if ($data === false) {\r\n echo 'error downloading PDF';\r\n } else {\r\n $file = $path.\"/\".$id.\".pdf\";\r\n file_put_contents($file, $data);\r\n }\r\n }", "title": "" }, { "docid": "01d2780d79cdd0b941fa877721abbfd1", "score": "0.6316089", "text": "public function downloadPDF(){\n //$users = $this->user->get();\n $users = User::all();\n // load view for pdf file\n $pdf = PDF::loadView('pdf.index', ['users' => $users]);\n return $pdf->download('users.pdf');\n }", "title": "" }, { "docid": "2d5fdb4636ba7f8657fbe8ec518058ea", "score": "0.63143283", "text": "public function export_pdf()\n {\n $data = $annexuresData = DB::table('annexure')\n ->join('quotations', 'quotations.quotationId', '=', 'annexure.quotationId')\n ->join('customers', 'customers.customerId', '=', 'quotations.customerId')\n ->select('annexure.*', 'customers.name','quotations.ctsRef','quotations.orderNo')\n ->orderBy('quotations.orderNo','desc')\n ->get();\n // Send data to the view using loadView function of PDF facade\n view()->share('annexure',$data);\n $pdf = PDF::loadView('annexure.annexurespdf', compact('data'));\n // If you want to store the generated pdf to the server then you can use the store function\n $pdf->save(storage_path().'_filename.pdf');\n // Finally, you can download the file using download function\n return $pdf->download('customers.pdf');\n }", "title": "" }, { "docid": "0b87bc00d9ef1dfcd9cd7181522622ca", "score": "0.631298", "text": "private function pdf_nota($xml)\n {\n $danfe = new Danfe($xml, 'P', 'A4', '', 'I', '');\n $id = $danfe->montaDANFE();\n\n $danfe->printDANFE($id.'.pdf', 'F');\n header(\"Content-type: application/pdf\");\n header(\"Content-Disposition: inline; filename=filename.pdf\");\n @readfile(\"../public/{$id}.pdf\");\n }", "title": "" }, { "docid": "0c92e4feab5c2d8ae7fc3a7255a15315", "score": "0.6310174", "text": "public function pdf($id) {\n\t\t$client = DB::table('users')\n\t\t\t->join('client_types', 'users.client_type_id', '=', 'client_types.id')\n\t\t\t->select('users.*', 'client_types.client_type', 'client_types.client_type_description')\n\t\t\t->where('users.id', $id)\n\t\t\t->first();\n\n\t\t$created_by = User::where('id', $client->created_by)\n\t\t\t->select('id', 'name')\n\t\t\t->first();\n\n\t\t$pdf = PDF::loadView('administrator.people.client.pdf', compact('client', 'created_by'));\n\t\t$file_name = str_replace(' ', '', $client->name) . '.pdf';\n\t\treturn $pdf->download($file_name);\n\t}", "title": "" }, { "docid": "cac596cbf9904adff0f40edab6299fcc", "score": "0.6306858", "text": "public function actionDownloadReport() {\n $searchModel = new DosenSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $Prodi = \\backend\\modules\\baak\\models\\InstProdi::find()->all();\n $semester = \\backend\\modules\\baak\\models\\Semester::find()->where(['semester_aktif'=>1])->one();\n\n $pdf = new Pdf([\n 'filename' => 'Laporan.pdf',\n 'mode' => Pdf::MODE_UTF8, // leaner size using standard fonts\n 'content' => $this->renderPartial('laporan_pdf', ['searchModel'=> $searchModel, 'dataProvider'=> $dataProvider, 'Prodi'=> $Prodi, 'semester'=>$semester]),\n 'options' => [\n 'title' => 'Laporan FRK/FED Dosen',\n 'subject' => 'Laporan'\n ],\n 'methods' => [\n 'SetHeader' => ['Generated By: TYP05||BAAK'],\n 'SetFooter' => ['|Page {PAGENO}|'],\n ]\n ]);\n return $pdf->render();\n }", "title": "" }, { "docid": "5e4199cbf80bb1f725eb761ce5df13e2", "score": "0.63013077", "text": "public function downloadpdfAction() {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n $id = $this->getRequest()->getParam('id', '');\n $email = $this->getRequest()->getParam('email', 0);\n require_once 'mpdf/mpdf.php';\n $html .= $this->view->action('viewreport', 'patient', 'patient', array('id' => $id));\n $mpdf = new mPDF('+aCJK', 'A4', '', '', 15, 15, 15, 0, 0, 0);\n $mpdf->mirrorMargins = 0;\n $mpdf->setAutoBottomMargin = 'stretch';\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->WriteHTML($html);\n $fileName = 'PDF_Form' . time() . '.pdf';\n $mpdf->Output('tmp/'.$fileName, ($email)?'F':'D');\n if($email){\n $patient = patient::getOrderById($id);\n $mail = new PHPMailer();\n $mail->From = '[email protected]';\n $mail->FromName = 'Lab';\n $mail->addAddress($patient[0]['email'], ''); \n $mail->addAttachment('tmp/'.$fileName); \n $mail->Subject = 'Your Test Report';\n $mail->Body = 'Please find attached report'; \n if(!$mail->send()) {\n echo 'Message could not be sent.';\n echo 'Mailer Error: ' . $mail->ErrorInfo;\n } else {\n unlink('tmp/'.$fileName);\n $flashMessenger = $this->_helper->getHelper('FlashMessenger');\n $flashMessenger->addMessage('mail_sent');\n $this->_redirect('/patient/orders');\n }\n }\n }", "title": "" }, { "docid": "d6cab4701e0ead8f85772073e9bcefee", "score": "0.62805575", "text": "public function exportDeliveryNote($oPdf)\n {\n }", "title": "" }, { "docid": "86fe8180ef0e86c8f139da8f2bda3bef", "score": "0.6275087", "text": "public function get_pdf()\n {\n if (!isset($_GET['p1'])) {\n $text = 'Falta identificador para generar el PDF.';\n $this->_error($text, 404);\n\n return false;\n }\n $this->recepciondocumentos['skRecepcionDocumento'] = $_GET['p1'];\n $this->data['datos'] = parent::read_recepciondocumentos();\n $this->data['config'] = array(\n 'title' => 'Recepción de Documentos', 'date' => date('d-m-Y H:i:s'), 'company' => 'Gomez y Alvez', 'address' => 'Manzanillo, Colima', 'phone' => '3141102645', 'website' => 'www.grupoalvez.royalweb.com.mx', 'background_image' => (SYS_URL).'core/assets/img/logoPdf.png', 'header' => (CORE_PATH).'assets/pdf/tplHeaderPdf.php', 'footer' => (CORE_PATH).'assets/pdf/tplFooterPdf.php', 'style' => (CORE_PATH).'assets/pdf/tplStylePdf.php',\n );\n ob_start();\n $this->load_view('test-pdf', $this->data, false, 'doc/pdf/');\n $content = ob_get_clean();\n Core_Functions::pdf($content, $this->data['config']['title'], 'P', 'A4', 'es', true, 'UTF-8', array(5, 5, 5, 5));\n\n return true;\n }", "title": "" }, { "docid": "65d14df00a62ac535a3cd2ec133d3ea1", "score": "0.6268726", "text": "public function downloadPDF(){\n\n $sedes = Sede::all();\n $pdf = app('dompdf.wrapper');\n view()->share('sedes',$sedes);\n $pdf->loadView('pdfs.pdfSede', $sedes);\n return $pdf->download('sedes.pdf');\n }", "title": "" }, { "docid": "74f74bbae0391ef36d5f550a7d6951ff", "score": "0.6267196", "text": "public function getDownload()\n {\n $file= public_path(). \"/storage/ECX_info_packet.pdf\"; //path of your directory\n $headers = array(\n 'Content-Type: application/pdf',\n );\n return response()->download($file, 'ECX_info_packet.pdf', $headers);\n }", "title": "" }, { "docid": "34c7244f9412908b7f9872cd4921070b", "score": "0.6261555", "text": "public function pdfAction()\n {\n $snappy = $this->get('knp_snappy.pdf');\n $filename = 'myFirstSnappyPDF';\n\n // use absolute path !\n $pageUrl = $this->generateUrl('sandbox_homepage', array(), UrlGeneratorInterface::ABSOLUTE_URL);\n\n return new Response(\n $snappy->getOutput($pageUrl),\n 200,\n array(\n 'Content-Type' => 'application/pdf',\n 'Content-Disposition' => 'inline; filename=\"'.$filename.'.pdf\"'\n )\n );\n }", "title": "" }, { "docid": "a4d893b1977d88556e9e84594dc26631", "score": "0.62564874", "text": "public function testDownloadStatementPdf()\n {\n }", "title": "" }, { "docid": "4858f652fb6a32804c4ad8e87e79038a", "score": "0.6249856", "text": "public function generatepdf()\n {\n /*\n \n */\n $html = \"<div style='text-align:center;'><h1>PDF generado desde etiquetas html</h1>\n <br><h3>&copy;cardoso.dev</h3> </div>\";\n $pdf = PDF::loadHTML($html);\n return $pdf->download('archivo.pdf');\n \n }", "title": "" }, { "docid": "6997864df7532f86c6d929fa023dfc58", "score": "0.6244214", "text": "function view_pdf($estimate_id = 0) {\n if ($estimate_id) {\n $this->_prepare_estimate($estimate_id, \"view\");\n } else {\n show_404();\n }\n }", "title": "" }, { "docid": "8ca8d8c9d63fa03c59d041dc09113eaf", "score": "0.62430376", "text": "public function actionDownload($id) {\n $pengajuanPkl = PengajuanPkl::find()->where(['id' => $id])->one();\n\n $content = $this->renderPartial('download', [\n 'model' => $pengajuanPkl\n ]);\n\n $pdf = new Pdf([\n 'mode' => Pdf::MODE_UTF8, // leaner size using standard fonts\n 'content' => $content,\n 'cssInline' => '.kv-heading-1{font-size:18px}',\n 'options' => [\n 'title' => 'FERGUSO',\n 'subject' => 'MAGANG GITO LHO'\n ],\n 'methods' => [\n 'SetHeader' => ['STT Terpadu Nurul Fikri||Dibuat: ' . date(\"r\")],\n 'SetFooter' => ['PKL - STT Terpadu Nurul Fikri'],\n ]\n ]);\n \n return $pdf->render();\n }", "title": "" }, { "docid": "53bc09fa981d221cb68a8066864692c0", "score": "0.62411386", "text": "public function pdfdocsAction(){\n $orderIds = $this->getRequest()->getPost('order_ids');\n $flag = false;\n if (!empty($orderIds)) {\n foreach ($orderIds as $orderId) {\n $invoices = Mage::getResourceModel('sales/order_invoice_collection')\n ->setOrderFilter($orderId)\n ->addFieldToFilter('vendor_id', Mage::helper('smvendors')->getVendorLogin()->getId())\n ->load();\n if ($invoices->getSize()){\n $flag = true;\n if (!isset($pdf)){\n $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);\n } else {\n $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);\n $pdf->pages = array_merge ($pdf->pages, $pages->pages);\n }\n }\n \n $shipments = Mage::getResourceModel('sales/order_shipment_collection')\n ->setOrderFilter($orderId)\n ->addFieldToFilter('vendor_id', Mage::helper('smvendors')->getVendorLogin()->getId())\n ->load();\n if ($shipments->getSize()){\n $flag = true;\n if (!isset($pdf)){\n $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);\n } else {\n $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);\n $pdf->pages = array_merge ($pdf->pages, $pages->pages);\n }\n }\n \n $creditmemos = Mage::getResourceModel('sales/order_creditmemo_collection')\n ->setOrderFilter($orderId)\n ->addFieldToFilter('vendor_id', Mage::helper('smvendors')->getVendorLogin()->getId())\n ->load();\n if ($creditmemos->getSize()) {\n $flag = true;\n if (!isset($pdf)){\n $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);\n } else {\n $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);\n $pdf->pages = array_merge ($pdf->pages, $pages->pages);\n }\n }\n }\n if ($flag) {\n return $this->_prepareDownloadResponse(\n 'docs'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf',\n $pdf->render(), 'application/pdf'\n );\n } else {\n $this->_getSession()->addError($this->__('There are no printable documents related to selected orders.'));\n $this->_redirect('*/*/');\n }\n }\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "463be7ebf78e302acabedd88f7a420b6", "score": "0.622977", "text": "public function index()\n {\n $pdf = PDF::loadView('pdf.sample');\n return $pdf->download(\"dompdf_out.pdf\");\n }", "title": "" }, { "docid": "466788f99b282ff107b7cffe1deee2a4", "score": "0.62259316", "text": "public function createPDF($id)\n {\n\n // share data to view\n// $factory = (new Factory)->withServiceAccount(__DIR__ . '/Firebase.json');\n// $database = $factory->createDatabase();\n// $reference = $database->getReference('Invoices/' . $id);\n//\n// $invoice = $reference->getValue();\n//\n// view()->share('invoice', $invoice);\n//\n//// $pdf = PDF::loadView('pdf_view', $invoice);\n//\n//\n// $pdf = PDF::loadView('invoice',$invoice)->setOptions(['defaultFont' => 'sans-serif']);\n//\n// return $pdf->download('invoice.pdf');\n\n // download PDF file with download method\n }", "title": "" }, { "docid": "3975f59173dbddd7eeeacba04ba4a210", "score": "0.62183505", "text": "public function generatePDF()\n {\n $data = ['title' => 'coding driver test title'];\n $pdf = PDF::loadView('generate_pdf', $data);\n\n return $pdf->download('codingdriver.pdf');\n }", "title": "" }, { "docid": "eb2186e47ebeb37eddd0e585fd4cf8ea", "score": "0.62168014", "text": "function download_pdf_file($assign, $sub, $auto_judge_scenarios, $auto_judge_scenarios_output){\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor(PDF_AUTHOR);\n $pdf->SetTitle('Auto Judge Report');\n $pdf->SetSubject('Auto Judge Report');\n // set default header data\n $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\n\n // set header and footer fonts\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n // set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n // set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n // set some language-dependent strings (optional)\n if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n require_once(dirname(__FILE__).'/lang/eng.php');\n $pdf->setLanguageArray($l);\n }\n\n // add a page\n $pdf->AddPage();\n\n $report_table = '\n <style>\n table.first{\n width: 100%;\n border-collapse: collapse;\n }\n\n td {\n font-size: 0.9em;\n border: 1px solid #95CAFF;\n padding: 3px 7px 2px 7px;\n }\n\n th {\n font-size: 0.9em;\n text-align: center;\n padding-top: 5px;\n padding-bottom: 4px;\n background-color: #3399FF;\n color: #ffffff;\n }\n\n </style>\n <table class=\"first\">\n <tr>\n <th>Είσοδος</th>\n <th>Έξοδος</th>\n <th>Τελεστής</th>\n <th>Αναμεν. Έξοδος</th>\n <th>Βαρύτητα</th>\n <th >Αποτέλεσμα</th>\n </tr>\n '. get_table_content($auto_judge_scenarios, $auto_judge_scenarios_output,$assign->max_grade).'\n </table>';\n\n\n $report_details ='\n <style>\n table.first{\n width: 100%;\n border-collapse: collapse;\n vertical-align: center;\n }\n\n td {\n font-size: 1em;\n border: 1px solid #000000;\n padding: 3px 7px 2px 7px;\n text-align: center;\n }\n\n th {\n font-size: 1.1em;\n text-align: left;\n padding-top: 5px;\n padding-bottom: 4px;\n background-color: #3399FF;\n color: #ffffff;\n width: 120px;\n border: 1px solid #000000;\n }\n </style>\n\n <table class=\"first\">\n <tr>\n <th> Μάθημα</th> <td>'.get_course_title().' </td>\n </tr>\n <tr>\n <th> Εργασία</th> <td> '.$assign->title.'</td>\n </tr>\n <tr>\n <th> Εκπεδεύομενος</th><td> '.q(uid_to_name($sub->uid)).'</td>\n </tr>\n <tr>\n <th> Βαθμός</th> <td>'.$sub->grade.'/'.$assign->max_grade.' </td>\n </tr>\n <tr>\n <th> Κατάταξη</th> <td>'.get_submission_rank($assign->id, $sub->grade, $sub->submission_date).'</td>\n </tr>\n </table>';\n\n $pdf->writeHTML($report_details, true, false, true, false, '');\n $pdf->Ln(); \n $pdf->writeHTML($report_table, true, false, true, false, '');\n $pdf->Output('auto_judge_report_'.q(uid_to_name($sub->uid)).'.pdf', 'D');\n}", "title": "" }, { "docid": "1afcfdbb524090a20da610ea217e0fe9", "score": "0.62034535", "text": "public function createPDF($id) {\n $data = Pasien::find($id);\n $data['provinsi']=$this->provinsi($data->provinsi_id);\n $data['kabupaten']=$this->kabupaten($data->kabupaten_id);\n $data['kecamatan']=$this->kecamatan($data->kecamatan_id);\n $data['kelurahan']=$this->kelurahan($data->kelurahan_id);\n \n \n view()->share('pasien',$data);\n $pdf = PDF::loadview('pages.pasien_detail_pdf',$data);\n // download PDF file with download method\n return $pdf->download('pasien_file.pdf');\n }", "title": "" }, { "docid": "32dcf0b8d07fd348bd09a353ab988da5", "score": "0.6201752", "text": "public function kardexPDF($id){\n $grades=student::find($id)->grades;\n $pdf = PDF::loadView('students.grades', compact('grades'));\n //return $pdf->stream();\n return $pdf->download('kardex.pdf');\n }", "title": "" }, { "docid": "0f94a4db1eff49cd9f6cf425c1f268a7", "score": "0.62015784", "text": "function facture_cl_pdf($invoice, $download = true)\n{\n $invoice_number = $invoice->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_facture') . '/ecl_pdf.php');\n $mpdf->WriteHTML($data);\n if ($download == true) {\n $mpdf->Output($invoice_number . '.pdf', 'D');\n } else {\n return $mpdf;\n }\n}", "title": "" }, { "docid": "948785b5599a4ff718faf5e0ca6a283b", "score": "0.62005997", "text": "public function downloadPdf($pdf){\n return response()->download(public_path('storage/resumes/' . $pdf));\n }", "title": "" }, { "docid": "7c24cc07cd164eba18180d2ee18a1646", "score": "0.6200408", "text": "public function getPdf(){\n $prodCartas = DB::table('tprodcarta')->where('estado','=','1')->get();\n $servCartas = DB::table('tservcarta')->where('estado','=','1')->get();\n $view = View::make('cartaPresentacion.pdf', compact('prodCartas', 'servCartas'))->render();\n $pdf = App::make('dompdf.wrapper');\n $pdf->loadHTML($view);\n\n return $pdf->stream('informe'.'.pdf');\n }", "title": "" }, { "docid": "023b44ebf8c198ea4da12ffbaf6a4261", "score": "0.6198923", "text": "public function createPDF($id)\n {\n $examen = tbl_examenes::find($id);;\n\n // share data to view\n view()->share('examen', $examen);\n $pdf = PDF::loadView('reporteExamen');\n\n // download PDF file with download method\n return $pdf->stream();\n }", "title": "" }, { "docid": "5ded0fcf1000d2d06e71ae6cc811ccf3", "score": "0.6189874", "text": "public function pdf($id)\n\t{\n\t\t\n\t\t\t\t //Crear pdf\n\t\t\n\t\t$checklist = Checklist::find($id);\n\t\t$sucursal=Sucursal::find($checklist->sucursal_id);\n\t\t$module = Module::get('Checklists');\n\t\t$module->row =$checklist;\n\t\t\n\t\n\t \n \n \n $franquiciatario = Franquiciatario::whereIN('id', [$checklist->sucursal_id])->select(array('franquiciatarios.*'))->orderBy('id','DESC')->get();\n\n\t\n\t\t$pdf = PDF::loadView('pdf.conlogo',['checklist' =>$checklist,'module'=>$module,'sucursal'=>$sucursal,'franquiciatario'=>$franquiciatario]);\n\t\t$pdf->setPaper('A4', 'portrait');\n\t\t\n\t\treturn $pdf->download($sucursal->nombresuc.' '.$checklist->fecha.'.pdf');\n\t\t/*return $pdf->stream();*/\n\t}", "title": "" }, { "docid": "bdf5b802d1d75c7a4c949d33131cb624", "score": "0.61849624", "text": "public function pdf($id)\n {\n $products = Quotationclient::findOrFail($id)->detailclients;\n $quotation = Quotationclient::find($id);\n\n $user = User::find($quotation->user_id);\n $client = Quotationclient::find($id)->client;\n\n $pdf = PDF::loadView('pdf.quotationclient', compact(['user', 'quotation', 'client', 'products']) );\n\n return $pdf->stream('cotizacion N° '.$id.'.pdf');\n\n ///return $pdf->download('cotizacion N° '.$id.'.pdf');\n }", "title": "" }, { "docid": "042ff4c072f82fd84db2df8f1560b6f6", "score": "0.61838436", "text": "public function viewPDF(){\n //$users = $this->user->get();\n $users = User::all();\n $pdf = PDF::loadView('pdf.index', ['users' => $users]);\n return $pdf->setPaper('a4')->stream();\n }", "title": "" }, { "docid": "6b179d1e958e73f4d395eea0175e4317", "score": "0.6182992", "text": "public function getDownload(){\n $filepath= public_path('upload/businessuser/1463733877.jpg');\n //$headers = array('Content-Type: application/pdf');\n //return Response::download($file, 'filename.pdf', $headers);\n return \\Response::download($filepath);\n }", "title": "" }, { "docid": "7c0de86cb8b05c4043db59e816596d41", "score": "0.6169066", "text": "public function download_slip_gaji(){\n\t$this->load->helper('detail_lembur_helper');\n $this->load->library('pdf');\n // parameter saat user isi form \n $empcode = $this->input->post('filter_empcode');\n $dept_id = $this->input->post('filter_dept');\n $position_id = $this->input->post('filter_position');\n $month = $this->input->post('filter_month');\n $year = $this->input->post('filter_year');\n $print_date = $this->input->post('print_date');\n //$this->_validatee();\n $data = array(\n \"emp_attrb\" => $this->rpt_slip_gaji->slip_gaji($empcode, $dept_id, $position_id, $year, $month),\n \"bulan\" => $month,\n \"print_date\" => $print_date,\n \"tahun\" => $year\n );\n\n\t//$customPaper = array(0,0,842,595); \n //$this->pdf->setPaper($customPaper);\n\n /*echo('<pre>');\n\t\tprint_r($data);\n\t\techo('</pre>');*/\n\n\t\t//$nik = $data['emp_attrb'][0]['empcode'];\n\t\t$loop_nik = $data['emp_attrb'];\n\n\t\tforeach ($loop_nik as $key) {\n$nik = $key['empcode'];\n$data_slip = array(\n\t\t\t/*\"empcode\" => $nik,*/\n\t\t\t\"emp_attrb\" => $this->rpt_slip_gaji->slip_gaji($nik, $dept_id, $position_id, $year, $month),\n\t\t\t\"bulan\" => $month,\n\t \"print_date\" => $print_date,\n\t \"tahun\" => $year\n\t );\n\t$this->pdf->setPaper('A4','potrait');\n $this->pdf->load_view('rpt_slip_gaji', $data_slip);\n\n\t /*echo('<pre>');\n\t\tprint_r($data_slip);\n\t\techo('</pre>');*/\n\t\t\t}\t\n\t\t//echo $nik;\n\t\t\n\t \n\n\n /* $this->pdf->setPaper('A4','potrait');\n $this->pdf->load_view('rpt_slip_gaji', $data);*/\n\n\t}", "title": "" }, { "docid": "176b418ed3f1d195aab74860aba4fccb", "score": "0.61648464", "text": "public function print_activity() {\n $doc = $this->generate_pdf_object();\n $doc->Output('preview.pdf', 'I');\n }", "title": "" }, { "docid": "ba27ca9958eefd192bfaee03f6e74af7", "score": "0.6163535", "text": "public function downloadPDF($id)\n {\n $consulta = tbl_consultas::find($id);;\n\n // share data to view\n view()->share('consulta', $consulta);\n $pdf = PDF::loadView('reporteConsulta');\n\n // download PDF file with download method\n return $pdf->download('consulta' . $consulta->c_id . 'pdf');\n }", "title": "" }, { "docid": "8337f534723752f12a3564f987bb1d2d", "score": "0.61612856", "text": "function generatePageWithPDF($body, $title) {\n $page = <<<HTML\n<!doctype html>\n <html>\n <head>\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/pdf.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/pdf.worker.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/Chart.bundle.min.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/js/websocket-addr.js\"></script>\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/ParrotPoint/static/dist/bootstrap/css/bootstrap.min.css\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/ParrotPoint/static/css/lecture-view.css\">\n \n <title>$title</title>\n </head>\n <body>\n <div id=\"main\">\n $body\n </div>\n\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/bootstrap/jquery-3.2.1.min.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/bootstrap/js/bootstrap.min.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/dist/download.js\"></script>\n <script type='text/javascript' src=\"/ParrotPoint/static/js/lecture-view.js\"></script>\n\n </body>\n\n </html>\nHTML;\n\n return $page;\n }", "title": "" }, { "docid": "d5f0e4b8d5ece772052864f7b09f27d8", "score": "0.6158167", "text": "public function actionPdf()\n {\n //$dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $this->layout = 'pdf';\n $html = $this->render('show');\n //'searchModel' => $searchModel,\n //'dataProvider' => $dataProvider]);\n $pdf = Yii::$app->pdf;\n $pdf->content = $html;\n return $pdf->render();\n\n }", "title": "" }, { "docid": "3e4cfa6232cdae1dc300a4de493b0ac9", "score": "0.61548096", "text": "public function listarPDF(){\n $instructores = Instructores::orderBy('id', 'desc')->get();\n $cont = Instructores::count();\n $pdf = \\PDF::loadView('pdf.instructorpdf',['instructores'=>$instructores,'cont'=>$cont]);\n return $pdf->download('instructor.pdf');\n }", "title": "" }, { "docid": "3add7af43578a000e84dd8f86d83631d", "score": "0.61406946", "text": "public function downloadCashBailManual()\n {\n $pathPublic = public_path('pdf/cashbailmanual.pdf');\n return response()->download($pathPublic);\n }", "title": "" }, { "docid": "f7fb209d3e1ec33c75fa90b489e00b99", "score": "0.61336863", "text": "public function generatePDF()\n {\n\n if (version_compare(PHP_VERSION, '7.2.0', '>=')) {\n // Ignores notices and reports all other kinds... and warnings\n error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);\n // error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough\n }\n \n $data = ['title' => 'Welcome to HDTuto.com'];\n $pdf = PDF::loadView('pdf', $data);\n \n return $pdf->download('pdf');\n \n }", "title": "" }, { "docid": "deb39337c62c4b61bbd9b5e1e2f6df3c", "score": "0.61286277", "text": "public function pdfview(Request $request)\n {\n $invoiceid=$request->invoiceid;\n $user_id=$request->user_id.'.pdf';\n $pay = DB::table(\"paymentstatus\")\n ->where('id','=', $invoiceid)\n ->get();\n view()->share('pay',$pay);\n if($request->has('download')){\n $pdf = PDF::loadView('pdfview');\n return $pdf->download($user_id);\n }\n return view('pdfview',compact('pay'));\n }", "title": "" }, { "docid": "9a8836c6146562da4cb83c87c78dfd61", "score": "0.6125986", "text": "public function show(Pdf $pdf)\n {\n //\n }", "title": "" }, { "docid": "3f67c56998d895196a75dbc66b278cc9", "score": "0.61247647", "text": "public function pdf()\n {\n $blocks = $this->repo->print();\n\n $uuid = Str::uuid();\n $pdf = \\PDF::loadView('print.frontend.block', compact('blocks'))->save('../storage/app/downloads/'.$uuid.'.pdf');\n\n return $uuid;\n }", "title": "" }, { "docid": "55625a7926f6ef09cbd9ee7d409c34b0", "score": "0.61212814", "text": "public function pdf($id) {\n $incidencia = Incidencia::find($id);\n $pdf = PDF::loadView('pdf.incidenciaPDF',compact('incidencia'));\n return $pdf->download('incidencia'.$incidencia->id.'detalle.pdf');\n }", "title": "" }, { "docid": "197be670854544701e656b73e7334416", "score": "0.6109637", "text": "public function downloadProposal(){\n $filename=$_REQUEST['file'];\n $path_file=\"seo_download/\".$_REQUEST['tool'].\"/\".$filename;\n//echo $path_file;exit;\n if(file_exists($path_file))\n {\n header(\"Content-type: application/octet-stream\");\n header(\"Content-Disposition: attachment; filename=$filename\");\n ob_clean();\n flush();\n readfile(\"$path_file\");\n exit;\n }\n }", "title": "" }, { "docid": "6e346824e330aceda2c2f2975abce4b4", "score": "0.6102435", "text": "public function displayFile(){\n $params = $this->getParams();\n if(sizeof($params)){\n $casebody_id = $params[0];\n $casebody = new Casebody();\n $casebody = $casebody->find($casebody_id);\n if($casebody!=null){\n //$casebody->loadFile();\n downloadFile($casebody->document_path,false);\n }\n }\n }", "title": "" }, { "docid": "f471c321795fe82aad810a753e705e6e", "score": "0.6101372", "text": "function facture_pdf($invoice, $download = true)\n{\n $invoice_number = $invoice->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_facture') . '/facture_pdf.php');\n $mpdf->WriteHTML($data);\n if ($download == true) {\n $mpdf->Output($invoice_number . '.pdf', 'D');\n } else {\n return $mpdf;\n }\n}", "title": "" }, { "docid": "cad52ba57a80d668e163ced4f081a438", "score": "0.6098198", "text": "public function pdfdetails(){\n $customer_data = $this->get_customer_data();\n return view('pdf')->with('customer_data',$customer_data);\n \n }", "title": "" }, { "docid": "75ff3265331a735ca34795d48f06ad92", "score": "0.6096352", "text": "public function actionPdf()\n {\n $html2pdf = Yii::app()->ePdf->HTML2PDF();\n\n $html2pdf->WriteHTML($this->renderPartial('printpdf', array('model'=>$this->loadModel($_REQUEST['id'])), true));\n $html2pdf->Output();\n \n ////////////////////////////////////////////////////////////////////////////////////\n\t}", "title": "" }, { "docid": "75ff3265331a735ca34795d48f06ad92", "score": "0.6096352", "text": "public function actionPdf()\n {\n $html2pdf = Yii::app()->ePdf->HTML2PDF();\n\n $html2pdf->WriteHTML($this->renderPartial('printpdf', array('model'=>$this->loadModel($_REQUEST['id'])), true));\n $html2pdf->Output();\n \n ////////////////////////////////////////////////////////////////////////////////////\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "e8c071d823c7e8c26083714d9cbd4baf", "score": "0.0", "text": "public function create()\n\t{\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "2aaf2ecaef4fe756e441fbe5133d649b", "score": "0.7765164", "text": "public function create()\n {\n return view('resource::create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.7725258", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.7571166", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.7571166", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "09a06518682f649f50825ae03a5f02c5", "score": "0.74306566", "text": "public function create(Resource $resource)\n {\n \n return view('resources.create', compact('resource'));\n }", "title": "" }, { "docid": "0040811f91da2137388f5b25ff0b7003", "score": "0.7402852", "text": "public function create()\n {\n // we don't need the create method which will show a frontend of forms\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7389879", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "59acf613824f0c3b37aa55dc50605250", "score": "0.7293594", "text": "public function create()\n {\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions() : [];\n\n // Render create view\n return $this->content('create', $options);\n }", "title": "" }, { "docid": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72870517", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "97f8d4d6f5ca725cf3e66f545b385fc5", "score": "0.7285464", "text": "public function create()\n {\n return view('formation.add-form');\n }", "title": "" }, { "docid": "43b99da6b88bf413a5a649ba3a67015e", "score": "0.72775674", "text": "public function create()\n\t{\n\t\treturn view($this->views . '.form')->with('obj', $this->model);\n\t}", "title": "" }, { "docid": "43b99da6b88bf413a5a649ba3a67015e", "score": "0.72775674", "text": "public function create()\n\t{\n\t\treturn view($this->views . '.form')->with('obj', $this->model);\n\t}", "title": "" }, { "docid": "241815ede3de07346cdc5dd5223c3297", "score": "0.72763926", "text": "public function create()\n {\n return view(\"pengeluaran.form\");\n }", "title": "" }, { "docid": "3068f5b3c0dfff179b7c9ecffe939b5b", "score": "0.7236101", "text": "public function create()\n {\n $countries = Country::all();\n $roles = Role::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('admins.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'roles', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "38ecc75a4d6989a8b4f4e8399b531681", "score": "0.7214343", "text": "public function create()\n {\n //\n return view('admin.forms.create');\n }", "title": "" }, { "docid": "2ba4890e70df9cc5460b64bc519b7725", "score": "0.72113186", "text": "public function actionCreate() {\n $model = new Form();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->form_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "53f6a6cabd482a9ba582ca823a9212fc", "score": "0.7206413", "text": "public function actionCreate()\n {\n $model=new Resources;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Resources']))\n {\n $model->attributes=$_POST['Resources'];\n $model->created_at = date(\"Y-m-d H:i:s\");\n $model->modified_at = date(\"Y-m-d H:i:s\");\n if($model->is_available == \"on\"){\n $model->is_available = 1;\n }\n else{\n $model->is_available = 0;\n }\n if($model->save())\n $this->redirect(array('view','id'=>$model->resource_id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n 'from' => \"create\",\n ));\n }", "title": "" }, { "docid": "ec6c48e2a6c77e52e3dd220e9a42790d", "score": "0.7201594", "text": "public function create()\n {\n return view('RequestForms.requestforms.create');\n }", "title": "" }, { "docid": "b85c23612f97bf86113f4c24770e2c90", "score": "0.7178601", "text": "public function create()\n {\n return view('be/forms/add');\n }", "title": "" }, { "docid": "9b078c37b7def3d0aa0936448ea591e4", "score": "0.71761626", "text": "public function form()\n {\n return view('create');\n }", "title": "" }, { "docid": "abcdd6ee800f478cd20431244af3bd42", "score": "0.7163259", "text": "public function newAction()\n {\n $this->view->form = new ClientForm(null, array('edit' => true));\n }", "title": "" }, { "docid": "333b7adf43052fb5d5c8718573f770bd", "score": "0.7161001", "text": "public function create()\r\n {\r\n return view('ask::form');\r\n }", "title": "" }, { "docid": "83a47d90318500ad98cc612ab26fc702", "score": "0.71600026", "text": "public function create(){\n $resourceStatuses = ResourceStatus::orderBy('name', 'ASC')->get();\n $resourceTypes = ResourceType::orderBy('name', 'ASC')->get();\n $dependencies = Dependency::orderBy('name', 'ASC')->get();\n $resourceCategories = ResourceCategory::orderBy('name', 'ASC')->get();\n $physicalStates = PhysicalState::orderBy('name', 'ASC')->get();\n $spaces = Space::orderBy('name', 'ASC')->get();\n\n return view('admin.resources.create_edit')\n ->with('spaces', $spaces)\n ->with('resourceStatuses', $resourceStatuses)\n ->with('resourceTypes', $resourceTypes)\n ->with('dependencies', $dependencies)\n ->with('resourceCategories', $resourceCategories)\n ->with('physicalStates', $physicalStates)\n ->with('title_page', 'Crear nuevo recurso')\n ->with('menu_item', $this->menu_item);\n }", "title": "" }, { "docid": "7f194de3c5c17bb40860b2954fe66227", "score": "0.71589166", "text": "public function create()\n {\n return view('Application_Form/create');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7154643", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "dda7015eff0593458f7e9daeb92389f7", "score": "0.7145171", "text": "public function create()\r\n {\r\n Breadcrumb::title(trans('admin_partner.create'));\r\n return view('admin.partner.create_edit');\r\n }", "title": "" }, { "docid": "b4766fe7cffd9556005a702266efce82", "score": "0.71340024", "text": "public function create()\n {\n return view('luot-choi.form');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.7132318", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "97209db276d73dfc71ffc10ef4a4037f", "score": "0.71307987", "text": "public function create()\n {\n return view('book.form');\n }", "title": "" }, { "docid": "91f24bb86cd15eed211f58196f1d86ae", "score": "0.71291846", "text": "public function create()\n {\n return view('backend.Professor.add');\n }", "title": "" }, { "docid": "c571604fd51a96c35378cece2d31fca9", "score": "0.71216285", "text": "public function create()\n {\n return view('component.form');\n }", "title": "" }, { "docid": "d97704263c26734e129cdf5323ff60bc", "score": "0.712072", "text": "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCResourcePersonBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "title": "" }, { "docid": "11be4c91a1fe4a200ba70320116d65bd", "score": "0.7116245", "text": "public function newAction()\n {\n $entity = new Form();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FormBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115064", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.7115064", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "e864dc2fb3b7132697f36b0ed311645c", "score": "0.7113399", "text": "public function create()\n {\n //\n\n $modules = Module::getFormModulesArray();\n\n return view('resources.create', compact('modules'));\n }", "title": "" }, { "docid": "5d55890bc62628c68b42c85ea77e34ab", "score": "0.71113306", "text": "public function create()\n {\n //return the form\n return view('addBrand');\n }", "title": "" }, { "docid": "250053e797e8b6427e70e0bf8a821f82", "score": "0.71032274", "text": "public function create()\n {\n return view('singularForm');\n }", "title": "" }, { "docid": "4ae755f5cddde08f9f196daabb710be5", "score": "0.710147", "text": "public function create()\n {\n return view('rest.create');\n }", "title": "" }, { "docid": "730158469e1bfb64d8c0b14e02113fed", "score": "0.7092684", "text": "public function create()\n { \n return $this->showForm();\n }", "title": "" }, { "docid": "30ab8989b95dcf9d797d22a8cedaf241", "score": "0.70857835", "text": "public function create()\n {\n return view ('walas.form');\n }", "title": "" }, { "docid": "d1aa4707a9c6ebf5c8103249dbc1a2a3", "score": "0.7084853", "text": "public function create()\n {\n $view = 'create';\n\n $active = $this->active;\n $word = $this->create_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = null;\n\n return view('admin.crud.form', compact($this->compact));\n }", "title": "" }, { "docid": "e72578b08d1332567faf884e2c542543", "score": "0.7081182", "text": "public function create()\n {\n //\n return view('Hrm.create');\n }", "title": "" }, { "docid": "1d478e63e74fbe4c05b862772d019539", "score": "0.70710653", "text": "public function create()\n\t{\n\t\treturn View::make('referrals.create');\n\t}", "title": "" }, { "docid": "b7d9a98626783303d6641ee55810a61c", "score": "0.7066572", "text": "public function create()\n {\n return view ('mapel.form');\n }", "title": "" }, { "docid": "ef53dfc7738110e45d9007d473bd71d5", "score": "0.70557994", "text": "public function newAction()\n {\n $user = $this->getUser();\n $entity = new Program();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SifoAdminBundle:new:layout.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'user' => $user,\n ));\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.7051014", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70488346", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "24de1eba4953f740bc6a118cfe591c83", "score": "0.7046393", "text": "public function create()\n\t{\n\t\treturn view('terapis.create');\n\t}", "title": "" }, { "docid": "620ab4a3a65ec50a3ce7567f8eb824b6", "score": "0.704025", "text": "public function create()\n {\n return view('periode.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "f6a3aae712481bebdb682e358afe1838", "score": "0.7035376", "text": "public function create()\n {\n return view('addnew');\n }", "title": "" }, { "docid": "6e681e9ac9f85217033ef4f7a3bbf71a", "score": "0.7027635", "text": "public function new()\n {\n return view('api.create');\n }", "title": "" }, { "docid": "2d5b7eca3b39b1bc57b0ee331b2b4be2", "score": "0.70164144", "text": "public function create()\n {\n return view('cr.create');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7014195", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.7014195", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "815b2bb0c304d8b5c4fe1f4daf2ceec4", "score": "0.70019", "text": "public function newAction()\n {\n $entity = new Contratos();\n $form = $this->createForm(new ContratosType(), $entity);\n\n return $this->render('ContratosBundle:Contratos:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "352b208a6732c907e34599651886889d", "score": "0.69886494", "text": "public function newAction()\n {\n $entity = new Presupuesto();\n $entity->setFecha(new \\DateTime(\"now\"));\n $form = $this->createForm(new PresupuestoType(), $entity);\n\n return $this->render('SisafBundle:Presupuesto:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c8b3173ebb54a31ce2b94ee2bb8bfa2c", "score": "0.69817126", "text": "public function newAction()\n {\n $this->view->form = new PeliculaForm(null, array('edit' => true));\n }", "title": "" }, { "docid": "186fd4dd8e12d5f9b7757f0a686adc29", "score": "0.6976544", "text": "public function create()\n {\n //\n \n return view('students.add-record');\n }", "title": "" }, { "docid": "ed971a374ffda4f996862b4981ac44db", "score": "0.69750404", "text": "public function create() {\n\n\t\t//Pasamos los datos antiguos del form o un objeto vacio a la vista\n\t\treturn view('balance.entry.insert', [\n\t\t\t'title' \t=> 'Insertar Registro',\n\t\t\t'action' \t=> [\n\t\t\t'name' => 'insert',\n\t\t\t'value' => 'Insertar',\n\t\t\t'route' => '/entry/insert'\n\t\t\t],\n\t\t\t'concepts'\t=> Concepts::all('name', 'id'),\n\t\t\t'entry'\t=> $this->createEntry (old())\n\t\t\t]\n\t\t\t);\n\n\t}", "title": "" }, { "docid": "ac3176c7f03421a5d8485f79ce8a5af7", "score": "0.6973437", "text": "public function create()\n {\n //\n return view('admin.forms.form-produto');\n }", "title": "" }, { "docid": "b448943ed550a7fe66b7e558cb34571d", "score": "0.69728976", "text": "public function create()\n {\n\t\treturn view('admin.pages.material-form-create', ['page' => 'material']);\n }", "title": "" }, { "docid": "f552f3b31ae1d146915cc557308d9ddf", "score": "0.6971793", "text": "public function create()\n {\n $controls = [\n [\n 'type' => 'text',\n 'name' => 'title',\n 'title' => 'Название',\n 'placeholder' => 'Введите название'\n ],\n ];\n\n return view('control-form.create', [\n 'title' => 'Добавить новый жанр',\n 'controls' => $controls,\n 'button_title' => 'Все жанры',\n 'button_route' => 'genre.index',\n 'route_store' => 'genre.store',\n ]);\n }", "title": "" }, { "docid": "77f3e1fd596cfdf21d9eae9a8efaa862", "score": "0.69624966", "text": "public function create()\n\t\t{\n\t\t\treturn view('kalender.create');\n\t\t}", "title": "" }, { "docid": "5de84c2126fe48e85ce132c9fbb06f89", "score": "0.6961745", "text": "public function newAction()\n {\n $entity = new Section();\n $form = $this->createForm(new SectionType(), $entity);\n\n return $this->render('OrchestraOrchestraBundle:Section:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "c259b246490a579b8d14c75187100711", "score": "0.6956187", "text": "public function create()\n {\n //\n return view(env('THEME').'.form');\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69483584", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "468549dd2c5b7deb7ef57808ae25eb96", "score": "0.6946722", "text": "public function newAction()\n {\n $entity = new Representation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('DevPCultBundle:Representation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "93bc20f90c626c640e22d48a58c57dc8", "score": "0.6944638", "text": "public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('customer', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Customer');\n\n\t\t$this->content = View::factory('customer/form', array(\n\t\t\t'title' => __('Create new customer'),\n\t\t\t'customer' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('customer', array('action' => 'save'))\n\t\t));\n\t}", "title": "" }, { "docid": "bfc152f36ac3a238d17495dc7b11b127", "score": "0.6943581", "text": "public function create() {\n\t\t//\n\t\treturn view('matakuliah.create');\n\t}", "title": "" }, { "docid": "3646d78424385e5a1829ad7679cf8113", "score": "0.6938469", "text": "public function create()\n {\n abort_if(Gate::denies('user_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $forms = Form::all(['id', 'name']);\n return view('admin.form.create',[\n 'forms' => $forms\n ]);\n }", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.69359136", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "f19095884fa0edb7061608c09bb71e8d", "score": "0.69331646", "text": "public function create()\n {\n return view(static::$resource::uriKey() . '.create');\n }", "title": "" }, { "docid": "c617fff7a1564553ef77993e1b2abce0", "score": "0.6929938", "text": "public function create()\n\t{\n\t\treturn View::make('pertanians.create');\n\t}", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6926868", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "978bcc6315cbc834f3ebe718240ae1d3", "score": "0.6926868", "text": "public function create()\n {\n return view('actions.create');\n }", "title": "" }, { "docid": "a5971cddc1452c95970f26bbe6bb5e6f", "score": "0.69218993", "text": "public function create()\n\t{\n\t\treturn view('baloncestos.create');\n\t}", "title": "" }, { "docid": "0b29daaacb3707cc487ca300065d6c2d", "score": "0.6921726", "text": "public function create()\n {\n return view('Admin/product/form');\n }", "title": "" }, { "docid": "5517acddff8c143f08d4836b4e8fd2e3", "score": "0.69208306", "text": "public function create()\n\t{\t\n\n\t\treturn view('karyawan.create');\n\t}", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.69171804", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "1d6a11dbd501ca5d140d052e376ab852", "score": "0.6916337", "text": "public function create()\n {\n //\n return view('security_form/create');\n }", "title": "" }, { "docid": "d4c80824a85a6929fc348476de3eca98", "score": "0.69128764", "text": "public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n return $this->render('StalkAdminBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6912325", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "48be68f2d9bd5c305c8873ab5aff62d3", "score": "0.6909776", "text": "public function create()\n\t{\n\t\t//\n\n return view ('control.create');\n\t}", "title": "" }, { "docid": "e8cca05e3e15a063aab85a8139089f03", "score": "0.6908148", "text": "public function create()\n\t{\n\t\treturn View::make('actions.create');\n\t}", "title": "" }, { "docid": "9b7a38de3bb00757b81dc1254498c827", "score": "0.6906293", "text": "public function create()\n {\n //\n return view(\"admin.admin.add\");\n }", "title": "" }, { "docid": "5519441f340b7c0a79f84cf3d36493f2", "score": "0.6904411", "text": "public function create()\n {\n return view('bookshelfs.create');\n }", "title": "" }, { "docid": "f608122e33d25f55691c654ca00c5667", "score": "0.6903206", "text": "public function create()\n {\n //\n view('backend.form.post');\n }", "title": "" }, { "docid": "e9b252f908807559380ec3e0133efd8e", "score": "0.69019526", "text": "public function create()\n\t{\n\t\treturn view('background.form');\n\t}", "title": "" }, { "docid": "e88b17f0dfcb8e1d7ac04c5b9f6af8f1", "score": "0.6901707", "text": "public function create()\n {\n return view('cars.form');\n }", "title": "" }, { "docid": "0bfd2732af9e7c334472e3d359a90660", "score": "0.6899773", "text": "public function newAction()\r\n {\r\n return view('new::new');\r\n }", "title": "" }, { "docid": "b0e63a1ed98c6d4fef9c0ef1f2d36a46", "score": "0.6898081", "text": "public function create()\n {\n return view('digemid::create');\n }", "title": "" }, { "docid": "a0881f7e221b4df400147e74c85c747d", "score": "0.68962437", "text": "public function create()\n {\n Return View::make(\"manufacture.add\");\n }", "title": "" }, { "docid": "500865703b94c25ca90c99ae01ee90e3", "score": "0.6894999", "text": "public function new()\n {\n $this->denyAccessUnlessGranted('ROLE_ADMIN');\n\n $form = $this->createNewForm(new Relation());\n\n return $this->render('@IntegratedContent/relation/new.html.twig', [\n 'form' => $form->createView(),\n ]);\n }", "title": "" }, { "docid": "1dbd74dcb3f0ceb2fd4fb4fd641e0384", "score": "0.68945193", "text": "public function create()\n {\n return view('backend.instruktur.form');\n }", "title": "" }, { "docid": "b0dd1ae1c23ce5ea02e38a9b85427b1e", "score": "0.68938804", "text": "public function create()\n \t{\n \t\treturn view('terapiobat.create');\n \t}", "title": "" }, { "docid": "8e97605e60c08e7be60f2ce241d8675e", "score": "0.6890163", "text": "public function create()\n {\n return view('administration.create');\n }", "title": "" }, { "docid": "0075ba982bed082bc50bd31893c5082e", "score": "0.688938", "text": "public function create()\n {\n //\n $BookId = Book::max('id')+1;\n $BookId = \"BOOKID-\".str_pad($BookId, 4, '0', STR_PAD_LEFT);\n\n $data = array(\n 'bookId'=>$BookId,\n 'form'=>\"create\",\n );\n return view('book.form')->with($data);\n }", "title": "" }, { "docid": "e9341a1375b53713ef8760a5689b525f", "score": "0.68893236", "text": "public function create()\n {\n return view('bookself.create');\n }", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6888427", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "b7654a4ac084aa2dc258dde927666f09", "score": "0.6887694", "text": "public function create()\n {\n return view (\"student.create\");\n }", "title": "" } ]
c090d0a4b7b49368e092946ff0cd71e9
Removes all key registered known of this memcached server.
[ { "docid": "8f173cf8d5187526b9a74b64d6b47334", "score": "0.60197514", "text": "public function remove() {\n $delay = 0;\n if ( ! $this->memcached->flush( $delay = NULL ) ) {\n throw new \\InvalidArgumentException ( 'Error removing all memcached key: ' );\n }\n return TRUE;\n }", "title": "" } ]
[ { "docid": "fbc80f49acd2233e2d2f4bb06d2d1000", "score": "0.70818985", "text": "public function flush()\r\r\n\t{\r\r\n\t\t$keys = eaccelerator_list_keys();\r\r\n\t\tforeach ($keys as $key)\r\r\n\t\t{\r\r\n\t\t\t$key_to_remove = ($key['name'][0] == ':') ? substr($key['name'], 1, strlen($key['name'])) : $key['name'];\r\r\n\t\t\teaccelerator_rm($key_to_remove);\t\t\t\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "2a2b3048a043a5e162aa522ec69545d8", "score": "0.68565935", "text": "public function destroyKeys()\n {\n $this->config\n ->deleteConfig(self::CONFIG_XML_PATH_PUBLIC_KEY, 'default', 0)\n ->deleteConfig(self::CONFIG_XML_PATH_PRIVATE_KEY, 'default', 0)\n ->deleteConfig(self::CONFIG_XML_PATH_AUTH_TOKEN, 'default', 0);\n\n $this->cacheManager->clean([CacheTypeConfig::TYPE_IDENTIFIER]);\n }", "title": "" }, { "docid": "6a8172fabe49b77b717d7eb70613a67e", "score": "0.67099553", "text": "public function deleteAllKeys()\n {\n return $this->_cachedData = array();\n }", "title": "" }, { "docid": "801341a817d838c120f8715005006898", "score": "0.6699074", "text": "abstract function KeyDeleteAll();", "title": "" }, { "docid": "4bd55b203a4108dc5cb02671fcae3ac7", "score": "0.6543989", "text": "public function clear()\n {\n foreach ($this->keys() as $key) {\n unset($this->_store[$key]);\n }\n $frozenKeys = \\array_keys($this->_frozen);\n foreach ($frozenKeys as $key) {\n unset($this->_frozen[$key]);\n }\n }", "title": "" }, { "docid": "0f0c8404564e3bd53a98068f87221a2a", "score": "0.6425885", "text": "public function clearAllPersistentData() {\n foreach (self::$supported_keys as $key) {\n $this->clearPersistentData($key);\n }\n }", "title": "" }, { "docid": "877d2f00fc3a5a1b122924c6e20eab2d", "score": "0.6420557", "text": "public function flush()\n\t{\n\t\t$keyList=$this->getKeyList();\n\t\t$cache=$this->getCache();\n\t\tforeach ($keyList as $key)\n\t\t{\n\t\t\t$cache->delete($key);\n\t\t}\n\t\t// Remove the old keylist\n\t\t$cache->delete($this->getKeyListId());\n\t}", "title": "" }, { "docid": "e3d334849ae22f0a116489407e566b7f", "score": "0.641429", "text": "public function clear()\n\t{\n\t\tforeach(array_keys($this->_d) as $key)\n\t\t\t$this->remove($key);\n\t}", "title": "" }, { "docid": "15f852180bc79d225e311da0735f5798", "score": "0.64099514", "text": "public function delete_all()\n {\n return $this->memcached_instance->flush();\n }", "title": "" }, { "docid": "c21cad535b9cd7eded5978ba45e70770", "score": "0.6397717", "text": "public function clear()\n {\n $this->store->forget($this->key);\n }", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.63837713", "text": "public function forget($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.63837713", "text": "public function forget($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.63837713", "text": "public function forget($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.63837713", "text": "public function forget($key);", "title": "" }, { "docid": "434204814d975f5124daadc761b9872a", "score": "0.63837713", "text": "public function forget($key);", "title": "" }, { "docid": "d521262054f5059e4c62244149e7a4b5", "score": "0.63390666", "text": "public function unsetKey(): void\n {\n $this->key = [];\n }", "title": "" }, { "docid": "4867356ec47ae52cd7185f8ea9d3b069", "score": "0.6296914", "text": "function newt_clear_key_buffer(){}", "title": "" }, { "docid": "32594401584364a3d95d39df90634ced", "score": "0.6224363", "text": "function cleanup(): void\n {\n foreach ($this->listKeys() as $_);\n }", "title": "" }, { "docid": "822b56c37c5cf4c64bacc6677155d74d", "score": "0.62080634", "text": "public function clearAllCache();", "title": "" }, { "docid": "b1f78e1bf2a49774eae21a80db51a78a", "score": "0.6177474", "text": "protected function clearCacheKeyPrefix()\n {\n Yii::$app->{$this->cache}->delete($this->cacheKeyPrefixName);\n if ($this->backupCache) {\n Yii::$app->{$this->backupCache}->delete($this->cacheKeyPrefixName);\n }\n }", "title": "" }, { "docid": "dc895db16753ccf10765aedb9a531d1f", "score": "0.6148427", "text": "private function clearMemCached()\n {\n echo 'Clearing data cache' . PHP_EOL;\n\n $default = [\n 'servers' => [\n 0 => [\n 'host' => '127.0.0.1',\n 'port' => 11211,\n 'weight' => 100,\n ],\n ],\n 'client' => [\n \\Memcached::OPT_PREFIX_KEY => 'api-',\n ],\n 'lifetime' => 86400,\n 'prefix' => 'data-',\n ];\n\n $options = $this->config->path('cache.options.libmemcached', null);\n if (true !== empty($options)) {\n $options = $options->toArray();\n } else {\n $options = $default;\n }\n\n $servers = $options['servers'] ?? [];\n $memcached = new \\Memcached();\n foreach ($servers as $server) {\n $memcached->addServer($server['host'], $server['port'], $server['weight']);\n }\n\n $keys = $memcached->getAllKeys();\n // 7.2 countable\n $keys = $keys ?: [];\n echo sprintf('Found %s keys', count($keys)) . PHP_EOL;\n foreach ($keys as $key) {\n if ('api-data' === substr($key, 0, 8)) {\n $server = $memcached->getServerByKey($key);\n $result = $memcached->deleteByKey($server['host'], $key);\n $resultCode = $memcached->getResultCode();\n if (true === $result && $resultCode !== \\Memcached::RES_NOTFOUND) {\n echo '.';\n } else {\n echo 'F';\n }\n }\n }\n\n echo PHP_EOL . 'Cleared data cache' . PHP_EOL;\n }", "title": "" }, { "docid": "521f0554879095e507c28f3a2aec4938", "score": "0.6096679", "text": "public static function clearCache()\r\n {\r\n $path = static::KEY_STORE_PATH . class_basename(get_called_class());\r\n\r\n if (!File::exists($path))\r\n return;\r\n\r\n foreach(file($path) as $line)\r\n Cache::forget(trim($line));\r\n\r\n File::put($path, '');\r\n }", "title": "" }, { "docid": "704c8d5f00d5b234eee27aef0be70b45", "score": "0.6073281", "text": "public function forget(string $key): void\n {\n $this->store->forget($this->getCacheEntryKey('[keys]'));\n $this->store->forget($this->getCacheEntryKey($key));\n }", "title": "" }, { "docid": "da82e4de7c0b66e7856625b0590414f2", "score": "0.6061965", "text": "public function del($key){}", "title": "" }, { "docid": "da82e4de7c0b66e7856625b0590414f2", "score": "0.6061965", "text": "public function del($key){}", "title": "" }, { "docid": "3271ed7a960665dd4d61ceddad10b82e", "score": "0.60472846", "text": "public function forget($keys = null);", "title": "" }, { "docid": "3f4f250f2cf1b6cf3ba44f6d0d0ce67c", "score": "0.5996035", "text": "public function del($key);", "title": "" }, { "docid": "3f4f250f2cf1b6cf3ba44f6d0d0ce67c", "score": "0.5996035", "text": "public function del($key);", "title": "" }, { "docid": "8bba95d40cbedd1ac0117cc735646079", "score": "0.5981418", "text": "public function clean_expired_keys() {\n\t\t$this->key_service->clean_expired_keys( $this->get_link_ttl() );\n\t}", "title": "" }, { "docid": "5271c45a3d4c3272274506bac791fb7e", "score": "0.59259874", "text": "private function freeKey(string $key)\n {\n unset($this->usedKeys[$key]);\n }", "title": "" }, { "docid": "ab8087120cd46b06ada157b74e09170c", "score": "0.59226537", "text": "public function _clearPlayers ()\n {\n foreach (array_keys($this->_players) as $playerName)\n {\n $this->_clearPlayer($playerName);\n }\n }", "title": "" }, { "docid": "123c58605a9694b3af80b2b6cdc35d9c", "score": "0.5918823", "text": "public function delete_all()\n\t{\n\t\t$result = $this->_memcache->flush();\n\n\t\t// We must sleep after flushing, or overwriting will not work!\n\t\t// @see http://php.net/manual/en/function.memcache-flush.php#81420\n\t\tsleep(1);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3c7c0e85e6f2bcf89cee7ce10c02c098", "score": "0.59090376", "text": "public function remove($key) {}", "title": "" }, { "docid": "79d3f470e28c90d52ae8fa4d817b4c43", "score": "0.59065163", "text": "public function clear(): void\n {\n if (isset($this->session[$this->key])) {\n unset($this->session[$this->key]);\n }\n }", "title": "" }, { "docid": "eb290105f17df91b20a4d83321810287", "score": "0.59063727", "text": "public function __unset($key);", "title": "" }, { "docid": "fafae59b1fd9742e60fb31c17c3f0b57", "score": "0.5872266", "text": "public function reset()\n {\n Redis::del($this->cacheKey());\n }", "title": "" }, { "docid": "fafae59b1fd9742e60fb31c17c3f0b57", "score": "0.5872266", "text": "public function reset()\n {\n Redis::del($this->cacheKey());\n }", "title": "" }, { "docid": "26ef2474696678ed8ee5996e20d039a3", "score": "0.5855057", "text": "public static function flushCache($key)\n\t{\n\t\tif (function_exists('apc_delete')) {\n\t\t\tapc_delete($key);\n\t\t}\n\t}", "title": "" }, { "docid": "d0da4575faebd0a3e92af81a4ee46b45", "score": "0.58462495", "text": "public function test_can_delete_all_existing_keys() {\n global $DB;\n\n $manager = new core_userkey_manager($this->config);\n\n create_user_key('auth/userkey', $this->user->id);\n create_user_key('auth/userkey', $this->user->id);\n create_user_key('auth/userkey', $this->user->id);\n\n $keys = $DB->get_records('user_private_key', array('userid' => $this->user->id));\n $this->assertEquals(3, count($keys));\n\n $manager->delete_keys($this->user->id);\n\n $keys = $DB->get_records('user_private_key', array('userid' => $this->user->id));\n $this->assertEquals(0, count($keys));\n }", "title": "" }, { "docid": "88a92912fee25fbf89bf1f34461b47ad", "score": "0.58357644", "text": "public function del($key) {\r\n $this->redis->del($key);\r\n }", "title": "" }, { "docid": "0c0c6f4a4176a947ee4287bc7dafe5a1", "score": "0.5832905", "text": "public function clear()\n {\n $shmid = shm_attach($this->sysvKey, $this->shmSize, $this->perm);\n shm_remove_var($shmid, self::VAR_KEY);\n }", "title": "" }, { "docid": "3fa671955e1f246a98b6dac46196d880", "score": "0.5823394", "text": "public static function clearAll()\n {\n foreach ($_SESSION as $key => $value) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "456d84445eb63b429da07a7174dd44c1", "score": "0.5817646", "text": "public function unregisterAll(){}", "title": "" }, { "docid": "7bf59e9c618e2bb4c25764b2f0e74dc4", "score": "0.58154154", "text": "public function decr($key);", "title": "" }, { "docid": "1b4799189356a7cd172467d759ee1894", "score": "0.58086175", "text": "private function clearSaved($key) {\r\n $this->attemptSessionStart();\r\n unset($_SESSION[$key]);\r\n }", "title": "" }, { "docid": "dcbdd78ac258f0c38768abbf9d0f47c6", "score": "0.5792704", "text": "public function clearCacheEntries() {\n\n\t\t$this->deleteCacheEntries();\n\n\t}", "title": "" }, { "docid": "45733ea93d06dd098b1e9fe3dd846591", "score": "0.5789547", "text": "public static function clear()\n {\n self::start();\n foreach (\\array_keys($_SESSION) as $key) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "b04530fb3004eb10577872cdd1b6e2c7", "score": "0.5785792", "text": "function apc_clear_cache_all(){\n apc_clear_cache();\n apc_clear_cache('user');\n apc_clear_cache('opcode');\n}", "title": "" }, { "docid": "765ab5a6e9be2071042818a6cfaecf36", "score": "0.5784343", "text": "public function del($keys);", "title": "" }, { "docid": "f4440c0c095077ee3c38b862e83a2c9f", "score": "0.57815796", "text": "function delete($key) {\n\t\t$registry =& Registry::getRegistry();\n\t\tif (isset($registry[$key])) {\n\t\t\tunset($registry[$key]);\n\t\t}\n\t}", "title": "" }, { "docid": "862709104e1b8ae9298a40d5a32765f3", "score": "0.5760924", "text": "public function clearCache($key) {\n $key = $this->makeHash($key);\n\n if ($this->_hasCache($key)) {\n unset($this->confCache[$key]);\n }\n }", "title": "" }, { "docid": "af80863ae9d2eac82598bea3d24c8ae2", "score": "0.5758982", "text": "public function clearCache(): void\n {\n $this->redisCache->delete($this->redisTag);\n }", "title": "" }, { "docid": "9c74b5f1dae4c29e30d1d1a0ee1a08a2", "score": "0.575768", "text": "static function clear()\n {\n\t/* OPTIMISATION NSTEIN 29/06/2009 */\n\tself::$registryCache = array();\n\n switch(self::getMode())\n {\n case 'APC':\n return apc_clear_cache();\n\n case 'Lite':\n default:\n require_once(WCM_DIR . '/includes/CacheLite/Lite.php');\n $config = wcmConfig::getInstance();\n $cache = new Cache_Lite(array(\n 'caching' => true,\n 'cacheDir' => self::getCacheDir(),\n 'automaticSerialization' => true,\n 'lifeTime' => $config['wcm.cache.lifeTime']));\n return $cache->clean();\n }\n }", "title": "" }, { "docid": "5b0ae2c2f6624fa8f4e211aecce038e9", "score": "0.57562095", "text": "public static function clearKeys(DBTopKManager $dbManager, string $key) {\n try {\n if ($dbManager->lock($key)) {\n $dbManager->deleteKeys(array(\n $key.StreamSummary::STREAM_SUM_KEY_CAP,\n $key.StreamSummary::STREAM_SUM_KEY_BUCK_CNT,\n $key.StreamSummary::STREAM_SUM_KEY_COUNTERS_MAP,\n $key.StreamSummary::STREAM_SUM_KEY_COUNTERS,\n $key.StreamSummary::STREAM_SUM_KEY_BUCKETS,\n ));\n }\n } finally {\n $dbManager->unlock($key);\n }\n }", "title": "" }, { "docid": "a36e814124cf3d8083e3ea4f8973df76", "score": "0.57542944", "text": "public function delete($key)\n {\n // Get list of keys to delete\n $keys = [];\n if ($key == '*') {\n $keys = $this->keys;\n } elseif (strpos($key, '*') === false) {\n $keys = [$key];\n } else {\n $pattern = str_replace('\\\\*', '.*', preg_quote($key));\n foreach ($this->keys as $k => $ttl) {\n if (preg_match('#^'.$pattern.'$#', $k)) {\n $keys[] = $k;\n }\n }\n }\n\n // Delete keys\n foreach ($keys as $key) {\n if (!isset($this->keys[$key])) {\n continue;\n }\n\n if ($this->_delete($key)) {\n unset($this->keys[$key]);\n }\n }\n\n $this->_writeKeys();\n\n return $keys;\n }", "title": "" }, { "docid": "ce7d92677d8688ed585f7c12b860d759", "score": "0.5751226", "text": "public function invalidate_all()\n {\n // Delete all entries of both content, meta and tag cache\n midgardmvc_core::get_instance()->cache->delete_all('content');\n midgardmvc_core::get_instance()->cache->delete_all('content_metadata');\n midgardmvc_core::get_instance()->cache->delete_all('content_tags');\n }", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "c16af6fb921d027964d939d01aa4af20", "score": "0.5739096", "text": "public function remove($key);", "title": "" }, { "docid": "5c9a9d1e8aaa25591343c5109e89ba63", "score": "0.57264835", "text": "public function clearAll() {\n\t\tparent::clearAll();\n\t\tforeach ($_SESSION as $k=>$v) {\n\t\t\tunset($_SESSION[$k]);\n\t\t}\n\t}", "title": "" }, { "docid": "5895fea6caabe1ed2adf7ecd22213751", "score": "0.5726326", "text": "public function remove(string $key): void;", "title": "" }, { "docid": "e95292f8c3fa767623f01417a689cb80", "score": "0.57260054", "text": "public function clearAllCaches() :void {\n\t\tCACHE::deleteForPrefix(Settings::GetProtected('DB_Table_UserAttributes') . '_for_userid_' );\n\t\tCACHE::deleteForPrefix(Settings::GetProtected('DB_Table_UserAttributes') . '_for_userid_');\n\t\tCACHE::deleteForPrefix( Settings::GetProtected('DB_Table_UserAttributes') . '_userAndAttrib_');\n\t\tCACHE::delete(Settings::GetProtected('DB_Table_UserAttributes') .'_ReadAll');\n\t}", "title": "" }, { "docid": "730e9eb3ea00adc962491d7da7bdcf67", "score": "0.57243395", "text": "public static function clear($key) {\n unset($_SESSION[SESSION_PREFIX . $key]);\n }", "title": "" }, { "docid": "3c9d0b737d75fade1b96e950179c934e", "score": "0.5724255", "text": "public function clear()\n {\n foreach(array_keys($_SESSION) as $key)\n unset($_SESSION[$key]);\n }", "title": "" }, { "docid": "8a9181f30a4383ceb0ae7d5ffdf96db7", "score": "0.5721081", "text": "function apc_delete ($key) {}", "title": "" }, { "docid": "b65a98aa6408dd9c5ba361f4db681907", "score": "0.5715247", "text": "function cache_del($key)\n{\n if( isset($_SESSION[\"system_internal_cache\"][$key]) )\n\t\tunset($_SESSION[\"system_internal_cache\"][$key]);\n\tif( system_is_module_loaded('globalcache') )\n\t\tglobalcache_delete($key);\n}", "title": "" }, { "docid": "d37afca0b6169a577eac0818b036b2f5", "score": "0.57136595", "text": "protected function flushValues()\n {\n $entries = $this->tags->entries()\n ->map(fn (string $key) => $this->store->getPrefix().$key)\n ->chunk(1000);\n\n foreach ($entries as $cacheKeys) {\n $this->store->connection()->del(...$cacheKeys);\n }\n }", "title": "" }, { "docid": "a2f3a2828c4cc3b6a50deebc2fed1834", "score": "0.5713018", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('movie', 'artist', 'saga', 'storage', 'loan');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "8274f28eef9bc430a3a1c713e7ea0ec2", "score": "0.57022566", "text": "public function delete($key)\n {\n $item = $this->pool->getItem($key);\n $item->clear();\n }", "title": "" }, { "docid": "35187b5fc20503911966282d6ecd1ceb", "score": "0.570148", "text": "protected function untag($key)\n {\n if (!$this->cache_pool) {\n return;\n }\n\n $item = $this->cache_pool->getItem('remote.'.$key);\n $item->delete();\n }", "title": "" }, { "docid": "5393251c681015bde28afc96b9f7fb33", "score": "0.56950605", "text": "public function forget($key)\n {\n $this->connect($key)->delete($this->prefix . $key);\n }", "title": "" }, { "docid": "6274b5268ebbbe8242dae955a218205c", "score": "0.56944823", "text": "public static function deleteAll() {\n $path = \\Forge\\Core::path('storage') .'cache');\n \n \\Folder::remove($path, true);\n }", "title": "" }, { "docid": "bd8be931f1998a17e561e8296562eac5", "score": "0.569365", "text": "public static function unregister($key)\r\n {\r\n if (isset(self::$_registry[$key])) {\r\n unset(self::$_registry[$key]);\r\n }\r\n }", "title": "" }, { "docid": "d3f2a9b79f137590a613ff7f3040a52a", "score": "0.56916916", "text": "protected function clearInstanceCache(){\r\n $mem = Edge::app()->cache;\r\n $logger = Edge::app()->logger;\r\n $index = $this->getInstanceIndexKey();\r\n $list = $mem->get($index);\r\n if($list && count($list) > 0){\r\n foreach($list as $item){\r\n $mem->delete($item);\r\n $logger->info('deleting from cache item ' . $item);\r\n }\r\n $mem->delete($index);\r\n $logger->info('deleting from cache index ' . $index);\r\n }\r\n }", "title": "" }, { "docid": "4c5cdd880377cf0b688e04745788814b", "score": "0.5689506", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('album', 'band', 'loan', 'storage');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "6958ca06d1c28ed37e8778af338908fb", "score": "0.5686658", "text": "public function mdelete(...$keys);", "title": "" }, { "docid": "6b67cb0fb303a0078ff515c14f7ea465", "score": "0.5680539", "text": "public function session_unsetAllData() {\n\t\t$this->session_killAllEverything();\n\t\t$this->debugarray[] = 'Killed all the session everything.';\n\t}", "title": "" }, { "docid": "8f8fa36fc98af8b4199d6fe277521657", "score": "0.56746143", "text": "function deleteAllUserKeys() {\n global $username;\n global $conn;\n\n $sql = \"DELETE FROM password_reset_keys WHERE username = ?;\";\n\n if ($stmt = $conn->prepare($sql)) {\n $stmt->bind_param(\"s\", $param_username);\n $param_username = $username;\n\n if (!$stmt->execute()) {\n doSQLError($stmt->error());\n }\n\n $stmt->close();\n } else {\n doSQLError($conn->error);\n }\n }", "title": "" }, { "docid": "e28f9e445636accbebd3f2fd87b82b00", "score": "0.5674075", "text": "public function resetRegisteredCaches(): void\n {\n $this->registeredCaches = [];\n }", "title": "" }, { "docid": "c699c0dc9d1188a2c190978d8659c357", "score": "0.5673264", "text": "public static function forget($key) {\n\t\tself::delete($key);\n\t}", "title": "" }, { "docid": "ee98c2045fdc444ecedc6eec0948cacb", "score": "0.56709325", "text": "public function remove( $key );", "title": "" }, { "docid": "f44131817c8d72e9de73bb6e11fe4cee", "score": "0.566944", "text": "public function clear($key, $namespace);", "title": "" }, { "docid": "7f2cff8bb76b2ef9a56e4b91c3166147", "score": "0.5668891", "text": "public function clear()\n\t{\n\t\tforeach(glob(SYS_PATH.'cobalt/storage/cache/*.*') as $file)\n\t\t{\n\t\t\t@unlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "78bb86bd8b20f3071fd6294d7a11d06a", "score": "0.5664687", "text": "function remove()\n {\n global $db;\n $db->Execute(\"delete from \" . TABLE_CONFIGURATION . \" where configuration_key in ('\" . implode(\"', '\", $this->keys()) . \"')\");\n }", "title": "" }, { "docid": "dc41f5bf8747ce8bf380a687fda13343", "score": "0.56632376", "text": "public function delete($key)\n {\n \\Cache::forget($key);\n }", "title": "" }, { "docid": "3f4d14bb7fb06e76d951dc5a6419bdd6", "score": "0.56577444", "text": "public function flush()\n\t{\n\t\t$this->deleteForeverKeys();\n\t\t$this->deleteStandardKeys();\n\n\t\tparent::flush();\n\t}", "title": "" }, { "docid": "94d18c1ff43d19d2f253e273c8eda1a7", "score": "0.565511", "text": "public static function disconnectAll()\n\t\t{\n\t\t\tforeach (array_keys(self::$_connections) as $key) {\n\t\t\t\tif (self::$_connections[$key]) {\n\t\t\t\t\tself::$_connections[$key]->disconnect();\n\t\t\t\t}\n\t\t\t\tunset(self::$_connections[$key]);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ea9328bdc4d82b12ade4b9b58eb2f0c7", "score": "0.56520015", "text": "public static function remove(string $key);", "title": "" }, { "docid": "f613af2cf927dc836029c8551cea4f4d", "score": "0.5651977", "text": "public function unshare($key)\r\n {\r\n unset($this->container[$key]);\r\n }", "title": "" }, { "docid": "20288b0e5eeb7e44ba203c0178f7a673", "score": "0.56488836", "text": "public function deleteKey( $key = '' ) {\n\t\t$key_arr = (array) $key;\n\n\t\tforeach ( $key_arr as $key_to_del ) {\n\t\t\tunset( $this->data[ $key_to_del ] );\n\t\t}\n\t}", "title": "" } ]
12f0109bff617599078bd61f20bee103
Assert response is a hasmany related resource identifiers response.
[ { "docid": "fa80e23c8711b9f9fa01b0d1ee4a0477", "score": "0.0", "text": "public function assertReadHasManyIdentifiers($resourceType, $expectedIds = null)\n {\n if (is_null($resourceType)) {\n $this->assertSearchedNone();\n } elseif (!is_null($expectedIds)) {\n // @todo this checks for resources, not identifiers.\n $this->assertSearchedIds($expectedIds, $resourceType);\n } else {\n // @todo this checks for resources, not identifiers.\n $this->assertSearchedMany($resourceType);\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "5cf47a2ee24975238c9b15982dc42e09", "score": "0.6077252", "text": "public function testApiHasManyVehicles()\n {\n $data = $this->fetchJsonRequestAsObject('/api');\n \n $this->assertTrue(count($data->vehicles) > 1);\n }", "title": "" }, { "docid": "7777d87c5e1cc514168de18400f91078", "score": "0.6016467", "text": "public function testBuildsDiagnosticSignaturesGetToManyRelated()\n {\n }", "title": "" }, { "docid": "b2e110569eb75cb0a828c2fc9a0146cb", "score": "0.59097457", "text": "public function testBuildsBetaBuildLocalizationsGetToManyRelated()\n {\n }", "title": "" }, { "docid": "a4521b7d6e8d70784aba4aba64b3b7af", "score": "0.57034075", "text": "public function hasIds(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "c86ff89fc8728467299a49a23ea9b273", "score": "0.56875926", "text": "public function testHydrateHasMany(): void\n {\n $table = $this->getTableLocator()->get('authors');\n $this->getTableLocator()->get('articles');\n $table->hasMany('articles', [\n 'sort' => ['articles.id' => 'asc'],\n ]);\n $query = new SelectQuery($table);\n $results = $query->select()\n ->contain('articles')\n ->toArray();\n\n $first = $results[0];\n foreach ($first->articles as $r) {\n $this->assertInstanceOf('Cake\\ORM\\Entity', $r);\n }\n\n $this->assertCount(2, $first->articles);\n $expected = [\n 'id' => 1,\n 'title' => 'First Article',\n 'body' => 'First Article Body',\n 'author_id' => 1,\n 'published' => 'Y',\n ];\n $this->assertEquals($expected, $first->articles[0]->toArray());\n $expected = [\n 'id' => 3,\n 'title' => 'Third Article',\n 'author_id' => 1,\n 'body' => 'Third Article Body',\n 'published' => 'Y',\n ];\n $this->assertEquals($expected, $first->articles[1]->toArray());\n }", "title": "" }, { "docid": "8755eb5e495e0ab57f735a9223905506", "score": "0.55755275", "text": "public function testBuildsIconsGetToManyRelated()\n {\n }", "title": "" }, { "docid": "634c1444df2403e8650f314781a3194c", "score": "0.55537874", "text": "public function testBuildsIndividualTestersGetToManyRelated()\n {\n }", "title": "" }, { "docid": "7877af6516f176cd8da70f3a24bea3a4", "score": "0.5539786", "text": "public function testBuildsIndividualTestersGetToManyRelationship()\n {\n }", "title": "" }, { "docid": "d2821f514b54e9277ae601eb5a7f3e3a", "score": "0.5491494", "text": "public function testContainWithQueryBuilderHasManyError(): void\n {\n $this->expectException(DatabaseException::class);\n $table = $this->getTableLocator()->get('Authors');\n $table->hasMany('Articles');\n $query = new SelectQuery($table);\n $query->select()\n ->contain([\n 'Articles' => [\n 'foreignKey' => false,\n 'queryBuilder' => function ($q) {\n return $q->where(['articles.id' => 1]);\n },\n ],\n ]);\n $query->toArray();\n }", "title": "" }, { "docid": "4c3166e5878f82f79a02323fcef953f1", "score": "0.5484787", "text": "public function testResourcesAreListed()\n {\n $resource = factory(Resource::class)->create();\n $identifier = $resource->identifiers()->create(['value' => 'test-value']);\n\n $this->actingAs(factory(User::class)->states('admin')->create())\n ->get('resources/'.$resource->id.'/identifiers')\n ->assertSuccessful()\n ->assertSee($identifier->value);\n }", "title": "" }, { "docid": "dd0ee0e622b374f9bd93557b28773067", "score": "0.54284173", "text": "public function testQueryOnManyRelation() {\n\t\t$actual = self::$vtModuleOperation->wsVTQL2SQL(\"select productname,Assets.assetname from Products where Assets.assetname LIKE '%exy%';\", $meta, $queryRelatedModules);\n\t\t$this->assertEquals(\"select vtiger_products.productname, vtiger_products.productid FROM vtiger_products INNER JOIN vtiger_crmentity ON vtiger_products.productid = vtiger_crmentity.crmid WHERE vtiger_crmentity.deleted=0 AND vtiger_products.productid > 0 \", $actual);\n\t}", "title": "" }, { "docid": "f8ce79e6deb3268bf3106b9da6233214", "score": "0.54054815", "text": "public function testFilteringByHasManyHydration(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $query = new SelectQuery($table);\n $table->hasMany('Comments');\n\n $result = $query->setRepository($table)\n ->matching('Comments', function ($q) {\n return $q->where(['Comments.user_id' => 4]);\n })\n ->first();\n $this->assertInstanceOf('Cake\\ORM\\Entity', $result);\n $this->assertInstanceOf('Cake\\ORM\\Entity', $result->_matchingData['Comments']);\n $this->assertIsInt($result->_matchingData['Comments']->id);\n $this->assertInstanceOf(DateTime::class, $result->_matchingData['Comments']->created);\n }", "title": "" }, { "docid": "f4d4191db1dd4529468d2788c7ef587f", "score": "0.53864694", "text": "public function getEntitiesFromResponse();", "title": "" }, { "docid": "272d7cc46ffcf5989c80c33158995aa8", "score": "0.53643954", "text": "public function hasManyResults() {\n if (count($this->results) > 1) {\n return TRUE;\n }\n\n return FALSE;\n }", "title": "" }, { "docid": "bb3a97ab328142bbadc982b1d09940c5", "score": "0.5307107", "text": "public function testNotSoFarMatchingWithContainOnTheSameAssociation(): void\n {\n $table = $this->getTableLocator()->get('articles');\n $table->belongsToMany('tags');\n\n $result = $table->find()\n ->matching('tags', function ($q) {\n return $q->where(['tags.id' => 2]);\n })\n ->contain('tags')\n ->first();\n\n $this->assertEquals(1, $result->id);\n $this->assertCount(2, $result->tags);\n $this->assertEquals(2, $result->_matchingData['tags']->id);\n }", "title": "" }, { "docid": "0192426ab0b4159566028b61a48b1c68", "score": "0.5258477", "text": "public function testFormatResultsBelongsToMany(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $this->getTableLocator()->get('Tags');\n $articlesTags = $this->getTableLocator()->get('ArticlesTags', [\n 'table' => 'articles_tags',\n ]);\n $table->belongsToMany('Tags');\n\n $articlesTags\n ->getEventManager()\n ->on('Model.beforeFind', function (EventInterface $event, $query): void {\n $query->formatResults(function ($results) {\n foreach ($results as $result) {\n $result->beforeFind = true;\n }\n\n return $results;\n });\n });\n\n $query = new SelectQuery($table);\n\n $results = $query\n ->select()\n ->contain('Tags')\n ->toArray();\n\n $first = $results[0];\n foreach ($first->tags as $r) {\n $this->assertInstanceOf('Cake\\ORM\\Entity', $r);\n }\n\n $this->assertCount(2, $first->tags);\n $expected = [\n 'id' => 1,\n 'name' => 'tag1',\n '_joinData' => [\n 'article_id' => 1,\n 'tag_id' => 1,\n 'beforeFind' => true,\n ],\n 'description' => 'A big description',\n 'created' => new DateTime('2016-01-01 00:00'),\n ];\n $this->assertEquals($expected, $first->tags[0]->toArray());\n $this->assertInstanceOf(DateTime::class, $first->tags[0]->created);\n\n $expected = [\n 'id' => 2,\n 'name' => 'tag2',\n '_joinData' => [\n 'article_id' => 1,\n 'tag_id' => 2,\n 'beforeFind' => true,\n ],\n 'description' => 'Another big description',\n 'created' => new DateTime('2016-01-01 00:00'),\n ];\n $this->assertEquals($expected, $first->tags[1]->toArray());\n $this->assertInstanceOf(DateTime::class, $first->tags[0]->created);\n }", "title": "" }, { "docid": "c99fc16b8081be591d7ee2be610de7e7", "score": "0.52525693", "text": "public function testHydrateBelongsToMany(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $this->getTableLocator()->get('Tags');\n $this->getTableLocator()->get('ArticlesTags', [\n 'table' => 'articles_tags',\n ]);\n $table->belongsToMany('Tags');\n $query = new SelectQuery($table);\n\n $results = $query\n ->select()\n ->contain('Tags')\n ->toArray();\n\n $first = $results[0];\n foreach ($first->tags as $r) {\n $this->assertInstanceOf('Cake\\ORM\\Entity', $r);\n }\n\n $this->assertCount(2, $first->tags);\n $expected = [\n 'id' => 1,\n 'name' => 'tag1',\n '_joinData' => ['article_id' => 1, 'tag_id' => 1],\n 'description' => 'A big description',\n 'created' => new DateTime('2016-01-01 00:00'),\n ];\n $this->assertEquals($expected, $first->tags[0]->toArray());\n $this->assertInstanceOf(DateTime::class, $first->tags[0]->created);\n\n $expected = [\n 'id' => 2,\n 'name' => 'tag2',\n '_joinData' => ['article_id' => 1, 'tag_id' => 2],\n 'description' => 'Another big description',\n 'created' => new DateTime('2016-01-01 00:00'),\n ];\n $this->assertEquals($expected, $first->tags[1]->toArray());\n $this->assertInstanceOf(DateTime::class, $first->tags[1]->created);\n }", "title": "" }, { "docid": "210f65b2a828f7d99164dd305e0f8e9e", "score": "0.524533", "text": "public function testResponseHasArrayOfProducts()\n {\n $response = $this->getApiClient()->request(\n 'POST',\n 'api/program/alldigitalrewards/participant/TESTPARTICIPANT1/transaction',\n [\n 'headers' => $this->getHeaders(),\n 'body' => json_encode(\n [\n 'issue_points' => true,\n 'shipping' => [\n 'firstname' => 'Test Firstname',\n 'lastname' => 'Test Lastname',\n 'address1' => '123 Anywhere Street',\n 'city' => 'Denver',\n 'state' => 'CO',\n 'zip' => '80202'\n ],\n 'products' => [\n [\n 'sku' => 'HRA01',\n 'quantity' => 1,\n 'amount' => 10\n ],\n ],\n ]\n ),\n ]\n );\n\n $responseObj = json_decode($response->getBody());\n\n // Response MUST be status code 201\n $this->assertTrue(is_array($responseObj->products));\n }", "title": "" }, { "docid": "4b739d5c364d9dde013584cb61576331", "score": "0.522597", "text": "public function testHasMany()\n {\n // collections\n $sourceCollection = self::$database->getCollection('source');\n $onemanyTargetCollection = self::$database->getCollection('onemanyTarget');\n \n // add documents\n $sourceDocument = $sourceCollection\n ->createDocument(array('param' => 'value'))\n ->save();\n \n // add target documents\n $targetDocument1 = $onemanyTargetCollection\n ->createDocument(array(\n 'source_id' => $sourceDocument->getId()\n ))\n ->save();\n \n // add target document\n $targetDocument2 = $onemanyTargetCollection\n ->createDocument(array(\n 'source_id' => $sourceDocument->getId()\n ))\n ->save();\n \n // test \n $this->assertArrayHasKey((string) $targetDocument1->getId(), $sourceDocument->hasMany);\n $this->assertArrayHasKey((string) $targetDocument2->getId(), $sourceDocument->hasMany);\n \n // clear test\n $sourceCollection->delete();\n $onemanyTargetCollection->delete();\n }", "title": "" }, { "docid": "433585ce1c3a69125d4dc3f2ab1ad729", "score": "0.5203769", "text": "public function test_it_has_many_employees()\n {\n $company = Company::factory()->create();\n\n Employee::factory(5)->create([\n 'company_id' => $company->id,\n ]);\n\n $this->assertInstanceOf(Collection::class, $company->refresh()->employees);\n $this->assertCount(5, $company->refresh()->employees->all());\n }", "title": "" }, { "docid": "ed68bad417fa33b7b80c9a606dac3472", "score": "0.5202067", "text": "public function testIds()\n {\n $builder = new QueryBuilder();\n $result = $builder->ids([1, 2, 3]);\n $expected = [\n 'ids' => [\n 'values' => [1, 2, 3],\n ],\n ];\n $this->assertEquals($expected, $result->toArray());\n }", "title": "" }, { "docid": "c29f6c48976b3cf58bf4726f3bce2038", "score": "0.51946527", "text": "public function testReadRelated()\n {\n $model = factory(Post::class)->create();\n $comments = factory(Comment::class, 2)->create([\n 'commentable_type' => Post::class,\n 'commentable_id' => $model->getKey(),\n ]);\n\n /** This comment should not appear in the results... */\n factory(Comment::class)->states('post')->create();\n\n $response = $this\n ->jsonApi('comments')\n ->get(url('/api/v1/posts', [$model, 'comments']));\n\n $response\n ->assertFetchedMany($comments);\n }", "title": "" }, { "docid": "1ec876b761baecdeb6f9d5e148b09df6", "score": "0.51881254", "text": "public function hasRelationships();", "title": "" }, { "docid": "22a1e19a24a4c28fbc15231e8f6fca57", "score": "0.5170888", "text": "public function existsHasMany(string $modelName, string $modelRelation): bool\n {\n }", "title": "" }, { "docid": "e32adbcf63a47fdbc1f6947c0a512f17", "score": "0.517076", "text": "public function testBuildsPerfPowerMetricsGetToManyRelated()\n {\n }", "title": "" }, { "docid": "e3abb620d0cb47fccd4a594f1924e9bf", "score": "0.5170359", "text": "public function testBuildsBetaGroupsCreateToManyRelationship()\n {\n }", "title": "" }, { "docid": "13fbd724615b16f021ffa55ee25826d4", "score": "0.51667935", "text": "public function revisionIds(APIGlobalResponseInterface $entity);", "title": "" }, { "docid": "04046d25eb98d8c36a00719681386aba", "score": "0.51610297", "text": "public function testHasInRelationship(): void\n {\n $crud = $this->createCrud(PostsApi::class);\n\n $this->assertFalse($crud->hasInRelationship('1', Post::REL_COMMENTS, '1'));\n $this->assertTrue($crud->hasInRelationship('1', Post::REL_COMMENTS, '9'));\n }", "title": "" }, { "docid": "a427e561e94723b3cb4e023f4023454f", "score": "0.5122463", "text": "public function testBuildsIndividualTestersDeleteToManyRelationship()\n {\n }", "title": "" }, { "docid": "0ac87ef6470a11545859a3862c4c2713", "score": "0.512184", "text": "public function testContainFinderHasMany(): void\n {\n $table = $this->getTableLocator()->get('Authors');\n $table->hasMany(\n 'Articles',\n ['className' => 'TestApp\\Model\\Table\\ArticlesTable']\n );\n\n $newArticle = $table->newEntity([\n 'author_id' => 1,\n 'title' => 'Fourth Article',\n 'body' => 'Fourth Article Body',\n 'published' => 'N',\n ]);\n $table->save($newArticle);\n\n $resultWithArticles = $table->find('all')\n ->where(['id' => 1])\n ->contain([\n 'Articles' => [\n 'finder' => 'published',\n ],\n ]);\n\n $resultWithArticlesArray = $table->find('all')\n ->where(['id' => 1])\n ->contain([\n 'Articles' => [\n 'finder' => ['published' => []],\n ],\n ]);\n\n $resultWithArticlesArrayOptions = $table->find('all')\n ->where(['id' => 1])\n ->contain([\n 'Articles' => [\n 'finder' => [\n 'published' => [\n 'title' => 'First Article',\n ],\n ],\n ],\n ]);\n\n $resultWithoutArticles = $table->find('all')\n ->where(['id' => 1])\n ->contain([\n 'Articles' => [\n 'finder' => [\n 'published' => [\n 'title' => 'Foo',\n ],\n ],\n ],\n ]);\n\n $this->assertCount(2, $resultWithArticles->first()->articles);\n $this->assertCount(2, $resultWithArticlesArray->first()->articles);\n\n $this->assertCount(1, $resultWithArticlesArrayOptions->first()->articles);\n $this->assertSame(\n 'First Article',\n $resultWithArticlesArrayOptions->first()->articles[0]->title\n );\n\n $this->assertCount(0, $resultWithoutArticles->first()->articles);\n }", "title": "" }, { "docid": "a74f7e7ff211ca7d7da2a4ca8027f056", "score": "0.51117045", "text": "public function testNotMatchingBelongsToMany(): void\n {\n $table = $this->getTableLocator()->get('articles');\n $table->belongsToMany('tags');\n\n $results = $table->find()\n ->enableHydration(false)\n ->notMatching('tags', function ($q) {\n return $q->where(['tags.name' => 'tag2']);\n });\n\n $results = $results->toArray();\n\n $expected = [\n [\n 'id' => 2,\n 'author_id' => 3,\n 'title' => 'Second Article',\n 'body' => 'Second Article Body',\n 'published' => 'Y',\n ],\n [\n 'id' => 3,\n 'author_id' => 1,\n 'title' => 'Third Article',\n 'body' => 'Third Article Body',\n 'published' => 'Y',\n ],\n ];\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "2d8e65af7596ee7d98ea39dffb2ec03e", "score": "0.5104574", "text": "public function testIncludeRolesRelation()\n {\n $customer = $this->createCustomer();\n \n Passport::actingAs($customer);\n\n $response = $this->json('GET', '/api/v1/account?include=roles');\n\n $response->assertStatus(200)\n ->assertJsonFragment([ 'roles' ]);\n }", "title": "" }, { "docid": "a81199f392a9a5d137b97c6cf8eda852", "score": "0.5101722", "text": "public function getAssociations(): array;", "title": "" }, { "docid": "7a1f10d28fefbbf9565ff141548f84fb", "score": "0.50922054", "text": "public function testFindGuestWithRelation_()\n {\n $response = $this->injectId($this->guest->id)->endpoint($this->endpoint . '?include=groups,navs')->makeCall();\n\n // assert response status is correct\n $response->assertStatus(200);\n\n $responseContent = $this->getResponseContentObject();\n\n $this->assertNotNull($responseContent->data->groups);\n $this->assertNotNull($responseContent->data->navs);\n }", "title": "" }, { "docid": "bbadbbaad3a6877640ff6523881d819c", "score": "0.50759476", "text": "public function testBuildsBetaGroupsDeleteToManyRelationship()\n {\n }", "title": "" }, { "docid": "ed1a69f158a8be02b447771c3e05f408", "score": "0.50597745", "text": "public function testIfManyToManyRelationshipDefinedQueriesAlsoQueryRelatedEntities() {\n $queryEngine = new TableQueryEngine();\n\n $tableMapping = new TableMapping(\"example_parent\",\n [new ManyToManyTableRelationship(new TableMapping(\"example_child2\"),\n \"manytomany\", \"example_many_to_many_link\")]);\n\n\n $this->assertEquals([\n [\"id\" => 1, \"name\" => \"Mary Jones\", \"child_id\" => null, \"manytomany\" =>\n [\n [\"id\" => 1, \"profession\" => \"Doctor\"],\n [\"id\" => 2, \"profession\" => \"Teacher\"],\n [\"id\" => 3, \"profession\" => \"Nurse\"],\n ]\n ]\n ], array_values($queryEngine->query($tableMapping, \"WHERE id = 1\")));\n\n\n $results = $queryEngine->query($tableMapping, \"WHERE manytomany.profession = ?\", \"Car Mechanic\");\n $this->assertEquals(2, sizeof($results));\n $this->assertEquals($queryEngine->query($tableMapping, \"WHERE id IN (2, 3)\"), $results);\n\n\n // Now attempt an offset / limit query where nested results\n $this->assertEquals(4, sizeof($queryEngine->query($tableMapping, \"LIMIT 4\")));\n\n\n }", "title": "" }, { "docid": "a971445f2ce59ab5d8e549806e09d453", "score": "0.50554776", "text": "public function creatingOneToManyRelationship()\n {\n // Sets config\n config(['jsonapi.creationAddLocationHeader' => true]);\n\n // Creates an object with filled out fields\n $model = factory(Author::class)->make();\n $related = factory(Photo::class, 3)->create([\n $model->getKeyName() => null\n ]);\n $related->each(\n function ($item) use ($model) {\n $item->makeVisible($model->getKeyName());\n }\n );\n\n $resourceType = 'author';\n\n // Creates content of the request\n $content = [\n Members::DATA => [\n Members::TYPE => $resourceType,\n Members::ATTRIBUTES => $model->attributesToArray(),\n Members::RELATIONSHIPS => [\n 'photos' => [\n Members::DATA => $related->map(\n function ($item) {\n return [\n Members::TYPE => 'photo',\n Members::ID => strval($item->getKey())\n ];\n }\n )->toArray()\n ]\n ]\n ]\n ];\n\n // Checks the database\n $this->assertDatabaseMissing($model->getTable(), $model->attributesToArray());\n $related->each(\n function ($item) {\n $this->assertDatabaseHas($item->getTable(), $item->attributesToArray());\n }\n );\n\n // Sends request and gets response\n $response = $this->jsonApi('POST', route('authors.store'), $content);\n\n // Creates the expected resource\n $model = $model->refresh();\n $related->each(\n function ($item) use ($model) {\n $item->setAttribute($model->getKeyName(), $model->getKey());\n }\n );\n\n // Creates the expected resource\n $expected = (new HelperFactory())->resourceObject($model, $resourceType, 'authors')\n ->addSelfLink()\n ->toArray();\n\n // Checks the response (status code, headers) and the content\n $response->assertJsonApiCreated($expected);\n $response->assertHeader('Location', route('authors.show', ['id' => $model->getKey()]));\n\n // Checks the database\n $this->assertDatabaseHas($model->getTable(), $model->attributesToArray());\n $related->each(\n function ($item) {\n $this->assertDatabaseHas($item->getTable(), $item->attributesToArray());\n }\n );\n\n // Checks the top-level links object\n Assert::assertNotHasMember(Members::LINKS, $response->json());\n }", "title": "" }, { "docid": "5e48f3e15142040c1e078cae2e525187", "score": "0.5048836", "text": "public function testHasProductRelation()\n {\n $sErrorMessage = $this->sModelClass.' model has not correct \"product\" relation config';\n\n /** @var Label $obModel */\n $obModel = new Label();\n self::assertNotEmpty($obModel->belongsToMany, $sErrorMessage);\n self::assertArrayHasKey('product', $obModel->belongsToMany, $sErrorMessage);\n self::assertEquals(Product::class, array_shift($obModel->belongsToMany['product']), $sErrorMessage);\n }", "title": "" }, { "docid": "5a5a60ccf072c10ad625643819c5b15a", "score": "0.504801", "text": "public function testOneToMany() {\n // parent model has to get one field for array\n // if there's matched model, we have to set when it goes.\n // use join\n\n }", "title": "" }, { "docid": "3a49d930b5eee3d90fda7c7b08fea1e1", "score": "0.504571", "text": "public function testDeserializeArrayCollectionRelationship()\n {\n $id = 'ORDER-1';\n $firstCouponId = '11';\n $secondCouponId = '22';\n\n $data = json_encode(\n [\n 'data' => [\n 'id' => $id,\n 'relationships' => [\n 'gift-coupons' => [\n 'data' => [\n (object)[\n 'type' => 'order/coupon',\n 'id' => $firstCouponId\n ],\n (object)[\n 'type' => 'order/coupon',\n 'id' => $secondCouponId\n ]\n ],\n ],\n ],\n ]\n ]\n );\n\n /** @var Order $order */\n $order = $this->jsonApiSerializer->deserialize(\n $data,\n Order::class,\n MangoJsonApiBundle::FORMAT,\n Serializer\\DeserializationContext::create()->setSerializeNull(true)\n );\n $this->assertSame($id, $order->getId());\n\n $giftCoupons = $order->getGiftCoupons();\n $this->assertSame($firstCouponId, $giftCoupons[0]->getId());\n $this->assertSame($secondCouponId, $giftCoupons[1]->getId());\n }", "title": "" }, { "docid": "6e757de0073dd9bd66e3cdef9bd60d51", "score": "0.504222", "text": "public function testBuildsIndividualTestersCreateToManyRelationship()\n {\n }", "title": "" }, { "docid": "cd1705cd02d2d3d98f506df397c5c485", "score": "0.5022635", "text": "public function assertReadPolymorphHasMany($expected)\n {\n if (empty($expected)) {\n $this->assertSearchedNone();\n return $this;\n }\n\n $expected = collect($expected)->map(function ($ids) {\n return $this->normalizeIds($ids);\n })->all();\n\n $this->assertStatus(Response::HTTP_OK)\n ->assertDocument()\n ->assertResourceCollection()\n ->assertContainsOnly($expected);\n\n return $this;\n }", "title": "" }, { "docid": "750898bba1cf1518e6f64c10d9126b5d", "score": "0.5019968", "text": "public function testLoadRelated()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "22e6fe5dbb8e4ff8aa7ddfd8b90d2985", "score": "0.5008076", "text": "public function getResponses()\n {\n return $this->hasMany(Response::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "c40be2724ca5caa82deb8d15265225d3", "score": "0.50019723", "text": "public function test_roles_relation()\n {\n $permission = new Permission();\n $relation = $permission->roles();\n\n $this->assertInstanceOf(BelongsToMany::class, $relation);\n $this->assertEquals('permission_role.permission_id', $relation->getQualifiedForeignPivotKeyName());\n $this->assertEquals('permission_role.role_id', $relation->getQualifiedRelatedPivotKeyName());\n }", "title": "" }, { "docid": "c0f9b692ece356b96ea97743f3c18082", "score": "0.4995175", "text": "public function isMany()\n {\n return false;\n }", "title": "" }, { "docid": "ccaf598c98e5058f5da888d60ce16283", "score": "0.49916947", "text": "public function testResponse()\n {\n\n $exhibit = $this->_exhibit();\n\n $this->_setPut();\n $this->dispatch('neatline/exhibits/'.$exhibit->id);\n $json = $this->_getResponseArray();\n\n // Should emit correct record.\n $this->assertEquals($exhibit->id, $json['id']);\n\n // Should emit all attributes.\n foreach (array_keys($exhibit->toArray()) as $k) {\n $this->assertArrayHasKey($k, $json);\n }\n\n }", "title": "" }, { "docid": "562b54a8c6cea23e10c7b7c75d614c6b", "score": "0.49879578", "text": "public function testContainInAssociationMatching(): void\n {\n $table = $this->getTableLocator()->get('authors');\n $table->hasMany('articles');\n $articles = $table->getAssociation('articles')->getTarget();\n $articles->hasMany('articlesTags');\n $articles->getAssociation('articlesTags')->getTarget()->belongsTo('tags');\n\n $query = $table->find()->matching('articles.articlesTags', function ($q) {\n return $q->matching('tags', function ($q) {\n return $q->where(['tags.name' => 'tag3']);\n });\n });\n\n $results = $query->toArray();\n $this->assertCount(1, $results);\n $this->assertSame('tag3', $results[0]->_matchingData['tags']->name);\n }", "title": "" }, { "docid": "ccf9a824880b41f4e058275591cf0ff7", "score": "0.4981364", "text": "public function testHasManyRelation()\n {\n $this->artisan('easymake:model', [\n 'name' => self::TEST_MODEL_DIR . '/TestHasMany',\n '--hasMany' => 'App\\User'\n ])\n ->expectsOutput('Model created successfully.');\n\n $model = self::TEST_MODEL_NAMESPACE . 'TestHasMany';\n $this->assertTrue(method_exists(new $model, 'users'));\n }", "title": "" }, { "docid": "70f143b22f57f280227fb3a458eed653", "score": "0.4978982", "text": "public function testFilteringByBelongsToManyNoHydration(): void\n {\n $query = new SelectQuery($this->table);\n $table = $this->getTableLocator()->get('Articles');\n $this->getTableLocator()->get('Tags');\n $this->getTableLocator()->get('ArticlesTags', [\n 'table' => 'articles_tags',\n ]);\n $table->belongsToMany('Tags');\n\n $results = $query->setRepository($table)->select()\n ->matching('Tags', function ($q) {\n return $q->where(['Tags.id' => 3]);\n })\n ->enableHydration(false)\n ->toArray();\n $expected = [\n [\n 'id' => 2,\n 'author_id' => 3,\n 'title' => 'Second Article',\n 'body' => 'Second Article Body',\n 'published' => 'Y',\n '_matchingData' => [\n 'Tags' => [\n 'id' => 3,\n 'name' => 'tag3',\n 'description' => 'Yet another one',\n 'created' => new DateTime('2016-01-01 00:00'),\n ],\n 'ArticlesTags' => ['article_id' => 2, 'tag_id' => 3],\n ],\n ],\n ];\n $this->assertEquals($expected, $results);\n\n $query = new SelectQuery($table);\n $results = $query->select()\n ->matching('Tags', function ($q) {\n return $q->where(['Tags.name' => 'tag2']);\n })\n ->enableHydration(false)\n ->toArray();\n $expected = [\n [\n 'id' => 1,\n 'title' => 'First Article',\n 'body' => 'First Article Body',\n 'author_id' => 1,\n 'published' => 'Y',\n '_matchingData' => [\n 'Tags' => [\n 'id' => 2,\n 'name' => 'tag2',\n 'description' => 'Another big description',\n 'created' => new DateTime('2016-01-01 00:00'),\n ],\n 'ArticlesTags' => ['article_id' => 1, 'tag_id' => 2],\n ],\n ],\n ];\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "ece58eb85c637fe5243fd769ff9b9aab", "score": "0.4975102", "text": "public function creatingManyToManyRelationship()\n {\n // Sets config\n config(['jsonapi.creationAddLocationHeader' => true]);\n\n // Creates an object with filled out fields\n $model = factory(Photo::class)->make();\n $related = factory(Tags::class, 5)->create();\n\n $resourceType = 'photo';\n\n // Creates content of the request\n $content = [\n Members::DATA => [\n Members::TYPE => $resourceType,\n Members::ATTRIBUTES => $model->attributesToArray(),\n Members::RELATIONSHIPS => [\n 'tags' => [\n Members::DATA => $related->map(\n function ($item) {\n return [\n Members::TYPE => 'tags',\n Members::ID => strval($item->getKey())\n ];\n }\n )->toArray()\n ]\n ]\n ]\n ];\n\n // Checks the database\n $this->assertDatabaseMissing($model->getTable(), $model->attributesToArray());\n $related->each(\n function ($item) use ($model) {\n $this->assertDatabaseMissing(\n 'pivot_phototags',\n [\n 'PHOTO_ID' => $model->getKey(),\n 'TAGS_ID' => $item->getKey()\n ]\n );\n }\n );\n\n // Sends request and gets response\n $response = $this->jsonApi('POST', route('photos.store'), $content);\n\n // Creates the expected resource\n $expected = (new HelperFactory())->resourceObject($model, $resourceType, 'photos')\n ->addSelfLink()\n ->toArray();\n\n // Checks the response (status code, headers) and the content\n $response->assertJsonApiCreated($expected);\n $response->assertHeader('Location', route('photos.show', ['id' => $model->getKey()]));\n\n // Checks the database\n $this->assertDatabaseHas($model->getTable(), $model->toArray());\n $related->each(\n function ($item, $index) use ($model) {\n $this->assertDatabaseHas(\n 'pivot_phototags',\n [\n 'PIVOT_ID' => $index + 1,\n 'PHOTO_ID' => $model->getKey(),\n 'TAGS_ID' => $item->getKey()\n ]\n );\n }\n );\n\n // Checks the top-level links object\n Assert::assertNotHasMember(Members::LINKS, $response->json());\n }", "title": "" }, { "docid": "fbf77a08ab0e3c5500f81a6aa81483ca", "score": "0.49723494", "text": "public function testHydrateHasManyCustomEntity(): void\n {\n // phpcs:disable\n $authorEntity = get_class(new class extends Entity {});\n $articleEntity = get_class(new class extends Entity {});\n // phpcs:enable\n $table = $this->getTableLocator()->get('authors', [\n 'entityClass' => '\\\\' . $authorEntity,\n ]);\n $this->getTableLocator()->get('articles', [\n 'entityClass' => '\\\\' . $articleEntity,\n ]);\n $table->hasMany('articles', [\n 'sort' => ['articles.id' => 'asc'],\n ]);\n $query = new SelectQuery($table);\n $results = $query->select()\n ->contain('articles')\n ->toArray();\n\n $first = $results[0];\n $this->assertInstanceOf($authorEntity, $first);\n foreach ($first->articles as $r) {\n $this->assertInstanceOf($articleEntity, $r);\n }\n\n $this->assertCount(2, $first->articles);\n $expected = [\n 'id' => 1,\n 'title' => 'First Article',\n 'body' => 'First Article Body',\n 'author_id' => 1,\n 'published' => 'Y',\n ];\n $this->assertEquals($expected, $first->articles[0]->toArray());\n }", "title": "" }, { "docid": "a21e5073a855e03197961402c9b8312f", "score": "0.4969067", "text": "public function testFilteringByHasManyNoHydration(): void\n {\n $query = new SelectQuery($this->table);\n $table = $this->getTableLocator()->get('Articles');\n $table->hasMany('Comments');\n\n $results = $query->setRepository($table)\n ->select()\n ->disableHydration()\n ->matching('Comments', function ($q) {\n return $q->where(['Comments.user_id' => 4]);\n })\n ->toArray();\n $expected = [\n [\n 'id' => 1,\n 'title' => 'First Article',\n 'body' => 'First Article Body',\n 'author_id' => 1,\n 'published' => 'Y',\n '_matchingData' => [\n 'Comments' => [\n 'id' => 2,\n 'article_id' => 1,\n 'user_id' => 4,\n 'comment' => 'Second Comment for First Article',\n 'published' => 'Y',\n 'created' => new DateTime('2007-03-18 10:47:23'),\n 'updated' => new DateTime('2007-03-18 10:49:31'),\n ],\n ],\n ],\n ];\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "d3b53cbc8d69905cc5c2005eaf3e353c", "score": "0.496847", "text": "public function getToManyResult()\n {\n return $this->toManyResult;\n }", "title": "" }, { "docid": "e424f8f5bb793f2ae686a7dbcde0a380", "score": "0.49601936", "text": "public function fetch_users_where_have_relation()\n {\n $this->assertInstanceOf(Collection::class, \\UserRepository::getUsersWhereHave('posts', ['approved' => true]));\n }", "title": "" }, { "docid": "da097942aa53e7166f46ce9ff7eb6924", "score": "0.49583733", "text": "public function isMany()\n {\n return 'many' === $this->relType;\n }", "title": "" }, { "docid": "5bac1355f09fc65a402956aca5ca6d2a", "score": "0.495609", "text": "public function testContainInAssociationQuery(): void\n {\n $table = $this->getTableLocator()->get('ArticlesTags');\n $table->belongsTo('Articles');\n $table->getAssociation('Articles')->getTarget()->belongsTo('Authors');\n\n $query = $table->find()\n ->orderBy(['Articles.id' => 'ASC'])\n ->contain([\n 'Articles' => function ($q) {\n return $q->contain('Authors');\n },\n ]);\n $results = $query->all()->extract('article.author.name')->toArray();\n $expected = ['mariano', 'mariano', 'larry', 'larry'];\n $this->assertEquals($expected, $results);\n }", "title": "" }, { "docid": "a42cd05451a87df9997035e3682b9575", "score": "0.49514738", "text": "public function testReadRelationship()\n {\n $model = factory(Post::class)->create();\n $comments = factory(Comment::class, 2)->create([\n 'commentable_type' => Post::class,\n 'commentable_id' => $model->getKey(),\n ]);\n\n /** This comment should not appear in the results... */\n factory(Comment::class)->states('post')->create();\n\n $response = $this\n ->jsonApi('comments')\n ->get(url('/api/v1/posts', [$model, 'relationships', 'comments']));\n\n $response\n ->assertFetchedToMany($comments);\n }", "title": "" }, { "docid": "bc1a7ccb34882246c03f8dc3db6c95a2", "score": "0.4940929", "text": "public function isReadRelatedResource();", "title": "" }, { "docid": "919fa0e8b46279fcee4991474ff896de", "score": "0.49356878", "text": "public function testRelationships()\n {\n // fetch associated data to test against\n $table = TableRegistry::get('Countries');\n $query = $table->find()\n ->where([\n 'Countries.id' => 2\n ])\n ->contain([\n 'Cultures',\n 'Currencies',\n ]);\n\n $entity = $query->first();\n\n // make sure we are testing against expected baseline\n $expectedCurrencyId = 1;\n $expectedFirstCultureId = 2;\n $expectedSecondCultureId = 3;\n\n $this->assertArrayHasKey('currency', $entity);\n $this->assertSame($expectedCurrencyId, $entity['currency']['id']);\n\n $this->assertArrayHasKey('cultures', $entity);\n $this->assertCount(2, $entity['cultures']);\n $this->assertSame($expectedFirstCultureId, $entity['cultures'][0]['id']);\n $this->assertSame($expectedSecondCultureId, $entity['cultures'][1]['id']);\n\n // get required AssociationsCollection\n $listener = new JsonApiListener(new Controller());\n $this->setReflectionClassInstance($listener);\n $associations = $this->callProtectedMethod('_getContainedAssociations', [$table, $query->getContain()], $listener);\n $repositories = $this->callProtectedMethod('_getRepositoryList', [$table, $associations], $listener);\n\n // make view return associations on get('_associations') call\n $view = $this\n ->getMockBuilder('\\Cake\\View\\View')\n ->setMethods(['get'])\n ->disableOriginalConstructor()\n ->getMock();\n\n $view->set('_repositories', $repositories);\n $view->set('_absoluteLinks', false); // test relative links (listener default)\n $view->set('_inflect', 'dasherize');\n\n // setup the schema\n $schema = $this\n ->getMockBuilder('\\CrudJsonApi\\Schema\\JsonApi\\DynamicEntitySchema')\n ->setMethods(null)\n ->setConstructorArgs([new Factory(), $view, $table])\n ->getMock();\n\n $this->setReflectionClassInstance($schema);\n\n $this->setProtectedProperty('_view', $view, $schema);\n\n // assert getRelationships()\n $relationships = $this->callProtectedMethod('getRelationships', [$entity, true, []], $schema);\n\n $this->assertArrayHasKey('currency', $relationships);\n $this->assertSame($expectedCurrencyId, $relationships['currency']['data']['id']);\n\n $this->assertArrayHasKey('cultures', $relationships);\n $this->assertCount(2, $relationships['cultures']['data']);\n $this->assertSame($expectedFirstCultureId, $relationships['cultures']['data'][0]['id']);\n $this->assertSame($expectedSecondCultureId, $relationships['cultures']['data'][1]['id']);\n\n // assert generated belongsToLink using listener default (direct link)\n $view->set('_jsonApiBelongsToLinks', false);\n $expected = '/currencies/1';\n $result = $this->callProtectedMethod('getRelationshipSelfLink', [$entity, 'currency', null, true], $schema);\n $this->setReflectionClassInstance($result);\n $this->assertSame($expected, $this->getProtectedProperty('subHref', $result));\n\n // assert generated belongsToLink using JsonApi (indirect link, requires custom JsonApiRoute)\n $view->set('_jsonApiBelongsToLinks', true);\n $expected = '/countries/2/relationships/currency';\n $result = $this->callProtectedMethod('getRelationshipSelfLink', [$entity, 'currency', null, true], $schema);\n $this->setReflectionClassInstance($result);\n $this->assertSame($expected, $this->getProtectedProperty('subHref', $result));\n\n // assert _ getRelationshipSelfLinks() for plural (hasMany)\n $expected = '/cultures?country-id=2';\n\n $result = $this->callProtectedMethod('getRelationshipSelfLink', [$entity, 'cultures', null, true], $schema);\n $this->setReflectionClassInstance($result);\n $this->assertSame($expected, $this->getProtectedProperty('subHref', $result));\n\n // assert relationships that are valid BUT have no data present in the entity are skipped\n unset($entity['currency']);\n $this->assertArrayNotHasKey('currency', $entity);\n\n $result = $this->callProtectedMethod('getRelationships', [$entity, true, []], $schema);\n $this->assertArrayNotHasKey('currency', $result);\n $this->assertArrayHasKey('cultures', $result);\n\n // test custom foreign key\n $query = $table->find()\n ->where([\n 'Countries.id' => 4\n ])\n ->contain([\n 'SuperCountries',\n ]);\n\n $entity = $query->first();\n $this->assertArrayHasKey('supercountry_id', $entity);\n $this->assertArrayHasKey('supercountry', $entity);\n\n // test custom propertyName\n $query = $table->find()\n ->where([\n 'Countries.id' => 3\n ])\n ->contain([\n 'SubCountries',\n ]);\n\n $entity = $query->first();\n $this->assertArrayHasKey('subcountries', $entity);\n }", "title": "" }, { "docid": "4799e527cd429cb4ddfc51ab757fefce", "score": "0.49323392", "text": "public function testHasManyRecord()\n {\n $this->makeData(15);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news')\n ->type('search', 'News')\n ->press('.btn-search');\n $elements = $browser->visit('/admin/news?search=News&page=1')\n ->elements('#newstable tbody tr');\n $numAccounts = count($elements);\n $this->assertTrue($numAccounts == 10);\n $browser->assertPathIs('/admin/news')\n ->assertQueryStringHas('search', 'News')\n ->assertQueryStringHas('page', '1');\n $elements = $browser->visit('/admin/news?search=News&page=2')\n ->elements('#newstable tbody tr');\n $numAccounts = count($elements);\n $this->assertTrue($numAccounts == 5);\n $browser->assertPathIs('/admin/news')\n ->assertQueryStringHas('search', 'News')\n ->assertQueryStringHas('page', '2');\n }); \n }", "title": "" }, { "docid": "35676ddc038470e7b9bdbb656f37ce3f", "score": "0.49260956", "text": "public function getOneToManyResult()\n {\n return $this->oneToManyResult;\n }", "title": "" }, { "docid": "cf704b81e255fb7ac9d144ffd68784da", "score": "0.49220067", "text": "public function testBelongsToManyRelation()\n {\n $this->artisan('easymake:model', [\n 'name' => self::TEST_MODEL_DIR . '/TestBelongsToMany',\n '--belongsToMany' => 'App\\User'\n ])\n ->expectsOutput('Model created successfully.');\n\n $model = self::TEST_MODEL_NAMESPACE . 'TestBelongsToMany';\n $this->assertTrue(method_exists(new $model, 'users'));\n }", "title": "" }, { "docid": "7a324fca5a2f9faa9d980a43d0d5affa", "score": "0.49180847", "text": "public function getResourceListAttribute()\n {\n return $this->resources->lists('id')->all();\n }", "title": "" }, { "docid": "b81242d77f522b9091de9f93b8038023", "score": "0.49164814", "text": "public function hasRelatedEntities($id)\n {\n\n $pdo = $this->getEntityManager()->getConnection();\n $sql = 'SELECT (SELECT COUNT(e.id) FROM events e \n JOIN defendants_events de ON e.id = de.event_id \n WHERE de.defendant_id = :id) + (SELECT COUNT(r.id) \n FROM requests r JOIN defendants_requests dr \n ON r.id = dr.request_id WHERE dr.defendant_id = :id) AS total';\n $stmt = $pdo->prepare($sql);\n $stmt->execute([':id' => $id]);\n $count = $stmt->fetch(\\PDO::FETCH_COLUMN);\n\n return $count ? true : false;\n }", "title": "" }, { "docid": "bb4a32ede326695c61bfeaff35b630e1", "score": "0.49110746", "text": "private function check_has_many($name) {\n if (!method_exists($this, 'has_many')) {\n return;\n }\n\n $has_many = $this->has_many();\n\n if (!array_key_exists($name, $has_many)) {\n return;\n }\n\n $hm_info = $has_many[$name];\n\n $model = $hm_info[0];\n $fk = $hm_info[1];\n\n return $model::where([\n $fk => $this->id()\n ]);\n }", "title": "" }, { "docid": "baf2e4922d48bf7ab11569cb396fd6a7", "score": "0.49055713", "text": "public function testMatchingWithContain(): void\n {\n $query = new SelectQuery($this->table);\n $table = $this->getTableLocator()->get('authors');\n $table->hasMany('articles');\n $this->getTableLocator()->get('articles')->belongsToMany('tags');\n\n $result = $query->setRepository($table)\n ->select()\n ->matching('articles.tags', function ($q) {\n return $q->where(['tags.id' => 2]);\n })\n ->contain('articles')\n ->first();\n\n $this->assertEquals(1, $result->id);\n $this->assertCount(2, $result->articles);\n $this->assertEquals(2, $result->_matchingData['tags']->id);\n }", "title": "" }, { "docid": "902095bd7730c704299eac51eef2e08a", "score": "0.49036658", "text": "public function assertReadPolymorphHasManyIdentifiers($expected)\n {\n if (empty($expected)) {\n $this->assertSearchedNone();\n } else {\n // @todo this checks for resources, not identifiers.\n $this->assertSearchedPolymorphIds($expected);\n }\n\n return $this;\n }", "title": "" }, { "docid": "f3eb4c4d3d3ae901febb364f76d5a593", "score": "0.49015522", "text": "public function testFindIdsAlwaysReturnsArray()\n {\n $ids = $this->pool->find(Writer::class)->where('id = ?', -1)->ids();\n\n $this->assertIsArray($ids);\n $this->assertCount(0, $ids);\n }", "title": "" }, { "docid": "78b14f6e654c7d7f58769cbd53fd02db", "score": "0.48947474", "text": "public function testHasUsers() {\n $this->assertInternalType('array', $this->titles->titles());\n }", "title": "" }, { "docid": "b4d3521ae4cd772c945d387df4ebb7a8", "score": "0.48864245", "text": "public function testFindAllIds()\n {\n $ids = $this->pool->find(Writer::class)->ids();\n\n $this->assertIsArray($ids);\n $this->assertCount(3, $ids);\n }", "title": "" }, { "docid": "95e72c0b32c59ec8637b9f80aba319df", "score": "0.48832312", "text": "public function resources(): BelongsToMany\n {\n return $this->belongsToMany(Dashboard::model($this->resource), 'term_relationships', 'term_taxonomy_id', 'resource_id');\n }", "title": "" }, { "docid": "0c435491e844212ec540df5f312dd2cf", "score": "0.48695058", "text": "public function resources() {\n return $this->belongsToMany('Resource');\n }", "title": "" }, { "docid": "40f891dcc6e7f732466b737a0568bf5b", "score": "0.486783", "text": "public function hasDocIds(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "1335fd0c81e81dd5f432b42ccdeca798", "score": "0.484777", "text": "public function assertSearchByIdResponse($expectedIds, $contentType = MediaTypeInterface::JSON_API_MEDIA_TYPE)\n {\n $this->assertJsonApiResponse(Response::HTTP_OK, $contentType);\n\n return $this\n ->assertDocument()\n ->assertResourceCollection()\n ->assertContainsOnly([\n $this->expectedResourceType() => $this->normalizeIds($expectedIds),\n ]);\n }", "title": "" }, { "docid": "cc1dfffacddac637bf009ffc52952f92", "score": "0.48442912", "text": "public function getRelationships(): array;", "title": "" }, { "docid": "f79c774e9f9201b765eda79901b0c7c7", "score": "0.48417294", "text": "public function fetch_users_that_created_something_related_to_relationship()\n {\n $this->assertInstanceOf(Collection::class, \\UserRepository::getUsersHave('activation'));\n $this->assertInstanceOf(Collection::class, \\UserRepository::getUsersHave('posts', '>', 2));\n $this->assertInstanceOf(Collection::class, \\UserRepository::getUsersHave('posts', 2));\n $this->assertInstanceOf(Collection::class, \\UserRepository::getUsersHave('posts', ['approved' => true]));\n }", "title": "" }, { "docid": "1efe4e6b4cbb15a51058574f09c63602", "score": "0.4841209", "text": "public function getRelated(): ?array;", "title": "" }, { "docid": "9bfa6387f62701702bc09d61616a435c", "score": "0.4839855", "text": "public function testSaveOneToManyJson()\n {\n $model = $this->saveAndReload(\n new BookJson,\n 3,\n [\n 'BookJson' => [\n 'review_ids' => '[2, 4]'\n ]\n ]\n );\n\n //must have two reviews\n $this->assertEquals(2, count($model->reviews), 'Review count after save');\n\n //must have reviews 2 and 4\n $reviewKeys = array_keys($model->getReviews()->indexBy('id')->all());\n $this->assertContains(2, $reviewKeys, 'Saved review exists');\n $this->assertContains(4, $reviewKeys, 'Saved review exists');\n }", "title": "" }, { "docid": "1eaa0a8dbadc1923c05d1a93f87c76b6", "score": "0.48308495", "text": "public function responses()\n {\n return $this->hasMany($this->getBuilderModelNamespace());\n }", "title": "" }, { "docid": "880873d2aa3bf4e64c129a70d565d411", "score": "0.48259664", "text": "public function viewableResources()\n {\n return $this->belongsToMany('\\Black\\Models\\Resource');\n }", "title": "" }, { "docid": "eea97c18692798be4c870edb312640ed", "score": "0.48256877", "text": "public function testContainWithClosure(): void\n {\n $table = $this->getTableLocator()->get('authors');\n $table->hasMany('articles');\n $query = new SelectQuery($table);\n $query\n ->select()\n ->contain([\n 'articles' => function ($q) {\n return $q->where(['articles.id' => 1]);\n },\n ]);\n\n $ids = [];\n foreach ($query as $entity) {\n foreach ((array)$entity->articles as $article) {\n $ids[] = $article->id;\n }\n }\n $this->assertEquals([1], array_unique($ids));\n }", "title": "" }, { "docid": "6c108512ace9c832dbd26b006cdd7e59", "score": "0.4823224", "text": "public function verifyEntities()\n {\n return $this->verifyIds();\n }", "title": "" }, { "docid": "6d5d4622cf926d80fc02c469215274ad", "score": "0.48213223", "text": "public function testGetWithEmbedMany()\n {\n $this->index->embedMany('Address');\n $result = $this->index->get(3);\n $this->assertInternalType('array', $result->address);\n $this->assertInstanceOf('Cake\\ElasticSearch\\Document', $result->address[0]);\n $this->assertInstanceOf('Cake\\ElasticSearch\\Document', $result->address[1]);\n }", "title": "" }, { "docid": "f9ee387276ee252547539c8f40288684", "score": "0.48206988", "text": "public function testShouldAccessEntiresAsArray() {\n $entry = $this->collection[0];\n $this->assertTrue(is_a($entry, 'AWeberResponse'));\n $this->assertTrue(is_a($entry, 'AWeberEntry'));\n $this->assertEquals($entry->id, 1701533);\n }", "title": "" }, { "docid": "b805859135f9cd83e625fd41a74967cd", "score": "0.48194632", "text": "public function hasRelation(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "c8fcedd5003bdf57d0449f0a4b14f9c4", "score": "0.481514", "text": "public function hasRelation($identifier = null);", "title": "" }, { "docid": "1449fc09a25e6fedf67d5f681ae5a163", "score": "0.4811002", "text": "public function getByIdList()\n {\n $ids = ['feqkVgjJpYtjy', '7rzbxdu0ZEXLy'];\n\n $result = $this->gif->getByIdList($ids);\n\n //print var_export($result, true);\n\n $this->assertEquals('200', $result->meta->status);\n }", "title": "" }, { "docid": "369d5953555c79e0fb84571a9100fbf2", "score": "0.47955415", "text": "public function testFilterHasManyAssociationsAliases()\n {\n $table = $this->getTableLocator()->get('Articles', [\n 'className' => '\\Bake\\Test\\App\\Model\\Table\\ArticlesTable',\n ]);\n $result = $this->associationFilter->filterHasManyAssociationsAliases($table, ['ArticlesTags']);\n $expected = [];\n $this->assertSame(\n $expected,\n $result,\n 'hasMany should filter results based on belongsToMany existing aliases'\n );\n }", "title": "" }, { "docid": "e5c75fb138fe20d71b83aa0658d05433", "score": "0.47912627", "text": "public function hasMany(){}", "title": "" }, { "docid": "990db67c4368efcc00c50a274925b5b7", "score": "0.47871065", "text": "public function getRelations();", "title": "" }, { "docid": "658bec55917b67ba2d3bc9f4f4d43368", "score": "0.47778815", "text": "private function _validateRelatedRecords() {\n\t\tforeach ($this->getMetaData()->relations as $relation) {\n\t\t if ($relation instanceof MortimerHasManyRelation || $relation instanceof MortimerHasOneRelation) {\n if (!$this->hasRelated($relation->name) || !$this->isRelationSupported($relation) || !$relation->autoSave)\n continue;\n \n $records = $relation instanceof MortimerHasOneRelation ? array($this->getRelated($relation->name, false)) : $this->getRelated($relation->name, false);\n foreach ($records as $record) {\n if (!$record->validate())\n return false;\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "5240644ebd5cbcf8b13f44acb5e888a2", "score": "0.47702205", "text": "public function getHasManyRelationList()\n {\n return $this->hasMany;\n }", "title": "" }, { "docid": "b523d1f87df2b7e9d71b2a7be45165ff", "score": "0.4757251", "text": "public function resources()\n {\n return $this->belongsToMany(\\Hydrofon\\Resource::class);\n }", "title": "" }, { "docid": "80e70f4e1e5e97eff3ac7b3c4fbf1d3b", "score": "0.47517365", "text": "public function testGroupCanHaveResources()\n {\n $group = factory(Group::class)->create();\n\n $this->assertInstanceOf(Collection::class, $group->resources);\n }", "title": "" }, { "docid": "b41ff7c97178b92d4f715e8758debcd3", "score": "0.47457144", "text": "public function testLineItemIDsAreCorrectlySaved()\n {\n $lineItemIDs = [];\n $lineItemIDs[] = 'P1';\n $lineItemIDs[] = 'P2';\n\n $definition = new CartPromotionsFetchDefinition($lineItemIDs);\n\n static::assertEquals($lineItemIDs, $definition->getLineItemIds());\n }", "title": "" }, { "docid": "1082b61539ae7744d8320fc7cb0e06ca", "score": "0.4743642", "text": "public function getRelations(): RelationCollection;", "title": "" }, { "docid": "4226a2df2c3246f61df76554b9595584", "score": "0.4739494", "text": "public function getManyToManyResult()\n {\n return $this->manyToManyResult;\n }", "title": "" }, { "docid": "0e818e74cef2d0984147b6019b629a0e", "score": "0.47364476", "text": "public function testMorphManyStub()\n {\n $model = new OrchestraMorphManyTestModel();\n\n $result = AssociationStubFactory::associationStubFromRelation($model, 'child');\n\n $fieldChain = ['morph_id', 'morph_type', 'id'];\n\n $this->assertEquals(OrchestraMorphManyTestModel::class, $result->getBaseType());\n $this->assertEquals('id', $result->getForeignField());\n $this->assertEquals(OrchestraMorphToTestModel::class, $result->getTargType());\n $this->assertEquals('child', $result->getRelationName());\n $this->assertEquals($fieldChain, $result->getThroughFieldChain());\n $this->assertEquals('morph_type', $result->getMorphType());\n }", "title": "" }, { "docid": "60ca656c3cf6b554add04a694f613de4", "score": "0.47331703", "text": "public function response() \n\t{\n\t\treturn $this->hasOne('App\\Models\\Response', 'id', 'author_id');\n\t}", "title": "" }, { "docid": "fbb6f7dc8bb468dcf932675b1c3ab3e8", "score": "0.47258058", "text": "public function testContainFinderHasManyClosure(): void\n {\n $table = $this->getTableLocator()->get('Authors');\n $table->hasMany(\n 'Articles',\n ['className' => 'TestApp\\Model\\Table\\ArticlesTable']\n );\n\n $newArticle = $table->newEntity([\n 'author_id' => 1,\n 'title' => 'Fourth Article',\n 'body' => 'Fourth Article Body',\n 'published' => 'N',\n ]);\n $table->save($newArticle);\n\n $resultWithArticles = $table->find('all')\n ->where(['id' => 1])\n ->contain([\n 'Articles' => function ($q) {\n return $q->find('published');\n },\n ]);\n\n $this->assertCount(2, $resultWithArticles->first()->articles);\n }", "title": "" } ]
85b6f3d563ae28d68959599e1c6a8594
Executejob for queueable jobs actually starts the queue, runs, and ends all in one function. This happens if we run a job in legacy mode.
[ { "docid": "7812cc3170520392cdefbe5fc0c7393a", "score": "0.64821446", "text": "public function executeJob()\n {\n try {\n if ($this->getJobStatus() !== 'RUNNING') {\n $queue = $this->markStarted();\n $this->start($queue);\n } else {\n $queue = $this->getQueueObject();\n }\n\n // Mark the queue as finished\n $output = $this->finish($queue);\n\n // Mark the job as completed\n $result = $this->markCompleted(0, $output);\n } catch (\\Exception $e) {\n $result = $this->markCompleted(Job::JOB_ERROR_EXCEPTION_GENERAL, $e->getMessage());\n $result->message = $result->result; // needed for progressive library.\n }\n\n return $result;\n }", "title": "" } ]
[ { "docid": "53b7d014e148646eeb28b42fb1dd8ce5", "score": "0.66581166", "text": "function qe_process_job($job, $args, $opt) {\n // If the job file could not be loaded change job status and exit.\n if (!file_exists($args['filepath'])) {\n $message = 'Query engine: File: %file does not exist';\n $vars = array('%file' => $args['filepath']);\n $job->changeStatus(KmsOciQueueJob::STATUS_FAILED, $message, $vars);\n qe_error($message, $vars, TRUE);\n }\n\n // Db connection settings.\n $db_conf = KmsOciQueueJobDb::getConnectionSettings($job->cid);\n\n // Get job info from job action if not specified.\n $args['info'] = !empty($opt['i']) ? $opt['i'] : $job->action . ' | ' . $job->actionDetails;\n\n // Generate sql string.\n $sql = qe_generate_sql($db_conf, $args);\n\n // Report sql execution.\n $job->changeStatus(\n KmsOciQueueJob::STATUS_PROCESSING,\n 'Query engine: %jid is being processed',\n array('%jid' => $job->jid)\n );\n // Execute generated sql and get result of it.\n $result = qe_execute_sql($sql, $args);\n\n $message_vars = array();\n // Move file to processed folder upon success.\n if ($result['exit_code'] === 0) {\n // Move file.\n rename(\n qe_absolute_filepath($args['filename'], KMS_OCI_QUEUE_ENGINE_DIR_JOBS),\n qe_absolute_filepath($args['filename'], KMS_OCI_QUEUE_ENGINE_DIR_JOBS_PROCESSED)\n );\n // Report everything well and change status to 'done'.\n $job_status = KmsOciQueueJob::STATUS_DONE;\n $message = implode('; ', $result['message']);\n }\n else {\n $job_status = KmsOciQueueJob::STATUS_FAILED;\n if (!empty($result['message'])) {\n $message = implode('; ', $result['message']);\n }\n else {\n $message = 'Something went wrong with exit code: @exit_code.';\n $message_vars = array('@exit_code' => $result['exit_code']);\n }\n }\n\n // Change job status depending on exit code.\n $job->changeStatus(\n $job_status,\n 'Query engine: ' . $message,\n $message_vars\n );\n}", "title": "" }, { "docid": "93002bb014076e50905585448fcf0036", "score": "0.65251416", "text": "public function executeRun()\n {\n set_time_limit(0);\n\n // set memory limit to 512MB\n ini_set('memory_limit', sfConfig::get('app_sfJobQueuePlugin_memory', '512M'));\n\n $sf_job = sfJobPeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($sf_job);\n $message = $sf_job->run();\n\n if ($message == '' || $message == null)\n {\n if ($sf_job->getMessage() == '')\n {\n $message = sfConfig::get('sf_i18n') ? $this->getContext()->getI18n()->__('Job completed') : 'Job completed';\n }\n else\n {\n $message = $sf_job->getMessage();\n }\n }\n\n $this->setFlash('notice', $message);\n return $this->redirect('sfJob/list');\n }", "title": "" }, { "docid": "9f141298826839af784f3df5c94aa7d6", "score": "0.6387825", "text": "public function Execute(){\n\n\t\ttry {\n\n\t $this->oLogger->ConfigureLogger( 'jobs', $this->iJobQueueId );\n\n\t\t\t$sProcess = $this->sProcess;\n\t\t\t$iJobQueueId = $this->iJobQueueId;\n\n\t\t\t// Pre-checks\n\t\t\t$this->CheckPaths();\n\n\t\t\t/* An array of Folio item entities */\n\t\t\t$aFolioCollection = $this->GetFolioItems();\n\n\n\t\t\t$aFolioCollectionMarkers = $this->GetFolioCollectionRanges( $aFolioCollection );\n\n\t\t\t// Only do this after the resultset has been created\n\t\t\t$this->oBoxDb->FlagJobProcessAsStarted( $iJobQueueId, $sProcess );\n\n\t\t\t$this->ProcessFolioItems( $aFolioCollection, $aFolioCollectionMarkers );\n\n\t\t\t$this->WriteXml();\n\n\t\t\t$this->oBoxDb->FlagJobProcessAsCompleted( $iJobQueueId, $sProcess );\n\n\t\t} catch ( ImporterException $oException ) {\n\t\t\t$this->HandleError( $oException, $oJobQueueEntity );\n\t\t}\n\t}", "title": "" }, { "docid": "c7373ebb33626ad80f0c9e6ac5d31b84", "score": "0.6245574", "text": "public abstract function doJob();", "title": "" }, { "docid": "c1461c367734d5bc1299d4367a07e791", "score": "0.6204863", "text": "public function execute($job = NULL) {\n $force = drush_get_option('force', FALSE);\n\n $cron = new Cron();\n $cron->setExecutor(new Executor());\n\n $jobs = $this->loadJobs($job, $force);\n\n $resolver = \\Drupal::service('cron_drupal_resolver');\n $resolver->addStrategy(new ShellStrategy());\n $resolver->setJobs($jobs);\n $cron->setResolver($resolver);\n\n $time = microtime(true);\n $report = $cron->run();\n\n while ($cron->isRunning()) {}\n\n drush_log(dt('time: !time', array('!time' => microtime(true) - $time)), 'ok');\n }", "title": "" }, { "docid": "10acec78e045a5639fd0bed7a27767a4", "score": "0.6204367", "text": "public function executeJobs() {\r\n $jobsToExecute = $this->CI->job_model->getInProgressJobs();\r\n\r\n if ($jobsToExecute && !empty($jobsToExecute)) {\r\n foreach ($jobsToExecute as $jobToExec) {\r\n $this->executeJob($jobToExec);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a6cedbc4e447f568e6a1485643ffd6f7", "score": "0.6025937", "text": "public function dispatch($jobKey = null)\n { \t\n \t$register = new Ot_Cron_JobRegister();\n $cs = new Ot_Model_DbTable_CronStatus();\n\n if (!is_null($jobKey)) {\n \n $thisJob = $register->getJob($jobKey);\n\n if (is_null($jobKey)) {\n throw new Exception('Job not found');\n }\n\n if (!$cs->isEnabled($thisJob->getKey())) {\n throw new Ot_Exception('Job is disabled and cannot be run');\n }\n\n $lastRunDt = $cs->getLastRunDt($thisJob->getKey());\n \n $jobObj = $thisJob->getJobObj();\n \n // make sure job isn't already running\n if (($pid = Ot_Cron_Lock::lock($thisJob->getKey())) == FALSE) { \n return;\n }\n \n $jobObj->execute($lastRunDt);\n \n Ot_Cron_Lock::unlock($thisJob->getKey());\n\n $cs->executed($thisJob->getKey(), time());\n \n return;\n }\n\n $now = time();\n \n $jobs = $register->getJobs();\n\n \tforeach ($jobs as $job) {\n \n if ($this->shouldExecute($job->getSchedule(), $now)) { \n\n if (!$cs->isEnabled($job->getKey())) {\n continue;\n }\n\n $lastRunDt = $cs->getLastRunDt($job->getKey());\n\n $jobObj = $job->getJobObj();\n \n if (($pid = Ot_Cron_Lock::lock($job->getKey())) == FALSE) { \n continue;\n }\n \n $jobObj->execute($lastRunDt);\n \n Ot_Cron_Lock::unlock($job->getKey());\n\n $cs->executed($job->getKey(), time());\n }\n }\n }", "title": "" }, { "docid": "2940d0c2aebd99726b9fa7f1c9c530e6", "score": "0.5995794", "text": "public function handle()\n {\n $set = $this->option('set');\n Log::info(\"Queue Jobs::Handle with set: \".$set);\n // We want to run for yesterday\n $date = (new \\DateTime())->modify('-1 day')->format('Y-m-d');\n $params = [\n 'date' => $date,\n ];\n\n if ($set === \"early\" || $set === \"all\") {\n dispatch(new \\App\\Jobs\\Rubicon($params));\n dispatch(new \\App\\Jobs\\Sovrn($params));\n dispatch(new \\App\\Jobs\\Taboola($params));\n dispatch(new \\App\\Jobs\\Connatix($params));\n dispatch(new \\App\\Jobs\\Teads($params));\n }\n if ($set === \"later\" || $set === \"all\") {\n dispatch(new \\App\\Jobs\\OpenX($params));\n dispatch(new \\App\\Jobs\\OpenXBidder($params));\n dispatch(new \\App\\Jobs\\Sharethrough($params));\n dispatch(new \\App\\Jobs\\Aol($params));\n }\n// dispatch(new \\App\\Jobs\\TripleLift($params));\n// dispatch(new \\App\\Jobs\\AdYouLike($params));\n// dispatch(new \\App\\Jobs\\SublimeSkins($params));\n// dispatch(new \\App\\Jobs\\Unruly($params));\n// dispatch(new \\App\\Jobs\\Realvu($params));\n// dispatch(new \\App\\Jobs\\Aol($params));\n\n $this->info('Jobs added to queue');\n }", "title": "" }, { "docid": "99e3f5254f172a63805630b77415dd9a", "score": "0.59867525", "text": "function test_run_job()\r\n {\r\n $path = $this->get_temp_filepath();\r\n $job = new TestJob(array(\r\n 'path' => $path,\r\n 'data' => 24,\r\n ));\r\n $this->job_queue->add($job);\r\n\r\n // run the job\r\n $this->job_queue->run($job->id);\r\n\r\n // check that the job has been run\r\n $data = @file_get_contents($path);\r\n $this->assertEquals(24, $data, 'job has been run');\r\n\r\n // check that the status is complete\r\n $this->assertEquals('complete', $this->job_queue->fetch($job->id)->status, 'job status is marked as complete');\r\n\r\n // destroy the job\r\n $this->job_queue->destroy($job->id);\r\n }", "title": "" }, { "docid": "65f8278598b7d9fa3398793504442f24", "score": "0.5972839", "text": "public function testSyncOrdersCommandDispatchesJob()\n {\n Queue::fake();\n Queue::assertNothingPushed();\n\n $this->artisan('shopify:sync-orders')->assertExitCode(0);\n\n Queue::assertPushed(SyncShopifyOrders::class);\n }", "title": "" }, { "docid": "42060438d17ef43dcd221a0d9b278c98", "score": "0.59498745", "text": "public function ZendAPI_Job($script) {}", "title": "" }, { "docid": "f2bfc1fc5fafb8b2721a7ece1fb68a7e", "score": "0.5873123", "text": "function ZendAPI_Job($script) {}", "title": "" }, { "docid": "2ed623cab6257be7c3ddda0d0946068e", "score": "0.58718556", "text": "public function execute()\n {\n $this->_directCatalogExportQueueHandler->execute();\n }", "title": "" }, { "docid": "36813e7b273245e4e574d56b21dc3076", "score": "0.5780589", "text": "public function activateOnQueue() {\n\t\t// if it's an immediate job, lets cache it to disk to be picked up later\n\t\tif ($this->JobType == QueuedJob::IMMEDIATE\n\t\t\t&& !Config::inst()->get('QueuedJobService', 'use_shutdown_function')\n\t\t) {\n\t\t\ttouch($this->getJobDir() . '/queuedjob-' . $this->ID);\n\t\t}\n\t}", "title": "" }, { "docid": "2ca7c104fe985754154f2d0a003d4f80", "score": "0.572145", "text": "public function runOneJob() {\n $job=$this->queue->popJob();\n $success=true;\n if(empty($job)) {\n return NULL;\n }\n $data=$job->getData();\n try {\n error_reporting(E_ALL);\n $job->init($this->context);\n $data=$job->run();\n } catch (\\Exception $ex) {\n //$job=$this->queue->errorJob($job);\n $d=$job->getData();\n if(is_array($d)) {\n $d['exception'] = $ex.': '.$ex->getMessage();\n } else {\n $d=$d.'\\nException: '.$ex.': '.$ex->getMessage();\n }\n $job->setData($d);\n $success=false;\n } finally {\n if ($success) {\n $job=$this->queue->completeJob($data);\n } else {\n $job=$this->queue->errorJob($job);\n }\n }\n return array( \"status\" => ($success?'ok':'error'),\n \"job\" => [\n \"id\" => $job->getId(),\n \"classname\" => $job->getClassname(),\n \"data\" => $job->getData()\n ]\n );\n }", "title": "" }, { "docid": "6cae8c623b69a5150a5602bd103ddb17", "score": "0.5695388", "text": "function requeueJob($job) {}", "title": "" }, { "docid": "b94ba87ddae834e32274e2ff5faea0ab", "score": "0.569502", "text": "function JobQueue($jobid=0, $queueid=0)\n\t{\n\t\t$jobid = (int)$jobid;\n\t\tif ($jobid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$this->JobStarted($jobid)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"jobs SET queueid='\" . (int)$queueid . \"' WHERE jobid='\" . $jobid . \"'\";\n\t\t$result = $this->Db->Query($query);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "418588766b2223982541d3c2be654646", "score": "0.56884944", "text": "public function run()\n\t{\n\t\t$this->logger->debug(\"Looking for jobs to run\");\n\n\t\tforeach ($this->jobs as $class => $definition)\n\t\t{\n\t\t\t// Check if it's time to run the job\n\t\t\tif ($this->canJobRun($class))\n\t\t\t{\n\t\t\t\t$this->queueJob($class);\n\t\t\t}\n\t\t}\n\n\t\t$this->logger->debug(\"No more jobs to run\");\n\t}", "title": "" }, { "docid": "b203e9c6a94923a4167649b3ba3b2efa", "score": "0.5672822", "text": "public function execute()\n {\n // If the jobset is finished or failed\n // the jobset may need to be dispatched\n // so we return true\n if ($this->isFinished() || $this->isFailed()) {\n return true;\n }\n // Just return false to tell to terminate the process\n if (!$this->isInTime()) {\n return false;\n }\n // return false means the jobset is done\n // and the process should be terminated\n if ($this->isDispatched() || $this->isCanceled()) {\n return false;\n }\n\n try {\n if (!$this->jobs) {\n $this->initJobs();\n }\n\n $this->doUnorderedJobs();\n $this->doOrderedJobs();\n\n $status = $this->getJobsetExecutionStatus();\n if ($status === JobsConst::JOB_SET_STATUS_FAILED) {\n $this->failed();\n } else {\n $this->updateStatus($status);\n }\n } catch (\\Exception $e) {\n // just throw it\n throw $e;\n }\n\n return true;\n }", "title": "" }, { "docid": "83b83e4f92aaf7b234bba44097d1410d", "score": "0.564191", "text": "public function requeueJob($job) {}", "title": "" }, { "docid": "5e837dfc052b9f5569e8827ba1856362", "score": "0.5637931", "text": "public static function queue($function_name, $workload, $context = 'global', $priority = IceJobQueue::PRIORITY_NORMAL, $unique = null)\n {\n $unique = ($unique === null) ? self::uuid() : $unique;\n\n $job_run = new iceModelJobRun();\n $job_run->setContext($context);\n $job_run->setCrontabId(null);\n $job_run->setUniqueKey($unique);\n $job_run->setFunctionName($function_name);\n $job_run->setStatus('queued');\n $job_run->setPriority($priority);\n $job_run->setIsBackground(true);\n\n try\n {\n $job_run->save();\n\n // Create a GearmanClient without any callbacks\n $client = self::getGearmanClient(false);\n\n switch ($priority)\n {\n case IceJobQueue::PRIORITY_HIGH:\n $method = 'addTaskHighBackground';\n break;\n case IceJobQueue::PRIORITY_LOW:\n $method = 'addTaskLowBackground';\n break;\n case IceJobQueue::PRIORITY_NORMAL:\n default:\n $method = 'addTaskBackground';\n break;\n }\n\n // Queue the task\n $task = call_user_func_array(\n array($client, $method),\n array($function_name, $workload, $context, $unique)\n );\n\n if ($task instanceof GearmanTask)\n {\n return $client->runTasks();\n }\n else\n {\n $job_run->delete();\n }\n }\n catch (Exception $e) {};\n\n return false;\n }", "title": "" }, { "docid": "1205275f12140c6a1238ef2471c98bc5", "score": "0.5636043", "text": "public function executable(): JobQueryInterface;", "title": "" }, { "docid": "2e8139f53684f4185866beed3b688143", "score": "0.56041855", "text": "public function testSyncProductsCommandDispatchesJob()\n {\n Queue::fake();\n Queue::assertNothingPushed();\n\n $this->artisan('shopify:sync-products')->assertExitCode(0);\n\n Queue::assertPushed(SyncShopifyProducts::class);\n }", "title": "" }, { "docid": "89a6827b89d083b5f3a5683ec94b6388", "score": "0.5598756", "text": "public function runQueue($qid) {\n // Allow execution to continue even if the request gets cancelled.\n @ignore_user_abort(TRUE);\n\n // Force the current user to anonymous to ensure consistent permissions on\n // cron runs.\n $this->accountSwitcher->switchTo(new AnonymousUserSession());\n\n // Run the cron task\n Timer::start('queue_' . $qid);\n\n\n // Checks cron info\n $info = $this->queueManager->getDefinition($qid, FALSE);\n\n if (isset($info['cron'])) {\n\n // From core:\n // \"Make sure every queue exists. There is no harm in trying to recreate\n // an existing queue.\"\n $this->queueFactory->get($qid)->createQueue();\n\n $queue_worker = $this->queueManager->createInstance($qid);\n $end = time() + (isset($info['cron']['time']) ? $info['cron']['time'] : 15);\n $queue = $this->queueFactory->get($qid);\n // TODO FIX: There is a bug here but on purpose as the core as the same one (still present on 8.5.1)\n // (see https://www.drupal.org/project/drupal/issues/2883819)\n $lease_time = isset($info['cron']['time']) ?: NULL;\n\n while (time() < $end && ($item = $queue->claimItem($lease_time))) {\n try {\n $queue_worker->processItem($item->data);\n $queue->deleteItem($item);\n }\n catch (RequeueException $e) {\n // The worker requested the task be immediately requeued.\n $queue->releaseItem($item);\n }\n catch (SuspendQueueException $e) {\n // If the worker indicates there is a problem with the whole queue,\n // release the item and skip to the next queue.\n $queue->releaseItem($item);\n\n watchdog_exception('cron', $e);\n\n // Skip to the next queue.\n break;\n }\n catch (\\Exception $e) {\n // In case of any other kind of exception, log it and leave the item\n // in the queue to be processed again later.\n watchdog_exception('cron', $e);\n }\n }\n\n }\n\n Timer::stop('queue_' . $qid);\n // Display a message\n $this->messenger->addMessage($this->t('Execution of @queue took @time.', [\n '@queue' => $qid,\n '@time' => Timer::read('queue_' . $qid) . 'ms',\n ]));\n\n // Restore the user.\n $this->accountSwitcher->switchBack();\n\n return $this->redirect('cron_queue_viewer.cron_queue_viewer_form');\n }", "title": "" }, { "docid": "ee33389c321a7ed447852cf9eb36f532", "score": "0.5591687", "text": "function executeJob($id)\n {\n $this->setRequestUrl('/job/' . $id . '/execute');\n $this->setRequestObject(null);\n $this->setRequestMethod('POST');\n $this->execute();\n }", "title": "" }, { "docid": "4a8317c787b71b04d7c5c6ec5b0c1b3b", "score": "0.55759907", "text": "private function runJob()\n {\n $start = $end = 0;\n\n $backtrace = $exception = $jobOutput = $result = null;\n\n // start output buffer\n ob_start();\n\n $currentErrorReporting = ini_get('error_reporting');\n set_error_handler(array($this, 'handleError'), E_ALL);\n error_reporting(E_ALL);\n ini_set('display_errors', 0);\n\n try {\n $start = microtime(true);\n\n $result = ($this->args)\n ? call_user_func_array(array($this->job, 'run'), $this->args)\n : $this->job->run();\n\n $end = microtime(true);\n } catch (Exception $e) {\n $exception = $e;\n $backtrace = debug_backtrace();\n }\n\n if (is_resource($result)) {\n trigger_error(\n \"Your job returned a resource. That's useless!\",\n E_USER_WARNING\n );\n }\n\n $jobOutput = ob_get_clean();\n $response = new Resqee_Response($this->serverGlobal);\n\n $response->setResult($result);\n $response->setStdout($jobOutput);\n $response->setExecTime($end - $start);\n $response->setErrors($this->errors);\n\n if (isset($e)) {\n $response->setException($e);\n }\n\n // restore previous error handler\n restore_error_handler();\n error_reporting($currentErrorReporting);\n ini_set('display_errors', 1);\n\n return $response;\n }", "title": "" }, { "docid": "2ad04595e32f884835f0dca60ea408f1", "score": "0.55098546", "text": "protected function executeJob(Job $job)\n {\n try {\n $this->container->get('mcfedr_queue_manager.job_executor')->executeJob($job, $this->retryLimit);\n } catch (UnrecoverableJobExceptionInterface $e) {\n $this->failedJob($job, $e);\n\n return self::FAIL;\n } catch (\\Exception $e) {\n $this->failedJob($job, $e);\n\n return self::RETRY;\n }\n $this->finishJob($job);\n\n return self::OK;\n }", "title": "" }, { "docid": "caf3a2f53a3cc1f6c0549456b391439c", "score": "0.54944825", "text": "private function executeJob($job) {\r\n $initUrl = $job['url_address'];\r\n $this->jobUUID = $job['job_uuid'];\r\n\r\n $this->parseUrl($initUrl, false, $job['url_id']);\r\n\r\n while (!empty($this->toParseUrls)) { //While $toParseUrls in not empty, continue\r\n $urlToParse = array_pop($this->toParseUrls);\r\n $this->parseUrl($urlToParse, true); //Parse the URL\r\n }\r\n if ($this->CI->job_model->updateJobCompleted($this->jobUUID))\r\n return true;\r\n return false;\r\n }", "title": "" }, { "docid": "6aa0bfd14f227117270f9e56681e5e42", "score": "0.5479634", "text": "public function testImmediateQueuedJob()\n {\n $svc = $this->getService();\n // lets create a new job and add it to the queue\n\n $job = new TestQueuedJob(QueuedJob::IMMEDIATE);\n $job->firstJob = true;\n $id = $svc->queueJob($job);\n\n $job = new TestQueuedJob(QueuedJob::IMMEDIATE);\n $job->secondJob = true;\n $id = $svc->queueJob($job);\n\n $jobs = $svc->getJobList(QueuedJob::IMMEDIATE);\n $this->assertCount(2, $jobs);\n\n // now fake a shutdown\n $svc->onShutdown();\n\n $jobs = $svc->getJobList(QueuedJob::IMMEDIATE);\n $this->assertInstanceOf(DataList::class, $jobs);\n $this->assertCount(0, $jobs);\n }", "title": "" }, { "docid": "add4279f6dfbd99405f5efed8247223e", "score": "0.54722345", "text": "abstract public function start(JobQueue $q);", "title": "" }, { "docid": "24cbe4fefd578e45212638277c2d2d90", "score": "0.5464271", "text": "public function workCommand($queueName) {\n\t\tdo {\n\t\t\t$this->jobManager->waitAndExecute($queueName);\n\t\t} while (TRUE);\n\t}", "title": "" }, { "docid": "91e376b6694c8bd6a838ef5349ca0f32", "score": "0.54600084", "text": "function test_fetch_job()\r\n {\r\n $job_a = new TestJob(array(\r\n 'path' => $this->get_temp_filepath(),\r\n 'data' => 'a',\r\n ));\r\n\r\n $job_b = new TestJob(array(\r\n 'path' => $this->get_temp_filepath(),\r\n 'data' => 'b',\r\n ));\r\n\r\n $this->job_queue->add($job_a);\r\n $this->job_queue->add($job_b);\r\n\r\n // fetch the job A from the queue\r\n $fetched_job = $this->job_queue->fetch($job_a->id);\r\n\r\n // check that the fetched job is job A\r\n $this->assertEquals('a', $fetched_job->options['data']);\r\n\r\n // check that the job has status of pending\r\n $this->assertEquals('pending', $fetched_job->status);\r\n\r\n // fetch job B from the queue\r\n $fetched_job = $this->job_queue->fetch($job_b->id);\r\n\r\n // check that the fetched job is job B\r\n $this->assertEquals('b', $fetched_job->options['data']);\r\n\r\n // destroy both jobs\r\n $this->job_queue->destroy($job_a->id);\r\n $this->job_queue->destroy($job_b->id);\r\n }", "title": "" }, { "docid": "70c5877fc7badeca7d4c9c3f1eee8416", "score": "0.5449364", "text": "public static function process_queue() {\n global $DB;\n\n $MGS = self::get_instance(false);\n\n $itemsinqueue = $DB->get_records_sql('\n SELECT * FROM {mahara_group_sync_queue} WHERE status NOT LIKE \"'.MGS_SUCCESSFUL.'\"\n ');\n\n foreach ($itemsinqueue as $item) {\n $action = $item->action;\n $params = unserialize($item->params);\n\n $response = $MGS->create_call($action, $params);\n $response = self::process_response($response);\n self::log_response($action, $params, $response);\n if ($response->success) {\n $DB->delete_records('mahara_group_sync_queue', ['id'=>$item->id]);\n }\n }\n }", "title": "" }, { "docid": "3b757f4ac07bc852928772a223a81f55", "score": "0.543607", "text": "abstract protected function makeJobs();", "title": "" }, { "docid": "a2e24a7b8850977c4f7be225de12e483", "score": "0.5435155", "text": "public function run_job($is_debug = false) {\n if (! $this->available_pbs_slots()) {\n return array('RESULT' => false, 'EXIT_STATUS' => 1, 'MESSAGE' => 'Queue is full');\n }\n\n $out = $this->get_output_structure();\n\n if (@file_exists($out->job_dir)) {\n functions::rrmdir($out->job_dir);\n }\n \n if (!file_exists($out->job_dir))\n mkdir($out->job_dir);\n if (!file_exists($out->full_output_dir))\n mkdir($out->full_output_dir);\n\n $msg = $this->post_output_structure_create();\n if ($msg) {\n return array('RESULT' => false, 'MESSAGE' => $msg);\n }\n\n chdir($out->job_dir);\n\n $sched = functions::get_cluster_scheduler();\n $max_full_fam = settings::get_maximum_full_family_count();\n\n $parms = $this->get_run_script_args($out);\n\n $exec = \"source /etc/profile\\n\";\n $exec .= \"module load \" . functions::get_efi_module() . \"\\n\";\n if ($this->db_mod)\n $exec .= \"module load \" . $this->db_mod . \"\\n\";\n else\n $exec .= \"module load \" . functions::get_efidb_module() . \"\\n\";\n $exec .= $this->additional_exec_modules();\n $exec .= $this->get_run_script();\n $exec .= \" --output-path \" . $out->full_output_dir;\n if ($sched)\n $exec .= \" -scheduler $sched\";\n if (functions::get_use_legacy_graphs())\n $exec .= \" -oldgraphs\";\n if ($max_full_fam && $max_full_fam > 0)\n $exec .= \" -max-full-family $max_full_fam\";\n foreach ($parms as $key => $value) {\n $exec .= \" $key $value\";\n }\n $exec .= \" -job-id \" . $this->id;\n if (!global_settings::advanced_options_enabled())\n $exec .= \" -remove-temp\";\n if ($this->is_tax_only) { // From stepa\n $exec .= \" --tax-search-only\";\n $exec .= \" --use-fasta-headers\";\n }\n if ($this->extra_ram)\n $exec .= \" --large-mem --extra-ram \" . $this->extra_ram;\n $exec .= \" 2>&1\";\n\n $exit_status = 1;\n $output_array = array();\n\n functions::log_message($exec);\n if (!$is_debug) {\n $output = exec($exec, $output_array, $exit_status);\n }\n else {\n functions::log_message(\"DEBUG: \" . $exec);\n $output = \"1.1\";\n $exit_status = 0;\n }\n\n $output = trim(rtrim($output));\n if (strtolower($sched) == \"slurm\")\n $pbs_job_number = $output;\n else \n $pbs_job_number = substr($output, 0, strpos($output, \".\"));\n\n functions::log_message($output);\n functions::log_message($pbs_job_number);\n\n if ($pbs_job_number && !$exit_status) {\n functions::log_message(\"no error\");\n if (!$is_debug) {\n $this->set_pbs_number($pbs_job_number);\n $this->get_job_status_obj()->start();\n $this->email_started();\n }\n return array('RESULT' => true, 'PBS_NUMBER' => $pbs_job_number, 'EXIT_STATUS' => $exit_status, 'MESSAGE' => 'Job Successfully Submitted');\n }\n else {\n functions::log_message(\"There was an error: \" . $output . \" exit status: $exit_status\" . \" \" . join(',', $output_array));\n $error = \"Unknown\";\n if (isset($output_array[18]))\n $error = $output_array[18];\n return array('RESULT' => false, 'EXIT_STATUS' => $exit_status, 'MESSAGE' => $error);\n }\n }", "title": "" }, { "docid": "de6908806b20d3205a305dba95d23b34", "score": "0.5423588", "text": "public function execution()\n {\n $triggers = $this->executeBuffer->collectTrigger();\n $this->executions($triggers);\n }", "title": "" }, { "docid": "7f7df6f60534b00a5d456c4af707e56e", "score": "0.54178715", "text": "public function run_queue() {\n\n\t\t$queue =\t&singleton::get(__NAMESPACE__ . '\\queue');\n\t\t\n\t\t$queue->run('pushover');\n\n\t}", "title": "" }, { "docid": "30f27983fa881f89a1a5c6de24c2971e", "score": "0.54051393", "text": "public function execLastQueuedIndexer()\n {\n /** @var Mage_Cron_Model_Schedule $scheduledJob */\n $scheduledJob = Mage::getModel('cron/schedule')->getCollection()\n ->addFieldToFilter('job_code', self::JOB_CODE)\n ->addFieldToFilter('status', array('in' => array(Mage_Cron_Model_Schedule::STATUS_PENDING, Mage_Cron_Model_Schedule::STATUS_MISSED)))\n ->setOrder('scheduled_at', 'DESC')\n ->getLastItem();\n\n if ((int)$scheduledJob->getId() < 1) {\n return false;\n }\n\n $scheduledJob\n ->setExecutedAt($this->_getCurrentDateTime())\n ->setStatus(Mage_Cron_Model_Schedule::STATUS_RUNNING)\n ->save();\n\n $message = json_decode($scheduledJob->getMessages(), true);\n if (!isset($message['ic']) || empty($message['ic'])) {\n return false;\n }\n $indexerCode = $message['ic'];\n $isFullReindex = true === $message['fr'];\n\n /** @var SchumacherFM_FastIndexer_Model_Index_Process $indexProcess */\n $indexProcess = Mage::getSingleton('index/indexer')->getProcessByCode($indexerCode);\n\n if ($indexProcess) {\n if (true === $isFullReindex) {\n $indexProcess->reindexEverything();\n } else {\n $this->_execPartialIndex($indexProcess);\n }\n }\n $scheduledJob\n ->setFinishedAt($this->_getCurrentDateTime(true))\n ->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS)\n ->save();\n\n return $indexerCode;\n }", "title": "" }, { "docid": "41eac9738c36e13ae9698353c32bb1a1", "score": "0.5382967", "text": "function postSyncJob(){\n// $url = 'fetchMProductInfo';\n// $json = [\n// \"async\" => true,\n// \"url\" => route('product_price_collect', ['product_id'=>$this->id]),\n// \"urls\" => \\GuzzleHttp\\json_decode($this->trace_urls,true)\n// ];\n// Log::info('Enqueue job for product '.$this->id);\n// Log::info($json);\n// $client = self::getClient();\n// $response = $client->request('POST', $url, compact('json'));\n// return self::processResult($response);\n $urls = \\GuzzleHttp\\json_decode($this->trace_urls,true);\n\n foreach ($urls as $url){\n FetchPriceJob::dispatch($url, $this);\n }\n }", "title": "" }, { "docid": "ebb9fcfead8dc29501e7eebec8311c06", "score": "0.537131", "text": "protected function processAll() {\n foreach ($this->jobs as &$job) {\n try {\n $this->driver->execute($job);\n } catch (Exception $ex) {\n $this->logger->error(\"Job failed to execute, exception received: \" . $ex->getMessage());\n }\n }\n }", "title": "" }, { "docid": "72047c25c427cd0603b93bc1f4febdeb", "score": "0.53489983", "text": "public function handle()\n {\n // Add Jobs - one portfolio at a time\n\n $portfolios = Portfolio::select('portfolios.id', 'portfolios.user_id', DB::raw('currencies.id as currency_id'))\n ->join('currencies', 'currencies.id', '=', 'portfolios.currency_id')\n ->where('status', 1)->get()->toArray();\n\n foreach ($portfolios as $portfolio)\n {\n $portfolioArr = [\n 'id' => $portfolio['id'],\n 'user_id' => $portfolio['user_id'],\n 'currency_id' => $portfolio['currency']['id'],\n 'currency_symbol' => $portfolio['currency']['symbol']\n ];\n\n // ALWAYS REMEMBER to add the queue name in Kernel file \"schedule\" method when a job is added to a queue like below.\n\n $job = (new SavePortfolioDailyValuesJob($portfolioArr, TRUE))->onQueue('low');\n dispatch($job);\n }\n }", "title": "" }, { "docid": "3f7a26102d76bfd27981ead7d5804b41", "score": "0.53461665", "text": "public function perform(Job $job)\n {\n if (! $this->perChild || ($this->worker->getProcessed() > 0 && $this->worker->getProcessed() % $this->perChild !== 0)) {\n $status = 'Processing ' . $job->queue . ' since ' . strftime('%F %T');\n $this->worker->updateProcLine($status);\n $this->worker->log($status);\n $this->worker->perform($job);\n } else {\n parent::perform($job);\n }\n }", "title": "" }, { "docid": "b85749f099f142933a73935537f2316e", "score": "0.53422505", "text": "public function testExecute()\n {\n $commandTester = $this->createCommandTester(new QueueListCommand());\n $commandTester->execute([\n '--prefix' => 'queue-prefix'\n ]);\n\n $output = $commandTester->getDisplay();\n $this->assertContains('queue-url-1', $output);\n $this->assertContains('queue-url-2', $output);\n $this->assertContains('Done', $output);\n }", "title": "" }, { "docid": "a64f3599757be7b45c4b242d211013e9", "score": "0.53168494", "text": "function getJobsInQueue($filter_options=null, $max_jobs=-1, $with_globals_and_output=false) {}", "title": "" }, { "docid": "44803cd687d6b7d14712b7243a9d11ba", "score": "0.5313539", "text": "public function isStopQueueAfterExecute() : bool\n {\n return false;\n }", "title": "" }, { "docid": "053829a409bba5258c5db1946af0b25a", "score": "0.53065497", "text": "public function run()\n {\n $prefix = $this->queue->channel;\n $waiting = $this->queue->redis->llen(\"$prefix.waiting\");\n $delayed = $this->queue->redis->zcount(\"$prefix.delayed\", '-inf', '+inf');\n $reserved = $this->queue->redis->zcount(\"$prefix.reserved\", '-inf', '+inf');\n $total = $this->queue->redis->get(\"$prefix.message_id\");\n $done = $total - $waiting - $delayed - $reserved;\n\n Console::output($this->format('Jobs', Console::FG_GREEN));\n\n Console::stdout($this->format('- waiting: ', Console::FG_YELLOW));\n Console::output($waiting);\n\n Console::stdout($this->format('- delayed: ', Console::FG_YELLOW));\n Console::output($delayed);\n\n Console::stdout($this->format('- reserved: ', Console::FG_YELLOW));\n Console::output($reserved);\n\n Console::stdout($this->format('- done: ', Console::FG_YELLOW));\n Console::output($done);\n }", "title": "" }, { "docid": "9a87e454dd81cbf9136cca27320808e6", "score": "0.5295771", "text": "public function execute($queue)\n { \n //$this->setProgress($queue, $currentElement++ / $totalElements);\n // Do work here\n //file_put_contents(__DIR__ . '/test.txt', json_encode( $this->criteria['sectionId'] ) );\n //VebraAltoWrapper::getInstance()->vebraAlto->\n $sectionId = $this->criteria['sectionId'];\n $branch = $this->criteria['branch'];\n $token = VebraAltoWrapper::getInstance()->vebraAlto->getToken();\n\n $update = VebraAltoWrapper::getInstance()->vebraAlto->populateSection( $sectionId, $branch );\n if( $update ){\n Craft::$app->getSession()->setNotice(Craft::t('vebra-alto-wrapper', 'Finished import'));\n }else{\n Craft::$app->getSession()->setNotice(Craft::t('vebra-alto-wrapper', 'Error importing'));\n }\n }", "title": "" }, { "docid": "256fada3592a7d967d2a9a7477fab766", "score": "0.52832645", "text": "public static function process_queue(){\n\t\t$doing_emails = EM_MS_GLOBAL ? get_site_option('em_cron_doing_emails') : get_option('em_cron_doing_emails');\n\t\tif( $doing_emails ){\n\t\t\t//if process has been running for over 15 minutes or 900 seconds (e.g. likely due to a php error or timeout), let it proceed\n\t\t\tif( $doing_emails > (time() - 900 ) ){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tEM_MS_GLOBAL ? update_site_option('em_cron_doing_emails', time()) : update_option('em_cron_doing_emails', time());\n\t //init phpmailer\n\t\tglobal $EM_Mailer, $wpdb;\n\t\tif( !is_object($EM_Mailer) ){\n\t\t\t$EM_Mailer = new EM_Mailer();\n\t\t}\n\t\t//get queue\n\t\t$limit = get_option('dbem_cron_emails_limit', 100);\n\t\t$count = 0;\n\t\t$sql = \"SELECT * FROM \".EM_EMAIL_QUEUE_TABLE.\" ORDER BY queue_id ASC LIMIT 100\";\n\t\t$results = $wpdb->get_results($sql);\n\t\t//loop through results of query whilst results exist\n\t\twhile( $wpdb->num_rows > 0 ){\n\t\t\t//go through current results set\n\t\t\tforeach($results as $email){\n\t\t\t\t//if we reach a limit (provided limit is > 0, remove lock and exit this function\n\t\t\t\tif( $count >= $limit && $limit > 0 ){\n\t\t\t\t\tEM_MS_GLOBAL ? update_site_option('em_cron_doing_emails', 0) : update_option('em_cron_doing_emails', 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t//send email, immediately delete after from queue\n\t\t\t if( $EM_Mailer->send($email->subject, $email->body, $email->email, unserialize($email->attachment)) ){\n\t\t\t \t$wpdb->query(\"DELETE FROM \".EM_EMAIL_QUEUE_TABLE.' WHERE queue_id ='.$email->queue_id);\n\t\t\t }\n\t\t\t\t//add to the count and move onto next email\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t//if we haven't reached a limit, load up new results\n\t\t\t$results = $wpdb->get_results($sql);\n\t\t}\n\t\t//remove the lock on this cron\n\t\tEM_MS_GLOBAL ? update_site_option('em_cron_doing_emails', 0) : update_option('em_cron_doing_emails', 0);\n\t}", "title": "" }, { "docid": "15d038521f54a9b72731467febf20432", "score": "0.5283092", "text": "public function getJob();", "title": "" }, { "docid": "b0b08e5225503bc11afcf4198612fba7", "score": "0.5261581", "text": "public function testStartJob()\n {\n $svc = $this->getService();\n // lets create a new job and add it to the queue\n\n $this->logInWithPermission('DUMMYUSER');\n\n $job = new TestQueuedJob();\n $job->testingStartJob = true;\n $id = $svc->queueJob($job);\n\n $this->logInWithPermission('ADMIN');\n\n $result = $svc->runJob($id);\n $this->assertTrue($result);\n\n // we want to make sure that the current user is the runas user of the job\n $descriptor = DataObject::get_by_id(QueuedJobDescriptor::class, $id);\n $this->assertEquals('Complete', $descriptor->JobStatus);\n }", "title": "" }, { "docid": "7759d4addadaaaae604ba35afcd11891", "score": "0.52485037", "text": "public function runManually() {\n $time = date_create(\"now\")->format(\"Y-m-d H:i:s\");\n $schedule = Mage::getModel(\"cron/schedule\");\n $schedule\n ->setJobCode($this->getJobCode())\n ->setCreatedAt($time)\n ->setScheduledAt($time)\n ->setExecutedAt($time)\n ->setStatus(Mage_Cron_Model_Schedule::STATUS_RUNNING)\n ->save();\n\n try {\n $this->run();\n } catch (Exception $e) {\n Mage::logException($e);\n\n $schedule\n ->setMessages($e->getMessage())\n ->setStatus(Mage_Cron_Model_Schedule::STATUS_ERROR)\n ->save();\n\n return;\n }\n\n $time = date_create(\"now\")->format(\"Y-m-d H:i:s\");\n $schedule\n ->setFinishedAt($time)\n ->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS)\n ->save();\n\n return;\n }", "title": "" }, { "docid": "46439cde109fc8994e0c0faf92a684b6", "score": "0.5247155", "text": "protected function doWork($socket)\n {\n Connection::send($socket, 'grab_job');\n\n $resp = array('function' => 'noop');\n while (count($resp) && $resp['function'] == 'noop') {\n $resp = Connection::blockingRead($socket);\n }\n\n if (in_array($resp['function'], array('noop', 'no_job'))) {\n return false;\n }\n\n if ($resp['function'] != 'job_assign') {\n throw new Exception('Internal error - Job was not assigned after it was grabbed by this worker');\n }\n\n $name = $resp['data']['func'];\n $handle = $resp['data']['handle'];\n $arg = array();\n\n if (isset($resp['data']['arg']) &&\n Connection::stringLength($resp['data']['arg'])) {\n $arg = json_decode($resp['data']['arg'], true);\n if($arg === null){\n $arg = $resp['data']['arg'];\n }\n }\n\n try {\n $this->callStartCallbacks($handle, $name, $arg);\n\n $functionCallback = $this->functions[$name]['callback'];\n $result = call_user_func($functionCallback, $arg);\n if (!$result) {\n $result = '';\n }\n\n $this->jobComplete($socket, $handle, $result);\n $this->callCompleteCallbacks($handle, $name, $result);\n } catch (JobException $e) {\n $this->jobFail($socket, $handle);\n $this->callFailCallbacks($handle, $name, $e);\n }\n\n // Force the job's destructor to run\n $job = null;\n\n return true;\n }", "title": "" }, { "docid": "dadf59cb50257c6dc9dfdbb52349a99a", "score": "0.5243566", "text": "function ProcessJob($jobid=0)\n\t{\n\t\tif (!is_null($this->SubJob)) {\n\t\t\treturn $this->SubJob->ProcessJob($jobid);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0d2099effa58d1574c4a7684417fc1b4", "score": "0.5233455", "text": "public function testSimpleExecution()\n {\n $counter = new ExecCounter();\n\n $flow = new Flow('test-flow');\n\n $job2 = new TestJob('test-job-2', $counter);\n $flow->addJob($job2);\n $job3 = new TestJob('test-job-3', $counter);\n $flow->addJob($job3);\n $job1 = new TestJob('test-job-1', $counter);\n $flow->addJob($job1);\n\n $job1->executeAfter($job2);\n $job1->executeBefore($job3);\n\n $eventDispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcher');\n $executor = new FlowExecutor($eventDispatcher);\n\n $executionOrder = $executor->getExecutionOrder($flow);\n\n $this->assertEquals('test-job-2', $executionOrder[0]);\n $this->assertEquals('test-job-1', $executionOrder[1]);\n $this->assertEquals('test-job-3', $executionOrder[2]);\n\n $executor->executeFlow($flow);\n $this->assertEquals(1, $job2->getExecPosition());\n $this->assertEquals(2, $job1->getExecPosition());\n $this->assertEquals(3, $job3->getExecPosition());\n }", "title": "" }, { "docid": "0e20465c6ab4c81a2224e87bae4588ef", "score": "0.52229935", "text": "public function run()\n {\n // let's see if we are allowed to run this.\n if ($this->isExclusivelyRunning()) {\n $this->log(\"[FAILED] Batch[\" . $this->getId() . \"] is an exclusive process. A process with PID[\" . $this->getPID() . \"] is still running.\");\n return false;\n }\n\n // Set Context\n $this->setContext(strtoupper(substr(strrchr($this->batch['path'], '.'), 1)));\n\n // mark the batch as active and record PID\n $this->start();\n\n // Switchy Switch\n switch ($this->getContext()) {\n case \"PHP\":\n // get the PID of this process\n $this->setPID(getmypid());\n\n // Include the Actual file provided\n require_once $this->batch['path'];\n $className = $this->batch['name'];\n\n // If that class exists, then we run it. else, it\n // must've already ran because we included the file.\n if (class_exists($className)) {\n $batch = new $className();\n $batch->run($this);\n }\n break;\n case \"SH\":\n // PID Placeholder. BatchShell will take care of this.\n $this->PID = 0;\n\n // I am unsure if this will stay alive up until the script finishes\n $this->output(shell_exec('sh ' . $this->batch['path'] . ' ' . $this->getId() . ' ' . $this->getParams()));\n\n // See the output whether the job failed or not\n if (strpos($this->__OUTPUT, '[FAILED]')) {\n $this->__OUTPUT = str_replace('[FAILED]', '', $this->__OUTPUT);\n $this->__ERRORS['__WITH_ERRORS'] = true;\n }\n break;\n }\n\n // mark the batch as IDLE and clear PID\n $this->stop();\n }", "title": "" }, { "docid": "53e1c6b4284528b72c45a35aa8312fb8", "score": "0.522213", "text": "public function execute() {}", "title": "" }, { "docid": "4506ddbcdb37ea5010d2629b173de248", "score": "0.520755", "text": "public function queue()\n {\n }", "title": "" }, { "docid": "5234737f22910a48dc65e62d467faa11", "score": "0.5206649", "text": "public function perform(Job $job)\n {\n // Set timeout so as to stop any hanged jobs\n // and turn off displaying errors as it fills\n // up the console\n set_time_limit($this->timeout);\n ini_set('display_errors', 0);\n\n $job->perform();\n\n $status = $job->getStatus();\n\n switch ($status) {\n case Job::STATUS_COMPLETE:\n $this->log('Done job <pop>'.$job.'</pop> in <pop>'.$job->execTimeStr().'</pop>', Logger::INFO);\n break;\n case Job::STATUS_CANCELLED:\n $this->log('Cancelled job <pop>'.$job.'</pop>', Logger::INFO);\n break;\n\n case Job::STATUS_FAILED:\n $this->log('Job '.$job.' failed: \"'.$job->failError().'\" in '.$job->execTimeStr(), Logger::ERROR);\n break;\n default:\n $this->log('Unknown job status \"('.gettype($status).')'.$status.'\" for <pop>'.$job.'</pop>', Logger::WARNING);\n break;\n }\n }", "title": "" }, { "docid": "824b0ba2ecdda53719085ac430db2bb9", "score": "0.5201696", "text": "public function pushOn($queue, $job, $data = '');", "title": "" }, { "docid": "c59783452873619baa9aaf420df93dd1", "score": "0.5197603", "text": "public function handle()\n\t{\n\n\t\tif ($this->argument(\"email\") == NULL) {\n\t\t\t$this->line(\"[Likes Interaction Master] Routine queue-ing of jobs...\");\n\n\t\t\t$users = User::where('tier', '>', 1)\n\t\t\t ->orWhere(function ($query) {\n\t\t\t\t\t\t\t$query->where('tier', 1)->where('trial_activation', 1);\n\t\t\t })\n\t\t\t ->orderBy('user_id', 'asc')\n\t\t\t ->get();\n\n\t\t\t$this->dispatchJobsToEligibleUsers($users);\n\n\t\t} else {\n\n\t\t\tif ($this->argument(\"email\") == \"ig\") {\n\t\t\t\t$ig_profile = InstagramProfile::where('insta_username', $this->argument(\"queueasjob\"))->first();\n\t\t\t\tif ($ig_profile !== NULL) {\n\t\t\t\t\t$this->line(\"[\" . $ig_profile->insta_username . \"] queued for [Likes]\");\n\n\t\t\t\t\tif ($this->argument('use_redis') == 'manual') {\n\t\t\t\t\t\t$job = new \\App\\Jobs\\InteractionLike(\\App\\InstagramProfile::find($ig_profile->id));\n\t\t\t\t\t\t$job->onQueue(\"likes\");\n\t\t\t\t\t\t$job->onConnection('sync');\n\t\t\t\t\t\tdispatch($job);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$job = new \\App\\Jobs\\InteractionLike(\\App\\InstagramProfile::find($ig_profile->id));\n\t\t\t\t\t\t$job->onQueue(\"likes\");\n\t\t\t\t\t\t$job->onConnection('redis');\n\t\t\t\t\t\tdispatch($job);\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->error(\"[\" . $this->argument(\"queueasjob\") . \"] is not a valid IG profile.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->argument(\"email\") !== NULL && $this->argument(\"queueasjob\") !== NULL) {\n\n\t\t\t\t\t$this->line(\"[Likes Interaction Email] Queueing job for [\" . $this->argument(\"email\") . \"]\");\n\n\t\t\t\t\t$user = User::where('email', $this->argument(\"email\"))->first();\n\n\t\t\t\t\tif ($user !== NULL) {\n\n\t\t\t\t\t\tif (($user->tier == 1 && $user->trial_activation == 1) || $user->tier > 1) {\n\n\t\t\t\t\t\t\t$instagram_profiles = InstagramProfile::where('auto_like', TRUE)\n\t\t\t\t\t\t\t ->where('user_id', $user->user_id)\n\t\t\t\t\t\t\t ->get();\n\n\t\t\t\t\t\t\tforeach ($instagram_profiles as $ig_profile) {\n\n\t\t\t\t\t\t\t\tif (!InstagramHelper::validForInteraction($ig_profile)) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($ig_profile->auto_like_ban == 1 && Carbon::now()->lt(Carbon::parse($ig_profile->next_like_time))) {\n\t\t\t\t\t\t\t\t\t$this->error(\"[\" . $ig_profile->insta_username . \"] is throttled on Auto Likes & the ban isn't time yet.\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($ig_profile->next_like_time == NULL) {\n\t\t\t\t\t\t\t\t\t$ig_profile->next_like_time = Carbon::now();\n\t\t\t\t\t\t\t\t\t$ig_profile->save();\n\t\t\t\t\t\t\t\t\t$this->line(\"[\" . $ig_profile->insta_username . \"] queued for [Likes]\");\n\t\t\t\t\t\t\t\t\t$job = new \\App\\Jobs\\InteractionLike(\\App\\InstagramProfile::find($ig_profile->id));\n\t\t\t\t\t\t\t\t\t$job->onQueue(\"likes\");\n\t\t\t\t\t\t\t\t\tdispatch($job);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (Carbon::now()->gte(Carbon::parse($ig_profile->next_like_time))) {\n\t\t\t\t\t\t\t\t\t\t$this->line(\"[\" . $ig_profile->insta_username . \"] queued for [Likes]\");\n\t\t\t\t\t\t\t\t\t\t$job = new \\App\\Jobs\\InteractionLike(\\App\\InstagramProfile::find($ig_profile->id));\n\t\t\t\t\t\t\t\t\t\t$job->onQueue(\"likes\");\n\t\t\t\t\t\t\t\t\t\tdispatch($job);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->line(\"[\" . $user->email . \"] is not on Premium Tier or Free-Trial\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->line(\"[\" . $this->argument(\"email\") . \"] user not found.\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->argument(\"email\") == \"slave\") {\n\n\t\t\t\t\t\t$this->line(\"[Likes Interaction Slave] Beginning sequence to queue jobs...\");\n\n\t\t\t\t\t\t$users = User::orderBy('user_id', 'asc')\n\t\t\t\t\t\t ->get();\n\n\t\t\t\t\t\t$this->dispatchJobsToEligibleUsers($users);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->line(\"[Likes Interaction Email Manual] Beginning sequence for [\" . $this->argument(\"email\") . \"]\");\n\n\t\t\t\t\t\t$user = User::where('email', $this->argument(\"email\"))->first();\n\n\t\t\t\t\t\t// microtime(true) returns the unix timestamp plus milliseconds as a float\n\t\t\t\t\t\t$starttime = microtime(TRUE);\n\n\t\t\t\t\t\tif ($user !== NULL) {\n\t\t\t\t\t\t\t$this->dispatchManualJobToUser($user);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$endtime = microtime(TRUE);\n\t\t\t\t\t\t$timediff = $endtime - $starttime;\n\n\t\t\t\t\t\techo \"\\nThis run took: $timediff milliseconds.\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "16cb8475332895136d5c53911e0dbf4f", "score": "0.51809806", "text": "public function execute() {\n\t}", "title": "" }, { "docid": "0e1e1bd22091619338f083d739e38a2b", "score": "0.5164055", "text": "public function execute()\n\t{\n\t}", "title": "" }, { "docid": "10e2d398d73d57211488b04dd137189b", "score": "0.5163797", "text": "public function handle() {\n try {\n\t\t\tLog::info(\"Camp Club orders job initiated.\");\n\t\t\t$orders = $this->getOrders();\n\t\t\t$ordersDoc = new \\DOMDocument();\n\t\t\t$ordersDoc->preserveWhiteSpace = false;\n\t\t\t$ordersDoc->formatOutput = true;\n\t\t\t$ordersDoc->loadXML($orders);\n\t\t\t$this->splitOrders($ordersDoc);\n\t\t\tLog::info(\"Camp Club orders job completed.\");\n\t\t} catch (\\MarketplaceWebService_Exception $ex) {\n\t\t\t$errorMessage = \n\t\t\t\t\"Error exception: \" . $ex->getMessage() . \n\t\t\t\t\" Status code: \" . $ex->getStatusCode() . \n\t\t\t\t\" Error code: \" . $ex->getErrorCode() . \n\t\t\t\t\" Error type: \" . $ex->getErrorType() . \n\t\t\t\t\" Request ID: \" . $ex->getRequestId();\n\t\t\tLog::error($errorMessage);\n\t\t}\n }", "title": "" }, { "docid": "797fd47e265a3881835caa4f9dac481a", "score": "0.51516175", "text": "public function executeSymbol(Request $request){\n\n /* Action is not allowed if job and failed_job tables are not empty. Que tasks may be in progress */\n if (!QueLock::getStatus()){\n throw (new Exception('Some jobs are in progress! Wait until them finish or truncate Job and Failed job tables.'));\n }\n \n /* Do for both: new and open signals */\n foreach (Execution::where('signal_id', $request['id'])\n //->where('client_volume', '!=', null)\n ->get() as $execution) {\n /* Checks to perform. Each check is added to que and proceeded independently. Last - place order. */\n GetClientFundsCheck::dispatch($this->exchange, $execution);\n SetLeverageCheck::dispatch($this->exchange, $execution);\n //SmallOrderCheck::dispatch($this->exchange, $execution);\n /* Place order */\n InPlaceOrder::dispatch($this->exchange, $execution);\n /* Get trading balance after order execution */\n GetClientTradingBalance::dispatch($this->exchange, $execution)->delay(5);\n }\n\n Signal::where('id', $request['id'])->update(['status' => 'pending']);\n\n return 'Return from exec controller! ' . __FILE__;\n dump('Stopped in ExecutionController. Line: ' . __LINE__);\n die(__FILE__);\n/*\nDelete this code\n // Do it once. Only for a new signal\n if ($request['status'] == \"new\"){\n // $this->fillExecutionsTable($request); // Moved to Signal controller\n //$this->getClientsFunds($request, $this->exchange);\n //$this->fillVolume($request, $this->exchange);\n }\n\n $this->exchange->apiKey = Client::where('id', $execution->client_id)->value('api');\n $this->exchange->secret = Client::where('id', $execution->client_id)->value('api_secret');\n\n if($request['status'] == \"new\"){\n if ($request['direction'] == \"long\"){\n $this->openPosition($this->exchange, $execution, \"long\");\n }\n else{\n $this->openPosition($this->exchange, $execution, \"short\");\n }\n }\n else\n {\n if ($request['direction'] == \"long\"){\n $this->openPosition($this->exchange, $execution, \"short\");\n }\n else{\n $this->openPosition($this->exchange, $execution, \"long\");\n }\n }\n*/\n }", "title": "" }, { "docid": "d5f3f7f6d6234ae579e7f9942cc61d41", "score": "0.5143981", "text": "public function fire(Job $job, array $data);", "title": "" }, { "docid": "598a9911d2c49a2483b593e878211102", "score": "0.5141274", "text": "public function corn_job_func()\n {\n\n if ($this->get_current_version() != $this->get_previous_version()) {\n\n $this->set_version($this->get_current_version());\n }\n\n if ($this->action_on_fire()) {\n if (get_option($this->plugin_name . '_ask_me_later') == 'yes' && get_option($this->plugin_name . '_never_show') != 'yes') {\n\n $this->ask_me_later();\n }\n\n if (get_option($this->plugin_name . '_never_show') != 'yes') {\n\n if (get_option($this->plugin_name . '_ask_me_later') == 'yes') {\n return;\n }\n\n if (!$this->is_installation_date_exists()) {\n $this->set_installation_date();\n }\n $this->is_used_in($this->days);\n\n add_action('admin_footer', [$this, 'scripts'], 9999);\n add_action(\"wp_ajax_never_show_message\", [$this, \"never_show_message\"]);\n add_action(\"wp_ajax_ask_me_later_message\", [$this, \"ask_me_later_message\"]);\n }\n }\n }", "title": "" }, { "docid": "3023bf90bdb88c7f9f90b0d3e67f669c", "score": "0.5137637", "text": "function execute() { }", "title": "" }, { "docid": "9433770ab63dae11e8dd071fe4fd2d91", "score": "0.5129681", "text": "public function perform($jobId)\n {\n $instance = $this->getInstance();\n try {\n Event::trigger('beforePerform', $this);\n\n if (method_exists($instance, 'setUp')) {\n $instance->setUp();\n }\n\n $instance->perform($jobId);\n\n if (method_exists($instance, 'tearDown')) {\n $instance->tearDown();\n }\n\n Event::trigger('afterPerform', $this);\n } // beforePerform/setUp have said don't perform this job. Return.\n catch (DontPerform $e) {\n return FALSE;\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "1a004dbd62759904e8408505203a5782", "score": "0.51234275", "text": "public function execute () {}", "title": "" }, { "docid": "2b00a8a74804de03b6d5c36db02817c6", "score": "0.51166666", "text": "public function handle()\n {\n\n // Retrieve a specific parameter\n $scrapeId = $this->option('job');\n\n // Check the value of id\n if (! isset($scrapeId) || $scrapeId === null) {\n\n // Return error message\n $this->error('Id cannot be null');\n\n // End execution\n return;\n }\n\n // Find job using scrape id\n $job = Job::find($scrapeId);\n\n // Does the job exist?\n if ($job === null) {\n\n // Return error if job does not exist\n $this->error('Invalid ID used');\n\n // End execution\n return;\n\n // Check if job is enabled\n } elseif ($job->is_enabled === false) {\n\n // Print not enabled error\n $this->error('Specified job is not enabled');\n\n // End execution\n return;\n }\n\n // Run command based on ID provided\n switch (true) {\n\n // Is jobs related source name set\n case isset($job->source->name):\n\n // Show which job we are running\n $this->info($job->name . ' has begun using ' . $job->source->name .' scraper job ' . $scrapeId);\n\n // Instanciate command and run it\n $scrapeStatus = new EventbriteScraperCommand($scrapeId);\n\n // Run scrape\n $this->dispatch($scrapeStatus);\n\n // Check if status is true\n if ($scrapeStatus->results['success'] !== true) {\n\n // Check if errors are in array\n if (is_array($scrapeStatus->results['error'])) {\n\n // Loop and echo errors\n foreach ($scrapeStatus->results['error'] as $error) {\n\n // return errors\n $this->error($error);\n }\n\n // Print error\n $this->error('Check your jobs table for missing fields');\n\n } else {\n\n // return error\n $this->error($scrapeStatus->results['error']);\n }\n\n // end execution\n return;\n }\n\n // Scrape complete notice\n $this->info('Scraping complete');\n\n // End execution\n return;\n\n // If all else fails\n default:\n\n // Print Invalid user\n $this->error('Invalid ID used');\n break;\n }\n }", "title": "" }, { "docid": "b962cd844f1c41d80533646be419a6c4", "score": "0.5107444", "text": "public function execute() {\r\n\t\t$this->initialize();\r\n\t\t$this->logger = new \\Crossmedia\\FalMam\\Service\\Logger();\r\n\r\n\t\t$counter = 0;\r\n\t\t$start = time();\r\n\t\t// $this->items = 10;\r\n\t\twhile ($counter < $this->items) {\r\n\t\t\t$event = $this->claimEventFromQueue();\r\n\r\n\t\t\tif ($event === NULL) {\r\n\t\t\t\t// nothing left to do\r\n\t\t\t\t$this->client->logout();\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t\t$counter++;\r\n\r\n\t\t\t#echo $event['object_id'] . ' ' . $event['event_type'] . ':' . $event['target'] . chr(10);\r\n\t\t\t$this->logger->debug($event['object_id'] . ' ' . $event['event_type'] . ':' . $event['target']);\r\n\t\t\t$success = $this->processEvent($event);\r\n\r\n\t\t\tif ($success === TRUE) {\r\n\t\t\t\t$this->finnishEvent($event);\r\n\t\t\t} else {\r\n\t\t\t\t$this->rescheduleEvent($event);\r\n\t\t\t\t$this->logger->warning('rescheduling event', $event);\r\n\t\t\t\t// echo $this->reason . chr(10);\r\n\t\t\t}\r\n\t\t\tunset($event);\r\n\t\t}\r\n\t\t$this->addLog($start, time(), $counter);\r\n\r\n\t\t$this->client->logout();\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "3d0a494739a8396fae3dab4770ca2397", "score": "0.5104123", "text": "function start_job ($commandline, $outfile, $errfile) {\n global $dbfile;\n\n // Hackfest script\n $command = <<< COM\nexport ID=$(\nsqlite3 {$dbfile} << EOF\n.timeout 60000\nBEGIN TRANSACTION;\nINSERT INTO jobs (start) VALUES (datetime('now'));\nSELECT last_insert_rowid();\nEND TRANSACTION;\nEOF\n)\necho \\$ID\nnohup bash -c '\necho The job id is \\$ID\n{$commandline}\nRETURNVAL=\\$?;\necho The return value is \\$RETURNVAL\nsqlite3 {$dbfile} << EOF\n.timeout 60000\nUPDATE jobs SET exit_code=\\$RETURNVAL, stop=datetime(\"now\") WHERE rec_id=\\$ID;\nEOF\nEMAIL=$(\nsqlite3 -nullvalue NULL {$dbfile} << EOF\nSELECT email FROM jobs where rec_id=\\$ID;\nEOF\n)\nif [ \\$EMAIL != NULL ]\n then\n/usr/sbin/sendmail -t -i -f [email protected] << EOF\nTo: \\$EMAIL\nFrom: [email protected]\nSubject: Job finished\nContent-type: text/plain\n\nThe job n. \\$ID is finished with exit code \\$RETURNVAL.\nEOF\nfi\n' > {$outfile} 2> {$errfile} &\nCOM;\n\n $id = exec($command);\n\n if (!is_numeric($id))\n $id = 127;\n\n return $id;\n}", "title": "" }, { "docid": "0cc852151a7e532007e0b921b5f97208", "score": "0.5102869", "text": "public function start()\n {\n $this->helper->log(\"[JOB] Starting worker {$this->name} on queue::{$this->queue}\", Helper::INFO);\n\n $count = 0;\n $job_count = 0;\n try {\n while ($this->count == 0 || $count < $this->count) {\n // Calls signal handlers for pending signals\n // @codeCoverageIgnoreStart\n if (function_exists(\"pcntl_signal_dispatch\")) {\n pcntl_signal_dispatch();\n }\n // @codeCoverageIgnoreEnd\n\n $count += 1;\n $job = $this->getNewJob();\n\n if (!$job) {\n $this->helper->log(\"[JOB] Failed to get a job, queue::{$this->queue} may be empty\", Helper::DEBUG);\n sleep($this->sleep);\n continue;\n }\n\n $job_count += 1;\n $job->run();\n\n // @todo use helper to store stats / also use in task runner (while running single task using bin/task.php)\n // @todo log into stats - taskname, time, avg time, total run count\n }\n } catch (\\Exception $e) {\n $this->helper->log(\"[JOB] unhandled exception::\\\"{$e->getMessage()}\\\"\", Helper::ERROR);\n }\n\n $this->helper->log(\n \"[JOB] worker shutting down after running {$job_count} jobs, over {$count} polling iterations\",\n Helper::INFO\n );\n }", "title": "" }, { "docid": "667583950036e9a70eb971521c887daa", "score": "0.5102584", "text": "abstract public function push($job);", "title": "" }, { "docid": "7b505ad9bbaafd9a57443b9e528af2df", "score": "0.5101078", "text": "public function getJobsInQueue($filter_options = null, $max_jobs = -1, $with_globals_and_output = false) {}", "title": "" }, { "docid": "39562458092173915cb2deb49f8d0921", "score": "0.51002455", "text": "abstract public function finish(JobQueue $q);", "title": "" }, { "docid": "65f889672a0d71cd598eeeaf0cf54fad", "score": "0.50980836", "text": "public function execute() {\n $this->currenttime = time();\n\n if ($this->get_last_run_time() > 0) {\n $sync = new \\local_rocketchat\\sync();\n $sync->sync_pending_courses();\n }\n\n $this->set_last_run_time($this->currenttime);\n }", "title": "" }, { "docid": "d8c8a3bdd30de771d3aa6551de3a564a", "score": "0.5097058", "text": "public function dequeue()\n {\n $sucess = false;\n try {\n //always the job with the highest priority is removed from the queue\n $jobid = Redis::zrevrange('priorityq',0,0);\n Redis::MULTI();\n Redis::zrem('priorityq',$jobid[0]);\n Redis::set(\"priorityq:{$jobid[0]}:inqueue\",\"false\");\n Redis::EXEC();\n $sucess = true;\n }catch (Exception $e) {\n $sucess = false;\n }\n if($sucess){\n $command = Redis::get(\"priorityq:{$jobid[0]}:command\");\n //jobid and command are sent as a response\n return response()->json(\n [\n 'jobid' => $jobid,\n 'command'=> $command\n ]);\n }else{\n return response()->json(\n [\n 'response'=> \"failure\"\n ]);\n }\n }", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "d55e1f18965d363282e325ea85be49d6", "score": "0.509425", "text": "public function execute();", "title": "" }, { "docid": "2eba7bf1cf178484a582cbd61bcbfa3c", "score": "0.5092174", "text": "protected function executeSub() {\n // does nothing here - has to be extended\n }", "title": "" }, { "docid": "e27c1035a55c6987f1e52628939d163e", "score": "0.5085007", "text": "public function actionIndex($q='default')\n {\n $command = $this->getCommandLine();\n\n $queue = Yii::createObject([\n 'class' => 'wh\\asynctask\\Queue',\n 'redis' => $this->module->redis\n ]);\n\n $queueNames = preg_split('/\\s*,\\s*/', $q, -1, PREG_SPLIT_NO_EMPTY);\n\n $currentQueues = $queue->getQueues();\n\n if (!is_array($currentQueues)) {\n $currentQueues = [];\n }\n\n foreach($queueNames as $key => $queueName) {\n if (!in_array($queueName, $currentQueues)) {\n unset($queueNames[$key]);\n }\n }\n\n $currentDate = date('Y-m-d');\n\n while(1) {\n if (date('d') != date('d', strtotime($currentDate))) {\n sleep(5);\n $queue->setStatDay($currentDate);\n $currentDate = date('Y-m-d');\n }\n\n //process schedule\n $scheduleList = $queue->getSchedule();\n foreach($scheduleList as $data) {\n $data = @json_decode($data, true);\n if (!is_null($data)) {\n $queue->quickPush($data['queue'], $data);\n }\n }\n unset($scheduleList);\n\n //process retry\n $retryList = $queue->getReties();\n foreach($retryList as $data) {\n $data = @json_decode($data, true);\n if (!is_null($data)) {\n if ($data['retry_count'] >= 20) {\n break;\n }\n //checkout retry time\n $second = pow($data['retry_count'], 4) + 15 + rand(0, 30) * ($data['retry_count'] + 1);\n if (time() > strtotime($data['retried_at']) + $second) {\n $queue->quickPush($data['queue'], $data);\n } else { //no process\n $queue->setRetry($data, microtime(true)+$second);\n }\n }\n }\n\n //process queue\n $max = $this->processMaxNum;\n\n $str = $this->module->id.'/worker';\n $current = intval(`ps -ef | grep \"$str\" | grep -v grep | wc -l`);\n\n $subProcessNum = $max-$current;\n while($subProcessNum>0) {\n foreach($queueNames as $queueName) {\n //echo $command. '/worker \"'. $queueName.'\" &'.\"\\n\";\n exec(trim($command). '/worker \"'. $queueName.'\" &');\n }\n $subProcessNum--;\n }\n }\n }", "title": "" }, { "docid": "aa1499201e83390c2455570c883885e9", "score": "0.5084939", "text": "public function testJobExecutionException()\n {\n $counter = new ExecCounter();\n\n $flow = new Flow('test-flow');\n $job1 = new TestJob('test-job-1', $counter, function() {\n throw new \\Exception('Test error during job execution');\n });\n $flow->addJob($job1);\n\n $eventDispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcher');\n $executor = new FlowExecutor($eventDispatcher);\n\n $executionFailed = false;\n try {\n $executor->executeFlow($flow);\n } catch (JobExecutionException $e) {\n $executionFailed = true;\n\n $this->assertEquals($job1, $e->getJob());\n $this->assertNotNull($e->getPrevious(), 'Cause of job execution error could not be determined');\n $this->assertTrue($e->getPrevious() instanceof \\Exception);\n }\n\n $this->assertTrue($executionFailed, 'Job execution did not fail');\n }", "title": "" }, { "docid": "5d22c8aa11a91c9a9aa67e57fefe64b1", "score": "0.5084893", "text": "public function handle()\n {\n $status = $this->option('status') ?? null;\n \n Log::info('dispatching');\n \n dispatch((new SyncNfeArquiveiApiJob($status))->onQueue(config('queue.queues.nfe.sync.1')));\n\n Log::info('dispatched a job to sync queue');\n }", "title": "" }, { "docid": "029b2961a4a2ccbd97f9ee3efc62555e", "score": "0.50803655", "text": "function run(JQManagedJob $mJob)\n {\n ini_set('memory_limit', '10M');\n str_repeat('1234567890', 10000000);\n return JQManagedJob::STATUS_COMPLETED;\n }", "title": "" }, { "docid": "94338504356e678f3063c5235224ab18", "score": "0.50782144", "text": "public static function execute();", "title": "" }, { "docid": "6b6ca1be70b7ce5ae1b95c24d685d0bf", "score": "0.507538", "text": "function suspendJob($job_id) {}", "title": "" }, { "docid": "9afac4513cbcced3dd44a51e38e6cbc7", "score": "0.5071306", "text": "public function handleQueuedMessage($job, $data)\n\t\t{\n\t\t\t$this->send($data['view'], $data['data'], $this->getQueuedCallable($data));\n\n\t\t\t$job->delete();\n\t\t}", "title": "" }, { "docid": "86117d2807d74e6e7c8698aa7b376811", "score": "0.5069586", "text": "public function runWork() {\n @shell_exec(\"cd /var/www && nohup php artisan queue:work --once > /dev/null 2>&1 &\");\n }", "title": "" } ]
8834b1e697b1b2cd5d6957b672b9813a
Store webhooks event (create/order, paid/order, create/customer)
[ { "docid": "f272e89ad1119db0d9138fedb1a01ec0", "score": "0.7293125", "text": "public function storeWebhook(Request $request)\n {\n\n $store_data = $request->all();\n\n // Create Order\n $webhook_create_order = ['webhook' => ['topic' => 'orders/create', 'address' => env('APP_URL') . '/getShopifyEvent', 'format' => 'json']];\n $url = 'admin/webhooks.json';\n $response_order = $this->shopify->createWebhookEvent($webhook_create_order, $url, $store_data);\n\n // Order Spend\n $webhook_spend_order = ['webhook' => ['topic' => 'orders/paid', 'address' => env('APP_URL') . '/getShopifyEvent', 'format' => 'json']];\n $url = 'admin/webhooks.json';\n $response_paid = $this->shopify->createWebhookEvent($webhook_spend_order, $url, $store_data);\n\n // Create account\n $webhook_create_account = ['webhook' => ['topic' => 'customers/create', 'address' => env('APP_URL') . '/getShopifyEvent', 'format' => 'json']];\n $url = 'admin/webhooks.json';\n $response_create_acsount = $this->shopify->createWebhookEvent($webhook_create_account, $url, $store_data);\n\n // App Uninstalled\n $webhook_app_uninstalled = ['webhook' => ['topic' => ' app/uninstalled', 'address' => env('APP_URL') . '/getAppUninstalledEvent', 'format' => 'json']];\n $url = 'admin/webhooks.json';\n $response_app_uninstalled = $this->shopify->createWebhookEvent($webhook_app_uninstalled, $url, $store_data);\n\n return response()->json([\n 'response_order' => $response_order,\n 'response_paid' => $response_paid,\n 'response_create_acsount' => $response_create_acsount,\n 'response_app_uninstalled' => $response_app_uninstalled\n ]);\n }", "title": "" } ]
[ { "docid": "d0a3f304f1b494e0a299d03b628b2159", "score": "0.6933291", "text": "public function webhook()\n {\n $this->load->model('checkout/order');\n $webhookData = json_decode(file_get_contents('php://input'), true);\n\n if ($webhookData['event'] != 'status_changed') exit();\n\n $gingerOrder = $this->gingerClient->getOrder($webhookData['order_id']);\n $orderInfo = $this->model_checkout_order->getOrder($gingerOrder['merchant_order_id']);\n\n if (!$orderInfo) exit();\n\n $this->model_checkout_order->addOrderHistory(\n $gingerOrder['merchant_order_id'],\n $this->gingerHelper->getOrderStatus($gingerOrder['status'], $this->config),\n 'Status changed for order: '.$gingerOrder['id'],\n true\n );\n }", "title": "" }, { "docid": "10f6dc43a2977091f87f87809ef2517a", "score": "0.6374997", "text": "public function processWebhookRequest()\n {\n $this->addDebugData('Webhook', $this->getRequestData());\n $this->builder->setQuoteAsOrder($this->getQuote());\n $this->validateNotificationRequest();\n if (!$this->orderAlreadyExists()) {\n http_response_code(404);\n die();\n }\n $event = $this->getRequestData('event');\n switch ($event) {\n case 'cancelled':\n $this->cancelOrder();\n break;\n case 'cancel':\n $this->processOrderCancelation();\n }\n $this->debug();\n }", "title": "" }, { "docid": "b568cb207bf0560b4799749cccf63623", "score": "0.6349413", "text": "public function getWebhookEvent(Request $request)\n {\n\n $order_data = json_decode($request->getContent());\n $customer = $order_data->customer;\n $price = $order_data->total_price;\n $point = ($price * 10) / 100;\n\n\n $user = $this->customerRepository->hasCustomer($customer->email);\n\n if (!$user) {\n $user = $this->customerRepository->create($order_data);\n }\n\n $this->ordeRepository->create($user, $order_data);\n\n $this->pointRepository->create($order_data, $point);\n\n }", "title": "" }, { "docid": "f5057618d3b8b4345fbee3b53ec9ee56", "score": "0.62534165", "text": "public function webhook() {\n\t\t$settings = $this->getSettings();\n\t\t\n\t\t$event = @json_decode(file_get_contents('php://input'));\n\t\tif (empty($event->type)) return;\n\t\t\n\t\tif (!isset($this->request->get['key']) || $this->request->get['key'] != $this->config->get('config_encryption')) {\n\t\t\techo 'Wrong key';\n\t\t\t$this->log->write('STRIPE WEBHOOK ERROR: webhook URL key ' . $this->request->get['key'] . ' does not match the encryption key ' . $this->config->get('config_encryption'));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->load->model('checkout/order');\n\t\t\n\t\tif ($event->type == 'charge.refunded') {\n\t\t\t\n\t\t\t$order_history_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"order_history WHERE `comment` LIKE '%\" . $this->db->escape($event->data->object->id) . \"%' ORDER BY order_history_id DESC\");\n\t\t\tif (!$order_history_query->num_rows) return;\n\t\t\t\n\t\t\t$refund = array_pop($event->data->object->refunds);\n\t\t\t$refund_currency = strtoupper($refund->currency);\n\t\t\t\n\t\t\t$strong = '<strong style=\"display: inline-block; width: 140px; padding: 3px\">';\n\t\t\t$comment = $strong . 'Stripe Event:</strong>' . $event->type . '<br />';\n\t\t\t$comment .= $strong . 'Refund Amount:</strong>' . $this->currency->format($refund->amount / ($refund_currency == 'JPY' ? 1 : 100), $refund_currency, 1) . '<br />';\n\t\t\t$comment .= $strong . 'Total Amount Refunded:</strong>' . $this->currency->format($event->data->object->amount_refunded / ($refund_currency == 'JPY' ? 1 : 100), $refund_currency, 1);\n\t\t\t\n\t\t\t$order_id = $order_history_query->row['order_id'];\n\t\t\t$order_info = $this->model_checkout_order->getOrder($order_id);\n\t\t\t$refund_type = ($event->data->object->amount_refunded == $event->data->object->amount) ? 'refund' : 'partial';\n\t\t\t$order_status_id = ($settings[$refund_type . '_status_id']) ? $settings[$refund_type . '_status_id'] : $order_history_query->row['order_status_id'];\n\t\t\t\n\t\t\tif (version_compare(VERSION, '2.0', '<')) {\n\t\t\t\t$this->model_checkout_order->update($order_id, $order_status_id, $comment, false);\n\t\t\t} else {\n\t\t\t\t$this->model_checkout_order->addOrderHistory($order_id, $order_status_id, $comment, false);\n\t\t\t}\n\t\t\t\n\t\t} elseif ($event->type == 'invoice.payment_succeeded') {\n\t\t\t\n\t\t\tif (empty($settings['subscriptions'])) return;\n\t\t\t\n\t\t\t$customer_response = $this->curlRequest('customers/' . $event->data->object->customer, array('expand' => array('' => 'default_source')));\n\t\t\tif (!empty($customer_response['deleted']) || !empty($customer_response['error'])) {\n\t\t\t\t$this->log->write('STRIPE WEBHOOK ERROR: ' . $customer_response['error']['message']);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$customer_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"customer c LEFT JOIN \" . DB_PREFIX . \"stripe_customer sc ON (c.customer_id = sc.customer_id) WHERE sc.stripe_customer_id = '\" . $this->db->escape($customer_response['id']) . \"' AND sc.transaction_mode = '\" . $this->db->escape($settings['transaction_mode']) . \"'\");\n\t\t\tif ($settings['prevent_guests'] && !$customer_query->num_rows) {\n\t\t\t\t$this->log->write('STRIPE WEBHOOK ERROR: customer with stripe_customer_id ' . $customer_response['id'] . ' does not exist in OpenCart, and guests are currently prevented from using subscriptions');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$customer = $customer_query->row;\n\t\t\t\n\t\t\t$now_query = $this->db->query(\"SELECT NOW()\");\n\t\t\t$last_order_query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"order` WHERE email = '\" . $this->db->escape($customer_response['email']) . \"' ORDER BY date_added DESC\");\n\t\t\tif ($last_order_query->num_rows && (strtotime($now_query->row['NOW()']) - strtotime($last_order_query->row['date_added'])) < 600) {\n\t\t\t\t// Customer's last order is within 10 minutes, so it most likely was an immediate subscription and is already shown on their last order\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$data = array();\n\t\t\t\n\t\t\t$name = (isset($customer_response['default_source']['name'])) ? explode(' ', $customer_response['default_source']['name'], 2) : array();\n\t\t\t$firstname = (isset($name[0])) ? $name[0] : '';\n\t\t\t$lastname = (isset($name[1])) ? $name[1] : '';\n\t\t\t\n\t\t\t$data['customer_id'] = (isset($customer['customer_id'])) ? $customer['customer_id'] : 0;\n\t\t\t$data['firstname'] = $firstname;\n\t\t\t$data['lastname'] = $lastname;\n\t\t\t$data['email'] = $customer_response['email'];\n\t\t\t\n\t\t\t$plan_name = '';\n\t\t\t$product_data = array();\n\t\t\t$total_data = array();\n\t\t\t$subtotal = 0;\n\t\t\t$shipping = false;\n\t\t\t\n\t\t\tforeach ($event->data->object->lines->data as $line) {\n\t\t\t\t$line_currency = strtoupper($line->currency);\n\t\t\t\t$line_decimal_factor = ($line_currency == 'JPY') ? 1 : 100;\n\t\t\t\t\n\t\t\t\tif (empty($line->plan)) {\n\t\t\t\t\t$total_data[] = array(\n\t\t\t\t\t\t'code'\t\t\t=> 'total',\n\t\t\t\t\t\t'title'\t\t\t=> $line->description,\n\t\t\t\t\t\t'text'\t\t\t=> $this->currency->format($line->amount / $line_decimal_factor, $line_currency, 1),\n\t\t\t\t\t\t'value'\t\t\t=> $line->amount / $line_decimal_factor,\n\t\t\t\t\t\t'sort_order'\t=> 2\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$product_query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"product p LEFT JOIN \" . DB_PREFIX . \"product_description pd ON (p.product_id = pd.product_id AND pd.language_id = \" . (int)$this->config->get('config_language_id') . \") WHERE p.location = '\" . $this->db->escape($line->plan->id) . \"'\");\n\t\t\t\t\tif (!$product_query->num_rows) continue;\n\t\t\t\t\tforeach ($product_query->rows as $product) {\n\t\t\t\t\t\t$plan_name = $line->plan->name;\n\t\t\t\t\t\t$subtotal += $line->amount / $line_decimal_factor;\n\t\t\t\t\t\t$shipping = ($shipping || $product['shipping']);\n\t\t\t\t\t\t$product_data[] = array(\n\t\t\t\t\t\t\t'product_id'\t=> $product['product_id'],\n\t\t\t\t\t\t\t'name'\t\t\t=> $product['name'],\n\t\t\t\t\t\t\t'model'\t\t\t=> $product['model'],\n\t\t\t\t\t\t\t'option'\t\t=> array(),\n\t\t\t\t\t\t\t'download'\t\t=> array(),\n\t\t\t\t\t\t\t'quantity'\t\t=> $line->quantity,\n\t\t\t\t\t\t\t'subtract'\t\t=> $product['subtract'],\n\t\t\t\t\t\t\t'price'\t\t\t=> ($line->amount / $line_decimal_factor / $line->quantity),\n\t\t\t\t\t\t\t'total'\t\t\t=> $line->amount / $line_decimal_factor,\n\t\t\t\t\t\t\t'tax'\t\t\t=> $this->tax->getTax($line->amount / $line_decimal_factor, $product['tax_class_id']),\n\t\t\t\t\t\t\t'reward'\t\t=> isset($product['reward']) ? $product['reward'] : 0\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$country = (isset($customer_response['default_source']['address_country'])) ? $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"country WHERE `name` = '\" . $this->db->escape($customer_response['default_source']['address_country']) . \"'\") : '';\n\t\t\t$country_id = (isset($country->row['country_id'])) ? $country->row['country_id'] : 0;\n\t\t\t\n\t\t\t$zone = (isset($customer_response['default_source']['address_state'])) ? $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"zone WHERE `name` = '\" . $this->db->escape($customer_response['default_source']['address_state']) . \"' AND country_id = \" . (int)$country_id) : '';\n\t\t\t$zone_id = (isset($zone->row['zone_id'])) ? $zone->row['zone_id'] : 0;\n\t\t\t\n\t\t\t$data['payment_firstname'] = $firstname;\n\t\t\t$data['payment_lastname'] = $lastname;\n\t\t\t$data['payment_company'] = '';\n\t\t\t$data['payment_company_id'] = '';\n\t\t\t$data['payment_tax_id'] = '';\n\t\t\t$data['payment_address_1'] = $customer_response['default_source']['address_line1'];\n\t\t\t$data['payment_address_2'] = $customer_response['default_source']['address_line2'];\n\t\t\t$data['payment_city'] = $customer_response['default_source']['address_city'];\n\t\t\t$data['payment_postcode'] = $customer_response['default_source']['address_zip'];\n\t\t\t$data['payment_zone'] = $customer_response['default_source']['address_state'];\n\t\t\t$data['payment_zone_id'] = $zone_id;\n\t\t\t$data['payment_country'] = $customer_response['default_source']['address_country'];\n\t\t\t$data['payment_country_id'] = $country_id;\n\t\t\t\n\t\t\tif ($shipping) {\n\t\t\t\t$data['shipping_firstname'] = $firstname;\n\t\t\t\t$data['shipping_lastname'] = $lastname;\n\t\t\t\t$data['shipping_company'] = '';\n\t\t\t\t$data['shipping_company_id'] = '';\n\t\t\t\t$data['shipping_tax_id'] = '';\n\t\t\t\t$data['shipping_address_1'] = $customer_response['default_source']['address_line1'];\n\t\t\t\t$data['shipping_address_2'] = $customer_response['default_source']['address_line2'];\n\t\t\t\t$data['shipping_city'] = $customer_response['default_source']['address_city'];\n\t\t\t\t$data['shipping_postcode'] = $customer_response['default_source']['address_zip'];\n\t\t\t\t$data['shipping_zone'] = $customer_response['default_source']['address_state'];\n\t\t\t\t$data['shipping_zone_id'] = $zone_id;\n\t\t\t\t$data['shipping_country'] = $customer_response['default_source']['address_country'];\n\t\t\t\t$data['shipping_country_id'] = $country_id;\n\t\t\t}\n\t\t\t\n\t\t\t$decimal_factor = ($event->data->object->currency == 'jpy') ? 1 : 100;\n\t\t\t\n\t\t\t$total_data[] = array(\n\t\t\t\t'code'\t\t\t=> 'sub_total',\n\t\t\t\t'title'\t\t\t=> 'Sub-Total',\n\t\t\t\t'text'\t\t\t=> $this->currency->format($subtotal, $event->data->object->currency, 1),\n\t\t\t\t'value'\t\t\t=> $subtotal,\n\t\t\t\t'sort_order'\t=> 1\n\t\t\t);\n\t\t\tif (!empty($event->data->object->tax)) {\n\t\t\t\t$total_data[] = array(\n\t\t\t\t\t'code'\t\t\t=> 'tax',\n\t\t\t\t\t'title'\t\t\t=> 'Tax',\n\t\t\t\t\t'text'\t\t\t=> $this->currency->format($event->data->object->tax / $decimal_factor, 1),\n\t\t\t\t\t'value'\t\t\t=> $event->data->object->tax / $decimal_factor,\n\t\t\t\t\t'sort_order'\t=> 2\n\t\t\t\t);\n\t\t\t}\n\t\t\t$total_data[] = array(\n\t\t\t\t'code'\t\t\t=> 'total',\n\t\t\t\t'title'\t\t\t=> 'Total',\n\t\t\t\t'text'\t\t\t=> $this->currency->format($event->data->object->total / $decimal_factor, 1),\n\t\t\t\t'value'\t\t\t=> $event->data->object->total / $decimal_factor,\n\t\t\t\t'sort_order'\t=> 3\n\t\t\t);\n\t\t\t\n\t\t\t$data['products'] = $product_data;\n\t\t\t$data['totals'] = $total_data;\n\t\t\t$data['total'] = $event->data->object->total / $decimal_factor;\n\t\t\t\n\t\t\t$this->load->model($this->type . '/' . $this->name);\n\t\t\t$order_id = $this->{'model_'.$this->type.'_'.$this->name}->createOrder($data);\n\t\t\t$order_status_id = $settings['success_status_id'];\n\t\t\t\n\t\t\t$strong = '<strong style=\"display: inline-block; width: 140px; padding: 3px\">';\n\t\t\t$comment = $strong . 'Charged for Plan:</strong>' . $plan_name . '<br />';\n\t\t\tif (!empty($event->data->object->charge)) {\n\t\t\t\t$comment .= $strong . 'Stripe Charge ID:</strong>' . $event->data->object->charge . '<br />';\n\t\t\t}\n\t\t\t\n\t\t\t$error_display = $this->config->get('config_error_display');\n\t\t\t$this->config->set('config_error_display', 0);\n\t\t\tregister_shutdown_function(array($this, 'logFatalErrors'));\n\t\t\t\n\t\t\tif (version_compare(VERSION, '2.0') < 0) {\n\t\t\t\t$this->model_checkout_order->confirm($order_id, $order_status_id);\n\t\t\t\t$this->model_checkout_order->update($order_id, $order_status_id, $comment, false);\n\t\t\t} else {\n\t\t\t\t$this->model_checkout_order->addOrderHistory($order_id, $order_status_id, $comment, false);\n\t\t\t}\n\t\t\t\n\t\t\t$this->config->set('config_error_display', $error_display);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "779ecada49f346abeb8647e92ba6bfe9", "score": "0.62318385", "text": "public function webhook() {\n\n\n\n }", "title": "" }, { "docid": "7a075e7b2bd42ee1386a276af9d230a7", "score": "0.6226094", "text": "function webhook() {\n //ASTODO need to complete the webhook functionality\n return \"You posted to the webhook!\";\n\n}", "title": "" }, { "docid": "19b3ce88b04b586988d7ec5d6b8880a9", "score": "0.6042861", "text": "protected function mollieWebhookAction()\n {\n // Allow GET vars in testmode\n\t if ($this->cartMollieConf['settings']['testmode']) {\n\t\t $molliePaymentId = GeneralUtility::_GP('id');\n\t } else {\n\t\t $molliePaymentId = GeneralUtility::_POST('id');\n\t }\n\n\t $mollie = \\Netcoop\\CartMollie\\Utility\\Mollie::instantiateMollie($this->cartMollieConf['settings']);\n\t $molliePayment = $mollie->payments->get($molliePaymentId);\n\n\t if ($this->cartMollieConf['settings']['logPayments']) {\n\t\t \\Netcoop\\CartMollie\\Utility\\Mollie::logWrite( $molliePaymentId, 'webhook', print_r( $molliePayment, true ) );\n\t }\n\n\t // Payment states: open, pending, paid, cancelled\n\n\t $molliePaymentStatus = $molliePayment->status;\n\t\t$metadata = $molliePayment->metadata;\n\t\t$orderNumber = $metadata->orderNumber;\n\n\t $this->getOrderItem($orderNumber);\n $this->getOrderPayment();\n $this->getCart();\n\n if (NULL === $this->transaction = $this->getTransactionForPaymentId($molliePaymentId))\n {\n\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::sysLog('Invalid webhook request: Transaction with molliePaymentId (' . $molliePaymentId . ') not found.', 'cart_mollie', 3);\n }\n elseif (!$this->orderPayment->getTransactions()->contains($this->transaction))\n {\n\t \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::sysLog( 'Invalid webhook request: No matching transaction found for this combination of orderNumber (' . $orderNumber . ') and molliePaymentId (' . $molliePaymentId . ')', 'cart_mollie', 3 );\n }\n else\n {\n\n\t $this->transaction->setExternalStatusCode($molliePaymentStatus);\n\t $this->transaction->setStatus($molliePaymentStatus);\n\t $this->orderPayment->setStatus($molliePaymentStatus);\n\n\t // Possible statusses for which Mollie calls the webhook: canceled, expired, failed, paid\n\t // Only for status paid additional action is required at this point, can be checked with $molliePayment->isPaid()\n\t if ($molliePayment->isPaid())\n\t {\n\t \t// do something\n\t\t // Mails are configured for each status separately. For emails to buyer there is only a template for status 'paid'\n\t\t // so we don't need to do more here. Emails to seller can be set for other statusses, just create the templates\n\t }\n\n\t $this->orderTransactionRepository->update($this->transaction);\n\t $this->orderPaymentRepository->update($this->orderPayment);\n\n\t $this->persistenceManager->persistAll();\n\n\t $this->sendMails();\n\n\t $this->updateCart();\n\n }\n\n return [];\n }", "title": "" }, { "docid": "a42ad5849b703c0b50190beebc987b6c", "score": "0.5945825", "text": "public function processWebhookRequest(Request $request)\n {\n $eventType = $request->input('event_type');\n // Setup subscription if provided\n $subscription = null;\n $subscriptionManager = null;\n $subscriptionId = null;\n\n // On subscription events:\n if ($request->input('resource_type') == 'subscription' && $request->input(\"resource.id\")) {\n $subscriptionId = $request->input(\"resource.id\");\n }\n // On payment events that relate to a subscription:\n if ($request->input('resource.billing_agreement_id')) {\n $subscriptionId = $request->input(\"resource.billing_agreement_id\");\n }\n if ($subscriptionId) {\n $subscriptionManager = $this->subscriptionManager();\n $subscription = $subscriptionManager->getSubscriptionFromVendorId($subscriptionId);\n //This might occur with old subscriptions?\n if (!$subscription) throw new Error('Paypal webhook ' . $eventType . ' refers to unknown subscription: ' . $subscriptionId);\n }\n if ($subscription) Log::debug('Using subscription ' . json_encode($subscription));\n\n switch ($eventType) {\n\n case 'PAYMENT.CAPTURE.PENDING':\n case 'PAYMENT.SALE.PENDING':\n //Shouldn't see these unless something didn't auto-capture\n //Happened in local dev due to the sandbox business account not being set to use USD\n Log::warning('Paypal Webhook ' . $eventType . ' notified us of a payment that went to pending:'\n . ': ' . json_encode($request->all()));\n break;\n\n\n case 'PAYMENT.CAPTURE.COMPLETED':\n //Nothing to do, as we already know from the response\n break;\n\n case 'PAYMENT.SALE.COMPLETED':\n if ($subscription) {\n if ($this->processSubscriptions) {\n $amount = $request->input('resource.amount.total');\n $vendorTransactionId = $request->input('resource.id');\n //Need a transaction to represent the payment that's already occurred\n $transactionManager = resolve(PaymentTransactionManager::class);\n $transaction = $transactionManager->getTransactionFromExternalId($vendorTransactionId);\n if (!$transaction) {\n $transaction = $subscriptionManager->createTransactionForSubscription($subscription);\n $transactionManager->updateVendorTransactionId($transaction, $vendorTransactionId);\n $transactionManager->setPaid($transaction);\n }\n $subscriptionManager->processPaidSubscriptionTransaction($subscription, $transaction);\n } else {\n Log::info(\"Paypal Webhook - Notified of subscription payment against Subscription#{$subscription->id} but skipping due to processing being disabled.\");\n }\n } else {\n Log::info(\"Paypal Webhook - Notified of subscription payment but found no subscription to pay against.\");\n }\n break;\n\n case 'BILLING.SUBSCRIPTION.CREATED':\n //We made it, so don't need to react\n break;\n\n case 'BILLING.SUBSCRIPTION.ACTIVATED':\n //For an initial subscription we should already know but this might be used be continuations\n //Witnessed this arriving AFTER a payment so not reliable for order\n $subscriptionManager->setSubscriptionAsActive($subscription);\n break;\n\n case 'BILLING.SUBSCRIPTION.CANCELLED':\n $subscriptionManager->closeSubscription($subscription, 'cancelled');\n break;\n\n case 'BILLING.SUBSCRIPTION.EXPIRED':\n $subscriptionManager->closeSubscription($subscription, 'expired');\n break;\n\n case 'BILLING.SUBSCRIPTION.SUSPENDED':\n $subscriptionManager->suspendSubscription($subscription);\n break;\n\n case 'BILLING.SUBSCRIPTION.PAYMENT.FAILED':\n Log::debug('TODO: PayPal Webhook Implementation - failed payment');\n break;\n\n default:\n Log::debug('No code to run for Paypal webhook: ' . $eventType);\n break;\n }\n return response('OK', 200);\n }", "title": "" }, { "docid": "b27b9756888f8ee8701f56565f410e04", "score": "0.5926504", "text": "public function index(Request $request)\n {\n\n if ($request->all()) {\n $shopeeRequest = ShopeeRequest::create([\n 'action' => 'webhook',\n 'response' => $request->all(),\n ]);\n\n $data = app('shopee')->helper()->transformWebhookData($request->all());\n\n event(new WebhookReceived($data));\n\n // add order if not exists\n if (Arr::has($data, ['ordersn', 'shop_id'])) {\n ShopeeOrder::updateOrCreate([\n 'id' => $data['ordersn']\n ], [\n 'shop_id' => $data['shop_id']\n ]);\n }\n } else {\n // no payload received\n logger()->error('Shopee webhook : No payload');\n }\n }", "title": "" }, { "docid": "89e3ab8d8875ad74ecdf6db28ff8c51b", "score": "0.5865093", "text": "private function handle_order_put_hold_webhook( $webhook_data ) {\n // Order put on hold.\n }", "title": "" }, { "docid": "c7f4052490b9fbec6214d8362fa1d8d7", "score": "0.58288944", "text": "public function events()\n\t{\n if($post = json_decode(file_get_contents('php://input')))\n {\n $this->load->model('order_m');\n $order = $this->order_m->getOrderNumber($post->data->description);\n\n if(isset($order->total))\n {\n $this->load->model('omise_m');\n $data = array(\n \"order_id\" => $order->id,\n \"charge_id\" => $post->data->id,\n \"status\" => 'pending',\n \"created_on\" => date('Y-m-d H:i:s'),\n \"modified_on\" \t=> date('Y-m-d H:i:s')\n );\n $this->omise_m->save($data);\n }\n }\n\t}", "title": "" }, { "docid": "8b93e6f81b3acdebc3c8138d54e1a918", "score": "0.57333386", "text": "public function handleCustomerCreated($payload)\n {\n $user = User::firstOrCreate(['stripe_id' => $payload['data']['object']['id']], [\n 'email' => $payload['data']['object']['email'],\n 'password' => 'notset',\n ]);\n\n $created = $user->wasRecentlyCreated;\n\n if ($payload['data']['object']['phone']) {\n $input['phonenumber'] = $payload['data']['object']['phone'];\n $phone = SavePhone::dispatchNow($input);\n } else {\n $phone = (object) [];\n $phone->id = null;\n }\n\n $user->stripe_id = $payload['data']['object']['id'];\n $user->email = $payload['data']['object']['email'];\n $user->phone_id = $phone->id;\n\n if ($created) {\n // $token = Password::getRepository()->create($user);\n // $user->sendPasswordResetNotification($token);\n event(new \\Illuminate\\Auth\\Events\\Registered($user));\n $user->email_verified_at = now();\n $user->save();\n } else {\n $user->save();\n }\n\n return response('Webhook Handled', 200);\n }", "title": "" }, { "docid": "5cf70b8839c55ad97b7057e423323d07", "score": "0.57297206", "text": "public function index() {\n\n Log::info(\"received a new webhook call from Mollie\", ['process' => '[mollie-webhooks]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__, 'payload' => request()->all()]);\n\n //validate that we have a valid request\n if (!request('id')) {\n Log::info(\"webhook is not want we expected - will ignore\", ['process' => '[mollie-webhooks]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__, 'payload' => request()->all()]);\n }\n\n //connect to mollie\n try {\n $mollie = new Api\\MollieApiClient();\n $mollie->setApiKey($this->getKey());\n } catch (\\Mollie\\Api\\Exceptions\\ApiException $e) {\n Log::error(\"mollie webhook error - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, 'Webhook Error - ' . $e->getMessage());\n } catch (Exception $e) {\n Log::error(\"mollie webhook error - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, 'Webhook Error - ' . $e->getMessage());\n }\n\n //get the payment actual payment from mollie\n try {\n $transaction_id = request('id');\n $payment = $mollie->payments->get($transaction_id);\n } catch (\\Mollie\\Api\\Exceptions\\ApiException $e) {\n Log::error(\"mollie webhook error - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, 'Webhook Error - ' . $e->getMessage());\n } catch (Exception $e) {\n Log::error(\"mollie webhook error - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, 'Webhook Error - ' . $e->getMessage());\n }\n\n //make sure we do not already recorded this payment\n if (\\App\\Models\\Payment::Where('payment_transaction_id', $transaction_id)->exists()) {\n Log::info(\"this transaction ($transaction_id) has already been recorded - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, \"Webhook Error - This transaction ($transaction_id) has already been recorded\");\n }\n\n //make sure we do not already have this queued for processing\n if (\\App\\Models\\Webhook::Where('webhooks_payment_transactionid', $transaction_id)->exists()) {\n Log::info(\"this transaction ($transaction_id) is already queued for processing - \" . $e->getMessage(), ['process' => '[mollie-webhook]', config('app.debug_ref'), 'function' => __function__, 'file' => basename(__FILE__), 'line' => __line__, 'path' => __file__]);\n abort(409, \"Webhook Error - This transaction ($transaction_id) is already queued for processing\");\n }\n\n\n $webhook = new \\App\\Models\\Webhook();\n $webhook->webhooks_gateway_name = 'mollie';\n $webhook->webhooks_type = 'payment_completed';\n $webhook->webhooks_payment_type = 'onetime';\n $webhook->webhooks_payment_amount = $payment->amount->value;\n $webhook->webhooks_payment_transactionid = $transaction_id;\n $webhook->webhooks_matching_reference = $transaction_id;\n $webhook->webhooks_payload = json_encode($payment);\n $webhook->webhooks_status = 'new';\n $webhook->save();\n\n }", "title": "" }, { "docid": "f550c81e98fdb6b84a699d51e5f1f188", "score": "0.5725162", "text": "public static function createCustomWebhooks($email_id, $validation_id)\n {\n $tokenValidation = new \\App\\Models\\RevolutTokenValidationModel();\n\n $condition = [\n 'email_id' => $email_id,\n 'validation_id' => $validation_id,\n ];\n $db_resp = $tokenValidation->getData($condition);\n if ($db_resp['status']) {\n $result = $db_resp['data'];\n\n $is_test_live = $result['is_test_live'];\n $paymentURL = getenv('revolut.SANDBOX_API_URL');\n $api_key = $result['revolut_api_key_test'];\n if ($is_test_live === '1') {\n $paymentURL = getenv('revolut.PROD_API_URL');\n $api_key = $result['revolut_api_key'];\n }\n $request = [\n 'url' => getenv('app.baseURL') . 'webHooks/revolutWebhook/' . $email_id . '/' . base64_encode(json_encode($validation_id, true)),\n 'events' => ['ORDER_COMPLETED', 'ORDER_AUTHORISED'],\n ];\n $request = json_encode($request, true);\n\n $headers = [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $api_key,\n 'Content-Type' => 'application/json',\n ],\n ];\n\n $url = $paymentURL . '/api/1.0/webhooks';\n helper('curl');\n $api_response = \\curl_helper::APICall($url, 'POST', $request, $headers, 'Revolut', 'WebhooksCreation', $email_id, $validation_id, 'application/json');\n if ($api_response['status']) {\n $res = $api_response['data'];\n if (isset($res['id'])) {\n $data = [\n 'email_id' => $email_id,\n 'webhook_id' => $res['id'],\n 'scope' => addslashes(json_encode($res['events'])),\n 'destination' => $res['url'],\n 'api_response' => addslashes(json_encode($res)),\n 'token_validation_id' => $validation_id,\n ];\n $revolutWebhooks = new \\App\\Models\\RevolutWebhooksModel();\n $revolutWebhooks->insertData($data);\n }\n }\n }\n }", "title": "" }, { "docid": "d1c873146712cbbd98fcb0889f632faf", "score": "0.57221156", "text": "public function postAddedNewOrder(){\n }", "title": "" }, { "docid": "ecf311f27891c425d1e4d0e8f923355c", "score": "0.56913334", "text": "public function orderSavedEvent($observer) {\r\n\r\n $customer = Mage::getSingleton('customer/session')->getCustomer();\r\n $order = $observer['order'];\r\n $orderId = $order->getId();\r\n $orderTotalAmount = $order->getGrandTotal();\r\n $configData = Mage::helper('Boonagel_Alpesa')->getConfigData();\r\n if ($customer != null) {\r\n\r\n if (count($configData) == 1) {\r\n\r\n $customerId = $customer->getId();\r\n\r\n $totalPoints = Mage::helper('Boonagel_Alpesa')->pointPriceConversion($configData, '', $orderTotalAmount, 'curr-pnt');\r\n //update user logs for spending-session\r\n $alpesauser = Mage::getModel('alpesa/alpesauser');\r\n $alpesauser->getData();\r\n $alpesauser->setLogType('spending-session');\r\n $alpesauser->setUserId($customerId);\r\n $alpesauser->setSessionAmount($orderTotalAmount);\r\n $alpesauser->setOrderNumber($orderId);\r\n $alpesauser->setUpdatedAt(now());\r\n $alpesauser->setcreatedAt(now());\r\n $dbuserlogs = $alpesauser->save();\r\n\r\n //update user points to available\r\n $dbpointsdata = Mage::helper('Boonagel_Alpesa')->savePointsToPointsModel($customerId, $orderTotalAmount, $totalPoints, 0, $orderId);\r\n }\r\n }\r\n\r\n $customerId = $customer != null ? $customer->getId() : 0;\r\n //ensure the customer is not registered before awarding them\r\n if ($customerId == 0) {\r\n\r\n //ensure config has been configured\r\n if (count($configData) == 1 && Mage::helper('Boonagel_Alpesa')->processFlagPoints($configData, 'referral') != 0) {\r\n //confirm if referral program is valid\r\n //confirm if cookie exists if not dont continue execution since its not a referral program\r\n $refActCookie = Mage::getModel('core/cookie')->get('alpesarefcookie');\r\n if (strlen(trim($refActCookie)) > 0) {\r\n //destroy the cookie if it exists\r\n Mage::getModel('core/cookie')->delete('alpesarefcookie');\r\n //confirm if user is registered and has been logged to avoid awarding them again\r\n $customerData = Mage::helper('Boonagel_Alpesa')->dynoData('alpesa/alpesarefcustomer', array('customer_id,eq,' . $customerId), 1);\r\n if ($customerData->count() < 1) {\r\n // award points since this user has never been awarded points before\r\n $refereeData = Mage::helper('Boonagel_Alpesa')->dynoData('alpesa/alpesarefcodes', array('code,eq,' . $refActCookie), 1);\r\n if ($refereeData->count() == 1) {\r\n //award points\r\n $referee = $refereeData->getFirstItem();\r\n $alpesarefpoints = Mage::getModel('alpesa/alpesarefpoints');\r\n $alpesarefpoints->getData();\r\n $alpesarefpoints->setActual(0);\r\n $alpesarefpoints->setCustomerId($referee->getCustomerId());\r\n $alpesarefpoints->setOrderId($orderId);\r\n $alpesarefpoints->setPoints(Mage::helper('Boonagel_Alpesa')->processFlagPoints($configData, 'referral'));\r\n $alpesarefpoints->setUpdatedAt(now());\r\n $alpesarefpoints->setcreatedAt(now());\r\n $dbdata = $alpesarefpoints->save();\r\n\r\n //update user points to available\r\n $dbpointsdata = Mage::helper('Boonagel_Alpesa')->savePointsToPointsModel($referee->getCustomerId(), $orderTotalAmount, Mage::helper('Boonagel_Alpesa')->processFlagPoints($configData, 'referral'), 0, $orderId);\r\n\r\n //this code wont be executed either way\r\n if ($customerId != 0) {\r\n //register this user if id is not 0 in our referee logs\r\n $alpesarefcustomer = Mage::getModel('alpesa/alpesarefcustomer');\r\n $alpesarefcustomer->getData();\r\n $alpesarefcustomer->setCustomerId($customerId);\r\n $alpesarefcustomer->setRefereeId($referee->getCustomerId());\r\n $alpesarefcustomer->setUpdatedAt(now());\r\n $alpesarefcustomer->setcreatedAt(now());\r\n $dbdata = $alpesarefcustomer->save();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "41a2a48c3b92bea837b6e21acd172e54", "score": "0.5687285", "text": "public function signupClickFunnelWebhook(){\n #$requestJSONObject = json_decode(file_get_contents(\"php://input\"));\n $payloadjson=file_get_contents(\"http://localhost/CRC-CodeRefactoring/CRC---Refactoring\");\n $requestJSONObject = json_decode($payloadjson);\n if(AWS_ENV_STATUS == 'LIVE' )\n $requestArray = $this->setWebhookRequestParams($requestJSONObject->purchase->contact,$requestJSONObject->purchase->subscription_id,$requestJSONObject->purchase->error_message,'cr_start'); \n else if(AWS_ENV_STATUS == 'QA')\n $requestArray = $this->setWebhookRequestParams($requestJSONObject->contact,$requestJSONObject->subscription_id,$requestJSONObject->error_message,'cr_start_master');\n try{\n if(empty($requestArray)) {\n throw new Exception(\"RequestArray is not fetched form webhook\");\n }\n $txtFirstName = $requestArray['txtFirstName'];\n $txtLastName = $requestArray['txtLastName'];\n $txtEmail = $requestArray['txtEmail'];\n $ipAddress = $requestArray['ipAddress'];\n $txtgsId = $requestArray['txtgsId'];\n $requestCountry = $requestArray['country'];\n $txtPhone = $requestArray['txtPhone'];\n $txtZip = $requestArray['txtZip'];\n $salesPersonId = $requestArray['salesPersonId'];\n $planCode = $requestArray['planCode'];\n $subId = $requestArray['subId'];\n $validRecurlyAccountArray\t = $this->checkRecurlyAccountSubscription($subId,$requestArray['recurlyAccountCode'],$planCode);\n $recurlyAccountCode \t\t = $validRecurlyAccountArray['recurlyAccountCode'];\n $subscriptionId \t\t \t = $validRecurlyAccountArray['subscriptionId'];\n $clickFunnelSignupStatus \t = $this->Signupmodel->selectDataClickFunnel($txtEmail);\n if($clickFunnelSignupStatus[0]['signup_status'] == '0' && $subscriptionId!=''){\n $dataSession =$this->submitSignupdataStep1($requestArray,$recurlyAccountCode,$subscriptionId);\n $uid = $dataSession['uid'];\n $registrationId = $dataSession['registrationId'];\n $fname = $dataSession['fname'];\n $lname = $dataSession['lname'];\n $adminEmail = $dataSession['adminEmail'];\n $companyCountry = $dataSession['companyCountry'];\n //$this->submitSignupdataStep2($registrationId);\n $clinentAffiliateIds=$this->submitSignupdataStep3($registrationId,$fname,$lname,$adminEmail,$companyCountry);\n $this->submitSignupdataStep4($requestCountry,$clinentAffiliateIds,$dataSession);\n $status=$this->Signupmodel->updateLastCompleteStep('entry_data_signup_step4',$registrationId);\n //$this->callingGrowsumoAPI($txtEmail,$ipAddress,$txtFirstName,$txtLastName,$txtgsId,$recurlyAccountCode,$registrationId);\n $this->sendIntercomRequest($txtCompanyName,$txtFirstName,$txtLastName,$txtPhone,$registrationId,$uid,$adminEmail);\n $this->sendDatatoProofAPI($fname,$lname,$adminEmail,$txtCompanyName,$txtPhone,$txtZip,$ipAddress,$requestCountry);\n $this->sendDatatoCloseioIntegration($adminEmail,$txtPhone,$txtFirstName,$txtCompanyName);\n //$this->sendEmailtoSalesPerson($salesPersonId,$requestCountry,$txtPhone,$fname,$lname,$adminEmail);\n //$this->sendWelcomeEmailtoNewUser($uid,$adminEmail,$txtFirstName,$txtLastName);\n $this->finalUpdateStatusClickFunnel($txtEmail,$recurlyAccountCode);\n echo '<pre>';print_r($status);exit;\n }\n }catch(Exception $e){\n $this->errorMessage=$e->getMessage();\n }\n }", "title": "" }, { "docid": "04214dd0fa5abc8668e2ba4e5c532428", "score": "0.5683693", "text": "public function store(Request $request)\n {\n //create Todo Model and\n $todo = new Todo;\n if ($request->session()->has('user')) {\n $user = $request->session()->get('user');\n //var_dump($user); exit();\n $todo->facebook_id = $user[0]['id'];\n //var_dump($todo->facebook_id);exit();\n }\n $todo->content = $request->content;\n $todo->save();\n //var_dump($todo);exit();\n //launch event\n\n $phone = $request->phone . $request->gateway;\n //dd($phone);\n $timer = $request->timer;\n event(new TodoCreatedEvent($todo,$phone,$timer));\n $request->session()->flash('status', 'Message Sent!');\n return redirect('/');\n }", "title": "" }, { "docid": "3f7500e7688acfdaea78114078199cab", "score": "0.5680058", "text": "function webhook()\n\t{\n $message_from = (isset($this->request['from_number'])) ? $this->request['from_number'] : null;\t\n $message_to = (isset($this->request['to_number'])) ? $this->request['to_number'] : null;\t\t\n $message_description =(isset($this->request['content'])) ? $this->request['content'] : null;\t\t\n $webhook_secret = isset($this->request['secret']) ? $this->request['secret'] : null;\n\n\t\tif ( ! empty($message_from) && ! empty($message_description) && $webhook_secret)\n\t\t{\n\t\t\t// Is this a valid Telerivet Webhook Secret?\n\t\t\t$keycheck = ORM::factory('telerivet')\n\t\t\t\t->where('webhook_secret', $webhook_secret)\n\t\t\t\t->find(1);\n\n\t\t\tif ($keycheck->loaded == TRUE)\n\t\t\t{\n sms::add($message_from, $message_description, $message_to);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e0517dc09a93c41a32d83b4329b5eadb", "score": "0.56294", "text": "public function handleNotification()\n {\n $input = file_get_contents('php://input');\n\n $payload = json_decode($input, true);\n\n $order = wc_get_order(Str::idFromRef($payload['orderRef']));\n\n if (! $order instanceof WC_Order) {\n die(__('Order not found.', 'cone-simplepay'));\n }\n\n Config::setByCurrency($order->get_currency());\n\n if (! Hash::check($_SERVER['HTTP_SIGNATURE'], $input)) {\n die(__('Invalid signature.', 'cone-simplepay'));\n }\n\n if (isset($payload['refundStatus']) && $payload['status'] === 'FINISHED') {\n (new IRNHandler($order))->handle($payload);\n } elseif ($payload['status'] === 'FINISHED') {\n (new IPNHandler($order))->handle($payload);\n }\n\n $payload['receiveDate'] = date('c');\n\n header('Content-type: application/json');\n header('Signature: '.Hash::make($response = json_encode($payload)));\n die($response);\n }", "title": "" }, { "docid": "0b35e996d755d2d3c1c44f0117ecea13", "score": "0.5620816", "text": "public function store(WebhookRequest $request)\n {\n abort_if($request->notValid(), 406);\n\n $user = User::where('email', $request->getUserEmail())->first();\n abort_if(is_null($user), 406);\n\n $cart = $user->carts()->where('slug', $request->getCartSlug())->first();\n abort_if(is_null($cart) || $user->cant('write', $cart), 406);\n\n $items = $request->getItems()->map(function ($itemName, $key) use ($cart) {\n $item = $cart->findOrNew(trim($itemName));\n $item->name = trim($itemName);\n $item->done = false;\n $item->visible = true;\n $item->count = $item->count + 1;\n $item->save();\n\n return $item;\n });\n\n if ($items->isNotEmpty() && $cart->shared) {\n broadcast(new ItemCreated($cart, $items->all()));\n }\n\n return ['success' => true];\n }", "title": "" }, { "docid": "f19cfaa02d4ab4cad70a3b8bc4390355", "score": "0.5605305", "text": "public function storeEvent($event);", "title": "" }, { "docid": "f7303d6da8e45d15828e4808c7158222", "score": "0.5581371", "text": "public function webhook() {\n global $woocommerce;\n\n $paymentId = $_POST['id'];\n\n $args = array( \n 'headers' => array(\n 'X-Commerce-Id' => $this->commerceId,\n 'X-Api-Key' => $this->apiKey\n )\n );\n\n /*\n * Get data Payment with wp_remote_get()\n */\n $response = wp_remote_get( $this->host . '/payments/read/' . $paymentId, $args );\n \n if( is_wp_error( $response ) ) {\n wc_add_notice( 'Connection error.', 'error' );\n return;\n }\n\n $body = json_decode( $response['body'], true );\n error_log(print_r($body, TRUE));\n\n if(isset($body['error'])){\n error_log(print_r($body, TRUE));\n return wp_send_json($body);\n }\n\n if($body['status'] != 'done'){\n return;\n }\n\n $order_id = $body['transaction_id'];\n\n $order = wc_get_order( $order_id );\n\n // we received the payment\n $order->payment_complete($body['id']);\n $order->reduce_order_stock();\n \n // some notes to customer (replace true with false to make it private)\n $order->add_order_note(sprintf('Pago verificado con código único de verificación endpay #%s', $body['id']));\n \n // Empty cart\n $woocommerce->cart->empty_cart();\n\n return wp_send_json(true);\n\t \t}", "title": "" }, { "docid": "d1e148e7357fb0fa7ab6ae8c346b8332", "score": "0.55373794", "text": "public function webhook()\n {\n $this->load->model('checkout/order');\n $this->load->model('payment/paysafecash');\n $debug_mode = $this->config->get('paysafecash_debug_mode');\n\n $response = file_get_contents(\"php://input\");\n\n if ($debug_mode) {\n $this->log->write('FRONT (paysafe:cash => webhook): php: '.print_r($response, true));\n }\n\n $rsa_key = $this->config->get('paysafecash_webhook_rsa_key');\n $signature = str_replace('\"', '', str_replace('signature=\"', '', explode(\",\", $this->get_headers()[\"Authorization\"])[2]));\n $publick_key = $this->getPublicKey($rsa_key);\n $status = 0;\n\n if ($publick_key !== false) {\n $status = openssl_verify($response, base64_decode($signature), $publick_key, OPENSSL_ALGO_SHA256);\n openssl_free_key($publick_key);\n } else {\n if ($debug_mode) {\n $this->log->write('FRONT (paysafe:cash => webhook): Public Key failed for Public Key '.$publick_key);\n }\n }\n if ($debug_mode) {\n $this->log->write('FRONT (paysafe:cash => webhook): Status: '.$status);\n }\n\n if ($status) {\n $json_response = json_decode($response);\n\n $order_id = isset($this->request->get['order_id']) ? $this->request->get['order_id'] : 0;\n $payment_id = isset($json_response->data->mtid) ? $json_response->data->mtid : '';\n\n if ($order_id > 0 && $payment_id) {\n $check_order_data = $this->model_payment_paysafecash->getPaymentAndOrder($order_id, $payment_id);\n if ($check_order_data && $check_order_data['order_id'] > 0) {\n $order_info = $this->model_checkout_order->getOrder($check_order_data['order_id']);\n\n $payment_status = $this->validatePaymentStatus($payment_id);\n if ($payment_status['status']) {\n $this->completeOrder($order_info, $payment_id, $payment_status['code']);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ba8420f41f70b54def06a2e6809a0697", "score": "0.5525688", "text": "function save() {\n\t\t// create object\n\t\t$event = get_event_from_http();\n\t\t// save it\n\t\t$event->save();\n\t\t// respond\n\t\trespond_success($event);\n\t}", "title": "" }, { "docid": "de4cddfbc7f08d6852f5a2e3b9e5f984", "score": "0.5505859", "text": "public static function init() {\n\n\t\t// Setup webhooks.\n\t\tadd_filter( 'woocommerce_webhook_topics', array( __CLASS__, 'wcap_add_new_webhook_topics' ), 10, 1 );\n\t\tadd_filter( 'woocommerce_webhook_topic_hooks', array( __CLASS__, 'wcap_add_topic_hooks' ), 10, 1 );\n\t\tadd_filter( 'woocommerce_valid_webhook_resources', array( __CLASS__, 'wcap_add_cart_resources' ), 10, 1 );\n\t\tadd_filter( 'woocommerce_valid_webhook_events', array( __CLASS__, 'wcap_add_cart_events' ), 10, 1 );\n\t\tadd_filter( 'woocommerce_webhook_payload', array( __CLASS__, 'wcap_generate_payload' ), 10, 4 );\n\t\tadd_filter( 'woocommerce_webhook_deliver_async', array( __CLASS__, 'wcap_deliver_sync' ), 10, 3 );\n\t\t// Process Webhook actions.\n\t\tadd_action( 'wcap_atc_record_created', array( __CLASS__, 'wcap_atc_created' ), 10, 1 );\n\t\tadd_action( 'wcap_guest_created_at_checkout', array( __CLASS__, 'wcap_checkout_created' ), 10, 1 );\n\t\tadd_action( 'wcap_guest_using_forms', array( __CLASS__, 'wcap_guest_forms' ), 10, 1 );\n\t\tadd_action( 'wcap_reminder_email_sent', array( __CLASS__, 'wcap_reminder_emails' ), 10, 3 );\n\t\tadd_action( 'wcap_reminder_sms_sent', array( __CLASS__, 'wcap_reminder_sms' ), 10, 2 );\n\t\tadd_action( 'wcap_reminder_fb_sent', array( __CLASS__, 'wcap_reminder_fb' ), 10, 2 );\n\t\tadd_action( 'wcap_recovery_link_accessed', array( __CLASS__, 'wcap_recovery_link' ), 10, 3 );\n\t\tadd_action( 'wcap_cart_recovered', array( __CLASS__, 'wcap_cart_recovered' ), 10, 2 );\n\t\tadd_action( 'wcap_webhook_after_cutoff', array( __CLASS__, 'wcap_cart_cutoff_reached' ), 10, 1 );\n\t}", "title": "" }, { "docid": "1673f8de2ff91399fd85d1389160b878", "score": "0.5495028", "text": "function postflight($type, $caller){\n createDefaultShopData();\n }", "title": "" }, { "docid": "734ef24eb4b52fa1d70d96a26ae9afe1", "score": "0.5476978", "text": "function hacman_recieve_webhook( WP_REST_Request $data ) {\n //TODO: put this in settings\n $token = \"supersecuresecret\";//getenv(\"GC_WEBHOOK_SECRET\");\n\n // Get header and check signature matches\n $raw_payload = file_get_contents('php://input');\n $headers = getallheaders();\n $provided_signature = $headers[\"Webhook-Signature\"];\n $calculated_signature = hash_hmac(\"sha256\", $raw_payload, $token);\n\n //TODO: SERIOUSLY UNDO THIS!!!!\n if ($provided_signature == $calculated_signature || $data->get_params()['test']) {\n\n // TODO: loop through each event and process webhook\n $resp = [];\n $body = json_decode($data->get_body());\n \n\n foreach($body->events as $event){\n array_push($resp,hacman_process_webhook($event));\n }\n \n return new WP_REST_Response(array(\"message\" => $resp), 200); \n\n } else {\n return new WP_Error( 'page_does_not_exist', __('We can\\'t find the data, is your token correct?'), array( 'status' => 404 ) );\n }\n}", "title": "" }, { "docid": "6f9793d3f99a0148aca66839c774056e", "score": "0.5469893", "text": "protected function sendWebhookRequest($type) {\n\n $signing_key = \"TEST_SHOULD_PASS\";\n $this->setSigningKey($signing_key);\n\n $url = $this->getSubmissionUrl();\n $headers = [\n 'Content-Type' => \"application/json\"\n ];\n $session = null;\n $data = $this->setSignatureOnRequest($signing_key, $this->getWebhookRequestData($type));\n $data = $this->setWebhookFilterVariable($data, $this->webhook_filter_variable);\n $cookies = null;\n\n $body = json_encode($data, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);\n\n $response = $this->post($url, $data, $headers, $session, $body, $cookies);\n $this->assertEquals(\n 200,\n $response->getStatusCode(),\n 'Expected success response with correct signing_key failed: ' . $response->getStatusCode() . \"/\" . $response->getStatusDescription()\n );\n\n $event = \\Mailgun\\Model\\Event\\Event::create($data['event-data']);\n // test if the event was saved\n $record = MailgunEvent::get()->filter('EventId', $event->getId())->first();\n\n $this->assertTrue( $record && $record->exists() , \"DB Mailgun event does not exist for event {$event->getId()}\");\n\n // change the webhook config variable to the previous var\n $data = $this->setWebhookFilterVariable($data, $this->webhook_previous_filter_variable);\n $response = $this->post($url, $data, $headers, $session, json_encode($data, JSON_UNESCAPED_SLASHES), $cookies);\n $this->assertEquals(\n 200,\n $response->getStatusCode(),\n 'Expected success response with correct signing_key failed: ' . $response->getStatusCode() . \"/\" . $response->getStatusDescription()\n );\n\n\n // change the webhook variable to something else completely\n $data = $this->setWebhookFilterVariable($data, 'not going to work');\n $response = $this->post($url, $data, $headers, $session, json_encode($data, JSON_UNESCAPED_SLASHES), $cookies);\n $this->assertEquals(\n 400,\n $response->getStatusCode(),\n 'Expected failed response code 400 with incorrect webhook filter variable but got ' . $response->getStatusCode() . \"/\" . $response->getStatusDescription()\n );\n\n // remove webhook variable and test\n unset( $data['event-data']['user-variables']['wfv'] );\n Config::modify()->set(Base::class, 'webhook_filter_variable', '');\n Config::modify()->set(Base::class, 'webhook_previous_filter_variable', '');\n\n // change the signing key in config, it should fail now\n $signing_key = \"YOU_SHALL_NOT_PASS\";\n $this->setSigningKey($signing_key);\n $response = $this->post($url, $data, $headers, $session, json_encode($data, JSON_UNESCAPED_SLASHES), $cookies);\n $this->assertEquals(\n 406,\n $response->getStatusCode(),\n 'Expected failed response code 406 with incorrect signing_key but got ' . $response->getStatusCode() . \"/\" . $response->getStatusDescription()\n );\n\n }", "title": "" }, { "docid": "6ade3f8ac2b0e90f55e1201a901f9d19", "score": "0.54504913", "text": "public function store(Request $request)\n {\n\n $request->merge([\n 'created_by_id' => \\Auth::user()->id,\n 'created_by_type' => get_class(\\Auth::user())\n ]);\n\n $event = Event::create($request->all());\n\n //Xp points\n if(\\Auth::user()->role == 'client'){\n event(new ClientActivity(\\Auth::user(), 5));\n }\n\n // sub modalities\n $event->submodalities()->attach($request->get('submodalities'));\n\n //update photos\n if (array_key_exists('photos', $request->all())) {\n foreach ($request->get('photos') as $photo) {\n EventPhoto::find($photo['id'])->update($photo);\n }\n }\n\n return response()->json([\n 'message' => 'event created.',\n 'event' => $event->fresh(['from'])\n ]);\n }", "title": "" }, { "docid": "fea1f57a81cba584bfd72f23f06ae78e", "score": "0.5447741", "text": "public function handleOrderCreated(OrderCreated $event)\n { \n $event->order->tenderer\n ->notify(\n ( new OfferWasAccepted($event->order) )\n ->delay(now()->addSeconds(10))\n ); \n }", "title": "" }, { "docid": "97dea7487ad917571fee8834e16c8778", "score": "0.5438071", "text": "function perch_shop_register_global_events()\n\t{\n\t\t$API = new PerchAPI(1.0, 'perch_shop');\n\t\t\n\t\t$API->on('shop.order_status_update', 'PerchShop_Events::order_status');\n\t\t$API->on('members.login', 'PerchShop_Events::register_member_login');\n\t}", "title": "" }, { "docid": "87a327e7d204c1d44e57757a26a2fed1", "score": "0.54365104", "text": "public function webhook(Request $request): Order\r\n {\r\n $webhook = new Webhook($request);\r\n//uncomment in live\r\n// if (!$webhook->valid()) {\r\n// return null;\r\n// }\r\n return $webhook->getOrder();\r\n }", "title": "" }, { "docid": "e8b60133f13087b55cf189fc4b3f506d", "score": "0.54318815", "text": "public function postCreateOrder(Request $request, $event_id)\n {\n $session_usr_name = $request->session()->get('name');\n Log::debug('session_usr_name :' .$session_usr_name);\n if (empty(Auth::user()) || empty($session_usr_name)) {\n Auth::logout();\n Session::flush();\n return redirect()->to('/eventList?logged_out=yup');\n }\n /*else{\n $account = Account::find(Auth::user()->account_id);\n if ($account->account_type == config('attendize.default_account_type')) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'please create a ticketing account',\n ]);\n }elseif($account->account_type == config('attendize.simple_account_type')){\n return response()->json([\n 'status' => 'error',\n 'message' => 'please create a ticketing account',\n ]);\n }\n }*/\n Log::debug('stripe token 3' .$request->get('stripeToken'));\n //If there's no session kill the request and redirect back to the event homepage.\n if (!session()->get('ticket_order_' . $event_id)) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Your session has expired.',\n 'redirectUrl' => route('showEventPage', [\n 'event_id' => $event_id,\n ])\n ]);\n }\n\n $event = Event::findOrFail($event_id);\n $order = new Order();\n $ticket_order = session()->get('ticket_order_' . $event_id);\n \n $validation_rules = $ticket_order['validation_rules'];\n $validation_messages = $ticket_order['validation_messages'];\n\n $order->rules = $order->rules + $validation_rules;\n $order->messages = $order->messages + $validation_messages;\n\n if ($request->has('is_business') && $request->get('is_business')) {\n // Dynamic validation on the new business fields, only gets validated if business selected\n $businessRules = [\n 'business_name' => 'required',\n 'business_tax_number' => 'required',\n 'business_address_line1' => 'required',\n 'business_address_city' => 'required',\n 'business_address_code' => 'required',\n ];\n\n $businessMessages = [\n 'business_name.required' => 'Please enter a valid business name',\n 'business_tax_number.required' => 'Please enter a valid business tax number',\n 'business_address_line1.required' => 'Please enter a valid street address',\n 'business_address_city.required' => 'Please enter a valid city',\n 'business_address_code.required' => 'Please enter a valid code',\n ];\n\n $order->rules = $order->rules + $businessRules;\n $order->messages = $order->messages + $businessMessages;\n }\n \n if (!$order->validate($request->all())) {\n return response()->json([\n 'status' => 'error',\n 'messages' => $order->errors(),\n ]);\n }\n \n //Add the request data to a session in case payment is required off-site\n Log::debug('stripe token' .$request->get('stripeToken'));\n session()->push('ticket_order_' . $event_id . '.request_data', $request->except(['card-number', 'card-cvc']));\n Log::debug('' .$request->get('stripeToken'));\n $orderRequiresPayment = $ticket_order['order_requires_payment'];\n\n if ($orderRequiresPayment && $request->get('pay_offline') && $event->enable_offline_payments) {\n return $this->completeOrder($event_id);\n }\n\n if (!$orderRequiresPayment) {\n return $this->completeOrder($event_id);\n }\n\n try {\n //more transation data being put in here.\n $transaction_data = [];\n if (config('attendize.enable_dummy_payment_gateway') == TRUE) {\n $formData = config('attendize.fake_card_data');\n $transaction_data = [\n 'card' => $formData\n ];\n\n $gateway = Omnipay::create('Dummy');\n $gateway->initialize();\n\n } else {\n Log::debug('stripe token' .$request->get('stripeToken'));\n $gateway = Omnipay::create($ticket_order['payment_gateway']->name);\n Log::debug('stripe token' .$request->get('stripeToken'));\n Log::debug('$ticket_order[payment_gateway]->name:' .$ticket_order['payment_gateway']->name);\n $gateway->initialize($ticket_order['account_payment_gateway']->config + [\n 'testMode' => config('attendize.enable_test_payments'),\n ]);\n Log::debug('stripe token' .$request->get('stripeToken'));\n }\n\n $orderService = new OrderService($ticket_order['order_total'], $ticket_order['total_booking_fee'], $event);\n $orderService->calculateFinalCosts();\n\n $transaction_data += [\n 'amount' => $orderService->getGrandTotal(),\n 'currency' => $event->currency->code,\n 'description' => 'Order for customer: ' . $request->get('order_email'),\n ];\n\n //TODO: class with an interface that builds the transaction data.\n switch ($ticket_order['payment_gateway']->id) {\n case config('attendize.payment_gateway_dummy'):\n $token = uniqid();\n $transaction_data += [\n 'token' => $token,\n 'receipt_email' => $request->get('order_email'),\n 'card' => $formData\n ];\n break;\n case config('attendize.payment_gateway_paypal'):\n\n $transaction_data += [\n 'cancelUrl' => route('showEventCheckoutPaymentReturn', [\n 'event_id' => $event_id,\n 'is_payment_cancelled' => 1\n ]),\n 'returnUrl' => route('showEventCheckoutPaymentReturn', [\n 'event_id' => $event_id,\n 'is_payment_successful' => 1\n ]),\n 'brandName' => isset($ticket_order['account_payment_gateway']->config['brandingName'])\n ? $ticket_order['account_payment_gateway']->config['brandingName']\n : $event->organiser->name\n ];\n break;\n case config('attendize.payment_gateway_stripe'):\n $token = $request->get('stripeToken');\n $transaction_data += [\n 'token' => $token,\n 'receipt_email' => $request->get('order_email'),\n ];\n break;\n default:\n Log::error('No payment gateway configured.');\n return response()->json([\n 'status' => 'error',\n 'message' => 'No payment gateway configured.'\n ]);\n break;\n }\n Log::debug('transaction data token:' .$transaction_data['token'] \n .'transaction data amount:' .$transaction_data['amount'] \n .'transaction data user_email:' .$transaction_data['receipt_email'] \n .'transaction data currency:' .$transaction_data['currency'] \n .'transaction data description:' .$transaction_data['description'] \n /* .'transaction data source:' .$transaction_data['source'] */\n );\n $transaction = $gateway->purchase($transaction_data);\n Log::debug('transaction gateway ok');\n $response = $transaction->send();\n if ($response->isSuccessful()) {\n Log::debug('transaction ok');\n session()->push('ticket_order_' . $event_id . '.transaction_id',\n $response->getTransactionReference());\n\n return $this->completeOrder($event_id);\n\n } elseif ($response->isRedirect()) {\n\n /*\n * As we're going off-site for payment we need to store some data in a session so it's available\n * when we return\n */\n session()->push('ticket_order_' . $event_id . '.transaction_data', $transaction_data);\n Log::info(\"Redirect url: \" . $response->getRedirectUrl());\n\n $return = [\n 'status' => 'success',\n 'redirectUrl' => $response->getRedirectUrl(),\n 'message' => 'Redirecting to ' . $ticket_order['payment_gateway']->provider_name\n ];\n\n // GET method requests should not have redirectData on the JSON return string\n if($response->getRedirectMethod() == 'POST') {\n $return['redirectData'] = $response->getRedirectData();\n }\n\n return response()->json($return);\n\n } else {\n // display error to customer\n Log::debug('transaction KO :' .$response->getMessage());\n return response()->json([\n 'status' => 'error',\n 'message' => $response->getMessage(),\n ]);\n }\n } catch (\\Exeption $e) {\n Log::error($e);\n $error = 'Sorry, there was an error processing your payment. Please try again.';\n }\n\n if ($error) {\n return response()->json([\n 'status' => 'error',\n 'message' => $error,\n ]);\n }\n\n }", "title": "" }, { "docid": "32c0e2b98f7c0f46819303189e6d8bc9", "score": "0.5415353", "text": "public function store(Request $request)\n\t{\n\t\t// Todo: Don't forget to validate\n\t\t\n\t\t// Create a user event and register in the data base\n\t\t$user_event = Event::create($request->all());\n\n\t}", "title": "" }, { "docid": "7a51453d7d5b77a5db9e9a644cefc9b2", "score": "0.5409691", "text": "public function store(Request $request)\n {\n $event_name = $request->header('X-Github-Event');\n $body = json_encode($request->all());\n\n $hook = new Hook;\n $hook->event_name = $event_name;\n $hook->payload = $body;\n\n $hook->save();\n\n return response()->json('', 200);\n }", "title": "" }, { "docid": "cad7f7c69effbd4abbff6a318bb56cde", "score": "0.5388805", "text": "function webhook_set(array $data = null)\n{\n if (!$data) $data = json_decode(file_get_contents('php://input'), true);\n $webhook_url = $data['webhook_url'] ?? '';\n if ($webhook_url) Webhooks::set($webhook_url);\n}", "title": "" }, { "docid": "8c5db6ca2a8fb81cab2fc9e437c03bcf", "score": "0.53441185", "text": "public function handleStripe(Request $request)\n {\n\n \\Stripe\\Stripe::setApiKey(config('services.stripe.client_id'));\n\n $endpoint_secret = config('services.stripe.webhook_secret');\n\n \n $payload = @file_get_contents('php://input');\n $sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];\n $event = null;\n\n Storage::disk('audio')->put('stripe-payload.txt', $payload); \n Storage::disk('audio')->put('sig-header.txt', $sig_header); \n\n\n try {\n\n $event = \\Stripe\\Webhook::constructEvent($payload, $sig_header, $endpoint_secret);\n\n Storage::disk('audio')->put('event.txt', $event); \n\n } catch(\\UnexpectedValueException $e) {\n \n exit();\n\n } catch(\\Stripe\\Exception\\SignatureVerificationException $e) {\n\n exit();\n\n }\n\n\n switch ($event->type) {\n case 'customer.subscription.deleted': \n $subscription = Subscription::where('subscription_id', $event->data->object->id)->firstOrFail();\n $subscription->update(['status'=>'Cancelled']);\n \n $user = User::where('id', $subscription->user_id)->firstOrFail();\n $user->update(['plan_id' => '']);\n \n break;\n case 'invoice.payment_failed':\n $subscription = Subscription::where('subscription_id', $event->data->object->id)->firstOrFail();\n $subscription->update(['status'=>'Suspended']);\n \n $user = User::where('id', $subscription->user_id)->firstOrFail();\n $user->update(['plan_id' => '']);\n \n break;\n }\n }", "title": "" }, { "docid": "179e356b73154931b6b80dedef1803a8", "score": "0.53348017", "text": "public function handleGatewayCallback()\n {\n if(Auth::user()){\n $paymentDetails = Paystack::getPaymentData();\n\n //dd($paymentDetails);\n $paymentDetails = Paystack::getPaymentData();\n $cart = Session::get('cart');\n // $cart = new Cart($oldCart);\n if($paymentDetails){\n $order = new Order();\n $order->order_id = $paymentDetails['data']['reference'];\n $order->amount = $paymentDetails['data']['amount'];\n $order->state = $paymentDetails['data']['metadata']['state'];\n $order->address = $paymentDetails['data']['metadata']['address'];\n $order->full_name = $paymentDetails['data']['metadata']['first_name']. \" \" .$paymentDetails['data']['metadata']['last_name'];\n $order->country = $paymentDetails['data']['metadata']['country'];\n $order->city = $paymentDetails['data']['metadata']['city'];\n $order->quantity = $paymentDetails['data']['metadata']['quantity'];\n $order->phone = $paymentDetails['data']['metadata']['phone'];\n $order->email = $paymentDetails['data']['metadata']['email'];\n $order->paid_at = $paymentDetails['data']['paidAt'];\n $order->currency = $paymentDetails['data']['currency'];\n $order->cart = serialize($cart);\n $order->status = \"Pending\";\n if(Auth::user()){\n $order->user_id = Auth::user()->id;\n }\n $order->save();\n $user = User::findOrFail($order->user_id);\n $user->notify(new NewOrder($order->order_id));\n\n }\n $this->emptyCart();\n return redirect(route('profile'));\n }\n\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then red\n //redirect or do whatever you want\n }", "title": "" }, { "docid": "068afd99e30cac2299ef46ac516b98fe", "score": "0.53251743", "text": "public static function update_paypal_marketplace_webhooks() {\n if ( dokan_pro()->module->is_active( 'paypal_marketplace' ) ) {\n if ( Helper::is_ready() ) {\n /**\n * @var $instance \\WeDevs\\DokanPro\\Modules\\PayPalMarketplace\\WebhookHandler\n */\n $instance = dokan_pro()->module->paypal_marketplace->webhook;\n $instance->register_webhook();\n }\n }\n }", "title": "" }, { "docid": "66a55924f4b6a6d3430e0a2fe567b5da", "score": "0.531572", "text": "public function store(StoreEvent $request) {\n return $this->respond(\\MyEvents::store($request->all()), \\Translate::translate('events=>create-event-success'));\n }", "title": "" }, { "docid": "ddb82fae99dbbc0f1aeb55dfcaa4fb2d", "score": "0.53109795", "text": "public function create(Request $request)\n {\n if (!Role::granted('orders')) {//вызываем event\n $msg = 'Попытка создания нового заказа поставщику!';\n event(new AddEventLogs('access', Auth::id(), $msg));\n abort(503, 'У Вас нет прав на создание записи!');\n }\n if ($request->isMethod('post')) {\n $input = $request->except('_token'); //параметр _token нам не нужен\n $input['amount'] = 0;\n $firm_id = Firm::where('name', $input['firm_id'])->first()->id;\n $input['firm_id'] = $firm_id;\n if (empty($input['has_vat'])) $input['has_vat'] = 0;\n $messages = [\n 'required' => 'Поле обязательно к заполнению!',\n 'unique' => 'Значение поля должно быть уникальным!',\n 'max' => 'Значение поля должно быть не более :max символов!',\n 'integer' => 'Значение поля должно быть целым числом!',\n 'numeric' => 'Значение поля должно быть числовым!',\n 'string' => 'Значение поля должно быть строковым!',\n ];\n $validator = Validator::make($input, [\n 'doc_num' => 'required|unique:orders|string|max:15',\n 'amount' => 'required|numeric',\n 'firm_id' => 'required|integer',\n 'statuse_id' => 'required|integer',\n 'finish' => 'nullable|date',\n 'currency_id' => 'required|integer',\n 'hoperation_id' => 'required|integer',\n 'has_money' => 'nullable|integer',\n 'organisation_id' => 'required|integer',\n 'contract_id' => 'required|integer',\n 'warehouse_id' => 'required|integer',\n 'user_id' => 'required|integer',\n 'has_vat' => 'nullable|integer',\n 'doc_num_firm' => 'nullable|string|max:15',\n 'date_firm' => 'nullable|date',\n 'comment' => 'nullable|string|max:254',\n ], $messages);\n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator)->withInput();\n }\n $order = new Order();\n $order->fill($input);\n $order->user_id = $input['user_id'];\n $order->created_at = date('Y-m-d H:i:s');\n if ($order->save()) {\n $msg = 'Заказ поставщику № ' . $input['doc_num'] . ' был успешно добавлен!';\n //вызываем event\n event(new AddEventLogs('info', Auth::id(), $msg));\n return redirect('/orders')->with('status', $msg);\n }\n }\n if (view()->exists('workflow::order_add')) {\n $stats = Statuse::all();\n $statsel = array();\n foreach ($stats as $val) {\n $statsel[$val->id] = $val->title;\n }\n $users = User::where(['active' => 1])->get();\n $usel = array();\n foreach ($users as $val) {\n $usel[$val->id] = $val->name;\n }\n $curs = Currency::all();\n $cursel = array();\n foreach ($curs as $val) {\n $cursel[$val->id] = $val->title;\n }\n $hops = Hoperation::all();\n $hopsel = array();\n foreach ($hops as $val) {\n $hopsel[$val->id] = $val->title;\n }\n $orgs = Organisation::select('id', 'title')->where(['status' => 1])->get();\n $orgsel = array();\n foreach ($orgs as $val) {\n $orgsel[$val->id] = $val->title;\n }\n $wxs = Warehouse::all();\n $wxsel = array();\n foreach ($wxs as $val) {\n $wxsel[$val->id] = $val->title;\n }\n $doc_num = LibController::GenNumberDoc('orders');\n $vat = env('VAT');\n $units = Unit::all();\n $unsel = array();\n foreach ($units as $val) {\n $unsel[$val->id] = $val->title;\n }\n $data = [\n 'title' => 'Заказы поставщику',\n 'head' => 'Новый заказ поставщику',\n 'statsel' => $statsel,\n 'usel' => $usel,\n 'cursel' => $cursel,\n 'hopsel' => $hopsel,\n 'orgsel' => $orgsel,\n 'doc_num' => $doc_num,\n 'wxsel' => $wxsel,\n 'vat' => $vat,\n 'unsel' => $unsel,\n ];\n return view('workflow::order_add', $data);\n }\n abort(404);\n }", "title": "" }, { "docid": "06991ef77f23dc7f425e918c98d61aff", "score": "0.5305811", "text": "function create_hook(){\n\t$app_field_id = 138744542; // Only act on changes on the field with field_id=123\n\techo '<br> despues poner el id';\n\t$event_type = \"item.update\"; // Only act when field values are updated\n\ttry {\n\t$hook = PodioHook::create(\"app_field\", $app_field_id, array(\n\t \"url\" => \"https://aiesec.org.mx/TEST/offline_op/offline_hook_ogv.php\",\n\t \"type\" => $event_type\n\t));\n\techo '<br>despues de crear el hook';\n\t}catch (Exception $e){\n\t\techo '<br> error';\n\t\tvar_dump($e);\n\t\techo '<br> error';\n\t}\n\t//var_dump($hook);\n}", "title": "" }, { "docid": "3ecc7440aeb8f8ddebc88b64e10f6d6d", "score": "0.5292921", "text": "public static function webhooks()\n {\n $response = APIResponses::base();\n $response['type'] = 'webhooks';\n $response['webhooks'] = SmartwaiverTypes::createWebhook();\n return json_encode($response);\n }", "title": "" }, { "docid": "a1c0876da66bc0ed16764e7af025bdb9", "score": "0.5276532", "text": "public function store(EmailHookRequest $request)\n {\n\n try{\n EmailHook::create($request->all());\n }\n catch (\\Illuminate\\Database\\QueryException $e) {\n return back()->withError($e->getMessage())->withInput();\n }\n return redirect()->route('admin.hooks')->with('success', 'Email Hook created successfully');\n\n }", "title": "" }, { "docid": "157a363ccfd0506e9b39102f4a1fa107", "score": "0.52690536", "text": "public function store(Request $request)\n {\n $user_id = Auth::user()->id;\n\n \n \n \n $business = Event::create([\n 'user_id' => $user_id,\n 'business_id' =>$request ->business_id,\n 'payer' => $request->payer, \n 'address' => $request ->address,\n 'zip_code' => $request ->zip_code, \n 'start_date' => $request ->start_date, \n 'end_date' => $request ->end_date , \n 'start_time' => $request ->start_time,\n 'end_time' => $request ->end_time, \n 'occasion' => $request ->occasion,\n 'eaters' => $request ->eaters, \n 'menu_id' =>$request->menu_id, \n 'phone_number' => $request ->phone_number , \n 'final_detail' => $request ->final_detail, \n ]);\n \n return redirect()->back();\n\n }", "title": "" }, { "docid": "f4fde98a2a04ff662a0198517251b7e6", "score": "0.5263962", "text": "public function flutterwave_callback(Request $request)\n {\n $response = json_decode(request()->resp);\n $txRef =$response->data->data->txRef;\n $data = Rave::verifyTransaction($txRef);\n $chargeResponsecode = $data->data->chargecode;\n $track = $data->data->meta[1]->metavalue;\n\n $payment_logs = EventPaymentLogs::where( 'track', $track )->first();\n if (($chargeResponsecode == \"00\" || $chargeResponsecode == \"0\")){\n //update event payment log\n $transaction_id = $txRef;\n\n $payment_logs->status = 'complete';\n $payment_logs->transaction_id = $transaction_id;\n $payment_logs->save();\n\n //update event attendance\n $event_attendance = EventAttendance::find( $payment_logs->attendance_id);\n $event_attendance->payment_status ='complete';\n $event_attendance->status ='complete';\n $event_attendance->save();\n\n //update event available tickets\n $event_details = Events::find($event_attendance->event_id);\n $event_details->available_tickets = intval($event_details->available_tickets) - $event_attendance->quantity;\n $event_details->save();\n\n //send success mail to user and admin\n self::send_event_mail($payment_logs->attendance_id);\n Mail::to($payment_logs->email)->send(new PaymentSuccess($payment_logs,'event'));\n\n return redirect()->route('frontend.event.payment.success',$payment_logs->attendance_id);\n }else{\n return redirect()->route('frontend.event.payment.cancel',$payment_logs->attendance_id);\n }\n\n }", "title": "" }, { "docid": "521fdf3a2168823f6ec1e80cfd8f839d", "score": "0.52635163", "text": "public function testWebhook()\n {\n $client = new Client([\n// 'base_uri' => $this->baseUrl,\n ]);\n\n $uri = route('telegram.flyinghighbot.flightstats.webhook', [], true);\n\n $params = $this->makeAlert($this->baseUrl . $uri);\n\n $reponse = $client->post($uri, [\n 'content-type' => 'application/json',\n 'body' => $params\n ]);\n }", "title": "" }, { "docid": "659d7cc5762da65c237d853aebd2a28e", "score": "0.52488774", "text": "public function notifyAction()\n {\n $sdk = Mage::getSingleton('gobeep_ecommerce/sdk');\n // Check if SDK is ready\n if (!$sdk->isReady(false)) {\n $errors[] = 'Webhook is disabled, please come back later';\n $this->getResponse()\n ->setBody(json_encode(['success' => false, 'errors' => $errors]))\n ->setHttpResponseCode(404);\n return $this;\n }\n\n // If request is not a POST request, return a 405 Method Not Allowed\n if (!$this->getRequest()->isPost()) {\n $errors[] = 'Webhook expects an HTTP POST';\n $this->getResponse()\n ->setBody(json_encode(['success' => false, 'errors' => $errors]))\n ->setHttpResponseCode(405);\n return $this;\n }\n\n // Check if we have a X-Gobeep-Signature header in the HTTP request\n // If not, send a 400 Bad Request error\n $signature = $this->getRequest()->getHeader('x-gobeep-signature');\n if (!$signature) {\n $errors[] = 'Missing x-gobeep-signature header';\n $this->getResponse()\n ->setBody(json_encode(['success' => false, 'errors' => $errors]))\n ->setHttpResponseCode(400);\n return $this;\n }\n\n // Verify signature, return a 403 if hashes doesn't match\n $body = $this->getRequest()->getRawBody();\n $digest = $sdk->sign($body);\n if ($signature !== $digest) {\n $errors[] = 'Signature doesn\\'t match with incoming data';\n $this->getResponse()\n ->setBody(json_encode(['success' => false, 'errors' => $errors]))\n ->setHttpResponseCode(403);\n return $this;\n }\n\n $request = new Gobeep_Ecommerce_Model_Webhook_Request();\n $errors = $request->processRefund(json_decode($body));\n\n if ($errors) {\n $this->getResponse()\n ->setBody(json_encode(['success' => false, 'errors' => $errors]))\n ->setHttpResponseCode(400);\n return $this;\n }\n\n // Succcess\n $this->getResponse()\n ->setBody(json_encode(['success' => true]))\n ->setHttpResponseCode(200);\n\n return $this;\n }", "title": "" }, { "docid": "163fcc5fb53d8959412dc48e4ef03749", "score": "0.5231233", "text": "public function createWebhook(array $params) {\n if (empty($params['event'])) {\n throw new \\Exception('Event is required by the API');\n }\n $params += ['target_url' => ''];\n return $this->getApi(self::BUGHERDAPI_WEBHOOK)->create($params);\n }", "title": "" }, { "docid": "cb28a4cae95ddaf433f7408401d4c481", "score": "0.5227903", "text": "public function actionProductCreate() {\n\n $request = Yii::$app->request->get();\n\n if ( !isset($request['id']) ) {\n return false;\n }\n $user_connection_id = $request['id'];\n\n if ( !isset($request['action']) ) {\n return false;\n }\n $actionStoreName = $request['action'];\n if ( $actionStoreName !== $this->storeName ){\n return false;\n }\n\n /* For Web Hook Content */\n $webhookContent = \"\";\n $webhook = fopen('php://input', 'rb');\n while (!feof($webhook)) {\n $webhookContent .= fread($webhook, 4096);\n }\n\n $data = json_decode($webhookContent);\n $hook_action_id = $data->data->id;\n\n $bgcConnection = UserConnection::findOne(['id' => $user_connection_id]);\n\n if ( !empty($bgcConnection) && !empty($hook_action_id) ){\n\n $bigCommerceSetting = $bgcConnection->connection_info;\n $bgcdomain = $bgcConnection->userConnectionDetails->store_url;\n $user_company = $bgcConnection->user->company;\n $bgcOwner = $bgcConnection->user;\n $user_id = $bgcConnection->user_id;\n $currency = $bgcConnection->userConnectionDetails->currency;\n $country_code = $bgcConnection->userConnectionDetails->country_code;\n\n $userCurrency = isset($bgcOwner->currency)?$bgcOwner->currency:'USD';\n\n if ($currency != '') {\n $conversion_rate = CurrencyConversion::getCurrencyConversionRate($currency, $userCurrency);\n }\n\n\n Bigcommerce::configure($bigCommerceSetting);\n\n $product = Bigcommerce::getProduct($hook_action_id);\n\n if (!empty($product)) {\n\n $extraData = [\n 'conversion_rate' => $conversion_rate,\n 'user_connection_id' => $user_connection_id,\n 'user_company' => $user_company,\n 'bgcdomain' => $bgcdomain,\n 'user_id' => $user_id,\n 'country_code' => $country_code,\n 'currency' => $currency,\n 'bigCommerceSetting' => $bigCommerceSetting,\n ];\n BigcommerceComponent::bgcUpsertProduct($product, $extraData);\n\n }\n\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "b095546ae1c5be2bda69be90b6ec9ade", "score": "0.52196014", "text": "public function process(PostFinanceCheckoutWebhookRequest $request)\n {\n PostFinanceCheckoutHelper::startDBTransaction();\n $entity = $this->loadEntity($request);\n try {\n $order = new Order($this->getOrderId($entity));\n if (Validate::isLoadedObject($order)) {\n $ids = PostFinanceCheckoutHelper::getOrderMeta($order, 'mappingIds');\n if ($ids['transactionId'] != $this->getTransactionId($entity)) {\n return;\n }\n // We never have an employee on webhooks, but the stock magement sometimes needs one\n if (Context::getContext()->employee == null) {\n $employees = Employee::getEmployeesByProfile(_PS_ADMIN_PROFILE_, true);\n $employeeArray = reset($employees);\n Context::getContext()->employee = new Employee($employeeArray['id_employee']);\n }\n PostFinanceCheckoutHelper::lockByTransactionId(\n $request->getSpaceId(),\n $this->getTransactionId($entity)\n );\n $order = new Order($this->getOrderId($entity));\n $this->processOrderRelatedInner($order, $entity);\n }\n PostFinanceCheckoutHelper::commitDBTransaction();\n } catch (Exception $e) {\n PostFinanceCheckoutHelper::rollbackDBTransaction();\n throw $e;\n }\n }", "title": "" }, { "docid": "4122cc761002dc59dddba9452f6c9909", "score": "0.52086866", "text": "private function registerWebHook()\n {\n $apiKey = get_option('filepreviews_io_api_key');\n $apiSecret = get_option('filepreviews_io_api_secret');\n \n $this->filePreviewsIO = new FilePreviewsIO($apiKey, $apiSecret);\n \n add_action( 'rest_api_init', function () {\n register_rest_route( \n 'woocommerce-filepreviews-io/v1', \n '/receive-data', \n array(\n 'methods' => 'POST',\n 'callback' => [$this->filePreviewsIO, \n 'filepreviewsIOWebhook'],\n ) \n );\n } \n );//end add action\n }", "title": "" }, { "docid": "55770555f764f633ec2115f19b1bcd27", "score": "0.520825", "text": "public function register_user_webhooks( $webhooks ) {\n $user_id = $this->get_user_id();\n if( false === $user_id ) {\n return;\n }\n\n $webhooks_exist = count( $this->get_user_webhooks( $user_id ) ) > 0;\n if( $webhooks_exist ) {\n $this->update_user_webhooks( $user_id, $webhooks );\n } else {\n $this->add_user_webhooks( $user_id, $webhooks );\n }\n }", "title": "" }, { "docid": "008bbf598c817f3f86913af68668ad11", "score": "0.5208012", "text": "public function createNotification($event){\n\n Notification::create([\n 'sender_id'=>Auth::user()->id,\n 'order_id'=>$event->object['id'],\n 'link'=>route('notifications.show',[$event->object['id']]),\n 'message'=>'New Order has been places',\n 'view'=> 0,\n ]);\n\n }", "title": "" }, { "docid": "b48f1ef73f0a38aef1c862cfc2cbcf0a", "score": "0.51999605", "text": "public function on_store_data($name, $data) {}", "title": "" }, { "docid": "2fb6f5c4bb0c2d1fb6b0a03acadec82a", "score": "0.51998", "text": "function process_gateway_notification() {\n\n // checking for allowed RBK Money server\n $allowed_ip = array('89.111.188.128', '195.122.9.148');\n if (!in_array($_SERVER['REMOTE_ADDR'], $allowed_ip)) {\n exit(\"IP address {$_SERVER['REMOTE_ADDR']} is not allowed\");\n }\n\n extract($_POST);\n\n $control_hash = $eshopId . \"::\" . $orderId . \"::\" . $serviceName . \"::\" . $eshopAccount . \"::\" . $recipientAmount . \"::\" . $recipientCurrency . \"::\" . $paymentStatus . \"::\" . $userName . '::' . $userEmail . '::' . $paymentData . '::' . get_option('rbkmoney_secretKey');\n\n if ($hash != md5($control_hash)) {\n exit(\"Hash checking error\");\n }\n\n // change order status\n if ($paymentStatus == 3 || $paymentStatus == 5) {\n $status = ($paymentStatus == 5) ? '3' : '2';\n wpsc_update_purchase_log_status($orderId, $status);\n// echo ok;\n }\n\n }", "title": "" }, { "docid": "19158fa1e0ec69c2a93df2030959f09f", "score": "0.51860577", "text": "public function store(Request $request)\n {\n $request->validate([\n 'start' => 'required|date',\n 'end' => 'required|date',\n 'title' => 'required',\n 'priority' => 'required|integer',\n 'all_day' => 'required|boolean',\n 'user_id' => 'nullable|exists:users,id',\n 'type' => 'required|integer',\n ]);\n\n if($request->client_id) {\n $client = Client::where('client_id', $request->client_id)->first();\n\n if(!$client) {\n $input = app('App\\Client')->search($request->client_id);\n\n $result = app('App\\Client')->add($input);\n\n $request->client_id = $result->id;\n } else {\n $request->client_id = $client->id;\n }\n }\n\n $result = Event::create([\n 'user_created_id' => auth()->user()->id,\n 'user_id' => $request->user_id,\n 'client_id' => $request->client_id,\n 'investment_id' => $request->investment_id,\n 'start' => $request->start,\n 'end' => $request->end,\n 'title' => $request->title,\n 'description' => $request->description,\n 'status' => 0,\n 'priority' => $request->priority,\n 'address' => $request->address,\n 'phone' => $request->phone,\n 'all_day' => $request->all_day,\n 'type' => $request->type,\n ]);\n\n $result->load($this->relations);\n\n if($result->user !== null) {\n try {\n $result->user->notify(new \\App\\Notifications\\NewEventNotification($result));\n } catch(\\Illuminate\\Broadcasting\\BroadcastException $e) {\n report($e);\n }\n }\n\n Event::notifyRefresh();\n\n return response()->json([\n 'data' => $result\n ], 200);\n }", "title": "" }, { "docid": "d75d84f002a748b90d1da8c3108d6513", "score": "0.51755774", "text": "public function postEventNotification(Request $request)\n {\n \n // validate incoming request parameters\n $this->validateRequest($request);\n \n // Log the notification event\n if(!$this->logEventNotification($request)){\n return GlobalService::returnError(\"Cannot log notification\", 400);\n }\n // check event type and put a worker accordingly here ...\n\n return GlobalService::returnResponse();\n \n }", "title": "" }, { "docid": "ac66b916414e95a30e7b9c2fe7c2b76d", "score": "0.51680785", "text": "public function postSubscriptionCreateOrder(Request $request, $event_id)\n {\n /*\n if (!session()->get('ticket_order_' . $event_id)) {\n return response()->json([\n 'status' => 'error',\n 'message' => 'Your session has expired.',\n 'redirectUrl' => route('showSubscriptionPage', [\n 'event_id' => $event_id,\n ])\n ]);\n }*/\n\n if (empty(Auth::user())) {\n Log::debug('redirect to login page');\n /* return new RedirectResponse(route('loginSimple'));*/\n return redirect()->to('/loginSimple');\n }else{\n $account = Account::find(Auth::user()->account_id);\n if ($account->account_type == config('attendize.default_account_type')) {\n return redirect()->route('showSelectOrganiser');\n }elseif($account->account_type == config('attendize.ticket_account_type')){\n return redirect()->route('showEventListPage');\n }\n }\n\n if (!session()->get('competition_order_' . $event_id)) {\n return redirect()->route('showSubscriptionPage', [\n 'event_id' => $event_id,\n 'is_embedded' => $this->is_embedded]);\n }\n\n\n $event = Event::findOrFail($event_id);\n $order = new Order();\n $competition_order = session()->get('competition_order_' . $event_id);\n\n $validation_rules = $competition_order['validation_rules'];\n $validation_messages = $competition_order['validation_messages'];\n\n /*\n $order->rules = $order->rules + $validation_rules;\n $order->messages = $order->messages + $validation_messages;\n */\n \n $order->rules = $validation_rules;\n $order->messages = $validation_messages;\n\n if ($request->has('is_business') && $request->get('is_business')) {\n Log::debug('business validation included');\n // Dynamic validation on the new business fields, only gets validated if business selected\n $businessRules = [\n 'business_name' => 'required',\n 'business_tax_number' => 'required',\n 'business_address_line1' => 'required',\n 'business_address_city' => 'required',\n 'business_address_code' => 'required',\n ];\n\n $businessMessages = [\n 'business_name.required' => 'Please enter a valid business name',\n 'business_tax_number.required' => 'Please enter a valid business tax number',\n 'business_address_line1.required' => 'Please enter a valid street address',\n 'business_address_city.required' => 'Please enter a valid city',\n 'business_address_code.required' => 'Please enter a valid code',\n ];\n\n /* $order->rules = $order->rules + $businessRules;\n $order->messages = $order->messages + $businessMessages;*/\n\n $order->rules = $businessRules;\n $order->messages = $businessMessages;\n }\n Log::debug('before validation');\n if (!$order->validate($request->all())) {\n return response()->json([\n 'status' => 'error',\n 'messages' => $order->errors(),\n ]);\n }\n Log::debug('after validation');\n //Add the request data to a session in case payment is required off-site\n session()->push('competition_order_' . $event_id . '.request_data', $request->except(['card-number', 'card-cvc']));\n\n $orderRequiresPayment = $competition_order['order_requires_payment'];\n Log::debug('$orderRequiresPayment :' .$orderRequiresPayment);\n\n if ($orderRequiresPayment && $request->get('pay_offline') && $event->enable_offline_payments) {\n Log::debug('pay_offline : true');\n return $this->completeSubscriptionOrder($event_id);\n }\n\n if (!$orderRequiresPayment) {\n Log::debug('payment not required : true');\n return $this->completeSubscriptionOrder($event_id);\n }\n\n try {\n //more transation data being put in here.\n $transaction_data = [];\n if (config('attendize.enable_dummy_payment_gateway') == TRUE) {\n Log::debug('dummy payment : true');\n $formData = config('attendize.fake_card_data');\n $transaction_data = [\n 'card' => $formData\n ];\n\n $gateway = Omnipay::create('Dummy');\n $gateway->initialize();\n\n } else {\n Log::debug('payment with payment gateway : true');\n $gateway = Omnipay::create($competition_order['payment_gateway']->name);\n Log::debug('$competition_order[payment_gateway]->name:' .$competition_order['payment_gateway']->name);\n $gateway->initialize($competition_order['account_payment_gateway']->config + [\n 'testMode' => config('attendize.enable_test_payments'),\n ]);\n }\n\n $orderService = new OrderService($competition_order['order_total'], $competition_order['total_booking_fee'], $event);\n Log::debug('order total : ' .$competition_order['order_total']);\n $orderService->calculateFinalCosts();\n Log::debug('grand total: ' .$orderService->getGrandTotal());\n $user_email = Auth::user()->email;\n $transaction_data += [\n 'amount' => $orderService->getGrandTotal(),\n 'currency' => $event->currency->code,\n 'description' => 'Order for customer: ' . $user_email,\n ];\n //TODO: class with an interface that builds the transaction data.\n switch ($competition_order['payment_gateway']->id) {\n case config('attendize.payment_gateway_dummy'):\n Log::debug('dummy gateway: ' .config('attendize.payment_gateway_dummy'));\n $token = uniqid();\n $transaction_data += [\n 'token' => $token,\n 'receipt_email' => $request->get('order_email'),\n 'card' => $formData\n ];\n break;\n case config('attendize.payment_gateway_paypal'):\n Log::debug('gateway paypal: ' .config('attendize.payment_gateway_paypal'));\n $transaction_data += [\n 'cancelUrl' => route('showEventCheckoutPaymentReturn', [\n 'event_id' => $event_id,\n 'is_payment_cancelled' => 1\n ]),\n 'returnUrl' => route('showEventCheckoutPaymentReturn', [\n 'event_id' => $event_id,\n 'is_payment_successful' => 1\n ]),\n 'brandName' => isset($competition_order['account_payment_gateway']->config['brandingName'])\n ? $competition_order['account_payment_gateway']->config['brandingName']\n : $event->organiser->name\n ];\n break;\n case config('attendize.payment_gateway_stripe'):\n Log::debug('gateway stripe: ' .config('attendize.payment_gateway_stripe'));\n $token = $request->get('stripeToken');\n $transaction_data += [\n 'token' => $token,\n 'receipt_email' => $request->get('order_email'),\n ];\n break;\n default:\n Log::error('No payment gateway configured.');\n return response()->json([\n 'status' => 'error',\n 'message' => 'No payment gateway configured.'\n ]);\n break;\n }\n Log::debug('transaction data token:' .$transaction_data['token'] \n .'transaction data amount:' .$transaction_data['amount'] \n .'transaction data user_email:' .$transaction_data['receipt_email'] \n .'transaction data currency:' .$transaction_data['currency'] \n .'transaction data description:' .$transaction_data['description'] \n /* .'transaction data source:' .$transaction_data['source'] */\n );\n $transaction = $gateway->purchase($transaction_data);\n Log::debug('transaction purcahse object instatiated');\n $response = $transaction->send();\n Log::debug('transaction has been send');\n if ($response->isSuccessful()) {\n Log::debug('transaction $response->isSuccessful(): '.$response->isSuccessful());\n Log::debug('transaction id: '.'competition_order_' . $event_id . '.transaction_id::' .$response->getTransactionReference());\n session()->push('competition_order_' . $event_id . '.transaction_id',\n $response->getTransactionReference());\n return $this->completeSubscriptionOrder($event_id);\n\n } elseif ($response->isRedirect()) {\n Log::debug('transaction $response->isRedirect() :' .$response->isRedirect());\n /*\n * As we're going off-site for payment we need to store some data in a session so it's available\n * when we return\n */\n session()->push('competition_order_' . $event_id . '.transaction_data', $transaction_data);\n Log::info(\"Redirect url: \" . $response->getRedirectUrl());\n\n $return = [\n 'status' => 'success',\n 'redirectUrl' => $response->getRedirectUrl(),\n 'message' => 'Redirecting to ' . $competition_order['payment_gateway']->provider_name\n ];\n\n // GET method requests should not have redirectData on the JSON return string\n if($response->getRedirectMethod() == 'POST') {\n $return['redirectData'] = $response->getRedirectData();\n }\n\n return response()->json($return);\n\n } else {\n // display error to customer\n return response()->json([\n 'status' => 'error',\n 'message' => $response->getMessage(),\n ]);\n }\n } catch (\\Exeption $e) {\n Log::error($e);\n $error = 'Sorry, there was an error processing your payment. Please try again.';\n }\n\n if ($error) {\n return response()->json([\n 'status' => 'error',\n 'message' => $error,\n ]);\n }\n\n }", "title": "" }, { "docid": "83413020bd8a0f5220b2d84ba60779af", "score": "0.51624715", "text": "public function handle(OrderDraftCreated $event): void\n {\n $this->requestCounter->increment($event->getOrder()->getCountryCode());\n }", "title": "" }, { "docid": "5bab93c91dc4356d69b311b8239de6af", "score": "0.5150308", "text": "public function store()\n\t{\n\t\t$eventParams = array();\n\n\t\t$eventParams['userID'] = Input::get('user_id');\n\t\t$eventParams['eventID'] = Input::get('event_id');\n\t\t$eventParams['vote'] = Input::get('vote');\n\n\t\t$events = UserEvent::storeUserEventVote($eventParams);\n\n\t\treturn json_encode($events);\n\t\t\n\t}", "title": "" }, { "docid": "22e6b0200b6c6095f02aad51d3c2e1eb", "score": "0.5149538", "text": "public function checkout_create_order( $order, $data ) {\n\n }", "title": "" }, { "docid": "5ec410e65b079d084d455be3441758bd", "score": "0.51489717", "text": "function kissmetrics_record_event( $identity, $event, $properties = array(), $api_key = null ) {\n\tWP_Kissmetrics::init_and_identify( $api_key, $identity );\n\tWP_Kissmetrics::record( $event, $properties );\n}", "title": "" }, { "docid": "e61d3fb9ec817304d0a67db2e5c4b3d6", "score": "0.51432824", "text": "public function createHook($id, CreateHookRequest $request)\n {\n $store = Store::find($id);\n $provider = $this->getProvider($store);\n\n $hook = \\Input::only('topic', 'address', 'format');\n\n try {\n $hook = $provider->createWebhook($hook, $store->token);\n } catch (\\Guzzle\\Http\\Exception\\ClientErrorResponseException $e) {\n \\View::share('errors', new \\Illuminate\\Support\\MessageBag(array($e->getMessage())));\n \\Redirect::back()->withInput();\n }\n\n \\Session::flash('success', true);\n return $this->webhooks($id);\n }", "title": "" }, { "docid": "99332edef26df3c66f3dcb453c348b5a", "score": "0.5142846", "text": "function eval_created_handler($event) {\n //check if inviliators - send them an email with date\n\n return true;\n}", "title": "" }, { "docid": "25821b2fbbd01cf06379126ab3d61352", "score": "0.51261526", "text": "public function hookAction()\n {\n $request = $this->container->get(\"request\");\n $json = $request->get(\"update_data\");\n $apiName = $request->query->get(\"api_name\");\n $json = json_decode($json);\n $errorType = $json->update_type;\n\n $this->container->get(\"logger\")->info(\"Edmodo hook : \".$errorType);\n $this->container->get(\"logger\")->info($request->request->get(\"update_data\"));\n\n switch($errorType)\n {\n case \"transaction_receipt\":\n $this->transactionReceipt($json);\n break;\n case \"app_uninstall\":\n $this->appUninstall($json,$apiName);\n break;\n case \"user_data_updated\":\n $this->userDataUpdated($json);\n break;\n case \"group_deleted\":\n $this->groupDeleted($json);\n break;\n case \"group_member_created\":\n $this->groupMemberCreated($json);\n case \"removed_group_members\":\n $this->groupMemberDeleted($json);\n break;\n default:\n\n break;\n }\n\n $response = new JsonResponse();\n return $response->setData(array(\n 'status' => \"success\"\n ));\n }", "title": "" }, { "docid": "0f8208a7da623a059526b3a59e6ae1db", "score": "0.5125195", "text": "public function process(WC_Wallee_Webhook_Request $request){\n\n WC_Wallee_Helper::instance()->start_database_transaction();\n\t\t$entity = $this->load_entity($request);\n\t\ttry {\n\t\t WC_Wallee_Helper::instance()->lock_by_transaction_id($request->get_space_id(), $this->get_transaction_id($entity));\n\t\t\t$order = WC_Order_Factory::get_order($this->get_order_id($entity));\n\t\t\tif ($order !== false && $order->get_id()) {\n\t\t\t\t$this->process_order_related_inner($order, $entity);\n\t\t\t}\n\t\t\tWC_Wallee_Helper::instance()->commit_database_transaction();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t WC_Wallee_Helper::instance()->rollback_database_transaction();\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "d1815b8a6a96edb0a192b478b52272f8", "score": "0.5118043", "text": "abstract public function handle(WebhookPayload $payload): void;", "title": "" }, { "docid": "f04696fde850d24db7deb23c57f5b29c", "score": "0.5101843", "text": "public function setWH()\n {\n $response = Telegram::setWebhook(['url' => config('app.url') . '/telegram/' . config('telegram.bot_token') . '/webhook']);\n print_r($response);\n\n }", "title": "" }, { "docid": "66542c0234858b5c0f833abf763e39e0", "score": "0.5100734", "text": "public function add_auth_pageview(EventMessageInterface $msg)\n{ \n\n // Decode JSON\n $vars = $msg->get_params();\n\n // Add to database\n db::insert('auth_history_pages', array(\n 'history_id' => $vars['history_id'],\n 'request_method' => $vars['request_method'],\n 'uri' => $vars['uri'],\n 'get_vars' => $vars['get_vars'],\n 'post_vars' => $vars['post_vars'])\n );\n\n}", "title": "" }, { "docid": "dee26db0fcca1d2b969f0329d3acc669", "score": "0.51005024", "text": "public function store(Event $event, Request $request) {\n $message = Message::make();\n\n $message->title = $request->title;\n $message->body = $request->body;\n $message->event_id = $event->id;\n $message->response_id = $request->response_id ?? $event->current_response_id;\n\n $message->save();\n }", "title": "" }, { "docid": "2176ed14d860d05ac70cb4fdbb66111d", "score": "0.509972", "text": "public function handleCustomerCreated($payload)\n {\n $user = User::firstOrCreate(['stripe_id' => $payload['data']['object']['id']], [\n 'email' => $payload['data']['object']['email'],\n 'password' => 'notset',\n ]);\n\n $created = $user->wasRecentlyCreated;\n\n if ($payload['data']['object']['phone']) {\n $input = [];\n $input['phonenumber'] = $payload['data']['object']['phone'];\n $input['country'] = null;\n $input['language'] = 'en';\n $input['region'] = null;\n\n $phoneNumberUtil = \\libphonenumber\\PhoneNumberUtil::getInstance();\n $phoneNumberGeocoder = \\libphonenumber\\geocoding\\PhoneNumberOfflineGeocoder::getInstance();\n\n $validNumber = false;\n $validNumberForRegion = false;\n $possibleNumber = false;\n $isPossibleNumberWithReason = null;\n $geolocation = null;\n $phoneNumberToCarrierInfo = null;\n $timezone = null;\n\n $phoneNumber = $phoneNumberUtil->parse($input['phonenumber'], $input['country'], null, true);\n $possibleNumber = $phoneNumberUtil->isPossibleNumber($phoneNumber);\n $isPossibleNumberWithReason = $phoneNumberUtil->isPossibleNumberWithReason($phoneNumber);\n $validNumber = $phoneNumberUtil->isValidNumber($phoneNumber);\n if (!$validNumber) {\n return response()->json(['Error' => 'This is not a valid number'], 422);\n }\n $validNumberForRegion = $phoneNumberUtil->isValidNumberForRegion($phoneNumber, $input['country']);\n $phoneNumberRegion = $phoneNumberUtil->getRegionCodeForNumber($phoneNumber);\n $phoneNumberType = $phoneNumberUtil->getNumberType($phoneNumber);\n $geolocation = $phoneNumberGeocoder->getDescriptionForNumber(\n $phoneNumber,\n $input['language'],\n $input['region']\n );\n\n $e164 = $phoneNumberUtil->format($phoneNumber, \\libphonenumber\\PhoneNumberFormat::E164);\n $nationalNumber = $phoneNumberUtil->format($phoneNumber, \\libphonenumber\\PhoneNumberFormat::NATIONAL);\n\n $phoneNumberToCarrierInfo = \\libphonenumber\\PhoneNumberToCarrierMapper::getInstance()->getNameForNumber(\n $phoneNumber,\n $input['language']\n );\n $timezone = \\libphonenumber\\PhoneNumberToTimeZonesMapper::getInstance()->getTimeZonesForNumber($phoneNumber);\n\n $countryCode = $phoneNumberUtil->getCountryCodeForRegion($phoneNumberRegion);\n $country = Country::firstOrCreate(\n ['iso' => $phoneNumberRegion],\n ['name' => $geolocation, 'calling_code' => $countryCode]\n );\n $phone = Phone::firstOrCreate(\n ['e164' => $e164],\n [\n 'number' => $nationalNumber,\n // 'possibleNumber' => $possibleNumber,\n // 'validNumber' => $validNumber,\n // 'validNumberForRegion' => $validNumberForRegion,\n 'number_type' => $phoneNumberType,\n 'country_id' => $country->id,\n 'timezone' => $timezone[0],\n 'description' => $phoneNumberToCarrierInfo,\n 'user_id' => $user->id,\n 'is_public' => 0,\n ]\n );\n } else {\n $phone->id = null;\n }\n\n $user->stripe_id = $payload['data']['object']['id'];\n $user->email = $payload['data']['object']['email'];\n $user->phone_id = $phone->id;\n\n if ($created) {\n $token = Password::getRepository()->create($user);\n $user->sendPasswordResetNotification($token);\n $user->email_verified_at = now();\n Notification::send($user, new CustomNotification([\n 'title' => 'Hi! Welcome to the '.config('app.name').' family!',\n 'message' => \"You're only a step away from completing your account. Just set your account password by following the link we've already sent to your email address, \".$user->email.\" , and you'll be good to go!\",\n ]));\n }\n $user->save();\n\n return response('Webhook Handled', 200);\n }", "title": "" }, { "docid": "ed2e548b3fa84aeeee2c23b433071cf1", "score": "0.5099049", "text": "public function store(Request $request)\n {\n\n $newOrder = Order::find($request->order_id);\n\n if ($newOrder) {\n if ($newOrder->delivery_id == null && auth()->user()->delivery_status == 1) {\n\n try {\n DB::beginTransaction();\n $newOrder->update([\n 'delivery_id' => auth()->user()->id,\n ]);\n\n $this->changeDeliveryStatus(auth()->user()->id, 0);\n DB::commit();\n } catch (\\Exception $ex) {\n DB::rollback();\n return $ex;\n }\n $order_details = OrderDetailsRecourse::collection($newOrder->orderDetails);\n $order_client = new UserResource(User::find($newOrder->client_id));\n $order_delivery = new UserResource(User::find($newOrder->delivery_id));\n\n $this->makeEvent($order_details, $order_delivery, $order_client);\n\n return $this->sendResponse(['user_date' => $order_client, 'order_details' => $order_details], 200);\n } else {\n return $this->sendError(' another delivery take it befor you', ['No Data'], 200);\n }\n } else {\n return $this->sendError('There is order not found || has been deleted', ['No Data'], 404);\n }\n }", "title": "" }, { "docid": "2c13bf696a1b51a9ae0d2916ec756d03", "score": "0.5098293", "text": "public function inject_purchase_event( $order_id ) {\n\n\t\t\t$event_name = 'Purchase';\n\n\t\t\tif ( ! $this->is_pixel_enabled() || $this->pixel->is_last_event( $event_name ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$order = wc_get_order( $order_id );\n\n\t\t\tif ( ! $order ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// use an order meta to ensure an order is tracked with any payment method, also when the order is placed through AJAX\n\t\t\t$order_placed_meta = '_wc_' . facebook_for_woocommerce()->get_id() . '_order_placed';\n\n\t\t\t// use an order meta to ensure a Purchase event is not tracked multiple times\n\t\t\t$purchase_tracked_meta = '_wc_' . facebook_for_woocommerce()->get_id() . '_purchase_tracked';\n\n\t\t\t// when saving the order meta data: add a flag to mark the order tracked\n\t\t\tif ( 'woocommerce_checkout_update_order_meta' === current_action() ) {\n\t\t\t\t$order->update_meta_data( $order_placed_meta, 'yes' );\n\t\t\t\t$order->save_meta_data();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// bail if by the time we are on the thank you page the meta has not been set or we already tracked a Purchase event\n\t\t\tif ( 'yes' !== $order->get_meta( $order_placed_meta ) || 'yes' === $order->get_meta( $purchase_tracked_meta ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$content_type = 'product';\n\t\t\t$contents = array();\n\t\t\t$product_ids = array( array() );\n\t\t\t$product_names = array();\n\n\t\t\tforeach ( $order->get_items() as $item ) {\n\n\t\t\t\tif ( $product = isset( $item['product_id'] ) ? wc_get_product( $item['product_id'] ) : null ) {\n\n\t\t\t\t\t$product_ids[] = \\WC_Facebookcommerce_Utils::get_fb_content_ids( $product );\n\t\t\t\t\t$product_names[] = $product->get_name();\n\n\t\t\t\t\tif ( 'product_group' !== $content_type && $product->is_type( 'variable' ) ) {\n\t\t\t\t\t\t$content_type = 'product_group';\n\t\t\t\t\t}\n\n\t\t\t\t\t$quantity = $item->get_quantity();\n\t\t\t\t\t$content = new \\stdClass();\n\n\t\t\t\t\t$content->id = \\WC_Facebookcommerce_Utils::get_fb_retailer_id( $product );\n\t\t\t\t\t$content->quantity = $quantity;\n\n\t\t\t\t\t$contents[] = $content;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Advanced matching information is extracted from the order\n\t\t\t$event_data = array(\n\t\t\t\t'event_name' => $event_name,\n\t\t\t\t'custom_data' => array(\n\t\t\t\t\t'content_ids' => wp_json_encode( array_merge( ... $product_ids ) ),\n\t\t\t\t\t'content_name' => wp_json_encode( $product_names ),\n\t\t\t\t\t'contents' => wp_json_encode( $contents ),\n\t\t\t\t\t'content_type' => $content_type,\n\t\t\t\t\t'value' => $order->get_total(),\n\t\t\t\t\t'currency' => get_woocommerce_currency(),\n\t\t\t\t),\n\t\t\t\t'user_data' => $this->get_user_data_from_billing_address( $order ),\n\t\t\t);\n\n\t\t\t$event = new Event( $event_data );\n\n\t\t\t$this->send_api_event( $event );\n\n\t\t\t$event_data['event_id'] = $event->get_id();\n\n\t\t\t$this->pixel->inject_event( $event_name, $event_data );\n\n\t\t\t$this->inject_subscribe_event( $order_id );\n\n\t\t\t// mark the order as tracked\n\t\t\t$order->update_meta_data( $purchase_tracked_meta, 'yes' );\n\t\t\t$order->save_meta_data();\n\t\t}", "title": "" }, { "docid": "008a1ae1a6097d64f360a4b41fcbaf83", "score": "0.5092634", "text": "public function testConnectPostNamespacedBuildWebhooks()\n {\n\n }", "title": "" }, { "docid": "dc9090cb31465376b582e159cd2a7ede", "score": "0.5090146", "text": "public function handleTransactionWebhook(Request $request, $identifier)\n {\n if ($coin = $this->getCoinByIdentifier($identifier)) {\n $resource = $coin->adapter->handleTransactionWebhook($coin->wallet->resource, $request->all());\n\n if ($resource instanceof Transaction) {\n $coin->saveTransactionResource($resource);\n }\n }\n }", "title": "" }, { "docid": "b0a40c1ff3a1225bd6fc47333016dc6e", "score": "0.5080412", "text": "public function create(Request $request)\n {\n $validator = Validator::make($request->post(), [\n 'name' => 'required|regex:/^([^ ]+[ ]*)+$/u',\n 'url' => ['required', 'regex:/^https\\:\\/\\/(?:discord|discordapp)\\.com\\/api\\/webhooks[\\/a-zA-Z0-9\\-_]+$/u'],\n 'description' => 'max: 2048'\n ]);\n\n if ($validator->fails())\n return $this->formatValidationErrors($validator->errors());\n\n $webhook_url = $request->post('url');\n $webhook_data = Fetch::load($webhook_url);\n\n if (!isset($webhook_data))\n return response()->json(['status' => 500, 'message' => 'Failed to load webhook data'], 500);\n\n $webhook_data = json_decode($webhook_data, true);\n\n if (!$this->validateWebhookData($webhook_data))\n return response()->json(['status' => 500, 'message' => 'Invalid webhook data received'], 500);\n\n if (Webhook::where(['discord_id' => $webhook_data['id']])->first() != null)\n return response()->json(['status' => 422, 'message' => 'Webhook is already in use'], 422);\n\n $hook = new Webhook();\n $hook->url = $webhook_url;\n $hook->manager_id = $request->user()->id;\n $hook->discord_id = $webhook_data['id'];\n $hook->channel_id = $webhook_data['channel_id'];\n $hook->guild_id = $webhook_data['guild_id'];\n $hook->name = $request->post('name');\n $hook->description = $request->post('description') ?? '';\n $hook->avatar_url = isset($webhook_data['avatar']) ? 'https://cdn.discordapp.com/avatars/' . $webhook_data['id'] . '/' . $webhook_data['avatar'] . '.png' : null;\n $hook->state = WebhookState::CREATED;\n $hook->save();\n\n return response()->json(Webhook::where(['discord_id' => $webhook_data['id']])->first());\n }", "title": "" }, { "docid": "b5efaf7f94e8e2b40eea68808c0de062", "score": "0.5080057", "text": "public function actionCreateAllWebhooks()\n {\n $packageManager = $this->module->getPackageManager();\n $names = $packageManager->getPackageNames();\n\n foreach ($names as $name) {\n $package = $packageManager->getPackage($name);\n if ($package->managed) {\n $packageManager->createWebhook($package, $this->force);\n }\n }\n }", "title": "" }, { "docid": "25be96fe34d0de3ef874ad707e2cf78f", "score": "0.5068932", "text": "private function addWebhooksEvent($model, $id)\n {\n $client = new TenbucksWebhooks();\n $query = array(\n 'shop_url' => $this->getShopUri(),\n 'model' => $model,\n 'external_id' => (int) $id,\n );\n $success = false;\n $error_msg = sprintf('TenbucksWebhooks error with %s #%d', $model, $id);\n\n try {\n if ($client->send($query)) {\n $success = true;\n } else {\n Logger::addLog($error_msg);\n }\n } catch (Exception $e) {\n Logger::addLog($error_msg.': '.$e->getMessage());\n }\n\n return $success;\n }", "title": "" }, { "docid": "ca615950c595b128853b58a5c52501f2", "score": "0.5060965", "text": "function send_new_event_notification_to_admin($eventTag)\n{\n\tif($eventTag !='')\n\t{\n\t\t$eventData = fetchEventDetailsBasedonEventTAG($eventTag);\n\t\tif (!empty($eventData)) \n\t\t{\n\t\t\t$id\t\t\t\t\t\t=\t$eventData['id'];\n\t\t\t$name\t\t\t\t\t\t=\t$eventData['name'];\n\t\t\t$address\t\t\t\t\t=\t$eventData['address'];\n\t\t\t$date\t\t\t\t\t\t=\t$eventData['date'];\n\t\t\t$startTime\t\t\t\t=\t$eventData['startTime'];\n\t\t\t$endTime\t\t\t\t\t=\t$eventData['endTime'];\n\t\t\t$clientid\t\t\t\t=\t$eventData['clientid'];\n\t\t\t$poster\t\t\t\t\t=\t$eventData['poster'];\n\t\t\t$about\t\t\t\t\t=\t$eventData['about'];\n\t\t\t$category\t\t\t\t=\t$eventData['category'];\n\t\t\t$latitude\t\t\t\t=\t$eventData['map']['center']['latitude']\t;\n\t\t\t$longitude\t\t\t\t=\t$eventData['map']['center']['longitude'];\n\t\t\t$city\t\t\t\t\t\t=\t$eventData['city'];\n\t\t\t$added_by\t\t\t\t=\t$eventData['added_by'];\n\t\t\t$added_on\t\t\t\t=\t$eventData['added_on'];\n\t\t\t$status\t\t\t\t\t=\t$eventData['status'];\n\t\t\t$read_only\t\t\t\t=\t$eventData['read_only'];\n\t\t\t$eventTagId\t\t\t\t=\t$eventData['eventTagId'];\n\t\t\t\n\t\t\t$eventHostInfo\t\t\t= fetch_user_information_from_id($clientid);\n\t\t\t$firstName\t\t\t\t=\t$eventHostInfo['firstName'];\n\t\t\t$lastName\t\t\t\t=\t$eventHostInfo['lastName'];\n\t\t\t$companyName\t\t\t=\t$eventHostInfo['company']['companyName'];\n\t\t\t\n\t\t\t//http://192.168.11.13/projects/entreprenity/api/addNewEvent\n\t\t\t//http://entreprenity.co/app/api/services/testmail.php\n\t\t\t$pathToFile\t\t\t\t= \"http://\" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n\t\t\t$eventBaseURL\t\t\t= str_replace(\"api/finishThisEvent\",\"others/event.php\",$pathToFile);\n\t\t\t//$eventBaseURL\t\t= str_replace(\"api/services/emailServices.php\",\"others/event.php\",$pathToFile);\n\t\t\t\n\t\t\t$eventAprovURL\t\t\t= $eventBaseURL.\"?tagged=\".urlencode($eventTagId).'&action=accept';\n\t\t\t$eventRejectURL\t\t= $eventBaseURL.\"?tagged=\".urlencode($eventTagId).'&action=reject';\n\t\t\t\n\t\t\tob_start();\n\t\t\tinclude('email_templates/newEventsNotify.php');\n\t\t\t$eventsNotify_template = ob_get_contents();\t\t\t\n\t\t\tob_end_clean();\n\t\t\t\t\t\t\n\t\t\t//$to = '[email protected]'; \n\t\t\t$to = ADMINEMAIL; \n\t\t\t$strSubject = EVENTREQ_CONST;\n\t\t\t$message\t= $eventsNotify_template;\n\t\t\n\t\t\tinclude('sendmail/sendmail.php');\t\n\t\t\t$mail->SetFrom(MS_SENTFROM, MS_SENTFROMNAME);\n\t\t\t$mail->Subject = ($strSubject);\n\t\t\t$mail->MsgHTML($message);\n\t\t\t$mail->AddAddress($to);\n\t\t\t//$mail->AddBCC(RECIPIENTEMAIL1, RECIPIENTNAME1);\n\t\t\t//$mail->AddBCC(RECIPIENTEMAIL2, RECIPIENTNAME2);\n\t\t\t$mail->AddAddress(RECIPIENTEMAIL1, RECIPIENTNAME1);\n\t\t\t//$mail->AddAddress(RECIPIENTEMAIL2, RECIPIENTNAME2);\n\t\t\tif($mail->Send()) \n\t\t\t{\n\t\t \t\treturn \"Mail send successfully\";\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t \t\treturn $mail->ErrorInfo;\n\t\t\t}\n\t\n\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e4e64039f284edb039ebf69855bb4bf9", "score": "0.5058969", "text": "function sb_webhooks($function_name, $parameters) {\n if (isset($function_name) && $function_name != '' && isset($parameters)) {\n $names = ['SBLoginForm' => 'login', 'SBRegistrationForm' => 'registration', 'SBUserDeleted' => 'user-deleted', 'SBMessageSent' => 'message-sent', 'SBBotMessage' => 'bot-message', 'SBEmailSent' => 'email-sent', 'SBNewMessagesReceived' => 'new-message', 'SBNewConversationReceived' => 'new-conversation', 'SBNewConversationCreated' => 'new-conversation-created', 'SBActiveConversationStatusUpdated' => 'conversation-status-updated', 'SBSlackMessageSent' => 'slack-message-sent', 'SBMessageDeleted' => 'message-deleted', 'SBRichMessageSubmit' => 'rich-message', 'SBNewEmailAddress' => 'new-email-address'];\n if (isset($names[$function_name])) {\n $webhooks = sb_get_setting('webhooks');\n if ($webhooks !== false && $webhooks['webhooks-url'] != '' && $webhooks['webhooks-active']) {\n if (isset($_SERVER['HTTP_REFERER'])) {\n $settings['current_url'] = [$_SERVER['HTTP_REFERER'], 'Current URL'];\n }\n $query = json_encode(['function' => $names[$function_name], 'key' =>$webhooks['webhooks-key'], 'data' => $parameters, 'sender-url' => (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '')]);\n if ($query != false) {\n return sb_curl($webhooks['webhooks-url'], $query, [ 'Content-Type: application/json', 'Content-Length: ' . strlen($query)]);\n } else {\n return new SBError('webhook-json-error');\n }\n } else {\n return new SBValidationError('webhook-not-active-or-empty-url');\n }\n } else {\n return new SBValidationError('webhook-not-found');\n }\n } else {\n return new SBError('invalid-function-or-parameters');\n }\n}", "title": "" }, { "docid": "286df88f2a898214092f75a8c12a3528", "score": "0.5055963", "text": "public function HookEvents() {\n\t\tadd_action( 'wsal_prune', array( $this, 'EventPruneEvents' ), 10, 2 );\n\t\tadd_action( 'admin_init', array( $this, 'EventAdminInit' ) );\n\t\tadd_action( 'automatic_updates_complete', array( $this, 'WPUpdate' ), 10, 1 );\n\n\t\t// whitelist options.\n\t\tadd_action( 'allowed_options', array( $this, 'EventOptions' ), 10, 1 );\n\n\t\t// Update admin email alert.\n\t\tadd_action( 'update_option_admin_email', array( $this, 'admin_email_changed' ), 10, 3 );\n\t}", "title": "" }, { "docid": "b5f663b87d84265d6f522d829cdfb17a", "score": "0.50525206", "text": "public function handleNewOrderEvent(int $idSalesOrder): void;", "title": "" }, { "docid": "81a8b9ffcff0e5309dc5adfbd0251ec7", "score": "0.5049698", "text": "public function store(Order $order, Request $request)\n {\n $this->validate($request,[\n 'first_name' => 'required|string|max:255',\n 'last_name' => 'required|string|max:255',\n 'document_type' => 'required|string|in:CC,CE,TI,PPN,NIT,SSN',\n 'document' => 'required|numeric',\n ]);\n \n $data = array(\n 'reference' => $order->reference, \n 'description' => $order->description, \n 'amount' => array(\n 'currency' => 'COP',\n 'total' => $order->amount\n )\n );\n\n $buyer = array(\n 'document' => $request['document'], \n 'documentType' => $request['document_type'], \n 'name' => $request['first_name'],\n 'surname' => $request['last_name'],\n 'email' => $order->email,\n );\n\n $response = $this->paymentGateway->createTransaction($data, $buyer, $order->id, $request);\n\n $payIntent = PayIntent::create([\n 'order_id' => $order->id,\n 'status' => $response[\"status\"]['status'],\n 'request_id' => $response[\"requestId\"],\n 'response' => json_encode($response)\n ]);\n\n if ( $response[\"status\"]['status'] == 'OK' ) {\n Cache::forget('payIntentId');\n Cache::add('payIntentId', $payIntent->id);\n return redirect($response[\"processUrl\"]);\n }\n\n return redirect(route('orders.show', $order));\n }", "title": "" }, { "docid": "91d379e944f617226215e4036640f7f1", "score": "0.50466084", "text": "public function webhookAccepted() {\n\t\techo 'PHPSDK: webhook accepted';\n\t}", "title": "" }, { "docid": "5b3fddbfaffd774840821d3e808c5631", "score": "0.5040353", "text": "public function store_delivery_history($order) {\n $delivery_history = new DeliveryHistory;\n\n $delivery_history->order_id = $order->id;\n $delivery_history->delivery_boy_id = Auth::user()->id;\n $delivery_history->delivery_status = $order->delivery_status;\n $delivery_history->payment_type = $order->payment_type;\n if($order->delivery_status == 'delivered') {\n $delivery_boy = DeliveryBoy::where('user_id', Auth::user()->id)->first();\n\n if(get_setting('delivery_boy_payment_type') == 'commission') {\n $delivery_history->earning = get_setting('delivery_boy_commission');\n $delivery_boy->total_earning += get_setting('delivery_boy_commission');\n }\n if($order->payment_type == 'cash_on_delivery') {\n $delivery_history->collection = $order->grand_total;\n $delivery_boy->total_collection += $order->grand_total;\n\n $order->payment_status = 'paid';\n if($order->commission_calculated == 0) {\n commission_calculation($order);\n $order->commission_calculated = 1;\n }\n\n }\n\n $delivery_boy->save();\n\n }\n $order->delivery_history_date = date(\"Y-m-d H:i:s\");\n\n $order->save();\n $delivery_history->save();\n flash(translate('Delivery Status Successfully Marked as Pickup'))->success();\n\n\n }", "title": "" }, { "docid": "26a5d3df5337dc5fefaba1b3a245e497", "score": "0.50400704", "text": "public function postAddedNewCustomer(){\n\n }", "title": "" }, { "docid": "cdcd8ce616dfe93bc77e87fee8946d59", "score": "0.50374925", "text": "public function created(MainComboServiceBought $mainComboServiceBought)\n {\n //GET PERMISSION ID, SUPPORT TEAM\n $permission_id = MainPermissionDti::active()->where('permission_slug','payment-orders')->first()->id;\n $role_list = MainGroupUser::active()->where('gu_id','!=',1)->get();\n $support_team = [];\n foreach ($role_list as $role){\n $permission_list = $role->gu_role_new;\n if($permission_list != \"\"){\n $permission_arr = explode(';',$permission_list);\n if(in_array($permission_id,$permission_arr)){\n $support_team[] = $role->gu_id;\n }\n }\n }\n\n $user_info = MainUser::where('user_id',$mainComboServiceBought->created_by)->first();\n\n if( isset($user_info->getTeam) \n && $user_info->getTeam->team_cskh_id != \"\" \n && $user_info->getTeam->team_cskh_id != null)\n {\n $user_list = MainUser::where('user_team',$user_info->getTeam->team_cskh_id)->get();\n\n foreach ($user_list as $user){\n $content = $mainComboServiceBought->getCreatedBy->user_nickname.\" created a order #\".$mainComboServiceBought->id;\n //ADD NOTIFICATION TO DATABASE\n $notification_arr = [\n 'id' => MainNotification::max('id')+1,\n 'content' => $content,\n 'href_to' => route('payment-order',$mainComboServiceBought->id),\n 'receiver_id' => $user->user_id,\n 'read_not' => 0,\n 'created_by' => $mainComboServiceBought->getCreatedBy->user_id,\n ];\n MainNotification::create($notification_arr);\n //SEND NOTIFICATION WITH ONESIGNAL\n $input_onesignal['order_id'] = $mainComboServiceBought->id;\n $input_onesignal['user_id'] = $user->user_id;\n\n dispatch(new SendNotificationOrderOnesignal($input_onesignal))->delay(now()->addSecond(5));\n }\n }\n }", "title": "" }, { "docid": "8a098722a23eed694f602240d426e84a", "score": "0.5035567", "text": "public function register_hooks()\r\n\t{\r\n\t\t// Whenever a renewal payment is due subscription is placed on hold and then back to active if successful\r\n\t\t// Block this trigger while this happens\r\n\t\tadd_action( 'woocommerce_custom_scheduled_subscription_payment', array( $this, 'before_payment' ), 0, 1 );\r\n\t\tadd_action( 'woocommerce_custom_scheduled_subscription_payment', array( $this, 'after_payment' ), 1000, 1 );\r\n\r\n\t\tadd_action( 'woocommerce_custom_subscription_status_updated', array( $this, 'catch_hooks' ), 10, 3 );\r\n\t}", "title": "" }, { "docid": "452eadde30f64f772e6d7146119d39ee", "score": "0.5031516", "text": "public function handleGatewayCallback()\n {\n $paymentDetails = Paystack::getPaymentData();\n\n if($paymentDetails['data']['status'] === 'success'){\n\n // Save to db\n $payment_successful = Payment::create([\n 'contestant_id' => $paymentDetails['data']['metadata']['contestant_id'],\n 'accname' => $paymentDetails['data']['metadata']['name'],\n 'email' => $paymentDetails['data']['customer']['email'],\n 'amount' => Session::get('amount'),\n 'votes' => Session::get('votes'),\n 'status' => 1,\n 'payment_method' => 'paystack',\n ]);\n\n if($payment_successful){\n $con = Contestant::where('id', $payment_successful->contestant_id)->get()->first();\n\n $con->votes += $payment_successful->votes;\n $con->save();\n }\n\n Session::flash('success', 'Payment Successful, your vote has been added');\n return redirect('contestants/voting-complete');\n }\n\n Session::flash('danger', 'Payment Failed, check your account balance or try again');\n return redirect();\n\n\n// dd($paymentDetails);\n // Now you have the payment details,\n // you can store the authorization_code in your db to allow for recurrent subscriptions\n // you can then redirect or do whatever you want\n }", "title": "" }, { "docid": "8690fb9aff88d1e000e8dbc070a8d7d8", "score": "0.5029586", "text": "public function processEvent()\n {\n foreach ($this->json as $event) {\n $this->data = $event;\n\n if ($this->verifyEvent()) {\n $this->setMailData();\n $this->storeEvent();\n $this->triggerEvent();\n }\n }\n }", "title": "" }, { "docid": "736b33918262affe074f655bfb5aca05", "score": "0.5028945", "text": "public function store(Request $request)\n {\n $input = OrderRequestDecoder::decode($request->getContent());\n\n $newProductsCreated = $this->orderProcessor->processOrder($input);\n\n //in case new products are created to match this order\n //a event will be fired to send a notification email to the admin\n if($newProductsCreated){\n Event::fire(new ProductsAreCreatedForOrder());\n }\n\n return 'Order saved';\n }", "title": "" }, { "docid": "57ac6a57ec624e548179f7cf847e4c2d", "score": "0.50281465", "text": "public function paymentCallback()\n {\n $transaction = PaytmWallet::with('receive');\n \n $response = $transaction->response();\n \n if($transaction->isSuccessful()){\n Event::where('order_id',$response['ORDERID'])->update(['status'=>'success', 'payment_id'=>$response['TXNID']]);\n \n dd('Payment Successfully Credited.');\n \n }else if($transaction->isFailed()){\n //Event::where('order_id',$order_id)->update(['status'=>'failed', 'payment_id'=>$response['TXNID']]);\n dd('Payment Failed. Try again lator');\n }\n }", "title": "" }, { "docid": "45d4124a0f801a9bd76c04813edb8dcb", "score": "0.5027618", "text": "public function handle(WebHook $webHook)\n {\n }", "title": "" }, { "docid": "1af08b3d521c6b21767a6890399e4bc1", "score": "0.5024118", "text": "function hook_integrated_support_event($module, $payload) {\n\n}", "title": "" }, { "docid": "8ddde12c384871413d64dfcddd3e4f4f", "score": "0.50222504", "text": "public function handle_webhook_request() {\n $out = [\n 'success' => false\n ];\n\n if ( isset( $_GET['key'] ) && $_GET['key'] == self::WEBHOOK_KEY ) {\n $request_body = file_get_contents( 'php://input' );\n $in = json_decode( $request_body, true );\n\n if ( !empty( $in ) ) {\n if ( !origenz()->is_local_environment() || true ) { // TODO: Remove || true once they're all working.\n $this->log_webhook( $in );\n\n if ( in_array( $in['type'], $this->printful->get_webhook_types() ) ) {\n $this->{'handle_' . $in['type'] . '_webhook'}( $in );\n }\n }\n\n $out['success'] = true;\n }\n\n if ( !$out['success'] ) {\n http_response_code( 400 );\n }\n }\n\n wp_send_json( $out );\n exit;\n }", "title": "" }, { "docid": "467cc17a1cabd95fa3672892d96afc62", "score": "0.50207967", "text": "function jolt_twitch_subEvent($type, $id, $secret, $token, $url) {\n $broadcasterUserId = get_option('jolt_twitchUserId', '0');\n\n $headers = [\n 'Client-ID' => $id,\n 'Authorization' => 'Bearer ' . base64_decode($token),\n 'Content-Type' => 'application/json',\n ];\n\n $payload = [\n 'type' => $type,\n 'version' => 1,\n 'condition' => [\n 'broadcaster_user_id' => $broadcasterUserId\n ],\n 'transport' => [\n 'method' => 'webhook',\n 'callback' => get_site_url() . '/wp-json/wp/v2/jolt-twitch/event-callback',\n 'secret' => $secret\n ]\n ];\n\n $response = wp_remote_post($url, [\n 'headers' => $headers,\n 'body' => json_encode($payload),\n 'timeout' => 10\n ]);\n\n if (is_wp_error($response)) {\n error_log('Attempt to subscribe has failed: ' . $type);\n return false;\n }\n\n $body = wp_remote_retrieve_body($response);\n\n $body = json_decode($body, true);\n\n return true;\n}", "title": "" }, { "docid": "571fab556d90f922d565ddf87d0be088", "score": "0.50195444", "text": "public function store(Request $request)\n {\n $message = [\n 'message' => $request->get('message'),\n 'user_id' => 3\n ];\n\n $chat = Chat::create($message);\n // $chat = new Chat($message);\n // $chat->save();\n // $time = new Carbon($chat->created_at);\n // TODO: change date format\n $chat->user = $chat->user;\n $chat->created_at = 11;\n event(new Message($chat));\n }", "title": "" }, { "docid": "693e1f0412ab952dffbd6b3d70495e48", "score": "0.50181174", "text": "private function processNotification($data)\n {\n $postdata = file_get_contents(\"php://input\");\n $json = json_decode($postdata, true);\n\n if($json['signature']==$this->params->get('signature')){\n if($json['orderNo']){\n error_log(\"hey\".$json['orderNo']);\n error_log(print_r($json, true));\n\n $orderId = $json['orderNo'];\n\n // Call Jeeb\n $network_uri = \"https://core.jeeb.io/api/\";\n\n\n error_log(\"Entered Jeeb-Notification\");\n if ( $json['stateId']== 2 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n error_log('Object : '.print_r($json, true));\n $this->setWrongStatus($orderId, 5);\n }\n else if ( $json['stateId']== 3 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n error_log('Object : '.print_r($json, true));\n $this->setWrongStatus($orderId, 4);\n }\n else if ( $json['stateId']== 4 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n $data = array(\n \"token\" => $json[\"token\"]\n );\n\n $data_string = json_encode($data);\n $api_key = $this->params->get('signature');\n $url = $network_uri.'payments/' . $api_key . '/confirm';\n error_log(\"Signature:\".$api_key.\" Base-Url:\".$network_uri.\" Url:\".$url);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n\n $result = curl_exec($ch);\n $data = json_decode( $result , true);\n error_log(\"data = \".var_export($data, TRUE));\n\n\n if($data['result']['isConfirmed']){\n error_log('Payment confirmed by jeeb');\n $this->setCompleteStatus($orderId);\n }\n else {\n error_log('Payment confirmation rejected by jeeb');\n }\n }\n else if ( $json['stateId']== 5 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n $this->setWrongStatus($orderId, 6);\n\n }\n else if ( $json['stateId']== 6 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n $this->setWrongStatus($orderId, 6);\n\n }\n else if ( $json['stateId']== 7 ) {\n error_log('Order Id received = '.$json['orderNo'].' stateId = '.$json['stateId']);\n $this->setWrongStatus($orderId, 6);\n }\n else{\n error_log('Cannot read state id sent by Jeeb');\n }\n }\n }\n}", "title": "" } ]
6137467a3bcf23afe4531da4af3624ab
Returns user company model or null if company not found
[ { "docid": "477789c902ba729ede3ef00ec7e6b685", "score": "0.77772", "text": "public function getCompany()\n {\n $company = Company::findByOwner($this->id);\n if (!is_null($company)) {\n return $company;\n }\n\n $company = Company::findByUser($this->id);\n if (!is_null($company)) {\n return $company;\n }\n\n return null;\n }", "title": "" } ]
[ { "docid": "d1e143b45dc6ea9b769c5ace036b4d87", "score": "0.80244464", "text": "public function getCompany()\n {\n return $this->hasOne(CompanyProfile::className(), ['user_id' => 'company_id']);\n }", "title": "" }, { "docid": "010a46ccfaf5dc1dad49d72ee630eb13", "score": "0.76743144", "text": "public function findOneByUser($user)\n {\n return $user->getCompany();\n }", "title": "" }, { "docid": "289649629057324b1d4f47d2c96914f3", "score": "0.7663543", "text": "public function getCompany()\n {\n return $this->hasOne(Company::className(), ['id' => 'company_id']);\n }", "title": "" }, { "docid": "1bc6974c9556c95d7297d613e73d598e", "score": "0.7387311", "text": "public function userCompany()\n {\n return $this->hasOne('App\\Model\\SupplyUserInfo','company_id', 'company_id')->latest();\n }", "title": "" }, { "docid": "7ed3319e20e62ff254a6bd57c57272a0", "score": "0.73814607", "text": "public function getCompany($user)\n {\n if (($company = $user->getMetaValue('user_company_id'))) {\n\n $repositoryCompany = $this->container->get('entity_manager')\n ->getRepository('Fitbase\\Bundle\\CompanyBundle\\Entity\\Company');\n\n return $repositoryCompany->find($company);\n }\n return null;\n }", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.7302985", "text": "public function getCompany();", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.7302985", "text": "public function getCompany();", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.7302985", "text": "public function getCompany();", "title": "" }, { "docid": "8385452796090489bcdc81c2c3ece2e1", "score": "0.72438645", "text": "public function get_company() {\n \n return $this->company;\n \n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.7203295", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "87e4908c63f8cf0fd3c788db6bb4a349", "score": "0.71901727", "text": "public function company()\n {\n return $this->hasOne('App\\Model\\CompanyInfo','company_id', 'company_id');\n }", "title": "" }, { "docid": "06fefa559c50d0a50f56568078b5bb4d", "score": "0.71293324", "text": "public function getCompany()\n {\n $company = user()->company;\n if ($company) {\n $meta = $company->meta ?? [];\n $company = array_merge($meta, $company->toArray());\n $company['industry'] = user()->company->industry;\n }\n return $this->respond(compact('company'));\n }", "title": "" }, { "docid": "b6b72b82a3dd7a276fa1568e27d8ea27", "score": "0.7125377", "text": "public function company()\n\t{\n\t\treturn $this->hasOne('Company', 'industry_id')->where('soft_deleted', 0);\n\t}", "title": "" }, { "docid": "b2a52809f28a2a7ef6aced1968254588", "score": "0.70010674", "text": "public function company()\n {\n return $this->hasOne(Company::class,'id','company_id');\n }", "title": "" }, { "docid": "2159775ca5b9ee586aff8cc5279a008b", "score": "0.6980219", "text": "public function getCompany()\n\t {\n\t return $this->company;\n\t }", "title": "" }, { "docid": "fbd9fd5966211485f9c75d97b9b7d12e", "score": "0.6920591", "text": "public function getCompany($data) {\n $this->db->query(\"SELECT * FROM company WHERE email = :email\");\n $this->db->bind(':email', $data['email']);\n\n $company = $this->db->single();\n\n if ($company) {\n return $company;\n }else {\n return false;\n }\n }", "title": "" }, { "docid": "792d845442f53c549e3dafdcbd5e9028", "score": "0.68977594", "text": "public function company()\n {\n return $this->_company;\n }", "title": "" }, { "docid": "e7cc1de591b084d3ca73c48c15546706", "score": "0.688696", "text": "public function getCompany() : ?string ;", "title": "" }, { "docid": "b476d8f6ffbb9b994e681a3cbe8edc40", "score": "0.685334", "text": "public static function getDefaultByUser(Users $user) : Companies\n {\n //verify the user has a default company\n $defaultCompany = $user->get(self::cacheKey());\n\n //found it\n if (!is_null($defaultCompany)) {\n return self::findFirst($defaultCompany);\n }\n\n //second try\n $defaultCompany = UsersAssociatedCompanies::findFirst([\n 'conditions' => 'users_id = ?0 and user_active =?1',\n 'bind' => [$user->getId(), 1],\n ]);\n\n if (is_object($defaultCompany)) {\n return self::findFirst($defaultCompany->companies_id);\n }\n\n throw new Exception(_(\"User doesn't have an active company\"));\n }", "title": "" }, { "docid": "c392c14ba4210a418fd63885440d513a", "score": "0.6851901", "text": "function company()\r\n\t{\r\n\t\t$authenticate = Services::authentication();\r\n\t\t$authenticate->check();\r\n\t\treturn $authenticate->company();\r\n\t}", "title": "" }, { "docid": "830068c59c25fafe99b7d8bf73736580", "score": "0.6849063", "text": "public static function uCompany($data='id'){\n if(isset(Yii::app()->user->company[$data])) return Yii::app()->user->company[$data];\n return false;\n }", "title": "" }, { "docid": "4e8a288abeb4c88444e21cb27c06fa4f", "score": "0.6836059", "text": "public function getCompany(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'id' => 'required|int'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\"success\" => false, \"message\" => $validator->messages()]);\n }\n\n $company = User::where(\"id\", $request->id)->where(\"is_active\", 1)->where(\"is_archived\", 0)->select('id', 'role', 'full_name', 'profile_image', 'country_id', 'city_id', 'company_description', 'background_image', 'phone', 'address', 'website', 'facebook', 'instagram', 'linkedin', 'pib', 'pdv', 'email', 'zip_code', 'employees_number')->with(['country', 'city', 'videos'])->first();\n\n if(!$company || $company->role != \"company\"){\n return response()->json(['success' => false, 'message' => 'Company does not exist or not active'], 404); \n }\n\n return response()->json(['success' => true, 'company' => $company], 200);\n\n }", "title": "" }, { "docid": "ad096282cf8a633ec20c1d830d5bb6e0", "score": "0.6826988", "text": "public function getCompanyName() {\r\n\t\t\t$sql = \"SELECT company_name FROM p_company AS c \" .\r\n\t\t\t\t\"JOIN u_profile AS u ON u.company_id = c.id \" .\r\n\t\t\t\t\"WHERE u.z_user_id = \" . $this->cred->getId() . \" \" .\r\n\t\t\t\t\"AND u.is_active = 1 \" .\r\n\t\t\t\t\"AND c.is_active = 1\";\r\n\t\treturn $this->dbOb->getOne($sql);\r\n\t}", "title": "" }, { "docid": "41540ac9190097ab410060fe588e1055", "score": "0.6773496", "text": "public function companyInfo()\n {\n return $this->hasOne('App\\Model\\CompanyInfo','company_id', 'company_id');\n }", "title": "" }, { "docid": "e020fa47696f39e8e6a60ec959483cfc", "score": "0.6756234", "text": "public function getCompanyFromDatabase($company_id)\n {\n return DB::table('companies')->where('id', $company_id)->first();\n }", "title": "" }, { "docid": "571e341183f2503a74bd4a88c54e7c1f", "score": "0.6751814", "text": "public function company()\n\t{\n\t\treturn $this->belongsTo(Models\\Company\\Company::class);\n\t}", "title": "" }, { "docid": "b8c129547f24d7c8fe784e384e0079f7", "score": "0.67434937", "text": "private function getCompany($company_id)\n {\n return DB::table('companies')->where('id', $company_id)->first();\n }", "title": "" }, { "docid": "baa4fdc9be1ee8eab04adf3d17b0d8e9", "score": "0.67314243", "text": "public function company()\n {\n return $this->belongsTo('App\\Modules\\Tenant\\Models\\Company\\Company');\n }", "title": "" }, { "docid": "47a48f5a80d958fa375684b26a6cd86b", "score": "0.66886055", "text": "public function getCompany(): ?string;", "title": "" }, { "docid": "56ccff5c2653885844e1fd9c496432e2", "score": "0.6677212", "text": "public function company() {\n\t\treturn $this->belongsTo(Company::class);\n\t}", "title": "" }, { "docid": "feca966a0d48901dc5fc52f7f09609e0", "score": "0.6665769", "text": "public static function findUserCompany($id)\n {\n return self::find()\n ->from(self::tableName(). ' company')\n ->joinWith('companyUsers company_user')\n ->where(['company.owner_id' => $id])\n ->orWhere(['company_user.user_id' => $id])\n ->one();\n }", "title": "" }, { "docid": "9e880a0a532aea519ee5d83db0d73040", "score": "0.6654946", "text": "public function getCompanyAuthorAttribute()\n {\n $user = $this->author()->with(\"companies\")->first();\n if ($user) {\n return $user->company[0];\n }\n\n return false;\n }", "title": "" }, { "docid": "0ea48ba8d5a809d6efdd7b9814c18129", "score": "0.66327477", "text": "public function getCompanyDetail(Request $request){\n return CompanyDetail::get()->first();\n }", "title": "" }, { "docid": "41d2a8279f8dc7fbfe0622790171eb9d", "score": "0.6605027", "text": "public function company()\n {\n return $this->belongsTo(\\App\\Company::class);\n }", "title": "" }, { "docid": "5f6aae8d6c0b68f04d2342eaddd59ecb", "score": "0.66013575", "text": "public function company()\n {\n return $this->belongsTo('App\\Models\\Company\\Company', 'for_company_id');\n }", "title": "" }, { "docid": "21d3bff48a3076a1262e71f68b769dd4", "score": "0.65843666", "text": "public function chooseCompany()\n {\n Yii::$app->session['companies'] = count($this->companies);\n $relation = CompaniesUsers::find()->where(['company_id' => $this->company_id, 'user_id' => Yii::$app->user->identity->id])->one();\n Yii::$app->company->setCompany($this->company_id);\n Yii::$app->role->setRole($relation->user_role_id);\n return true;\n }", "title": "" }, { "docid": "47573e2d154b2caa8db5c3c19505ee59", "score": "0.6579274", "text": "function companyContact(){\n\t\tinclude '../../config/dbconfig.php';\n\t\t\n\t\t// query to Get Company details\n\t\t$query = \"SELECT telephone_number, fax_number, email, contact_person\n\t\t\t\t FROM \" . $this->table_name . \"\n\t\t\t\t WHERE company_code = ? AND status = 'Active'\";\n\n\t\t// prepare the query\n\t\t$stmt = $conn->prepare($query);\n\t\t // sanitize\n\t\t$this->company_code=htmlspecialchars(strip_tags($_POST['company_code']));\n\t\t// bind given Company Code value\n\t\t$stmt->bindParam(1, $this->company_code);\n\t\t// execute the query\n\t\t$stmt->execute();\n\t\t// get number of rows\n\t\t$num = $stmt->rowCount();\n\t\t// if Company exists,\n\t\tif($num>0){\n\t\t\t\t// get record details / values\n\t\t\t\t$row = $stmt->fetchAll(PDO::FETCH_CLASS, 'Company');\n\t\t\t\t// return object\n\t\t\t\treturn $row;\n\t\t}\n\t}", "title": "" }, { "docid": "0fe56f3ca9abde9b0a9f364d62566528", "score": "0.6562238", "text": "public function getCompany( $company )\r\n {\r\n $conds = array( \"company\" => $company );\r\n $results = $GLOBALS['JBLDB'] -> select( $this -> table, $this -> allowed, $conds );\r\n if ( $GLOBALS['JBLDB'] -> affectedRows() > 0 ) {\r\n $users = array();\r\n while ( $user = $GLOBALS['JBLDB'] -> fetchAssoc( $results )) {\r\n $users['status'] = \"success\";\r\n $users[] = $user;\r\n }\r\n\r\n return $users;\r\n } else{\r\n return array( \r\n \"status\" => \"fail\", \r\n \"error\" => $GLOBALS['JBLDB'] -> error() \r\n );\r\n }\r\n }", "title": "" }, { "docid": "0b7a9d2d2e56c1d3537d475443d7f496", "score": "0.6559104", "text": "public function GetCompany()\n {\n \t$this->SetCulture();\n \t\n \t$rs = mysql_query(\"SELECT * FROM companies WHERE company_id=\" . $this->company_id);\n \t\n \t$row = mysql_fetch_array($rs);\n \n \t$this->company_id \t\t= $row['company_id'];\n \t$this->grouping_id\t\t\t\t= $row['grouping_id'];\n \t$this->language_id \t\t= $row['language_id'];\n \t$this->company_logo \t= $row['company_logo'];\n \t$this->company_name \t\t= $row[$this->lang_name_field];\n \t$this->company_ressource_person = $row['company_ressource_person'];\n \t$this->company_email_general = $row['company_email_general'];\n \t$this->company_email_sales = $row['company_email_sales'];\n \t$this->company_description \t= $row[$this->lang_desc_field];\n \t$this->created_by_id \t\t= $row['created_by_id'];\n \t$this->created_date \t\t= $row['created_date'];\n \t$this->modified_by_id \t\t= $row['modified_by_id'];\n \t$this->modified_date \t\t= $row['modified_date'];\n \t \n \tif (mysql_errno())\n \t{\n \t\treturn \"MySQL error \".mysql_errno().\": \".mysql_error().\"\\n<br>When executing:<br>\\n$rs\\n<br>\";\n \t}\n }", "title": "" }, { "docid": "f2617c2228fed7c02d8734f098f24f17", "score": "0.6556396", "text": "public function company()\n {\n return $this->belongsTo('App\\Models\\Company');\n }", "title": "" }, { "docid": "3fd1367ed579315269a36eeb19c7b47b", "score": "0.65539324", "text": "public function company(){\n return $this->hasOne(ClientCompany::class, 'id', 'id');\n }", "title": "" }, { "docid": "be6335771fade6a0d99f19342bb72cd5", "score": "0.6538655", "text": "public function model()\n {\n return Company::class;\n }", "title": "" }, { "docid": "be6335771fade6a0d99f19342bb72cd5", "score": "0.6538655", "text": "public function model()\n {\n return Company::class;\n }", "title": "" }, { "docid": "15b89d455d3e71410e8aedc70c5c39df", "score": "0.6528295", "text": "public function show(Company $company)\n {\n if(\\Auth::user()->can('View Company'))\n {\n $contact_ids = ContactCompany::where('created_by', '=', \\Auth::user()->creatorId())->where('company_id','=',$company->id)->get()->pluck('contact_id')->toArray();\n $contacts = Contact::where('created_by', '=', \\Auth::user()->creatorId())->whereNotIn('id',$contact_ids)->pluck('name','id');\n $contacts->prepend(__('Please Select'),0);\n $emails = Email::where('created_by', '=', \\Auth::user()->creatorId())->where('module_type','LIKE','company')->get();\n $logactivities = LogActivity::where('created_by', '=', \\Auth::user()->creatorId())->where('module_type','LIKE','company')->get();\n $notes = Note::where('created_by', '=', \\Auth::user()->creatorId())->where('module_type','LIKE','company')->get();\n $schedules = Schedule::where('created_by', '=', \\Auth::user()->creatorId())->where('module_type','LIKE','company')->get();\n $tasks = Task::where('created_by', '=', \\Auth::user()->creatorId())->where('module_type','LIKE','company')->get();\n return view('crm.company.view', compact('company','contacts','emails','logactivities','notes','schedules','tasks'));\n }\n else\n {\n return redirect()->back()->with('errors', __('Permission denied.'));\n }\n }", "title": "" }, { "docid": "2ebce2430f819ac06ee71f3098ce8735", "score": "0.650319", "text": "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "2ebce2430f819ac06ee71f3098ce8735", "score": "0.650319", "text": "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "2ebce2430f819ac06ee71f3098ce8735", "score": "0.650319", "text": "public function company()\n {\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "754cb2365008fc481308482109fc08e9", "score": "0.6501852", "text": "public function company() \n {\n return $this->belongsTo('App\\Companies');\n }", "title": "" }, { "docid": "78d954cb32d34efc279c58066018ea97", "score": "0.64656395", "text": "function company()\n\t{\n\t\treturn $this->belongsTo('Company');\n\t}", "title": "" }, { "docid": "7f29bd013be4d9c4175de682ca12ede5", "score": "0.6464869", "text": "function GetCompany($id,$ret_type = \"rows\") {\n\n\t\tif (DEBUG) Logger::Msg(get_class($this).\"::\".__FUNCTION__.\"()\");\n\t\t\n\t\tif (!is_numeric($id)) return false;\n\t\t\n\t\tglobal $_CONFIG;\n\n\t\t$sql = \"SELECT \n\t\t\t\t\tc.*,\n\t\t\t\t\tc.job_credits as pquota,\n\t\t\t\t\tCASE\n\t\t\t\t\t\tWHEN (select 1 from euser u where u.company_id = c.id limit 1)=1 THEN 1\n\t\t\t\t\t\tELSE 0\n\t\t\t\t\tEND as user_act_exists\n\t\t\t\tFROM \".$_CONFIG['company_table'].\" c \n\t\t\t\tWHERE c.id = \".$id.\" \n\t\t\t\tORDER BY c.title asc;\";\n\t\t\n\t\t$this->db->query($sql);\n\t\tif ($ret_type == \"rows\") {\n\t\t\treturn $aCompany = $this->db->getRows();\n\t\t} elseif ($ret_type == \"objects\") {\n\t\t\treturn $aCompany = $this->db->getObjects();\n\t\t}\n\t}", "title": "" }, { "docid": "06e39b7d1c60a9c9be191c19b198b66e", "score": "0.64604014", "text": "public function company(){\n\t\treturn $this->belongsTo(Company::class);\n\t}", "title": "" }, { "docid": "ac3fa6716c5c2b7c8b9ccfb773aed188", "score": "0.6455371", "text": "public function getCompanyByName($company){\n $this->db->where(\"companyName\", $company);\n $query=$this->db->get('Company');\n $result=$query->row();\n return $result;\n }", "title": "" }, { "docid": "488c15140542c1004b0c875c7788c584", "score": "0.6451983", "text": "public function company()\n {\n return $this->belongsTo(\\App\\Models\\Animals\\Companies\\Company::class, 'company_id');\n }", "title": "" }, { "docid": "c9228f405ef193ac709daa2320c1b1d3", "score": "0.6450544", "text": "public static function findCompanyByUserId($id) {\n\n $sql = \"#\tSelect and return company id from location table\n SELECT\tcompany_id, location.name, address\n FROM\tlocation, users, manager\n WHERE\tusers.id = manager.users_id\n\t AND\tusers_id = '$id'\n\t AND\tlocation.id\t= manager.location_id;\";\n\n $data = self::query($sql);\n\n foreach( $data as $row ) {\n\n //$company = new Company($row['id'], $row['company_name'], $row['address'], $row['phone'], $row['fax'], $row['email'], $row['website'], $row['description']);\n\n return self::findCompanyById($row['company_id']);\n }\n\n return null;\n }", "title": "" }, { "docid": "f4051398b9d0c6191aed411d91ce3f3c", "score": "0.6443535", "text": "public function getCompanyAccount()\n {\n return $this->hasOne(FileInfo::className(), ['id' => 'company_account_id']);\n }", "title": "" }, { "docid": "afc6f2695b3709dee8aa0a95b3fe5fab", "score": "0.6435369", "text": "public function felCompany()\n {\n $hashid = new Hashids(config('ninja.hash_salt'), 10);\n\n $company_id_decode = $hashid->decode($this->company_id)[0];\n $accountDetails = AccountPrepagoBags::where('company_id', $company_id_decode)->first();\n return $accountDetails;\n }", "title": "" }, { "docid": "276fdabf0bc356c4e49f77963580af60", "score": "0.6434806", "text": "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "title": "" }, { "docid": "276fdabf0bc356c4e49f77963580af60", "score": "0.6434806", "text": "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "title": "" }, { "docid": "276fdabf0bc356c4e49f77963580af60", "score": "0.6434806", "text": "public function company()\n {\n return $this->belongsTo('App\\Company');\n }", "title": "" }, { "docid": "353a20d18dcad9d4a6a9d17d934893c3", "score": "0.6433286", "text": "public function getLoggedInUserCompanyName(){\r\n\t\t$companyName = \"\";\r\n\t\t$companyId = $this->companyUser->getCurrentCompanyId();\r\n $companyName = $this->companyFactory->create()->load($companyId)->getData('company_name');\r\n\t\treturn $companyName;\r\n\t}", "title": "" }, { "docid": "0edd4ee904176a7748032228fdf08600", "score": "0.64256364", "text": "public function getCompany(): string\n {\n return $this->company;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.6424608", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.6424608", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "799a01bf4dc6192f93f2791c4e84f32a", "score": "0.6423792", "text": "public function has_company()\n {\n $hasCompany = Company::where('user_id', auth()->id())->first();\n\n if($hasCompany) {\n return true;\n }else {\n return false;\n }\n\n }", "title": "" }, { "docid": "f88482a551d13ef8eb904704e162f309", "score": "0.6389639", "text": "public function company()\n {\n return $this->belongsTo('App\\Models\\Company','company_id','id');\n }", "title": "" }, { "docid": "373d0e0380600e2601dbe61bd9355015", "score": "0.6388257", "text": "public function getOwnerCompany() : ?array\n {\n $companyId = Company::getCompanyIdBySubdomain();\n $res = [];\n\n if ($companyId == 'main' ) {\n $modelContact = Contacts::find()->select([\n 'id', \n 'first_name', \n 'last_name'\n ])->asArray()->all();\n } else { \n $modelContact = Contacts::find()->select([\n 'id', \n 'first_name', \n 'last_name'\n ])->where([\n 'company_id' => $companyId\n ])->asArray()->all();\n }\n\n foreach($modelContact as $value) {\n $res[$value['id']] = \"{$value['first_name']} {$value['last_name']}\";\n }\n\n return $res;\n }", "title": "" }, { "docid": "8eaed683d7dc80ecf84c0cbec28df27c", "score": "0.637626", "text": "public function getInsuranceCompany()\n {\n return $this->hasOne(InsuranceCompany::className(), ['id' => 'insuranceCompanyId']);\n }", "title": "" }, { "docid": "1e5a1ff7cf39aed492a677f7354cb70b", "score": "0.63746136", "text": "function companyInfo(){\n\t\tinclude '../../config/dbconfig.php';\n\t\t\n\t\t// query to Get Company details\n\t\t$query = \"SELECT company_name, address\n\t\t\t\t FROM \" . $this->table_name . \"\n\t\t\t\t WHERE company_code = ? AND status = 'Active'\";\n\n\t\t// prepare the query\n\t\t$stmt = $conn->prepare($query);\n\t\t // sanitize\n\t\t$this->company_code=htmlspecialchars(strip_tags($_POST['company_code']));\n\t\t// bind given Company Code value\n\t\t$stmt->bindParam(1, $this->company_code);\n\t\t// execute the query\n\t\t$stmt->execute();\n\t\t// get number of rows\n\t\t$num = $stmt->rowCount();\n\t\t// if Company exists,\n\t\tif($num>0){\n\t\t\t\t// get record details / values\n\t\t\t\t$row = $stmt->fetchAll(PDO::FETCH_CLASS, 'Company');\n\t\t\t\t// return object\n\t\t\t\treturn $row;\n\t\t}\n\t}", "title": "" }, { "docid": "3e0533819f8b3fa43b47b934a0aaa65f", "score": "0.63730115", "text": "function company()\n\t{\n\t\t// return new RBE_OpenTHC_Company($this->_c);\n\t\t//$r = $this->_c->get('/config/company');\n\t\t//echo $r->getBody()->__toString();\n\t\t//return json_decode($r->getBody(), true);\n\t\treturn new \\OpenTHC\\CRE\\OpenTHC\\Company($this);\n\t}", "title": "" }, { "docid": "a65bcabc9cff0de89b50f57035d176bf", "score": "0.6350651", "text": "public function getCompanyId()\n {\n return $this->companyid;\n }", "title": "" }, { "docid": "8e5c0e566448cefb14d3c96e31bfb19b", "score": "0.6320542", "text": "public function isCompany()\n\t{\n\t\treturn $this->company;\n\t}", "title": "" }, { "docid": "01278f9cb145a90673ba0e89850f8953", "score": "0.6310496", "text": "public function company() {\n return $this->belongsTo('App\\Company'); \n }", "title": "" }, { "docid": "1bb168a3ef6660dddd9428e76f635a60", "score": "0.6309219", "text": "protected function getObject(){\n\t\treturn Company::getInstance();\n\t}", "title": "" }, { "docid": "42df2980dbb04bf00ffeb94495105d9d", "score": "0.6285148", "text": "public function getCompanyAttribute(): string\n {\n $billingAddress = $this->address->where('billing', 1)->first();\n\n // If no phone is set as default, get the first available phone.\n if (empty($billingAddress?->company)) {\n $billingAddress = $this->address->first();\n }\n\n // Return the phone object, or null if no phone is found.\n return $billingAddress?->company ?: 'NC';\n }", "title": "" }, { "docid": "a10808daacfc83df919d6b4177c67fb3", "score": "0.62649095", "text": "public function provider()\n {\n return $this->belongsTo(\\App\\Models\\User::class, 'company_id');\n }", "title": "" }, { "docid": "e4fdd8858b9c510a332dbf89f3a7e86b", "score": "0.626315", "text": "public static function get_domain_company(){\n return self::getCompanyAndDomain();\n }", "title": "" }, { "docid": "1cb241f11c07f2b4ead4f589bb613aa7", "score": "0.6254726", "text": "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "title": "" }, { "docid": "18c7310a65502e8c92daaf4285ab8a88", "score": "0.6242149", "text": "protected function getCompany()\n {\n $subscription = $this->getMock('Domain\\Subscription');\n // We should create a mocked user here, too, but it's easier to create a real one.\n // In my projects I use my own version of Mock Builder. we'll get to it someday\n // (You can also try to take a look at \"mockery\" by Brady)\n $admin = new \\Domain\\User('[email protected]', 'John Smith', '123456', true);\n return new Company('Test Company', $subscription, $admin);\n }", "title": "" }, { "docid": "9f044151468142eed703065431dcf646", "score": "0.6220924", "text": "public function company(){\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "9f044151468142eed703065431dcf646", "score": "0.6220924", "text": "public function company(){\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "9f044151468142eed703065431dcf646", "score": "0.6220924", "text": "public function company(){\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "9f044151468142eed703065431dcf646", "score": "0.6220924", "text": "public function company(){\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "9f044151468142eed703065431dcf646", "score": "0.6220924", "text": "public function company(){\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "62db314cde37967f4a24c348022d918b", "score": "0.6215579", "text": "public function getAdminUser()\n {\n return $this->hasOne(AdminUser::class, ['id' => 'company_id']);\n }", "title": "" }, { "docid": "e562c23327ae6bd7d22bbb0f4113385a", "score": "0.6199096", "text": "public function getDefaultCompany() : ?string;", "title": "" }, { "docid": "54afce30b1a369e5b43426612d5a47ff", "score": "0.6198654", "text": "public static function getCompany($userId = null)\n {\n $company = self::findByOwner($userId);\n if (is_null($company)) {\n $company = self::findByUser($userId);\n if (is_null($company)) {\n $company = self::findByCompanyId($userId);\n if (is_null($company)) {\n throw new NotFoundHttpException(Yii::t('alert', 'COMPANY_NOT_FOUND_BY_USER'));\n }\n }\n }\n\n if (is_null($company->getOwner())) {\n $company->setOwner($company->owner_id);\n }\n $companyDocuments = CompanyDocument::findByCompany($company->id);\n $company->setDocuments($companyDocuments);\n return $company;\n }", "title": "" }, { "docid": "9a64390e7f896abb92b00b9974933103", "score": "0.61819017", "text": "public function getWorkCompany()\n {\n return $this->WorkCompany;\n }", "title": "" }, { "docid": "286c6c0653750b0fb988a03e4fc98ed6", "score": "0.6179612", "text": "public function retrieve_company() {\n $this->db->select('*');\n $this->db->from('company_information');\n $this->db->limit('1');\n $query = $this->db->get();\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return false;\n }", "title": "" }, { "docid": "8b68d3394aa5ef8ee8c9f1c61a307384", "score": "0.6170229", "text": "public function getCompanyName()\n {\n return $this->company_name;\n }", "title": "" }, { "docid": "1367e98afb08383b67cfd331b7b1a82f", "score": "0.6164782", "text": "public function company()\n {\n return Settings::get('company');\n }", "title": "" }, { "docid": "0e1d090036978f03831570e63e657769", "score": "0.6162734", "text": "function companyCode(){\n\t\tinclude '../../config/dbconfig.php';\n\t\t\n\t\t// query to Get Company details\n\t\t$query = \"SELECT company_code, company_name\n\t\t\t\t FROM \" . $this->table_name .\"\n\t\t\t\t WHERE status = 'Active'\";\n\n\t\t// prepare the query\n\t\t$stmt = $conn->prepare($query);\n\t\t// execute the query\n\t\t$stmt->execute();\n\t\t// get number of rows\n\t\t$num = $stmt->rowCount();\n\t\t// if Company exists,\n\t\tif($num>0){\n\t\t\t\t// get record details / values\n\t\t\t\t$row = $stmt->fetchAll(PDO::FETCH_CLASS, 'Company');\n\t\t\t\t// return object\n\t\t\t\treturn $row;\n\t\t}\n\t}", "title": "" }, { "docid": "ce3a366a9b28023420216703c784e1f9", "score": "0.61518985", "text": "public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }", "title": "" }, { "docid": "0c4d11053bb89d3cbf9e2c2f37da8633", "score": "0.6145016", "text": "abstract public function getCompanyInformation();", "title": "" }, { "docid": "79d1b5f10557a7c8b1cb78f89ac87db1", "score": "0.6129019", "text": "function getCompany_get(){\n\n //check for auth\n $this->check_service_auth();\n\n $offset = $this->get('offset'); $limit = $this->get('limit');\n if(empty($offset) || empty($limit)){\n $limit= $this->list_limit; $offset = 0;\n }\n \n $result = $this->Users_model->getComapny($limit, $offset);\n $response = array('status' => SUCCESS, 'company'=>$result); //success msg\n $this->response($response);\n }", "title": "" }, { "docid": "3861f476bac5edb033aada9026a97d0f", "score": "0.61261064", "text": "public function company() : BelongsTo\n {\n return $this->belongsTo(Company::class);\n }", "title": "" } ]
76a04820b09c46ed1b44aa4ca548cc59
Handle the Element "deleted" event.
[ { "docid": "0d7b3a8e5eac7985db7a9ee5962ee737", "score": "0.62912273", "text": "public function deleted(Element $element)\n {\n DB::table('element_property')->where('element_id', $element->id)->delete();\n $element->banner()->delete();\n }", "title": "" } ]
[ { "docid": "8b8fd41ee4d63899fd5fe77ec3c8cbd8", "score": "0.690359", "text": "public function deleted()\n {\n // Delete related images when model is deleted\n $this->deleteImages();\n }", "title": "" }, { "docid": "a2d2db67366c8442110db40086c1b359", "score": "0.6888869", "text": "public function onDelete($event);", "title": "" }, { "docid": "b43cd1068cb2ac7ddc10b276c35db1d2", "score": "0.6784044", "text": "protected function _afterDelete()\r\n\t{}", "title": "" }, { "docid": "f9d0c672c29325f9a820b8582fc5ce87", "score": "0.67667705", "text": "public function on_delete() {}", "title": "" }, { "docid": "80f9e1db120aef7ac41afe4753ea7c70", "score": "0.66859925", "text": "protected function onPostDelete()\n\t{\n\t\t$event = $this->table->getEvent();\n\t\tif ($this->string()->length($event) > 0){\n\t\t\t$event = 'OnPost'.$this->string()->ucwords($event).'Delete';\n\t\t\t$this->fire($event,[$this->id]);\n\t\t}\n\t}", "title": "" }, { "docid": "19b6a6644f19a8f87ed0af62c9505be8", "score": "0.6673476", "text": "public static function deleted($event)\r\n {\r\n // vars\r\n $app = self::app();\r\n $item = $event->getSubject();\r\n $itemType = $item->getType()->id;\r\n\r\n // check index table\r\n $tableName = $app->jbtables->getIndexTable($itemType);\r\n if (!$app->jbtables->isTableExists($tableName)) {\r\n $app->jbtables->createIndexTable($itemType);\r\n }\r\n\r\n // update index data\r\n JBModelSku::model()->removeByItem($item);\r\n JBModelSearchindex::model()->removeById($item);\r\n\r\n // execute item trigger\r\n $jbimageElements = $item->getElements();\r\n foreach ($jbimageElements as $element) {\r\n if (method_exists($element, 'triggerItemDeleted')) {\r\n $element->triggerItemDeleted();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e49e5dfdcf45615989b0d97fc4a7eccf", "score": "0.6643637", "text": "public static function deleted($callback)\n {\n static::registerModelEvent('deleted', $callback);\n }", "title": "" }, { "docid": "f3b6f49688af90434b6519d38445284a", "score": "0.6626353", "text": "public function afterDelete($event)\n {\n $this->emit(\"delete\");\n }", "title": "" }, { "docid": "4c9a200077edcf1e8317bf73b14e3037", "score": "0.6569052", "text": "protected function onAfterDelete()\n\t{\n\t\t$event = $this->table->getEvent();\n\t\tif ($this->string()->length($event) > 0){\n\t\t\t$event = 'OnAfter'.$this->string()->ucwords($event).'Delete';\n\t\t\t$this->fire($event,[$this->id]);\n\t\t}\n\t}", "title": "" }, { "docid": "2132cc06b35076961a1906cd47e7263a", "score": "0.6563362", "text": "public static function deleted($callback): void\n {\n static::registerModelEvent('deleted', $callback);\n }", "title": "" }, { "docid": "0511798f65f254e9cb68585b44335c9f", "score": "0.65562785", "text": "protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t}", "title": "" }, { "docid": "19e7123207d44212d84dff15f2437977", "score": "0.65474826", "text": "function getDeletedEventName() {\n \treturn $this->getEventNamesPrefix() . '_deleted';\n }", "title": "" }, { "docid": "bf91f9e278f288642f4dd424c2659fff", "score": "0.65390813", "text": "protected function onDelete(): Delete\r\n {\r\n }", "title": "" }, { "docid": "0142973e307c902052d472a57530d810", "score": "0.6481565", "text": "public function onAfterDelete() {\n if (\\Config::inst()->get('ElasticSearch', 'disabled')) {\n return;\n }\n \n $stage = \\Versioned::current_stage();\n\t\t$this->service->remove($this->owner, $stage);\n\t}", "title": "" }, { "docid": "c5c5e9020ffdf5cfc37f9b718a6d84d5", "score": "0.6478398", "text": "public function afterDelete() {\n\t\t$this->afterUpdateTree();\n\t\tparent::afterDelete();\n\t}", "title": "" }, { "docid": "5fa4214320424b0004400146b9b2d229", "score": "0.6446213", "text": "public function postDeleted();", "title": "" }, { "docid": "c32a74573167084d7ea1cf6489d0f9e3", "score": "0.6402115", "text": "protected function onBeforeDelete()\n {\n //\n }", "title": "" }, { "docid": "a14995dbd9b696aff050ff9294435ed1", "score": "0.6397923", "text": "public function deleted($tag)\n {\n parent::deleted($tag);\n\n Log::Info(\"Deleted tag\", ['tag' => $tag->id]);\n }", "title": "" }, { "docid": "360c0cad26ec43c262f25903ddea088f", "score": "0.6390587", "text": "public function onEntryDeleted(EntryDeletedEvent $event)\n {\n if (!$this->enabled) {\n $this->logger->debug('DownloadImagesSubscriber: disabled.');\n\n return;\n }\n\n $this->downloadImages->removeImages($event->getEntry()->getId());\n }", "title": "" }, { "docid": "d13f42fe3cd3dfd36f630c55badaec0b", "score": "0.6364389", "text": "public function forceDeleted(Element $element)\n {\n //\n }", "title": "" }, { "docid": "a50217d315184108f90eb059b0b083f5", "score": "0.63579017", "text": "abstract public static function deleted($callback);", "title": "" }, { "docid": "f9d19bbe7ff35d1d484f7e596d22f835", "score": "0.6317185", "text": "public function onPostDelete(StorageEvent $event)\n {\n $id = $event->getId();\n // $contenttype = $event->getContentType();\n $record = $event->getContent();\n }", "title": "" }, { "docid": "190c38ecd800010f9344e5b3a538f84b", "score": "0.6295127", "text": "public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }", "title": "" }, { "docid": "530c8225cd4c1372e7862319e9e23788", "score": "0.6276994", "text": "public function onDelete() {\n /** Check if this is even set **/\n if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {\n /** cycle through each id **/\n foreach ($checkedIds as $objectId) {\n /** Check if there's an object actually related to this id\n * Make sure you replace MODELNAME with your own model you wish to delete from.\n **/\n if (!$object = Brand::find($objectId))\n continue; /** Screw this, next! **/\n /** Valid item, delete it **/\n $object->delete();\n }\n\n }\n /** Return the new contents of the list, so the user will feel as if\n * they actually deleted something\n **/\n return $this->listRefresh();\n }", "title": "" }, { "docid": "46a3e9c4f9736070abeae3ab88458e67", "score": "0.62545663", "text": "public function onDeleted(Model $model): void\n\t{\n\t}", "title": "" }, { "docid": "2d98f5df22e7cb2ddc615ad4e9f9f62c", "score": "0.6244922", "text": "public function deleted(Event $event)\n {\n if ($event->image()->exists()) {\n $this->deleteFiles($event);\n $event->image()->delete();\n }\n }", "title": "" }, { "docid": "d27948e1ecd1b87d842fe3f6178705e7", "score": "0.6241117", "text": "public function afterDelete(): void\n {\n }", "title": "" }, { "docid": "a8391b6d38dae379a73f0d75ee1f4e5d", "score": "0.6175691", "text": "public static function deleted($callback)\n {\n }", "title": "" }, { "docid": "6c4a01763756203cf01d20e9079d880b", "score": "0.61724573", "text": "function afterDelete() \n\t{\n\t\treturn(parent::afterDelete()); \n\t}", "title": "" }, { "docid": "717ae215a1b2e6af3dd9777caf8f63ff", "score": "0.616853", "text": "public function ElementRemoved( $definition ){\r\n\t\t// Store in alias lookup\r\n\t\tif( $definition->alias && isset( $this->alias_lookup->{ $definition->alias } ) ){\r\n\t\t\tunset( $this->alias_lookup->{ $definition->alias } );\r\n\t\t}\r\n\t\tif( property_exists( $this, 'fields' ) ){\r\n\t\t\t$type = explode( ':', $definition->type );\r\n\t\t\tif( $definition->IsField() ){\r\n\t\t\t\tunset( $this->fields[ $definition->name ] );\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Notify parent\r\n\t\tif( $this->parent ){\r\n\t\t\t$this->parent->ElementRemoved( $definition );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "76470ce093e100b275d565ecfd40eefd", "score": "0.6105254", "text": "public function onPreDelete(StorageEvent $event)\n {\n $id = $event->getId();\n // $contenttype = $event->getContentType(); // You don't get this value at the moment on delete events\n $record = $event->getContent();\n }", "title": "" }, { "docid": "d4434fcf16c0012d49127b095b0f699b", "score": "0.6101842", "text": "protected function deleteRelated()\n{\n\t$el = $this->getTemplate()->elements['ondelete'];\n\tif ($el['type'] != 'event') return;\n\n\tforeach ($el['delete_array'] as $relationId) {\n\t\t$found = $this->related($relationId);\n\t\tif ($found) $found->delete();\n\t}\n}", "title": "" }, { "docid": "686f4e537f4cf4b7cdf079651fe64b0a", "score": "0.60768354", "text": "private function onDelete(DataContainer $dc): void\n {\n $this->resetPageAndChildren((int) $dc->id);\n }", "title": "" }, { "docid": "82a82a557f7db83611b5001fb99e9bee", "score": "0.6063802", "text": "public function deleted(Employee $employee)\n {\n event(new EmployeeUpdated($employee, \"delete\"));\n }", "title": "" }, { "docid": "307cf7de5ba7dba3ff4391a9d6030003", "score": "0.60637826", "text": "public function onDeleted()\n {\n if (empty($this->shouldTraceOnDeletion)) {\n return false;\n }\n\n if ((!isset($this->shouldTrace) || $this->shouldTrace)) {\n $this->createPaperTrails(true);\n }\n\n return;\n }", "title": "" }, { "docid": "a7b7b395453ee052a7303f493b393c12", "score": "0.6063314", "text": "public static function deleted($event, $args = array()){\n\n\t\t$id = $event['order_id'];\n\t\tif(!$id){\n\t\t\treturn;\n\t\t}\n\n\t\t$app = App::getInstance('zoo');\n\n\t\t// Cleaning up related orderhistories:\n\t\t$app->zoocart->table->orderhistories->removeByOrder($id);\n\n\t\t// Cleaning up orderitems:\n\t\t$app->zoocart->table->orderitems->removeByOrder($id);\n\t}", "title": "" }, { "docid": "00a92b43ed089e0a7e16cc76191c680d", "score": "0.6061322", "text": "public function delete()\n {\n $this->deleted = true;\n }", "title": "" }, { "docid": "6a5d21a1383927b47160d2560196ebc1", "score": "0.60566235", "text": "public function itemDeleted(Item $item)\n\n {\n\n Log::info(\"Item Deleted Event Fire: \".$item);\n\n }", "title": "" }, { "docid": "b4571d5f9d1ddba4061885b3a0aa6d5f", "score": "0.6046273", "text": "private function after_delete($id)\n {\n \n }", "title": "" }, { "docid": "26800600ed83a06a45b188bcd9c56cb0", "score": "0.60438144", "text": "protected function onAfterDelete()\n {\n parent::onAfterDelete();\n $this->updateDependantObjects();\n }", "title": "" }, { "docid": "830989006b2bc20e2256d0a5d0336835", "score": "0.60389", "text": "protected function _beforeDelete()\r\n\t{}", "title": "" }, { "docid": "af6799af8ff0785e0a687bad3861075b", "score": "0.59951603", "text": "public function onAfterDelete() {\n\t\t\\Injector::inst()->get( 'OpenSemanticSearchService' )->removePage( $this->Link() );\n\n\t\treturn parent::onAfterDelete();\n\t}", "title": "" }, { "docid": "d70c418d84543e8d638e0bd18196475e", "score": "0.59893435", "text": "protected function _indexDeleteEvents()\n {\n Mage::dispatchEvent('fvetsdataimport_reindex_products_delete_before');\n Mage::getSingleton('index/indexer')->indexEvents(\n Mage_CatalogInventory_Model_Stock_Item::ENTITY, Mage_Index_Model_Event::TYPE_DELETE\n );\n Mage::getSingleton('index/indexer')->indexEvents(\n Mage_Catalog_Model_Product::ENTITY, Mage_Index_Model_Event::TYPE_DELETE\n );\n Mage::dispatchEvent('fvetsdataimport_reindex_products_delete_after');\n }", "title": "" }, { "docid": "c8cada6a20d9ff769aed71832baa3de8", "score": "0.5986828", "text": "protected function afterDelete()\n {\n parent::afterDelete();\n Comment::model()->deleteAll('photo_id=' . $this->id);\n Tag::model()->updateFrequency($this->tags, '');\n }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "cf4fb8d712396ed57188cfe31b819aa8", "score": "0.5979793", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "85ca9097667b1221f0828b15735147c9", "score": "0.59606326", "text": "public function preDelete($event) {\n\t\tself::fireCategoryDeleted($this);\n\t}", "title": "" }, { "docid": "485b68cbe338b82be86e5883a00f2097", "score": "0.59599215", "text": "public function onObjectDeleteComplete(SkelEvent $event)\n {\n }", "title": "" }, { "docid": "37717708f4c673dae39ad3eb7837cc0f", "score": "0.5956111", "text": "function eventDeleted($cal_id, $event_id){\n\t\t// noop\n\t}", "title": "" }, { "docid": "cedcf706135564cf58f0f3e4a6a1e43b", "score": "0.5941971", "text": "public static function deleting($callback)\n {\n static::registerModelEvent('deleting', $callback);\n }", "title": "" }, { "docid": "ded47282b73edb69d0f8cc88305909e0", "score": "0.5930248", "text": "public function deleted(Message $message)\n {\n //\n }", "title": "" }, { "docid": "b5155df51f6edad84b8c5934aec7a246", "score": "0.59296477", "text": "public function hook_after_delete($id)\n {\n //Your code here\n }", "title": "" }, { "docid": "563f6819a18ccc8362636abcfacb5d85", "score": "0.58978367", "text": "protected function onAfterDelete($result)\n {\n //\n }", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.5896922", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "01785fa14757ce425dc56778e11281b4", "score": "0.5896922", "text": "public function deleted(Post $post)\n {\n //\n }", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.5890522", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "43ff6fbfa5583220b3a083643c13ef25", "score": "0.58893085", "text": "private function processDeletions()\n\t{\n\t\t$deleteExhibitors = Exhibitor::find()->excludeIdentifiers($this->identifiers)->all();\n\t\t/** @var Exhibitor $deleteExhibitor */\n\t\tforeach ($deleteExhibitors as $deleteExhibitor) {\n\t\t\techo \"Deleting Exhibitor Identifier $deleteExhibitor->identifier ... \\n\";\n\t\t\tif ($deleteExhibitor->logo) {\n\t\t\t\tif (file_exists(CRAFT_BASE_PATH . '/web/' . $deleteExhibitor->logo)) {\n\t\t\t\t\tunlink(CRAFT_BASE_PATH . '/web/' . $deleteExhibitor->logo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCraft::$app->elements->deleteElement($deleteExhibitor);\n\t\t}\n\t}", "title": "" }, { "docid": "87b55a63b0ba8464357e1406a9a5ca31", "score": "0.5884911", "text": "public function deleted(Order $order)\n {\n //\n }", "title": "" }, { "docid": "87b55a63b0ba8464357e1406a9a5ca31", "score": "0.5884911", "text": "public function deleted(Order $order)\n {\n //\n }", "title": "" }, { "docid": "4b25fd16f98753341a19832a0ad3918b", "score": "0.58751166", "text": "public function hook_after_delete($id) {\n\t //Your code here\n\n\t\t}", "title": "" }, { "docid": "88696861d2434f39ac2283183aed56df", "score": "0.58673435", "text": "public function onDeleted($event, $model)\n {\n if (!$this->isEncodable($model)) {\n return;\n }\n\n $model->deleteEncodings();\n }", "title": "" }, { "docid": "00a6f0bb835088d80c630843b06addec", "score": "0.5863498", "text": "protected static function getOnValueDeletedEventName(): string\n\t{\n\t\treturn 'OnSaleShipmentPropertyValueDeleted';\n\t}", "title": "" }, { "docid": "b0e81ff2c25f4a2c5566eb27326cdad1", "score": "0.5852683", "text": "public function _onDelete($id, $item)\n {\n // By default this method is empty, it should be overwritten by inheriting class\n }", "title": "" }, { "docid": "67e5bd5a5927f066c872ac0d72eadf0b", "score": "0.58384055", "text": "protected final function _threadListItemDeleted()\r\n {\r\n }", "title": "" }, { "docid": "892671a03da538f9b6ca81cc6b32b20f", "score": "0.5835173", "text": "function eu4all_mr_adaptable_deleted_handler($eventdata){\n\tif(isset($eventdata->previousAdaptableRelations)):\n\t\tforeach($eventdata->previousAdaptableRelations as $alternative):\n\t\t\tif(EU4ALL_MetadataRepository::deleteMD($alternative->resource_id)){\n\t\t\t\t// error_log(\"resource {$alternative->resource_id} deleted\");\n\t\t\t}else{\n\t\t\t\t// error_log(\"resource {$alternative->resource_id} not deleted\");\n\t\t\t}\n\t\tendforeach;\n\tendif;\n\t\n\treturn true;\n}", "title": "" }, { "docid": "a9762cdf32b7feb0a2214f556262f99a", "score": "0.58308816", "text": "protected function deleted($id)\n {\n }", "title": "" }, { "docid": "33c90954f39786e22bb4b1c0b4c8904e", "score": "0.5830258", "text": "public function markEntityAsDeleted();", "title": "" }, { "docid": "180c5b11e72492c2364e5b3cb2298f9b", "score": "0.5816246", "text": "protected function afterDelete()\n {\n parent::afterDelete();\n Comment::model()->deleteAll('album_id=' . $this->id);\n Tag::model()->updateFrequency($this->tags, '');\n }", "title": "" }, { "docid": "84356ecdf6f23e44bc953409ada7f922", "score": "0.58154416", "text": "public function deleted(Article $article)\n {\n //\n }", "title": "" }, { "docid": "2f79a4533af0ba1cdeac847961825b29", "score": "0.5811231", "text": "public static function deleting($callback): void\n {\n static::registerModelEvent('deleting', $callback);\n }", "title": "" }, { "docid": "0f241da6eaa5f28c6155324b67904aea", "score": "0.58065546", "text": "protected function onBeforeDelete() {\n\t\tif($this->FieldValues()) {\n\t\t\tforeach($this->FieldValues() as $value) {\n\t\t\t\t$value->delete();\n\t\t\t}\n\t\t}\n\t\tparent::onBeforeDelete();\n\t}", "title": "" }, { "docid": "73cbc59c22b49045be75fdf10723d2bd", "score": "0.5789669", "text": "public static function onDelete($callback)\n {\n /** @var \\Illuminate\\Database\\Eloquent\\Builder $instance */\n $instance->onDelete($callback);\n }", "title": "" }, { "docid": "68ad7c3ff58daae46edb1e1fba5a7a7a", "score": "0.5780711", "text": "public function delete()\n {\n \t$this->setDeleted(true);\n }", "title": "" }, { "docid": "f2fb2b3e85cc4faf7b4842fa8056c710", "score": "0.57687855", "text": "public function do_delete()\r\n\t{\r\n\t\t$this->model->delete();\r\n\t\t\r\n\t\t/**\r\n\t\t * Redirect unless the request came from a lightbox\r\n\t\t */\r\n\t\tif(ROCKETS_Request::get(self::KEY_LAYOUT) != self::LAYOUT_AJAX) {\r\n\t\t\tROCKETS_HTTP::redirect($_SERVER['HTTP_REFERER']);\r\n\t\t}\r\n\r\n\t\techo json_encode(array(\r\n\t\t\t'result' => 'success',\r\n\t\t\t'message' => \"Deleted\"\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "b2a157d7807948e33d1fa5ceb6eab414", "score": "0.57665044", "text": "public function onBeforeDelete()\n {\n if ($this->Fields()->exists()) {\n $this->Fields()->removeAll();\n }\n\n parent::onBeforeDelete();\n }", "title": "" }, { "docid": "4ae27958ac00af06f7470b53df8d9bd2", "score": "0.5752131", "text": "public function beforeDelete($event)\n {\n\t\tEntityGallery::model()->deleteAll(array(\n\t\t\t'condition' => 'entity_id=:e_id AND entity_type=:e_type',\n\t\t\t'params'=>array(':e_id'=>$this->getOwner()->id, ':e_type'=>$this->_entityName),\n\t\t));\n parent::beforeDelete($event);\n }", "title": "" }, { "docid": "cc2c375b50004ae2e2149c6b206c8cfa", "score": "0.57325244", "text": "public function onDeleteDoi(EntityEvent $event)\n {\n $dataset = $event->getEntity();\n $doi = $dataset->getDoi();\n if ($doi) {\n $doiMessage = new DoiMessage((string) $doi->getDoi(), DoiMessage::DELETE_ACTION);\n $this->messageBus->dispatch($doiMessage);\n }\n }", "title": "" }, { "docid": "87a7e48eedab9d148014203121582604", "score": "0.57281256", "text": "public function onContentAfterDelete($context, $data)\r\n {\r\n\r\n if($context == 'com_songbook.song') {\r\n // Create a new query object.\r\n $db = JFactory::getDbo();\r\n $query = $db->getQuery(true);\r\n\r\n //Delete all the rows linked to the item id. \r\n $query->delete('#__songbook_song_tag_map')\r\n\t ->where('song_id='.(int)$data->id);\r\n $db->setQuery($query);\r\n $db->execute();\r\n\r\n return;\r\n }\r\n elseif($context == 'com_tags.tag') {\r\n $db = JFactory::getDbo();\r\n $query = $db->getQuery(true);\r\n\r\n //Delete all the rows linked to the item id. \r\n $query->delete('#__songbook_song_tag_map')\r\n\t ->where('tag_id='.(int)$data->id);\r\n $db->setQuery($query);\r\n $db->execute();\r\n\r\n return;\r\n }\r\n else { //Hand over to Joomla.\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "d0973a89bb494bc0beb65c93b37e6c90", "score": "0.5727791", "text": "public function hook_before_delete($id) {\n\t //Your code here\n\n\t }", "title": "" }, { "docid": "a20c617e93d83b79b164367550e56388", "score": "0.5724313", "text": "public function delete()\n\t{\n\t\tEvent::run($this->object_name.'.delete', $this);\n\t\treturn parent::delete();\n\t}", "title": "" }, { "docid": "818d4e70763a9c60871205f6c375be99", "score": "0.5722803", "text": "public function deleting($tag)\n {\n parent::deleting($tag);\n\n Log::Debug(\"Deleting tag\", ['tag' => $tag->id]);\n }", "title": "" }, { "docid": "ecac4db63bd328bbb5f9371083a373fd", "score": "0.5718493", "text": "public function onContentAfterDelete($context, $article)\n\t{\n\t\t$dispatcher\t= JEventDispatcher::getInstance();\n\t\tJPluginHelper::importPlugin('finder');\n\n\t\t// Trigger the onFinderAfterDelete event.\n\t\t$dispatcher->trigger('onFinderAfterDelete', array($context, $article));\n\t}", "title": "" }, { "docid": "fe671f4d59bb163831e1da183f770e0d", "score": "0.5709468", "text": "function on_delete_handler()\n{\n\tglobal $g_obj_course_manager;\n\t\n\t$arr_course_list = PageHandler::get_post_value( 'CourseId' );\n\t\n\tif ( $arr_course_list == null )\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, \"Please select at least one course\" );\n\t\treturn;\t\n\t}\n\t\n\t$arr_success = array();\n\t$arr_fail = array();\n\t\n\tforeach( $arr_course_list as $int_course_id )\n\t{\n\t\tif ( $g_obj_course_manager->delete_course( $int_course_id ) )\n\t\t{\n\t\t\tarray_push( $arr_success, $int_course_id );\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tarray_push( $arr_fail, $int_course_id );\n\t\t}\n\t}\n\t\n\tif ( count( $arr_success ) != 0 )\n\t{\n\t\tMessageHandler::add_message( MSG_SUCCESS, 'Successfully deleted ' . count( $arr_success ) . ' course(s)' );\n\t}\n\t\n\tif ( count( $arr_fail ) != 0 )\n\t{\n\t\tMessageHandler::add_message( MSG_FAIL, 'Failed to delete ' . count( $arr_fail ) . ' course(s)' );\n\t}\n}", "title": "" }, { "docid": "d61e517841ca08336125e414cf10033e", "score": "0.56940347", "text": "public function deleted(Employee $employee)\n {\n //\n }", "title": "" }, { "docid": "502c43ad26f8ea565a5ecdd670c8174a", "score": "0.56873536", "text": "public function deleted(File $model)\n {\n //\n }", "title": "" }, { "docid": "02e931ef5b1497be72af9c8c73525bfd", "score": "0.56798977", "text": "public function isDeleted();", "title": "" }, { "docid": "6dcf34c42f1e4f82c4a101ef51cc21ca", "score": "0.5678589", "text": "public function onDelete()\n {\n Activity::insert(array(\n 'actor_id' => Auth::user()->id,\n 'trackable_type' => get_class($this),\n 'trackable_id' => $this->id,\n 'action' => 'deleted',\n 'details' => $this->toJson(),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime(),\n ));\n }", "title": "" }, { "docid": "0a30d4f55ffb5fa457550d390f2e3f0b", "score": "0.56769174", "text": "public function deleted(DeviceLog $device_log)\n {\n //\n }", "title": "" }, { "docid": "3f24e47412d0a371b6bbbf22241148c5", "score": "0.5673956", "text": "public function onDelete(DataContainer $dc)\n {\n if (!$dc->activeRecord->field_name) {\n return;\n }\n\n Controller::loadDataContainer($this->strTable, true);\n\n unset($GLOBALS['TL_DCA'][$this->strTable]['fields'][$dc->activeRecord->field_name]);\n unset($GLOBALS['TL_DCA'][$this->strTable]['config']['sql']['keys'][$dc->activeRecord->field_name]);\n\n $this->dumpCacheFile();\n }", "title": "" }, { "docid": "6abf43435c2efbf47ac07e5ae6cb1b38", "score": "0.5669347", "text": "public function hook_before_delete($id)\n {\n //Your code here\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "5144350e0290668ba473dad548fd33c9", "score": "0.0", "text": "public function run()\n {\n Service::create([\n 'name'=>\"Plumbing Services\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'plumbing.jpg',\n\n\n ]);\n Service::create([\n 'name'=>\"Baby Care Services\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'baby2.png',\n \n\n ]);\n\n Service::create([\n 'name'=>\"Cleaning Services\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'cleaning.jpg',\n \n\n ]);\n\n Service::create([\n 'name'=>\"Home Repair Services\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'repairs.jpg',\n \n\n ]);\n\n Service::create([\n 'name'=>\"Electrical Services\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'electrical.jpg',\n \n\n ]);\n\n Service::create([\n 'name'=>\"Home wifi Installation\",\n 'description'=>\"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen boo\",\n 'image'=>'wifi.png',\n \n\n ]);\n }", "title": "" } ]
[ { "docid": "5276fa926c7c0e25eef6eaa079aab740", "score": "0.80336106", "text": "public function run()\n\t{\n\t\t// $this->call('UsersTableSeeder');\n\n\t\t// Truncamos los datos de los modelos y insertamos de nuevo en cada seed\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tEstudiante::truncate();\n\t\tCurso::truncate();\n\t\tProfesor::truncate();\n\t\tDB::table('curso_estudiante')->truncate();\n\n\t\tfactory(Profesor::class, 50)->create();\n\t\tfactory(App\\Profesor::class)->create([\n 'nombre' => 'Heisenberg',\n 'email' => '[email protected]',\n 'password' => password_hash('pass', PASSWORD_BCRYPT)\n ]);\n\t\tfactory(Estudiante::class, 500)->create();\n\n\t\tfactory(Curso::class, 40)\n\t\t\t->create()\n\t\t\t->each(function($curso){\n\t\t\t\t$curso\n\t\t\t\t\t->estudiantes()\n\t\t\t\t\t->attach( array_rand(range(1, 500), 40) );\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "0269eae890ef3ba6d0757e56d65e0856", "score": "0.8006653", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(App\\Category::class, 25)->create();\n foreach ($categories as $category) {\n $products = factory(App\\Product::class, random_int(1, 50))->create(['category_id' => $category->id]);\n foreach ($products as $product) {\n factory(App\\Variant::class, random_int(0, 50))->create(['product_id' => $product->id]);\n }\n }\n }", "title": "" }, { "docid": "8aa803bb2ba2d917839552e0913e299d", "score": "0.8006092", "text": "public function run()\n {\n\n $faker = Faker::create();\n\n foreach (range(1,100) as $index) {\n \tApp\\Model\\Author::create([\n \t\t'name' => $faker->name,\n \t]);\n }\n\n \tforeach (range(1,100) as $index) {\n \tApp\\Model\\Publisher::create([\n \t\t'name' => $faker->company,\n \t]);\n }\n\n $authors = Author::where('id', '>', 0)->pluck('id')->toArray();\n $publishers = Publisher::where('id', '>', 0)->pluck('id')->toArray();\n\n foreach (range(1,100) as $index) {\n \t\t\tApp\\Model\\Book::create([\n \t\t'ISBN' => $faker->ean13,\n \t\t'title' => $faker->name,\n \t\t'date' => $faker->date,\n \t\t'author_id' => $faker->randomElement($authors),\n \t\t\t'publisher_id' => $faker->randomElement($publishers), \t\t\n \t]);\n }\n }", "title": "" }, { "docid": "e039b35d9c938323e41faa91de018499", "score": "0.8004318", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Harry Potter',\n 'cover'=> 'http://bookriotcom.c.presscdn.com/wp-content/uploads/2014/08/HP_pb_new_1.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Kamasutra',\n 'cover'=> 'https://img1.od-cdn.com/ImageType-400/3363-1/AB1/79E/D3/%7BAB179ED3-D42C-4135-9102-875ABA350C0E%7DImg400.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'THUG kitchen',\n ]);\n\n Author::create([\n 'name'=> 'Testing Author',\n 'year_of_birth'=> '1972',\n ]);\n\n User::create([\n 'name'=>'Matej',\n 'email'=>'[email protected]',\n 'password'=> '$2y$10$ApgqGBJE9dnxIyqa/Csb0.UntecIvpr08K78KvMEN497F25wde1D2'\n ]);\n }", "title": "" }, { "docid": "c84c48444e4e3992123a987e00590d97", "score": "0.7986598", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'is_admin' => true,\n 'status' => true,\n 'reputation'=> '100'\n ]);\n\n User::create([\n 'name' => 'Demo User',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'is_admin' => false,\n 'status' => true,\n 'reputation'=> '10'\n ]);\n\n factory(App\\Model\\Question::class, 100)->create();\n factory(App\\Model\\Answer::class, 250)->create();\n factory(App\\Model\\Tag::class, 50)->create();\n factory(App\\Model\\Comment::class, 50)->create();\n }", "title": "" }, { "docid": "09eb34b0e1c7c9b0454596554413da5b", "score": "0.79473233", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n $faker = Faker::create('lt_LT'); //statinis metodas\n $authors=10;\n $publishers=10;\n\n foreach(range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName()\n ]);\n }\n\n foreach(range(1, $publishers) as $_) {\n DB::table('publishers')->insert([\n 'title' => $faker->company(),\n ]);\n }\n\n foreach(range(1, 100) as $_) {\n DB::table('books')->insert([\n 'title' => str_replace(['.', '\"', \"'\", ')', '(' ], '', $faker->realText(rand(10, 30))),\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(22, 550),\n 'about' => $faker->realText(500, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n\n }", "title": "" }, { "docid": "99b2d608440f609ad0ec4b7fe078bfbe", "score": "0.79405814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class, 5)->create();\n DB::table('articles')->insert([\n 'name' => 'Ami N.O.',\n 'description' => 'BCAA for enhanced working out',\n 'provider' => 'Optimum Nutrition',\n 'rating' => 4.2,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Quadra Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Combat Whey',\n 'description' => 'Whey Protein for muscle building',\n 'provider' => 'MusclePharm',\n 'rating' => 4.3,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Amino Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n }", "title": "" }, { "docid": "b353a26c6a30fe5cf356c5d5581c8672", "score": "0.7884727", "text": "public function run()\n {\n //$this->call(UserSeeder::class);\n DB::table('users')->insert([\n 'name' => \"teste\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('123456'),\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"ativo\",\n 'states_id' => 1,\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"baixado\",\n 'states_id' => 2,\n ]);\n\n DB::table('produtos')->insert([\n\n 'states_id'=>1,\n 'nome'=> \"teste\",\n 'sku'=> 43,\n 'quantidade'=> 200,\n 'descricao'=>\"testando\"\n ]);\n \n DB::table('produtos')->insert([\n 'states_id'=>2,\n 'nome'=> \"teste2\",\n 'sku'=> 44,\n 'quantidade'=> 400,\n 'descricao'=>\"testando2\"\n ]);\n\n\n }", "title": "" }, { "docid": "be8184a1d867e9407161f68458384472", "score": "0.7878079", "text": "public function run()\n {\n // Truncate our existing records to start from scratch.\n Participant::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Participant::create([\n 'name' => $faker->name,\n 'age' => $faker->numberBetween(1,99),\n 'dob' => now(),\n 'profession' => $faker->randomElement($array = array ('Employed','Student')),\n 'locality' => $faker->city,\n 'no_of_guests' => $faker->numberBetween(0,2),\n 'address' => $faker->address\n ]);\n }\n\n }", "title": "" }, { "docid": "c49c4c393bd62d7155e7274754b4a404", "score": "0.7871859", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Martijn Brands',\n 'email' => '[email protected]',\n 'password' => bcrypt('4&Q5Vhgh6H6+c_=%')\n ]);\n\n \t$faker = Faker\\Factory::create();\n \tfor ($i=0; $i < 10; $i++) {\n\n $title = $faker->sentence;\n\n DB::table('posts')->insert([\n 'title' => $title,\n 'description' => $faker->text($maxNbChars = 600),\n 'color' => $faker->hexcolor,\n 'textColor' => $faker->hexcolor,\n 'slug' => str_slug($title)\n ]);\n }\t\n\t \n }", "title": "" }, { "docid": "58993d8340037bf0991b33dfd6a9f8a3", "score": "0.78693", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($j=0; $j < 10; $j++) { \n for ($i = 1; $i < 6; $i++) {\n Review::create([\n 'score' => $faker->numberBetween(1,5),\n 'buyer_id' => $i,\n 'seller_id' => $i+6,\n 'ad_id' => $faker->numberBetween(0,10),\n ]);\n } \n }\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "5c20ba6fe5501ce36869c85d940b8092", "score": "0.78672695", "text": "public function run()\n {\n $this->call(PackageTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \\App\\Contact::create([\n 'name' => 'Herman Nelissen',\n 'email' => '[email protected]',\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n \\App\\Quote::create([\n 'total_price' => 2300,\n 'students' => 500,\n 'product_id' => 1,\n 'contact_id' => 1,\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n\n }", "title": "" }, { "docid": "1d45ae2c2a40bb81109d9488190d4318", "score": "0.78528047", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\t\t$users = factory(App\\User::class)->times(15)->create();\n $categories = factory(App\\Category::class)->times(10)->create();\n\t\t\t$products = factory(App\\Product::class)->times(30)->create();\n\n foreach ($users as $user){\n if ($user->country == 'Argentina'){\n $user->state='Buenos Aires';\n }\n }\n\n\t\t\tforeach ($products as $oneProduct) {\n\t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n\t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n\t\t\t\t$oneProduct->save();\n\t\t\t}\n }", "title": "" }, { "docid": "9f671912fdabef612f6e0b6f0478edaa", "score": "0.785144", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Question::class, 10)->create()->each(function($q) {\n foreach (range(1,5) as $index) {\n $q->answers()->save(factory(App\\Answer::class)->make());\n }\n foreach (range(1,5) as $index) {\n $q->tags()->save(factory(App\\Tag::class)->make());\n }\n });\n }", "title": "" }, { "docid": "be492c3a599cee49a50ba5a60ed47020", "score": "0.78502", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('secret')\n ]);\n\n factory(\\App\\Category::class, 5)->create(['parent_id' => 0]);\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Post::class,20)->create();\n }", "title": "" }, { "docid": "15513b06c4d4867be88d5dd7093d46be", "score": "0.78430516", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'role' => User::ROLE_ADMIN\n ]);\n \\Factory(User::class, 20)->create();\n \\Factory(Instructor::class, 5)->create();\n \\Factory(Student::class, 10)->create();\n \\Factory(Course::class, 10)->create();\n \\Factory(Content::class, 50)->create();\n \\Factory(Question::class, 10)->create();\n \\Factory(Answer::class, 50)->create();\n\n foreach(Student::all() as $student) {\n $student->courses()->save(Course::all()->random());\n $student->courses()->save(Course::all()->random());\n }\n\n \\Factory(Chat::class, 50)->create();\n }", "title": "" }, { "docid": "ca425680dd8b66e53a9919f358b1bcd1", "score": "0.7839035", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n rutes::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \trutes::create([\n \t\t'idrutes' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutnom' => $faker->sentence($nbWords = 3),\n \t\t'rutcreador' => $faker->name,\n \t\t'rutmida' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutlocals' => $faker->sentences($nb = 3, $asText = false),\n \t\t'rutdescripcio' => $faker->text($maxNbChars = 200),\n \t\t'rutdata' => $faker->date,\n \t\t'rutvaloracio' => $faker->numberBetween($min = 1, $max = 5),\n \t]);\n }\n }", "title": "" }, { "docid": "22dfeb9cc91c700525ce667bb7f0c0b5", "score": "0.78375894", "text": "public function run()\n {\n $this->faker = Faker\\Factory::create();\n $this->emptyDatabase();\n $this->seedContacts();\n $this->seedProjects();\n $this->seedContactProjects();\n }", "title": "" }, { "docid": "7d21aeeff6e058edf6d416a1730ee9a3", "score": "0.7836951", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\tDB::table('authors')->truncate();\n\t\tDB::table('books')->truncate();\n\t\tDB::table('publishers')->truncate();\n\t\tDB::table('book_publisher')->truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\n\t\tfor ($recordNb = 1; $recordNb <= 10; $recordNb++) {\n\t\t\tDB::table('book_publisher')->insert(\n\t\t\t\t[\n\t\t\t\t\t'book_id' => factory(App\\Book::class)->create()->id,\n\t\t\t\t\t'publisher_id' => factory(App\\Publisher::class)->create()->id\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "56e384c87eaa6052b3df9ff5b3142a6b", "score": "0.78343916", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 30) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n DB::table('products')->insert([\n 'user_id' => $index,\n 'brand' => $faker->company,\n 'name' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n DB::table('services')->insert([\n 'user_id' => $index,\n 'title' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n }\n }", "title": "" }, { "docid": "5e32b70fb5531784e31acdad60483f72", "score": "0.7826476", "text": "public function run()\n {\n $user = User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'phone' => '089639385477',\n 'role' => 0,\n 'password' => Hash::make('user')\n ]);\n $categories = Category::all();\n foreach ($categories as $cat) {\n Article::create([\n 'user_id' => $user->id,\n 'category_id' => $cat->id,\n 'title' => Faker\\Provider\\id_ID\\Address::state(),\n 'description' => Faker\\Provider\\Lorem::text(),\n 'image' => Faker\\Provider\\Image::image(public_path('images/'),400,300, null, false)\n ]);\n }\n }", "title": "" }, { "docid": "b64a5f0743ca2bf1f917364cddd2c87d", "score": "0.7822686", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('game_titles')->insert([\n [\n 'title' => \"ApexLegends\",\n ],\n [\n 'title' => \"Bloodborne\",\n ],\n [\n 'title' => \"CallOfDuty\",\n ],\n ]);\n DB::table('sns')->insert([\n [\n 'name' => \"Twitter\",\n 'url' => \"a\",\n 'icon' => \"https://twitter.com/\",\n ],\n [\n 'name' => \"youtube\",\n 'url' => \"a\",\n 'icon' => \"https://YouTube.com/\",\n ],\n [\n 'name' => \"facebook\",\n 'url' => \"a\",\n 'icon' => \"https://facebook.com/\",\n ],\n [\n 'name' => \"instagram\",\n 'url' => \"a\",\n 'icon' => \"https://instagram.com/\",\n ],\n ]);\n }", "title": "" }, { "docid": "b35f7b7df0771d4dd8ac3b5b25b0f9ba", "score": "0.7820086", "text": "public function run()\n {\n // User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $gender = $faker->randomElement(['male', 'female']);\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n User::create([\n 'email' => $faker->email,\n 'password' => Hash::make('password'), //$2a$10$sme1juiwmlQ3l/ccoVOwcu4STJvrmdfb/Sjulpbl1rNvBrC6oLDAK\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName,\n 'age' => $faker->numberBetween(25, 60),\n 'type' => $gender,\n 'phone' => $faker->phoneNumber,\n // 'group_id' => $faker->numberBetween(1, 3)\n ]);\n } \n }", "title": "" }, { "docid": "19f084569c94eacda8d55e19801f815b", "score": "0.78176606", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // 创建一个用户\n $user = factory(User::class)->create([\n 'name' => 'iwanli',\n 'password' => bcrypt('123123')\n ]);\n // 创建四个分类\n factory(Category::class,4)->create()->each(function($category) use ($user){\n // 创建10片文章\n factory(Post::class, 10)->create([\n 'user_id' => $user->id,\n 'category_id' => $category->id,\n ])->each(function($post){\n // 随机创建2-4个标签\n factory(Tag::class, rand(2,4))->create()->each(function($tag) use ($post){\n // 添加文章和标签的关系\n PostTag::create([\n 'post_id' => $post->id,\n 'tag_id' => $tag->id,\n ]);\n });\n });\n });\n }", "title": "" }, { "docid": "48a2b5245515b10dfedf5039d39b4bac", "score": "0.78135824", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ArticleTableSeeder::class);\n /*\n Thêm 1 record vào db\n DB::table('articles')->insert([\n 'title'=>'ABC',\n 'content'=>'laia'\n ]);*/\n }", "title": "" }, { "docid": "365f1b32ad392fb1faece80c6845ee8a", "score": "0.78128964", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n User::create([\n \"username\" => \"usuario\",\n \"name\" => \"usuario\",\n \"email\" => \"[email protected]\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n User::create([\n \"username\" => \"pedro\",\n \"name\" => \"pedro\",\n \"email\" => \"[email protected]\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n\n Subreddit::create([\n \"creator_id\" => 1,\n \"name\" => \"Games\",\n \"description\" => \"A place to talk about videogames\"]);\n\n Subscription::create([\n \"user_id\" => 2,\n \"subreddit_id\" => 1]);\n\n }", "title": "" }, { "docid": "75cb62df6863484c158e7bf137af4153", "score": "0.78091645", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Course::truncate();\n Subject::truncate();\n\n $userQuantity \t\t= 1000;\n $courseQuantity \t= 10;\n $subjectQuantity \t= 200;\n\n factory(User::class, $userQuantity)->create();\n factory(Course::class, $courseQuantity)->create();\n factory(Subject::class, $subjectQuantity)->create()->each(\n \tfunction($subject){\n \t\t$courses = Course::all()->random(mt_rand(1,5))->pluck('id');\n $subject->courses()->attach($courses);\n \n $staff = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->staffs()->attach($staff);\n \n $student = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->students()->attach($student);\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "7f26a02b92952342b834fb9336b7495c", "score": "0.78089064", "text": "public function run()\n {\n Eloquent::unguard();\n\n $truncate = [\n 'users',\n 'products',\n 'reviews',\n ];\n // To remove previous data from database\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($truncate as $table) {\n DB::table($table)->truncate();\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Product::class,50)->create();\n factory(App\\Model\\Review::class,50)->create();\n }", "title": "" }, { "docid": "95e059a4616f6c77fd9ef5fb8646df09", "score": "0.7802594", "text": "public function run()\n {\n $faker = Faker::create('App\\Models\\News');\n\n // Creating 10 dummy news with users in the DB\n for ($i=0; $i < 10; $i++) {\n DB::table('news')->insert([\n 'title'=> $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'content'=> $faker->text($maxNbChars = 200),\n // making new user everytime a new news is made via seeder\n 'user_id'=> User::factory()->create()->id,\n 'updated_at' => now(),\n 'created_at' => now(),\n ]);\n }\n\n }", "title": "" }, { "docid": "7576af445bb78ab6c07c30e0d6047f27", "score": "0.7797416", "text": "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n \\App\\Models\\User::create([\n 'username'=>'admin',\n 'nickname'=>'John Doe',\n 'password'=>\\bcrypt('123456'),\n ]);\n\n \\App\\Models\\Article::factory()->times(5)->create();\n\n \\App\\Models\\Comment::factory()->times(5)->create();\n\n \\App\\Models\\Feedback::factory()->times(5)->create();\n\n \\App\\Models\\Category::create([\n 'name'=>'历史',\n 'parent_id'=>0\n\n ]);\n\n $this->call([\n SettingSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "a9ff49d78b82f3a74d3064b1e540bf86", "score": "0.77962416", "text": "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n // $this->call(ArticleTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n DB::table('articles')->insert([\n 'title' => Str::random(50),\n 'body' => Str::random(50),\n ]);\n\n }", "title": "" }, { "docid": "476cadcd72726378c148f07886c0964c", "score": "0.7794036", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Administrator\n $administrator = factory(\\App\\User::class)->create(['email' => '[email protected]', 'role' => 'ADMINISTRATOR']);\n\n // Customer Model\n $customerUser = factory(\\App\\User::class)->create(['email' => '[email protected]', 'role' => 'CUSTOMER']);\n $customer = factory(\\App\\Customer::class)->create(['user_id' => $customerUser->id]);\n\n // Products\n for ($i=0; $i < 5; $i++) {\n $productCategory = factory(\\App\\ProductCategory::class)->create();\n $product = factory(\\App\\Product::class)->create();\n $product->productCategories()->sync([$productCategory->id]);\n }\n\n // Delivery Fees\n factory(\\App\\DeliveryFee::class)->create(['from' => 0, 'to' => 3, 'fee' => 50]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 3, 'to' => 6, 'fee' => 75]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 6, 'to' => 9, 'fee' => 100]);\n }", "title": "" }, { "docid": "da9353a2cd732b4fd068cbe28b73cbcc", "score": "0.7791073", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(TacticSeeder::class);\n $this->call(UserSeeder::class);\n\n $courses = Course::with('users')->get();\n\n foreach ($courses as $course) {\n $exercises = Exercise::factory()->count(8)->create(['user_id' => $course->user_id]);\n foreach ($exercises as $exercise) {\n $exercise->courses()->attach($course->id);\n $exercise->tactics()->attach(Tactic::all()->random()->id);\n }\n }\n }", "title": "" }, { "docid": "06d0f251e5b64ba99e07b28c19b0f866", "score": "0.7789157", "text": "public function run()\n {\n\n $roles = ['Admin', 'Teacher', 'Student'];\n foreach ($roles as $role) {\n \\App\\Models\\Role::create([\n 'title' => $role\n ]);\n }\n\n $subjects = ['English', 'Math', 'Physics', 'Computer'];\n foreach ($subjects as $subject) {\n \\App\\Models\\Subject::create([\n 'title' => $subject\n ]);\n }\n\n $levels = ['Primary', 'Elementary', 'Secondary', 'High'];\n foreach ($levels as $level) {\n \\App\\Models\\Level::create([\n 'title' => $level\n ]);\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "2e30615d54a3a5cf829c10d31a5c04f7", "score": "0.7787267", "text": "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n factory(App\\Curso::class, 5)->create();\n\n factory(App\\Alumno::class, 10)->create()->each(function(App\\Alumno $alumno){\n //se relaciona un post con un tag\n $alumno->cursos()->attach([\n rand(1,5), //el primer post se relaciona con las primeras cinco etiquetas\n \n \n ]);\n });\n }", "title": "" }, { "docid": "7c8fed78f76fb9e1e482206dd1ea48d5", "score": "0.7786536", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n\t\tDB::table('settings')->insert(\n array('name' => 'College of Engineering ', 'dean' => 'De Vera, Angel V. Jr.')\n );DB::table('sections')->insert(\n array('name' => 'EC-4-1')\n );DB::table('courses')->insert(\n array('name' => 'ECE')\n );DB::table('subjects')->insert(\n array('name' => 'ECE-525a', 'description' => 'industrial electronics')\n );\n }", "title": "" }, { "docid": "dc3f4e5598777e48341bac775cb1fb7f", "score": "0.7785008", "text": "public function run()\n {\n // create an instance of Faker class to the variable $faker\n $faker = Faker::create();\n\n // get all existing user ids into a $users array\n $users = User::all()->pluck('id')->toArray();\n\n // generate 100 records for the animals table\n foreach (range(1,100) as $index){\n DB::table('animals')->insert([\n //'id'=>$faker->randomNumber($nbDigits = 7, $strict = false),\n 'userid' => 5,\n 'name' =>$faker->firstName(),\n 'birth_year' =>$faker->year($max = 'now'),\n 'description'=>$faker->sentence($nbWords = 6, $variableNbWords = true),\n 'type_of_pet'=>$faker->randomElement($array=array('cat','dog','bird',\n 'rabbit', 'horse','ferret',\n 'fish', 'rat/mice',\n 'amphibian','reptile')),\n 'is_available' => 1,\n 'created_at' => now()\n ]);\n }\n }", "title": "" }, { "docid": "6419861cc2705b3341ba36acf9522390", "score": "0.7781964", "text": "public function run()\n {\n Model::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('comments')->truncate();\n\n factory(App\\User::class, 5)->create()->each(function($user){\n factory(App\\Post::class, random_int(1, 5))->create([\n 'post_author' => $user->id\n ]);\n\n factory(App\\Comment::class, random_int(1,5))->create([\n 'comment_author' => $user->id,\n 'post_id' => random_int(1,5)\n ]);\n });\n\n \\App\\User::create([\n 'name' => 'writer',\n 'username' => 'writer',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'remember_token' => str_random(10)\n ])->save();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n Model::reguard();\n }", "title": "" }, { "docid": "c1b6a34aec59e70ff9fc40ff23f7adc0", "score": "0.7775689", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('collection_list')->insert([\n 'name' => 'Sprint 2020',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n DB::table('collection_list')->insert([\n 'name' => 'Balticman Russia 2021',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "78cc789dd6e437818d7cdb71821fa4b4", "score": "0.77756286", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::table('companies')->truncate();\n\t\tDB::table('employees')->truncate();\n\n\t\tfor ($i=0; $i < 100; $i++) {\n\t\t\t$company = Company::create([\n\t\t\t\t'name' => $faker->company,\n\t\t\t\t'business' => $faker->bs\n\t\t\t]);\n\t\t\tfor ($j=0; $j < 50; $j++) {\n\t\t\t\tEmployee::create([\n\t\t\t\t\t'company_id' => $company->id,\n\t\t\t\t\t'name' => $faker->name,\n\t\t\t\t\t'job_title' => $faker->sentence(3),\n\t\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t\t'email' => $faker->email,\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "89ce10a423732bada80a9877f588142e", "score": "0.7766349", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $data_services = [\n \t'image_name' => '1.jpg',\n \t'urlservices' => 'bao-gia-chup-anh-ky-yeu',\n \t'title' => 'CHỤP ẢNH KỶ YẾU',\n \t'content' => 'Chụp ảnh kỷ yếu tại Đà Nẵng và các tỉnh miền trung, cho thuê đầy đủ trang phục chụp ảnh kỷ yếu. Các concept mới lạ và vô cùng hấp dẫn đang chờ..'\n ];\n\n $data_test = [\n 'test3' => 'default',\n ];\n\n // DB::table('services')->insert($data_services);\n DB::table('test3')->insert($data_test);\n }", "title": "" }, { "docid": "927afdf7da13d136851abcd125662bfa", "score": "0.7764117", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // BlogCategories::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n $title = $faker->sentence;\n $slug = Str::slug($title);\n BlogCategories::create([\n 'title' => $title,\n 'slug' => $slug,\n 'published' => $faker->boolean($chanceOfGettingTrue = 50),\n ]);\n }\n }", "title": "" }, { "docid": "19e1efc56559470b618ca6cd001870f9", "score": "0.7762184", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n * $users = factory(App\\User::class, 3)\n ->create()\n ->each(function($u) {\n $u->posts()->save(factory(App\\Post::class)->make());\n });\n */\n\n //$users = factory(\\App\\Entities\\User::class, 49)->create();\n //$categories = factory(\\App\\Entities\\Category::class, 10)->create();\n //$folders = factory(\\App\\Entities\\Folder::class, 150)->create();\n\n $urls = factory(\\App\\Entities\\Url::class, 400)->create()->each(function($u){\n $u->categories()->sync(\\App\\Entities\\Category::all()->random(3));\n $u->folders()->sync(\\App\\Entities\\Category::all()->random(2));\n });\n }", "title": "" }, { "docid": "fb68f54cb7c951e64affa64a0b297782", "score": "0.7761967", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $quantityUser = 1000;\n $quantityCategory = 30;\n $quantityProduct = 1000;\n $quantityTransaction = 1000;\n\n factory(User::class, $quantityUser)->create();\n factory(Category::class, $quantityCategory)->create();\n\n factory(Product::class, $quantityProduct)->create()->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n factory(Transaction::class, $quantityTransaction)->create();\n }", "title": "" }, { "docid": "cd90f857c514e1c773f1be87e5dfa64c", "score": "0.775844", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=0\");\n \\App\\Models\\Movie::truncate();\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=1\");\n\n for ($i = 0; $i < 20; $i++) {\n \\App\\Models\\Movie::create(\n [\n 'title' => ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word),\n 'director' => $faker->name,\n 'description' => $faker->text,\n 'poster_path' => 'images/sample_movie_poster/' . rand(1,10) . '.png',\n 'publish_at' => \\Carbon\\Carbon::now()->subDays(rand(1,10)),\n 'rating' => rand(1,5),\n 'comment_count' => rand(1,100),\n 'like_count' => rand(1,500),\n 'unlike_count' => rand(1,30),\n ]\n );\n }\n }", "title": "" }, { "docid": "3efab65efe8beca35c2f5491dd14f940", "score": "0.77582747", "text": "public function run()\n {\n /*\n $this->call([\n UsersTableSeeder::class,\n ]);\n */\n\n // Test user for authentication\n factory(User::class)->create([\n 'name' => 'Elias Johansson',\n 'biography' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum provident magnam voluptates quidem, ipsa molestiae fuga ullam deserunt at aspernatur! Saepe vero, voluptates animi mollitia sint voluptatum ducimus ipsa vel?',\n 'username' => 'EliasJ',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => 'password',\n 'remember_token' => str_random(10),\n ]);\n\n factory(User::class, 10)->create()->each(function ($user) {\n factory(Post::class, rand(0, 5))->create(['user_id' => $user->id])->each(function ($post) {\n\n $randCount = rand(0, User::count());\n $randomUsers = User::inRandomOrder()->take($randCount)->get();\n\n $randomUsers->each(function ($randUser) use ($post) {\n factory(Vote::class)->create(['user_id' => $randUser->id, 'voted_id' => $post->id]);\n });\n });\n });\n\n factory(Follow::class)->create(['follower_id' => 1, 'followee_id' => 2]);\n\n }", "title": "" }, { "docid": "91317243366fd0817cbd1d5874e0d4fd", "score": "0.77558076", "text": "public function run()\n {\n $this->seed('EnquiriesTableSeeder');\n $this->seed('FormsTableSeeder');\n $this->seed('InputsTableSeeder');\n $this->seed('DataTableSeeder');\n }", "title": "" }, { "docid": "e3ecd8841e5c87217a3b633febe5ecb6", "score": "0.77534944", "text": "public function run()\n {\n $this->seed(DataTypesTableSeeder::class);\n $this->seed(DataRowsTableSeeder::class);\n $this->seed(MenusTableSeeder::class);\n $this->seed(MenuItemsTableSeeder::class);\n $this->seed(RolesTableSeeder::class);\n $this->seed(PermissionsTableSeeder::class);\n $this->seed(PermissionRoleTableSeeder::class);\n $this->seed(SettingsTableSeeder::class);\n }", "title": "" }, { "docid": "58699f4c1c3829bc0bf3b1b2107cf4d8", "score": "0.7750479", "text": "public function run()\n {\n \tDB::statement(\"SET FOREIGN_KEY_CHECKS=0\");\n \tfactory(App\\User::class,10)->create()->each(function($user){\n\n \t\t$user->posts()->save(factory(App\\Post::class )->make());\n \t\t\n \t});\n \tfactory(App\\Role::class,3)->create(); \t\n \tfactory(App\\Category::class,5)->create(); \t\n \tfactory(App\\Photo::class,1)->create(); \t\n\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "c9df141f7b179d1aa331fe8dbfc58ebc", "score": "0.7749799", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionAndGroupSeeder::class);\n $this->call(PermissionPierAndCategoriesSeeder::class);\n $this->call(PierCategoriesSeeder::class);\n $this->call(PiersSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(CountriesSeeder::class);\n $this->call(CompanyTypesSeeder::class);\n Country::whereIn('name', [\n 'INDONESIA',\n 'MALAYSIA',\n 'PHILIPPINES',\n 'SINGAPORE',\n 'THAILAND'\n ])->update(['highlighted'=> true]);\n Boat::factory()->count(60)->create();\n Ship::factory()->count(5000)->create();\n AccessRequest::factory()->count(60)->create();\n Company::factory()->count(10)->create();\n }", "title": "" }, { "docid": "ac07049886266992b4877e0bbac4f46e", "score": "0.7747286", "text": "public function run()\n /*collect alle db seeds voor seeding */\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(CouponsTableSeeder::class);\n }", "title": "" }, { "docid": "985b4aaf160ac664b8922a8544515d44", "score": "0.7741914", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1, 20) as $index){\n DB::table('blogs')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n } */\n }", "title": "" }, { "docid": "aca9b2cf26903130f7380f92f55a473c", "score": "0.77416915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Book::truncate();\n College::truncate();\n\n $userQuantity = 50;\n\n factory(User::class, 50)->create();\n factory(Book::class, 50)->create();\n factory(College::class, 2)->create();\n }", "title": "" }, { "docid": "30d64a1e579c6e0f0a830b95c66b1bfa", "score": "0.7741147", "text": "public function run()\n {\n $this->empresarSeeder();\n $this->empresarPersonaSeeder();\n }", "title": "" }, { "docid": "470a485c944168ddbe9d5621e9882146", "score": "0.7738393", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n factory(Category::class, 6)->create();\n factory(Tag::class, 10)->create();\n factory(Post::class, 30)->create();\n }", "title": "" }, { "docid": "3727173589775f381466040e171579e2", "score": "0.77325696", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call([\n UsersTableSeeder::class,\n PostsTableSeeder::class,\n CommentsTableSeeder::class,\n ]);\n /* DB::table('posts')->insert([\n 'title' => 'Car',\n 'content' => 'Super cool car',\n ]);\n DB::table('posts')->insert([\n 'title' => 'Another Car',\n 'content' => 'Another Super cool car',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '12',\n 'post_id' => '1',\n 'content' => 'Dear Car Talk: I have a 1951 Chevy, straight-6, 3-on-the-tree, with 31,000 actual miles. Nice car.',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '9',\n 'post_id' => '1',\n 'content' => 'Nice car!',\n ]);\n */\n }", "title": "" }, { "docid": "0edbf15de8e4e944dd2074ed1b57afd8", "score": "0.77274126", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* factory(App\\User::class,100)->create();\n factory(App\\Modele\\Category::class,20)->create(); \n factory(App\\Modele\\Post::class,1500)->create();\n\n factory(App\\Modele\\Tag::class,50)->create();\n factory(App\\Modele\\Image::class,3500)->create(); \n factory(App\\Modele\\Video::class,1050)->create();\n factory(App\\Modele\\Comment::class,4500)->create();*/ \n }", "title": "" }, { "docid": "cdc741a314743eae755e3c22f3f76551", "score": "0.77273446", "text": "public function run()\n {\n $this->seedUser();\n// $this->seedCategoryAndPosts();\n }", "title": "" }, { "docid": "38858c934978757be077df51a3a020d1", "score": "0.77270466", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // inicializa tabla USERS\n DB::table(\"users\")->insert(\n [\n \"id\"=> 1,\n \"name\" =>\"admin\",\n \"email\"=>\"[email protected]\",\n \"email_verified_at\"=> NULL,\n \"password\"=>'$2y$10$hhTW0KElMnPuQO9GFZT1yOIrXd6LI/KabIAMWv0kYNlql0pZtEMjS',\n \"facebook\" => \"admin\",\n \"twitter\"=>\"admin\",\n \"instagram\"=>\"admin\",\n \"avatar\"=>\"userImage.png\",\n \"rol_id\"=>2, \n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PAIS\n DB::table(\"pais\")->insert(\n [\n \"id_pais\"=> 1,\n \"nombre_pais\" => \"Argentina\",\n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PROVINCIAS\n factory(App\\Provincia::class, 23)->create();\n\n // inicializa tabla DESTINOS\n factory(App\\Destino::class, 20)->create();\n\n // inicializa tabla COMENTARIOS\n factory(App\\Comentario::class, 10)->create();\n\n // inicializa tabla FAVORITOS\n factory(App\\Favorito::class, 5)->create();\n \n // inicializa tabla MENSAJES\n factory(App\\Mensaje::class, 5)->create();\n }", "title": "" }, { "docid": "258a68b251e7e52b90e764a986aea0f9", "score": "0.7726887", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Property::class, 5)->create();\n factory(App\\Contact::class, 5)->create();\n factory(App\\Feature::class, 5)->create();\n factory(App\\Location::class, 5)->create();\n factory(App\\Image::class, 5)->create();\n factory(App\\Video::class, 5)->create();\n factory(App\\Tag::class, 5)->create();\n factory(App\\Employee::class, 5)->create();\n factory(App\\PropertyEmployee::class, 5)->create();\n factory(App\\User::class, 5)->create();\n factory(App\\UserEmployee::class, 5)->create();\n factory(App\\UserDetail::class, 5)->create();\n }", "title": "" }, { "docid": "9ddfa6b8e708696db5d12d34c9d4f728", "score": "0.77260584", "text": "public function run()\n {\n // Seed with fake role.\n // factory(App\\Role::class, 3)->create();\n \n // Seed with real life roles.\n $roles = [\n ['id'=> 250, 'role' => 'Banned', 'vote_weight' => 0, 'spam_threshold' => 0],\n ['id'=> 500, 'role' => 'Registered user', 'vote_weight' => 1, 'spam_threshold' => 10],\n ['id'=> 750, 'role' => 'Confirmed user', 'vote_weight' => 2, 'spam_threshold' => 50],\n ['id'=> 875, 'role' => 'Editor', 'vote_weight' => 3, 'spam_threshold' => 200],\n ['id'=> 1000, 'role' => 'Administrator', 'vote_weight' => 4, 'spam_threshold' => 1000],\n ];\n \n foreach ($roles as $role) {\n Role::create($role);\n }\n }", "title": "" }, { "docid": "da35f91bdc164c9487439ff37cc282a4", "score": "0.7723604", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n Admin::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n Employee::create([\n 'name' => 'pegawai',\n 'address' => 'surabaya',\n 'phone' => 86665656666,\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n }", "title": "" }, { "docid": "65ebc2415901c1804329cb5eda67fd26", "score": "0.7723045", "text": "public function run()\n {\n\n\n\n $faker = Faker\\Factory::create();\n\n DB::table('users_roles')->insert([\n 'name' => 'Admin',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Editor',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Guest',\n\n ]);\n }", "title": "" }, { "docid": "1e0f063fa5c69434fdf04122ef66efe5", "score": "0.7722689", "text": "public function run()\n {\n // Wipe the table clean before populating\n DB::table('users')->delete();\n\n $users = array(\n [\n \"name\" => \"Auto Customs Inc.\",\n \"phone\" => '877-204-7002',\n \"email\" => \"[email protected]\",\n ],\n [\n \"name\" => \"Philip Meckling\",\n \"phone\" => '321-501-1234',\n \"email\" => \"[email protected]\",\n ],\n [\n \"name\" => \"Joe Blough\",\n \"phone\" => '888-123-4567',\n \"email\" => \"[email protected]\",\n ],\n\n );\n\n // Run the seeder\n DB::table('users')->insert($users);\n }", "title": "" }, { "docid": "e37cab7241cc60bd3248948e0026f7c7", "score": "0.77219605", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(GenreSeeder::class);\n\n $users = User::factory(10)->hasAttached(Role::find(2))->create();\n\n $artists = Artist::factory(10)->create();\n\n // artists and genres must be generated before songs\n $songs = Song::factory(100)->create();\n\n // users must be generated before playlists. \n // playlist_song entries are created with the hasAttached method.\n $playlists = Playlist::factory(10)->hasAttached($songs)->create();\n }", "title": "" }, { "docid": "ad511f434f764c2a5e866a1356beb2a7", "score": "0.77176195", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('groups')->insert([['group_name' => 'student'],['group_name' => 'employee']]);\n DB::table('system_roles')->insert([['role_name' => 'none'],['role_name' => 'beadle'],['role_name' => 'osa'],['role_name' => 'teacher']]);\n }", "title": "" }, { "docid": "4315481d0f561c009a68fbd4d76a6b88", "score": "0.7714018", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = Faker\\Factory::create();\n\n\n DB::table('users')->delete();\n\n for($i = 0; $i < 10; ++$i)\n {\n DB::table('users')->insert([\n 'name' => 'Nom' . $i,\n 'email' => 'email' . $i . '@blop.fr',\n 'avatar' => 'profile.png',\n 'admin' => rand(0, 1),\n 'password' => bcrypt('password' . $i)\n ]);\n }\n\n for ($i=0;$i<10;$i++)\n {\n DB::table('membres_tribunal')->insert( [\n\n 'nom'=>str_random(10),\n 'telephone'=>mt_rand(666666666,699999999),\n 'grade'=> 'Avocat'\n ]);\n }\n }", "title": "" }, { "docid": "32fcf6bca24d0a313359673895169dfc", "score": "0.7712975", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //DB::statement('SET FOREIGN_KEYS_CHECKS = 0');\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //MySql\n Libro::truncate();\n Libreria::truncate();\n\n $countLibreria = 50;\n $countLibros = 5000;\n\n factory(Libreria::class, $countLibreria)->create();\n factory(Libro::class, $countLibros)->create();\n }", "title": "" }, { "docid": "384e8b5815d2e9af9d70eae3d52245a6", "score": "0.77094305", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(Address::class,1000)->create();\n // factory(User::class,500)->create();\n //factory(Product::class,1500)->create();\n //factory(Image::class,1000)->create();\n factory(Review::class,3500)->create();\n //factory(Category::class,50)->create();\n //factory(Tag::class,150)->create();\n //factory(Role::class,5)->create();\n //factory(Ticket::class,7)->create();\n }", "title": "" }, { "docid": "bdf9c786dbc3525631942e19087b8a23", "score": "0.77054024", "text": "public function run()\n {\n Book::create([\n 'title' => 'The Two Towers',\n 'author' => 'J.R.R. Tolkien'\n ]);\n Book::create([\n 'title' => 'Man in Search of Meaning',\n 'author' => 'Viktor Frankl'\n ]);\n Book::create([\n 'title' => 'The Alchemist',\n 'author' => 'Paolo Coehlo'\n ]);\n Book::create([\n 'title' => 'East of Eden',\n 'author' => 'John Steinbeck'\n ]);\n Book::create([\n 'title' => 'Aeneid',\n 'author' => 'Virgil'\n ]);\n Book::create([\n 'title' => 'Paradiso',\n 'author' => 'Dante Alighieri'\n ]);\n }", "title": "" }, { "docid": "17a5e5a2dc7a47f3dc1d9f42adc78825", "score": "0.77012223", "text": "public function run()\n {\n $this->call(CommunitySeeder::class);\n // $this->call(PolingSeeder::class);\n DB::table('poling')->insert([\n 'title' => 'Pemilihan Ketua',\n 'description' => 'Pemilihan',\n 'start_at' => '2021-08-24',\n 'stop_at' => '2021-08-25'\n ]);\n $this->call(UserSeeder::class);\n $this->call(CandidateSeeder::class);\n }", "title": "" }, { "docid": "02839fd48d7058b2c787b8ed974c5c65", "score": "0.77009976", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'username' => 'admin',\n 'isAdmin' => '1',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'ที่นอน',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6bcd80a79b26bc6230d0dbafbf53a13d", "score": "0.76991385", "text": "public function run()\n {\n //empty the database first\n DB::table('books')->delete();\n\n $books = [\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel 5.7 For Dummies',\n 'description' => 'This is the right book for you if you want to get started with using the Laravel framework',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel vs Node.js',\n 'description' => 'This is an ebook comparing the difference and similarities between Laravel and Node.js',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n ];\n\n DB::table('books')->insert($books);\n }", "title": "" }, { "docid": "03809687e5d587409a10b664ad575d6d", "score": "0.769905", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // create default townships\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 30; $i++) {\n \\App\\Models\\Township::create([\n 'code' => $faker->numberBetween(1000000, 22002038),\n 'area' => $faker->numberBetween(20, 500),\n 'location' => $faker->address,\n 'latitude' => $faker->numberBetween(232322, 44534445),\n 'longitude' => $faker->numberBetween(232322, 44534445)\n ]);\n }\n }", "title": "" }, { "docid": "33c290db4d794815321050e69479ef9e", "score": "0.76983136", "text": "public function run()\n {\n /**\n * truncates tables before seeding\n */\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n App\\User::truncate();\n App\\Product::truncate();\n App\\Transaction::truncate();\n App\\Category::truncate();\n DB::table('category_product')->truncate();\n\n\n\n /**\n * prevent Events \n */\n User::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n Category::flushEventListeners();\n\n /**\n * seeding table users\n */\n factory(App\\User::class,1000)->create();\n /**\n * seeding table categories\n */\n factory(App\\Category::class,30)->create();\n /**\n * seeding table products and the pivot table\n */\n factory(App\\Product::class,1000)->create()->each(\n function($product){\n $categories = App\\Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n /**\n * seeding table transactions\n */\n factory(App\\Transaction::class,1000)->create();\n\n }", "title": "" }, { "docid": "3ab1da7523b244be048582931b4784b6", "score": "0.76979566", "text": "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n factory(App\\Product::class, 50)->create();\n factory(App\\User::class, 6)->create();\n\n factory(App\\Category::class, 20)->create();\n factory(App\\Tag::class, 21)->create();\n\n factory(App\\Post::class, 300)->create()->each(function(App\\Post $post){\n $post->tags()->attach([\n rand(1,5),\n rand(6,14),\n rand(15,20),\n\n ]);\n });\n //fregona para cargar tablas pivote recordar dar de alta la relacioón sino no funciona\n\n\n Role::create([\n 'name' => 'Admin',\n 'slug' => 'admin',\n 'special' => 'all-access'\n ]);\n\n App\\User::create([\n 'name'=>'rodrigo',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('rorro'),\n\n ]);\n }", "title": "" }, { "docid": "6b51251d22df55c7b04c27df5213a7b2", "score": "0.7696267", "text": "public function run()\n {\n $categories = factory(Category::class)->times(5)->create();\n // $product = factory(Product::class)->times(5)->create();\n \n foreach ($categories as $category) {\n factory(Product::class)->times(3)->create([\n 'category_id' => $category->id\n ]);\n }\n\n $this->call([\n UsersTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "fb8674413c8a4104e4b1c436f70ed975", "score": "0.76955414", "text": "public function run()\n {\n //factory('App\\User',60)->create();\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n foreach (range(1,5) as $index) {\n \t$my_category = DB::table('ordercategorgies')->insert([\n\t \t'order_type' => $faker->randomElement(['local food' ,'take away']),\n\t \t'food_photo' => $faker->imageUrl($width = 100, $height = 100),\n\t ]);\n }*/\n // dd($my_food);\n \n }", "title": "" }, { "docid": "a18a3a4890fe667e04bd7d3caf5a59e7", "score": "0.7693552", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n// $categories = Category::factory(5)->create();\n// $sources = Source::factory(5)->create();\n//\n// foreach ($categories as $category)\n// {\n// foreach ($sources as $source)\n// {\n// News::factory(10,\n// [\n// 'category_id' => $category->id,\n// 'source_id' => $source->id,\n// ])\n// ->create();\n// }\n// }\n\n $sources = Source::factory(10)->create();\n\n Category::factory(10)\n ->create()\n ->each(function ($category) use ($sources) {\n News::factory(10,\n [\n 'category_id' => $category->id,\n 'source_id' => $sources[rand(0, count($sources) - 1)]->id,\n ])\n ->create();\n });\n }", "title": "" }, { "docid": "329b24a3b852e37339619d080f8e67c4", "score": "0.7692279", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'Information Technology',\n 'abbreviation'=>'IT',\n 'email'=>'[email protected]',\n 'password'=>Hash::make('itpass'),\n 'role'=>'Admin'\n ]);\n\n // DB::table('inventories')->insert([\n // 'motherboard'=>'helasd',\n // 'cpu'=>'asd',\n // 'hdd'=>'dg',\n // 'memory'=>'agdfsd',\n // 'monitor'=>'sdfg',\n // 'case'=>'dsfgd',\n // 'keyboard'=>'',\n // 'mouse'=>'',\n // 'video_card'=>'',\n // 'power_supply'=>'',\n // 'printer'=>'',\n // 'telephone'=>''\n // ]);\n \n DB::table('users')->insert([\n 'name'=>'Human Resource',\n 'abbreviation'=>'HR',\n 'email'=>'[email protected]',\n 'password'=>Hash::make('hrpass'),\n 'role'=>'User'\n ]);\n }", "title": "" }, { "docid": "f312cccea49d3336d07a2c524243b0e9", "score": "0.7691922", "text": "public function run()\n {\n /*\n * In a real production system, I imagine you'd either seed\n * reasonable credentials for a trusted user, or you'd have\n * no seeder and have someone with database access insert\n * the first user manually.\n * It's not necessary for the admin user to be an author,\n * but why waste seeded data?\n * Explicitly stated ID of 1 should fail if there's any data in\n * the table. Only run these seeders on a fresh database.\n */\n DB::table('users')->insert(\n [\n 'id' => 1,\n 'name' => 'Admin Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'isAdmin' => true,\n 'isAuthor' => true,\n ]\n );\n\n DB::table('users')->insert(\n [\n 'id' => 2,\n 'name' => 'Arthur Author',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'isAuthor' => true,\n ]\n );\n }", "title": "" }, { "docid": "7257c69616adc43e5cde09cbe9609093", "score": "0.768958", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Articulo::class,10)->create();\n // factory(App\\Periodista::class,10)->create();\n // factory(App\\Sucursal::class,10)->create();\n // factory(App\\Tipo::class,10)->create();\n // factory(App\\Empleado::class,10)->create();\n // factory(App\\Revista::class,10)->create();\n // factory(App\\Periodista_Articulo::class,10)->create();\n factory(App\\Revista_Articulo::class,10)->create();\n //factory(App\\Sucursal_Revista::class,10)->create(); \n }", "title": "" }, { "docid": "0b28aea8b99ae559650697917bb74848", "score": "0.76886624", "text": "public function run()\n {\n $faker = Faker::create();\n Schema::disableForeignKeyConstraints();\n DB::table('positions')->truncate();\n\n $positions = [];\n $stores = DB::table('stores')->take(10)->get();\n\n foreach ($stores as $store) {\n $positions[] =\n [\n 'name' => 'Lightbox_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Lightbox',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 2000000,\n ];\n $positions[] =\n [\n 'name' => 'Billboard_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Billboard',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 5000000,\n ];\n }\n\n DB::table('positions')->insert($positions);\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "fdceb467a92f830a50199ac2a220b8b3", "score": "0.7685264", "text": "public function run()\n {\n\n //create 3 users\n //Illuminate\\Support\\Facades\\DB::table('users')->delete();\n factory(App\\Models\\User::class, 3)->create();\n factory(\\App\\Models\\Country::class, 50)->create();\n factory(\\App\\Models\\Genre::class, 10)->create();\n factory(\\App\\Models\\Comment::class, 3)->create();\n\n //assign each film to a genre\n \\App\\Models\\Film::all()->each(function($film) {\n factory(\\App\\Models\\FilmGenres::class, 1)->create(['film_id'=>$film->id]);\n });\n }", "title": "" }, { "docid": "08ef2d96ca9f09f01db166c921bcded0", "score": "0.7680802", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // $this->call(StaticContentSeeder::class);\n // factory(App\\Menu::class, 20)->create();\n // factory(App\\Page::class, 20)->create();\n // factory(App\\PageItem::class, 20)->create();\n // factory(App\\Company::class, 20)->create();\n // factory(App\\Announcment::class, 20)->create();\n // factory(App\\Survey::class, 20)->create();\n // factory(App\\SurveyQuestion::class, 20)->create();\n // factory(App\\SurveyAnswerOption::class, 20)->create();\n // factory(App\\SurveyHit::class, 20)->create();\n // factory(App\\Transaction::class, 20)->create();\n // factory(App\\StaticContent::class, 20)->create();\n // factory(App\\Search::class, 20)->create();\n // factory(App\\Sector::class, 20)->create();\n // factory(App\\SubscriptionPlan::class, 20)->create();\n }", "title": "" }, { "docid": "b05010d7103a3a12b2577b68b3dba100", "score": "0.76797414", "text": "public function run()\n {\n// DB::table('users')->truncate();\n// DB::table('roles')->truncate();\n\n $this->call(RoleCreateSeeder::class);\n factory(App\\Models\\User::class, 10)->create();\n factory(App\\Models\\Category::class,20)->create();\n factory(App\\Models\\Post::class,1000)->create();\n }", "title": "" }, { "docid": "884fc4f5db946c3ac90deba14a0e705d", "score": "0.76765025", "text": "public function run()\n {\n User::create([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('111'),\n 'role_id' => 1,\n 'email_verified_at' => date('Y-m-d h:i:s'),\n ]);\n\n // $faker = Faker::create();\n \t// foreach (range(1,20) as $index) {\n\t // DB::table('users')->insert([\n // 'username' => strtolower($faker->unique()->firstName()),\n\t // 'email' => $faker->email,\n // 'password' => bcrypt('111'),\n // 'role_id' => 2,\n // 'email_verified_at' => $faker->date('Y-m-d', 'now')\n\t // ]);\n\t // }\n\n }", "title": "" }, { "docid": "b4470aaaaba217c380aa7eb641709475", "score": "0.76755524", "text": "public function run()\n {\n //DB::table('reviews')->delete();\n DatabaseSeeder::ClearTable('reviews');\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник, грамотные и доброжелательные заводчики!\n Большое спасибо вам за нашу собаку!', 'published' => '0')\n );\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник ,все собачки красивые и породные ,чемпионы,\n с хорошим здоровьем . Мы очень довольны выбором .Всем рекомендуем.', 'published' => '1')\n );\n\n }", "title": "" }, { "docid": "520f4a3190cf8cb42f24a3f54f6e405e", "score": "0.7672424", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index ){\n \tDB::table('students')->insert([\n \t\t'first_name'=> $faker->firstName,\n \t\t'last_name'=>$faker->lastName,\n \t\t'date_of_birth'=>$faker->DateTime,\n \t\t'student_id'=>$faker->ean8,\n \t\t'gender'=>$faker->boolean,\n \t\t'phone_number'=>$faker->randomDigit,\n \t\t'email'=> $faker->email,\n \t\t'semester'=>$faker->randomDigit,\n \t\t'class'=>$faker->sentence\n\n \t\t]);\n }\n // $this->call(StudentsTableSeeder::run());\n }", "title": "" }, { "docid": "390fa29c1c99b4bb24ad7a2b512bf966", "score": "0.7670938", "text": "public function run()\n {\n // $this->call(RoleSeeder::class);\n // $this->call(PermissionSeeder::class);\n // $this->call(UserSeeder::class);\n $user = User::factory()->create(['name' => 'Jhon Snow']);\n $user2 = User::factory()->create(['name' => 'Cthulhu Doe']);\n $user3 = User::factory()->create(['name' => 'Alsina Dimitresku']);\n $user4 = User::factory()->create(['name' => 'Master']);\n $user5 = User::factory()->create(['name' => 'General', 'email' => '[email protected]', 'password' => 'general']);\n $category = Category::factory()->create(['name' => 'War']);\n $category2 = Category::factory()->create(['name' => 'Magic']);\n $category3 = Category::factory()->create(['name' => 'Villages']);\n\n Post::factory(5)->create(['user_id' => $user->id, 'category_id' => $category->id]);\n Post::factory(5)->create(['user_id' => $user2->id, 'category_id' => $category2->id]);\n Post::factory(3)->create(['user_id' => $user2->id, 'category_id' => $category3->id]);\n Post::factory(6)->create(['user_id' => $user3->id, 'category_id' => $category3->id]);\n Post::factory(3)->create(['user_id' => $user4->id, 'category_id' => $category->id]);\n Post::factory(2)->create(['user_id' => $user4->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n\n }", "title": "" }, { "docid": "e9fa3efca175f7f31cd9e7dbd866e396", "score": "0.7670763", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n ['role_id' => '1', 'name' => 'admin', 'email' => '[email protected]', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ['role_id' => '2', 'name' => 'teacher', 'email' => '[email protected]', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ]);\n\n DB::table('roles')->insert([\n ['name' => 'Teacher'], \n ['name' => 'Admin'],\n ['name' => 'Staff'],\n ['name' => 'accountant'],\n ]);\n\n DB::table('days')->insert([\n ['day' => 'Satarday'],\n ['day' => 'Sunday'],\n ['day' => 'Monday'],\n ['day' => 'Tuesday'],\n ['day' => 'Wednesday'],\n ['day' => 'Thusday'],\n ['day' => 'Friday'],\n ]);\n\n // DB::table('periods')->insert([\n // ['name' => 'Period 1'],\n // ['name' => 'Period 2'],\n // ['name' => 'Period 3'],\n // ['name' => 'Period 4'],\n // ['name' => 'Period 5'],\n // ['name' => 'Period 6'],\n // ['name' => 'Period 7'],\n // ]);\n\n DB::table('school_classes')->insert([\n ['name' => 'One'],\n ['name' => 'Two'],\n ['name' => 'Three'],\n ['name' => 'Four'],\n ['name' => 'Five'],\n ['name' => 'Six'],\n ['name' => 'Seven'],\n ]);\n }", "title": "" }, { "docid": "89ec7e3fec2adf84109c14670c573096", "score": "0.76704", "text": "public function run()\n {\n \\App\\Models\\Titre::factory(40)->create();\n \\App\\Models\\Resume::factory(10)->create();\n\n\n $this->call([\n CoordonneeSeeder::class,\n StatistiquesSeeder::class,\n CompetenceSeeder::class,\n PhotoSeeder::class\n ]);\n }", "title": "" }, { "docid": "3b2a01f87307d1f6a7c835e40ee5ee65", "score": "0.76703376", "text": "public function run()\n {\n $books = json_decode(file_get_contents(database_path().'/seedData/books.json'), True);\n\n foreach ($books as $title => $book) {\n Book::create([\n 'title' => $title,\n 'author' => $book['author'],\n 'year_published' => $book['year_published'] ?? null,\n 'image_url' => $book['image_url'] ?? null,\n ]);\n }\n }", "title": "" }, { "docid": "7ccc15187b4ea3c508675a1b9719d8ce", "score": "0.76688737", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\Models\\Office::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n //Populate offices table\n $manypopulate = 50;\n\n for($i= 0; $i < $manypopulate; $i++){\n \\App\\Models\\Office::create([\n 'name' => $faker->sentence,\n 'address' => $faker->sentence,\n ]);\n }\n\n }", "title": "" }, { "docid": "91c9b2e508b7a00cf3618bc6f31b7019", "score": "0.76669747", "text": "public function run()\n {\n\n /** @var \\Faker\\Generator $faker */\n $faker = App::make(Faker\\Generator::class);\n\n \\DB::statement(\"SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\");\n\n $this->clearTable(\"buyers\");\n $this->clearTable(\"sellers\");\n $this->clearTable(\"estates\");\n $this->clearTable(\"agents\");\n $this->clearTable(\"users\");\n $this->clearTable(\"agent_estate\");\n $this->clearTable(\"orders\");\n $this->clearTable(\"proposals\");\n\n \\DB::statement(\"SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\");\n\n $this->command->comment(\"Seeding users\");\n factory(\\App\\User::class, 200)->create();\n\n $buyers = \\App\\User::where('user_type', 0)->get();\n $sellers = \\App\\User::where('user_type', 1)->get();\n $agents = \\App\\User::where('user_type', 2)->get();\n\n $this->command->comment(\"Seeding buyer\");\n foreach ($buyers as $buyer) {\n /** @var \\App\\Buyer $instance */\n $instance = new \\App\\Buyer;\n $instance->user_id = $buyer->id;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding agent\");\n foreach ($agents as $agent) {\n /** @var \\App\\Agent $instance */\n $instance = new \\App\\Agent;\n $instance->user_id = $agent->id;\n $instance->title = $faker->company;\n $instance->fee = $faker->numberBetween(10000, 200000) / 100;\n $instance->description = $faker->paragraph;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding seller\");\n\n\n foreach ($sellers as $seller) {\n $is_verified = 1 - intval($faker->numberBetween(0, 7) / 5);\n /** @var \\App\\Seller $instance */\n $instance = new \\App\\Seller;\n $instance->user_id = $seller->id;\n $instance->verified = $is_verified;\n $instance->verified_by_agent_id = $is_verified ? App\\Helpers\\Util::randomArrayMember($agents)->id : null;\n $instance->id_card_num = strval($faker->randomNumber(8)) . strval($faker->randomNumber(8));\n $instance->save();\n }\n\n\n $this->command->comment(\"Seeding estates\");\n factory(\\App\\Estate::class, 500)->create();\n\n $this->command->comment(\"Run php artisan seed:relations\");\n return;\n }", "title": "" }, { "docid": "355839e7a0c00a26ac93a195a1884fe3", "score": "0.7666388", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // Blog::factory(15)->create();\n\n User::factory(15)\n ->create()\n ->each(function ($user) {\n Blog::factory(random_int(2, 5))\n ->seeding()\n ->create(['user_id' => $user])\n ->each(function ($blog) {\n Comment::factory(random_int(1, 3))->create(['blog_id' => $blog]);\n });\n });\n }", "title": "" }, { "docid": "185338e2242eb2e25db37e4fd2d6c989", "score": "0.7666128", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Membresia::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('es_ES');\n\n // And now, let's create a few articles in our database:\n for ($i = 1; $i < 30; $i++) {\n Membresia::create([\n 'name' => $faker->name,\n 'dni' => $faker->randomNumber(5),\n 'role' => $faker->name (),\n 'status' => $faker->name (),\n ]);\n }\n\n }", "title": "" }, { "docid": "b51f9ef314a6dd780dd083daea1bf1f0", "score": "0.7664623", "text": "public function run()\n {\n \t$faker= Faker::create();\n\n \t$canino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Canino')\n ->first()\n ->id;\n\n $felino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Felino')\n ->first()\n ->id;\n $ave_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Ave')\n ->first()\n ->id; \n\n \t$estatus_activo= DB::table('estatus')\n ->select('id')\n ->where('nombre', 'activo')\n ->first()\n ->id;\n \tfor($i=0; $i<10; $i++){\n\n \t\t\\DB::table('animal')->insert(array(\n \t'idespecie' => $faker->randomElement([$canino_role,$felino_role,$ave_role]),\n \t'idestatususuario' => $estatus_activo,\n \t'nombre' => $faker->firstName,\n \t'comentario'=>$faker->paragraph($nbSentences = 3)\n \t));\t\n \t}\n }", "title": "" }, { "docid": "b97070b0b16872dc6d136f9070202aec", "score": "0.7661499", "text": "public function run()\n\t{\n\t\t//DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\t/* Linea::truncate();\n\t\tPedido::truncate();\n EstadoPedido::truncate();\n\t\tRepresentante::truncate();\n\t\tLibroAutor::truncate();\n\t\tLibro::truncate();\n\t\tAutor::truncate();\n\t\tTipoEdicion::truncate();\n\t\tGenero::truncate();\n\t\tNivel::truncate(); */\n\t\t$this->call(UsersTableSeeder::class);\n\t\tfactory(EditorialWeb\\User::class, 10)->create();\n\t\tfactory(EditorialWeb\\Post::class, 50)->create();\n\t\t\n\t\t$this->call(CategoriaSeeder::class);\n\t\t\n\t\t$this->call(NivelesSeeder::class);\n\t\t$this->call(TipoEdicionesSeeder::class);\n\t\t$this->call(AutoresSeeder::class);\n\t\t$this->call(GenerosSeeder::class);\n\t\t$this->call(LibrosSeeder::class);\n\t\t$this->call(LibroAutoresSeeder::class);\n\t\t$this->call(RepresentantesSeeder::class);\n $this->call(EstadoPedidosSeeder::class);\n\t $this->call(PedidosSeeder::class);\n\t\t$this->call(LineasSeeder::class);\n\t\t\n\n\t}", "title": "" }, { "docid": "3bacf019e0a7bd2d72ff258166f87982", "score": "0.76610523", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'role'=>'Administrador'\n ]);\n DB::table('functionms')->insert([\n ['title' => 'Função 1'],\n ['title' => 'Função 2'],\n ['title' => 'Função 3'],\n ['title' => 'Função 4'],\n ['title' => 'Função 5']\n ]);\n DB::table('processes')->insert([\n ['title' => 'Processo 1', 'color' => '#333333'],\n ['title' => 'Processo 2', 'color' => '#ff5500'],\n ['title' => 'Processo 3', 'color' => '#005533'],\n ['title' => 'Processo 4', 'color' => '#ff9922'],\n ['title' => 'Processo 5', 'color' => '#bb52f1']\n ]);\n DB::table('setor')->insert([\n 'name'=>'TI',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n DB::table('cargo')->insert([\n 'name'=>'Desenvolvedor',\n 'resumo'=>'Apenas um seed para testes',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n }", "title": "" }, { "docid": "858e059a01a752d81019e1020e108284", "score": "0.76581466", "text": "public function run()\n {\n // Department\n foreach(['Generate Emp'] as $name)\n {\n $department = Department::create([\n 'name' => $name,\n 'active' => true,\n ]);\n\n foreach(range(1, rand(10, 35)) as $index)\n {\n // Employee\n $employee = Employee::create([\n 'username' => $faker->companyEmail(),\n 'password' => bcrypt('qweasd'),\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName(),\n 'can_login' => true,\n 'active' => true,\n 'department_id' => $department->id,\n 'position_id' => Position::orderByRaw(\"RAND()\")->first()->id\n ]);\n\n // Permission\n Permission::create([\n 'role_id' => Role::where('name', 'general')->first()->id,\n 'employee_id' => $employee->id\n ]);\n }\n }\n }", "title": "" } ]
466bf6416eebd166ae21c1d69b73f5db
Recuperar todos os elementos da tabela setor
[ { "docid": "37a8f4387e7385588a5f77b33945a758", "score": "0.0", "text": "public function fetchAll() {\n\n $data = $this->tableGateway->select();\n\n return $data;\n }", "title": "" } ]
[ { "docid": "725b52a30e4c48eecfdf1c03f5bae46d", "score": "0.657039", "text": "public static function cotejarDatas(){\n $tablaModulo = self::getTable();\n }", "title": "" }, { "docid": "8bd64ee2deb04ccaffccf19bfbbf62df", "score": "0.65097606", "text": "public function getElements($table);", "title": "" }, { "docid": "3d742eb0c39ae97e200e2b50a4416063", "score": "0.6370956", "text": "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "3d742eb0c39ae97e200e2b50a4416063", "score": "0.6370956", "text": "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "3d742eb0c39ae97e200e2b50a4416063", "score": "0.6370956", "text": "public function liste(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"many\"));\n\t\t\t\t\t }", "title": "" }, { "docid": "76a29394d63b2cac539ac97338cbf6fc", "score": "0.6370015", "text": "function get_tablas()\r\n\t{\r\n\t\treturn toba::db($this->fuente, toba_editor::get_proyecto_cargado())->get_lista_tablas_y_vistas();\r\n\t}", "title": "" }, { "docid": "aa92fcd27eefc523d8318f7308279216", "score": "0.63307387", "text": "function DatosElemento() {\n\t\t$this->__respuestas = array();\n\t\t$this->__estados = array();\n\t}", "title": "" }, { "docid": "ba82a44f0abd15aa0a83c58836536e1b", "score": "0.6298082", "text": "function fetchControleTabela();", "title": "" }, { "docid": "a3953238b6fef82749506cf9c280a16d", "score": "0.62157565", "text": "function obtieneTodos(){\n /**\n * guardamos la consulta en $sql obtiene todos las tuplas de la tabla\n * ejecutamos la consulta en php obtenemos una tabla con los resultados\n * en el for convertimos a cada tupla en un objeto y añadimos al array $objetos uno a uno\n * retornamos un array con todas las tuplas como objetos\n */\n try {\n $sql=\"SELECT * FROM $this->tabla\";\n $resultado=$this->conexion->query($sql);\n $objetos=array();\n\n while ($fila=$resultado->fetch_object()){\n $objetos[]=$fila;\n //echo 'fila = '. var_dump($fila);\n }\n\n /*\n for($x=0;$x<$resultado->field_count;$x++){\n $objetos[$x]=$resultado[$x]->fetch_object();\n }*/\n return $objetos;\n } catch (Exception $ex) {\n echo 'error '.$ex;\n }\n }", "title": "" }, { "docid": "5599d8338b4154a1c37239ca57b45307", "score": "0.6202125", "text": "public function getAlumnos(){\n $query= $this->db->prepare('SELECT * FROM alumno');\n $query->execute();\n $alumnos = $query->fetchAll(PDO::FETCH_OBJ);\n return $alumnos;\n }", "title": "" }, { "docid": "0e7f1d831730902ac5439d9e65a7040a", "score": "0.61839646", "text": "public function listaOrdenadaTrabajadores(){\n $em = $this->getDoctrine()->getManager();\n $query = $em->createQuery(\n 'SELECT t\n FROM AppBundle:Trabajadores t\n ORDER BY t.nombre ASC'\n );\n $trabajadores = $query->getResult();\n\n for ($i=0; $i < count($trabajadores); $i++) {\n $nombre = $trabajadores[$i]->getNombre();\n $Atrabajadores[$nombre] = $nombre;\n }\n\n return $Atrabajadores;\n }", "title": "" }, { "docid": "447c859d02d8608e137716bc98f8cec5", "score": "0.6134017", "text": "public function findAll() {\r\n $sql = \"SELECT * FROM $this->tabela\";\r\n $stm = DB::prepare($sql);\r\n $stm->execute();\r\n return $stm->fetchAll();\r\n }", "title": "" }, { "docid": "d5f2e9172d25f002ca9f2a88048e9e14", "score": "0.6124435", "text": "function lista() {\n \n $result = listaRegTabela($this->tabelas,$this->param);\n\n if ($result!=0) {\n $this->records = array(); //array dos objetos pertencentes a lista\n $indice = 0;\n foreach ($result as $reg) {\t\n //instancia o objeto de acordo com a classe que foi passada como parametro na construcao\n\t\n \t$obj = new $this->objClass();\t\t\t \n\t$obj->parseFieldsFromArray($reg,0); //seta as propriedades do objeto (somente na mainClass)\n\t\t\n\t//seta a mao os campos das outras tabelas no objeto\n \tforeach ($this->getCamposProjecaoSemNomesTabela() as $campo) {\n\t if (!isset($obj->$campo)) {\n\t $obj->$campo = $reg[$campo];\n\t }\n\t}\n\t\n $obj->novo = 0;\t\t\t\t //o registro nao eh novo\n\t$obj->notifyDelete = &$this->records; //\"ponteiro\" para a lista\n\t$obj->indiceArray = $indice;\t \t //indice do array\n\t$this->records[] = $obj;\t\t //coloca no array\n\t$indice++;\n }\n }\n else $this->records = 0;\n \n $this->setNumRecords(); //seta o numero de registros\n \n}", "title": "" }, { "docid": "0bfcc5586edd2444dddc54276f5726a4", "score": "0.6107627", "text": "public function all()\n {\n $empleados = array();\n $query = \"SELECT * FROM {$this->tabla}\";\n $stmt = $this->datasource->prepare($query);\n $stmt->execute();\n while ($empleado = $stmt->fetch(PDO::FETCH_OBJ)) {\n array_push($empleados, $empleado);\n }\n return $empleados;\n }", "title": "" }, { "docid": "f3e6560d12ef4f697e3de0f103d50015", "score": "0.6066531", "text": "abstract protected function get_tabla();", "title": "" }, { "docid": "801eb1e9b5c7a9fa4ec85ba3879185d8", "score": "0.6047995", "text": "public function selecionarTudo(){\n\t\t$sql = \"SELECT * FROM {$this->Tabela}\";\n\t\t$stmt = Conecta::preparaSQL($sql);\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "title": "" }, { "docid": "5055587d07f797a5a7ab29c8ba2dd46b", "score": "0.60342395", "text": "function gerarAllObjsTable($all_horarios){\n $lista_tabela = array();\n // vou entrar no array do dia, dentro dele vou dá um for ou chamar a outra função!\n foreach($all_horarios as $dia){\n $lista_tabela[] = gerarObjTabela($dia);\n }\n return $lista_tabela;\n }", "title": "" }, { "docid": "2290101c57f7b37dec57f622e954efb0", "score": "0.5999607", "text": "function findAll()\n {\n global $link, $excp; \n \n $sql = 'SELECT * FROM '.$this->table;\n \n $result = $link->query($sql) or $excp->myHandleError(__FILE__, __LINE__, $link->error);\n \n $switch = true;\n while($d = $result->fetch_assoc())\n {\n if($switch)\n { \n $arr_fin[]=array_keys($d); // punem in array-ul final capul de tabel care este dat de cheile lui $d\n $switch = false;\n } \n\n $arr_fin[]=$d;\n\n } //end while\n\n if (isset($arr_fin)) \n return $arr_fin;\n \n return array(); \n\n }", "title": "" }, { "docid": "e25552791a085c27ba0cae43b49fc2d5", "score": "0.5976432", "text": "function ObtenerCamposTabla($tabla)\n\t{\n\t\treturn mysql_list_fields($this->base_datos, $tabla, $this->idconexion);\n\t}", "title": "" }, { "docid": "f3f067ca0aaedb9dcda1926e5b60818f", "score": "0.5974373", "text": "public function MontaComboPerfisUsuarios() {\n try {\n return $this->getTable($this->table_alias)->findAll();\n } catch (Doctrine_Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "636ded7911864ce334254973ba4cb13a", "score": "0.5969443", "text": "public function atributos(){\n $atributos = [];\n // se cambio de self a static porque los self solo se usan cuando el metodo usa la db\n foreach(static::$columnasDB as $columna){// se usa self por que el atributo es estatico\n if($columna === 'id') continue; // hace que cuando salga id no lo agregue al arreglo de atributos, se salta ese loop con continue\n $atributos[$columna] = $this->$columna;// columna tiene $ porque hace referencia a una variable del foreach, no a un atributo de la clase\n\n }\n return $atributos;\n }", "title": "" }, { "docid": "91ce79df3c4677bb5ef5fc77c2a1fc67", "score": "0.5958336", "text": "public function vistaTutoriasModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "title": "" }, { "docid": "8a3ab9e5c114db5d62612d4051699249", "score": "0.5950834", "text": "public function getElements()\n {\n if (!($this->table instanceof Table)) {\n throw new \\Exception('Table not set');\n }\n\n $pkColumns = $this->table->getPrimaryKey()->getColumns();\n $elements = [];\n $fks = [];\n $fk = $this->table->getForeignKeys();\n if (!empty($fk)) {\n foreach ($fk as $f) {\n $fks = array_merge($fks, $f->getLocalColumns());\n }\n };\n foreach ($this->table->getColumns() as $column) {\n\n $isPrimaryKey = in_array($column->getName(), $pkColumns);\n\n if ($this->helper->isExcluded($column) || $isPrimaryKey) {\n continue;\n }\n\n $elements[] = $this->mapColumn($column, $fks);\n }\n\n return $elements;\n }", "title": "" }, { "docid": "60819ecadffb0891d7b42251b51dd95d", "score": "0.59489876", "text": "public function getAll(){\n $sql = \"SELECT * FROM \".$this->table;\n $query = $this->_connexion->prepare($sql);\n $query->execute();\n return $query->fetchAll(); \n }", "title": "" }, { "docid": "7d2e7b86dad0e75a0477958f81afdc9c", "score": "0.5947566", "text": "public function getEstructuraTabla()\r\n {\r\n $estructura= $this->getEstructBlank();\r\n $query=\"SHOW COLUMNS FROM \".$estructura->getNameTable();\r\n $consulta=mysql_query($query,$this->conexion->getConexion()) or die(mysql_error());\r\n $array=array();\r\n $fila=mysql_fetch_array($consulta);\r\n $i=0;\r\n do\r\n {\r\n $array[$i]=new ColumnsTable($fila[0],$fila[1],$fila[2],$fila[3],$fila[4],$fila[5]);;\r\n //echo $fila[1] .\"<br>\";\r\n $i++;\r\n }while($fila=mysql_fetch_array($consulta));\r\n return $array;\r\n \r\n //return $this->arrayToObject($consulta);\r\n }", "title": "" }, { "docid": "64f1ef099d87226b26eee59f5ea26c17", "score": "0.58882236", "text": "public function traerTodos(){\n \n return $this->mundo->all();\n // return $this->mundo->fields(['name'])->all();\n }", "title": "" }, { "docid": "6f3b69f6112e63f622a0064749ada882", "score": "0.5871416", "text": "final function items($tableName) {\n $table = new Table($tableName);\n return $table->findAll();\n }", "title": "" }, { "docid": "bd0b8ba7d26cb9ab5d0d3ec3e5d49c8e", "score": "0.58694607", "text": "public function atributos()\n {\n $atributos = [];\n foreach (static::$columnasDB as $columna) {\n if ($columna === 'id') continue; // el (continue), le indica al if, de que si existe dicho parametro, se salte ese parametro, pero siga con los demas\n $atributos[$columna] = $this->$columna;\n }\n return $atributos;\n }", "title": "" }, { "docid": "cd81cf9b17367f2ac3b5f915cad5b5fb", "score": "0.5865025", "text": "public function PesquisarTodos(){\n try {\n //Conexão com o banco de dados pela classe PDO\n $pdo = Conexao::getinstance();\n //Comando em SQL para pesquisar os dados na tabela aluguel_produto_kit_produtos\n $sql = \"SELECT * FROM aluguel_kit_produto apk INNER JOIN produto p ON(apk.produto=p.id_produto) INNER JOIN kit_produtos k ON(apk.kit_produtos=k.id_kit_produtos) INNER JOIN aluguel a(apk.aluguel=a.id_aluguel) INNER JOIN cliente c ON(a.cliente=c.id_cliente)\";\n //Prepara o sql para receber os binds\n $stmt = $pdo->prepare($sql);\n //Executa o SQL\n $stmt->execute();\n //Guarda em um array todos os dados da tabela\n $apks = $stmt->fetchAll(PDO::FETCH_ASSOC);\n //Retorna o array com todos os dados da tabela\n return $apks;\n \n } catch (PDOException $ex) {\n echo \"\".$ex;\n \n }\n }", "title": "" }, { "docid": "1fd38048342d4e2fa3a89decbe40b4a5", "score": "0.5854142", "text": "public function getAllMahasiswa()\n {\n // $this->stmt = $this->dbh->prepare('SELECT * FROM mahasiswa');\n // $this->stmt->execute(); // eksekusi \n // return $this->stmt->fetchAll(PDO::FETCH_ASSOC); // ambil semua data nya tipe kembalian array asosiatif\n $this->db->query('SELECT * FROM ' . $this->table);\n return $this->db->resultSet();\n }", "title": "" }, { "docid": "e9c1be00980f8a2e93a94305108bdcaa", "score": "0.58492553", "text": "abstract protected function tableStructure();", "title": "" }, { "docid": "dbb8d9838d653caf2f43d33448f81391", "score": "0.58482414", "text": "public function TraerTodosEmpleadosDB()\n {\n $listaEmpleados = array();\n\n $objetoAccesoDatos = AccesoDatos::RetornarObjetoAcceso();\n\n /* $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT empleados.nombre,empleados.apellido,\n empleados.dni,empleados.sexo,empleados.legajo,\n empleados.sueldo,empleados.turno,empleados.pathFoto,\n FROM empleados\");*/\n\n $consulta = $objetoAccesoDatos->RetornarConsulta(\"SELECT * FROM empleados\");\n\n //Atenti con el alias.\n\n $consulta->execute();\n\n $consulta->execute();\n while ($fila = $consulta->fetch(PDO::FETCH_OBJ)) {\n $empleado = new Empleado();\n /*$empleado->Set = $fila->id;*/\n\n $empleado->SetNombre($fila->nombre);\n $empleado->SetApellido($fila->apellido);\n $empleado->SetDni($fila->dni);\n $empleado->SetSexo($fila->sexo);\n $empleado->SetLegajo($fila->legajo);\n $empleado->SetSueldo($fila->sueldo);\n $empleado->SetTurno($fila->turno);\n $empleado->SetPathFoto($fila->pathFoto);\n\n array_push($listaEmpleados, $empleado);\n }\n return $listaEmpleados;\n }", "title": "" }, { "docid": "b86603242ee22c4a1158cce855a260bd", "score": "0.58475274", "text": "protected function listData() {\n $sql = \"SELECT * FROM \" . call_user_func(array($this->model(), \"table_name\")) . \" WHERE is_visible=? ORDER BY position\";\n $instances = ModelHelper::objectsToArray( call_user_func(array($this->model(), \"find_by_sql\"), $sql, array(true)) );\n $instanceRows = array();\n if (!empty($instances)) {\n foreach ($instances as $instanceArray) {\n if($instanceArray[\"type\"] == \"password\"){\n $value = \"********\";\n }\n else{\n $value = $instanceArray[\"value\"];\n if(strlen($value) > 40){\n $value = substr($value, 0, strrpos( substr($value, 0, 41), \" \") ) . \"...\";\n }\n }\n $instanceRow = array(\n // List your field names here\n $instanceArray[\"name\"],\n $value,\n $this->listActions($instanceArray),\n $instanceArray[\"position\"]\n );\n if ($this->setupSortable) {\n $instanceRow[] = $instanceArray['id'];\n array_unshift($instanceRow, $instanceArray[$this->dragField]);\n }\n $instanceRows[] = $instanceRow;\n }\n }\n return $instanceRows;\n }", "title": "" }, { "docid": "e4b4ebaa124c0541ba42dd65cf7ed2ea", "score": "0.58331555", "text": "public function atributos(){\n $atributos = [];\n\n foreach(static::$columnasDB as $columna){\n if($columna === 'id') continue; //Ignoramos el id\n $atributos[$columna] = $this->$columna;\n }\n\n return $atributos;\n }", "title": "" }, { "docid": "3732a40783fb92b1eab1dc9f061c0faa", "score": "0.58274776", "text": "function gerarObjTabela($array_horarios){\n $lista_tabela = array();\n foreach($array_horarios as $horario){\n $lista_tabela[] = new Tabela(\"DISPONIVEL\", $horario); // add todos os objetos\n }\n return $lista_tabela;\n }", "title": "" }, { "docid": "cddf9b41c42e5b27f714c977374a539d", "score": "0.58273846", "text": "public function findAllAbuelito()\n\t{\n\t\t$sql = \"SELECT * FROM abuelito\";\n\t\t$finded = $this->db->query($sql);\n\t\treturn $finded;\n\t}", "title": "" }, { "docid": "538badbbef5f8d99b1cd40751b1a9abd", "score": "0.5826857", "text": "public function trTable(): array;", "title": "" }, { "docid": "57eab4f49e3de5075cf3e1731de7a953", "score": "0.58262163", "text": "abstract public function getTablesAsArray();", "title": "" }, { "docid": "36a50e3641764ecac178c4b27c67e7fd", "score": "0.58221674", "text": "public function readAll(){\n $query = \"SELECT * FROM {$this->tabela}\";\n $stmt = Conexao::doTransaction($query);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "9767f35939d63ceccb123bb55549c8df", "score": "0.58181614", "text": "public function buscaTabelasBD() {\n // busca quais dessas tabelas possuem uma estrutura MVC na pasta\n\n $sql = \"SHOW TABLES\";\n $sql = self::db()->query($sql);\n \n $nome = $GLOBALS['config']['db'];\n // echo print_r($GLOBALS); exit;\n \n if($sql->rowCount()>0){\n $tabelas = $sql->fetchAll(PDO::FETCH_ASSOC);\n // print_r($tabelas); exit;\n $tabelasDB = array();\n foreach ($tabelas as $key => $value) {\n $tabAtual = '';\n $tabAtual = trim(strtolower( $value['Tables_in_'.$nome] ));\n \n $sql = self::db()->query(\"SHOW FULL COLUMNS FROM \" . $tabAtual);\n $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n \n foreach ($result as $chave => $valor ) {\n // $tabelasDB[$tabAtual][] = [\n // 'nomecampo' => $valor['Field'],\n // 'tipotamanho' => $valor['Type'],\n // 'obrigatorio' => $valor['Null'],\n // 'comentario' => json_decode($valor['Comment'])\n // ];\n if ($valor['Null'] == 'NO'){\n $tabelasDB[$tabAtual][] = \"`\".$valor['Field'].\"` \".$valor['Type'].\" NOT NULL COMMENT '\".$valor['Comment'].\"'\";\n \n }else{\n $tabelasDB[$tabAtual][] = \"`\".$valor['Field'].\"` \".$valor['Type'].\" NULL COMMENT '\".$valor['Comment'].\"'\";\n } \n \n }\n }\n // print_r($tabelasDB); exit;\n return $tabelasDB;\n }\n }", "title": "" }, { "docid": "b7fcaff894053c0a2b4909eb18047d1b", "score": "0.58166987", "text": "public static function listAll(){\n\t\t$conexion = new Conexion();\n\t\t$consulta = $conexion->prepare('SELECT * FROM ' . self::TABLA . ' ORDER BY idetiqueta');\n\t\t$consulta->execute();\n\t\t$registros = $consulta->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $registros;\n\t}", "title": "" }, { "docid": "3b484b902e8abb4aa08c1d7bdcc6c53c", "score": "0.5813731", "text": "public function all() \n {\n return Conn::getConn()->query(\"SELECT * FROM Associados\")->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "9cb1d02b0f31202a7bf3362c95bb4715", "score": "0.5804583", "text": "private function all(){\n\n\t\treturn $this->{'full_table_'.static::$table};\n\t}", "title": "" }, { "docid": "d1b687add873b14e9d6cfd0f1058da79", "score": "0.5794814", "text": "protected function fijarAtributos(){\n \n return array(\"cod_asiento\",\"cod_sala\",\"fila\",\"columna\");\n \n }", "title": "" }, { "docid": "7ad46550ea0d95a745c8bdd98b5e9b83", "score": "0.5790656", "text": "public function rowAll(){\n\n return $this->MSmodel->get()->toArray();\n\n }", "title": "" }, { "docid": "7a6f6e209f1bc047d21a2dbc4817c4bb", "score": "0.5786402", "text": "function listRows () {\n\t\tif(isset($_POST[\"remove\"])){\n\t\t\t$this->remove();\n\t\t}\n\n\t\t$empleados = WPE_DB::listRows();\n\t\tinclude PLUGIN_VIEWS_PATH.\"list.php\";\n\n\t}", "title": "" }, { "docid": "58157dfeb25f68b7a36ccc793a7d5bb5", "score": "0.5766862", "text": "public function getRowsList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "de1aa1b62e88643866d2550c771fcb2a", "score": "0.57651687", "text": "public function listarTipos(){\n//\t\t$this->values = array();\n//\t\treturn $this->fetch();\n\t\t$tipo1->id = 1;\n\t\t$tipo2->id = 1;\n\t\t\n\t\treturn array($tipo2,$tipo2);\n\t}", "title": "" }, { "docid": "2c62f9e931c54bd847a1c1f88b9727c6", "score": "0.57629335", "text": "public function get_all()\n\t{\n\t\treturn $this->db->get($this->tabla)->result();\n\t}", "title": "" }, { "docid": "36507e88820724501f78fd0750293066", "score": "0.57628274", "text": "public function selectAll($table){\r\n\t\t$sql= \"SELECT * FROM {$table}\";\r\n\r\n\t\t$query = $this->db->prepare($sql);\r\n\r\n\t\t$query->execute();\r\n\t\t//pretvaramo svaki todo u objekat\r\n\t\treturn $query->fetchAll(PDO::FETCH_OBJ);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e3d800adacc9b3cfd1e6ddaceb53d553", "score": "0.57498115", "text": "public static function getAlumnosModel($tabla)\n\t{\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\t\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}", "title": "" }, { "docid": "8da274a1c341c4101981fd4d386b6f91", "score": "0.57253337", "text": "public function findAll() :array{\r\n\r\n \r\n $resultat = $this->pdo ->query(\"SELECT * FROM {$this->table}\"); \r\n $items = $resultat->fetchAll();\r\n return $items; \r\n\r\n }", "title": "" }, { "docid": "584d445dac7831e9afb99d1e923eb2cb", "score": "0.5723739", "text": "public function findAll()\n {\n return $this->getTable();\n }", "title": "" }, { "docid": "4e98c4855a6b4ac1617c831cddc1daf3", "score": "0.5722921", "text": "public function obtenerMaestrosModel($tabla){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\r\n\t\t$stmt->execute();\r\n\r\n\t\treturn $stmt->fetchAll();\r\n\t}", "title": "" }, { "docid": "133666d4e4e19e994887e52257a19b88", "score": "0.57069856", "text": "public function obtenerAlumnosModel($tabla){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT matricula, nombre FROM $tabla\");\r\n\t\t$stmt->execute();\r\n\r\n\t\treturn $stmt->fetchAll();\r\n\t}", "title": "" }, { "docid": "b677f63479a880d9785ec2d73e60ce5a", "score": "0.5706973", "text": "abstract public function listTables();", "title": "" }, { "docid": "94cccf23dcc31ad972acf3da62428f63", "score": "0.5706432", "text": "public static function all()\n {\n // query de consuta BD\n // Con (static), heredamos el metodo y va a buscara dicho atributo en la clase que se este heredando\n $query = \"SELECT * FROM \" . static::$tabla;\n // resultado\n $resultado = self::consultarSQL($query);\n // retornamos\n return $resultado;\n }", "title": "" }, { "docid": "5d2a8c5138dd3b028f8d2e5007f81ad1", "score": "0.570325", "text": "public function vistaMaestrosModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT m.num_empleado as num_empleado, m.nombre as nombre, m.email as email, c.nombre as nombre_carrera, m.nivel as nivel FROM $tabla as m inner join carrera as c on m.id_carrera=c.id\");\t\r\n\t\t$stmt->execute();\r\n \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "title": "" }, { "docid": "d8cb09546a192b9e378464f93534e4f4", "score": "0.5699549", "text": "function listar_tipos() \n {\n return orm::find(orm::tipo_maquina,[\n \"conexion\" => $this->db,\n \"cabeceras\" => false,\n \"json\" => true\n ]);\n }", "title": "" }, { "docid": "9d1e88dfd92a1083d4c77f61221a0c35", "score": "0.5699458", "text": "private function GetLista(){\n $i = 1;\n //eu estou chamando o meu metodo listar dados da classe conexão\n while($lista = $this->ListarDados()):\n $this->itens[$i] = array(\n 'idProduto'=> $lista['id_Produto'],\n 'nomeProduto' => $lista['nomeProduto'],\n 'referencia' => $lista['referencia'],\n 'custo' => 'R$ ' . str_replace(\".\", \",\", $lista['custo']),\n 'venda' => 'R$ ' . str_replace(\".\", \",\", $lista['venda']),\n 'lucro' => 'R$ ' . str_replace(\".\", \",\", $lista['lucro'])\n );\n $i++;\n endwhile;\n }", "title": "" }, { "docid": "6cba137454630d55e9538c74c407e095", "score": "0.56965345", "text": "public function all()\r\n {\r\n return $this->query('SELECT * FROM `'.$this->table.'`')->fetchAll(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "e5d8dd225f4551eb487bca86befe2bdf", "score": "0.56885254", "text": "public function idiorm() {\n\n $categories = ORM::for_table('categorie')->find_result_set();\n // print_r($categorie);\n\n // foreach ($categories as $categorie) {\n // echo $categorie->LIBELLECATEGORIE.'<br>';\n // }\n\n $auteurs = ORM::for_table('auteur')->find_result_set();\n\n echo '<table>';\n\n foreach ($auteurs as $auteur) {\n\n echo '<tr>';\n echo '<td>'.$auteur->IDAUTEUR.'</td>';\n echo '<td>'.$auteur->PRENOMAUTEUR.'</td>';\n echo '<td>'.$auteur->NOMAUTEUR.'</td>';\n echo '<td>'.$auteur->EMAILAUTEUR.'</td>';\n echo '</tr>';\n\n echo '</table>';\n\n}\n\n }", "title": "" }, { "docid": "c705f8cab60e24fb1fc9d1c2dcadaa01", "score": "0.56875813", "text": "static function all(){\n\t\t$model = new static();\n\n\t\t// xay dung ra cau select voi table name tu lop static\n\t\t$model->queryBuilder = \"select * from \" . $model->tableName;\n\t\treturn $model->get();\n\t}", "title": "" }, { "docid": "ac3cec2d989d3a767fb7272aec4a9f91", "score": "0.56870836", "text": "public static function all(){\n\n $query = \"SELECT * FROM \". static::$tabla;// static hace referencia a la variable que esta en todas las clases heredadas\n $resultado = self::consultarSQL($query);\n \n return $resultado;\n }", "title": "" }, { "docid": "f642034e542c640f3cad34b87e1d36cc", "score": "0.56862915", "text": "public static function all(){\n // Escribir el query\n $query = \"SELECT * FROM \" . static::$tabla;\n \n // Consultar la base de datos\n $resultado = self::consultarSQL($query);\n return $resultado;\n }", "title": "" }, { "docid": "76d3a368929bfc45d72798d8bd415600", "score": "0.56798357", "text": "function addTabla($valor=\"\"){\r\n\t\t\t$this->tabla[]=$valor;\r\n\t\t}", "title": "" }, { "docid": "89ed3a05136b43bdf84dcf43b5ed889f", "score": "0.56782705", "text": "public function findAll() {\n $sql = \"SELECT * FROM controleur\";\n\n try {\n $sth = $this->pdo->prepare($sql);\n $sth->execute();\n $rows = $sth->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e) {\n throw new Exception(\"Erreur lors de la requête SQL : \" . $e->getMessage());\n }\n\n $controleurs = array();\n\n foreach ($rows as $row) {\n $controleurs[] = new Controleur($row);\n }\n\n // Retourne un tableau d'objets\n return $controleurs;\n \n\n // Retourne un tableau\n return new Controleur($row);\n\n }", "title": "" }, { "docid": "17e4a314144fc27560a48f322a81cfe9", "score": "0.5675875", "text": "public function obtenerDatosAlumnos(){\n $datosDeAlumnos = array();\n \n //Esta funcion del modelo no pide la tabla ya que se trata de una union de todas las tres tablas existentes para traer todos los datos completos y entendibles\n $datosDeAlumnos = Datos::traerDatosAlumnos();\n\n return $datosDeAlumnos;\n }", "title": "" }, { "docid": "01545e03600910af321767bf180daf1b", "score": "0.5673188", "text": "public function getElementos()\n {\n return $this->elementos;\n }", "title": "" }, { "docid": "6ee75c7e961641332d99a8c6bb8a74d3", "score": "0.56728846", "text": "public function obtenerTutoresModel($tabla){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT num_empleado, nombre FROM $tabla\");\r\n\t\t$stmt->execute();\r\n\r\n\t\treturn $stmt->fetchAll();\r\n\t}", "title": "" }, { "docid": "2fdffdc2a677d469b7733d0257c024bc", "score": "0.5664619", "text": "function get_tablas()\n\t{\n\t\t$datos = simplexml_load_file($this->archivo);\n\t\t$salida = array();\n\t\tforeach ($datos as $tabla => $filas) {\n\t\t\t$tabla = utf8_d_seguro($tabla);\n\t\t\t$salida[$tabla] = array();\n\t\t\tforeach ($filas as $fila) {\n\t\t\t\t$registro = array();\n\t\t\t\t$vars = get_object_vars($fila);\n\t\t\t\tforeach ($vars as $clave => $valor) {\n\t\t\t\t\t$valor = utf8_d_seguro(strval($valor));\n\t\t\t\t\tif ($valor === '') {\n\t\t\t\t\t\t$valor = null;\n\t\t\t\t\t}\n\t\t\t\t\t$registro[utf8_d_seguro($clave)] = $valor;\n\t\t\t\t}\n\t\t\t\t$salida[$tabla][] = $registro;\t\t\t\t\n\t\t\t}\n\n\t\t}\n\t\treturn $salida;\n\t}", "title": "" }, { "docid": "23a45dcaf0f5082baa7b9cad63cfc63a", "score": "0.5662788", "text": "function montaColunas($aRegistros) {\n echo '<thead>';\n echo '<tr>';\n foreach(getFirstFromArray($aRegistros) as $sColuna => $xValor) {\n trataTituloColuna($sColuna); \n }\n echo '</tr>';\n echo '</thead>';\n}", "title": "" }, { "docid": "590fc580cca3a06585af705434bac25f", "score": "0.5661588", "text": "public static function cargarTabla($coleccion, $marca){\n \n $data = array();\n $names = array();\n $mod = Modelo::where(\"coleccion_id\", $coleccion)\n ->where(\"marca_id\", $marca)\n ->where(\"status_id\", 1)\n ->get();\n\n foreach ($mod as $m) {\n\n \n $data [] = \"\n <tr>\n <td>\n \".$m->id.\"\n <input type='hidden' value='\".$m->id.\"' id='modelo_id_\".$m->id.\"' name='modelo_id[]'>\n </td>\n <td>\n <button type='button' class='btn-link btn_nm' value='\".$m->name.\"'>\n \".$m->name.\"\n </button>\n </td>\n <td>\n <select class='form-control montura_modelo' name='montura[]' id='montura_\".$m->id.\"'>\n <option value=''>...</option>\n \".Asignacion::Monturas($m->montura).\"\n </select>\n </td>\n <td>\n \".$m->estuche.\"\n <input type='hidden' value='\".$m->estuche.\"' name='estuche[]' class='estuches'>\n </td>\n <td id='td_precio'>\n <input type='number' step='0.01' max='999999999999' min='0' value='\".ColeccionMarca::cargarPrecios($m->coleccion_id, $m->marca_id)->precio_venta_establecido.\"' name='precio_montura[]' class='form-control numero costo_modelo' id='costo_\".$m->id.\"'>\n </td>\n <td><input type='text' name='precio_modelo[]' class='preciototal' readonly=''></td>\n <td>\n <input type='hidden' name='check_model[]' value='0' class='hidden_model' id='hidden_\".$m->id.\"'>\n <input type='checkbox' onclick='checkModelo(this)' class='check_model' value='\".$m->id.\"'>\n </td>\n </tr>\"; \n }\n\n foreach ($mod->unique(\"name\") as $val) {\n $names [] = \"<button type='button' class='btn-link btn_nm' value='\".$val->name.\"'>\n \".$val->name.\"\n </button>\"; \n }\n\n return response()->json([\n \"data\" => $data,\n \"names\" => $names,\n ]);\n }", "title": "" }, { "docid": "2dd80352cb5f3f1174edc79129001892", "score": "0.56357217", "text": "public function all(){\n $this->run();\n return $this->stmt->fetchall(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "11a29d8360ec22ca698f62c8b7e55df1", "score": "0.56356144", "text": "function buscarDados($tabela='', $elementos='', $condicao=array()){\n $this->CI->db->select($elementos);\n $this->CI->db->where($condicao);\n return $this->CI->db->get($tabela)->row_array();\n }", "title": "" }, { "docid": "adc347a67a792e5ff127b3397b20c6c0", "score": "0.5635166", "text": "public function readAll(){\r\n $query = \"SELECT * FROM actividad;\";\r\n $statement = $this->cdb->prepare($query);\r\n $statement->execute();\r\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\r\n return $rows; \r\n }", "title": "" }, { "docid": "b8f99cc724ba424873125c7acbdd8bb8", "score": "0.56350404", "text": "function getResultados()\n\t{\n\t\treturn $this->consulta->get_filas();\n\t}", "title": "" }, { "docid": "392a079a14d49f0ff0b67fa73faa0865", "score": "0.563443", "text": "public function obtenerDatosTutores(){\n\n $datosDeTutores = array();\n \n //Manda llamar una funcion desde el modelo pasandole el nombre de la tabla desde dodne va a traer los datos\n $datosDeTutores = Datos::traerDatosTutores(\"tutores\");\n\n return $datosDeTutores;\n }", "title": "" }, { "docid": "66281599c56904001ba20d875de74fd7", "score": "0.5627874", "text": "abstract public function list_tables();", "title": "" }, { "docid": "98ba579efa575c6e8f9a8e340604f97b", "score": "0.56231153", "text": "public function getAllEtudiant()\n {\n $lesEtudiants = array();\n $query = $this->db->prepare(\"SELECT * FROM Etudiant NATURAL JOIN Personne\");\n $query->execute();\n $datas = $query->fetchAll();\n\n foreach ($datas as $data) {\n $unEtudiant = new Etudiant($data[\"idEtudiant\"], $data[\"lienCV\"], $data[\"linkedIn\"],$data[\"twitter\"],$data[\"idPersonne\"],$data[\"nom\"],$data[\"prenom\"],$data[\"description\"],$data[\"telephone\"],$data[\"mail\"],$data[\"mdp\"]);\n array_push($lesEtudiants, $unEtudiant);\n }\n return $lesEtudiants;\n }", "title": "" }, { "docid": "a6112554e5a8ce7be3e130913dba7d9d", "score": "0.5622262", "text": "public function vistaGruposModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * from grupos\");\t\r\n\t\t$stmt->execute();\r\n \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "title": "" }, { "docid": "337a3e4fa1f6e7fa69cde96c1b26e69e", "score": "0.5617817", "text": "static function rechercheEmployes(){\n $mysqli=EmployesMysqliDAO::connectTo();\n mysqli_query($mysqli, 'SELECT * FROM emp');\n $serv = mysqli_query($mysqli, 'SELECT * FROM emp');\n $data = mysqli_fetch_all($serv, MYSQLI_ASSOC);\n foreach ($data as $value) {\n $tab[] = $employes = new Employe2();\n $employes->setNoemp($value[\"noemp\"])->setNom($value[\"nom\"])->setPrenom($value[\"prenom\"])->setEmploi($value[\"emploi\"])->setSup($value[\"sup\"])->setEmbauche($value[\"embauche\"])->setSal($value[\"sal\"])->setComm($value[\"comm\"])->setNoserv($value[\"noserv\"]);\n }\n return $tab;\n }", "title": "" }, { "docid": "eb4048686196b11aceb5caa17b129ea9", "score": "0.5617053", "text": "public function getTablesList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "c9e7a5f249b7890a5565ba69ef5c87f6", "score": "0.561649", "text": "public function todos(){\n $consulta = \"SELECT * FROM \".$this->tabla;\n $resultado = $this->conexion->query($consulta);\n $productos = array();\n while($fila = $resultado->fetch_assoc()) {\n array_push($productos, $fila);\n }\n return $productos;\n }", "title": "" }, { "docid": "cf955b130ac2e61a3037a76f31dea02e", "score": "0.5613991", "text": "public function vistaHabitacionesModel2($tabla,$tipo){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, precio, tipo , imagen,numero FROM $tabla WHERE tipo='\".$tipo.\"'\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "title": "" }, { "docid": "4bae963688726488ea0c93fbe9f3bf5a", "score": "0.56118774", "text": "public function buscaEmpresasTabela() {\n $sql = \"SELECT empresas.id, empresas.nome, empresas.telefone1, empresas.email, contatos.nome AS contato FROM empresas LEFT JOIN contatos ON empresas.id_contato = contatos.id\";\n $sql = $this->db->prepare($sql);\n $sql->execute();\n return $sql->fetchAll();\n }", "title": "" }, { "docid": "e4d657bd60fdb2d691689edb49e2cf6d", "score": "0.56059295", "text": "public function get_all(){\n try{\n $r=parent::connect()->prepare(\"SELECT * FROM usuario\");\n $r->execute();\n return $r->fetchAll(PDO::FETCH_OBJ);\n }catch (Exception $e){\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "c8fcb02f8ecf5a5d8b2fee8f132fae56", "score": "0.5601053", "text": "function listaEmpleados(){\n //Construimos la consulta\n $sql=\"SELECT * from empleados order by alta desc\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=null){\n //Montamos la tabla de resultados\n $tabla=[];\n while($fila=$resultado->fetch_assoc()){\n $tabla[]=$fila;\n }\n return $tabla;\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "9f514cc216d281998c58dbc82c4cca51", "score": "0.55936956", "text": "public function vistaProductosModel($tabla){\n\n $stmt = Conexion::conectar()->prepare(\"SELECT id, nombre, talla, precio_unitario FROM $tabla\");\t\n $stmt->execute();\n \n #fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \n return $stmt->fetchAll();\n \n $stmt->close();\n \n }", "title": "" }, { "docid": "0ced6e480ccf48cbea52fb686522297d", "score": "0.5592255", "text": "function cuentaListaMotor(){\n //Construimos la consulta\n $sql=\"SELECT count(*) as 'recuento' from motor WHERE leido = 1 \";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=null){\n //Montamos la tabla de resultados\n $tabla=[];\n while($fila=$resultado->fetch_assoc()){\n $tabla[]=$fila;\n }\n return $tabla;\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "5f316e1276275086c730a3b6db771f70", "score": "0.55889344", "text": "public static function vistaUsuariosModel($tabla){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla \");\n\t\t\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n}", "title": "" }, { "docid": "a0917a3e17b52bb1bcbd92255be52751", "score": "0.558525", "text": "public function vistaReservasModel3($tabla,$tipo){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, nombreCliente, idHabitacion ,fecha,dias FROM $tabla WHERE id=\".$tipo.\"\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "title": "" }, { "docid": "7ebd846d960231ace613e62ad808cb35", "score": "0.5584432", "text": "public abstract function obtnCampos($esquema, $tabla);", "title": "" }, { "docid": "d9344985f9261c6af3cb95f3a9b4fd78", "score": "0.5582216", "text": "function Questions_Level_Table_Data()\n {\n return\n array_merge\n (\n $this->Questions_Level_Table_Data_Show(),\n $this->Questions_Level_Table_Data_Edit()\n );\n }", "title": "" }, { "docid": "65dcd543791088cb745f52dfcc00466b", "score": "0.558073", "text": "public function all()\n {\n $sqlComm = \"SELECT * FROM $this->table ORDER BY unit;\";\n $resp = $this->dbase->query($sqlComm);\n if (!empty($resp)) {\n $aUnit = array();\n foreach ($resp as $row) {\n $id = $row['id'];\n $unidade = $row['unit'];\n $aUnit[$id] = $unidade;\n }\n }\n return $aUnit;\n }", "title": "" }, { "docid": "eba2887fd837cf189fad0a998688f148", "score": "0.5575686", "text": "function listaEmpleadosActivos(){\n //Construimos la consulta\n $sql=\"SELECT * from empleados where alta = 0 AND vacaciones = 0 AND incapa_temporal = 0\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=null){\n //Montamos la tabla de resultados\n $tabla=[];\n while($fila=$resultado->fetch_assoc()){\n $tabla[]=$fila;\n }\n return $tabla;\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "1800af174fe4b6153b90bb9bae14661a", "score": "0.5573422", "text": "public function all() \n {\n return Conn::getConn()->query(\"SELECT * FROM Denuncias\")->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "8ef7ad72997b332dee76b69ec1a88dad", "score": "0.5571276", "text": "public function obtenerTodos()\n\t{\n\t\ttry\n\t\t{\n $this->conectar();\n\n\t\t\t$lista = array(); /*Se declara una variable de tipo arreglo que almacenará los registros obtenidos de la BD*/\n\n\t\t\t$sentenciaSQL = $this->conexion->prepare(\" SELECT gt.id as Clave, concat(t.nombre, ' ', t.apellido1, ' ', t.apellido2) as Tutor, actividad as Actividad,\n count(a.nocontrol) as noalumnos from grupos_tutorias gt\n left join tutores t on gt.idTutor = t.id left join alumnos_grupo ag on ag.idgrupo = gt.id\n left join alumnos a on a.nocontrol = ag.noControl group by gt.id;\"); /*Se arma la sentencia sql para seleccionar todos los registros de la base de datos*/\n\n\t\t\t$sentenciaSQL->execute();/*Se ejecuta la sentencia sql, retorna un cursor con todos los elementos*/\n\n /*Se recorre el cursor para obtener los datos*/\n\t\t\tforeach($sentenciaSQL->fetchAll(PDO::FETCH_OBJ) as $fila)\n\t\t\t{\n\t\t\t\t$obj = new Grupos();\n $obj->clave = $fila->Clave;\n\t $obj->tutor = $fila->Tutor;\n\t $obj->actividad = $fila->Actividad;\n\t $obj->No_Alumnos = $fila->noalumnos;\n\n\n\n\t\t\t\t$lista[] = $obj;\n\t\t\t}\n\n\t\t\treturn $lista;\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\techo $e->getMessage();\n\t\t\treturn null;\n\t\t}\n\t\t// finally\n\t\t// {\n // Conexion::cerrarConexion();\n // }\n\t}", "title": "" }, { "docid": "4f5e460d7d4a5a51195627e02edb4ec7", "score": "0.5564586", "text": "private function table_data()\n {\n $data = Mirakel_Woocommerce_Carts::prepare_list_data();\n return $data;\n }", "title": "" }, { "docid": "1d76c7bebd3e5f75c2f8be3a81baacd3", "score": "0.556085", "text": "protected function getTableRows()\n {\n return NavigationAdmin::with('parent', 'roles')->get();\n }", "title": "" }, { "docid": "940f0d3425e32d5c0d84674080a86f95", "score": "0.5559563", "text": "function actTabla($valor=\"\"){\r\n\t\t\t$this->tabla=$valor;\r\n\t\t}", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "142583410c23ceb174a4cb1326a6b70c", "score": "0.0", "text": "public function up(Schema $schema): void\n {\n $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE oekraine_registraties DROP FOREIGN KEY FK_7E55584C3C427B2F');\n $this->addSql('DROP INDEX IDX_7E55584C3C427B2F ON oekraine_registraties');\n $this->addSql('ALTER TABLE oekraine_registraties CHANGE klant_id bezoeker_id INT DEFAULT NULL');\n $this->addSql('ALTER TABLE oekraine_registraties ADD CONSTRAINT FK_7E55584C8AEEBAAE FOREIGN KEY (bezoeker_id) REFERENCES oekraine_bezoekers (id)');\n $this->addSql('CREATE INDEX IDX_7E55584C8AEEBAAE ON oekraine_registraties (bezoeker_id)');\n $this->addSql('ALTER TABLE oekraine_incidenten CHANGE politie politie TINYINT(1) NOT NULL, CHANGE ambulance ambulance TINYINT(1) NOT NULL, CHANGE crisisdienst crisisdienst TINYINT(1) NOT NULL');\n }", "title": "" } ]
[ { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.7916748", "text": "abstract public function up();", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.7916748", "text": "abstract public function up();", "title": "" }, { "docid": "2b6b08a052405f52f7571399eebafe14", "score": "0.7808676", "text": "abstract function up();", "title": "" }, { "docid": "db15cd39e9f5f1d11c314e7a40b1d354", "score": "0.76057225", "text": "public function up()\n {\n // @todo: develop migration up features\n $this->getSchema()->table('profiles', function ($table){\n $table->text('about')->nullable()->after('url');\n });\n parent::up();\n }", "title": "" }, { "docid": "6bb8bf1b1ffd742a90c171c8d71d3102", "score": "0.7594583", "text": "public function safeUp()\n {\n $this->createTable('product_pictures', [\n 'id' => Schema::TYPE_PK,\n 'title' => Schema::TYPE_STRING . '(150)',\n 'file' => Schema::TYPE_STRING .'(50)',\n 'product_id' => Schema::TYPE_INTEGER,\n ]);\n $this->addForeignKey('fk_pp_product_id', 'product_pictures', 'product_id', 'products', 'id');\n }", "title": "" }, { "docid": "cc1bc4187aa8deb43b3e84aac322e3ef", "score": "0.7513112", "text": "public function safeUp()\n {\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN owner_name character varying(255);\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN contact_no character varying(255);\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN present_use text;\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN construction_date_age character varying(255);\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN renovation_history text;\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE heritage_assessment.heritage\n ADD COLUMN architectural_style character varying(255);\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n }", "title": "" }, { "docid": "6779c2251748fceb57bfce22aea93014", "score": "0.7445049", "text": "abstract public function up(): void;", "title": "" }, { "docid": "d7077d27ee1f30736d0ea56bd056a5a7", "score": "0.74445474", "text": "public function up()\n {\n foreach (HojaRutaSubClases::all() as $sub) {\n $sigla = $this->siglas[$sub->getKey()] ?? null;\n if ($sigla) {\n $sub->sigla = $sigla;\n $sub->save();\n }\n }\n foreach (HojaRutaSubClases::all() as $sub) {\n foreach (HojaRuta::where('subtipo_tarea', $sub->sub_clase_id)->get() as $hoja) {\n DB::table('hoja_ruta')->where('hr_id', $hoja->getKey())->update([\n 'nro_clasificacion' => $sub->sigla . '-' . $hoja->contador_clasificacion,\n ]);\n }\n }\n }", "title": "" }, { "docid": "a16413a1ff35a09266010528db442c7b", "score": "0.7439395", "text": "public function safeUp()\n\t{\n $this->createTable('project_template_tasks', array(\n 'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n 'project_template_id' => 'INT(11) NOT NULL',\n 'source_lang_id' => 'INT(11) UNSIGNED NOT NULL',\n 'subtitle_provided' => 'TINYINT(1) DEFAULT 0',\n 'job_type_id' => 'INT(11) NOT NULL',\n 'estimated_duration' => 'INT(10) UNSIGNED NOT NULL',\n ), 'DEFAULT CHARSET=\"utf8\" collate utf8_unicode_ci');\t \n\t}", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.7431686", "text": "public function up()\n {\n }", "title": "" }, { "docid": "1ecae68b3a02c3c199ffafaa5577c436", "score": "0.7416931", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'lft' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'rgt' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'level' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'label' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Название\"',\n 'alias' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Алиас\"',\n 'description' => Schema::TYPE_TEXT. ' DEFAULT NULL COMMENT \"Описание\"',\n 'visible' => Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"Отображать\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n }", "title": "" }, { "docid": "c9b1e733f60bdbf1f783c18e39eda156", "score": "0.7413379", "text": "public function safeUp()\n {\n $this->createTable('service2tag',[\n 'service_id'=>Schema::TYPE_INTEGER,\n 'tag_id'=>Schema::TYPE_INTEGER,\n ]);\n $this->addPrimaryKey('index','service2tag',['service_id','tag_id']);\n $this->addForeignKey('service','service2tag','service_id','service','id','CASCADE','NO ACTION');\n $this->addForeignKey('tag','service2tag','tag_id','tag','id','CASCADE','NO ACTION');\n }", "title": "" }, { "docid": "d918fc205c59582b9be4cb52cd74dfb6", "score": "0.7404247", "text": "public function up() : void\n\t{\n\t $this->forge->addField(self::FIELDS);\n $this->forge->createTable(self::TABLE);\n\t}", "title": "" }, { "docid": "cac377d888f7a6b1877e89210b7445a5", "score": "0.7397122", "text": "public function up()\n\t{\n\t\t$fields = array(\n\t\t\t'otm_defect_df_seq' => array('type' => 'int(11)','null' => TRUE)\n\t\t);\n\t\t$this->dbforge->add_column('otm_testcase_result', $fields,'otm_testcase_link_tl_seq');\n\t\n\t\t/**\n\t\t* OTM New Table\n\t\t*/\n\n\t\t$this->migration_data();\n\t}", "title": "" }, { "docid": "16974e00a07a2b4aece8c8b92142217c", "score": "0.7392501", "text": "public function up()\n {\n Yii::$app->db->createCommand('update {{%vendor}} SET vendor_name_ar=\"بائع\" where vendor_name_ar=\"\" OR vendor_name_ar IS NULL')->execute();\n\n //arabic values for vendor_item - item_name_ar\n Yii::$app->db->createCommand('update {{%vendor_item}} SET item_name_ar=\"منتج\" where item_name_ar=\"\" OR item_name_ar IS NULL')->execute();\n }", "title": "" }, { "docid": "fc7569d7c95c545dfcd32e26af661015", "score": "0.73890793", "text": "public function up()\n {\n $fields = array(\n 'created_at' => array('type' => 'TIMESTAMP'),\n 'updated_at' => array('type' => 'TIMESTAMP'),\n );\n $this->dbforge->add_column('users', $fields);\n }", "title": "" }, { "docid": "e0703246f29449ab1bfea3f02e2f7d3c", "score": "0.73787975", "text": "public function safeUp()\n {\n $this->alterColumn('device', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('device', 'paper_autocut', 'TINYINT NULL AFTER `lf_setelah`');\n $this->addColumn('device', 'cashdrawer_kick', 'TINYINT NULL AFTER `paper_autocut`');\n }", "title": "" }, { "docid": "366cf61a12a2d07cfc7f4de238a7676c", "score": "0.7372001", "text": "public function preUp()\n {\n }", "title": "" }, { "docid": "f08efa336ec7eba9842eab5738e35d42", "score": "0.7363783", "text": "public function up()\n {\n // `users_fields`\n $fields = $this->table('users_fields');\n $fields->changeColumn(\n 'type',\n 'enum',\n ['values' => ['string','number','date','text'], 'default' => 'string', 'comment' => 'Field Type', 'null' => false]\n )->update();\n\n // `users_field_text`\n $this->table('users_field_text')\n ->addColumn('user_id', 'integer', ['limit' => MysqlAdapter::INT_MEDIUM, 'signed' => false])\n ->addColumn('field_id', 'integer')\n ->addColumn('value', 'text', ['limit' => TEXT_MEDIUM, 'null' => false])\n ->addIndex(['user_id', 'field_id'], ['unique' => true])\n ->addForeignKey('user_id', 'users', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->addForeignKey('field_id', 'users_fields', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])\n ->create();\n }", "title": "" }, { "docid": "c5688557eb25157321d6da75d94949f9", "score": "0.73580766", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'entity_model_name' => Schema::TYPE_STRING. ' NOT NULL',\n 'entity_model_id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'file_id' => Schema::TYPE_INTEGER. ' NOT NULL',\n 'temp_sign' => Schema::TYPE_STRING. ' NOT NULL',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_entity_file_id_to_fpm_file_table',\n $this->tableName,\n 'file_id',\n '{{%fpm_file}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "e805a7092cc4bc6a13cd92660f62f30f", "score": "0.73398566", "text": "public function up()\n {\n// $sql = \"ALTER TABLE `t_hjsuscriptor` CHANGE `id_hjsuscriptor` `id_hjsuscriptor` INT( 11 ) NOT NULL AUTO_INCREMENT\";\n// $this->_db->query($sql);\n// $sql = \"ALTER TABLE `t_suscriptor_direccion` CHANGE `Id_Dir_Suc` `id_Dir_Susc` INT( 11 ) NOT NULL AUTO_INCREMENT\";\n// $this->_db->query($sql);\n// $sql = \"ALTER TABLE `t_suscriptor_producto` CHANGE `Id_Prod_Susc` `id_Prod_Susc` INT( 11 ) NOT NULL AUTO_INCREMENT\";\n// $this->_db->query($sql);\n return true;\n }", "title": "" }, { "docid": "8ca98b8587c7bf6792e277c0f8fd53da", "score": "0.7339726", "text": "public function up()\n {\n\n $this->table('users')\n ->addColumn('language', 'string', [\n 'after' => 'course',\n 'default' => 'de',\n 'length' => 10,\n 'null' => false,\n ])\n ->update();\n }", "title": "" }, { "docid": "03f8469ad706f78903a11f3c7b7d8494", "score": "0.7331769", "text": "public static function up()\n {\n DB::table(self::NAME)\n ->create(function (DBTableBuilder $table) {\n $table->field('id')->int()->increment();\n $table->field('userid')->int();\n $table->field('orgid')->int();\n $table->field('transaction_id')->varchar();\n $table->field('status')->varchar();\n $table->field('amount')->varchar();\n $table->field('pay_type')->varchar();\n $table->field('trans_type')->varchar();\n $table->field('naration')->varchar();\n });\n }", "title": "" }, { "docid": "f95897a0fb823e419d22f0567662c0a0", "score": "0.7281078", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'product_id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'similar_product_id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_store_similar_product_product_id_to_store_product_id',\n $this->tableName,\n 'product_id',\n '{{%store_product}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n\n $this->addForeignKey(\n 'fk_store_similar_product_similar_product_id_to_store_product_id',\n $this->tableName,\n 'similar_product_id',\n '{{%store_product}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "b6d132c2d6d904c1a905be1009d3ce39", "score": "0.7274579", "text": "public static function up()\n {\n DB::table(self::NAME)\n ->create(function (DBTableBuilder $table) {\n $table->field('id')->int()->increment();\n $table->field('userid')->int();\n $table->field('orgid')->int();\n $table->field('warehouseid')->int();\n $table->field('productid')->int();\n $table->field('number')->int();\n $table->field('type')->int();\n });\n }", "title": "" }, { "docid": "739d028f9020d3edc234b338b20a86ef", "score": "0.7271206", "text": "public function up()\n { \n /*\n Schema::table('users', function (Blueprint $table) {\n $table->date('dob')->nullable(false)->change(); //CHANGED dob FROM STRING TO DATE\n $table->integer('sex_uuid')->nullable(false)->change();//CHANGED sex FROM STRING TO INTEGER SO IT BECOMES A LOOKUP TO A tSex TABLE - DB NORMALISATION \n $table->string('email')->unique()->nullable(false)->change(); \n $table->string('mobile')->unique()->nullable(false)->change();\n $table->renameColumn('secret_question', 'security_question');\n $table->renameColumn('secret_answer', 'security_answer'); \n $table->integer('status_uuid')->nullable(false);//ADDED THIS AS A LOOKUP TO A tStaus TABLE\n });*/\n }", "title": "" }, { "docid": "ee40edd73acbed8cc15ddcc74069d28b", "score": "0.72542167", "text": "public function safeUp()\n\t{\n\t\t$this->createTable($this->table,array(\n\t\t\t'id'=>'pk',\n\t\t\t'title'=>'string null',\n\t\t\t'caption'=>'text null',\n\t\t\t'tags'=>'text null',\n\t\t\t'file_name'=>'string not null',\n\t\t\t'active'=>'integer default 1',\n\t\t));\n\t\t$this->createIndex('slider_title_idx',$this->table,'title',true);\n\t\t\n\t}", "title": "" }, { "docid": "9dfaeeeeff5454647a5c3a507f5f221b", "score": "0.7249677", "text": "public function up() {\n $this->dbforge->drop_table('vacancies', TRUE); \n \n \n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'auto_increment' => TRUE\n ),\n 'vacancy_name' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'vacancy_desc' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'dept_id' => array(\n 'type' => 'INT',\n 'constraint' => 11\n ),\n 'pos_id' => array(\n 'type' => 'INT',\n 'constraint' => 11\n ),\n 'last_appl_dt' => array(\n 'type' => 'DATETIME'\n ),\n 'date_updated' =>array(\n 'type'=>'DATETIME'\n ),\n 'date_created' => array(\n 'type'=>'DATETIME'\n ),\n 'updated_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'created_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n )\n ));\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('vacancies');\n }", "title": "" }, { "docid": "bdab4157e3ab998684d202cef8c1b361", "score": "0.72405505", "text": "public function safeUp()\r\n {\r\n $this->createTable('tbl_jobs', array(\r\n 'id' => 'pk',\r\n 'user_id' => 'integer NOT NULL',\r\n 'category_id' => 'integer NOT NULL',\r\n 'title' => 'text NOT NULL',\r\n 'job_category' => 'text NOT NULL',\r\n 'image_url' => 'text NOT NULL',\r\n 'description' => 'text NOT NULL',\r\n 'salary' => 'string NOT NULL',\r\n 'salary_type' => 'tinyint NOT NULL COMMENT \"1=fixed,2=range,3=negotiable\"',\r\n 'deadline' => 'datetime NOT NULL',\r\n 'job_type' => 'string NOT NULL',\r\n 'additional' => 'text NULL',\r\n 'job_location' => 'string NOT NULL',\r\n 'create_date' => 'date NOT NULL',\r\n 'update_date' => 'date NULL',\r\n 'active' => 'tinyint NOT NULL default 0'\r\n ));\r\n }", "title": "" }, { "docid": "690094c86bf110d309cd2ef542ac085a", "score": "0.7233043", "text": "public function up()\n {\n if (!Schema::hasTable($this->table)) \n {\n Schema::create($this->table, function (Blueprint $table) \n {\n $table->increments('id');\n $table->string('title', 1060)->nullable();\n $table->string('description', 1060)->nullable();\n $table->string('path',1060)->nullable();\n // if it's not organic category, the storage_category_id can be null\n $table->unsignedInteger('parent_category_id')->nullable()->comment('parent category id');\n $table->unsignedInteger('storage_category_id')->nullable()->comment('reference to the corresponding storage record for Organic Categories - storage_categories.id');\n $table->timestamps();\n });\n }\n }", "title": "" }, { "docid": "7553078deb5003db10fa302510f72d95", "score": "0.723267", "text": "public function safeUp()\n {\n $this->alterColumn('stock_opname', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n $this->addColumn('stock_opname', 'input_selisih', 'TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER `status`');\n }", "title": "" }, { "docid": "b03e67c23ec094f4ae6060e3b37da2b7", "score": "0.7227808", "text": "public function up()\n {\n $this->createTable('user_to_category', [\n 'user_id' => $this->integer(),\n 'category_id' => $this->integer(),\n 'PRIMARY KEY(user_id, category_id)',\n ]);\n $this->addForeignKey(\n 'user_id',\n 'user_to_category',\n 'user_id',\n 'user',\n 'user_id',\n 'CASCADE'\n );\n $this->addForeignKey(\n 'category_id',\n 'user_to_category',\n 'category_id',\n 'category',\n 'category_id',\n 'CASCADE'\n );\n\n }", "title": "" }, { "docid": "2d787ebe5db20cf50b93219d5ccc55f5", "score": "0.7227162", "text": "public function up() {\n if (!Schema::hasColumn('lessons', 'generated')) {\n Schema::table('lessons', function(Blueprint $table) {\n $table->boolean('generated')->default(false);\n });\n }\n\n if (!Schema::hasColumn('rooms', 'shortname')) {\n Schema::table('rooms', function(Blueprint $table) {\n $table->string('shortname', 10)->nullable()->unique();\n });\n }\n }", "title": "" }, { "docid": "66e92e64a879f3669beb288a515b9a4f", "score": "0.7226627", "text": "public function up()\n {\n $this->table('category_costs')\n -> addColumn('name', 'string')\n ->addColumn('created_at', 'datetime')\n ->addColumn('updated_at', 'datetime')\n ->save();\n }", "title": "" }, { "docid": "d9b960285f2c8abd6b9ad7bfbeacfc12", "score": "0.72205245", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'label' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Название\"',\n 'code' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Код\"',\n 'rate_to_default' => Schema::TYPE_DECIMAL. '(6,2) NOT NULL COMMENT \"Курс к главной валюте\"',\n 'is_default' => Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Главная валюта\"',\n 'visible' => Schema::TYPE_SMALLINT. '(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"Отображать\"',\n 'position' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Позиция\"',\n 'created' => Schema::TYPE_DATETIME. ' NOT NULL COMMENT \"Создано\"',\n 'modified' => Schema::TYPE_DATETIME. ' NOT NULL COMMENT \"Обновлено\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->insert($this->tableName, [\n 'label' => 'Доллар',\n 'code' => 'USD',\n 'rate_to_default' => 1,\n 'is_default' => 1,\n 'position' => 1,\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s'),\n ]);\n\n $this->insert($this->tableName, [\n 'label' => 'Гривна',\n 'code' => 'UAH',\n 'rate_to_default' => 22.55,\n 'is_default' => 0,\n 'position' => 2,\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "b264f53ca2c640e24c4ccc7e99b126de", "score": "0.72150135", "text": "public function up()\n {\n $this->createTable('tb_faculty', [\n 'id' => $this->primaryKey(),\n 'name' => $this->string(50),\n 'description' => $this->text()->null(),\n 'created_at' => $this->timestamp()->defaultExpression('now()'),\n 'updated_at' => $this->timestamp()->defaultExpression('now()')//->append('ON UPDATE now()')\n ]);\n }", "title": "" }, { "docid": "00f393441984255bd5687e7b2f5bb1ca", "score": "0.7211144", "text": "public function up()\n {\n Schema::table('anm_target_data', function (Blueprint $table) {\n $table->dropColumn('subcenter_name');\n });\n }", "title": "" }, { "docid": "af413c55f18d221e7453e2d67485b8e0", "score": "0.7210492", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('currencies',[\n\t\t\t'id' => 'pk',\n\t\t\t'name' => 'varchar(32) NOT NULL',\n\t\t\t'price' => 'decimal(11,6) NOT NULL',\n\t\t\t'symbol' => 'varchar(16) NOT NULL',\n\t\t\t'ts' => 'integer NOT NULL',\n\t\t\t'type' => 'integer(3) NOT NULL',\n\t\t\t'utctime' => 'datetime',\n\t\t\t'volume' => 'integer',\n\t\t\t'classname' => 'varchar(64) NOT NULL',\n\t\t\t'created_at' => 'timestamp DEFAULT CURRENT_TIMESTAMP',\n\t\t\t'updated_at' => 'datetime',\n\t\t], 'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n\t}", "title": "" }, { "docid": "04b971252a7c368f65970aace8383ecc", "score": "0.7199185", "text": "public function up(){\n //TODO: ADD relationship role-permissions\n Schema::create($this->table, function (Blueprint $table) {\n $table->increments('id');\n });\n\n $this->baseMigration();\n $this->auditMigration();\n\n Schema::table($this->table, function (Blueprint $table) {\n $table->unique('title');\n });\n }", "title": "" }, { "docid": "e731158e1c11b68cd556315989c1bf8f", "score": "0.71956366", "text": "public function up()\n\t{\n\t\t$fields = array(\n\t\t\t'fechaFinal' => array('type' => 'DATETIME')\n\t\t);\n\t\t$this->dbforge->add_column('orden', $fields);\n\n\t\t//copiar los datos de las siguientes columnas de vehiculo a orden\n\t\t$this->db->simple_query(\"UPDATE orden SET fechaFinal = fecha_hora\");\n\t\n\t}", "title": "" }, { "docid": "3388ae219ec37550cf9e62ffbba9efa0", "score": "0.7195611", "text": "public function up()\n {\n //foreign key and cascade on delete for table relations and column:\n // the startnode\n $this->execute(\"ALTER TABLE relations ADD CONSTRAINT startnode_fk_constraint FOREIGN KEY (startnode) REFERENCES nodes(id) ON DELETE CASCADE\");\n //nodevalue\n $this->execute(\"ALTER TABLE relations ADD CONSTRAINT nodevalue_fk_constraint FOREIGN KEY (nodevalue) REFERENCES nodes(id) ON DELETE CASCADE\");\n //geometry value\n $this->execute(\"ALTER TABLE relations ADD CONSTRAINT geometryvalue_fk_constraint FOREIGN KEY (geometryvalue) REFERENCES geometries(id) ON DELETE CASCADE\");\n //property\n $this->execute(\"ALTER TABLE relations ADD CONSTRAINT property_fk_constraint FOREIGN KEY (property) REFERENCES properties(id) ON DELETE CASCADE\");\n\n }", "title": "" }, { "docid": "6df89abc6b5fc9403922ab92431153b3", "score": "0.71841276", "text": "public function up()\n\t{\n\t\tDB::table('user_types')->insert(array(\n\t\t\t\t'name'=> 'admin',\n\t\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t\t));\n\t\tDB::table('user_types')->insert(array(\n\t\t\t\t'name'=> 'student',\n\t\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t\t));\n\t\tDB::table('user_types')->insert(array(\n\t\t\t\t'name'=> 'advisor',\n\t\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t\t));\n\t}", "title": "" }, { "docid": "e40b5557e9de42bb634e47103bbcec62", "score": "0.71811944", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n CREATE TABLE `ppxs_person_x_setting`( \n `ppxs_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `ppxs_pprs_id` SMALLINT UNSIGNED NOT NULL,\n `ppxs_psty_id` SMALLINT UNSIGNED,\n `ppxs_value` VARCHAR(256),\n `ppxs_notes` TEXT,\n `ppxs_hidded` TINYINT UNSIGNED NOT NULL DEFAULT 0,\n PRIMARY KEY (`ppxs_id`)\n ) ENGINE=INNODB CHARSET=utf8;\n\n \");\n\t}", "title": "" }, { "docid": "f7420717d83086ff4df51eac66a0d1f1", "score": "0.7177037", "text": "public function up()\n {\n $fields = array(\n 'experience_id'=> array(\n 'type' => 'INT',\n 'constraint' => 5,\n 'unsigned' => true,\n 'auto_increment' => true\n ),\n\n 'user_id' => array(\n 'type' => 'INT',\n 'unsigned' => true,\n 'constraint' => 5\n ),\n\n 'company_name' => array(\n 'type' => 'TEXT'\n ),\n 'description' => array(\n 'type' => 'TEXT'\n ),\n 'date_added' => array(\n 'type' => 'DATE',\n 'default' => NULL\n )\n\n );\n $this->dbforge->add_field($fields);\n $this->dbforge->add_key('experience_id', TRUE);\n $this->dbforge->create_table('user_experiences');\n $this->dbforge->add_column('user_experiences',[\n 'CONSTRAINT user_experience_id FOREIGN KEY(user_id) REFERENCES users(user_id)',\n ]);\n }", "title": "" }, { "docid": "fbae56e8b88af45080ea034f703270b8", "score": "0.71729493", "text": "public function safeUp()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('attributes_types', [\n 'id' => $this->primaryKey()->unsigned(),\n 'name' => $this->string(100)->notNull(),\n 'description' => $this->string(),\n ], $tableOptions);\n\n $this->addcommentOnColumn('attributes_types','name','Уникальное имя для типа ');\n\n $this->addCommentOnTable('attributes_types', 'Список типов(текст, список и тд) для аттрибутов, которые указываются при подаче объявления');\n }", "title": "" }, { "docid": "8fcc048a3556fb56a3089608fdd87473", "score": "0.7172917", "text": "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n $this->createTable('{{%tbl_product}}', [\n 'Pro_id' => $this->primaryKey(),\n 'Pro_name' => $this->string()->notNull()->unique(),\n 'Price' => $this->integer()->notNull(),\n 'SaleOf' => $this->integer()->notNull(),\n 'StartSale' => $this->date()->notNull(),\n 'EndSale' => $this->date()->notNull(),\n 'PriceSale' => $this->integer()->notNull(),\n 'Quanlity' => $this->integer()->notNull(),\n 'Size' => $this->string()->notNull(),\n 'Color' => $this->string()->notNull(),\n 'Evaluation' => $this->string()->notNull(),\n 'Tags' => $this->string()->notNull(),\n 'Image' => $this->string()->notNull(),\n 'Keywords' => $this->string()->notNull(),\n 'Description' => $this->string()->notNull(),\n 'Keywords' => $this->string()->notNull(),\n 'Content' => $this->string()->notNull(),\n 'GroupID' => $this->integer()->notNull(),\n 'Status' => $this->smallInteger()->notNull()->defaultValue(1),\n 'CateID' => $this->integer()->notNull(),\n 'SuppliresID' => $this->integer()->notNull(),\n 'UserID' => $this->integer()->notNull(),\n 'CreatedAt' => $this->date()->notNull(),\n 'UpdateAt' => $this->date()->notNull(),\n ], $tableOptions);\n }", "title": "" }, { "docid": "2d437ccd29f53b565d338baa1b4038f9", "score": "0.7164011", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "611528d15ec375bb26088db548239b79", "score": "0.71636975", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE `esq_client_messages` ADD `deleted_at` DATETIME AFTER `is_deleted`;\");\r\n $this -> executeSQL(\"UPDATE `esq_client_messages` SET `deleted_at` = `updated_at` WHERE `is_deleted` = 1;\");\r\n $this -> executeSQL(\"ALTER TABLE `esq_client_messages` DROP `is_deleted`;\");\r\n }", "title": "" }, { "docid": "8dc0faca52ebbd1ed8be3800c6b482ce", "score": "0.7158007", "text": "public function up()\n {\n $table = $this->table('city');\n $table->removeColumn('transitScore')\n ->update();\n $table->addColumn('transitScore', 'integer', array('after' => 'walkScore'))\n ->update();\n $table->changeColumn('avgTemp', 'decimal', array('precision' => 5, 'scale' => 1))\n ->update();\n }", "title": "" }, { "docid": "7d9c4349fea0bf833e0e8caa52c16175", "score": "0.715274", "text": "public function safeUp() {\n\t$this->createTable('NeighborRent', array(\n \"neighbor\"=>\"int(11) NOT NULL\",\n \"rent\"=>\"int(11) NOT NULL\",\n \"PRIMARY KEY (`neighbor`,`rent`)\",\n \"KEY `neighbor` (`neighbor`)\",\n \"KEY `rent` (`rent`)\",\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "1ab03ad18313e4aaa12e4a071f9229f4", "score": "0.7152538", "text": "public function up()\n {\n $this->addColumn('ott_main_class','one_month_price', 'decimal(8,2) default 0.00');\n $this->addColumn('ott_main_class','three_month_price', 'decimal(8,2) default 0.00');\n $this->addColumn('ott_main_class','six_month_price', 'decimal(8,2) default 0.00');\n $this->addColumn('ott_main_class','one_year_price', 'decimal(8,2) default 0.00');\n }", "title": "" }, { "docid": "982ca4c1fb7fee8573f77056055b9feb", "score": "0.71495974", "text": "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'id' => $this->bigPrimaryKey(),\n 'user_id' => $this->bigInteger()->notNull(),\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ]);\n\n $this->addForeignKey('auth_user_id_fk', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n\n $this->createIndex('auth_source_idx', $this->tableName, 'source');\n $this->createIndex('auth_source_id_idx', $this->tableName, 'source_id');\n }", "title": "" }, { "docid": "3e9500d1cb62ec6f3f10ca8aaad532c0", "score": "0.7144852", "text": "public function up()\n {\n\n $this->execute('UPDATE `strack_base` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_dir_template` SET `pattern`=\"\" WHERE `pattern` is null');\n\n $this->execute('UPDATE `strack_dir_variable` SET `record`=\"\" WHERE `record` is null');\n\n $this->execute('UPDATE `strack_download` SET `path`=\"\" WHERE `path` is null');\n\n $this->execute('UPDATE `strack_entity` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_file` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_file_commit` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_media` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_media` SET `thumb`=\"\" WHERE `thumb` is null');\n\n $this->execute('UPDATE `strack_project` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_timelog` SET `description`=\"\" WHERE `description` is null');\n\n $this->execute('UPDATE `strack_variable_value` SET `value`=\"\" WHERE `value` is null');\n\n }", "title": "" }, { "docid": "38bcadc4a8eb64a91ab043b5da6f5a38", "score": "0.71402985", "text": "public function up()\n {\n $this->alterColumn('resume', 'employment', $this->smallInteger()->unsigned());\n $this->alterColumn('resume', 'schedule', $this->smallInteger()->unsigned());\n }", "title": "" }, { "docid": "fa7b55aa1772240f5bce8b943b0b211e", "score": "0.71347904", "text": "public function up()\n {\n $this->schema->create('inv_items_precios_alquiler', function(Illuminate\\Database\\Schema\\Blueprint $table) {\n $table->increments('id');\n $table->integer('id_item');\n $table->integer('id_inv_precio');\n $table->decimal('hora',15,2);\n $table->decimal('diario',15,2);\n $table->decimal('semanal',15,2);\n $table->decimal('mensual',15,2);\n $table->decimal('tarifa_4_horas',15,2);\n $table->decimal('tarifa_15_dias',15,2);\n $table->decimal('tarifa_28_dias',15,2);\n $table->decimal('tarifa_30_dias',15,2);\n });\n }", "title": "" }, { "docid": "a995f59fef23b2059ccfce44f2573472", "score": "0.7133237", "text": "public function up()\n {\n $this->dropColumn(\"whitebook_auth_item\", \"created_datetime\");\n $this->addColumn('whitebook_auth_item', 'created_at', $this->integer());\n\n $this->dropColumn(\"whitebook_auth_item\", \"modified_datetime\");\n $this->addColumn('whitebook_auth_item', 'updated_at', $this->integer());\n\n //Fix columns in `whitebook_auth_assignment` with issues\n $this->dropColumn(\"whitebook_auth_assignment\", \"created_datetime\");\n $this->addColumn('whitebook_auth_assignment', 'created_at', $this->integer());\n\n $this->dropColumn(\"whitebook_auth_assignment\", \"modified_datetime\");\n $this->addColumn('whitebook_auth_assignment', 'updated_at', $this->integer());\n }", "title": "" }, { "docid": "fd68faeb9d5da92b954c0359bf40d139", "score": "0.71192276", "text": "public function safeUp()\n\t{\n $this->createTable(\n '{{user_user_auth_item_child}}', array(\n 'parent' => \"char(64) NOT NULL\",\n 'child' => \"char(64) NOT NULL\",\n ), $this->getOptions()\n\n );\n\n $this->addPrimaryKey(\"pk_{{user_user_auth_item_child}}_parent_child\", '{{user_user_auth_item_child}}', 'parent,child');\n $this->addForeignKey(\"fk_{{user_user_auth_item_child}}_child\", '{{user_user_auth_item_child}}', 'child', '{{user_user_auth_item}}', 'name', 'CASCADE', 'CASCADE');\n $this->addForeignKey(\"fk_{{user_user_auth_itemchild}}_parent\", '{{user_user_auth_item_child}}', 'parent','{{user_user_auth_item}}', 'name', 'CASCADE', 'CASCADE');\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.7118855", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "ebe26483a6bea141f44607edd034a20c", "score": "0.71136177", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"DROP TABLE `esq_coupons_to_websites`;\");\r\n }", "title": "" }, { "docid": "348ef1c6c702f5aa73db68173d79997e", "score": "0.71126914", "text": "public function up()\n\t{\n\t\t$rows[]=array(\n\t\t\t\t\t\t\t\"id\"=>1,\n\t\t\t\t\t\t\t\"interface\"=>\"Admin\",\n\t\t\t\t\t\t\t'enable'=>1\n\t\t\t\t\t\t);\n\t\t$rows[]=array(\n\t\t\t\t\t\t\t\"id\"=>2,\n\t\t\t\t\t\t\t\"interface\"=>\"User\",\n\t\t\t\t\t\t\t'enable'=>1\n\t\t\t\t\t\t);\n\n\t\t//ingresamos el registro en la base de datos\n\t\t\n\t\tforeach ($rows as $row) {\n\n\t\t\t$this->db->insert($this->table, $row);\t\n\t\t}\n\t\t\n \n\t}", "title": "" }, { "docid": "d1a8cd0694ccea1447b4b0a6b1254293", "score": "0.708986", "text": "public function up()\n {\n $this->execute('ALTER TABLE flag DROP FOREIGN KEY flag_ibfk_1');\n $this->execute('ALTER TABLE flag DROP FOREIGN KEY flag_ibfk_2');\n\n $this->execute('ALTER TABLE report DROP FOREIGN KEY report_ibfk_1');\n $this->execute('ALTER TABLE report DROP FOREIGN KEY report_ibfk_2');\n\n $this->execute('ALTER TABLE vote DROP FOREIGN KEY vote_ibfk_1');\n $this->execute('ALTER TABLE vote DROP FOREIGN KEY vote_ibfk_2');\n\n $this->table('flag')->drop()->save();\n $this->table('report')->drop()->save();\n $this->table('vote')->drop()->save();\n\n $this->table('archive')\n ->renameColumn('is_directory', 'directory')\n ->renameColumn('is_accepted', 'pending')\n ->renameColumn('is_visible', 'deleted')\n ->save();\n }", "title": "" }, { "docid": "8fe23ffd3fe81e28cb68dd161f2e05a1", "score": "0.7083453", "text": "public function safeUp() {\n\t$this->createTable('DBVariables', array(\n 'name'=>\"varchar(20) NOT NULL\",\n 'value'=>\"varchar(50) NOT NULL\",\n \"PRIMARY KEY (`name`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "a7780e4ab59d9f63516e1270cc916662", "score": "0.70809364", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('sub_categoria', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t\t'categoria_id' => 'integer references categoria (id)',\n\t\t));\n\t}", "title": "" }, { "docid": "983ed41b385e89a425a08045bfdcc757", "score": "0.7080107", "text": "public function up()\n {\n $this->dbforge->add_field(\n array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'unsigned' => true,\n 'auto_increment' => true\n ),\n 'nome' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'clima' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'terreno' => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n ),\n 'filmes' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'null' => true,\n ),\n 'created_at' => array(\n 'type' => 'DATETIME', \n 'default' => 'CURRENT_TIMESTAMP'\n ),\n 'updated_at' => array(\n 'type' => 'DATETIME', \n 'null' => true,\n 'default' => 'CURRENT_TIMESTAMP'\n ),\n )\n );\n \n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('planets');\n }", "title": "" }, { "docid": "8e72d8e53513ba400b12d48bb0caaf69", "score": "0.7079409", "text": "public function up()\n {\n\n if(!TableExists::tableExists('pricefalls_payment'))\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%pricefalls_payment}}', [\n 'id' => $this->primaryKey(),\n 'merchant_id' => $this->integer()->notNull(),\n 'plan_type' => $this->string()->notNull(),\n 'status' =>$this->string()->notNull(),\n 'payment_data' =>$this->text()->notNull(),\n 'order_data' =>$this->text()->notNull(),\n 'billing_on' =>$this->dateTime()->notNull(),\n 'archived_on' => $this->dateTime()->notNull(),\n ], $tableOptions);\n\n $this->addForeignKey('fk-pricefalls_payment-merchant_id',\n 'pricefalls_payment',\n 'merchant_id',\n 'merchant_db',\n 'merchant_id',\n 'CASCADE',\n 'CASCADE');\n\n\n }\n else\n {\n echo \"table already exists\";\n }\n }", "title": "" }, { "docid": "010c4823db943aa3b7198bddf2125cce", "score": "0.7076834", "text": "public function up()\n\t{\n\t\t//Your schema to migrate\n\t\tSchema::instance(\n $this,\n function ($table) {\n $table->tableName = 'shopping_product';\n $table->create(\n array(\n array('name'=> 'id', 'type' => 'int', 'length' => 11,\n 'increment' => true, 'key' => 'primary'),\n array('name'=> 'name', 'type' => 'string', 'length' =>'100'),\n array('name'=> 'description', 'type' => 'string', 'length' =>'255'),\n\t\t\t\t\tarray('name'=> 'price', 'type' => 'float', 'length' =>'10,2'),\n array(\n 'name'=> 'created_at',\n 'type' => 'datetime',\n 'length' =>\"DEFAULT '0000-00-00 00:00:00'\"\n ),\n array(\n 'name'=> 'updated_at',\n 'type' => 'datetime',\n 'length' =>\"DEFAULT '0000-00-00 00:00:00'\"\n ),\n ),\n 'InnoDB',\n 'latin1'\n )->run();\n }\n ); \n\t\t\n\t}", "title": "" }, { "docid": "19976f07122bae00ae038cf4c025f5fb", "score": "0.7073908", "text": "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::generate~cli', 'Scaffolding', 'Cli Cli Scaffolding Generate', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::generate~cli', 'Scaffolding', 'Cli Cli Scaffolding Generate', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::create_columns~cli', 'Scaffolding', 'Cli Cli Scaffolding Create Columns');\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::create_missing_columns~cli', 'Scaffolding', 'Cli Cli Scaffolding Create Missing Columns', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::create_files~cli', 'Scaffolding', 'Cli Cli Scaffolding Create Files', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::create_missing_files~cli', 'Scaffolding', 'Cli Cli Scaffolding Create Missing Files', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/cli/scaffolding::display_permissions~cli', 'Scaffolding', 'Cli Cli Scaffolding Display Permissions', $this->hash());\n\t\t\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/columns::index~get', 'Scaffolding', 'Scaffolding Get Columns Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/columns::details~get', 'Scaffolding', 'Scaffolding Get Columns Details', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/columns::index~post', 'Scaffolding', 'Scaffolding Post Columns Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/columns::index~patch', 'Scaffolding', 'Scaffolding Patch Columns Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/columns::index~delete', 'Scaffolding', 'Scaffolding Delete Columns Index', $this->hash());\n\t\t\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/regenerate::button_regenerate_all_files~get', 'Scaffolding', 'Scaffolding Get Regenerate Button Regenerate All Files', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/regenerate::button_regenerate_missing_files~get', 'Scaffolding', 'Scaffolding Get Regenerate Button Regenerate Missing Files', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/regenerate::button_regenerate_all_columns~get', 'Scaffolding', 'Scaffolding Get Regenerate Button Regenerate All Columns', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/regenerate::button_regenerate_missing_columns~get', 'Scaffolding', 'Scaffolding Get Regenerate Button Regenerate Missing Columns', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/regenerate::index~get', 'Scaffolding', 'Scaffolding Get Regenerate Index');\n\t\t\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/tables::index~get', 'Scaffolding', 'Scaffolding Get Tables Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/tables::details~get', 'Scaffolding', 'Scaffolding Get Tables Details', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/tables::index~post', 'Scaffolding', 'Scaffolding Post Tables Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/tables::index~patch', 'Scaffolding', 'Scaffolding Patch Tables Index', $this->hash());\n\t\tci('o_permission_model')->migration_add('url::/scaffolding/tables::index~delete', 'Scaffolding', 'Scaffolding Delete Tables Index', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "33d70189d5e642c66e226c23c9331f00", "score": "0.7073782", "text": "public function up()\n {\n $table = $this->table('status_consultations');\n $table->addColumn('name', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n ['name' => 'Nova', 'modified' => false],\n ['name' => 'Em Análise', 'modified' => false],\n ['name' => 'Cancelada', 'modified' => false],\n ['name' => 'Aprovada', 'modified' => false],\n ['name' => 'Reprovada', 'modified' => false],\n ];\n \n $statusSonsultationsTable = TableRegistry::get('status_consultations');\n foreach ($data as $value) {\n $statusSonsultationsTable->save($statusSonsultationsTable->newEntity($value));\n }\n\n }", "title": "" }, { "docid": "c1e43d9103542cddf9f5c26e5573b27f", "score": "0.70733875", "text": "public function up()\n\t{\n\t\t//Categorias\n\t\tSchema::table('categorias', function($table)\n\t\t{\n\t\t $table->create();\n\n\t\t $table->increments('id');\n $table->integer('cod');\n \t$table->string('nome');\n\t\t $table->timestamps();\n\t\t});\n\t\t//Subcategorias\n\t\tSchema::table('subcategorias', function($table)\n\t\t{\n\t\t $table->create();\n\n\t\t $table->increments('id');\n $table->integer('cod');\n \t$table->string('nome');\n\t\t $table->timestamps();\n\t\t});\n\t\t//Rel subcategoria com categoria\n\t\tSchema::table('subcategoria_categorias', function($table)\n\t\t{\n\t\t $table->create();\n\n\t\t $table->increments('id');\n\t\t $table->integer('id_categoria');\n\t\t $table->integer('id_subcategoria');\n\t\t $table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "ef60c095a90f9fd9ca6fe524a45f5a14", "score": "0.70717716", "text": "public function up()\n {\n return MysqlStatements::alter_table_add_field($this->db_table(), $this->fields);\n }", "title": "" }, { "docid": "d40ec04310024f4bc8e6ec43c37680b2", "score": "0.7069034", "text": "public function up()\n {\n $this->alterColumn(\"filefly_hashmap\",\"access_owner\", $this->string(255));\n }", "title": "" }, { "docid": "83723b032cdb8cf48301f11134762a3b", "score": "0.7066953", "text": "public function up()\n {\n $this->addColumn('products_reviews', 'plus', $this->string(512));\n $this->addColumn('products_reviews', 'minus', $this->string(512));\n }", "title": "" }, { "docid": "4802accd036fba27a7ee93a1c7a2a588", "score": "0.7060718", "text": "public function safeUp()\n\t{\n\t $this->addColumn('project_supported_files', 'is_image_based', 'binary(1) DEFAULT \"0\"');\n\t $this->addColumn('project_supported_files', 'image_size', 'enum(\"NONE\",\"CROPPED\",\"FULL_SCREEN\") DEFAULT \"NONE\"');\n\t}", "title": "" }, { "docid": "5b8f9ce7256dd895fcde8c3e27afa1fc", "score": "0.70391905", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `company` CHANGE `company_added_by` `company_added_by` INTEGER;\n\nDROP INDEX `user_FI_2` ON `user`;\n\nALTER TABLE `user` CHANGE `user_user_role` `user_age` INTEGER;\n\nALTER TABLE `user` CHANGE `user_gender` `user_gender` VARCHAR(6);\n\nALTER TABLE `user` CHANGE `user_company_key` `user_company_key` VARCHAR(40) NOT NULL;\n\nALTER TABLE `user`\n ADD `user_role` VARCHAR(20) NOT NULL AFTER `user_company_key`;\n\nCREATE INDEX `user_FI_2` ON `user` (`user_role`);\n\nALTER TABLE `user_level` CHANGE `ul_status` `ul_status` VARCHAR(10);\n\nALTER TABLE `user_level`\n ADD `ul_date_added` DATETIME AFTER `ul_added_by`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "title": "" }, { "docid": "3e86e7453381041854ae857465bf7059", "score": "0.70374745", "text": "public function safeUp() {\n $this->createTable('{{speciality}}', array(\n 'id' => 'INT(10) NOT NULL AUTO_INCREMENT', \n 'name'=>'VARCHAR(255) DEFAULT NULL',\n 'PRIMARY KEY (id)',\n ),\n 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'\n );\n $this->insert('{{speciality}}', array('name'=>'Специализация 1'));\n $this->insert('{{speciality}}', array('name'=>'Специализация 2'));\n $this->insert('{{speciality}}', array('name'=>'Специализация 3'));\n \n $this->addColumn('{{tenders}}', 'speciality', 'INT(11) DEFAULT NULL');\n\t}", "title": "" }, { "docid": "dea6e658a18ff0da0b7940ff4db703a0", "score": "0.7036722", "text": "public function up()\n {\n Schema::dropIfExists('kind_of_space_lang');\n Schema::create('kind_of_space_lang', function (Blueprint $table) {\n $table->increments('id');\n $table->integer('kind_of_space_id')->unsigned();\n $table->foreign('kind_of_space_id')->references('id')->on('kind_of_space');\n $table->string('name', 35);\n $table->string('lang_code',5);\n $table->timestamps();\n });\n }", "title": "" }, { "docid": "8321df0f0477acf0e979ce66d0c283ac", "score": "0.7036564", "text": "public function safeUp()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%calendar}}', [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer()->defaultValue(null),\n 'project_id' => $this->integer()->notNull(),\n 'estimated_time' => $this->integer()->defaultValue(null),\n 'estimate_approval' => $this->boolean()->notNull()->defaultValue(false),\n 'actual_time' => $this->integer()->defaultValue(null),\n 'start_at' => $this->integer()->defaultValue(null),\n 'end_at' => $this->integer()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'created_at' => $this->integer()->defaultValue(null),\n 'updated_at' => $this->integer()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n ],$tableOptions);\n\n $this->addForeignKey('fk_calendar_user', '{{%calendar}}', 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('fk_calendar_created_by', '{{%calendar}}', 'created_by', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('fk_calendar_project', '{{%calendar}}', 'project_id', '{{%project}}', 'id', 'CASCADE', 'CASCADE');\n }", "title": "" }, { "docid": "7bf54dc3e1d63605612062931544dded", "score": "0.7036164", "text": "public function up(){\n// $this->execute($sql);\n\n }", "title": "" }, { "docid": "13e622767b011695246fc7ff5e5cec60", "score": "0.7032509", "text": "public function safeUp()\n {\n $this->createTable('{{failed_logins}}', [\n 'id' => 'pk',\n 'username' => 'string NOT NULL',\n 'ip_address' => 'varchar(45) NOT NULL',\n 'occurred_at_utc' => 'datetime NOT NULL',\n ], 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci');\n $this->createIndex(\n 'idx_failed_logins_username',\n '{{failed_logins}}',\n 'username',\n false\n );\n $this->createIndex(\n 'idx_failed_logins_ip_address',\n '{{failed_logins}}',\n 'ip_address',\n false\n );\n }", "title": "" }, { "docid": "14afb99aa0f3dce49172e0b0f445abe2", "score": "0.70251966", "text": "public function up()\n {\n $table = $this->table('model_modifications');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null'=> false])\n ->addColumn('vehicle_model_id', 'integer', ['null'=> false])\n ->addColumn('modification', 'char', ['null'=>false])\n ->addColumn('engine', 'char', ['null'=> false])\n ->addColumn('engine_model', 'char', ['null'=> false])\n ->addColumn('engine_volume', 'char', ['null'=> false])\n ->addColumn('power', 'char', ['null'=> false])\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime', ['null' => true])\n ->create();\n }\n }", "title": "" }, { "docid": "16f85de080892a8f4b719f62c691e10e", "score": "0.7025013", "text": "public function safeUp()\n {\n $this->addColumn($this->tableName, 'is_new', Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0');\n $this->addColumn($this->tableName, 'is_top_50', Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0');\n $this->addColumn($this->tableName, 'is_top_50_category', Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0');\n }", "title": "" }, { "docid": "578e1557a2820347d1f8059709b3e376", "score": "0.7009021", "text": "public function safeUp()\n {\n $this->createTable('contract_attachment', array(\n 'contract_id' => self::MYSQL_TYPE_UINT,\n 'file' => 'string NOT NULL',\n ));\n\n $this->addForeignKey('contract_attachment_contract_id', 'contract_attachment', 'contract_id', 'contract', 'id', 'CASCADE', 'RESTRICT');\n }", "title": "" }, { "docid": "5b8d6df478fecc0e3bded264d5eb422a", "score": "0.7009009", "text": "public function up()\n {\n $this->getSchema()->create('weathers', function ($table){\n $table->increments('id');\n $table->text('name');\n $table->string('latin_name');\n $table->string('country')->nullable();\n $table->binary('data')->nullable();\n $table->binary('short')->nullable();\n $table->binary('today')->nullable();\n $table->timestamps();\n });\n parent::up();\n }", "title": "" }, { "docid": "36ab59f548a9a309708a7fd3d2f9dc1f", "score": "0.7006327", "text": "public function safeUp() {\n\t$this->createTable('Currency', array(\n 'id'=>\" int(11) NOT NULL AUTO_INCREMENT\",\n 'full_name' =>\"varchar(50) NOT NULL\",\n 'short_name' =>\"char(4) NOT NULL\",\n 'symbol' =>\"char(1) DEFAULT NULL\",\n 'rate'=>\"float NOT NULL DEFAULT '1'\",\n 'image' =>\"varchar(10) NOT NULL\",\n \"PRIMARY KEY (`id`)\",\n \"UNIQUE KEY `full_name` (`full_name`,`short_name`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "8efd5a0e9a248d8de5d73299278b2e04", "score": "0.7005435", "text": "public function up()\n {\n DB::table('courses')->insert(array(\n 'id' => 106,\n 'name' => 'Fundamentals of Computer Science I',\n 'credit_hours' => 3\n ));\n \n DB::table('courses')->insert(array(\n 'id' => 110,\n 'name' => 'Fundamentals of Computer Science II',\n 'credit_hours' => 3\n ));\n\n DB::table('courses')->insert(array(\n 'id' => 210,\n 'name' => 'Digital Logic Design',\n 'credit_hours' => 3\n ));\n\n DB::table('courses')->insert(array(\n 'id' => 218,\n 'name' => 'Digital Logic Design Lab',\n 'credit_hours' => 1\n ));\n DB::table('courses')->insert(array(\n 'id' => 233,\n 'name' => 'Diffirential Equations',\n 'credit_hours' => 3\n ));\n }", "title": "" }, { "docid": "94af3c85b1675e5c5797037f6e49faaf", "score": "0.70019525", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE esq_domain_names DROP `max_emails`, \r\n ADD `last_renewal_date` DATE NULL DEFAULT NULL AFTER expiration_date,\r\n ADD `is_auto_renew` TINYINT(1) NOT NULL DEFAULT 1 AFTER `is_a_record_only`;\");\r\n }", "title": "" }, { "docid": "eb9d87c5d572448b52509449615521b7", "score": "0.6993616", "text": "public function safeUp()\n {\n $fields = [];\n foreach ($this->fields as $field => $type){\n $fields[$field] = $this->$type();\n }\n\n $this->createTable($this->tableName, $fields);\n\n $this->addForeignKey('product_category_fk', $this->tableName, 'category', '{{%products_category}}', 'id', 'CASCADE', 'CASCADE');\n\n foreach ($fields as $field => $type){\n if(in_array($field, $this->noIndexFields)){\n continue;\n }\n $this->createIndex('product_'.$field.'_idx', $this->tableName, $field);\n }\n }", "title": "" }, { "docid": "1d8152e42c81f2ffca32b4946b9a72af", "score": "0.6993036", "text": "public function up()\n\t{\n // Insert each of the permissions and retrieve the inserted ID\n\t\t$rolePermissionsData = array();\n foreach ($this->permissions as $permission) {\n $this->db->insert($this->tablePermissions, $permission);\n $insertedId = $this->db->insert_id();\n\n // Add the inserted ID (and each role's ID) to the data for the\n // role/permissions table\n foreach ($this->defaultRoles as $defaultRole) {\n $rolePermissionsData[] = array(\n $this->keyRole => $defaultRole,\n $this->keyPermission => $insertedId,\n );\n }\n }\n\n // Insert the role/permissions data\n $this->db->insert_batch($this->tableRolePermissions, $rolePermissionsData);\n\t}", "title": "" }, { "docid": "c81035dc77b8bb270b7552baf897081e", "score": "0.69922626", "text": "public function up()\n {\n Schema::table('users', function (Blueprint $table) {\n Schema::table('users', function (Blueprint $table) {\n $table->unsignedBigInteger('role_id')->after('id')->nullable(); // make role id nullable\n });\n\n Schema::table('users', function (Blueprint $table) {\n $table->unsignedBigInteger('role_id')->nullable(false)->change(); // modify the column to not be nullable\n $table->foreign('role_id')->references('id')->on('roles'); // add foreign key constraints\n });\n });\n }", "title": "" }, { "docid": "fc33f2704fac5b6a98a8ce933ef974e5", "score": "0.69890314", "text": "public function up() {\n $fields = array(\n 'typeID' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'default' => NULL,\n 'after' => 'addressID'\n )\n );\n $this->dbforge->add_column('orgs_safety', $fields);\n\n // add key\n $this->db->query('ALTER TABLE `' . $this->db->dbprefix('orgs_safety') . '` ADD INDEX (`typeID`)');\n\n // set foreign key\n $this->db->query('ALTER TABLE `' . $this->db->dbprefix('orgs_safety') . '` ADD CONSTRAINT `fk_orgs_safety_typeID` FOREIGN KEY (`typeID`) REFERENCES `' . $this->db->dbprefix('lesson_types') . '`(`typeID`) ON DELETE NO ACTION ON UPDATE CASCADE');\n }", "title": "" }, { "docid": "37e998724d53e971712fec625fb26a36", "score": "0.69872767", "text": "public function up()\n {\n $this->addColumn('{{%shop_products}}', 'units', $this->string(11)->defaultValue('шт'));\n $this->update('{{%shop_products}}', ['units' => 'шт']);\n }", "title": "" }, { "docid": "71d63bc7ffbd789333f684e02df489c0", "score": "0.6984712", "text": "public function up()\n {\n $view_name = self::$table_name;\n $sql = <<<EOF\ncreate or replace view $view_name as\nselect\n\tvd_video.video_id,\n\tvd_video.name as video_name,\n\tvd_video.description as video_description,\n\tvd_video.url_link as video_url_link,\n\tvd_video.video_specific_id\nfrom vd_video\nEOF;\n\n DB::statement($sql);\n }", "title": "" }, { "docid": "3738aae8433b48765a20ff3f4ce24519", "score": "0.6983939", "text": "public function up()\n {\n /* Schema::create($this->tableName, function (Blueprint $table) {\n\n $this->_addPrimaryKey($table, 'CompanyAddressId');\n $this->_addUUID($table, 'CompanyId');\n $this->_addUUID($table, 'AddressId');\n $table->foreign('CompanyId', 'CompanyAddress_Company_CompanyId')->references('CompanyId')->on('Company')->onDelete('cascade');\n $table->foreign('AddressId', 'CompanyAddress_Address_AddressId')->references('AddressId')->on('Address')->onDelete('cascade');\n }); */\n Schema::create($this->tableName, function (Blueprint $table) {\n\n $table->increments('CompanyAddressId');\n $table->bigInteger('CompanyId');\n $table->bigInteger('AddressId');\n // $table->foreign('CompanyId', 'CompanyAddress_Company_CompanyId')->references('CompanyId')->on('Company')->onDelete('cascade');\n //$table->foreign('AddressId', 'CompanyAddress_Address_AddressId')->references('AddressId')->on('Address')->onDelete('cascade');\n });\n }", "title": "" }, { "docid": "60a1e8db5692ca7c5d62eee30f213f78", "score": "0.69745", "text": "public function safeUp()\n\t{\n\t\t$this->createTable('ssm_sm', array(\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'sm_id' => 'int NOT NULL',\n\t\t\t\t'ssm_id' => 'int NOT NULL' )\n\t\t);\n\t}", "title": "" }, { "docid": "247e657060065127059f8580cf4bb432", "score": "0.6971036", "text": "public function up()\n {\n\n $CREATE_SQL=\"CREATE TRIGGER {{%tad_player}} AFTER DELETE ON {{%player}} FOR EACH ROW\n BEGIN\n IF (select memc_server_count()<1) THEN\n select memc_servers_set('127.0.0.1') INTO @memc_server_set_status;\n END IF;\n SELECT memc_delete(CONCAT('player_type:',OLD.id)) INTO @devnull;\n SELECT memc_delete(CONCAT('player:',OLD.id)) INTO @devnull;\n SELECT memc_delete(CONCAT('team_player:',OLD.id)) INTO @devnull;\n DELETE FROM player_score WHERE player_id=OLD.id;\n DELETE FROM profile WHERE player_id=OLD.id;\n DELETE FROM player_last WHERE id=OLD.id;\n END\";\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($CREATE_SQL)->execute();\n }", "title": "" }, { "docid": "46271462a4149f3404586270fc891c71", "score": "0.69644874", "text": "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'user_id' => $this->bigPrimaryKey(),\n 'sex' => $this->string(1)->notNull()->defaultValue('f'),\n 'name' => $this->string(),\n 'surname' => $this->string(),\n 'birth_date' => $this->date(),\n 'country' => $this->string(),\n 'city' => $this->string(),\n 'avatar' => $this->string(),\n 'info' => $this->text(),\n 'signature' => $this->string(),\n 'last_visit' => $this->integer()->notNull()->defaultValue(0),\n 'last_ip' => $this->string()\n ]);\n\n $this->addForeignKey('user_profile_user_id_fk', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n\n $this->createIndex('user_profile_sex_idx', $this->tableName, 'sex');\n $this->createIndex('user_profile_name_idx', $this->tableName, 'name');\n $this->createIndex('user_profile_birth_date_idx', $this->tableName, 'birth_date');\n $this->createIndex('user_profile_country_idx', $this->tableName, 'country');\n $this->createIndex('user_profile_last_visit_idx', $this->tableName, 'last_visit');\n }", "title": "" } ]
6cd85a6ca2dab37f89f6aa7ed7d8c458
Display a view to create a new resource
[ { "docid": "ac453d5bc03f0144ea19ae5915ffeb03", "score": "0.0", "text": "public function create()\n {\n $this->authorize('id-admin');\n\n return view('documents.create');\n }", "title": "" } ]
[ { "docid": "ffef4ac93b8831ae51d698379f4d9c1b", "score": "0.82123244", "text": "public function create()\n\t{\n\t\treturn view('resources.create');\n\t}", "title": "" }, { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.8162671", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.79529285", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "ff6aafdb1355ea23d1a8bd6d152d0539", "score": "0.7903135", "text": "public function create()\n {\n $this->authorize('create', Resource::class);\n\n return view('resources.create');\n }", "title": "" }, { "docid": "e1c4a637db2fd84ef7dabb5b305e9961", "score": "0.7758985", "text": "public function create()\n {\n $resource = $this->resource;\n $resource['action'] = 'Create';\n return view('dashboard.views.'.$this->resources.'.create',compact( 'resource'));\n\n }", "title": "" }, { "docid": "a49b82b2f45e7ba34835574231e74fc7", "score": "0.7747802", "text": "public function create() {\n return view('resto.create');\n }", "title": "" }, { "docid": "f40137ad18991df137990863ff05faa1", "score": "0.7695111", "text": "public function newAction()\n {\n $this->addBaseBreadcrumb()->add('Nouveau');\n\n return $this->render($this->getParam('newTemplate'), array(\n 'form' => $this->getFormHandler()->getForm($this->getFormType(), $this->createObject())->createView()\n ));\n }", "title": "" }, { "docid": "21ca75fbf4cead94faae6a4003ecc093", "score": "0.76799357", "text": "public function create()\n\t{\n\t\t\n\t\t$resourcetags = array();\n\t\t$tags = Tag::all();\n\t\t$this->layout->content = View::make(\"resources.create\", compact('resourcetags', 'tags'));\n\t}", "title": "" }, { "docid": "a2713fd2627c4559d639be9e3a028e36", "score": "0.7672096", "text": "public function createAction()\n {\n if (!$this->allowCreate) {\n abort(401);\n }\n\n $this->beforeCreate();\n $this->setHeader('title', $this->createTitle);\n\n $this->afterCreate();\n return $this->view('create', $this->createData);\n }", "title": "" }, { "docid": "e87c249e7ed23368572a5ffb3b907277", "score": "0.7660917", "text": "public function create()\n {\n $route = self::ROUTE;\n $title = \"Create \" . self::TITLE . \" Info\";\n return view(self::FOLDER . \".create\", compact('route', 'title'));\n }", "title": "" }, { "docid": "4573f6bab7f649cbc32bea7408e0840f", "score": "0.76514024", "text": "public function create()\n {\n // load a view to create all informations\n }", "title": "" }, { "docid": "c1bfef22261096ce14c95c47446dff78", "score": "0.7602774", "text": "public function actionCreate() {\n $model = new Resource;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Resource'])) {\n $model->attributes = $_POST['Resource'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "07d77d13203dbc7b8587bc11be1dec21", "score": "0.75962114", "text": "public function create()\n\t{\n\t\treturn view($this->getViewPath() . '.create', [\n\t\t\t'entity' => $this->getModel()\n\t\t]);\n\t}", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.75881755", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "89f0bf5ee8425166af5d3acf7e03018c", "score": "0.758084", "text": "public function create()\n {\n return view ('UE.create');\n }", "title": "" }, { "docid": "6e1e5668e0314c521059488779983d78", "score": "0.7577035", "text": "public function create()\n {\n return view('creation');\n }", "title": "" }, { "docid": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.7574786", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "6d6638d93353979e91d132adb030c770", "score": "0.75693804", "text": "public function create()\n {\n return view('arl.create');\n }", "title": "" }, { "docid": "b8d69a4dd5760808d6a1a17f2f8affae", "score": "0.7546346", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t\n\t}", "title": "" }, { "docid": "ffa038452c882076721b04d3e2bd181d", "score": "0.752787", "text": "public function create()\n {\n //redirects to the create view\n }", "title": "" }, { "docid": "cd8bf2feb5221a77fc2738ac99c65a7c", "score": "0.7507198", "text": "public function create()\n {\n return view(self::VIEW . '.create');\n\n }", "title": "" }, { "docid": "7dd87bc4d0bdd191e3ce3afbc8483a06", "score": "0.75070304", "text": "public function create()\n {\n //\n return view(\"create\");\n }", "title": "" }, { "docid": "7dd87bc4d0bdd191e3ce3afbc8483a06", "score": "0.75070304", "text": "public function create()\n {\n //\n return view(\"create\");\n }", "title": "" }, { "docid": "7dd87bc4d0bdd191e3ce3afbc8483a06", "score": "0.75070304", "text": "public function create()\n {\n //\n return view(\"create\");\n }", "title": "" }, { "docid": "aca5cecb9a675069fb141e2e10bb029d", "score": "0.7495091", "text": "public function create()\n {\n // Some view to create\n }", "title": "" }, { "docid": "e8ae4b7ffa4723fa50e5657bde33cb9c", "score": "0.7493011", "text": "public function create()\n\t{\n\t\treturn view('lokasis.create');\n\t}", "title": "" }, { "docid": "d2dfb39011e7751d334f3b102132bcc0", "score": "0.7475697", "text": "public function create()\n {\n return view('libro.create');\n }", "title": "" }, { "docid": "411c5a2c6402e249861ce43abd6bc3f9", "score": "0.74745166", "text": "public function createAction()\n {\n $this->loadLayout();\n $this->_flashCheck();\n $this->render();\n }", "title": "" }, { "docid": "c1837ba0b5873eb669c993210480e9c2", "score": "0.74726444", "text": "public function create()\n\t{\n\t\treturn view('turista.create');\n\t}", "title": "" }, { "docid": "3d3d77cfccaeadaabf53373314fcc4ad", "score": "0.7465563", "text": "public function create()\n {\n return view(\"factory.add\");\n }", "title": "" }, { "docid": "97650c42afe966024a1172b9d3b0c341", "score": "0.746046", "text": "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('app',$this);\n }", "title": "" }, { "docid": "07b34800d82b4752154612b743b2fbf0", "score": "0.74378675", "text": "public function create()\n {\n return view('rescuer.create');\n }", "title": "" }, { "docid": "7b8245cb8d83576b1621e28210759d47", "score": "0.7419094", "text": "public function createAction() : object\n {\n $title = \"Nytt inlägg\";\n $page = $this->app->page;\n\n $page->add(\"content/header\");\n $page->add(\"content/create\");\n\n return $page->render([\n \"title\" => $title\n ]);\n }", "title": "" }, { "docid": "e9676403505d52b8c3f5aa48a1d5bc83", "score": "0.74116987", "text": "public function create()\n { \n return view ('reels.create');\n }", "title": "" }, { "docid": "4fc6b10d5bb2219dbf0cad468c1985cb", "score": "0.7398483", "text": "public function create()\n\t{\n\t\treturn View::make('pphs.create');\n\t}", "title": "" }, { "docid": "b669f070b96c62b6c7dd6c6d62678e03", "score": "0.7397798", "text": "public function create()\n {\n return view(\"admin.add_new\");\n }", "title": "" }, { "docid": "5a27005c67429ee148bb4445da9a4f82", "score": "0.73976713", "text": "public function create()\n {\n return view('management.create');\n }", "title": "" }, { "docid": "9ae985a13d4542e4307c2ae1684c3c58", "score": "0.73947704", "text": "public function create()\n {\n $this->load->view('create');\n }", "title": "" }, { "docid": "9ae985a13d4542e4307c2ae1684c3c58", "score": "0.73947704", "text": "public function create()\n {\n $this->load->view('create');\n }", "title": "" }, { "docid": "5f3c68b60fd80eb4444eb7152dfbb94e", "score": "0.7392711", "text": "public function create()\n {\n $page_title = __(\" Add consult\");\n $page_description = __(\" Add new consult\");\n return view('school.consult.create', compact('page_title', 'page_description'));\n }", "title": "" }, { "docid": "d59cd5e8f1c1ef63a3c82a8af6ef579c", "score": "0.7376388", "text": "public function create()\n\t{\n\t\t$types = array('carousel'=>'carousel', 'block'=>'block');\n\t\treturn View::make('backend.resources.create', compact('types'));\n\t}", "title": "" }, { "docid": "180353d80dab0370c281cce907176a1c", "score": "0.7358493", "text": "public function create()\n\t{\n\t\treturn view('periksas.create');\n\t}", "title": "" }, { "docid": "b5dddc39f26a60b7dffa285c712d82e7", "score": "0.7356302", "text": "public function create()\n {\n return view('new.create'); \n }", "title": "" }, { "docid": "af0bd49536843d8ccb12d5ddd93900cb", "score": "0.73536104", "text": "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('new');\n\n\t}", "title": "" }, { "docid": "feaf850c1243cf25582929c6395a0bfe", "score": "0.73531616", "text": "public function create() {\n //return view(\"ir.create\");\n }", "title": "" }, { "docid": "93652b1c8aa175e6ee151f46b64e2cff", "score": "0.7345904", "text": "public function create() \n {\n return view(\"{$this->view}.create\");\n }", "title": "" }, { "docid": "3f8f6081d8ec95d2417a2a6da9fa86e6", "score": "0.7341701", "text": "public function createAction()\n {\n $this->setTitle('Create Route');\n $form = new AdminRouteEditForm();\n $this->view->setVar('form', $form);\n $this->view->render('admin-route', 'edit');\n $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW);\n }", "title": "" }, { "docid": "a8352d3df92ea4dfba285e5b05b6b67c", "score": "0.73354137", "text": "public function create()\n {\n $this->data['fields'] = $this->model::getFields();\n\n return view($this->data['url'] . '.create')\n ->with('data', (object) $this->data);\n }", "title": "" }, { "docid": "615615f319c0c7622ac91abcf69c2e0f", "score": "0.7333751", "text": "public function create()\n {\n $this->viewData['act'] = 'create';\n return view('asuransi', $this->viewData);\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.7323971", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.7323971", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3cbced43b358276ca4f25a9bc451076e", "score": "0.73235106", "text": "public function create()\n {\n return view('mainobjects.create');\n }", "title": "" }, { "docid": "f9a1258e50a03182d193266b2526e6db", "score": "0.7321562", "text": "public function create()\n {\n return view('mir.create');\n }", "title": "" }, { "docid": "67998237d9fc2335675e99d9c32f051c", "score": "0.73175603", "text": "public function create()\n\t{\n return View::make('pages.FullEntry.create');\n\t}", "title": "" }, { "docid": "ae91d6ecf38325e991fbd7cb4ee6a261", "score": "0.731739", "text": "public function create()\n {\n BreadcrumbsRegister::Register($this->ModelName,$this->BreadCrumbName);\n return view('admin.consultancy_requests.create');\n }", "title": "" }, { "docid": "781f16423c992242d8cba26e4f031155", "score": "0.73162466", "text": "public function create()\n {\n return view($this::VIEW_FOLDER . '.create');\n }", "title": "" }, { "docid": "363092e6bf57d8a274b565d0cd17e26b", "score": "0.7316158", "text": "public function create()\n {\n //\n return view('router.create');\n }", "title": "" }, { "docid": "b755f6dc762c7fcef5960693dc550a8c", "score": "0.73150593", "text": "public function create()\n {\n return view('relatorio/create');\n }", "title": "" }, { "docid": "0f3b590e1bfc9eacac2195deb643a589", "score": "0.73057115", "text": "public function create()\n {\n return view('backend/theatres/create');\n }", "title": "" }, { "docid": "5bd84ba3c65461511e9e959ce3712c29", "score": "0.73056614", "text": "public function create()\n {\n //create button will direct user to create page\n return view('list.create');\n }", "title": "" }, { "docid": "a3c5b11bbc0c856907f42999109e1b8c", "score": "0.7305051", "text": "public function create()\n\t{\n\t\t// return View::make('espressioni.create');\n\t\treturn View::make('espressioni.edit');\n\t}", "title": "" }, { "docid": "a1d6f9de5a785d5c3b547607950b80aa", "score": "0.7303472", "text": "public function create()\n\t{\n\t \n\t \n $display = Models::$display;\n\n\t return view('admin.models.create', compact(\"display\"));\n\t}", "title": "" }, { "docid": "bec28afa27cdd528280db59f1e5eae79", "score": "0.72964305", "text": "public function create()\n {\n return view('frontend::create');\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.72963464", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "a4986c9fb45a1bad4f362db8eb788d4d", "score": "0.72941095", "text": "public function create()\n {\n return \"Create View Goes here\";\n }", "title": "" }, { "docid": "6b173d05840ab54405d699d604422efa", "score": "0.72926563", "text": "public function create()\n {\n return view('create');\n }", "title": "" }, { "docid": "2e0866dd4968a0252a9972c2a0f1a8f1", "score": "0.72902095", "text": "public function create()\n {\n\n $this->data[\"$this->modelName\"] = $this->model;\n $this->data[\"formRoute\"] = \"app.admin.$this->pluralModelName.create\";\n\n\n if ($this->package) {\n return \\View::make(\"{$this->package}{$this->pluralModelName}.form\", $this->data);\n }\n return \\View::make(\"{$this->pluralModelName}::form\", $this->data);\n }", "title": "" }, { "docid": "58fba4da23f81d848f972aa761343f65", "score": "0.72893316", "text": "public function create()\n\t{\n\t\treturn view(\"story.create\");\n\t}", "title": "" }, { "docid": "98811bcda96da1bb035f86f6bb53ebfc", "score": "0.7288296", "text": "public function create()\n {\n return view('admin.new.create');\n //\n }", "title": "" }, { "docid": "e71c0f1cd10ff2f7a306199aa8cb833e", "score": "0.7285787", "text": "public function create()\n {\n return view(\"sauces.create\");\n }", "title": "" }, { "docid": "2babbf6122eb001b9907a8d4b03264b8", "score": "0.72835726", "text": "public function create()\n {\n //\n return view(\"{$this->nameFolder}/create\");\n }", "title": "" }, { "docid": "4a2dc7e5b1a710047e6e4e05297b59a6", "score": "0.7283553", "text": "public function create(): Renderable\n {\n return view('create');\n }", "title": "" }, { "docid": "36f6ac8b4d492b37c7ef14bbbda36ffe", "score": "0.7283431", "text": "public function create()\n {\n return View(self::viewPath.'add');\n }", "title": "" }, { "docid": "c3039307b6f36d30205d418fd41cbb6c", "score": "0.7282954", "text": "public function create()\n {\n //\n return view('Libros.create');\n }", "title": "" }, { "docid": "e72cdcbb542a46176534a0c5e01b6ceb", "score": "0.72824836", "text": "public function create()\n\t{\n\t\treturn view('tipelaporankasirs.create');\n\t}", "title": "" }, { "docid": "aaf8fa80366af5494b1460478ef2d27c", "score": "0.7280509", "text": "public function create()\n {\n return view('surl::create');\n }", "title": "" }, { "docid": "08eca4d872ce1099cc9c3c84cb6cc328", "score": "0.727891", "text": "public function create()\n {\n return view('common::create');\n }", "title": "" }, { "docid": "564b88d24f451d640cf9090a9614516c", "score": "0.7276515", "text": "public function create()\n {\n return view('hobi.create');\n }", "title": "" }, { "docid": "cb9ee06bbafef75623bb4c7245a28673", "score": "0.7276151", "text": "public function create()\n {\n $data['module'] = $this->module();\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "title": "" }, { "docid": "6125ab826cf500c777acddd3956905fe", "score": "0.72758263", "text": "public function create()\n\t{\n\t\t//has a show page to add a new question to the database through a nice GAI(graphical admin interface)\n\t\treturn View::make('questions.create');\n\t}", "title": "" }, { "docid": "639bb4857dcd5523e4b85c1ad469f599", "score": "0.72754663", "text": "public function create()\n\t{\n\t\treturn View::make('vineyard.create');\n\t}", "title": "" }, { "docid": "15b0adfc103b09aacec7f00e46affba7", "score": "0.72727495", "text": "public function create()\n {\n // alternative way Route::view , but i use resource i didnt change routes\n return $this->getView(__FUNCTION__ );\n }", "title": "" }, { "docid": "38a11ec3ba36293b95bb60274536cad5", "score": "0.7271013", "text": "public function create()\n {\n $this->render('form');\n }", "title": "" }, { "docid": "23d58d57678c52d4e7d789e32d5314c2", "score": "0.72705007", "text": "public function create()\n\t{\n\t\treturn View::make('Ucionica.create');\n\t}", "title": "" }, { "docid": "2b5149059667351153649f9aa4ed9029", "score": "0.726828", "text": "public function create()\n {\n //\n $title = \"Creating a New Entry\";\n return view('posts.createPlant')->with('title', $title);\n }", "title": "" }, { "docid": "1df49597d3d6b62261d0fc6b117734bf", "score": "0.7262083", "text": "public function create()\n\t{\n\t\treturn view('oficinas.crear');\n\t}", "title": "" }, { "docid": "280d3e75fd76156b7ea48c8257688dca", "score": "0.72604156", "text": "public function create()\n {\n return view('ators.create');\n }", "title": "" }, { "docid": "0e920be04f2cf88f9e0022537045aa9a", "score": "0.7259356", "text": "public function create()\n {\n return view('livro.create');\n }", "title": "" }, { "docid": "2e9ce7e538c907e5428413a27159d9c7", "score": "0.7255499", "text": "public function create()\n {\n return view('osobe/create');\n }", "title": "" }, { "docid": "43c093cdf7ccacde2bee03a50a45889d", "score": "0.725341", "text": "public function create()\n {\n return View::make('create');\n }", "title": "" }, { "docid": "4814de786fb5654f53e8b8b048499d55", "score": "0.7253408", "text": "public function create()\n {\n return view('misc.create');\n }", "title": "" }, { "docid": "5686bd7a4d91c1b9321c4a7ade57b0d1", "score": "0.7252413", "text": "public function create()\n {\n return view('tahuns.create');\n }", "title": "" }, { "docid": "d85281966cc367fac063f9b9134161a5", "score": "0.72516066", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "78da6d36bbdf066c8c2b09034b363cac", "score": "0.725102", "text": "public function create()\n {\n return view('catalogue.create');\n }", "title": "" }, { "docid": "c242398f037aa07ab8eb98a3d1c10f1c", "score": "0.72507566", "text": "public function create()\n {\n return view(\"test.create\");\n }", "title": "" }, { "docid": "de3afc1d6c01963e5d6d48a4c1e3789f", "score": "0.7250183", "text": "public function create(){\n return view('project/edition/create');\n }", "title": "" }, { "docid": "0b0b8bd736ff08b42eb81f29acc9c302", "score": "0.7248926", "text": "public function create()\n\t{\n\t\t//redirige a la CARPETA donde esta la vista \n\t\treturn View::make('sucursal.create');\n\t}", "title": "" }, { "docid": "55346d1f28f12ee9f27341fb7a55592f", "score": "0.7245905", "text": "public function create(){\n\n return view('representation.create');\n\n }", "title": "" }, { "docid": "067a134abf6125c342c56b1ef91e1eeb", "score": "0.7244505", "text": "public function create()\n {\n // Show creation form\n return view(\"app.data-new\");\n }", "title": "" }, { "docid": "c719a087e3442faf0dbb380bc883e06b", "score": "0.72420543", "text": "public function create()\n {\n //\n return view($this->rootTemplate . '.create');\n }", "title": "" }, { "docid": "14984ecb0a51eec275a500aeddfb2c0e", "score": "0.72408414", "text": "public function create()\n {\n //\n return view('absensi.create');\n }", "title": "" } ]
297f0b9a6117bf982842691743c57753
It should allow the precision to be set.
[ { "docid": "5007ed7332f4ff6047f73a04b4c00325", "score": "0.6753794", "text": "public function testPrecision(): void\n {\n $process = $this->phpbench(\n 'run benchmarks/set4/NothingBench.php --precision=6'\n );\n\n $this->assertExitCode(0, $process);\n $success = preg_match('{[0-9]\\.([0-9]+)μs}', $process->getErrorOutput(), $matches);\n $this->assertEquals(1, $success);\n $this->assertEquals(6, strlen($matches[1]));\n }", "title": "" } ]
[ { "docid": "65f188047a735eb9a4f97c0f2e566f0a", "score": "0.72891223", "text": "static public function setPrecision($precision)\n {\n self::$_precision = $precision;\n }", "title": "" }, { "docid": "bcb270dbda94d8d6342b02752b09b847", "score": "0.6841716", "text": "public function getPrecision();", "title": "" }, { "docid": "4371d99c5750818fddde5056f79ca106", "score": "0.68280137", "text": "public function setPrecision(?int $precision): void\n {\n $this->precision['value'] = $precision;\n }", "title": "" }, { "docid": "34fb04e6f3ca2495ddb976fbcde25e74", "score": "0.67151386", "text": "public function setPrecision($precision = null) {\n if ($precision != null && is_int($precision)) {\n $this->options['precision'] = $precision;\n }\n }", "title": "" }, { "docid": "73f4ec9b9cb737e3e41d3cf96d5ae226", "score": "0.66938794", "text": "public function testCustomPrecision()\n {\n $cases = [\n '0.01' => '1%',\n '0.1' => '10%',\n '1' => '100%',\n '1.5' => '150%',\n '1.05' => '105%',\n '1.0500' => '105%'\n ];\n\n foreach ($cases as $original => $expected) {\n $percentage = new DBPercentage('Probability', 2);\n $percentage->setValue($original);\n $this->assertEquals($expected, $percentage->Nice());\n }\n }", "title": "" }, { "docid": "2b6b09a271d414c3ace4b85b4c81d184", "score": "0.66516596", "text": "public function unsetPrecision(): void\n {\n $this->precision = [];\n }", "title": "" }, { "docid": "2a84a99ff41fb4e362c03aaad24821a1", "score": "0.64244324", "text": "public function getPrecision(): ?int;", "title": "" }, { "docid": "98a881067d6715cc6fcec79fdb568377", "score": "0.6386251", "text": "public function getPrecision()\n {\n return $this->precision;\n }", "title": "" }, { "docid": "98a881067d6715cc6fcec79fdb568377", "score": "0.6386251", "text": "public function getPrecision()\n {\n return $this->precision;\n }", "title": "" }, { "docid": "9cd9e6b5ba26e0f5dc10eaad83c90d1e", "score": "0.63487124", "text": "public function setPrecision($precision)\n {\n $this->precision = $precision;\n return $this;\n }", "title": "" }, { "docid": "3e9c4009c2c862e92f3ae779bf447a5a", "score": "0.62894243", "text": "static public function getPrecision()\n {\n return self::$_precision;\n }", "title": "" }, { "docid": "e61500f068417cdfd11b82c00fbcb68b", "score": "0.619072", "text": "public function round(int $precision = 0): void;", "title": "" }, { "docid": "1ab814d73cb3e0da63aee779f9a07172", "score": "0.6175331", "text": "function round_precision($val,$precision){\r\n$exp = pow(10,$precision);\r\n$val = $val * $exp;\r\n$val = round($val);\r\n$val = $val / $exp;\r\nreturn $val;\r\n}", "title": "" }, { "docid": "c9d993876339747d2b2f080f12302ff5", "score": "0.60835737", "text": "public function testRoundingUserPrecision()\r\n {\r\n $this->assertConversion('11112000pt', '154330in');\r\n $this->assertConversion('1111200pt', '15433in');\r\n $this->assertConversion('111120pt', '1543.3in');\r\n $this->assertConversion('11112pt', '154.33in');\r\n $this->assertConversion('1111.2pt', '15.433in');\r\n $this->assertConversion('111.12pt', '1.5433in');\r\n $this->assertConversion('11.112pt', '0.15433in');\r\n }", "title": "" }, { "docid": "9996c55395e6860e15805dc7a0556450", "score": "0.6036043", "text": "public function test_precision_default_rounding() : void\n {\n $obj = SubsetSum::create(25.15, array(5.01243,10.143514,7,3,20));\n \n $expected = array(\n array(3, 5.01, 7, 10.14)\n );\n \n $this->assertEquals($expected, $obj->getMatches());\n }", "title": "" }, { "docid": "8fe88a312770575dff8619eb85d99881", "score": "0.5966834", "text": "public function setPrecision($var)\n {\n GPBUtil::checkInt32($var);\n $this->precision = $var;\n\n return $this;\n }", "title": "" }, { "docid": "325387826afbe53a2e16fc4a210261c0", "score": "0.59307885", "text": "public function setPrecision($precision)\n {\n $this->setInteger('precision', $precision);\n\n return $this;\n }", "title": "" }, { "docid": "37ab0b0b08d90b812ccbe34953b7a1f1", "score": "0.5903215", "text": "public function setRoundingPrecision($roundingPrecision)\n {\n $this->roundingPrecision = $roundingPrecision;\n }", "title": "" }, { "docid": "37ab0b0b08d90b812ccbe34953b7a1f1", "score": "0.5903215", "text": "public function setRoundingPrecision($roundingPrecision)\n {\n $this->roundingPrecision = $roundingPrecision;\n }", "title": "" }, { "docid": "ab2b5711597ed7d429d2e878f25dd15e", "score": "0.58891827", "text": "public function testRoundingMinPrecision()\r\n {\r\n $this->assertConversion('100pt', '1.389in');\r\n $this->assertConversion('1000pt', '13.89in');\r\n $this->assertConversion('10000pt', '138.9in');\r\n $this->assertConversion('100000pt', '1389in');\r\n $this->assertConversion('1000000pt', '13890in');\r\n }", "title": "" }, { "docid": "e2a8624c4a4a0d2c02f02db339cf31d4", "score": "0.58666915", "text": "public function SetPrecision($Int) {\n $this->mPrecision = $Int;\n }", "title": "" }, { "docid": "9aac624ed1448e3b0e7ddc5cd6c65e2f", "score": "0.58475316", "text": "public static function decimal() {}", "title": "" }, { "docid": "23fa9839c08867d72921207f2e687c78", "score": "0.58298886", "text": "function __construct($name, $precision = 4) {\n\t\n\t\tif( !$precision )\n\t\t\t$precision = 4;\t\n\t\n\t\tparent::__construct($name, $precision, $precision);\n\t}", "title": "" }, { "docid": "341c47f23dd6cbdd269662032ee12a84", "score": "0.58043104", "text": "public function getPrecision() {\n return isset($this->options['precision']) ? (int) $this->options['precision'] : null;\n }", "title": "" }, { "docid": "d223ed70dd32da1e204219872ba41744", "score": "0.57421756", "text": "public static function restore()\n {\n if (self::$oldPrecision !== null\n && function_exists('ini_set')\n ) {\n ini_set('precision', self::$oldPrecision[0]);\n ini_set('bcmath.scale', self::$oldPrecision[1]);\n bcscale(self::$oldPrecision[1]);\n }\n self::$setup = false;\n }", "title": "" }, { "docid": "ae4db2ec5e31065b8ee0a12ebeb1484d", "score": "0.5703926", "text": "public function setPrecision(int $precision): CalculatorInterface;", "title": "" }, { "docid": "1cfb94d2dda1e96b3bea6bffbc7f11f0", "score": "0.5591638", "text": "public function setFixed() {\n }", "title": "" }, { "docid": "e5ce072696ca9766dfd33781de64cf36", "score": "0.55758625", "text": "public function setupPrecision(int $bits);", "title": "" }, { "docid": "6a1e4010ba72c7483e2b3a3d393b9252", "score": "0.5500812", "text": "public function getPricePrecision()\n {\n return $this->getValueByPath(self::XML_PATH_PRICE_PRECISION);\n }", "title": "" }, { "docid": "21185cf148d2db52f22989d413cb1311", "score": "0.5468034", "text": "function tep_round($value, $precision) {\n if (PHP_VERSION < 4) {\n $exp = pow(10, $precision);\n return round($value * $exp) / $exp;\n } else {\n return round($value, $precision);\n }\n}", "title": "" }, { "docid": "ed5db6ad4af571cccb7962e7443caa66", "score": "0.54378545", "text": "public function invalidFloats() {}", "title": "" }, { "docid": "72238d9bd7556c521e138537396fc7fa", "score": "0.5409804", "text": "public function validFloats() {}", "title": "" }, { "docid": "933abd704fde3f036f791b2dbac4f209", "score": "0.539223", "text": "public function decimalsNotSet()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertEquals(1.564, $floatFilter->execute('1.564'));\n }", "title": "" }, { "docid": "f0497d0676254b46a69c1b134018eb26", "score": "0.53495735", "text": "public function round($precision= 0) {\n if (FALSE === strpos($this->num, '.')) return new self($this->num);\n \n $a= '0.'.str_repeat('0', $precision).'5';\n return new self(FALSE === strpos($this->num, '.') \n ? $this->num \n : ('-' === $this->num{0} ? bcsub($this->num, $a, $precision) : bcadd($this->num, $a, $precision))\n );\n }", "title": "" }, { "docid": "c864b835611640c89d9b884a3f7c4ab7", "score": "0.5311446", "text": "private function setSpecificPrecisionFormat(int $precision) : void\n {\n if ($precision < 0) {\n throw new \\InvalidArgumentException('Precision must be positive');\n }\n\n if ($precision > 3) {\n throw new \\InvalidArgumentException('Invalid precision. Binary suffix converter can only represent values in ' .\n 'up to three decimal places');\n }\n\n $icuFormat = '#';\n\n if ($precision > 0) {\n $icuFormat .= \\str_pad('#.', (2 + $precision), '0');\n }\n\n foreach ($this->binaryPrefixes as $size => $unitPattern) {\n if ($size >= 1024) {\n $symbol = \\substr($unitPattern, (int) \\strpos($unitPattern, ' '));\n $this->binaryPrefixes[$size] = $icuFormat . $symbol;\n }\n }\n }", "title": "" }, { "docid": "562fc0d0c817dcf8ce5eae2d35104255", "score": "0.5304065", "text": "function mDECIMAL_POSITIVE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DECIMAL_POSITIVE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n $n=null;\n\n // Tokenizer11.g:376:3: ( PLUS n= DECIMAL ) \n // Tokenizer11.g:377:3: PLUS n= DECIMAL \n {\n $this->mPLUS(); \n $nStart1303 = $this->getCharIndex();\n $this->mDECIMAL(); \n $n = new CommonToken($this->input, TokenConst::$INVALID_TOKEN_TYPE, TokenConst::$DEFAULT_CHANNEL, $nStart1303, $this->getCharIndex()-1);\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "56ac047741c1c1be83af4ff332b02a1b", "score": "0.5303196", "text": "public function __construct(int $precision = null, int $roundingMode = null)\n {\n $this->setPrecision(($precision ?? self::DEFAULT_PRECISION));\n $this->setRoundingMode(($roundingMode ?? self::DEFAULT_ROUNDING_MODE));\n }", "title": "" }, { "docid": "04f69f6ba4b4338990a21572633e83d7", "score": "0.5296889", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "88ab591a6dc98457d83e139a88bf752c", "score": "0.52754676", "text": "public function testDecimalPort()\n {\n $this->client->configure(array(\n 'port' => 1.24,\n ));\n }", "title": "" }, { "docid": "13fd10fddc5fd82f560d4e04c95765a5", "score": "0.52753174", "text": "public function round($precision= 0) {\n return new self(round($this->wrapped, $precision));\n }", "title": "" }, { "docid": "f5317821a35aaf030705daacb3717997", "score": "0.5230059", "text": "public function assertSameWithPrecision($expected, $actual, int $precision = 0, string $message = ''): void\n {\n $this->assertThat($actual, new AssertSameWithPrecisionConstraint($expected, $precision), $message);\n }", "title": "" }, { "docid": "48b7cb68cad613dbece8bc29dba2c09e", "score": "0.52216905", "text": "public function qualityOf($type, $precision= 3) {\n if (isset($this->list[$type])) {\n $q= $this->list[$type];\n } else {\n $q= 0.0;\n foreach ($this->list as $preference => $q) {\n if (preg_match('#('.strtr(preg_quote($preference, '#'), array('\\*' => '[^ ]+')).')#', $type, $matches)) break;\n }\n }\n return round($q, $precision);\n }", "title": "" }, { "docid": "519395bfee918f18280442a8e8b8e35e", "score": "0.5216222", "text": "public function __construct()\n {\n bcscale(0);\n }", "title": "" }, { "docid": "41ff15d6a2c5fd40a020998541218a69", "score": "0.5188119", "text": "function tep_round($value, $precision) {\n return round($value, $precision);\n }", "title": "" }, { "docid": "25699730950983781831a3c38fc1ef98", "score": "0.5164976", "text": "public function testLargerValueSet()\n {\n $this->grid100x100->setPoint(2, 2, 10);\n }", "title": "" }, { "docid": "936c041a264395b8bfc5c2ab67e81ecd", "score": "0.51616305", "text": "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "title": "" }, { "docid": "f4b677ae495ec6e241a488649092de91", "score": "0.5138201", "text": "public function askFieldPrecision(InputInterface $input, OutputInterface $output): ?int\n {\n $question = new Question($this->getQuestion('Precision', 10), 10);\n $question->setValidator(WameValidators::getPrecisionValidator());\n return (int) $this->ask($input, $output, $question);\n }", "title": "" }, { "docid": "ca317dff79950ce262a205a15a3a9289", "score": "0.5129082", "text": "function getDecimals(): ?int;", "title": "" }, { "docid": "43cda36b528b3e29f179c923e7a93bfb", "score": "0.51215315", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "43cda36b528b3e29f179c923e7a93bfb", "score": "0.51215315", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "43cda36b528b3e29f179c923e7a93bfb", "score": "0.51215315", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "d61ad6e61c791ad5927c22328bf74381", "score": "0.51187456", "text": "function create(&$render, &$params)\n {\n if (isset($params['precision']) && is_numeric($params['precision']) && ((int)$params['precision'] == $params['precision'])\n && ($params['precision'] >= 0)) {\n // TODO - should we check if it is a non-negative integer separately so that we can throw or log an error or warning?\n $this->precision = (int)$params['precision'];\n } else {\n $this->precision = 2;\n }\n\n $this->maxLength = 30;\n $params['width'] = '6em';\n parent::create($render, $params);\n }", "title": "" }, { "docid": "077fb146c854397d1079a13747ed52d8", "score": "0.5104987", "text": "function enable($bool, $precision)\n {\n $this->enabled = $bool;\n $this->precision = $precision;\n }", "title": "" }, { "docid": "aa4b71ecb98d0dbd8866f81850619521", "score": "0.5091991", "text": "public function testBasicPreconditionFail3()\n {\n $this->typeSafetyTestClass->iNeedNumeric('four');\n }", "title": "" }, { "docid": "bc0c965ac7f234dd2c8de900ccb4d068", "score": "0.50483084", "text": "public function round(int $precision = 0) : self\n {\n if ($precision < 0) {\n throw new InvalidArgumentException('Decimal precision cannot'\n . \" be less than 0, $precision given.\");\n }\n\n $b = [];\n\n foreach ($this->a as $rowA) {\n $rowB = [];\n\n foreach ($rowA as $valueA) {\n $rowB[] = round($valueA, $precision);\n }\n\n $b[] = $rowB;\n }\n\n return self::quick($b);\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.50021327", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.50021327", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.50021327", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.50021327", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "136931a8cee5b52cd1bb13ceeedd065c", "score": "0.50021327", "text": "public function getPrecio()\n {\n return $this->precio;\n }", "title": "" }, { "docid": "aa7a8e6bf3bcc2352a45c8db6cd6d446", "score": "0.49892148", "text": "public function setDecimals($decimals)\n {\n $this->decimals = $decimals;\n }", "title": "" }, { "docid": "188925f983a039ef286fea9884c8f014", "score": "0.49794695", "text": "private function hasNumFormat() {\n\t\treturn isset($this->options['num_decimals']);\n\t}", "title": "" }, { "docid": "1ad015f1032a123eabaec687dff7fed0", "score": "0.49734995", "text": "public function testGettingCurrencyAsDecimalWithVariousMinorUnits(): void\n {\n self::assertSame('12345', (new Formatter('12345.062', 'JPY'))->decimal());\n self::assertSame('12345.07', (new Formatter('12345.0686', 'AUD'))->decimal());\n self::assertSame('12345.01234569', (new Formatter('12345.012345686', 'XBT'))->decimal());\n\n self::assertSame('-12345.07', (new Formatter('-12345.0686', 'AUD'))->decimal());\n }", "title": "" }, { "docid": "1682b7db7b7225f67bc27ba3ad1c4c25", "score": "0.4970653", "text": "function getProportional() {return $this->_proportional;}", "title": "" }, { "docid": "02c5f47c9a6f59b64fb5d8ee58f6b34f", "score": "0.49680623", "text": "function adodb_round($n,$prec)\n{\n\treturn number_format($n, $prec, '.', '');\n}", "title": "" }, { "docid": "57e811c80e33cbb532ec2b16df82067e", "score": "0.49619478", "text": "public function valuePrecision($value = null)\n\t{\n\t\tif ($value === null) return $this->tvp;\n\t\tif ($value == 0) $value = null;\n\t\tswitch ($this->tvt) {\n\t\t\tcase ValueType::dateTime:\n\n\t\t\t\tbreak;\n\t\t}\n\t\t$this->tvp = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "20da1ed3f525e984588e23ef38dcde53", "score": "0.49599335", "text": "public function testFormatNumber()\n {\n $target_value = 1.67583978;\n $initial_value = 1.675839781223232323223232323;\n \n $this->assertEquals($target_value, format_number($initial_value));\n }", "title": "" }, { "docid": "18ea917ffd08cc539b5e69c0d4d22e91", "score": "0.49587956", "text": "public function buyDecimalAmount()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ef19c8db9f832848318d8f7d65343729", "score": "0.49584323", "text": "public function testSetPriceProduct()\n {\n $product = new Product();\n $value = 10.99;\n $product->setPrice($value);\n $this->assertEquals($value, $product->getPrice());\n }", "title": "" }, { "docid": "9bbf0062c90cfa0bf88338504e39848a", "score": "0.495448", "text": "protected function setUp()\n {\n $this->type = new FloatType();\n }", "title": "" }, { "docid": "20428e68ad90f864deee62394a53323c", "score": "0.4938134", "text": "public function __construct($decimal = 2)\n {\n $this->decimal = $decimal;\n }", "title": "" }, { "docid": "225f4d2a9291d5337610e544101f2e45", "score": "0.49272132", "text": "function tep_round($number, $precision) {\n if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) {\n $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);\n\n if (substr($number, -1) >= 5) {\n if ($precision > 1) {\n $number = substr($number, 0, -1) + ('0.' . str_repeat(0, $precision-1) . '1');\n } elseif ($precision == 1) {\n $number = substr($number, 0, -1) + 0.1;\n } else {\n $number = substr($number, 0, -1) + 1;\n }\n } else {\n $number = substr($number, 0, -1);\n }\n }\n\n return $number;\n }", "title": "" }, { "docid": "3c80226d85b33eca605e7307342ac9b7", "score": "0.49240077", "text": "public function __construct() {\n trace('[METHOD] '.__METHOD__);\n $this->classConfigArr = $GLOBALS['TSFE']->tmpl->setup['config.']['tx_ptgsaaccounting.'];\n $this->shopConfigArr = $GLOBALS['TSFE']->tmpl->setup['config.']['tx_ptgsashop.']; \n \n if($this->shopConfigArr['usePricesWithMoreThanTwoDecimals'] == 1) {\n $this->precision = 4;\n } else {\n $this->precision = 2;\n } \n trace($this->classConfigArr,0,'classConfigArr');\n trace($this->shopConfigArr,0,'shopConfigArr');\n }", "title": "" }, { "docid": "c4601b6e09a5ec3b3af89349ce504420", "score": "0.49228397", "text": "function setReal($real) {/*{{{*/\n $this->real = floatval($real);\n }", "title": "" }, { "docid": "a43464ddc648824719c2a03d5d176fae", "score": "0.49215597", "text": "public function testGetDataTableDecimalDataType() {\r\n\t\t// Insert border values into database\r\n\t\t$minvalue = '-9999999999999999999.9999999999';\r\n\t\t$maxvalue = '9999999999999999999.9999999999';\r\n\t\t$this->executeQuery('insert into POTEST (UUID, DECIMAL_VALUE) values (\\'testuuid0\\','.$minvalue.')');\r\n\t\t$this->executeQuery('insert into POTEST (UUID, DECIMAL_VALUE) values (\\'testuuid1\\','.$maxvalue.')');\r\n\t\t// Extract datatable\r\n\t\t$datatable = $this->getPersistenceAdapter()->getDataTable('select DECIMAL_VALUE from POTEST order by UUID');\r\n\t\t$datamatrix = $datatable->getDataMatrix();\r\n\t\t// Check strings for correct conversion\r\n\t\t$this->assertEquals($minvalue, $datamatrix[0][0], 'Minimum decimal value is not converted to string as expected.');\r\n\t\t$this->assertEquals($maxvalue, $datamatrix[1][0], 'Maximum decimal value is not converted to string as expected.');\r\n\t}", "title": "" }, { "docid": "e26ed994728fec5d7b085f420b2bc2ee", "score": "0.4916328", "text": "public function testSetPrime10() {\n\n $obj = new HistoPrepPaie();\n\n $obj->setPrime10(10.092018);\n $this->assertEquals(10.092018, $obj->getPrime10());\n }", "title": "" }, { "docid": "b77920df7f7b20a2a09bfb56e1829385", "score": "0.49146554", "text": "protected function limitPrecision($fRaw, $sMsg = 'Limited precision') {\n $fRound = round($fRaw, self::I_PRECISION);\n if ($fRound != $fRaw) {\n $this->oLog->notice(sprintf('%s [%f -> %f]', $sMsg, $fRaw, $fRound));\n }\n return $fRound;\n }", "title": "" }, { "docid": "0a0285d556179220553b73e668ea9524", "score": "0.49060515", "text": "public static function invalidColumnPrecision($column)\n {\n return new self(sprintf('The precision of the column \"%s\" must be a positive integer.', $column));\n }", "title": "" }, { "docid": "93e088dbc227e9c6e6da9c7265cd19dd", "score": "0.48966902", "text": "public function __construct(float $price)\n {\n $this->price = $price;\n }", "title": "" }, { "docid": "30847387c0c3df622aaeea7440104e94", "score": "0.4894436", "text": "public function testGetRateLimits()\n {\n }", "title": "" }, { "docid": "e98036ea2e2d467fac3d9bda8af38c5a", "score": "0.48726913", "text": "public function testIsTierPriceFixed()\n {\n $this->assertTrue($this->_model->isTierPriceFixed());\n }", "title": "" }, { "docid": "0ae377568fcf5c495925980d023e0c54", "score": "0.48716587", "text": "function precisionFloat($value, $place=2){\n $value = $value * pow(10, $place + 1);\n $value = floor($value);\n $value = (float) $value/10;\n (float) $modSquad = ($value - floor($value));\n $value = floor($value);\n if ($modSquad > .5){\n $value++;\n }\n return $value / (pow(10, $place));\n}", "title": "" }, { "docid": "2f6555768bd681e7c5f9b5282a7e56e9", "score": "0.48706332", "text": "public function testSetPrice()\n {\n $item = $this->addItem();\n $item->price = 3;\n\n $this->assertEquals(3, $item->price);\n\n $item->price = 3.52313123;\n $this->assertEquals(3.52313123, $item->price);\n\n $item->price = -123123.000;\n $this->assertEquals(-123123.000, $item->price);\n\n try {\n $item->price = 'a';\n $this->setExpectedException(\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice::class);\n } catch (\\LukePOLO\\LaraCart\\Exceptions\\InvalidPrice $e) {\n $this->assertEquals('The price must be a valid number', $e->getMessage());\n }\n }", "title": "" }, { "docid": "63641880eaf972f97c57fa62f8f93805", "score": "0.4859463", "text": "public function functionCanBeInterpretedAsFloatValidDataProvider() {}", "title": "" }, { "docid": "6f71cba3a19c87992c17e3ce24618d88", "score": "0.48525658", "text": "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "title": "" }, { "docid": "6f71cba3a19c87992c17e3ce24618d88", "score": "0.48525658", "text": "public function setPrecio($precio)\n {\n $this->precio = $precio;\n\n return $this;\n }", "title": "" }, { "docid": "6ff4bbcc73a2a48beac680b5258a19ea", "score": "0.4840839", "text": "public function testFloat()\n {\n set_error_handler([$this->instance, 'handleError'], E_NOTICE);\n $float = $this->instance+.0;\n restore_error_handler();\n\n self::assertTrue(\n is_float($float),\n 'Instance cannot be typecast to a float'\n );\n }", "title": "" }, { "docid": "f7f1e66e30b08443bb7c1eeb8c8c49bf", "score": "0.48341584", "text": "private function validate()\n {\n if (! is_numeric($this->number)) {\n throw new \\InvalidArgumentException(\"Invalid numeric value provided ($this->number).\");\n }\n }", "title": "" }, { "docid": "39cde3da92dba729904c212436807c2f", "score": "0.4812776", "text": "public function testScaleWithFloat()\n {\n $box = $this->box->scale(2.0);\n static::assertEquals(200, $box->getHeight());\n static::assertEquals(200, $box->getWidth());\n }", "title": "" }, { "docid": "347ce0ab25886ed4f51b6c4371aa94e7", "score": "0.48110706", "text": "public function beforeSave()\n\t{\n\t\tif ( parent::beforeSave() )\n\t\t{\n\t\t\t//\tStrips off all bogus characters from numbers\n\t\t\tforeach ( $this->getAttributes() as $_sKey => $_oValue )\n\t\t\t{\n\t\t\t\tif ( $this->tableSchema->columns[ $_sKey ]->type != 'string' && null !== $_oValue && $_oValue != '' )\n\t\t\t\t{\n\t\t\t\t\t$_sTestVal = trim( $_oValue, '+-.,0123456789' );\n\n\t\t\t\t\tif ( ! empty( $_sTestVal ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->{$_sKey} = floatval( preg_replace('/[\\+\\-\\,]/', '', $_oValue ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "96405818c6da75b8f75c10f18502e3cd", "score": "0.48011816", "text": "public function testHasKidsFixedPrice()\n {\n $this->assertEquals(0, $this->getObject(0)->setIsFixedPrice(true)->getValue());\n }", "title": "" }, { "docid": "b41203ad5af767068bb76d57ea145d9e", "score": "0.47959855", "text": "public function fullyEqualsTo( $coord, $precision = 6 ): bool {\n\t\treturn $this->equalsTo( $coord, $precision )\n\t\t\t&& $this->primary == $coord->primary\n\t\t\t&& $this->dim === $coord->dim\n\t\t\t&& $this->type === $coord->type\n\t\t\t&& $this->name === $coord->name\n\t\t\t&& $this->country === $coord->country\n\t\t\t&& $this->region === $coord->region;\n\t}", "title": "" }, { "docid": "a6329f1cf81167c5fecbb640805f06c7", "score": "0.4785762", "text": "public function testSetOne (\n\t\t$n,\n\t\tint $pr,\n\t\tint $rm,\n\t\tstring $expected\n\t)\n\t{ \n\t\tDecimalConfig::instance()->set(['precision'=>$pr, 'rounding'=>$rm]);\n\t\t$this->assertEquals($expected, (new Decimal($n))->cosh()->valueOf()); \n\t}", "title": "" }, { "docid": "6bfab3f6ccd1a99c91f9bc779f75a316", "score": "0.47807306", "text": "public function getPrecision(): ?int\n {\n if (count($this->precision) == 0) {\n return null;\n }\n return $this->precision['value'];\n }", "title": "" }, { "docid": "de98490884ab5439794e25a04f2d1678", "score": "0.47784102", "text": "function _fourD_analysis_validate_decimal_old( $d ) {\n \n if( is_numeric($d) ){\n \n $min = 0.0;\n $max = 1.0;\n $epsilon = 1e-11; // extra bit to satisfy equality check of a 1e-10 decimal precision\n \n if( $d > $min + $epsilon && $d < $max - $epsilon ){\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "b4668efc6dac0aa33408a6004eaca8d3", "score": "0.47765747", "text": "public function testSetAmountWithAnotherProblematicFloat()\n {\n $total = 114.9984;\n\n $this->assertSame(114, (int)$total);\n\n $this->slipData->setAmount($total);\n\n $this->assertSame(115, $this->slipData->getAmountFrancs());\n $this->assertSame('00', $this->slipData->getAmountCents());\n }", "title": "" }, { "docid": "9df6e5d6f3eb39cdddb0ed0bb1d170da", "score": "0.4773258", "text": "function random($min = null, $max = null, $precision = null)\n{\n if (is_array($min))\n {\n for ($i=1; $i<=rand(1,count($min)); $i++)\n {\n shuffle($min);\n }\n\n return array_shift($min);\n }\n elseif (is_numeric($min))\n {\n if (!is_numeric($max))\n {\n $max = floor($min+1);\n }\n\n $multiplier = 1;\n\n if ($precision === null)\n {\n $min_decimal = '';\n if ((int)$min != $min)\n {\n $min_decimal = explode('.', $min);\n $min_decimal = array_pop($min_decimal);\n }\n $max_decimal = '';\n if ((int)$max != $max)\n {\n $max_decimal = explode('.', $max);\n $max_decimal = array_pop($max_decimal);\n }\n\n $precision = max(strlen($min_decimal), strlen($max_decimal));\n }\n\n for ($i=1; $i<=$precision; $i++)\n {\n $multiplier = $multiplier * 10;\n \n $min = $min * 10;\n $max = $max * 10;\n }\n\n $value = rand($min, $max);\n \n $value = $value / $multiplier;\n\n return $value;\n }\n else\n {\n return random([$min, $max]);\n }\n}", "title": "" }, { "docid": "383be59d018a881a9f0eaf088e6ec213", "score": "0.47728223", "text": "public function testWidthWithFloat()\n {\n $this->box->setWidth(200.10);\n static::assertEquals(200, $this->box->getWidth());\n }", "title": "" }, { "docid": "73816eee515e3a830ff801fb34d5eea5", "score": "0.47684294", "text": "public function testDouble(){\n\t\t$this->assertEquals(4, \\Grafikart\\Math::double(2));\n\t}", "title": "" }, { "docid": "b1c1187e240bd507585c02729110d257", "score": "0.47679606", "text": "public function testSetPv1() {\n\n $obj = new CollabTache();\n\n $obj->setPv1(10.092018);\n $this->assertEquals(10.092018, $obj->getPv1());\n }", "title": "" } ]
8116d199ffd2da9fde77e3e5c254723f
Determine limit for request more than 1000 row
[ { "docid": "3a9885a78b9c742acec84caece4ed32f", "score": "0.0", "text": "function IsBigData($itemsperpage)\n\t{\n\t\t$hasil = false;\n\t\tif($itemsperpage > 1000)\n\t\t{\n\t\t\t$hasil = true;\n\t\t}\n\t\treturn $hasil;\n\t}", "title": "" } ]
[ { "docid": "7e7d697d6ffc51cefc7a7a41fd617dfe", "score": "0.7271742", "text": "public function getLimit() {}", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7155719", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7155719", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7155719", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7155719", "text": "public function getLimit();", "title": "" }, { "docid": "b7a8400b362bd3471b712539c2e266b7", "score": "0.7155719", "text": "public function getLimit();", "title": "" }, { "docid": "04da85345b19e6c9146321e650a30de0", "score": "0.71409327", "text": "function getLimit() ;", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.71242595", "text": "public function limit($limit);", "title": "" }, { "docid": "a31fa196b228f8b2fc203171ce82a99e", "score": "0.71242595", "text": "public function limit($limit);", "title": "" }, { "docid": "024a11bdf929e5a4ff85b3564413df17", "score": "0.7114638", "text": "public static function limit($limit);", "title": "" }, { "docid": "409783df5ab2eb965585b858465dbcb0", "score": "0.7059802", "text": "private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->limit=$row->answersperpage;\n }", "title": "" }, { "docid": "db1a3bb98dce1a62466399f6d967f946", "score": "0.7030125", "text": "public function getResultsetLimit() {\n $resultset_limit = variable_get($this->module . '_resultset_limit');\n\n // Override:\n // parameter pageSize provided, use the value, otherwise, use\n // value set in the configuration.\n\n if (isset($this->call_asset['parameter']['pageSize'])\n && $this->call_asset['parameter']['pageSize'] > 0) {\n\n $resultset_limit = $this->call_asset['parameter']['pageSize'];\n }\n\n return $resultset_limit;\n }", "title": "" }, { "docid": "f8319e0ea66f04299801fa890d39f97b", "score": "0.7008265", "text": "public function get_limit();", "title": "" }, { "docid": "f97728cd0c8aa01e6a290c490708e666", "score": "0.69243133", "text": "public function get_limit() {\n\t\t// This matches the maximum number of indexables created by this action.\n\t\treturn 4;\n\t}", "title": "" }, { "docid": "4bd8603f3d5f41bb1bb77711f05426e7", "score": "0.6867157", "text": "public function hasNumRowsLimit(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "1ead32033f68b02e800500e5834ed09c", "score": "0.6808196", "text": "function allWithLimit() {\n\n }", "title": "" }, { "docid": "b92ba06d726bc25bc77eae9df3ca4c19", "score": "0.67556083", "text": "public function getLimit() {\n return $this->limit;\n }", "title": "" }, { "docid": "f6d832dbbf2c6dea160fe3b005aad1b7", "score": "0.6711093", "text": "public function limit($limit)\n {\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "f6ad4b6204fae8723dd407d1a426b4ce", "score": "0.66847193", "text": "public function getLimit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "e953223d8169ecb8d038bfff63cc59a0", "score": "0.6683708", "text": "public function set_limit($limit);", "title": "" }, { "docid": "eab2007b7400cd1606e7e588c8cb77ac", "score": "0.6664843", "text": "public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}", "title": "" }, { "docid": "8e8b9a8f04b6a9d5eb5288681105fa64", "score": "0.66643786", "text": "public function limit()\n {\n if ($response = $this->request('limit')) {\n if (isset($response->limit) && $response->limit == true) {\n return $response->limit;\n }\n }\n return false;\n }", "title": "" }, { "docid": "522ed3cd1a82122936a58713e515b25b", "score": "0.6656624", "text": "protected function _getMaxResultsPerPage() {\r\n return 500;\r\n }", "title": "" }, { "docid": "da94d52c99557b0c8aedc735b3140833", "score": "0.6650332", "text": "public function getLimit()\n {\n return self::LIMIT;\n }", "title": "" }, { "docid": "9c82615e100e52e5e6ec02f2d95691f3", "score": "0.6641717", "text": "public function getRowLimitPerWorker()\n {\n return $this->rowLimit;\n }", "title": "" }, { "docid": "161ac5bdee1735810a76096bb66facf4", "score": "0.66139793", "text": "public function setLimit($x) { $this->limit = $x; }", "title": "" }, { "docid": "c5cde3e75615faeea3fe4221d675b57e", "score": "0.6609517", "text": "public function get_limit(){\r\n return $this->limit;\r\n }", "title": "" }, { "docid": "5639ae1ac6262a4f7f7b3480606ca8a7", "score": "0.658092", "text": "function getLimit()\n\t{\n\t\tif ($this->total_records == 0)\n\t\t{\n\t\t\t$lastpage = 0;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$lastpage = ceil($this->total_records/$this->size);\n\t\t}\n\t\t\n\t\t$page = $this->page;\t\t\n\t\t\n\t\tif ($this->page < 1)\n\t\t{\n\t\t\t$page = 1;\n\t\t} \n\t\telse if ($this->page > $lastpage && $lastpage > 0)\n\t\t{\n\t\t\t$page = $lastpage;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$page = $this->page;\n\t\t}\n\t\t\n\t\t$sql = ($page - 1) * $this->size . \",\" . $this->size;\n\t\t\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "a8643b2adf971a5974e2afb6097eae01", "score": "0.6562662", "text": "public function getLimit() {\n\t\treturn $this->limit;\n\t}", "title": "" }, { "docid": "ba52ae67d4cedeefb0a48f774396c047", "score": "0.65469515", "text": "protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }", "title": "" }, { "docid": "09b6527c7b4f8d9817864e13b3244983", "score": "0.65353936", "text": "public function getLimit()\n {\n return $this->_limit;\n }", "title": "" }, { "docid": "b7df81a79e16f645c9f9198dc0d01287", "score": "0.65216583", "text": "public function getLimit() : int\n {\n return $this->limit;\n }", "title": "" }, { "docid": "b4ac32adcab5aa51ac2de6e1c33cf428", "score": "0.6501948", "text": "public function limit($limit,$offset);", "title": "" }, { "docid": "affcd419d4556ec1a161f14fdfd849d4", "score": "0.64896995", "text": "public function getLimit(): int\n {\n return $this->getQueryPageSize();\n }", "title": "" }, { "docid": "fb4d9bb93136255ff85686ea30d53076", "score": "0.64888626", "text": "public function limit(): int\n {\n return $this->limit;\n }", "title": "" }, { "docid": "11a876164fc12936ffa1a88ea85a3a5a", "score": "0.6482692", "text": "public function getQueryLimit() {\n\t\treturn $this->queryLimit;\n\t}", "title": "" }, { "docid": "43b447fd4573cf2e3e6652455e819944", "score": "0.6479287", "text": "public function getLimit()\n {\n return $this->number_of_items_per_page;\n }", "title": "" }, { "docid": "53ad1ec322f5359bf737e89fd92e8f3e", "score": "0.64719886", "text": "public function take($limit = 20);", "title": "" }, { "docid": "4e4a2a2210edea26164eead2ec250aa1", "score": "0.6452967", "text": "public function limit($client_limit = NULL) {\n\n return 1000;\n }", "title": "" }, { "docid": "9553872edf2c3b0264387e446ecd79de", "score": "0.64334923", "text": "private function selectLimit(){\n $result=parent::selectSomething('*', 'config');\n $row=mysqli_fetch_object($result);\n $this->questionsPerPage=$row->questionsperpage;\n }", "title": "" }, { "docid": "ea9cb30610044baa33d7d3aa4b32c3e6", "score": "0.6421715", "text": "public function limit($limit)\n\t{\n\t\t$this->limit = (int) $limit;\n\t}", "title": "" }, { "docid": "139f3d4f5b361339963230b8cc49ee14", "score": "0.64188504", "text": "public function limit(): int\n {\n return $this->per_page;\n }", "title": "" }, { "docid": "beb845f402eefdde2e178e7f90b606e9", "score": "0.64128065", "text": "public function Limit()\n {\n return $this->limit;\n }", "title": "" }, { "docid": "3b98bbc660437f812896f3846341eb1c", "score": "0.63999224", "text": "private function limit_page()\n {\n $page = $this->define_page();\n $start = $page * $this->count - $this->count;\n $fullnumber = $this->total;\n $total = $fullnumber['count'] / $this->count;\n is_float($total) ? $max = $total + 2 : $max = $total + 1;\n $array = array('start'=>(int)$start,'max'=>(int)$max);\n return $array;\n }", "title": "" }, { "docid": "978b0d0156ad514e25928d1bbd72f5a9", "score": "0.639647", "text": "public function isLimitExceeded();", "title": "" }, { "docid": "b94cd4629612e93baaca1e2b5750d3bd", "score": "0.6385708", "text": "private function processLimit(): void\n {\n if ($this->request->has(self::LIMIT) && null !== $this->request->get(self::LIMIT)) {\n $itemLimit = (int)$this->request->get(self::LIMIT);\n\n if ($itemLimit > 0) {\n $this->limit = $itemLimit;\n } elseif (0 === $itemLimit) {\n $this->limit = 0;\n }\n }\n }", "title": "" }, { "docid": "524def6e98465e9d98f17b360008942f", "score": "0.63807863", "text": "public function limit($num)\n {\n return $this->set_option('limit', $num);\n }", "title": "" }, { "docid": "3c0f410eedc43f9ff2bda0b0e7a3775e", "score": "0.6372415", "text": "public function limit($limit, $offset = null);", "title": "" }, { "docid": "223e2a94d570eaf71d3f297ee9115fc5", "score": "0.63608754", "text": "public function limit(?int $limit): self;", "title": "" }, { "docid": "5154fec0bf351d01f84a148129ba7292", "score": "0.63548815", "text": "protected function getLimit() {\n if (isset($this->data['page'])) { // ...in the main table while pagination is used\n $l1 = ($this->data['page'] - 1) * $this->posts_per_page;\n $l2 = $this->posts_per_page;\n $limit = \"$l1, $l2\";\n }\n else $limit = \"0, \".$this->posts_per_page;\n return $limit;\n }", "title": "" }, { "docid": "03084028fec9d46de5d14787cf0b8020", "score": "0.63442624", "text": "public function getPersistRequestBatchSize(): ?int;", "title": "" }, { "docid": "05b5fb8ceff0f2167f3a2397f898ab4e", "score": "0.6336911", "text": "public function getLimit()\n {\n return $this->getRequest()->get('limit');\n }", "title": "" }, { "docid": "09257ac7719268f1a74882ffd5c27947", "score": "0.63273114", "text": "public function getLimit()\n {\n return $this->getParameter('limit');\n }", "title": "" }, { "docid": "27bd069b7c874d41ea6b9bbdbb20e357", "score": "0.63223493", "text": "public function limit(int $limit, int $offset);", "title": "" }, { "docid": "bf1c4106b93087e3d039254f31ee6207", "score": "0.63182575", "text": "protected function initQueryLimit()\n {\n $url = $this->getBaseUrl(true) . 'accounts/self/capabilities?format=JSON';\n $response = $this->getConnector()->get($url);\n $response = $this->verifyResult($response, $url);\n\n $content = $this->transformJsonResponse($response->getContent());\n\n return $content['queryLimit']['max'];\n }", "title": "" }, { "docid": "91ae749f01476f6f917b6b948a680a56", "score": "0.63156104", "text": "public function limit($limit)\n {\n return $this->set_limit($limit);\n }", "title": "" }, { "docid": "fe8194a5e4a918fa8c094582521a8d08", "score": "0.63039136", "text": "public function setRowLimitPerWorker($limit = 100)\n {\n $this->rowLimit = $limit;\n\n return $this;\n }", "title": "" }, { "docid": "0615cfcc4e093f8ffc83fa2c20dbf6fd", "score": "0.62926096", "text": "public function limit($limit)\n {\n return $this->query->limit($limit);\n }", "title": "" }, { "docid": "9ed38680e787f2f78bbee95c12dbd1b7", "score": "0.62786967", "text": "public function limit()\n {\n return self::get() >= Config::get('krisawzm.demomanager::limit', 500);\n }", "title": "" }, { "docid": "02ce50a6fd0cb0efb1a965fee2cc8716", "score": "0.6246689", "text": "public function setQueryLimit($limit) {\n\t\t$this->queryLimit = (integer) $limit;\n\t}", "title": "" }, { "docid": "999684842af292d4ef490a327d0ee861", "score": "0.6246099", "text": "public function limit($count, $offset);", "title": "" }, { "docid": "c9a31d773737e1fc5aa87cae00bddac0", "score": "0.6228426", "text": "function getLimit(){\n\t\t\treturn $this->limite;\n\t\t}", "title": "" }, { "docid": "0745c4eb540a87a3110ce06c2baad046", "score": "0.6221756", "text": "public function setLimit($value)\n {\n return $this->setParameter('limit', $value);\n }", "title": "" }, { "docid": "17b95b9fbe91b9cfa80373d8cd8a1064", "score": "0.62044", "text": "public function get_limit() {\n\t\t$job_listing_limit = $this->get_job_listing_limit();\n\t\tif ( $job_listing_limit ) {\n\t\t\treturn $job_listing_limit;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "c30d18abd9c996cb81f2348822bf6971", "score": "0.6200004", "text": "public static function getLimit($row_length)\n {\n $currpage = self::getCurrentPage($row_length);\n\n self::$limit = ($currpage - 1) * self::MAX_ITEM .',' .self::MAX_ITEM;\n\n return self::$limit;\n }", "title": "" }, { "docid": "d045f1dbd21ecabf631bae02c6a7ee7a", "score": "0.61887914", "text": "protected function getListLimit(): int\n {\n return PHP_INT_MAX;\n }", "title": "" }, { "docid": "d045f1dbd21ecabf631bae02c6a7ee7a", "score": "0.61887914", "text": "protected function getListLimit(): int\n {\n return PHP_INT_MAX;\n }", "title": "" }, { "docid": "9cb64ad57cad4aa1037871fd95da5614", "score": "0.6163508", "text": "public function getLimit()\n {\n return null;\n }", "title": "" }, { "docid": "1a520e87b6f96890ddf3c9daf8b809de", "score": "0.61601794", "text": "public function getLimit()\n {\n return null;\n }", "title": "" }, { "docid": "d69ed94720646054156af7bc2950f254", "score": "0.6150212", "text": "protected function setLimit() {\r\n if( $this->sqlLimit ) {\r\n $this->sql .= ' LIMIT ' . $this->sqlLimit;\r\n }\r\n }", "title": "" }, { "docid": "e986394c36cf5011eed34f31d729446d", "score": "0.613617", "text": "private function Limit($num) {\n $this->limit = $num;\n return $limit;\n }", "title": "" }, { "docid": "5e5d422ecc2578d7ed581105eb5ebb8c", "score": "0.61183965", "text": "public function getLimitReached() {\n return $this->_limitReached = (((int) self::model()->countByAttributes(array('ip'=>$this->ipAddr))) >= self::MAX_REQUESTS);\n }", "title": "" }, { "docid": "68b367d04fd71cd7b82f34b4ade391a6", "score": "0.61179185", "text": "public function limit($offset, $max = null);", "title": "" }, { "docid": "14151ccceac883b1dae59161da64bbf8", "score": "0.6114662", "text": "public function setLimit(int $limit): self;", "title": "" }, { "docid": "ca1cf8856e588be278af7c1bafaf42b3", "score": "0.60806406", "text": "public function hasLimit()\n {\n //check is little different than other stuff\n return ($this->_count > 0 || $this->_offset > 0);\n }", "title": "" }, { "docid": "99437885778b614389f12516126011de", "score": "0.6070331", "text": "public static function setQueryLimit($limit){\t\t\n\t\t//reset the queryCount\n\t\tself::$queryCount = 0;\n\t\t\n\t\tself::$queryLimit = $limit;\n }", "title": "" }, { "docid": "a2ee0825bee4314cae3d18d155ff9c93", "score": "0.6068557", "text": "protected function limit(int $limit){\n $this->query .= \"LIMIT \" . $limit . \" \";\n }", "title": "" }, { "docid": "1155703e3d51d3259496337f54e381f5", "score": "0.60671026", "text": "public function paginationHardLimit($limit = null, $return = false) {\n\t\tif (($limit && Configure::read('Global.pagination_limit')) && $limit > Configure::read('Global.pagination_limit')) {\n\t\t\t$this->Controller->request->params['limit'] = Configure::read('Global.pagination_limit');\n\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('libs', 'You requested to many records, defaulting to site maximum'),\n\t\t\t\tarray(\n\t\t\t\t\t'redirect' => array(\n\t\t\t\t\t\t'plugin'\t => $this->Controller->request->params['plugin'],\n\t\t\t\t\t\t'controller' => $this->Controller->request->params['controller'],\n\t\t\t\t\t\t'action'\t => $this->Controller->request->params['action']\n\t\t\t\t\t) + (array)$this->Controller->params['named']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn (int)$limit;\n\t}", "title": "" }, { "docid": "fe83dc25eea4737cd7bb50acb10fb400", "score": "0.6066652", "text": "public function limit(?int $limit = null) : int;", "title": "" }, { "docid": "f20d729cc19a3edf261587dc69d08a45", "score": "0.6060145", "text": "public function find_limit($limit = 100, $offset = 0 )\n {\n $query= $this->db->query(\"\n SELECT *\n FROM punti_spesi\n LIMIT $offset , $limit \"); \n return $query->result();\n }", "title": "" }, { "docid": "e350fa45f389552c1f8c268b0a5e0b6b", "score": "0.60565645", "text": "public function limit($limit = 10) {\n $this->limit = $limit;\n return $this;\n }", "title": "" }, { "docid": "ac56cd191344e3de68e14734a6a16a6f", "score": "0.60502243", "text": "function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "ac56cd191344e3de68e14734a6a16a6f", "score": "0.60502243", "text": "function index_limit($limit, $start = 0) {\n $this->db->order_by($this->id, $this->order);\n $this->db->limit($limit, $start);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "8b5f891f0b8c555a596ed2defc8bf939", "score": "0.60380673", "text": "function setLimit($numrows, $offset = 0)\n{\n\t$this->drv->setLimit($numrows, $offset);\n}", "title": "" }, { "docid": "75abcfebe7bb45f4fa95479fd4633376", "score": "0.6037985", "text": "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "title": "" }, { "docid": "77b6a09a290188a6f1a6627a1692d259", "score": "0.6036961", "text": "public function hasLimit() {\n return $this->_has(3);\n }", "title": "" }, { "docid": "77b6a09a290188a6f1a6627a1692d259", "score": "0.6036961", "text": "public function hasLimit() {\n return $this->_has(3);\n }", "title": "" }, { "docid": "77b6a09a290188a6f1a6627a1692d259", "score": "0.6036961", "text": "public function hasLimit() {\n return $this->_has(3);\n }", "title": "" }, { "docid": "77b6a09a290188a6f1a6627a1692d259", "score": "0.6036961", "text": "public function hasLimit() {\n return $this->_has(3);\n }", "title": "" }, { "docid": "77b6a09a290188a6f1a6627a1692d259", "score": "0.6036961", "text": "public function hasLimit() {\n return $this->_has(3);\n }", "title": "" } ]
180b319319904671f2685e07915ef864
/ FUNCIONES QUE DESCRIBEN LAS RELACIONES
[ { "docid": "c42af5d4deed4ec3bc7896471664baca", "score": "0.0", "text": "public function rol(){\n return Rol::consultar($this -> rol_id);\n }", "title": "" } ]
[ { "docid": "e92dd2ee3d8f8a104be23be7ddbf0159", "score": "0.6447131", "text": "public function comentariosRecibidos()\n {\n //\n }", "title": "" }, { "docid": "ca8912870b8210910afe194c349406ca", "score": "0.63484204", "text": "public function executeMensajesRecibidos()\n {\n // Se obtienen los cursos a los que atiende o que enseña el usuario que esta\n // conectado para pasarlos al template\n $cursos_temp = $this->getUser()->getCursosAny();\n $cursos = array();\n $cursos[0] = \"Todos los cursos\";\n foreach($cursos_temp as $curso_temp) {\n $cursos[$curso_temp->getIdCurso()] = $curso_temp->getCurso()->getNombre();\n }\n $this->cursos = $cursos;\n }", "title": "" }, { "docid": "baf29bc5b9692c50bf6987e75d426f85", "score": "0.623853", "text": "function cons_relaciones () {\n//debug (\"pasamos pon cons_relaciones\");\n\t\t// Inicializaciones de indices.\n\t\tif (!$this->conectado()) return false;\n\n\t\t$consulta = \"SELECT distinct(tabla_origen),campo_origen,tabla_destino,campo_destino FROM Relaciones order by tabla_origen\";\n\t\t$rs = $this->query ($consulta);\t// Lanzamos la busqueda\n\t\t$numTablas = $this->num_rows ($rs);\t// Conseguimos el numero de tablas\n\t\t// Inicializamos los indices de tablas origen y destino a cero\n\t\tfor ($j = 0; $j < $numTablas; $j++) {\n\t\t\t$row = $this->fetch_array ($rs);\n//debug(\"Tabla origen = $row[0]\");\n// debug (\"Esta vacio $row[0]\");\n\t\t\t// Fix distancias no infinitas en nodos forzados\n\t\t\tif (!in_array($row[0],$this->indicesOrigen)) $this->indicesOrigen[$j] = $row[0];\n\t\t\t// $this->camposOrigen[$row[0]][$row[2]] = $row[0].\".\".$row[1].\"=\".$row[2].\".\".$row[3];\n\t\t\tif (!is_array($this->camposOrigen[$row[0]][$row[2]])) $this->camposOrigen[$row[0]][$row[2]] = array();\n\t\t\tarray_push($this->camposOrigen[$row[0]][$row[2]],$row[1]);\n\t\t\tarray_push($this->camposOrigen[$row[0]][$row[2]],$row[3]);\n\t\t}\n\n\t\t$consulta = \"select distinct(tabla_destino),campo_destino from Relaciones order by tabla_destino\";\n\t\t$rs = $this->query ($consulta);\t// Lanzamos la busqueda\n\t\t$numTablas = $this->num_rows ($rs);\t// Conseguimos el numero de tablas\n\t\t// Inicializamos los indices de tablas origen y destino a cero\n\t\tfor ($j = 0; $j < $numTablas; $j++) {\n\t\t\t$row = $this->fetch_array ($rs);\n//debug(\"Tabla destino = $row[0]\");\n// debug (\"Esta vacio $row[0]\");\n\t\t\t// Fix distancias no infinitas en nodos forzados\n\t\t\tif (!in_array($row[0],$this->indicesDest)) $this->indicesDest[$j] = $row[0];\n\t\t\t$this->camposDest[$row[0]] = $row[1];\n\t\t}\n\n\t\t$consulta = \"select tabla_origen,tabla_destino from Relaciones order by tabla_origen,tabla_destino\";\n\t\t$rs = $this->query ($consulta);\t// Lanzamos la busqueda\n\t\t$i = $j = 1;\t\t\t\t // Variables que nos sevira de indices\n\t\tif ($this->num_rows ($rs)) {\t// Si existe la tabla Relaciones\n\t\t\twhile ($row = $this->fetch_array ($rs)) {\t// Mientras queden registros por procesar\n\t\t\t\t$primTabla = $row[0];\t// Primera tabla\n\t\t\t\t$segTabla = $row[1];\t// Segunda tabla\n\t\t\t\t// El 1 indica que hay relacion entre primTabla y segTabla\n\t\t\t\t$this->relaciones[$primTabla][$segTabla] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\tsalida (\"No hay relaciones en la base de datos<br/>\\n\");\n\t\t}\n// foreach ($this->relaciones as $fila)\n\t\t// foreach ($fila as $campo)\n\t\t// debug (\"Campo de result = $campo\");\n//debug (\"Campo de prueba : \" . $result[Tipo_busq][Wheres]);\n//debug (\"Campo de prueba2 : \" . $this->indicesDest[0]);\n//debug (\"Salimos por cons_relaciones\");\n\t\t// debug(\"<b>Depurando las relaciones de la base de datos</b>\");\n\t\t// depurar_array($this->relaciones);\n\t\t// return $result;\n\n\t}", "title": "" }, { "docid": "05882edcf1d33f1935530edb7ac4baea", "score": "0.5900351", "text": "public function mezclar() {\n $preguntasNuevas = $this->preguntasOriginales;\n foreach ($preguntasNuevas as &$pregunta) {\n shuffle($pregunta['respuestas']);\n }\n unset($pregunta); //elimino la referencia.\n\n shuffle($preguntasNuevas);\n $this->preguntas = $preguntasNuevas;\n }", "title": "" }, { "docid": "f11896629740b27f51dc80fd190d4658", "score": "0.5878866", "text": "static function cruder ()\n {\n // DEBUG\n // ON VA RENVOYER CE QU'ON RECOIT...\n Crudite::$tabAssoReponse[\"request\"] = $_REQUEST;\n \n $identifiantFormulaire = $_REQUEST[\"identifiantFormulaire\"] ?? \"\";\n \n \n if ($identifiantFormulaire == \"create\")\n {\n Crudite::creer();\n }\n\n if ($identifiantFormulaire == \"read\")\n {\n // EN PROGRAMMATION PAR CLASSE\n // POUR APPELER UNE METHODE\n // ON PRECISE D'ABORD LA CLASSE ET ENSUITE LA METHODE A APPELER\n // Classe::methode()\n Crudite::lire();\n }\n\n if ($identifiantFormulaire == \"update\")\n {\n Crudite::modifier();\n }\n\n if ($identifiantFormulaire == \"delete\")\n {\n Crudite::supprimer();\n }\n\n // ON VA FOURNIR DU JSON\n echo json_encode(Crudite::$tabAssoReponse, JSON_PRETTY_PRINT);\n \n }", "title": "" }, { "docid": "0e6eb262e077429ce59681102a1fa2b8", "score": "0.5830629", "text": "public function Resumen($IDEmpresa){\n\t\t//ahora reccorro cada uno delos clientes y veo que promedio le he dado en los meses\n\t\t//primero obtengo en el mes que estoy menos 2\n\t\t$serieclientespormes=[];\n\t\t$serieclientespormeslabel=[];\n\t\t$calificacionespormeslabel=[];\n\t\t$calificacionespormes=[];\n\t\t$promediopormeslabel=[];\n\t\t$promediopormes=[];\n\t\tif(date('m')===\"01\"){\n\t\t\t$mes1=\"11\";\n\t\t\t$anio1=date('Y')-1;\n\t\t\t$mes2=\"12\";\n\t\t\t$anio2=$anio1;\n\t\t\t$mes3=date(\"m\");\n\t\t\t$anio3=date('Y');\n\t\t}else if(date('m')===\"02\"){\n\t\t\t$mes1=\"12\";\n\t\t\t$anio1=date('Y')-1;\n\t\t\t$mes2=\"01\";\n\t\t\t$anio2=date('Y');\n\t\t\t$mes3=date(\"m\");\n\t\t\t$anio3=date('Y');\n\t\t}else{\n\t\t\t$mes1=date(\"m\")-2;\n\t\t\t$anio1=date('Y');\n\t\t\t$mes2=date(\"m\")-1;\n\t\t\t$anio2=date('Y');\n\t\t\t$mes3=date(\"m\");\n\t\t\t$anio3=date('Y');\n\t\t}\n\t\t//ahora tengo las variables\n\t\t$resp1=$this->cuantoscalif($IDEmpresa,$mes1,$anio1,'Proveedor','Realizada');\n\t\t$resp2=$this->cuantoscalif($IDEmpresa,$mes2,$anio2,'Proveedor','Realizada');\n\t\t$resp3=$this->cuantoscalif($IDEmpresa,$mes3,$anio3,'Proveedor','Realizada');\n\t\t//serie grafica 1\n\t\t$seriebarraslabel=[$anio1.\"-\".da_mes($mes1),$anio2.\"-\".da_mes($mes2),$anio3.\"-\".da_mes($mes3)];\n\t\t$seriebarras=array(array(\"data\"=>[$resp1[\"totalmay8\"],$resp2[\"totalmay8\"],$resp3[\"totalmay8\"]],\"label\"=>\"Mayores de 8\"),array(\"data\"=>[$resp1[\"totalmen8\"],$resp2[\"totalmen8\"],$resp3[\"totalmen8\"]],\"label\"=>\"Menores de 8\"),array(\"data\"=>[$resp1[\"nocalificacados\"],$resp2[\"nocalificacados\"],$resp3[\"nocalificacados\"]],\"label\"=>\"No Calificados\"));\n\t\t$data[\"seriecul\"]=array(\"serie\"=>$seriebarras,\"labels\"=>$seriebarraslabel);\n\t\t//grafica nuemero de clientes registrados por mes\n\t\tfor($i=1;$i<=date('m');$i++){\n\t\t\t$sql=$this->db->select(\"count(*) as total\")->where(\"IDEmpresaP='$IDEmpresa' and Tipo='Proveedor' and DATE(FechaRelacion) between '\".date('Y').\"-$i-01' and '\".date('Y').\"-$i-31' group by(IDEmpresaP)\")->get(\"tbrelacion\");\n\t\t\tif($sql->num_rows()===0){\n\t\t\t\t$num=0;\n\t\t\t}else{\n\t\t\t\t$num=$sql->result()[0]->total;\n\t\t\t}\n\t\t\tarray_push($serieclientespormeslabel,da_mes($i));\n\t\t\tarray_push($serieclientespormes,$num);\n\t\t\t//grafica Número de calificaciones realizadas a Clientes\n\t\t\t$sql=$this->db->select(\"count(*) as total\")->where(\"IDEmpresaEmisor='$IDEmpresa' and Emitidopara='Proveedor' and Date(FechaRealizada) between '\".date('Y').\"-$i-01' and '\".date('Y').\"-$i-31'\")->get('tbcalificaciones');\n\t\t\t$num=(int)$sql->result()[0]->total;\n\t\t\t$TcM=$this->db->select(\"(sum(tbdetallescalificaciones.PuntosObtenidos)/sum(tbdetallescalificaciones.PuntosPosibles)*10) as promedio \")->join('tbdetallescalificaciones','tbdetallescalificaciones.IDCalificacion=tbcalificaciones.IDCalificacion')->where(\"IDEmpresaEmisor='$IDEmpresa' and Emitidopara='Proveedor' and Date(FechaRealizada) between '\".date('Y').\"-$i-01' and '\".date('Y').\"-$i-31'\")->get('tbcalificaciones');\n\t\t\tif($TcM->num_rows()===0){\n\t\t\t\t$promedio=0;\n\t\t\t}else{\n\t\t\t\t$promedio=round((float)$TcM->result()[0]->promedio,2);\n\t\t\t}\n\t\t\t\tarray_push($calificacionespormeslabel,da_mes($i));\n\t\t\t\tarray_push($calificacionespormes,$num);\n\n\t\t\t\tarray_push($promediopormes,$promedio);\n\t\t\t\tarray_push($promediopormeslabel,da_mes($i));\n\t\t}\n\n\t\t$data[\"serieclientes\"]=array(\"datos\"=>[array(\"data\"=>$serieclientespormes,\"label\"=>'Numero de Clientes')],\"labels\"=>$serieclientespormeslabel);\n\t\t\n\t\t$data[\"serienumerodecalifmes\"]=array(\"datos\"=>[array(\"data\"=>$calificacionespormes,\"label\"=>'Numero de Calificaciones')],\"labels\"=>$calificacionespormeslabel);\n\t\t\n\t\t$data[\"promediopormes\"]=array(\"datos\"=>[array(\"data\"=>$promediopormes,\"label\"=>\"Promedio de Calificaciones\")],\"labels\"=>$promediopormeslabel);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "bd45fdefb5b69bcbb165092570db1492", "score": "0.58300424", "text": "function verRecorridos()\n {\n $cartoneros = $this->usuarioModel->getAllCartoneros();\n\n $i = 0;\n $retorno = [];\n foreach ($cartoneros as $cartonero) {\n $pedidos = $this->pedidoModel->getPedidosByDni($cartonero->dni);\n\n $armado = [];\n $armado[0] = $cartonero->dni;\n $armado[1] = $cartonero->nombre;\n $armado[2] = $pedidos;\n $retorno[$i] = $armado;\n $i++;\n }\n\n $this->view->verRecorridos($retorno);\n }", "title": "" }, { "docid": "8f7f372755e6f3722affc9080dad66ec", "score": "0.5818631", "text": "function llenarPropiedadesMovimientoContable($encabezado, $detalle) {\n require_once 'movimientocontable.class.php';\n $movimiento = new MovimientoContable();\n\n require_once 'periodo.class.php';\n $periodo = new Periodo();\n\n $retorno = array();\n // contamos los registros del encabezado\n $totalreg = (isset($encabezado[0][\"numeroMovimientoContable\"]) ? count($encabezado) : 0);\n\n $nuevoserrores = $this->validarMovimientoContable($encabezado, $detalle);\n $totalerr = count($nuevoserrores);\n\n //\n\n if ($totalerr == 0) {\n\n for ($i = 0; $i < $totalreg; $i++) {\n\n\n //'ERRORES '.isset($nuevoserrores[0][\"error\"]).\"<br>\";\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $movimiento->MovimientoContable();\n //echo 'registros de detalle '.count($movimiento->idMovimientoDetalle).\"<br><br>\";\n $movimiento->Documento_idDocumento = (isset($encabezado[$i][\"Documento_idDocumento\"]) ? $encabezado[$i][\"Documento_idDocumento\"] : 0);\n\n $movimiento->fechaElaboracionMovimientoContable = (isset($encabezado[$i][\"fechaElaboracionMovimientoContable\"]) ? $encabezado[$i][\"fechaElaboracionMovimientoContable\"] : date(\"Y-m-d\"));\n\n // obtenemos el período contable segun la fecha de elaboracion del documento\n $datoper = $periodo->ConsultarVistaPeriodo(\"fechaInicialPeriodo <= '\" . $movimiento->fechaElaboracionMovimientoContable .\n \"' and fechaFinalPeriodo >= '\" . $movimiento->fechaElaboracionMovimientoContable . \"'\");\n $movimiento->Periodo_idPeriodo = (isset($datoper[0][\"idPeriodo\"]) ? $datoper[0][\"idPeriodo\"] : 0);\n\n $movimiento->prefijoMovimientoContable = (isset($encabezado[$i][\"prefijoMovimientoContable\"]) ? $encabezado[$i][\"prefijoMovimientoContable\"] : '');\n $movimiento->numeroMovimientoContable = (isset($encabezado[$i][\"numeroMovimientoContable\"]) ? $encabezado[$i][\"numeroMovimientoContable\"] : '');\n $movimiento->sufijoMovimientoContable = (isset($encabezado[$i][\"sufijoMovimientoContable\"]) ? $encabezado[$i][\"sufijoMovimientoContable\"] : '');\n $movimiento->Moneda_idMoneda = (isset($encabezado[$i][\"Moneda_idMoneda\"]) ? $encabezado[$i][\"Moneda_idMoneda\"] : 0);\n $movimiento->tasaCambioMovimientoContable = (isset($encabezado[$i][\"tasaCambioMovimientoContable\"]) ? $encabezado[$i][\"tasaCambioMovimientoContable\"] : 1);\n\n $movimiento->Tercero_idTerceroPrincipal = (isset($encabezado[$i][\"Tercero_idTerceroPrincipal\"]) ? $encabezado[$i][\"Tercero_idTerceroPrincipal\"] : 0);\n $movimiento->Movimiento_idMovimiento = (isset($encabezado[$i][\"Movimiento_idMovimiento\"]) ? $encabezado[$i][\"Movimiento_idMovimiento\"] : 0);\n $movimiento->MovimientoAdministrativo_idMovimientoAdministrativo = (isset($encabezado[$i][\"MovimientoAdministrativo_idMovimientoAdministrativo\"]) ? $encabezado[$i][\"MovimientoAdministrativo_idMovimientoAdministrativo\"] : 0);\n $movimiento->bloqueoMovimientoContable = (isset($encabezado[$i][\"bloqueoMovimientoContable\"]) ? $encabezado[$i][\"bloqueoMovimientoContable\"] : 1);\n $movimiento->tipoReferenciaExternoMovimientoContable = (isset($encabezado[$i][\"tipoReferenciaExternoMovimientoContable\"]) ? $encabezado[$i][\"tipoReferenciaExternoMovimientoContable\"] : '');\n $movimiento->numeroReferenciaExternoMovimientoContable = (isset($encabezado[$i][\"numeroReferenciaExternoMovimientoContable\"]) ? $encabezado[$i][\"numeroReferenciaExternoMovimientoContable\"] : '');\n\n\n $movimiento->observacionMovimientoContable = (isset($encabezado[$i][\"observacionMovimientoContable\"]) ? $encabezado[$i][\"observacionMovimientoContable\"] : '');\n\n $movimiento->totalDebitosMovimientoContable = 0;\n $movimiento->totalCreditosMovimientoContable = 0;\n\n $movimiento->totalDebitosNIIFMovimientoContable = 0;\n $movimiento->totalCreditosNIIFMovimientoContable = 0;\n\n\n $movimiento->estadoMovimientoContable = 'ACTIVO';\n\n\n // por cada registro del encabezado, recorremos el detalle para obtener solo los datos del mismo numero de movimiento del encabezado, con estos\n // llenamos arrays por cada campo\n $totaldet = (isset($detalle[0][\"numeroMovimientoContable\"]) ? count($detalle) : 0);\n\n\n // llevamos un contador de registros por cada producto del detalle\n $registroact = 0;\n for ($j = 0; $j < $totaldet; $j++) {\n if (isset($encabezado[$i][\"numeroMovimientoContable\"]) and isset($detalle[$j][\"numeroMovimientoContable\"]) and $encabezado[$i][\"numeroMovimientoContable\"] == $detalle[$j][\"numeroMovimientoContable\"]) {\n\n\n $movimiento->idMovimientoContableDetalle[$registroact] = 0;\n $movimiento->CuentaContable_idCuentaContable[$registroact] = (isset($detalle[$j][\"CuentaContable_idCuentaContable\"]) ? $detalle[$j][\"CuentaContable_idCuentaContable\"] : 0);\n $movimiento->Tercero_idTercero[$registroact] = (isset($detalle[$j][\"Tercero_idTercero\"]) ? $detalle[$j][\"Tercero_idTercero\"] : 0);\n $movimiento->CentroCosto_idCentroCosto[$registroact] = (isset($detalle[$j][\"CentroCosto_idCentroCosto\"]) ? $detalle[$j][\"CentroCosto_idCentroCosto\"] : 0);\n $movimiento->Producto_idProducto[$registroact] = (isset($detalle[$j][\"Producto_idProducto\"]) ? $detalle[$j][\"Producto_idProducto\"] : 0);\n $movimiento->SegmentoOperacion_idSegmentoOperacion[$registroact] = (isset($detalle[$j][\"SegmentoOperacion_idSegmentoOperacion\"]) ? $detalle[$j][\"SegmentoOperacion_idSegmentoOperacion\"] : 0);\n\n $movimiento->baseMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"baseMovimientoContableDetalle\"]) ? $detalle[$j][\"baseMovimientoContableDetalle\"] : 0);\n $movimiento->debitosMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"debitosMovimientoContableDetalle\"]) ? $detalle[$j][\"debitosMovimientoContableDetalle\"] : 0);\n $movimiento->creditosMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"creditosMovimientoContableDetalle\"]) ? $detalle[$j][\"creditosMovimientoContableDetalle\"] : 0);\n\n $movimiento->baseNIIFMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"baseNIIFMovimientoContableDetalle\"]) ? $detalle[$j][\"baseNIIFMovimientoContableDetalle\"] : 0);\n $movimiento->debitosNIIFMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"debitosNIIFMovimientoContableDetalle\"]) ? $detalle[$j][\"debitosNIIFMovimientoContableDetalle\"] : 0);\n $movimiento->creditosNIIFMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"creditosNIIFMovimientoContableDetalle\"]) ? $detalle[$j][\"creditosNIIFMovimientoContableDetalle\"] : 0);\n\n $movimiento->observacionMovimientoContableDetalle[$registroact] = (isset($detalle[$j][\"observacionMovimientoContableDetalle\"]) ? $detalle[$j][\"observacionMovimientoContableDetalle\"] : '');\n\n\n $movimiento->totalDebitosMovimientoContable += (isset($detalle[$j][\"debitosMovimientoContableDetalle\"]) ? $detalle[$j][\"debitosMovimientoContableDetalle\"] : 0);\n $movimiento->totalCreditosMovimientoContable += (isset($detalle[$j][\"creditosMovimientoContableDetalle\"]) ? $detalle[$j][\"creditosMovimientoContableDetalle\"] : 0);\n\n $movimiento->totalDebitosNIIFMovimientoContable += (isset($detalle[$j][\"debitosNIIFMovimientoContableDetalle\"]) ? $detalle[$j][\"debitosNIIFMovimientoContableDetalle\"] : 0);\n $movimiento->totalCreditosNIIFMovimientoContable += (isset($detalle[$j][\"creditosNIIFMovimientoContableDetalle\"]) ? $detalle[$j][\"creditosNIIFMovimientoContableDetalle\"] : 0);\n\n $registroact++;\n }\n }\n\n // cada que llenamos un documento, lo cargamos a la base de datos\n $movimiento->AdicionarMovimientoContable();\n }\n } else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n\n return $retorno;\n }", "title": "" }, { "docid": "f69a30b63d9dc3cc46112f674ae93eeb", "score": "0.58080155", "text": "function cl_remessacobrancaregistrada() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"remessacobrancaregistrada\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0cf5185595db7dd002d5546e5eb90ff2", "score": "0.57828933", "text": "function listaRespuestasUsuario($idUsuario) {\n\n $preguntas=buscarPreguntasRespuestasUsuario(\"Respuestas\", $idUsuario);\n foreach($preguntas as $clave=>$valor)\n {\n $usuario = encontrarUsuario(\"no\",$valor['Usuario_idUsuario']);\n if (isset($valor['votos'])) {\n $tempListaVotos = puntuacionPreguntas($valor['votos']);\n }else $tempListaVotos = 0;\n preguntaRespuestaUsuario($valor[\"idPregunta\"], $valor['Usuario_idUsuario'], $usuario['nombreusu'], $valor[\"fecha\"],$valor[\"titulo\"] ,$valor[\"temas\"],$tempListaVotos);\n }\n}", "title": "" }, { "docid": "1adaab336a04f53af863819dcc5d3bb0", "score": "0.5754669", "text": "function recuperarRetenciones(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_sel';\n\t\t$this->transaccion='CD_REPRENRET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\t\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('retenciones','numeric');\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "c327fb15cb9b1cb140fc6cad3d8eb1ea", "score": "0.57374364", "text": "public function refrescacampos(){\n\t\t\t\t\t\t\t}", "title": "" }, { "docid": "81a8a82d808026066981f7d04081077f", "score": "0.5732608", "text": "function vista_recetas($objeto){\n\t// Carga la vista de las recetas\n\t\trequire('views/recetas2/vista_recetas.php');\n\t}", "title": "" }, { "docid": "df6b72319de1ed3d2e4aaac833010a92", "score": "0.57304263", "text": "function muestraformulariopreguntas($ramapregunta,$idpregunta,$encuesta,$idencuesta){\n\n\tif(in_array($idpregunta,$encuesta)){\n\n/*echo \"tipopregunta=\".$ramapregunta[\"tipopregunta\"].\" RAMAPREGUNTA<pre>\";\nprint_r($ramapregunta);\necho \"</pre>\";*/\n\t\t$valorpregunta=$this->respuestausuariopregunta[$idpregunta];\n\t\t\n\t\tunset($this->formulario->filatmp);\n\t\tif($ramapregunta[\"tipopregunta\"]==\"101\"){\n\t\t\t$this->formulario->dibujar_fila_titulo($ramapregunta[\"nombre\"],'tdtitulosubgrupoencuesta',\"2\",\"align='left'\",\"td\");\n\t\t\tif(isset($ramapregunta[\"descripcionpregunta\"])&&trim($ramapregunta[\"descripcionpregunta\"])!='')\n\t\t\t\t$this->formulario->dibujar_fila_titulo($ramapregunta[\"descripcionpregunta\"],'tdtituloencuestadescripcion',\"2\",\"align='left'\",\"td\");\n\t\t}\n\t\t\n\t\tif($ramapregunta[\"tipopregunta\"]==\"100\"){\n\t\t\t$this->formulario->dibujar_fila_titulo($ramapregunta[\"nombre\"],'tdtituloencuesta',\"2\",\"align='center'\",\"td\");\n\t\t\tif(isset($ramapregunta[\"descripcionpregunta\"])&&trim($ramapregunta[\"descripcionpregunta\"])!='')\n\t\t\t\t$this->formulario->dibujar_fila_titulo($ramapregunta[\"descripcionpregunta\"],'tdtituloencuestadescripcion',\"2\",\"align='left'\",\"td\");\n\t\t}\n\t\tif(ereg(\"^3.\",$ramapregunta[\"tipopregunta\"])){\n\t\t\t$this->preguntasencuesta[]=$idpregunta;\n\t\n\t\t\t$opcionparametrizacion=\"1\";\n\t\t\t$this->formulario->filatmp[$opcionparametrizacion]=$ramapregunta[\"menornombreopcion\"];\n\t\t\tfor($i=2;$i<$ramapregunta[\"numeroopciones\"];$i++){\t\n\t\t\t\t\t$opcionparametrizacion=$i;\n\t\t\t\t\t$this->formulario->filatmp[$opcionparametrizacion]=\"\";\n\t\t\t}\n\t\t\t$opcionparametrizacion=$ramapregunta[\"numeroopciones\"];\n\t\t\t$this->formulario->filatmp[$opcionparametrizacion]=$ramapregunta[\"mayornombreopcion\"];\n\n\t\t\t$javascript=\"enviarrespuesta(this,\".$idpregunta.\",\".$this->idusuario.\",\".$idencuesta.\")\";\n\t\t\t\t\t\n\n\t\t\t\t\t$menu[0]='radio_fila'; $parametros[0]=\"'\".$idpregunta.\"','\".$valorpregunta.\"','onclick=\\'return \".$javascript.\"\\''\";\n\n\t\t\t\t\tif($this->codigotipousuario==\"700\"||$this->codigotipousuario==\"800\"){\n\t\t\t\t\t\t$menu[1]='radio_fila_unico';\n\t\t\t\t\t\t$parametros[1]=\"'\".$idpregunta.\"','\".$valorpregunta.\"','onclick=\\'return \".$javascript.\"\\'','-1','No aplica','No aplica'\";\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$this->contadorpreguntas++;\n\n\n\t\t\t\t\t$this->formulario->dibujar_camposseparados($menu,$parametros,$this->contadorpreguntas.\") \".$ramapregunta[\"nombre\"],\"tdtitulogris\",$idpregunta,'requerido',\"0\");\n\n\t\t\t\t\t\t$conboton++;\t\t\t\t\n\t\t\techo \"<input type='hidden' name='preguntas[]' value='\".$idpregunta.\"' />\";\n\t\t\t\t\n\t\t}\n\t\tif(ereg(\"^2.\",$ramapregunta[\"tipopregunta\"])){\n\t\t\t$this->contadorpreguntas++;\n\t\t\t$conboton=0;\n\t\t\t$parametrobotonenviar[$conboton]=\"'\".$idpregunta.\"','pregunta',30,3,'','','',''\";\n\t\t\t$boton[$conboton]='memo';\n\t\t\t$requerido=\"requerido\";\n\t\t\tif($ramapregunta[\"tipopregunta\"]=='201'){\n\t\t\t\t$requerido=\"\";\n\t\t\t\tif($valorpregunta=='')\n\t\t\t\t$valorpregunta=\" \";\n\t\t\t }\n\n\t\t\t$this->formulario->dibujar_campos($boton,$parametrobotonenviar,$this->contadorpreguntas.\") \".$ramapregunta[\"nombre\"],\"tdtitulogris\",$idpregunta,$requerido,\"0\");\n\t\t\t$this->formulario->cambiar_valor_campo($idpregunta,$valorpregunta);\n\t\t\techo \"<input type='hidden' name='preguntas[]' value='\".$idpregunta.\"' />\";\n\n\t\t}\n\t\tif(is_array($ramapregunta[\"grupo\"]))\n\t\t\tforeach($ramapregunta[\"grupo\"] as $llave=>$grupo){\t\n\t\t\t\t$this->muestraformulariopreguntas($ramapregunta[\"grupo\"][$llave],$llave,$encuesta,$idencuesta);\n\t\t\t}\n\t}\n}", "title": "" }, { "docid": "b29960225d17b9f23cae1787b133189d", "score": "0.5678567", "text": "function generarTablaReseniasInadecuadas(){\n $this->chequearLogueo();\n\n if ($_SESSION['IS_ADMIN'] == true) {\n\n $resenias = $this->model->getResumenResenias();\n foreach ($resenias as $resenia) {\n $resenia->resenias = $this->model->getReseniasInadecuadasUsuario($resenia->id_usuario);\n }\n $this->view->mostrarResumenResenias($resenias);\n }\n\n\n }", "title": "" }, { "docid": "c5ef4ee8fe7645c7f7a740b30a5be5ef", "score": "0.56744385", "text": "static public function ctrEditarNotasRemision(){\n\n\t\tif (isset($_POST[\"editarIdNR\"])) {\n\n\t\t\tif( preg_match('/^[0-9 ]+$/', $_POST[\"nuevoNR\"]) &&\n\t\t\t\tpreg_match('/^[0-9 ]+$/', $_POST[\"nuevoDC\"]) &&\n\t\t\t\tpreg_match('/^[0-9 ]+$/', $_POST[\"nuevoSAP\"]) \n\t\t\t){ \t\n\t\t\t \n\t\t\t \t$tabla = \"notaremision\";\n\t\t\t\t$date = $_POST[\"nuevaFecha\"];\n\t\t\t\t$dateinput = explode('/', $date);\n\t\t\t\t$ukdate = $dateinput[2].'/'.$dateinput[1].'/'.$dateinput[0];\n\n\t\t\t \t$datos = array(\t\"idNR\" => $_POST[\"editarIdNR\"],\n\t\t\t\t\t\t\t\t\"automatico\" => $_POST[\"nuevoNumero\"],\n\t\t\t\t\t\t\t\t\"clasificador\" => $_POST[\"nuevaEmpresa\"],\n\t\t\t\t\t\t\t\t\"cotizacion\" => $_POST[\"nuevoTC\"],\n\t\t\t\t\t\t\t\t\"estado\" => \"D\",\n\t\t\t\t\t\t\t\t\"fecha\" => $ukdate,\n\t\t\t\t\t\t\t\t\"usuario\" => $_POST[\"nuevoUsuario\"],\n\t\t\t\t\t\t\t\t\"glosa1\" => $_POST[\"nuevaGlosa\"],\n\t\t\t\t\t\t\t\t\"tipo1\" => $_POST[\"nuevaFlete\"],\n\t\t\t\t\t\t\t\t\"login\" => $_POST[\"idUsuario\"],\n\t\t\t\t\t\t\t\t\"moneda\" => $_POST[\"nuevaMoneda\"],\n\t\t\t\t\t\t\t\t\"tipo2\" => $_POST[\"nuevoTipo\"],\n\t\t\t\t\t\t\t\t\"sistema\" => \"Registra\",\n\t\t\t\t\t\t\t\t\"numeroNR\" => $_POST[\"nuevoNR\"],\n\t\t\t\t\t\t\t\t\"numeroDC\" => $_POST[\"nuevoDC\"],\n\t\t\t\t\t\t\t\t\"numeroSAP\" => $_POST[\"nuevoSAP\"],\n\t\t\t\t\t\t\t\t\"origen\" => $_POST[\"nuevoOrigen\"],\n\t\t\t\t\t\t\t\t\"destino\" => $_POST[\"nuevoDestino\"],\n\t\t\t\t\t\t\t\t\"placa\" => $_POST[\"nuevaPlacaCamion\"],\n\t\t\t\t\t\t\t\t\"cod_Camion\" => $_POST[\"nuevoCodCamion\"],\n\t\t\t\t\t\t\t\t\"chofer\" => $_POST[\"nuevoChofer\"],\n\t\t\t\t\t\t\t\t\"detalle\" => $_POST[\"listaProductos\"]\n\n\t\t\t\t);\n\n\t\t\t\t$respuesta = ModeloNotaRemision::mdlEditarNotaRemision($tabla, $datos);\n\t\t\t\t\n\t\t\t\tif ($respuesta == \"ok\") {\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"La Nota de Remision ha sido guardado correctamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location = \"notaremision\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t \n\t\t\t\t\t</script>';\n\t\t\t\t}else{\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\ttitle: \"La Nota de Remision no pudo ser guardada correctamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location = \"index.php?ruta=editar-notaremision&idNR=\"'.$_POST[\"editarIdNR\"].'\"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t \n\t\t\t\t\t</script>';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"Ningun campo puede ir vacio o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"index.php?ruta=editar-notaremision&idNR=\"'.$_POST[\"editarIdNR\"].'\"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}); \n\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ae6363a980f142145397ef57925720db", "score": "0.5674139", "text": "function sub11metodo(){\n\t\t\t\t\techo \"<br/><span>in sub11metodo...</span>\";\n\t\t\t\t\tglobal $a,$matriz;//hace referencia a la variable $a del scope superior osea de metodo1;\n\t\t\t\t\t$a++;\n\t\t\t\t\techo \"<br/> \\$a = $a\";//arroja 1\n\t\t\t\t\techo \"<br/>\";\n\t\t\t\t\tprint_r($matriz);//2da forma de imprimir un array(variable escalar)\n\t\t\t\t\tfunction sub111metodo(){\n\t\t\t\t\t\techo \"<br/><span>in sub111metodo...</span>\";\n\t\t\t\t\t\tglobal $a;//hace referencia al $a del scope de sub11metodo;\n\t\t\t\t\t\t$a++;\n\t\t\t\t\t\techo \"<br/> \\$a = $a\";//arroja 1\n\t\t\t\t\t}\n\t\t\t\t\tsub111metodo();\n\t\t\t\t}", "title": "" }, { "docid": "c450320fcac6fb156603e788ac244359", "score": "0.56657314", "text": "function corregirReciboOficial(){\r\n \t\t$this->objFunc=$this->create('MODVentaFacturacion');\r\n \t\t$this->res=$this->objFunc->corregirReciboOficial($this->objParam);\r\n \t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n }", "title": "" }, { "docid": "251ec4fbafb480cda8a40af5edaaee04", "score": "0.56439024", "text": "public function academicosRetrasoAction(){\n\t\t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$coordinador = $user->getUsername();\n\n\t\t$repository = $this->getDoctrine()->getRepository('CituaoUsuarioBundle:Programa');\n\t\t$programa = $repository->findOneByCoordinador($coordinador);\n\n\t\t$listaAcademicos = $programa->getAcademicos();\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t\n\t\tif ($listaAcademicos->count() == 0) {\n\t\t\t$msgerr = array('descripcion'=>'No hay asesores académicos registrados!','id'=>'1');\n\t\t\t$retrasados = array();\n\n\t\t}else{\n\t\t\t$msgerr = array('descripcion'=>'','id'=>'0');\n\t\t\t$retrasados = array();\n\t\t\t$hayRetraso=false;\n\t\t\t$i=0;\n\t\t\tforeach($listaAcademicos as $academico) {\n\t\t\t\t$id = $academico->getId();\n\t\t\t\t$nombre = $academico->getNombres();\n\t\t\t\t$listaPracticantes = $academico->getPracticantes();\n\t\t\t\t\n\t\t\t\tif ($listaPracticantes->count() != 0){\n\t\t\t\t\tforeach($listaPracticantes as $practicante) {\n\t\t\t\t\t\t//buscamos el cronograma del asesor academico\n\t\t\t\t\t\t$query = $em->createQuery(\n\t\t\t\t\t\t\t'SELECT c FROM CituaoAcademicoBundle:Cronograma c WHERE c.academico =:id_aca AND c.practicante =:id_pra');\n\t\t\t\t\t\t$query->setParameter('id_aca',$academico->getId());\n\t\t\t\t\t\t$query->setParameter('id_pra',$practicante->getId());\n\t\t\t\t\t\t$cronograma = $query->getOneOrNullResult();\n\n\t\t\t\t\t\t$hoy = new DateTime();\n\t\t\t\t\t\t$retrasos = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria1() < $hoy && $cronograma->getListoAsesoria1() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria2() < $hoy && $cronograma->getListoAsesoria2() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria3() < $hoy && $cronograma->getListoAsesoria3() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria4() < $hoy && $cronograma->getListoAsesoria4() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria5() < $hoy && $cronograma->getListoAsesoria5() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria6() < $hoy && $cronograma->getListoAsesoria6() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaAsesoria7() < $hoy && $cronograma->getListoAsesoria7() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaVisitaP() < $hoy && $cronograma->getListoVisitaP() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaInformeGestion1() < $hoy && $cronograma->getListoGestion1() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaInformeGestion2() < $hoy && $cronograma->getListoGestion2() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaInformeGestion3() < $hoy && $cronograma->getListoGestion3() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaEvaluacion1() < $hoy && $cronograma->getListoEvaluacion1() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaEvaluacion2() < $hoy && $cronograma->getListoEvaluacion2() == null) $retrasos++;\n\t\t\t\t\t\tif ($cronograma->getFechaEvaluacionFinal() < $hoy && $cronograma->getListoEvaluacionFinal() == null) $retrasos++;\n\n\t\t\t\t\t\tif ($retrasos > 0){\n\t\t\t\t\t\t\t$retrasados[$i] = array('id' => $practicante->getId() ,'ci' => $practicante->getCi(), 'nombres' => $practicante->getNombres(), 'apellidos' => $practicante->getApellidos(), 'path' => $practicante->getPath(), 'emailInstitucional' => $practicante->getEmailInstitucional(), 'emailPersonal' => $practicante->getEmailPersonal(), 'retrasos' => $retrasos);\n\t\t\t\t\t\t\t$hayRetraso = true;\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$retrasos=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$hayRetraso){\n\t\t\t\t$msgerr = array('descripcion'=>'¡Asesores académicos no presentan demoras!','id'=>'1');\n\t\t\t}else{\n\t\t\t\t$msgerr = array('descripcion'=>'','id'=>'0');\n\t\t\t}\n\t\t}\n\t\treturn $this->render('CituaoCoordBundle:Default:academicosenretraso.html.twig', array('listaPracticantes' => $retrasados, 'programa' => $programa, 'msgerr' => $msgerr));\n\t}", "title": "" }, { "docid": "339e61db14c0860127217775a3c5d83e", "score": "0.5642", "text": "public function cargarPreguntas(){\n\t\t$grado=$_GET['grado'];\n\t\t$semestre=$_GET['semestre'];\n\t\t$materia=$_GET['materia'];\n\t\t$tema=$_GET['tema'];\n\t\t$contenido=$_GET['contenido'];\n\n\t\t$this->Model_administracion->cargarPreguntas($grado,$semestre,$materia,$tema,$contenido);\n\t}", "title": "" }, { "docid": "58903eb4f9794dcb7721e9e50a186c20", "score": "0.5614443", "text": "function cargar_preguntas()\n{\nrequire_once('conexion.php');\n\n$objConnect = new ClassConexion();\n$objConnect->MySQL();\n\n$query = \"\tSELECT\n pregunta.pregunta,\n pregunta.id_preg,\n pregunta.descripcion_preg,\n pregunta.imagen_preg\n FROM\n pregunta\";\n\n$consulta = $objConnect->consulta($query);\n\t\t\nif($objConnect->num_rows($consulta)>0){ \n\t$conteo=0;\n \twhile($resultados = $objConnect->fetch_array($consulta)){ \n\t\t \t$result[$conteo]['id_preg'] = $resultados['id_preg'];\n\t\t \t$result[$conteo]['pregunta'] = utf8_encode($resultados['pregunta']);\n\t\t \t$result[$conteo]['imagen_preg'] = $resultados['imagen_preg'];\n $result[$conteo]['descripcion_preg'] = utf8_encode($resultados['descripcion_preg']);\n\t\t \t$result[$conteo]['respuesta'] = cargar_respuesta($resultados['id_preg']);\n\t\t \t//$result[$conteo]['pregunta_id_preg'] = $resultados['pregunta_id_preg'];\n $conteo++;\n \t}\n}else{\n\t$result = 0 ;\n}\n\nreturn $result;\n}", "title": "" }, { "docid": "8ee8fde9c6fdaf8b5e02ac6def6fee66", "score": "0.560931", "text": "public function relist(){\n }", "title": "" }, { "docid": "0cc4b1add2ac67cff70693e6fd78ec90", "score": "0.56048846", "text": "function recuperarRendicionFacturas(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_sel';\n\t\t$this->transaccion='CD_REPRENDET_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\t\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_doc_compra_venta','int8');\n\t\t$this->captura('revisado','varchar');\n\t\t$this->captura('movil','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('importe_excento','numeric');\n\t\t$this->captura('id_plantilla','int4');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('nro_documento','varchar');\n\t\t$this->captura('nit','varchar');\n\t\t$this->captura('importe_ice','numeric');\n\t\t$this->captura('nro_autorizacion','varchar');\n\t\t$this->captura('importe_iva','numeric');\n\t\t$this->captura('importe_descuento','numeric');\n\t\t$this->captura('importe_doc','numeric');\n\t\t$this->captura('sw_contabilizar','varchar');\n\t\t$this->captura('tabla_origen','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_depto_conta','int4');\n\t\t$this->captura('id_origen','int4');\n\t\t$this->captura('obs','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo_control','varchar');\n\t\t$this->captura('importe_it','numeric');\n\t\t$this->captura('razon_social','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t$this->captura('desc_depto','varchar');\n\t\t$this->captura('desc_plantilla','varchar');\n\t\t$this->captura('importe_descuento_ley','numeric');\n\t\t$this->captura('importe_pago_liquido','numeric');\n\t\t$this->captura('nro_dui','varchar');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('id_int_comprobante','int4');\n\t\t$this->captura('desc_comprobante','varchar');\n\t\t$this->captura('importe_pendiente','numeric');\n\t\t$this->captura('importe_anticipo','numeric');\n\t\t$this->captura('importe_retgar','numeric');\n\t\t$this->captura('importe_neto','numeric');\n\t\t$this->captura('id_auxiliar','integer');\n\t\t$this->captura('codigo_auxiliar','varchar');\n\t\t$this->captura('nombre_auxiliar','varchar');\n\t\t$this->captura('id_tipo_doc_compra_venta','integer');\n\t\t$this->captura('desc_tipo_doc_compra_venta','varchar');\n\t\t$this->captura('id_rendicion_det','integer');\n\t\t$this->captura('id_cuenta_doc','integer');\n\t\t$this->captura('id_cuenta_doc_rendicion','integer');\n\t\t$this->captura('detalle','text');\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "3acbb7fc0fdda486b082176e1f9004e4", "score": "0.5603444", "text": "function llenarUtrade($referencias) {\n require_once 'movimientocalidad.class.php';\n $calidad = new MovimientoCalidad();\n\n require_once 'movimiento.class.php';\n $movimiento = new Movimiento();\n\n $retorno = array();\n $movimiento->Movimiento();\n\n\n $regtotal = count($referencias);\n for ($i = 0; $i < $regtotal; $i++) {\n\n\n $nuevoserrores = array();\n $nuevoserrores = $this->validarUtrade($referencias[$i]);\n\n $totalerr = count($nuevoserrores);\n\n\n if ($referencias[$i][\"idMovimiento\"] != 0 and $referencias[$i][\"Producto_idProducto\"] != 0) {\n\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $calidad->MovimientoCalidad();\n\n $calidad->idMovimientoCalidad = (isset($referencias[$i][\"idMovimientoCalidad\"]) ? $referencias[$i][\"idMovimientoCalidad\"] : 0);\n $calidad->Movimiento_idMovimiento = (isset($referencias[$i][\"idMovimiento\"]) ? $referencias[$i][\"idMovimiento\"] : 0);\n $calidad->Producto_idProducto = (isset($referencias[$i][\"Producto_idProducto\"]) ? $referencias[$i][\"Producto_idProducto\"] : 0);\n $calidad->fechaRealInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaRealInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaRealInspeccionMovimientoCalidad'] : '');\n\n\n $calidad->resultadoDefinitivoMovimientoCalidad = (!isset($referencias[$i]['resultadoDefinitivoMovimientoCalidad']) ? '' : (strtolower($referencias[$i]['resultadoDefinitivoMovimientoCalidad']) == 'passed' ? 'aprobada' : ''));\n\n\n\n $movimiento->Movimiento_idMovimiento[0] = (isset($referencias[$i][\"idMovimiento\"]) ? $referencias[$i][\"idMovimiento\"] : 0);\n $movimiento->idMovimientoDetalle[0] = (isset($referencias[$i][\"idMovimientoDetalle\"]) ? $referencias[$i][\"idMovimientoDetalle\"] : 0);\n\n $movimiento->fechaReservaEmbarque1MovimientoDetalle[0] = (isset($referencias[$i]['fechaReservaEmbarque1MovimientoDetalle']) ? $referencias[$i]['fechaReservaEmbarque1MovimientoDetalle'] : '');\n $movimiento->fechaReservaEmbarque2MovimientoDetalle[0] = (isset($referencias[$i]['fechaReservaEmbarque2MovimientoDetalle']) ? $referencias[$i]['fechaReservaEmbarque2MovimientoDetalle'] : '');\n $movimiento->estadoReferenciaMovimientoDetalle[0] = (isset($referencias[$i]['estadoReferenciaMovimientoDetalle']) ? $referencias[$i]['estadoReferenciaMovimientoDetalle'] : '');\n\n // cada que llenamos un producto, lo cargamos a la base de datos\n // si el id esta lleno, lo actualizamos, si esta vacio lo insertamos\n if ($referencias[$i][\"idMovimientoCalidad\"] == 0) {\n $calidad->AdicionarMovimientoCalidadUtrade();\n } else {\n\n $calidad->ModificarMovimientoCalidadUtrade();\n }\n\n if (isset($referencias[$i][\"idMovimientoDetalle\"]) and $referencias[$i][\"idMovimientoDetalle\"] != 0)\n $movimiento->ModificarMovimientoDetalleUtrade();\n }\n else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n }\n\n return $retorno;\n }", "title": "" }, { "docid": "faaf65c282ea1083eccb64bed947c394", "score": "0.5594071", "text": "function listaPreguntasUsuario($idUsuario) {\n\n $preguntas=buscarPreguntasRespuestasUsuario(\"Preguntas\", $idUsuario);\n foreach($preguntas as $clave=>$valor)\n {\n $usuario = encontrarUsuario(\"no\",$valor['Usuario_idUsuario']);\n if (isset($valor['votos'])) {\n $tempListaVotos = puntuacionPreguntas($valor['votos']);\n }else $tempListaVotos = 0;\n preguntaRespuestaUsuario($valor[\"idPregunta\"], $valor['Usuario_idUsuario'], $usuario['nombreusu'], $valor[\"fecha\"],$valor[\"titulo\"],$valor[\"temas\"],$tempListaVotos);\n }\n}", "title": "" }, { "docid": "b4a854852982f6583427094de81e5631", "score": "0.5589232", "text": "public function carga_ordenes_disponibles()\n {\n $aleatorio = $this->lbl_codigo_temporal->Text;\n $sql = \"delete from presupuesto.temporal_compromiso_causado where (numero_documento_causado='$aleatorio')\";\n $resultado=modificar_data($sql,$this);\n\n // para llenar el listado de Beneficiarios\n $cod_organizacion = usuario_actual('cod_organizacion');\n $ano = $this->lbl_ano->Text;\n $cod_proveedor = $this->drop_proveedor->SelectedValue;\n \n $sql2 = \"select m.id, CONCAT(m.tipo_documento,'-',m.numero,' Tot: ',m.monto_total, ' / Pen: ',m.monto_pendiente) as nomb from\n presupuesto.maestro_compromisos m\n where ((m.monto_pendiente > 0) and (m.cod_organizacion = '$cod_organizacion') and\n (m.ano = '$ano') and\n (m.cod_proveedor = '$cod_proveedor') and (m.estatus_actual='NORMAL')) order by nomb\";\n $datos2 = cargar_data($sql2,$this);\n $this->drop_compromisos->Datasource = $datos2;\n $this->drop_compromisos->dataBind();\n\n // para vaciar el listado de codigos presupuestarios\n $vacio=array();\n $this->Repeater->DataSource=$vacio;\n $this->Repeater->dataBind();\n $this->txt_motivo->Text =\"\";// se vacia el motivo\n $this->txt_motivo->Enabled=false;\n $this->lbl_motivo->Text=\"\";\n $this->actualiza_listado();\n\n }", "title": "" }, { "docid": "e836f2d373ff454b29b731488949fe11", "score": "0.5579413", "text": "public function recupereDonnees (){\n\t\t$bdd = $this->bdd ;\n\t\t$req = $bdd->prepare('SELECT invisibleAuteur, idModerateur, moderation, affiche, idArticle, corps, idAuteur, DATE_FORMAT(date_commentaire, \\'%d/%m/%Y\\') AS date_commentaire_fr FROM `Commentaire` WHERE id = ? ORDER BY date_commentaire');\n\t\t$req->execute(array($this->id));\n\t\t$donnees = $req->fetch();\n\t\t$req->closeCursor(); \n\n\t\t$this->corps = $donnees['corps'];\n\t\t$this->idArticle = $donnees['idArticle'];\n\t\t$this->idAuteur = $donnees['idAuteur'];\n\t\t$this->date_commentaire_fr = $donnees['date_commentaire_fr'];\n\t\t$this->idModerateur = $donnees['idModerateur'];\n\t\tif ($donnees['moderation'] == 0){\n\t\t\t$this->moderation = false;\n\t\t} else {\n\t\t\t$this->moderation = true;\n\t\t}\n\n\t\tif ($donnees['affiche'] == 0){\n\t\t\t$this->affiche = false;\n\t\t} else {\n\t\t\t$this->affiche = true;\n\t\t}\n\t\tif ($donnees['invisibleAuteur'] == 0){\n\t\t\t$this->invisibleAuteur = false;\n\t\t} else {\n\t\t\t$this->invisibleAuteur = true;\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "1bac0f1c0fc8e6b2ced7af752a0a087a", "score": "0.55613226", "text": "function pedidos_reprocesos($id_cliente, $mes, $anho, $razon_reproceso)\r\n\t{\r\n\t\t$Info = array();\r\n\t\tif($mes == 'anual')\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-01-01';\r\n\t\t\t$fecha2 = $anho.'-12-31';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fecha1 = $anho.'-'.$mes.'-01';\r\n\t\t\t$fecha2 = $anho.'-'.$mes.'-31';\r\n\t\t}\r\n\t\t\r\n\t\t$SQL = '';\r\n\t\tif('todos' != $razon_reproceso)\r\n\t\t{\r\n\t\t\t$SQL .= ' and ped.id_repro_deta = \"'.$razon_reproceso.'\"';\r\n\t\t}\r\n\t\t\r\n\t\t\t$Consulta = '\r\n\t\t\t\t\t\t\t\tselect proc.id_cliente, cli.codigo_cliente,\r\n\t\t\t\t\t\t\t\tproc.proceso, proc.nombre, ped.id_pedido,\r\n\t\t\t\t\t\t\t\tped.fecha_entrada, ped.fecha_entrega, ped.fecha_reale\r\n\t\t\t\t\t\t\t\tfrom procesos proc, pedido ped, cliente cli\r\n\t\t\t\t\t\t\t\twhere proc.id_proceso = ped.id_proceso\r\n\t\t\t\t\t\t\t\tand proc.id_cliente = cli.id_cliente\r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega >= \"'.$fecha1.'\" \r\n\t\t\t\t\t\t\t\tand ped.fecha_entrega <= \"'.$fecha2.'\" \r\n\t\t\t\t\t\t\t\tand ped.id_tipo_trabajo = \"4\"\r\n\t\t\t\t\t\t\t\t'.$SQL.'\r\n\t\t\t\t\t\t\t\tand proc.id_cliente = \"'.$id_cliente.'\"\r\n\t\t\t\t\t\t\t\tand cli.id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t\t\t\t\t\torder by proc.id_proceso\r\n\t\t\t\t\t\t\t';\r\n\t\t\t//echo $Consulta;\r\n\t\t\t//Ejecutamos la consulta.\r\n\t\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\t$a = 0;\r\n\t\t\tif(0 < $Resultado->num_rows())\r\n\t\t\t{\r\n\t\t\t\tforeach($Resultado->result_array() as $Datos)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t$Consulta = 'select repro.detalle from pedido ped, reproceso_detalle repro\r\n\t\t\t\t\t\t\t\t\t\t\twhere repro.id_repro_deta = ped.id_repro_deta\r\n\t\t\t\t\t\t\t\t\t\t\tand ped.id_pedido in (\"'.$Datos['id_pedido'].'\")\r\n\t\t\t\t\t\t\t\t\t\t\t'.$SQL;\r\n\t\t\t\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\t\t\t$Info[$a]['detalle'] = '';\r\n\t\t\t\t\tif(0 < $Resultado->num_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$Detalle = $Resultado->row_array();\r\n\t\t\t\t\t\t$Info[$a]['detalle'] = $Detalle['detalle'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$Info[$a]['id_cliente'] = $Datos['id_cliente'];\r\n\t\t\t\t\t$Info[$a]['codigo_cliente'] = $Datos['codigo_cliente'];\r\n\t\t\t\t\t$Info[$a]['proceso'] = $Datos['proceso'];\r\n\t\t\t\t\t$Info[$a]['nombre'] = $Datos['nombre'];\r\n\t\t\t\t\t$Info[$a]['id_pedido'] = $Datos['id_pedido'];\r\n\t\t\t\t\t$Info[$a]['fecha_entrada'] = $Datos['fecha_entrada'];\r\n\t\t\t\t\t$Info[$a]['fecha_entrega'] = $Datos['fecha_entrega'];\r\n\t\t\t\t\t$Info[$a]['fecha_reale'] = $Datos['fecha_reale'];\r\n\r\n\t\t\t\t\t$a++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $Info;\r\n\t}", "title": "" }, { "docid": "4fc96dfc0fc615fd6a14458322e4e5d4", "score": "0.55591387", "text": "static public function ctrTraerCabeceras($ruta){\n\n\n$tabla = \"cabeceras\";\n\n $respuesta = ModeloPlantilla::mdlTraerCabeceras($tabla , $ruta);\n return $respuesta;\n\n}", "title": "" }, { "docid": "ed6d8a79080f6c265cc26293d9292bdd", "score": "0.555324", "text": "public function run()\n {\n //\n $permisos = [\n ['nombre' => 'VER_USUARIOS'], // id = 1\n ['nombre' => 'VER_USUARIO'],\n ['nombre' => 'CREAR_USUARIO'],\n ['nombre' => 'ELIMINAR_USUARIO'],\n ['nombre' => 'MODIFICAR_USUARIO'],\n ['nombre' => 'VER_CLASES'],\n ['nombre' => 'VER_CLASE'],\n ['nombre' => 'CREAR_CLASE'],\n ['nombre' => 'MODIFICAR_CLASE'],\n ['nombre' => 'ELIMINAR_CLASE'], // id = 10\n ['nombre' => 'VER_CLASES_ESPECIFICAS'],\n ['nombre' => 'VER_CLASE_ESPECIFICA'],\n ['nombre' => 'VER_LISTADO_CLASES_ESPECIFICAS'],\n ['nombre' => 'VER_LISTADO_CLASES_ESPECIFICAS_ALUMNO'],\n ['nombre' => 'MODIFICAR_CLASE_ESPECIFICA'],\n ['nombre' => 'VER_ACTIVIDADES'],\n ['nombre' => 'VER_ACTIVIDAD'],\n ['nombre' => 'VER_LISTADO_ACTIVIDADES'],\n ['nombre' => 'CREAR_ACTIVIDAD'],\n ['nombre' => 'MODIFICAR_ACTIVIDAD'], // id = 20\n ['nombre' => 'ELIMINAR_ACTIVIDAD'],\n ['nombre' => 'VER_ACTIVIDADES_HORAS_LIMITE'],\n ['nombre' => 'CANCELAR_CLASE'],\n ['nombre' => 'SUSPENDER_CLASES'],\n ['nombre' => 'RECUPERAR_CLASE'],\n ['nombre' => 'VER_ROLES'],\n ['nombre' => 'VER_ROL'],\n ['nombre' => 'CREAR_ROL'],\n ['nombre' => 'MODIFICAR_ROL'],\n ['nombre' => 'ELIMINAR_ROL'], // id = 30\n ['nombre' => 'VER_PERMISOS'],\n ['nombre' => 'VER_ITEMS_INVENTARIO'],\n ['nombre' => 'VER_ITEM_INVENTARIO'],\n ['nombre' => 'CREAR_ITEM_INVENTARIO'],\n ['nombre' => 'MODIFICAR_ITEM_INVENTARIO'],\n ['nombre' => 'ELIMINAR_ITEM_INVENTARIO'],\n ['nombre' => 'VER_CUOTAS'], \n ['nombre' => 'VER_CUOTA'],\n ['nombre' => 'CREAR_CUOTA'],\n ['nombre' => 'MODIFICAR_CUOTA'], // id = 40\n ['nombre' => 'ELIMINAR_CUOTA'],\n ['nombre' => 'LISTADO_ALUMNOS'],\n ['nombre' => 'VER_MOVIMIENTOS'],\n ['nombre' => 'VER_MOVIMIENTO'],\n ['nombre' => 'CREAR_MOVIMIENTO'],\n ['nombre' => 'REPORTE_INGRESOS_ALUMNOS'],\n ['nombre' => 'VER_RUTINAS'],\n ['nombre' => 'VER_RUTINA'],\n ['nombre' => 'CREAR_RUTINA'],\n ['nombre' => 'MODIFICAR_RUTINA'], // id = 50\n ['nombre' => 'ELIMINAR_RUTINA'],\n ['nombre' => 'VER_RUTINA_ALUMNO'],\n ['nombre' => 'CARGAR_DETALLES'],\n ['nombre' => 'CARGAR_DETALLES_ALUMNO'],\n ['nombre' => 'VER_CLASES_ESPECIFICAS_ALUMNO'],\n ['nombre' => 'VER_EJERCICIOS'],\n ['nombre' => 'VER_PERFIL'],\n ['nombre' => 'VER_PERFIL_ALUMNO'],\n ['nombre' => 'MODIFICAR_ALUMNO'],\n ['nombre' => 'VER_LISTADO_PAGOS'], // id = 60\n ['nombre' => 'VER_NOVEDADES'],\n ['nombre' => 'CREAR_NOVEDAD'],\n ['nombre' => 'VER_NOVEDAD'],\n ['nombre' => 'MODIFICAR_NOVEDAD'],\n ['nombre' => 'ELIMINAR_NOVEDAD']\n ];\n DB::table('permisos')->insert($permisos);\n }", "title": "" }, { "docid": "0f60d7c9f3e2610df42d10ed53eef16d", "score": "0.55483323", "text": "public function executeMensajesPapelera()\n {\n\n // Se obtienen los cursos a los que atiende o que enseña el usuario que esta\n // conectado para pasarlos al template\n $cursos_temp = $this->getUser()->getCursosAny();\n $cursos = array();\n $cursos[0] = \"Todos los cursos\";\n foreach($cursos_temp as $curso_temp) {\n $cursos[$curso_temp->getIdCurso()] = $curso_temp->getCurso()->getNombre();\n }\n $this->cursos = $cursos;\n\n }", "title": "" }, { "docid": "f37590d9ae1e866fc1a031dcca999cd4", "score": "0.5544912", "text": "public function MezclarPreguntas(){\n\t\tshuffle($this->preguntas);\n\t\treturn $this->preguntas;\n\t}", "title": "" }, { "docid": "3e21e379867c4e3a659e6ec0addd0e5d", "score": "0.55423784", "text": "function reabrircompraAction(){\n $usuarios = new Zend_Session_Namespace(\"usuarios\");\n //crio a sessao de mensagens\n $messages = new Zend_Session_Namespace(\"messages\");\n $carrinho = new Zend_Session_Namespace(\"carrinho\");\n\n //verifico se existe usuário logado com sessao\n if ($usuarios->logado == TRUE) {\n $model_cesta = new Default_Model_Cestas;\n $modelCompra = new Default_Model_Compras();\n \n $idcompra = $this->_request->getParam(\"idcompra\");\n \n $dadosCompra = $modelCompra->fetchRow(array('NR_SEQ_COMPRA_COSO = ?' => $idcompra));\n\n if($usuarios->idperfil != $dadosCompra->NR_SEQ_CADASTRO_COSO){\n $messages->error = \"Você não tem permissão para isso\";\n $this->_redirect('/minhas-compras');\n }\n\n if($dadosCompra->ST_COMPRA_COSO != 'A'){\n $messages->error = \"Essa compra não está disponivel para ser reaberta.\";\n $this->_redirect('/minhas-compras');\n }\n\n if(!empty($dadosCompra->DS_TID_COSO)){\n $db = Zend_Db_Table::getDefaultAdapter();\n $sql = \"select NR_SEQ_TAMANHO_CESO, NR_QTDE_CESO, NR_SEQ_PRODUTO_CESO FROM cestas WHERE NR_SEQ_COMPRA_CESO = \" . addslashes($idcompra);\n $query = $db->query($sql);\n $listas = $query->fetchAll();\n\n foreach($listas as $lista){\n $sql2 = \"UPDATE estoque SET NR_QTDE_ESRC = NR_QTDE_ESRC + \".$lista['NR_QTDE_CESO'].\" WHERE NR_SEQ_TAMANHO_ESRC = \".$lista['NR_SEQ_TAMANHO_CESO'].\" AND NR_SEQ_PRODUTO_ESRC =\".$lista['NR_SEQ_PRODUTO_CESO'];\n $db->query($sql2);\n\n $sql3 = \"INSERT INTO estoque_controle (NR_SEQ_USUARIO_ECRC, NR_SEQ_PRODUTO_ECRC, NR_SEQ_TAMANHO_ECRC, DS_ACAO_ECRC, DS_OBS_ECRC, DT_ACAO_ECRC, NR_QTDE_ECRC)\n values (9, \".$lista['NR_SEQ_PRODUTO_CESO'].\", \".$lista['NR_SEQ_TAMANHO_CESO'].\", 'Adicionou \".$lista['NR_QTDE_CESO'].\"', 'Cancelamento compra \" . $idcompra . \" pelo cliente', sysdate(), \".$lista['NR_QTDE_CESO'].\")\";\n $db->query($sql3);\n\n $sql4 = \"UPDATE produtos SET DS_CLASSIC_PRRC = 'N' WHERE NR_SEQ_PRODUTO_PRRC = \".$lista['NR_SEQ_PRODUTO_CESO'];\n $db->query($sql4);\n\n $data_hoje = date(\"Y-m-d H:s:i\");\n $sql5 = \"UPDATE compras SET ST_COMPRA_COSO = 'C', DT_STATUS_COSO = '$data_hoje', ST_NOVOPGTO_COSO = null WHERE NR_SEQ_COMPRA_COSO =\".$idcompra;\n $db->query($sql5);\n }\n }\n \n Zend_Session::namespaceUnset('carrinho');\n \n $select_cesta = $model_cesta->select()\n //digo que nao existe integridade entre as tabelas\n ->setIntegrityCheck(false)\n //escolho a tabela do select para o join\n ->from('cestas')\t\t\n //agora o join dos produtos\n ->joinInner(\"produtos\", \"produtos.NR_SEQ_PRODUTO_PRRC = cestas.NR_SEQ_PRODUTO_CESO\", array(\"NR_SEQ_PRODUTO_PRRC\",\n \"DS_EXT_PRRC\",\n \"DS_PRODUTO_PRRC\",\n \"DS_INFORMACOES_PRRC\",\n \"NR_SEQ_TIPO_PRRC\"))\n ->joinLeft(\"tamanhos\", \"cestas.NR_SEQ_TAMANHO_CESO = tamanhos.NR_SEQ_TAMANHO_TARC\", array(\"DS_SIGLA_TARC\"))\n ->where(\"NR_SEQ_COMPRA_CESO = ?\", $idcompra);\n\n // die($select_cesta);\n //crio a lista\n $lista_produtos = $model_cesta->fetchAll($select_cesta);\n \n foreach($lista_produtos as $listaProduto){\n \n // Busca o id do produto\n $idproduto = $listaProduto->NR_SEQ_PRODUTO_CESO;\n $estoque = $listaProduto->NR_SEQ_ESTOQUE_CESO;\n $genero = $this->_request->getParam(\"genero\", 0);\n $tamanho = $listaProduto->NR_SEQ_TAMANHO_CESO;\n\n //tipo do cadastro\n $tipo_cadastro = $usuarios->tipo;\n\n //inicio o model do produto\n $model_produto = new Default_Model_Produtos();\n\n $select_tipo = $model_produto->select()->from('produtos', array(\"NR_SEQ_TIPO_PRRC\"))->where(\"NR_SEQ_PRODUTO_PRRC = ?\", $idproduto);\n\n $tipo_prod = $model_produto->fetchRow($select_tipo);\n\n //crio a query\n $select = $model_produto->select()\n //digo que nao existe integridade entre as tabelas\n ->setIntegrityCheck(false)\n //seleciono da tabela de produtos\n ->from('produtos', array(\"DS_PRODUTO_PRRC\",\n \"DS_INFORMACOES_PRRC\",\n \"DS_EXT_PRRC\",\n \"VL_PRODUTO_PRRC\",\n \"NR_PESOGRAMAS_PRRC\",\n \"VL_PROMO_PRRC\",\n \"DS_FRETEGRATIS_PRRC\"))\n //faço o join\n ->joinLeft('estoque',\n 'produtos.NR_SEQ_PRODUTO_PRRC = estoque.NR_SEQ_PRODUTO_ESRC', array('NR_QTDE_ESRC','NR_SEQ_TAMANHO_ESRC'))\n\n ->joinLeft('tamanhos', 'estoque.NR_SEQ_TAMANHO_ESRC = tamanhos.NR_SEQ_TAMANHO_TARC', array(\"DS_SIGLA_TARC\"))\n //faco o join dos tipos\n ->joinInner('produtos_tipo',\n 'produtos_tipo.NR_SEQ_CATEGPRO_PTRC = produtos.NR_SEQ_TIPO_PRRC', array('NR_SEQ_CATEGPRO_PTRC'))\n //seleciono somente o produto desejado\n ->where(\"NR_SEQ_PRODUTO_PRRC = ?\", $idproduto);\n \n //se o tipo do produto for diferente de 9 (vale presente acrescento o estoque na pesquisa)\n if($tipo_prod->NR_SEQ_TIPO_PRRC != 9){\n $select->where(\"NR_SEQ_ESTOQUE_ESRC = ?\", $estoque);\n }\n\n\n //seleciono o produto e armazeno e uma variavel\n $produto = $model_produto->fetchRow($select);\n\n $nome = $produto['DS_PRODUTO_PRRC'];\n $descricao = $produto['DS_INFORMACOES_PRRC'];\n $extensao_imagem = $produto[\"DS_EXT_PRRC\"];\n $valor = $listaProduto->VL_PRODUTOCHEIO_CESO;\n //$valor = $produto['VL_PRODUTO_PRRC'];\n $peso = $produto['NR_PESOGRAMAS_PRRC'];\n $valor_promo = $listaProduto->VL_PRODUTO_CESO;\n //$valor_promo = $produto['VL_PROMO_PRRC'];\n $qtde_estoque = $produto['NR_QTDE_ESRC'];\n $tipo = $produto['NR_SEQ_CATEGPRO_PTRC'];\n $st_frete_gratis = $produto['DS_FRETEGRATIS_PRRC'];\n $sigla \t\t\t= $produto['DS_SIGLA_TARC'];\n\n // Zend_Debug::dump($imagem);die;\n //se for pessoa juridica adiciona ao carrinho com quantidade\n \n //se o tipo de produto for 9 (diferente de vale presente)\n if($tipo_prod->NR_SEQ_TIPO_PRRC != 9){\n $carrinho->produtos[$estoque] = array(\n 'codigo' => $idproduto,\n 'nome' => $nome,\n 'descricao' => $descricao,\n 'path' => $extensao_imagem,\n 'valor' => $valor,\n 'peso'\t=> $peso,\n 'tamanho' => $tamanho,\n 'genero' => $genero,\n 'quantidade' => 1,\n 'vl_promo' => $valor_promo,\n 'estoque' => $qtde_estoque,\n 'tipo' => $tipo,\n 'idestoque' => $estoque,\n 'frete_gratis' => $st_frete_gratis,\n 'sigla' => $sigla,\n 'brinde' => 0\n );\n \n // Declaro as variaveis\n $existeValePresente = false;\n\n // Percorro todos itens\n foreach($carrinho->produtos as $key => $produtoCarrinho){\n // Verifico se existe vale presente\n if($produtoCarrinho['tipo'] == 9){\n $existeValePresente = true;\n }\n }\n\n // Se existir vale presente\n if($existeValePresente){\n // Apago ele do carrinho\n unset($carrinho->produtos[$estoque]);\n $messages->error = \"Finalize a compra do vale presente para comprar outros produtos.\";\n\n // Redireciona para a pagina anterior\n $this->_redirect('/carrinho-compras');\n }\n // Se o produto for vale presente\n }else{\n $carrinho->produtos[$idproduto] = array(\n 'codigo' => $idproduto,\n 'nome' => $nome,\n 'descricao' => $descricao,\n 'path' => $extensao_imagem,\n 'valor' => $valor,\n 'peso'\t=> $peso,\n 'tamanho' => 12,\n 'genero' => $genero,\n 'quantidade' => 1,\n 'vl_promo' => $valor_promo,\n 'estoque' => $qtde_estoque,\n 'tipo' => $tipo,\n 'idestoque' => 1,\n 'frete_gratis' => $st_frete_gratis,\n 'sigla' => $sigla,\n 'brinde' => 0\n );\n\n // Declaro as variaveis\n $existeProduto = false;\n\n // Percorro todos itens\n foreach($carrinho->produtos as $key => $produtoCarrinho){\n // Verifico se existe produto\n if($produtoCarrinho['tipo'] != 9){\n $existeProduto = true;\n }\n }\n\n // Se existir produto\n if($existeProduto){\n // Apago ele do carrinho\n unset($carrinho->produtos[$idproduto]);\n $messages->error = \"A compra do vale presente precisa ser feita em um pedido separado.\";\n\n // Redireciono ele para a pagina anterior\n $this->_redirect($_SERVER['HTTP_REFERER']);\n }\n }\n }\n }\n\n $this->_redirect('/carrinho-compras');\n \n\n//\t\t//crio a sessao de usuarios\n//\t\t$usuarios = new Zend_Session_Namespace(\"usuarios\");\n//\t\t//crio a sessao de mensagens\n//\t\t$messages = new Zend_Session_Namespace(\"messages\");\n//\t\t//verifico se existe usuário logado com sessao\n//\t\tif ($usuarios->logado == TRUE) {\n//\t\t\t//recebo o id da compra\n//\t\t\t$idcompra = $this->_request->getParam(\"idcompra\");\n//\t\t\t//inicio o model de cesta\n//\t\t\t$model_cesta = new Default_Model_Cestas;\n//\t\t\t//inicio a consulta\n//\n//\t\t\t$select_cesta = $model_cesta->select()\n//\t\t\t//digo que nao existe integridade entre as tabelas\n//\t\t\t\t->setIntegrityCheck(false)\n//\t\t\t\t//escolho a tabela do select para o join\n//\t\t\t\t->from('cestas', array(\"NR_SEQ_COMPRA_CESO\",\n//\t\t\t\t\t\t\t\t\t \t\"VL_PRODUTO_CESO\",\n//\t\t\t\t\t\t\t\t\t \t\"NR_QTDE_CESO\"))\t\t\n//\t\t\t\t//agora o join dos produtos\n//\t\t\t\t->joinInner(\"produtos\", \"produtos.NR_SEQ_PRODUTO_PRRC = cestas.NR_SEQ_PRODUTO_CESO\", array(\"NR_SEQ_PRODUTO_PRRC\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_EXT_PRRC\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_PRODUTO_PRRC\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_INFORMACOES_PRRC\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"NR_SEQ_TIPO_PRRC\"))\n//\t\t\t\t->joinLeft(\"tamanhos\", \"cestas.NR_SEQ_TAMANHO_CESO = tamanhos.NR_SEQ_TAMANHO_TARC\", array(\"DS_SIGLA_TARC\"))\n//\t\t\t\t->where(\"NR_SEQ_COMPRA_CESO = ?\", $idcompra);\n//\n//\t\t\t\t// die($select_cesta);\n//\t\t\t\t//crio a lista\n//\t\t\t\t$lista_produtos = $model_cesta->fetchAll($select_cesta);\n//\t\t\t\t//assino ao view\n//\t\t\t\t$this->view->produtos_compra = $lista_produtos;\n//\n//\n//\t\t\t\n//\t\t\t\t//inicio o model de compras\n//\t\t\t\t$model_compra = new Default_Model_Compras;\n//\t\t\t\t//agora faço das compras e do comprador\n//\t\t\t\t$select_compra= $model_compra->select()\n//\t\t\t\t//digo que nao existe integridade entre as tabelas\n//\t\t\t\t->setIntegrityCheck(false)\n//\t\t\t\t//escolho a tabela do select para o join\n//\t\t\t\t->from(\"compras\", array(\"VL_DESCONTO_COSO\", \n//\t\t\t\t\t\t\t\t\t\t\"NR_PARCELAS_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"ST_COMPRA_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"DS_FORMAPGTO_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"VL_TOTAL_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"VL_FRETE_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"DT_COMPRA_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"NR_SEQ_COMPRA_COSO\",\n//\t\t\t\t\t\t\t\t\t\t\"TOTAL_COMPRA\" => \"(SELECT SUM(VL_PRODUTO_CESO) FROM cestas WHERE NR_SEQ_COMPRA_CESO = $idcompra)\"))\n//\t\t\t\t//agora junto o comprador\n//\t\t\t\t->joinInner(\"cadastros\", \"cadastros.NR_SEQ_CADASTRO_CASO = compras.NR_SEQ_CADASTRO_COSO\", array(\"DS_NOME_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_ENDERECO_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_NUMERO_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_COMPLEMENTO_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_BAIRRO_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_CIDADE_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_CEP_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_UF_CASO\",\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"DS_PAIS_CACH\"))\n//\t\t\t\t->where(\"NR_SEQ_COMPRA_COSO = ?\", $idcompra);\n//\n//\n//\n//\t\t\t\t//crio uma lista\n//\t\t\t\t$detalhes = $model_compra->fetchRow($select_compra);\n//\t\t\t\t//assino ao view\n//\t\t\t\t$this->view->detalhes = $detalhes;\n//\n//\t\t\t\t$total_compra = $detalhes->VL_TOTAL_COSO;\n//\n//\t\t\t\t//verifico o total da compra\n//\t\t\t\tswitch ($total_compra) {\n//\t\t\t\t// se for maior ou igual que 50 dividimos em 2 vezes\n//\t\t\t\t\tcase $total_compra >= 50:\n//\t\t\t\t\t\t//2x\n//\t\t\t\t\t\t$this->view->duas_parcelas = $total_compra / 2;\n//\n//\t\t\t\t\t//se for maior que 100 dividimos em 3x\n//\t\t\t\t\tcase $total_compra >= 100:\n//\t\t\t\t\t\t//3X\n//\t\t\t\t\t\t$this->view->tres_parcelas = $total_compra / 3;\n//\t\t\t\t\t//se for maior que 150 4x\n//\t\t\t\t\tcase $total_compra >= 150:\n//\n//\t\t\t\t\t\t$this->view->quatro_parcelas = $total_compra / 4;\n//\n//\t\t\t\t}\n//\n//\t\t\t\t$model_banner = new Default_Model_Banners();\n//\t\t\t\t//crio o dia e hora atual\n//\t\t\t\t$dia_hora = date(\"Y-m-d H:i:s\");\n//\t\t\t\t//crio a query com os banners que pertencem somente a esta pagina e ativos e depois ordeno por data de cadastro\n//\t\t\t\t$select_agendado_topo = $model_banner->select()\n//\t\t\t\t\t\t\t\t\t->where(\"NR_SEQ_LOCAL_BARC = 87\")\n//\t\t\t\t\t\t\t\t\t->where(\"ST_BANNER_BARC = 'A'\")\n//\t\t\t\t\t\t\t\t\t->where(\"ST_AGENDAMENTO_BARC = 1\")\n//\t\t\t\t\t\t\t\t\t->where(\"'$dia_hora' BETWEEN DT_INICIO_BARC AND DT_FIM_BARC\")\n//\t\t\t\t\t\t\t\t\t->order(\"DT_CADASTRO_BARC DESC\");\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t//armazeno em uma variavel\n//\t\t\t\t$agendados_topo = $model_banner->fetchAll($select_agendado_topo)->toArray();\n//\t\t\t\t\n//\t\t\t\t//crio a query com os banners que pertencem somente a esta pagina e ativos e depois ordeno por data de cadastro\n//\t\t\t\t$select_normais_topo = $model_banner->select()\n//\t\t\t\t\t\t\t\t\t\t->where(\"NR_SEQ_LOCAL_BARC = 87\")\n//\t\t\t\t\t\t\t\t\t\t->where(\"ST_BANNER_BARC = 'A'\")\n//\t\t\t\t\t\t\t\t\t\t->where(\"ST_AGENDAMENTO_BARC = 0\")\n//\t\t\t\t\t\t\t\t\t\t->order(\"DT_CADASTRO_BARC DESC\");\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t//armazeno em uma variavel\n//\t\t\t\t$normais_topo = $model_banner->fetchAll($select_normais_topo)->toArray();\n//\t\t\t\t//junto os 2 tipos de banners em um só array\n//\t\t\t\t$banners_topo = array_merge($agendados_topo ,$normais_topo);\n//\n//\t\t\t\t//Assino ao view\n//\t\t\t\t$this->view->banners = $banners_topo;\n//\n//\t\t}else{\n//\n//\t\t\t$messages->error = \"Você precisa estar logado para ver os detalhes da sua compra\";\n//\t\t\t//redireciono\n//\t\t\t$this->_redirect($_SERVER['HTTP_REFERER']);\n//\t\t}\n\n\n\t}", "title": "" }, { "docid": "402015826a2508769f178c320b967763", "score": "0.5535562", "text": "function Buscar_Libros_Basico($Patron_Nombre_Ingresado) {\n $Listado = array();\n $MiConexion = ConexionBD();\n \n if ($MiConexion != false) {\n $SQL = \"SELECT L.id as IdLibro, L.nombre as NombreLibro, G.nombre AS NombreGenero, \n A.nombre AS NombreAutor, A.apellido AS ApellidoAutor, \n L.fecha_carga AS FechaRegistro , L.imagen as Imagen, L.disponible as Activo\n FROM libros L, generos G, autores A\n WHERE L.id_genero=G.id AND L.id_autor=A.id \n AND L.nombre like '%$Patron_Nombre_Ingresado%'\n ORDER BY L.fecha_carga asc \";\n\n $rs = mysqli_query($MiConexion, $SQL);\n $i = 0;\n while ($data = mysqli_fetch_array($rs)) {\n $Listado[$i]['ID_LIBRO'] = $data['IdLibro'];\n $Listado[$i]['NOMBRE_LIBRO'] = utf8_encode($data['NombreLibro']);\n $Listado[$i]['NOMBRE_GENERO'] = utf8_encode($data['NombreGenero']);\n $Listado[$i]['AUTOR'] = utf8_encode($data['ApellidoAutor']) . ', ' . utf8_encode($data['NombreAutor']);\n $Listado[$i]['FECHA_REGISTRO'] = $data['FechaRegistro'];\n $Listado[$i]['IMAGEN_LIBRO'] = $data['Imagen'];\n $Listado[$i]['ACTIVO'] = $data['Activo'];\n $i++;\n }\n }\n\n return $Listado;\n}", "title": "" }, { "docid": "db5dc1359cdd2a2e33939b4e31656e9c", "score": "0.55323994", "text": "function generarRegistrosAleatorio($cantidad){\n $registros = [];\n for($i = 0; $i < $cantidad; $i++){\n $nombre = obtenerNombreAleatorio();\n $apellido = obtenerApellidoAleatorio();\n $registros[] = [\n 'nombres' => $nombre,\n 'apellidos' => $apellido,\n 'correo' => obtenerCorreo(omitirTildesCadena($nombre), omitirTildesCadena($apellido)),\n 'telefono' => obtenerTelefonoAleatorio(),\n 'direccion' => obtenerDireccionAleatoria()\n ]; \n }\n return $registros;\n}", "title": "" }, { "docid": "5122a40387a51042fff534068fe7ec2e", "score": "0.5531042", "text": "public function showEmpresaResumo() {\r\n\t\tglobal $bd;\r\n\t\t// carrega empresa vinculada\r\n\t\t$empresa = new Empresa($bd);\r\n\t\t$empresa->load($this->campos['empresaID']);\r\n\t\t\r\n\t\t// começa a montar html\r\n\t\t$html = '\r\n\t\t<span class=\"headerLeft\">Empresa</span>\r\n\t\t<table width=\"100%\">';\r\n\t\t\r\n\t\t// coloca empresa\r\n\t\t$html .= '\r\n\t\t<tr class=\"c\">\r\n\t\t\t<td class=\"c\" colspan=\"1\"><b>Empresa</b>:</td>\r\n\t\t\t<td class=\"c\" colspan=\"5\">'.SGDecode($empresa->get('nome'));\r\n\t\t\r\n\t\t// verifica se o campo empresaID é editável... \r\n\t\t//$incluiDivEdit = false;\r\n\t\tif ($this->verificaEditavel('empresaID')) {\r\n\t\t\t$c = 'empresaID';\r\n\t\t\t$c = montaCampo($c, 'edt', $this->campos);\r\n\t\t\t\r\n\t\t\tif (checkPermission(94)) $html .= ' <a onclick=\"editEmpresa('.$this->id.')\">[editar]</a>';\r\n\t\t\t//$incluiDivEdit = true;\r\n\t\t}\r\n\t\t\r\n\t\t$html .= '</td>\r\n <td class=\"c\" colspan=\"1\"><b>CNPJ</b>: </td>\r\n\t\t\t<td class=\"c\" colspan=\"5\">'.SGDecode($empresa->get('cnpj')).'\r\n\t\t</tr>';\r\n\t\t\r\n\t\t// pega os funcionários vinculados a este contrato\r\n\t\t$func = $empresa->getFuncionariosPorContrato($this->id);\r\n\t\t\r\n\t\t// se não achou nada, seta a lista de funcionários como uma array vazia\r\n\t\t// para que não gere warning no foreach\r\n\t\tif (count($func) <= 0)\r\n\t\t\t$func = array();\r\n\t\t\r\n\t\t// percorre lista de funcionários\r\n\t\tforeach ($func as $f) {\r\n\t\t\t$label = '';\r\n\t\t\t// seta label do tipo de responsabilidade\r\n\t\t\tif ($f['tipo'] == 'resp')\r\n\t\t\t\t$label = 'Respons&aacute;vel';\r\n\t\t\telseif ($f['tipo'] == 'respTec')\r\n\t\t\t\t$label = 'Respons&aacute;vel T&eacute;cnico';\r\n\t\t\telse\r\n\t\t\t\t$label = 'Engenheiro Residente';\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t// monta link para arquivo de ART\r\n\t\t\t$linkART = explode('/', $f['art']);\r\n\t\t\t$linkART = $linkART[count($linkART) - 1];\r\n\t\t\t$linkART = '<a href=\"'.$f['art'].'\">'.$linkART.'</a>';\r\n\r\n\t\t\t// seta label de ativo/desativado\r\n\t\t\t$ativo = \"Ativo\";\r\n\t\t\tif ($f['ativo'] == 0) {\r\n\t\t\t\t$ativo = \"Desativado\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// monta linha\r\n\t\t\t$html .= '\r\n\t\t\t<tr class=\"c\">\r\n\t\t\t\t<td class=\"c\"><b>'.$label.'</b>: </td>\r\n\t\t\t\t<td class=\"c\">'.$f['nome'].'</td>\r\n\t\t\t\t<td class=\"c\">'.$ativo.'</td>\r\n\t\t\t\t<td class=\"c\"><b>ART</b>: </td>\r\n\t\t\t\t<td class=\"c\">'.$linkART.'</td>\r\n\t\t\t</tr>\r\n\t\t\t';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// mostra link para edição de funcionários\r\n\t\t$html .= '\r\n\t\t<tr class=\"c\">\r\n\t\t\t<td class=\"c\" colspan=\"4\">\r\n\t\t\t\t<a onclick=\"editEmpresa('.$this->id.')\">[editar funcion&aacute;rios]</a>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t';\r\n\t\t\r\n\t\t$html .= '</table>';\r\n\t\t\r\n\t\t//if ($incluiDivEdit == true) {\r\n\t\t// mostra div para dialog de edição de funcionários+empresa\r\n\t\t$html .= $this->showEditEmpresaForm($func);\r\n\t\t//}\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "b81791edc3601427b4090e60601eb8d7", "score": "0.55285925", "text": "public function get_postulaciones()\n\t{\n\t\trequire_once(\"../../Modelo/postulacion_modelo.php\");\n\n\t\t$post=new postulacion_modelo();\n\t\t$matrizPost=$post->get_postulantes();\n\n\n\n\t\t foreach ($matrizPost as $fila) {\n\t\techo '\n\t\t <tr>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"idpostulacion\"].' </td>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"nombre\"].\" \".$fila[\"apellidos\"].'</td>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"tema\"].'</td>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"descripcion\"].'</td>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"correo\"].'</td>\n\t\t <td align=\"center\" class=\"columnas\">'.$fila[\"telefono\"].'</td>\n\t\t './/<td align=\"center\" class=\"acciones\"><a href=\"modificar_slider.php?id='.$fila[\"idpostulacion\"].'\">Modificar</a></td>.\n\t\t '<td align=\"center\" class=\"acciones\"><a href=\"eliminar_postulacion.php?id='.$fila[\"idpostulacion\"].'\">Eliminar</a></td>\n\t\t </tr>';\n\t\t }\n\n\t\t//Se llama a la vista desde donde pongamos nuestra funcion\n\t\trequire_once(\"../../Vista/admin/postulacion-updel.view.php\");\n\t}", "title": "" }, { "docid": "fab155dc7f3d12ade28e2a30b59cf583", "score": "0.55017996", "text": "function printUltimasRequisicoes($requisicoes){\n\t\t\t$count = 1;\n\t\t\t$data = date('d/m/Y');\n\t\t\t$dataAux = date('d/m/Y')+1;\n\t\t\t\n\t\t\t$result .= '<form action=\"../control/action/RequisicaoAction.php\" method=\"post\" name=\"FormUltimosFeeds\" id=\"FormUltimosFeeds\">';\n\t\t\t\n\t\t\twhile ($requisicoes->fetch()) {\n\t\t\t\tif ($count > 1) {\n\t\t\t\t\t$dataAux = FormataDataTs($requisicoes->momento_cadastro);\n\t\t\t\t}\n\t\t\t\tif ($dataAux != $data){\n\t\t\t\t\tif (FormataDataTs($requisicoes->momento_cadastro) == date('d/m/Y'))\n\t\t\t\t\t\t$result .= '<div class=\"tarefas-data\"><b>Hoje</b></div><br>';\n\t\t\t\t\telse\n\t\t\t\t\t\t$result .= '<div class=\"tarefas-data\"><b>'.FormataDataTs($requisicoes->momento_cadastro).'</b></div><br>';\n\t\t\t\t}\n\t\t\t\t$data = FormataDataTs($requisicoes->momento_cadastro);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t$result .= '<div style=\"float:left;border-bottom:1px #ccc solid;margin-bottom:5px;width:400px;margin-left:7px;\">';\n\t\t\t\t\n\t\t\t\tif ($requisicoes->situacao == 1) $requisicoes->situacao = 'Aguardando Análise';\n\t\t\t\tif ($requisicoes->situacao == 2) $requisicoes->situacao = 'Solução em Andamento';\n\t\t\t\tif ($requisicoes->situacao == 3) $requisicoes->situacao = 'Resolvido';\n\t\t\t\tif ($requisicoes->situacao == 4) $requisicoes->situacao = 'Rejeitado';\n\t\t\t\t\n\t\t\t\t$result .= '<div style=\"margin-left:5px;margin-top:15px;\"><img title=\"\" src=\"ci/imagens/ind_vermelho.png\"></div>';\n\t\t\t\t\n\t\t\t\t$result .= '<div class=\"tarefas-titulo\">';\n\t\t\t\t$result .= '<a href=\"javascript:abreRequisicao(\\''.$requisicoes->id_requisicao.'\\',\\''.$requisicoes->id_projeto.'\\');\" title=\"'.$requisicoes->titulo.'\">'.$requisicoes->titulo.'</a>';\n\t\t\t\t$result .= '</div>';\n\t\t\t\t\n\t\t\t\t$result .= '<div class=\"tarefas\">Chave de Identificação: <b>'.$requisicoes->chave.'</b></div><br>';\n\t\t\t\t$result .= '<div class=\"tarefas\">Situação: <b>'.$requisicoes->situacao.'</b></div><br>';\n\t\t\t\t$result .= '<div class=\"tarefas\">Solicitado por: <b>'.$requisicoes->nome.'</b></div>';\n\t\t\t\t\n\t\t\t\t$result .= '</div>';\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t$result .= '<input type=\"hidden\" name=\"upd_requisicao\" value=\"\">';\n\t\t\t$result .= '<input type=\"hidden\" name=\"upd_projeto\" value=\"\">';\n\t\t\t$result .= '</form>';\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "28715d5279583fb1e468d4ccd6cd2812", "score": "0.54865444", "text": "function llenarMovimientoCalidad($referencias) {\n require_once 'movimientocalidad.class.php';\n $calidad = new MovimientoCalidad();\n\n $retorno = array();\n // contamos los registros del array de productos\n\n\n\n $totalreg = ((isset($referencias[0][\"idMovimiento\"]) and isset($referencias[0][\"Producto_idProducto\"])) ? count($referencias) : 0);\n for ($i = 0; $i < $totalreg; $i++) {\n\n $nuevoserrores = $this->validarMovimientoCalidad($i, $referencias);\n //print_r($nuevoserrores);\n $totalerr = count($nuevoserrores);\n\n if (!isset($nuevoserrores[0][\"error\"])) {\n\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $calidad->MovimientoCalidad();\n\n $calidad->idMovimientoCalidad = (isset($referencias[$i]['idMovimientoCalidad']) ? $referencias[$i]['idMovimientoCalidad'] : 0);\n $calidad->Movimiento_idMovimiento = (isset($referencias[$i]['idMovimiento']) ? $referencias[$i]['idMovimiento'] : 0);\n $calidad->Producto_idProducto = (isset($referencias[$i]['Producto_idProducto']) ? $referencias[$i]['Producto_idProducto'] : 0);\n $calidad->fechaMaximaInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaMaximaInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaMaximaInspeccionMovimientoCalidad'] : '');\n\n $calidad->tieneCitaInspeccionMovimientoCalidad = ($referencias[$i]['fechaCitaInspeccionMovimientoCalidad'] == '' ? 'NO' : 'SI');\n\n\n $calidad->fechaCitaInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaCitaInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaCitaInspeccionMovimientoCalidad'] : '');\n $calidad->fechaRealInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaRealInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaRealInspeccionMovimientoCalidad'] : '');\n $calidad->fechaReporteInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaReporteInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaReporteInspeccionMovimientoCalidad'] : '');\n $calidad->resultadoInspeccionMovimientoCalidad = (isset($referencias[$i]['resultadoInspeccionMovimientoCalidad']) ? $referencias[$i]['resultadoInspeccionMovimientoCalidad'] : '');\n\n switch (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad'])) {\n case 'aprobada':\n $calidad->tieneInspeccionMovimientoCalidad = 'SI';\n break;\n case 'rechazada':\n $calidad->tieneInspeccionMovimientoCalidad = 'SI';\n break;\n case 'embarcada sin inspección';\n $calidad->tieneInspeccionMovimientoCalidad = 'SI';\n break;\n case 'sin inspección':\n $calidad->tieneInspeccionMovimientoCalidad = 'NO';\n break;\n case 'programada':\n $calidad->tieneInspeccionMovimientoCalidad = 'NO';\n break;\n default :\n $calidad->tieneInspeccionMovimientoCalidad = 'VALIDAR DATOS';\n break;\n }\n\n\n\n $calidad->fechaAprobacionInspeccionMovimientoCalidad = (isset($referencias[$i]['fechaAprobacionInspeccionMovimientoCalidad']) ? $referencias[$i]['fechaAprobacionInspeccionMovimientoCalidad'] : '');\n\n\n $calidad->observacionInspeccionMovimientoCalidad = (isset($referencias[$i]['observacionInspeccionMovimientoCalidad']) ? $referencias[$i]['observacionInspeccionMovimientoCalidad'] : '');\n $calidad->observacionDetalleInspeccionMovimientoCalidad = (isset($referencias[$i]['observacionDetalleInspeccionMovimientoCalidad']) ? $referencias[$i]['observacionDetalleInspeccionMovimientoCalidad'] : '');\n\n $calidad->requiereReinspeccionMovimientoCalidad = (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad']) == 'rechazada' ? 'SI' : 'NO');\n\n $calidad->fechaMaximaReinspeccionMovimientoCalidad = (isset($referencias[$i]['fechaMaximaReinspeccionMovimientoCalidad']) ? $referencias[$i]['fechaMaximaReinspeccionMovimientoCalidad'] : '');\n $calidad->fechaReinspeccionMovimientoCalidad = (isset($referencias[$i]['fechaReinspeccionMovimientoCalidad']) ? $referencias[$i]['fechaReinspeccionMovimientoCalidad'] : '');\n $calidad->resultadoReinspeccionMovimientoCalidad = (isset($referencias[$i]['resultadoReinspeccionMovimientoCalidad']) ? $referencias[$i]['resultadoReinspeccionMovimientoCalidad'] : '');\n\n $calidad->observacionReinspeccionMovimientoCalidad = (isset($referencias[$i]['observacionReinspeccionMovimientoCalidad']) ? $referencias[$i]['observacionReinspeccionMovimientoCalidad'] : '');\n\n\n\n $calidad->resultadoDefinitivoMovimientoCalidad = (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad']) == 'aprobada' ? 'aprobada' :\n (strtolower($referencias[$i]['resultadoReinspeccionMovimientoCalidad']) == 'aprobada' ? 'aprobada' :\n (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad']) == 'cancelada' ? 'cancelada' :\n (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad']) == 'programada' ? 'pendiente' :\n (strtolower($referencias[$i]['resultadoInspeccionMovimientoCalidad']) == 'stock excento' ? 'stock excento' : 'rechazada')))));\n\n\n // cada que llenamos un producto, lo cargamos a la base de datos\n // si el id esta lleno, lo actualizamos, si esta vacio lo insertamos\n if ($referencias[$i]['idMovimientoCalidad'] == 0) {\n $calidad->AdicionarMovimientoCalidad();\n } else {\n $calidad->ModificarMovimientoCalidad();\n }\n } else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n }\n\n return $retorno;\n }", "title": "" }, { "docid": "65649dcf69f20552e9c8d2319a52ffab", "score": "0.54845154", "text": "function modificarRelPre(){\n\t\t$this->procedimiento='pre.ft_rel_pre_ime';\n\t\t$this->transaccion='PRE_RELP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_rel_pre','id_rel_pre','int4');\n\t\t$this->setParametro('id_presupuesto_hijo','id_presupuesto_hijo','int4');\n\t\t$this->setParametro('id_presupuesto_padre','id_presupuesto_padre','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "e02a5600049242a38d5f8975c41a5c6f", "score": "0.5478466", "text": "function listarResumenVentasCounter(){\n $this->procedimiento='obingresos.ft_boleto_sel';\n $this->transaccion='OBING_RESUVEN_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n $this->setParametro('fecha_ini', 'fecha_ini', 'varchar');\n $this->setParametro('fecha_fin','fecha_fin','varchar');\n $this->setParametro('punto_venta','punto_venta','varchar');\n //captura parametros adicionales para el count\n $this->capturaCount('monto_total_ml','numeric');\n $this->capturaCount('monto_total_me','numeric');\n $this->capturaCount('neto_total_ml','numeric');\n $this->capturaCount('neto_total_me','numeric');\n\n\n $this->captura('agente_venta','varchar');\n $this->captura('counter','varchar');\n $this->captura('monto_ml','numeric');\n $this->captura('monto_me','numeric');\n $this->captura('neto_ml','numeric');\n $this->captura('neto_me','numeric');\n\n //Ejecuta la instruccion\n $this->armarConsulta();//echo $this->consulta;exit;\n $this->ejecutarConsulta();\n //var_dump(\"llega aqui el dato\",$this->respuesta);\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b4342664ba09f2f1d8af709d757979dd", "score": "0.5474082", "text": "function Buscar_Libros_Avanzado($Patron_Nombre_Ingresado, $Patron_Genero_Ingresado) {\n $Listado = array();\n \n \n $MiConexion = ConexionBD();\n \n if ($MiConexion != false) {\n //armo la consulta basica\n $SQL = \"SELECT L.id as IdLibro, L.nombre as NombreLibro, G.nombre AS NombreGenero, \n A.nombre AS NombreAutor, A.apellido AS ApellidoAutor, \n L.fecha_carga AS FechaRegistro , L.imagen as Imagen, L.disponible as Activo\n FROM libros L, generos G, autores A\n WHERE L.id_genero=G.id AND L.id_autor=A.id \";\n \n //y segun el filtro que llegue, le voy concatenando los filtros\n //si llega el filtro del Nombre del ibro:\n if (!empty($Patron_Nombre_Ingresado)) {\n $SQL.=\" AND L.nombre like '%$Patron_Nombre_Ingresado%' \";\n }\n \n //si llega el filtro del Genero del ibro:\n if (!empty($Patron_Genero_Ingresado)) {\n $SQL.=\" AND G.id = $Patron_Genero_Ingresado \";\n }\n //finamente concateno el Order By\n $SQL.=\" ORDER BY L.fecha_carga \";\n\n \n \n $rs = mysqli_query($MiConexion, $SQL);\n $i = 0;\n while ($data = mysqli_fetch_array($rs)) {\n $Listado[$i]['ID_LIBRO'] = $data['IdLibro'];\n $Listado[$i]['NOMBRE_LIBRO'] = utf8_encode($data['NombreLibro']);\n $Listado[$i]['NOMBRE_GENERO'] = utf8_encode($data['NombreGenero']);\n $Listado[$i]['AUTOR'] = utf8_encode($data['ApellidoAutor']) . ', ' . utf8_encode($data['NombreAutor']);\n $Listado[$i]['FECHA_REGISTRO'] = $data['FechaRegistro'];\n $Listado[$i]['IMAGEN_LIBRO'] = $data['Imagen'];\n $Listado[$i]['ACTIVO'] = $data['Activo'];\n $i++;\n }\n }\n\n return $Listado;\n}", "title": "" }, { "docid": "1a0660758508bb1f42b3f02bf1679175", "score": "0.54697406", "text": "function llenarPropiedadesMovimientoAdministrativo($encabezado, $detalle, $mediopago) {\n require_once 'movimientoadministrativo.class.php';\n $movimiento = new MovimientoAdministrativo();\n //\n require_once 'periodo.class.php';\n $periodo = new Periodo();\n //print_r($detalle);\n $retorno = array();\n // contamos los registros del encabezado\n $totalreg = (isset($encabezado[0][\"numeroMovimientoAdministrativo\"]) ? count($encabezado) : 0);\n\n // echo '<pre>';\n // echo '<pre>'.var_dump($encabezado).'</pre>';\n // echo '</pre>';\n // var_dump($detalle);\n\n for ($i = 0; $i < $totalreg; $i++) {\n // echo 'ENTRA FOR ENCABEZADO';\n\n $nuevoserrores = $this->validarMovimientoAdministrativo($encabezado[$i][\"numeroMovimientoAdministrativo\"], $encabezado, $detalle, $mediopago);\n\n if (!isset($nuevoserrores[0][\"error\"])) {\n\n // echo 'ENTRA SIN ERRORES';\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $movimiento->MovimientoAdministrativo();\n // $movimiento->idMovimientoAdministrativo = 0;\n $movimiento->Documento_idDocumento = (isset($encabezado[$i][\"Documento_idDocumento\"]) ? $encabezado[$i][\"Documento_idDocumento\"] : 0);\n\n $movimiento->fechaElaboracionMovimientoAdministrativo = (isset($encabezado[$i][\"fechaElaboracionMovimientoAdministrativo\"]) ? $encabezado[$i][\"fechaElaboracionMovimientoAdministrativo\"] : date(\"Y-m-d\"));\n\n // obtenemos el período contable segun la fecha de elaboracion del documento\n $datoper = $periodo->ConsultarVistaPeriodo(\"fechaInicialPeriodo <= '\" . $movimiento->fechaElaboracionMovimientoAdministrativo .\n \"' and fechaFinalPeriodo >= '\" . $movimiento->fechaElaboracionMovimientoAdministrativo . \"'\");\n $movimiento->Periodo_idPeriodo = (isset($datoper[0][\"idPeriodo\"]) ? $datoper[0][\"idPeriodo\"] : 0);\n\n $movimiento->prefijoMovimientoAdministrativo = (isset($encabezado[$i][\"prefijoMovimientoAdministrativo\"]) ? $encabezado[$i][\"prefijoMovimientoAdministrativo\"] : '');\n $movimiento->numeroMovimientoAdministrativo = (isset($encabezado[$i][\"numeroMovimientoAdministrativo\"]) ? $encabezado[$i][\"numeroMovimientoAdministrativo\"] : '');\n $movimiento->sufijoMovimientoAdministrativo = (isset($encabezado[$i][\"sufijoMovimientoAdministrativo\"]) ? $encabezado[$i][\"sufijoMovimientoAdministrativo\"] : '');\n $movimiento->Tercero_idTercero = (isset($encabezado[$i][\"Tercero_idTercero\"]) ? $encabezado[$i][\"Tercero_idTercero\"] : '');\n $movimiento->observacionMovimientoAdministrativo = (isset($encabezado[$i][\"observacionMovimientoAdministrativo\"]) ? $encabezado[$i][\"observacionMovimientoAdministrativo\"] : '');\n\n $movimiento->totalDebitosMovimientoAdministrativo = 0;\n $movimiento->totalCreditosMovimientoAdministrativo = 0;\n\n $movimiento->subtotalMovimientoAdministrativo = 0;\n $movimiento->valorDescuentoMovimientoAdministrativo = 0;\n $movimiento->valorRetencionMovimientoAdministrativo = 0;\n $movimiento->valorReteIvaMovimientoAdministrativo = 0;\n $movimiento->valorReteOtrosMovimientoAdministrativo = 0;\n $movimiento->valorTotalMovimientoAdministrativo = 0;\n\n $movimiento->estadoMovimientoAdministrativo = 'ACTIVO';\n\n\n // por cada registro del encabezado, recorremos el detalle para obtener solo los datos del mismo numero de movimiento del encabezado, con estos\n // llenamos arrays por cada campo\n $totaldet = (isset($detalle[0][\"numeroMovimientoAdministrativo\"]) ? count($detalle) : 0);\n\n // echo 'DETALLE EXCEL '.$totaldet;\n // llevamos un contador de registros por cada producto del detalle\n $registroact = 0;\n for ($j = 0; $j < $totaldet; $j++) {\n\n // echo 'ENTRA DETALLE';\n\n if (isset($encabezado[$i][\"numeroMovimientoAdministrativo\"]) and isset($detalle[$j][\"numeroMovimientoAdministrativo\"]) and $encabezado[$i][\"numeroMovimientoAdministrativo\"] == $detalle[$j][\"numeroMovimientoAdministrativo\"]) {\n\n // echo 'ENTRA CONDICION';\n\n\n $movimiento->idMovimientoAdministrativoDetalle[$registroact] = 0;\n $movimiento->Movimiento_idMovimiento[$registroact] = (isset($detalle[$j][\"Movimiento_idMovimiento\"]) ? $detalle[$j][\"Movimiento_idMovimiento\"] : 0);\n $movimiento->Producto_idProducto[$registroact] = (isset($detalle[$j][\"Producto_idProducto\"]) ? $detalle[$j][\"Producto_idProducto\"] : 0);\n $movimiento->Tercero_idBanco[$registroact] = (isset($detalle[$j][\"Tercero_idBanco\"]) ? $detalle[$j][\"Tercero_idBanco\"] : 0);\n $movimiento->TerceroBanco_idTerceroBanco[$registroact] = (isset($detalle[$j][\"TerceroBanco_idTerceroBanco\"]) ? $detalle[$j][\"TerceroBanco_idTerceroBanco\"] : 0);\n $movimiento->tasaCambioOrigenMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"tasaCambioOrigenMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"tasaCambioOrigenMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorDocumentoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorDocumentoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorDocumentoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorSaldoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorSaldoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorSaldoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorAplicadoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorAplicadoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorAplicadoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeDescuentoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeDescuentoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeDescuentoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorDescuentoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorDescuentoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorDescuentoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorDescuentoLey33MovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorDescuentoLey33MovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorDescuentoLey33MovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorBaseMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorBaseMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorBaseMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorReteFuenteMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorReteFuenteMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorReteFuenteMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorReteIvaMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorReteIvaMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorReteIvaMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorReteIcaMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorReteIcaMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorReteIcaMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorReteOtrosMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorReteOtrosMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorReteOtrosMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorTotalMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorTotalMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorTotalMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->observacionMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"observacionMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"observacionMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->tasaCambioPagoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"tasaCambioPagoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"tasaCambioPagoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorAjusteMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorAjusteMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorAjusteMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->Producto_idConceptoAjuste[$registroact] = (isset($detalle[$j][\"Producto_idConceptoAjuste\"]) ? $detalle[$j][\"Producto_idConceptoAjuste\"] : 0);\n $movimiento->CentroCosto_idCentroCostoDetalle[$registroact] = 0;\n //Campos faltantes\n $movimiento->valorReteCreeMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorReteCreeMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorReteCreeMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->diferenciaReteCreeMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"diferenciaReteCreeMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"diferenciaReteCreeMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeReteCreeMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeReteCreeMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeReteCreeMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeReteIcaMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeReteIcaMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeReteIcaMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeReteIvaMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeReteIvaMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeReteIvaMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeReteFuenteMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeReteFuenteMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeReteFuenteMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->porcentajeDescuentoLey33MovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"porcentajeDescuentoLey33MovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"porcentajeDescuentoLey33MovimientoAdministrativoDetalle\"] : 0);\n $movimiento->valorDescuentoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"valorDescuentoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"valorDescuentoMovimientoAdministrativoDetalle\"] : 0);\n $movimiento->diferenciaDescuentoMovimientoAdministrativoDetalle[$registroact] = (isset($detalle[$j][\"diferenciaDescuentoMovimientoAdministrativoDetalle\"]) ? $detalle[$j][\"diferenciaDescuentoMovimientoAdministrativoDetalle\"] : 0);\n\n\n // calculamos las diferencias entre las retenciones causadas en la factura y las pagadas en la cartera\n $movimiento->diferenciaReteFuenteMovimientoAdministrativoDetalle[$registroact] = $movimiento->valorReteFuenteMovimientoAdministrativoDetalle[$registroact] - $detalle[$j][\"valorRetencionMovimiento\"];\n $movimiento->diferenciaReteIvaMovimientoAdministrativoDetalle[$registroact] = $movimiento->valorReteIvaMovimientoAdministrativoDetalle[$registroact] - $detalle[$j][\"valorReteIvaMovimiento\"];\n $movimiento->diferenciaReteIcaMovimientoAdministrativoDetalle[$registroact] = $movimiento->valorReteIcaMovimientoAdministrativoDetalle[$registroact] - $detalle[$j][\"valorReteIcaMovimiento\"];\n\n // luego de calcular las diferencias, calculamos el descuento, solo si el % es mayor a cero para respetar cuando se ponga descuento en valor\n if ($movimiento->porcentajeDescuentoMovimientoAdministrativoDetalle[$registroact] > 0) {\n $movimiento->valorDescuentoMovimientoAdministrativoDetalle[$registroact] = $movimiento->valorSaldoMovimientoAdministrativoDetalle[$registroact] *\n ($movimiento->porcentajeDescuentoMovimientoAdministrativoDetalle[$registroact] / 100);\n }\n\n // con las retenciones y el descuento calculamos los totales del pago\n $movimiento->valorTotalMovimientoAdministrativoDetalle[$registroact] = $movimiento->valorAplicadoMovimientoAdministrativoDetalle[$registroact] -\n $movimiento->valorDescuentoMovimientoAdministrativoDetalle[$registroact] -\n $movimiento->valorDescuentoLey33MovimientoAdministrativoDetalle[$registroact] -\n abs($movimiento->diferenciaReteFuenteMovimientoAdministrativoDetalle[$registroact]) -\n abs($movimiento->diferenciaReteIvaMovimientoAdministrativoDetalle[$registroact]) -\n abs($movimiento->diferenciaReteIcaMovimientoAdministrativoDetalle[$registroact]) -\n $movimiento->valorReteOtrosMovimientoAdministrativoDetalle[$registroact] +\n $movimiento->valorAjusteMovimientoAdministrativoDetalle[$registroact];\n\n // calculamos la diferencia en cambio cuando se paga en otra moneda\n $movimiento->diferenciaCambioMovimientoAdministrativoDetalle[$registroact] = $movimiento->tasaCambioOrigenMovimientoAdministrativoDetalle[$registroact] -\n $movimiento->tasaCambioPagoMovimientoAdministrativoDetalle[$registroact];\n\n\n // totalizamos los campos del detalle\n $movimiento->subtotalMovimientoAdministrativo += $movimiento->valorAplicadoMovimientoAdministrativoDetalle[$registroact];\n $movimiento->valorDescuentoMovimientoAdministrativo += $movimiento->valorDescuentoMovimientoAdministrativoDetalle[$registroact];\n $movimiento->valorRetencionMovimientoAdministrativo += $movimiento->valorReteFuenteMovimientoAdministrativoDetalle[$registroact];\n $movimiento->valorReteIvaMovimientoAdministrativo += $movimiento->valorReteIvaMovimientoAdministrativoDetalle[$registroact];\n $movimiento->valorReteOtrosMovimientoAdministrativo += $movimiento->valorReteOtrosMovimientoAdministrativoDetalle[$registroact];\n $movimiento->valorTotalMovimientoAdministrativo += $movimiento->valorTotalMovimientoAdministrativoDetalle[$registroact];\n\n $registroact++;\n }\n\n\n\n // echo 'REGISTRO '.$registroact;\n // print_r($detalle);\n\n $totalmed = (isset($mediopago[0][\"numeroMovimientoAdministrativo\"]) ? count($mediopago) : 0);\n $regmediopago = 0;\n $valorRecibido = 0;\n\n // var_dump($mediopago);\n\n for ($m = 0; $m < $totalmed; $m++) {\n // echo \"<br> entra for Mediopago <br>\";\n if (isset($encabezado[$j][\"numeroMovimientoAdministrativo\"]) and\n isset($mediopago[$m][\"numeroMovimientoAdministrativo\"]) and\n $encabezado[$j][\"numeroMovimientoAdministrativo\"] == $mediopago[$m][\"numeroMovimientoAdministrativo\"]) {\n\n $movimiento->idMovimientoAdministrativoMedioPago[$regmediopago] = 0;\n $movimiento->MedioPago_idMedioPago[$regmediopago] = (isset($mediopago[$m][\"MedioPago_idMedioPago\"]) ? $mediopago[$m][\"MedioPago_idMedioPago\"] : 0);\n $movimiento->valorMovimientoAdministrativoMedioPago[$regmediopago] = (isset($mediopago[$m][\"valorMovimientoAdministrativoMedioPago\"]) ? $mediopago[$m][\"valorMovimientoAdministrativoMedioPago\"] : 0);\n $movimiento->MovimientoAdministrativo_idMovimientoAdministrativo[$regmediopago] = (isset($mediopago[$m][\"MovimientoAdministrativo_idMovimientoAdministrativo\"]) ? $mediopago[$m][\"MovimientoAdministrativo_idMovimientoAdministrativo\"] : 0);\n $movimiento->Tercero_idBancoMedioPago[$regmediopago] = (isset($mediopago[$m][\"Tercero_idBanco\"]) ? $mediopago[$m][\"Tercero_idBanco\"] : 0);\n $movimiento->numeroComprobanteMovimientoAdministrativoMedioPago[$regmediopago] = (isset($mediopago[$m][\"numeroComprobanteMovimientoMedioPago\"]) ? $mediopago[$m][\"numeroComprobanteMovimientoMedioPago\"] : 0);\n $valorRecibido += $movimiento->valorMovimientoAdministrativoMedioPago[$regmediopago];\n $regmediopago++;\n }\n }\n\n $movimiento->valorRecibidoMovimientoAdministrativo = $valorRecibido;\n }\n //cada que llenamos un documento, lo cargamos a la base de datos\n $movimiento->AdicionarMovimientoAdministrativo();\n } else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n }\n\n\n //print_r($retorno);\n return $retorno;\n }", "title": "" }, { "docid": "865530f1cdcf2957e5b4bebdcfb4acb3", "score": "0.54679215", "text": "function listarRelPre(){\n\t\t$this->procedimiento='pre.ft_rel_pre_sel';\n\t\t$this->transaccion='PRE_RELP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_rel_pre','int4');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('id_presupuesto_hijo','int4');\n\t\t$this->captura('fecha_union','date');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_presupuesto_padre','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_presupuesto_hijo','varchar');\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "fc0b70a1ed6d63a0fa45e738055d21f6", "score": "0.5463368", "text": "function llenarPropiedadesInventarioProductoProceso($encabezadoOP, $detalleOP, $centroproduccionOP, $encabezadoRem, $detalleRem, $encabezadoRec, $detalleRec) {\n require_once 'ordenproduccion.class.php';\n $ordenproduccion = new OrdenProduccion();\n\n require_once 'remisionproduccion.class.php';\n $produccionentrega = new ProduccionEntrega();\n\n require_once 'producto.class.php';\n $producto = new Producto();\n\n require_once 'periodo.class.php';\n $periodo = new Periodo();\n\n require_once 'reciboproduccion.class.php';\n $recibo = new ProduccionRecibo();\n\n $retorno = array();\n // contamos los registros del encabezado\n $totalreg = (isset($encabezadoOP[0][\"numeroOrdenProduccion\"]) ? count($encabezadoOP) : 0);\n\n // print_r($encabezadoOP);\n //echo '<br>';\n // print_r($encabezadoOP);\n //print_r($detalleOP);\n // exit();\n //echo '<br>';\n // $nuevoserrores = $this->validarInventarioProductoProceso($encabezadoOP, $detalleOP);\n // print_r($nuevoserrores);\n // exit();\n ////\n if (!isset($nuevoserrores[0][\"error\"]) or $nuevoserrores[0][\"error\"] == '') {\n // echo \"<br>entra1<br>\";\n // return;\n for ($i = 0; $i < $totalreg; $i++) {\n // echo \"<br> entra for encabezado<br>\";\n //echo \" entra if isset \";\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $ordenproduccion->OrdenProduccion();\n //echo 'registros de detalle '.count($ordenproduccion->idMovimientoDetalle).\"<br><br>\";\n $ordenproduccion->idOrdenProduccion = (isset($encabezadoOP[$i][\"idOrdenProduccion\"]) ? $encabezadoOP[$i][\"idOrdenProduccion\"] : 0);\n\n // echo $encabezadoOP[$i][\"numeroOrdenProduccion\"];\n\n $ordenproduccion->conceptoOrdenProduccion = (isset($encabezadoOP[$i][\"conceptoOrdenProduccion\"]) ? $encabezadoOP[$i][\"conceptoOrdenProduccion\"] : 'OP');\n $ordenproduccion->prefijoOrdenProduccion = (isset($encabezadoOP[$i][\"prefijoOrdenProduccion\"]) ? $encabezadoOP[$i][\"prefijoOrdenProduccion\"] : '');\n $ordenproduccion->numeroOrdenProduccion = (isset($encabezadoOP[$i][\"numeroOrdenProduccion\"]) ? $encabezadoOP[$i][\"numeroOrdenProduccion\"] : '');\n $ordenproduccion->sufijoOrdenProduccion = (isset($encabezadoOP[$i][\"sufijoOrdenProduccion\"]) ? $encabezadoOP[$i][\"sufijoOrdenProduccion\"] : '');\n $ordenproduccion->fechaElaboracionOrdenProduccion = (isset($encabezadoOP[$i][\"fechaElaboracionOrdenProduccion\"]) ? date(\"Y-m-d\", strtotime($encabezadoOP[$i][\"fechaElaboracionOrdenProduccion\"])) : date(\"Y-m-d\"));\n\n // $ordenproduccion->Periodo_idPeriodo = (isset($encabezadoOP[$i][\"fechaElaboracionOrdenProduccion\"]) ? date(\"Y-m-d\",strtotime($encabezadoOP[$i][\"fechaElaboracionOrdenProduccion\"])) : date(\"Y-m-d\"));\n\n $ordenproduccion->nombreOrdenProduccion = (isset($encabezadoOP[$i][\"nombreOrdenProduccion\"]) ? $encabezadoOP[$i][\"nombreOrdenProduccion\"] : '');\n $ordenproduccion->fechaEstimadaEntregaOrdenProduccion = (isset($encabezadoOP[$i][\"fechaEstimadaEntregaOrdenProduccion\"]) ? $encabezadoOP[$i][\"fechaEstimadaEntregaOrdenProduccion\"] : $ordenproduccion->fechaElaboracionOrdenProduccion);\n $ordenproduccion->fechaRealEntregaOrdenProduccion = (isset($encabezadoOP[$i][\"fechaRealEntregaOrdenProduccion\"]) ? $encabezadoOP[$i][\"fechaRealEntregaOrdenProduccion\"] : $ordenproduccion->fechaElaboracionOrdenProduccion);\n $ordenproduccion->Tercero_idTercero = (isset($encabezadoOP[$i][\"Tercero_idTercero\"]) ? $encabezadoOP[$i][\"Tercero_idTercero\"] : 0);\n $ordenproduccion->tipoOrdenProduccion = (isset($encabezadoOP[$i][\"tipoOrdenProduccion\"]) ? $encabezadoOP[$i][\"tipoOrdenProduccion\"] : 'STOCK');\n $ordenproduccion->documentoReferenciaOrdenProduccion = (isset($encabezadoOP[$i][\"documentoReferenciaOrdenProduccion\"]) ? $encabezadoOP[$i][\"documentoReferenciaOrdenProduccion\"] : '');\n $ordenproduccion->responsableOrdenProduccion = (isset($encabezadoOP[$i][\"responsableOrdenProduccion\"]) ? $encabezadoOP[$i][\"responsableOrdenProduccion\"] : '');\n $ordenproduccion->prioridadOrdenProduccion = (isset($encabezadoOP[$i][\"prioridadOrdenProduccion\"]) ? $encabezadoOP[$i][\"prioridadOrdenProduccion\"] : 'ALTA');\n $ordenproduccion->metodoProgramacionOrdenProduccion = (isset($encabezadoOP[$i][\"metodoProgramacionOrdenProduccion\"]) ? $encabezadoOP[$i][\"metodoProgramacionOrdenProduccion\"] : 'MANUAL');\n $ordenproduccion->observacionOrdenProduccion = (isset($encabezadoOP[$i][\"observacionOrdenProduccion\"]) ? $encabezadoOP[$i][\"observacionOrdenProduccion\"] : '');\n $ordenproduccion->totalUnidadesOrdenProduccion = 0;\n $ordenproduccion->estadoOrdenProduccion = (isset($encabezadoOP[$i][\"estadoOrdenProduccion\"]) ? $encabezadoOP[$i][\"estadoOrdenProduccion\"] : 'PROGRAMADA');\n $ordenproduccion->numeroLiquidacionCorteOrdenProduccion = (isset($encabezadoOP[$i][\"numeroLiquidacionCorteOrdenProduccion\"]) ? $encabezadoOP[$i][\"numeroLiquidacionCorteOrdenProduccion\"] : '');\n\n\n // por cada registro del encabezado, recorremos el detalle para obtener solo los datos del mismo numero de orden de produccion del encabezado, con estos\n // llenamos arrays por cada campo\n $totaldet = (isset($detalleOP[0][\"numeroOrdenProduccion\"]) ? count($detalleOP) : 0);\n\n // llevamos un contador de registros por cada producto del detalle\n $registroact = 0;\n\n //var_dump($detalleOP);\n\n for ($j = 0; $j < $totaldet; $j++) {\n // echo \"<br> entra for detalle <br>\";\n if (isset($encabezadoOP[$i][\"numeroOrdenProduccion\"]) and\n isset($detalleOP[$j][\"numeroOrdenProduccion\"]) and\n $encabezadoOP[$i][\"numeroOrdenProduccion\"] == $detalleOP[$j][\"numeroOrdenProduccion\"]) {\n\n // echo '<br>'.'ENTRA DETALLE'.'<br>';\n // echo '<br>'.$detalleOP[$j][\"Producto_idProducto\"].'<br>';\n //echo \"id lista: \".$nuevoserrores[$j][\"ListaPrecio_idListaPrecioDetalle\"].\" precio de lista: \".$nuevoserrores[$j][\"precioListaMovimientoDetalle\"].\" valor bruto: \".$nuevoserrores[$j][\"valorBrutoMovimientoDetalle\"].\"<br>\";\n\n $ordenproduccion->idOrdenProduccionProducto[$registroact] = 0;\n $ordenproduccion->Producto_idProducto[$registroact] = (isset($detalleOP[$j][\"Producto_idProducto\"]) ? $detalleOP[$j][\"Producto_idProducto\"] : 0);\n $ordenproduccion->cantidadOrdenProduccionProducto[$registroact] = (isset($detalleOP[$j][\"cantidadOrdenProduccionDetalle\"]) ? $detalleOP[$j][\"cantidadOrdenProduccionDetalle\"] : 0);\n $ordenproduccion->Movimiento_idDocumentoRefProd[$registroact] = (isset($detalleOP[$j][\"Movimiento_idDocumentoRefProd\"]) ? $detalleOP[$j][\"Movimiento_idDocumentoRefProd\"] : 0);\n $ordenproduccion->totalUnidadesOrdenProduccion += $ordenproduccion->cantidadOrdenProduccionProducto[$registroact];\n\n $registroact++;\n }\n }\n\n // echo 'total orden'.$ordenproduccion->totalUnidadesOrdenProduccion.'<br>';\n // var_dump($ordenproduccion->Producto_idProducto);\n // por cada registro del encabezado, recorremos el detalle de ruta de procesos para obtener solo los datos del mismo numero de orden de produccion del encabezado, con estos\n // llenamos arrays por cada campo\n $totaldet = (isset($centroproduccionOP[0][\"numeroOrdenProduccion\"]) ? count($centroproduccionOP) : 0);\n\n // llevamos un contador de registros por cada producto del detalle\n $registroact = 0;\n\n\n // var_dump($centroproduccionOP);\n\n\n for ($j = 0; $j < $totaldet; $j++) {\n // echo \"<br> entra for detalle <br>\";\n if (isset($encabezadoOP[$i][\"numeroOrdenProduccion\"]) and\n isset($centroproduccionOP[$j][\"numeroOrdenProduccion\"]) and\n $encabezadoOP[$i][\"numeroOrdenProduccion\"] == $centroproduccionOP[$j][\"numeroOrdenProduccion\"]) {\n //echo \"id lista: \".$nuevoserrores[$j][\"ListaPrecio_idListaPrecioDetalle\"].\" precio de lista: \".$nuevoserrores[$j][\"precioListaMovimientoDetalle\"].\" valor bruto: \".$nuevoserrores[$j][\"valorBrutoMovimientoDetalle\"].\"<br>\";\n\n $ordenproduccion->idOrdenProduccionCentroProduccion[$registroact] = 0;\n $ordenproduccion->ordenOrdenProduccionCentroProduccion[$registroact] = (isset($centroproduccionOP[$j][\"ordenOrdenProduccionCentroProduccion\"]) ? $centroproduccionOP[$j][\"ordenOrdenProduccionCentroProduccion\"] : 0);\n $ordenproduccion->CentroProduccion_idCentroProduccion_2[$registroact] = (isset($centroproduccionOP[$j][\"CentroProduccion_idCentroProduccion\"]) ? $centroproduccionOP[$j][\"CentroProduccion_idCentroProduccion\"] : 0);\n $ordenproduccion->observacionOrdenProduccionCentroProduccion[$registroact] = (isset($centroproduccionOP[$j][\"observacionOrdenProduccionCentroProduccion\"]) ? $centroproduccionOP[$j][\"observacionOrdenProduccionCentroProduccion\"] : '');\n\n $registroact++;\n }\n }\n\n $ordenproduccion->ConsultarIdOrdenProduccion(\"numeroOrdenProduccion = '\" . $encabezadoOP[$i][\"numeroOrdenProduccion\"] . \"'\");\n\n // echo 'ENTRAAAAAAAAAAAAAAAAAAAAAAA hasta fin ';\n // print_r($encabezadoOP);\n // print_r($detalleOP);\n //\n\n if ($ordenproduccion->idOrdenProduccion == 0) {\n // echo 'entra1';\n $ordenproduccion->AdicionarOrdenProduccion('si');\n\n // echo '<br>'.$ordenproduccion->idOrdenProduccion.'<br>';\n } else {\n // echo 'entra2';\n $ordenproduccion->ModificarOrdenProduccion();\n }\n\n\n // **********************************\n // R E M I S I O N E S\n // **********************************\n\n $totalrem = (isset($encabezadoRem[0][\"numeroProduccionEntrega\"]) ? count($encabezadoRem) : 0);\n\n // llevamos un contador de registros por cada producto del detalle\n // var_dump($detalleOP);\n\n for ($r = 0; $r < $totalrem; $r++) {\n // echo \"<br> entra for detalle <br>\";\n if (isset($encabezadoRem[$r][\"numeroProduccionEntrega\"]) and\n $encabezadoOP[$i][\"numeroOrdenProduccion\"] == $encabezadoRem[$r][\"numeroOrdenProduccion\"]) {\n\n\n // Luego de insertar las ordenes de produccion, procedemos a insertar las remisiones y recibos que dependen de ella\n $produccionentrega->ProduccionEntrega();\n //echo 'registros de detalle '.count($ordenproduccion->idMovimientoDetalle).\"<br><br>\";\n $produccionentrega->idProduccionEntrega = (isset($encabezadoRem[$r][\"idProduccionEntrega\"]) ? $encabezadoRem[$r][\"idProduccionEntrega\"] : 0);\n\n $produccionentrega->prefijoProduccionEntrega = (isset($encabezadoRem[$r][\"prefijoProduccionEntrega\"]) ? $encabezadoRem[$r][\"prefijoProduccionEntrega\"] : '');\n $produccionentrega->numeroProduccionEntrega = (isset($encabezadoRem[$r][\"numeroProduccionEntrega\"]) ? $encabezadoRem[$r][\"numeroProduccionEntrega\"] : '');\n $produccionentrega->sufijoProduccionEntrega = (isset($encabezadoRem[$r][\"sufijoProduccionEntrega\"]) ? $encabezadoRem[$r][\"sufijoProduccionEntrega\"] : '');\n $produccionentrega->fechaElaboracionProduccionEntrega = (isset($encabezadoRem[$r][\"fechaElaboracionProduccionEntrega\"]) ? date(\"Y-m-d\", strtotime($encabezadoRem[$r][\"fechaElaboracionProduccionEntrega\"])) : date(\"Y-m-d\"));\n $produccionentrega->fechaEstimadaInicioProduccionEntrega = (isset($encabezadoRem[$r][\"fechaEstimadaInicioProduccionEntrega\"]) ? $encabezadoRem[$r][\"fechaEstimadaInicioProduccionEntrega\"] : $produccionentrega->fechaElaboracionProduccionEntrega);\n $produccionentrega->fechaEstimadaFinProduccionEntrega = (isset($encabezadoRem[$r][\"fechaEstimadaFinProduccionEntrega\"]) ? $encabezadoRem[$r][\"fechaEstimadaFinProduccionEntrega\"] : $produccionentrega->fechaElaboracionProduccionEntrega);\n $produccionentrega->fechaEstimadaReciboProduccionEntrega = (isset($encabezadoRem[$r][\"fechaEstimadaReciboProduccionEntrega\"]) ? $encabezadoRem[$r][\"fechaEstimadaReciboProduccionEntrega\"] : $produccionentrega->fechaElaboracionProduccionEntrega);\n $produccionentrega->Tercero_idTercero = (isset($encabezadoRem[$r][\"Tercero_idTercero\"]) ? $encabezadoRem[$r][\"Tercero_idTercero\"] : 0);\n $produccionentrega->CentroProduccion_idCentroProduccion = (isset($encabezadoRem[$r][\"CentroProduccion_idCentroProduccion\"]) ? $encabezadoRem[$r][\"CentroProduccion_idCentroProduccion\"] : 0);\n $produccionentrega->OrdenProduccion_idOrdenProduccion = $ordenproduccion->idOrdenProduccion;\n $produccionentrega->prioridadProduccionEntrega = (isset($encabezadoRem[$r][\"prioridadProduccionEntrega\"]) ? $encabezadoRem[$r][\"prioridadProduccionEntrega\"] : 'ALTA');\n $produccionentrega->totalUnidadesProduccionEntrega = (isset($encabezadoRem[$r][\"totalUnidadesProduccionEntrega\"]) ? $encabezadoRem[$r][\"totalUnidadesProduccionEntrega\"] : 0);\n $produccionentrega->observacionProduccionEntrega = (isset($encabezadoRem[$r][\"observacionProduccionEntrega\"]) ? $encabezadoRem[$r][\"observacionProduccionEntrega\"] : '');\n $produccionentrega->reprocesoProduccionEntrega = (isset($encabezadoRem[$r][\"reprocesoProduccionEntrega\"]) ? $encabezadoRem[$r][\"reprocesoProduccionEntrega\"] : 0);\n $produccionentrega->cobrarProduccionEntrega = (isset($encabezadoRem[$r][\"cobrarProduccionEntrega\"]) ? $encabezadoRem[$r][\"cobrarProduccionEntrega\"] : 0);\n $produccionentrega->estadoProduccionEntrega = (isset($encabezadoRem[$r][\"estadoProduccionEntrega\"]) ? $encabezadoRem[$r][\"estadoProduccionEntrega\"] : 'ACTIVO');\n $produccionentrega->Movimiento_idMovimientoMaterial = (isset($encabezadoRem[$r][\"Movimiento_idMovimientoMaterial\"]) ? $encabezadoRem[$r][\"Movimiento_idMovimientoMaterial\"] : 0);\n $produccionentrega->TipoReproceso_idTipoReproceso = (isset($encabezadoRem[$r][\"TipoReproceso_idTipoReproceso\"]) ? $encabezadoRem[$r][\"TipoReproceso_idTipoReproceso\"] : 0);\n\n // echo $encabezadoRem[$r][\"CentroProduccion_idCentroProduccion\"].'<br>';\n // return;\n $totaldet = (isset($detalleRem[0][\"numeroProduccionEntrega\"]) ? count($detalleRem) : 0);\n\n // echo '<pre>';\n // echo '<pre>'.print_r($detalleRem).'<pre>';\n // echo '</pre>';\n // llevamos un contador de registros por cada producto del detalle\n // var_dump($detalleOP);\n $registroact = 0;\n for ($j = 0; $j < $totaldet; $j++) {\n // echo \"<br> entra for detalle REMISION \".$encabezadoRem[$r][\"numeroProduccionEntrega\"].\" cantidad \".$detalleRem[$j][\"cantidadProduccionEntregaProducto\"].\" <br>\";\n if (isset($encabezadoRem[$r][\"numeroProduccionEntrega\"]) and\n isset($detalleRem[$j][\"numeroProduccionEntrega\"]) and\n $encabezadoRem[$r][\"numeroProduccionEntrega\"] == $detalleRem[$j][\"numeroProduccionEntrega\"]) {\n\n // echo '<br>'.$detalleRem[$j][\"cantidadProduccionEntregaProducto\"].'<br>';\n\n $produccionentrega->idProduccionEntregaProducto[$registroact] = 0;\n // $produccionentrega->ProduccionEntrega_idProduccionEntrega[$registroact] = (isset($detalleRem[$j][\"ordenOrdenProduccionCentroProduccion\"]) ? $detalleRem[$j][\"ordenOrdenProduccionCentroProduccion\"] : 0);\n $produccionentrega->Producto_idProducto[$registroact] = (isset($detalleRem[$j][\"Producto_idProducto\"]) ? $detalleRem[$j][\"Producto_idProducto\"] : 0);\n $produccionentrega->cantidadProduccionEntregaProducto[$registroact] = (isset($detalleRem[$j][\"cantidadProduccionEntregaProducto\"]) ? $detalleRem[$j][\"cantidadProduccionEntregaProducto\"] : 0);\n $produccionentrega->costoUnitarioProduccionEntregaProducto[$registroact] = (isset($detalleRem[$j][\"costoUnitarioProduccionEntregaProducto\"]) ? $detalleRem[$j][\"costoUnitarioProduccionEntregaProducto\"] : 0);\n $produccionentrega->costoTotalProduccionEntregaProducto[$registroact] = (isset($detalleRem[$j][\"costoTotalProduccionEntregaProducto\"]) ? $detalleRem[$j][\"costoTotalProduccionEntregaProducto\"] : 0);\n $produccionentrega->observacionProduccionEntregaProducto[$registroact] = (isset($detalleRem[$j][\"observacionProduccionEntregaProducto\"]) ? $detalleRem[$j][\"observacionProduccionEntregaProducto\"] : '');\n $produccionentrega->totalUnidadesProduccionEntrega += $produccionentrega->cantidadProduccionEntregaProducto[$registroact];\n $registroact++;\n }\n }\n\n // echo 'TOTASL REM'.$produccionentrega->totalUnidadesProduccionEntrega.'<br>';\n // echo '<pre>';\n // echo '<pre>'.print_r($detalleRem).'</pre>';\n // echo '</pre>';\n //\n //\n //\n // var_dump($produccionentrega->idProduccionEntregaProducto[$registroact]);\n //\n // return;\n\n $produccionentrega->ConsultarIdProduccionEntrega(\"numeroProduccionEntrega = '\" . $encabezadoRem[$r][\"numeroProduccionEntrega\"] . \"'\");\n\n\n if ($produccionentrega->idProduccionEntrega == 0) {\n // echo 'entra1';\n $produccionentrega->AdicionarProduccionEntrega();\n } else {\n // echo 'entra2';\n $produccionentrega->ModificarProduccionEntrega();\n }\n\n\n $produccionentrega->ConsultarIdProduccionEntrega(\"numeroProduccionEntrega = '\" . $encabezadoRem[$r][\"numeroProduccionEntrega\"] . \"'\");\n }\n }\n }\n }\n // echo \" entra else error \";\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n //print_r($retorno);\n return $retorno;\n }", "title": "" }, { "docid": "0630f58c0cf6fea2da28898786f81ce2", "score": "0.5462034", "text": "function do_add_correlativo_recibidos($tipo_documento, $fecha, $documento, $procedencia, $turnado, $asunto, $referencia, $expediente, $busca, $page, $orden, $lista) {\n\t\n\t\t\t$destino = addslashes($destino);\n\t\t\t$asunto = addslashes($asunto);\n\t\t\t$referencia = addslashes($referencia);\n\t\t\t$expediente = addslashes($expediente);\n\t\t\t$texto_sicar = addslashes($texto_sicar);\n\t\t\t$id_funcionario = get_cookie_id_user();\n\t\t\tif($fecha == \"\")\t$fecha = date('Y-m-d');\n $correlativo = dame_recibidos_siguiente();\n\t\t\t$id_representacion = get_cookie_representacion();\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\trun_non_query(\"INSERT INTO correlativo_recibidos VALUES (null, '$correlativo','$tipo_documento','$documento','$procedencia','$turnado','$asunto','$referencia','$fecha','$expediente', '$id_representacion')\");\n\t\t\n\t\t\t?>\n\t\t\t<p class='highlight'>\n\t\t\tComunicación recibida agregada </p>\n\t\t\t<?php\n\t\t\t\n\t\t\t$max_pg = run_select_query(\"SELECT COUNT(id) AS id FROM correlativo_recibidos\"); $max_pg = $max_pg[0]['id']; $max_pg /= 10;$max_pg = ceil($max_pg);\n\t\t\t\n\t\t\tlist_correlativo_recibidos($busca, $page, $orden, $lista);\n\t}", "title": "" }, { "docid": "5cdec8bb9907c8ddbf3932cbef2b3e6e", "score": "0.5461933", "text": "public function executeReconstruct(){\n //TODO reconstruir el árbol desde un árbol inicial y recargar el árbol en el template\n return $this->renderText(json_encode(\"Reconstruido\"));\n }", "title": "" }, { "docid": "3a40a4624bdb480bd87a3c4ccc067333", "score": "0.5461874", "text": "public function obtenerLosRegistrosDentroDeRequisitos($value){\n try{\n $query=\"select tbrequisitos_registros.id_registro,tbregistros.registro from requisitos_registros tbrequisitos_registros \n join registros tbregistros on tbregistros.ID_REGISTRO=tbrequisitos_registros.ID_REGISTRO\n where tbrequisitos_registros.ID_REQUISITO=\".$value[\"id_requisito\"];\n $db= AccesoDB::getInstancia();\n return $db->executeQuery($query);\n } catch (Exception $ex) {\n\n }\n }", "title": "" }, { "docid": "98fea63abca1f708d870c12cdc1c270a", "score": "0.5458489", "text": "static public function ctrCrearNotasRemision(){\n\n\t\tif (isset($_POST[\"nuevoIdNR\"])) {\n\n\t\t\tif( preg_match('/^[0-9 ]+$/', $_POST[\"nuevoNR\"]) &&\n\t\t\t\tpreg_match('/^[0-9 ]+$/', $_POST[\"nuevoDC\"]) &&\n\t\t\t\tpreg_match('/^[0-9 ]+$/', $_POST[\"nuevoSAP\"]) \n\t\t\t){ \t\n\t\t\t \n\t\t\t \t$tabla = \"notaremision\";\n\t\t\t\t$date = $_POST[\"nuevaFecha\"];\n\t\t\t\t$dateinput = explode('/', $date);\n\t\t\t\t$ukdate = $dateinput[2].'/'.$dateinput[1].'/'.$dateinput[0];\n\t\t\t\tvar_dump($ukdate);\n\t\t\t\t//$fecha = $date->format('Y/m/d');\n\t\t\t\t\n\t\t\t \t$datos = array(\t\"idNR\" => $_POST[\"nuevoIdNR\"],\n\t\t\t\t\t\t\t\t\"automatico\" => $_POST[\"nuevoCodigo\"],\n\t\t\t\t\t\t\t\t\"clasificador\" => $_POST[\"nuevaEmpresa\"],\n\t\t\t\t\t\t\t\t\"cotizacion\" => $_POST[\"nuevoTC\"],\n\t\t\t\t\t\t\t\t\"estado\" => \"D\",\n\t\t\t\t\t\t\t\t\"fecha\" => $ukdate,\n\t\t\t\t\t\t\t\t\"usuario\" => $_POST[\"nuevoUsuario\"],\n\t\t\t\t\t\t\t\t\"glosa1\" => $_POST[\"nuevaGlosa\"],\n\t\t\t\t\t\t\t\t\"tipo1\" => $_POST[\"nuevaFlete\"],\n\t\t\t\t\t\t\t\t\"login\" => $_POST[\"idUsuario\"],\n\t\t\t\t\t\t\t\t\"moneda\" => $_POST[\"nuevaMoneda\"],\n\t\t\t\t\t\t\t\t\"numero\" => $_POST[\"nuevoNumero\"],\n\t\t\t\t\t\t\t\t\"tipo2\" => $_POST[\"nuevoTipo\"],\n\t\t\t\t\t\t\t\t\"sistema\" => \"Registra\",\n\t\t\t\t\t\t\t\t\"numeroNR\" => $_POST[\"nuevoNR\"],\n\t\t\t\t\t\t\t\t\"numeroDC\" => $_POST[\"nuevoDC\"],\n\t\t\t\t\t\t\t\t\"numeroSAP\" => $_POST[\"nuevoSAP\"],\n\t\t\t\t\t\t\t\t\"origen\" => $_POST[\"nuevoOrigen\"],\n\t\t\t\t\t\t\t\t\"destino\" => $_POST[\"nuevoDestino\"],\n\t\t\t\t\t\t\t\t\"placa\" => $_POST[\"nuevaPlacaCamion\"],\n\t\t\t\t\t\t\t\t\"cod_Camion\" => $_POST[\"nuevoCodCamion\"],\n\t\t\t\t\t\t\t\t\"chofer\" => $_POST[\"nuevoChofer\"],\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\"detalle\" => $_POST[\"listaProductos\"]\n\n\t\t\t\t);\n\t\t\t \t//var_dump($datos[\"fecha\"]);\n\t\t\t\t$respuesta = ModeloNotaRemision::mdlIngresarNotaRemision($tabla, $datos);\n\t\t\t\t\n\t\t\t\tif ($respuesta == \"ok\") {\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"La Nota de Remision ha sido guardado correctamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location = \"notaremision\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t \n\t\t\t\t\t</script>';\n\t\t\t\t}else{\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\t\ttitle: \"La Nota de Remision no pudo ser guardada correctamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\t\twindow.location = \"crear-notaremision\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t \n\t\t\t\t\t</script>';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script>\n\t\t\t\t\tswal({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\ttitle: \"Ningun campo puede ir vacio o llevar caracteres especiales!\",\n\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t\twindow.location = \"crear-notaremision\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}); \n\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a21f906a313c2c7507ecc83013e2701f", "score": "0.5447976", "text": "function recetteAleatoire(){\n\t\n\t$tableUrl = array();\n\t\n\tfor($i = 10000; $i <= 11000; $i = $i + 100){\n\t\t\n\t\t$tableUrl[$i] = 'http://www.marmiton.org/recettes/recette_soupe-a-l-oignon_'.rand(1000, 20000).'.aspx';\n\t\t\n\t}\n\t\n\t$tableRecette = array();\n\t$tableInfoRecette = array();\n\t\n\tforeach($tableUrl as $k => $v){\n\t\t\n\t\t$tableRetour = recupeInfo($v);\n\t\t\n\t\t\tif($tableRetour != 0){\n\t\t\t\n\t\t\t\t//appel de la methode qui recupereLes information @params : url ou $v\n\t\t\t\t$tableInfoRecette[$k] = recupeInfo($v);\n\n\t\t\t}\n\t\t\n\t}\n\t\n\t$tableRecette[\"Recette\"] = $tableInfoRecette;\n\t\n\treturn $tableRecette;\n\t\n}", "title": "" }, { "docid": "73e3c895634b6ce4455a4fe8f5e36ae0", "score": "0.5445874", "text": "function getAtualizacoes() {\n\t\t\n\t\t\t$sql .= 'select resposta, titulo, id_requisicao, id_projeto, momento_cadastro, chave, nome, tipo, nomeresp from ((\n\t\t\t\t\t\tselect \\'\\' as resposta, r.titulo, r.id_requisicao, r.id_projeto, lr.momento_alteracao as momento_cadastro, lr.chave, u.nome, \\'log\\' as tipo, \\'\\' as nomeresp\n\t\t\t\t\t\t\tfrom logs_requisicoes lr\n\t\t\t\t\t\t\tjoin requisicoes r on (r.chave=lr.chave)\n\t\t\t\t\t\t\tjoin usuarios u on (r.id_usuario_solicitante=u.id_usuario)\n\t\t\t\t\t\t\twhere r.id_projeto='.$_SESSION['id_projeto_logado'].'';\n\t\t\t\n\t\t\tif ($_SESSION['tipo_usuario_logado'] == '3') \n\t\t\t\t$sql .= ' and r.id_cliente='.$_SESSION['id_cliente_logado'].'';\n\t\t\t//else \n\t\t\t\t//$sql .= 'u.id_empresa='.$_SESSION['id_empresa_logada'].'';\n\t\t\t\t\t\n\t\t\t$sql .= ' group by r.id_requisicao, r.titulo, r.id_projeto, lr.momento_alteracao, lr.chave, u.nome, lr.situacao_anterior, lr.situacao_atual\n\t\t\t\t\t\thaving lr.situacao_anterior!=lr.situacao_atual \n\t\t\t\t\t\torder by lr.momento_alteracao DESC) union (';\n\t\t\t\n\t\t\t$sql .= 'select i.resposta, r.titulo, r.id_requisicao, r.id_projeto, i.momento_resposta as momento_cadastro, r.chave, u.nome, \\'resposta\\' as tipo, uc.nome as nomeresp\n\t\t\t\t\t\tfrom iteracoes i\n\t\t\t\t\t\tjoin requisicoes r on (r.id_requisicao=i.id_requisicao)\n\t\t\t\t\t\tjoin usuarios u on (u.id_usuario=r.id_usuario_solicitante)\n\t\t\t\t\t\tjoin usuarios uc on (uc.id_usuario=i.id_usuario) where r.id_projeto='.$_SESSION['id_projeto_logado'].' and ';\n\t\t\t\t\t\t\n\t\t\tif ($_SESSION['tipo_usuario_logado'] == '3') \n\t\t\t\t$sql .= 'r.id_cliente='.$_SESSION['id_cliente_logado'].'';\n\t\t\telse \n\t\t\t\t$sql .= 'u.id_empresa='.$_SESSION['id_empresa_logada'].'';\n\t\t\t\t\n\t\t\t$sql .= ' order by i.momento_resposta DESC)) as atualizacoes order by momento_cadastro desc limit 10';\n\t\t\t\n\t\t\t$atualizacoes = pg_query($sql) or die ('erro');\t\n\t\t\t\t\n\t\t\treturn $atualizacoes;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fe82229becf7dcb81ab6809e4d31d435", "score": "0.54324925", "text": "function get_clases_by_id_run_alumno_and_rbd_establecimiento(){\n //print_r($_POST);\n $periodo = date(\"Y\");\n if(date(\"n\") == \"1\"){\n $periodo -= 1;\n }\n\n\n $matricula = new Matricula();\n $matricula->set_run_alumno($_POST[\"run_alumno\"]);\n $matricula->set_rbd_establecimiento($_POST[\"rbd_establecimiento\"]);\n $matricula->set_periodo($periodo);\n $matricula->db_get_matricula_by_run_alumno_and_rbd_esta_and_periodo();\n //print_r($matricula);\n\n $matriz_clase = new ClaseMatriz();\n if($matriz_clase->db_get_clases_by_id_curso($matricula->get_id_curso()) == \"0\"){\n $result = array();\n\n print_r(json_encode($result, JSON_UNESCAPED_UNICODE));\n return null;\n }\n\n $clases = $matriz_clase->get_matriz();\n for($i = 0; $i < count($clases); $i++){\n $bloque = new Bloque();\n $bloque->set_id_bloque($clases[$i][\"id_bloque\"]);\n $bloque->db_get_bloque_by_id();\n $clases[$i][\"id_dia\"] = $bloque->get_id_dia();\n $clases[$i][\"horario\"] = $bloque->get_hora_inicio().\" - \".$bloque->get_hora_fin();\n\n $profesor = new Profesor();\n $profesor->set_run($clases[$i][\"run_profesor\"]);\n $profesor->db_get_profesor_by_run();\n $clases[$i][\"nombre_profesor\"] = $profesor->get_nombre1().\" \".$profesor->get_nombre2().\" \".$profesor->get_apellido2();\n\n $asignatura = new Asignatura();\n $asignatura->set_id_asignatura($clases[$i][\"id_asignatura\"]);\n $asignatura->db_get_asignatura_by_id();\n $clases[$i][\"nombre_asignatura\"] = $asignatura->get_nombre();\n $clases[$i][\"color1\"] = $asignatura->get_color1();\n $clases[$i][\"color2\"] = $asignatura->get_color2();\n }\n\n\n print_r(json_encode($clases, JSON_UNESCAPED_UNICODE));\n\n}", "title": "" }, { "docid": "55ff2999127f6b07ca24ba5adb8f2b0a", "score": "0.5428206", "text": "function listarModalidadMatriz(){\n $this->procedimiento='adq.ft_modalidades_sel';\n $this->transaccion='ADQ_MODALI_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //Definicion de la lista del resultado del query\n $this->captura('id_modalidad','int4');\n $this->captura('estado_reg','varchar');\n $this->captura('codigo','varchar');\n $this->captura('nombre_modalidad','varchar');\n $this->captura('condicion_menor','numeric');\n $this->captura('condicion_mayor','numeric');\n $this->captura('observaciones','varchar');\n $this->captura('id_usuario_reg','int4');\n $this->captura('fecha_reg','timestamp');\n $this->captura('id_usuario_ai','int4');\n $this->captura('usuario_ai','varchar');\n $this->captura('id_usuario_mod','int4');\n $this->captura('fecha_mod','timestamp');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n\n $this->captura('con_concepto','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "8c4a3aa1fde0c31808de3a00567f917f", "score": "0.5424268", "text": "public function procesar_rut () {\n ini_set('memory_limit', '-1');\n /* Seleccion de datos a procesar:\n * Todos los datos a los que el digito verificador sea nulo\n * */\n #$forms = FormDeis::whereRaw('digito_verificador is null')->get();\n $forms = FormDeis::select('id','digito_verificador', 'run_madre')\n ->whereRaw('digito_verificador is null and run_madre is not null')->orderBy('id', 'desc')->get();\n /* Condicion:\n * Si no hay nada, lo saca\n * */\n #dd(count($forms));\n if (count($forms)==0) { return \"Finalizado, nada que procesar\"; }\n\n foreach ($forms as $key => $form) {\n\n $rut = $form->run_madre;\n if (6 < strlen($rut) && $this->valida_rut($rut) == true && !in_array($rut, [\"\",\"0\",null,0,1])\n && in_array($form->digito_verificador, [\"\",null])) {\n\n $form->digito_verificador = substr($rut,-1);\n $form->run_madre = substr($rut,0,-1);\n $form->save();\n }\n else{\n if (in_array(strlen($rut), [7,8])) {\n $dv = $this->obtener_digito($rut);\n if ($this->valida_rut($rut.$dv) == true) {\n $form->digito_verificador = $dv;\n $form->save();\n }\n }else {\n #Rut no pasa validación\n $form->digito_verificador = 'E';\n $form->save();\n }\n }\n }\n\n return \"Finalizado.\";\n\n }", "title": "" }, { "docid": "f73126a7e3264eecca2b493873e9e23a", "score": "0.54084814", "text": "function consolidarRelPre(){\n\t\t$this->procedimiento='pre.ft_rel_pre_ime';\n\t\t$this->transaccion='PRE_CONREL_IME';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_rel_pre','id_rel_pre','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d40a76718b5da897edb4480288fadbcb", "score": "0.5401526", "text": "function contenidos()\n\t{\n\t\tglobal $__BD, $__LIB;\n\t\n\t\t$codigoMod = '';\n\t\t\n\t\tif (!isset($_SESSION[\"cesta\"]))\n\t\t\treturn;\n\t\t\t\n\t\t$cesta = $_SESSION[\"cesta\"];\n\t\t\n\t\tif (!$cesta->cestaVacia()) {\n\t\t\tfor ($i=0; $i < $cesta->num_articulos; $i++){\t\t\t\n\t\t\t\t$referencia = $cesta->codigos[$i];\t\t\t\n\t\t\t\tif($referencia != 'null') {\t\t\t\t\t\t\t\t\n\t\t\t\t\t$descripcion = $__BD->db_valor(\"select descripcion from articulos where referencia='$referencia';\");\t\n\t\t\t\t\t$descripcion = $__LIB->traducir(\"articulos\", \"descripcion\", $referencia, $descripcion);\n\t\t\t\t\t\n\t\t\t\t\t$codigoMod .= '<div class=\"itemMenu\">';\n\t\t\t\t\t$codigoMod .= '<a href=\"'._WEB_ROOT.'catalogo/articulo.php?ref='.$referencia.'\">'.$descripcion.'</a>';\n\t\t\t\t\t$codigoMod .= '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $codigoMod;\n\t}", "title": "" }, { "docid": "81f6aa29a0ad4f24dd3147e84cce0728", "score": "0.5395502", "text": "function traitement()\n {\n // dans la table\n\n $nom = request('titre');\n $date_pu = request('date_pu');\n $personne_et_role = request('argentcache');\n\n\n $projet = new \\App\\projet;\n $projet->nom_projet = $nom;\n $projet->date_lancement_projet = $date_pu;\n $projet->save();\n\n $idcourant = \\App\\projet::where('nom_projet', $nom)->get();\n dump($idcourant[0]->id_projet);\n $pattern_resources = \"#.*?;#\";\n $pattern = \"#(.*?),(.*?);#\";\n $pattern2 = \"#(.*?) (.*)#\";\n $x = 0;\n // personne_et_role --> string avec : persone,role;personne,role\n preg_match_all($pattern_resources, $personne_et_role, $match_taches);\n foreach ($match_taches as $match_tach) {\n foreach ($match_tach as $match2) {\n preg_match_all($pattern, $match2, $deuxieme);\n $final[$x][0] = $deuxieme[1][0];\n $final[$x][1] = $deuxieme[2][0];\n $x = $x + 1;\n }\n }\n dump($final);\n $compteur = count($final);\n dump($compteur);\n $personnes = \\App\\personne::all();\n for ($h = 0; $h < $compteur; $h++) {\n //la variable string de départ est déoupée et rangée dans des tableaux\n $temporaire = $final[$h][0];\n $temporole = $final[$h][1];\n\n preg_match_all($pattern2, $temporaire, $match_tempo);\n\n foreach ($personnes as $personne) {\n //requettes double condition\n // on cherches les personnes dans la BDD par rapport a nom et prénom\n if ($match_tempo[1][0] == $personne->prenom && $match_tempo[2][0] == $personne->Nom) {\n dump($personnes);\n $new_participant = new \\App\\personne_participe_projet;\n $new_participant->id_personne = $personne->id_personne;\n $new_participant->id_projet = $idcourant[0]->id_projet;\n $new_participant ->role_personne_projet = $temporole;\n $new_participant->save();\n }\n }\n }\n session::put('projet.nom', $nom);\n return redirect('/detailProjet');\n }", "title": "" }, { "docid": "4085c5de20e4b75899d3685f209556ee", "score": "0.539265", "text": "function ListarCompraDetalles($compra)\n {\n $ocado = new cado();\n $sql = \"SELECT p.nombre,c.* from farm_compra_detalle c inner join farm_producto p on c.id_producto=p.id where id_compra=$compra\";\n $ejecutar = $ocado->ejecutar($sql);\n return $ejecutar;\n }", "title": "" }, { "docid": "6b4241165ace4cd92a80fbca5e06597c", "score": "0.5392469", "text": "static function resConsultaInicio($mostrar, &$renglon, &$rtexto, $tot = 0)\n {\n }", "title": "" }, { "docid": "a628839cc721f1669b822d2aba8e460f", "score": "0.5388468", "text": "private function getOrigemRecursos() {\r\n\t\t$bd = $this->bd;\r\n\t\t\r\n\t\t$sql = \"SELECT r.id, r.origem, c.valor \r\n\t\t\t\tFROM obra_contrato_recurso AS c INNER JOIN obra_rec AS r ON c.recursoID = r.id\r\n\t\t\t\tWHERE c.contratoID = \".$this->id;\r\n\t\t\r\n\t\treturn $bd->query($sql);\r\n\t}", "title": "" }, { "docid": "a49495c30624228ca2a2ae45df59f12d", "score": "0.5370204", "text": "public function getRecettes() {\n $sql = \"SELECT * FROM recette\";\n return $this->executeRequete($sql);\n }", "title": "" }, { "docid": "9a4d65d88087fbbeecd78c561c232436", "score": "0.5369662", "text": "function cl_contacorrentedetalhe() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrentedetalhe\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6670e818437ae2d4f19a6e828fb085cd", "score": "0.5367191", "text": "function modificarMatrizConcepto(){\n\t\t$this->procedimiento='adq.ft_matriz_concepto_ime';\n\t\t$this->transaccion='ADQ_MACONCEP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_matriz_concepto','id_matriz_concepto','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_matriz_modalidad','id_matriz_modalidad','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "6c600f7d5382490f88ddf1ae4e13ffaf", "score": "0.53609324", "text": "function Detalhe() {\n extract($GLOBALS);\n global $w_Disabled;\n\n // Recupera todos os dados do projeto e rubrica\n $sql = new db_getSolicFN; $RSQuery = $sql->getInstanceOf($dbms,null,$w_usuario,'INFEXECLANC',$P1,\n $p_ini_i,$p_ini_f,$w_inicio,$w_fim,$p_atraso,$p_solicitante,$p_unidade,\n $p_prioridade,$p_ativo,$p_proponente,$p_chave, $p_objeto, $p_pais, $p_regiao, \n $p_uf, $p_cidade, $p_usu_resp,$p_uorg_resp, $p_palavra, $p_prazo, $p_fase, $p_sqcc, \n $p_projeto, null, null, $p_sq_orprior);\n \n cabecalho();\n head();\n ShowHTML('<TITLE>'.$conSgSistema.' - Relatório</TITLE>');\n ShowHTML('<BASE HREF=\"' . $conRootSIW . '\">');\n ShowHTML('</HEAD>');\n BodyOpenClean('onLoad=\\'this.focus()\\';'); \n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</font></B>');\n ShowHTML('<hr/>');\n ShowHTML('<div align=center>');\n ShowHTML('<tr><td colspan=\"2\"><table border=\"0\" width=\"100%\">');\n //ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=2></td></tr>');\n //ShowHTML(' <tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify>Projeto:<b> '.$w_projeto.'</b></div></td></tr>');\n //ShowHTML(' <tr><td colspan=\"2\" bgcolor=\"#f0f0f0\"><div align=justify>Rubrica:<b> '.f($RS_Rubrica,'codigo').' - '.f($RS_Rubrica,'nome').' </b></div></td></tr>');\n //ShowHTML('<tr><td colspan=\"2\"><hr NOSHADE color=#000000 size=2></td></tr>');\n\n $w_filtro = '';\n if ($p_inicio!='') $w_filtro = $w_filtro . '<tr valign=\"top\"><td align=\"right\">Pagamento realizado de <td><b>' . $p_inicio . '</b> até <b>' . $p_fim . '</b>';\n if ($p_projeto>'') {\n $sql = new db_getSolicData; $RS = $sql->getInstanceOf($dbms,$p_projeto,'PJGERAL');\n if ($w_tipo=='WORD') {\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Projeto <td>[<b>'.f($RS,'titulo').'</b>]';\n } else {\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Projeto <td>[<b><A class=\"HL\" HREF=\"projeto.php?par=Visual&O=L&w_chave='.$p_projeto.'&w_tipo=Volta&P1=2&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\" title=\"Exibe as informações do projeto.\" target=\"_blank\">'.f($RS,'titulo').'</a></b>]';\n }\n } \n if ($p_pais>'') {\n $sql = new db_getCountryData; $RS = $sql->getInstanceOf($dbms,$p_pais);\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">País <td>[<b>'.f($RS,'nome').'</b>]';\n } \n if ($p_sq_orprior>''){\n $sql = new db_getTipoLancamento; $RS = $sql->getInstanceOf($dbms,$p_sq_orprior,null,$w_cliente,null);\n foreach($RS as $row) {$RS = $row; break; }\n $w_filtro .= '<tr valign=\"top\"><td align=\"right\">Tipo do lançamento <td>[<b>'.f($RS,'nome').'</b>]';\n } \n ShowHTML('<tr><td align=\"left\" colspan=2>');\n if ($w_filtro > '') ShowHTML('<table border=0>' . $w_filtro . '</table>');\n\n ShowHTML('<tr><td><a accesskey=\"F\" class=\"ss\" HREF=\"javascript:this.status.value;\" onClick=\"window.close(); opener.focus();\"><u>F</u>echar</a>&nbsp;');\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RSQuery));\n ShowHTML('<tr><td align=\"center\" colspan=2>');\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"1\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\n if ($w_tipo!='WORD') {\n ShowHTML(' <td rowspan=\"2\"><b>'.LinkOrdena('País','nm_pais').'</td>');\n ShowHTML(' <td rowspan=\"2\"><b>'.LinkOrdena('Projeto','cd_projeto').'</td>');\n ShowHTML(' <td rowspan=\"2\"><b>'.LinkOrdena('Gasto','ds_tipo_lancamento').'</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Lançamento</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Descrição</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Pagamento</td>');\n ShowHTML(' <td colspan=\"3\"><b>Valores</td>');\n ShowHTML(' <td colspan=\"4\"><b>Cotações Banco Central do Brasil</td>');\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\n ShowHTML(' <td><b>Financeiro</td>');\n ShowHTML(' <td><b>Projeto</td>');\n ShowHTML(' <td><b>Dólar</td>');\n ShowHTML(' <td><b>Data</td>');\n ShowHTML(' <td><b>BRL/USD</td>');\n ShowHTML(' <td><b>BRL/EUR</td>');\n ShowHTML(' <td><b>USD/EUR</td>');\n } else {\n ShowHTML(' <td rowspan=\"2\"><b>País</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Projeto</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Gasto</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Lançamento</td>');\n ShowHTML(' <td rowspan=\"2\"><b>Descrição</td>');\n ShowHTML(' <td colspan=\"3\"><b>Valores</td>');\n ShowHTML(' <td colspan=\"3\"><b>Cotações Banco Central do Brasil</td>');\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\n ShowHTML(' <td><b>Financeiro</td>');\n ShowHTML(' <td><b>Projeto</td>');\n ShowHTML(' <td><b>Dólar</td>');\n ShowHTML(' <td><b>Data</td>');\n ShowHTML(' <td><b>BRL/USD</td>');\n ShowHTML(' <td><b>BRL/EUR</td>');\n ShowHTML(' <td><b>USD/EUR</td>');\n }\n ShowHTML(' </tr>');\n if (count($RSQuery)==0) {\n // Se não foram selecionados registros, exibe mensagem\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=13 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\n } else {\n if ($p_ordena>'') { \n $lista = explode(',',str_replace(' ',',',$p_ordena));\n $RSQuery = SortArray($RSQuery,$lista[0],$lista[1],'nm_pais','asc','nm_projeto','asc','ds_tipo_lancamento','asc','quitacao','asc');\n } else {\n $RSQuery = SortArray($RSQuery,'nm_pais','asc','nm_projeto','asc','ds_tipo_lancamento','asc','quitacao','asc');\n }\n $valor = 0;\n foreach ($RSQuery as $row) {\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\n ShowHTML(' <td>'.f($row,'nm_pais').'</td>');\n ShowHTML(' <td title=\"'.f($row,'nm_projeto').'\" nowrap>'.f($row,'cd_projeto').'</td>');\n ShowHTML(' <td>'.f($row,'ds_tipo_lancamento').'</td>');\n ShowHTML(' <td nowrap>'.exibeSolic($w_dir,f($row,'sq_financeiro'),f($row,'cd_financeiro'),'N',$w_tipo).'</td>');\n ShowHTML(' <td width=\"30%\">'.f($row,'ds_financeiro').'</td>');\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'quitacao')).'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.f($row,'fn_sb_moeda').' '.formatNumber(f($row,'fn_valor')).'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.f($row,'sb_pj_moeda').' '.formatNumber(f($row,'vl_projeto')).'</td>');\n ShowHTML(' <td align=\"right\" nowrap>US$ '.formatNumber(f($row,'vl_unificado')).'</td>');\n ShowHTML(' <td align=\"center\">'.FormataDataEdicao(f($row,'data_cotacao')).'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.nvl(formatNumber(f($row,'tx_brl_usd'),4),'???').'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.nvl(formatNumber(f($row,'tx_brl_eur'),4),'???').'</td>');\n ShowHTML(' <td align=\"right\" nowrap>'.nvl(formatNumber(f($row,'tx_eur_usd'),4),'???').'</td>');\n ShowHTML(' </tr>');\n $valor += f($row,'vl_unificado');\n } \n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\n ShowHTML(' <td align=\"right\" colspan=\"8\"><b>Total&nbsp;</b></td>');\n ShowHTML(' <td align=\"right\" nowrap><b>US$ '.formatNumber($valor)).'</b></td>';\n ShowHTML(' <td align=\"right\" colspan=\"4\">&nbsp;</td>');\n ShowHTML(' </tr>');\n } \n ShowHTML(' </table>');\n ShowHTML(' </td>');\n ShowHTML('</tr>');\n ShowHTML('<tr><td colspan=2>Observações:');\n ShowHTML(' <ul>');\n ShowHTML(' <li>As células indicadas com \"???\" não têm cotação do Banco Central do Brasil informada. Use as opções \"Cotações\" ou \"Importar cotações Banco Central\" existentes em \"Financeiro - Tabelas\" para atualizar os dados.');\n ShowHTML(' <li>A conversão para dólar segue as regras abaixo:');\n ShowHTML(' <ol>');\n ShowHTML(' <li>Se foi informado valor em dólar na conclusão do lançamento, ele será usado.');\n ShowHTML(' <li>Se foi informado apenas valor em real na conclusão do lançamento, a conversão será feita usando a taxa BRL/USD exibida na listagem acima.');\n ShowHTML(' <li>Se foi informado apenas valor em euro na conclusão do lançamento, a conversão será feita usando a taxa USD/EUR exibida na listagem acima.');\n ShowHTML(' </ol>');\n ShowHTML(' <li>Os casos (2) e (3), acima, sempre usarão a taxa do dia anterior ao da coluna \"Pagamento\".');\n ShowHTML(' Por isso, <b><u>o valor do lançamento só será computado se as colunas BRL/USD e BRL/EUR forem diferentes de \"???\"</b></u>.');\n ShowHTML(' </ul>');\n\n ShowHTML('</table>');\n \n Rodape();\n}", "title": "" }, { "docid": "2ed11cda830b855c3607e9a64304a819", "score": "0.5356948", "text": "function refrescarNota(){\n // echo 'luis';\n $usuario = $this->getSession()->getUser();\n //Obtenemos un array con las notas del usuario en la bd con todos sus campos mediante el idUsuario\n \n $notas = $this->getModel()->obtenerNotas($usuario->getIdUsuario());\n \n $tipoNotas = array();\n //Pasamos el array con todas las notas para sacar el tipo notas mediante el IdTipoNota\n $tipoNotas=$this->getModel()->obtenerTipoNota($notas);\n \n //obtenre el id color\n // var_dump($notas);\n \n // $color = new Color();\n // $color = $notas[1];\n // echo $color->getIdColor().'------------------------------------------------';\n // exit();\n \n \n \n //echo date(\"d\") . \"/\" . date(\"m\") . \"/\" . date(\"Y\");\n //Devuelve la plantilla de notas\n $this->getModel()->addData('lista-nota', $tipoNotas);\n $this->getModel()->addData('nota', $notas);\n $this->getModel()->addData('usuario', $usuario);\n \n \n \n \n }", "title": "" }, { "docid": "8e39bf9c5f595df526a05782ecda9fb9", "score": "0.53542966", "text": "function modificarRespuestaAprobacion(){\n\t\t$this->procedimiento='agetic.ft_respuesta_aprobacion_ime';\n\t\t$this->transaccion='AGETIC_RESAPD_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_respuesta','id_respuesta','int4');\n\t\t$this->setParametro('finalizado','finalizado','bool');\n\t\t$this->setParametro('link','link','varchar');\n\t\t$this->setParametro('estado_proceso','estado_proceso','varchar');\n\t\t$this->setParametro('id_dato_enviado','id_dato_enviado','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "873c52ca72aa8f7bc8dabd3a61f8483b", "score": "0.53524745", "text": "public function showResumo() {\r\n\t\tglobal $conf;\r\n\t\tglobal $bd;\r\n\t\t$doc = $this;\r\n\t\tincludeModule('sgo');\r\n\t\t\r\n\t\t$tabelaEsq = '';\r\n\t\t$tabelaDir = '';\r\n\t\t\r\n\t\t// adiciona o titulo\r\n\t\t$html = '\r\n\t\t<script type=\"text/javascript\" src=\"scripts/sgd_contrato.js?r={$randNum}\"></script>\r\n\t\t<span class=\"headerLeft\">Dados do Documento</span>';\r\n\t\t/**\n\t\t * Solicitacao 003\n\t\t * Inserindo jquery para as mascaras\n\t\t */\n\t\t$html .= '<script type=\"text/javascript\" src=\"scripts/plugins/mascara.jquery.js\"></script>';\r\n\t\t// monta tabela exterior\r\n\t\t$html .= '\r\n\t\t<table border=\"0\" width=\"100%\">\r\n\t\t\t<tr>\r\n\t\t\t\t<td width=\"50%\">{$tabelaEsq}</td>\r\n\t\t\t\t<td width=\"50%\">{$tabelaDir}</td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t\t';\r\n\t\t\r\n\t\t// le os nomes dos campos desse tipo de documento\r\n\t\t$campos = explode(\",\", $doc->dadosTipo['campos']);\r\n\t\t\r\n\t\t// verificação de segurança: se o documento nao tiver campos, retorna mensagem\r\n\t\tif (!$campos[0]) {\r\n\t\t\t$html .= \"<br /><center><b>Não h&aacute; dados dispon&iacute;veis</b></center><br />\";\r\n\t\t\treturn $html;\r\n\t\t}\r\n\t\t\r\n\t\t/*$empresa = new Empresa($bd);\r\n\t\t$empresa->load($doc->campos['empresaID']);*/\r\n\t\t\r\n\t\t// senao, comeca a montar as tabelas\r\n\t\t$tabelaEsq .= '<table border=\"0\" width=\"100%\"><tr><td width=\"30%\"></td><td width=\"70%\"></td></tr>';\r\n\t\t//solicitacao 005: insercao do estado do contrato\r\n\t\trequireSubModule(array(\"frontend\",\"contrato_estado\"));\r\n\t\t$ce = new ContratoEstado($this->id);\r\n\t\t$link = new HtmlTag(\"a\", \"\",\"\",\"[Editar]\");\r\n\t\t$link->setAttr(array(\"href\",\"onclick\"),array(\"#\",\"javascript:contratoEstadoDialogOpen(\\\"\".ContratoEstado::DialogInsereID.\"\\\",\\\"\".$doc->id.\"\\\");\"));\n\t\t$link->setNext($ce->getAddDialog());\r\n\t\t$tabelaEsq .= '<tr class=\"c\"><td class=\"c\"><b>Estado do Contrato:</b> </td><td class=\"c\"><span id=\"estado\">'.$ce->getEstadoHtml().\" \".$link->toString().'</span></td></tr>';\r\n\t\t\r\n\t\t//fim 005\r\n\t\t$tabelaEsq .= '<tr class=\"c\"><td class=\"c\"><b>N&uacute;mero do Doc (CPO):</b> </td><td class=\"c\"><span id=\"docID\">'.$doc->id.'</span></td></tr>';\r\n\t\t\r\n\t\t$tabelaDir .= '<table border=\"0\" width=\"100%\"><tr><td width=\"30%\"></td><td width=\"70%\"></td></tr>';\r\n\t\t\r\n\t\t// Mostra obras\r\n\t\t$obras = $this->getObras();\r\n\t\t$tabelaDir .= '<tr class=\"c\"><td class=\"c\"><b>Obras</b>: </td>';\r\n\t\tif (count($obras) <= 0) {\r\n\t\t\t$tabelaDir .= '<td class=\"c\">Nenhuma Obra associada. ';\r\n\t\t\t\r\n\t\t\t// se o contrato for editável, dá a opção de editar as obras associadas\r\n\t\t\tif ($this->verificaEditavel(''))\r\n\t\t\t\t$tabelaDir .= '<a onclick=\"showEditObra('.$this->id.')\">[editar]</a> ';\r\n\t\t\t\t\r\n\t\t\t$tabelaDir .= '</td>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$tabelaDir .= '<td class=\"c\">';\r\n\t\t\tforeach ($obras as $o) {\r\n\t\t\t\t$onclick = 'onclick=\"';\r\n\t\t\t\t$onclick .= 'window.open(\\'sgo.php?acao=verObra&obraID='.$o['id'].'\\',';\r\n\t\t\t\t$onclick .= '\\'obra\\',\\'width=\\'+screen.width*'.$conf[\"newWindowWidth\"].'+\\',';\r\n\t\t\t\t$onclick .= 'height=\\'+screen.height*'.$conf[\"newWindowHeight\"].'+\\',scrollbars=yes,resizable=yes\\').focus()';\r\n\t\t\t\t$onclick .= '\"';\r\n\t\t\t\t$tabelaDir .= '<a '.$onclick.'>'.$o['nome'].'</a><br />';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// se o contrato for editável, dá a opção de editar as obras associadas\r\n\t\t\tif ($this->verificaEditavel(''))\r\n\t\t\t\t$tabelaDir .= '<a onclick=\"showEditObra('.$this->id.')\">[editar]</a>';\r\n\t\t\t\t\r\n\t\t\t$tabelaDir .= '</td>';\r\n\t\t}\r\n\t\t$tabelaDir .= '</tr>';\r\n\t\t// fim obras\r\n\t\t\r\n\t\t// mostra recursos\r\n\t\t$recursos = $this->getOrigemRecursos();\r\n\t\t$tabelaEsq .= '<tr class=\"c\"><td class=\"c\"><b>Origem dos Recursos</b>: </td>';\r\n\t\tif (count($recursos) <= 0) {\r\n\t\t\t$tabelaEsq .= '<td class=\"c\">Nenhuma Origem de Recurso associada. ';\r\n\t\t\t\r\n\t\t\t// se o contrato for editável, dá a opção de editar os recursos associados\r\n\t\t\tif ($this->verificaEditavel(''))\r\n\t\t\t\t$tabelaEsq .= '<a onclick=\"showEditRecurso('.$this->id.')\">[editar]</a>';\r\n\t\t\t\r\n\t\t\t$tabelaEsq .= '</td>';\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$tabelaEsq .= '<td class=\"c\">';\r\n\t\t\tforeach ($recursos as $r) {\r\n\t\t\t\t$tabelaEsq .= $r['origem'] . ': R$ ' . $r['valor'] . '<br />';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// se o contrato for editável, dá a opção de editar os recursos associados\r\n\t\t\tif ($this->verificaEditavel(''))\r\n\t\t\t\t$tabelaEsq .= '<a onclick=\"showEditRecurso('.$this->id.')\">[editar]</a>';\r\n\t\t\t$tabelaEsq .= '</td>';\r\n\t\t}\r\n\t\t$tabelaEsq .= '</tr>';\r\n\t\t// fim recursos\r\n\t\t\r\n\t\t// verificação de segurança: contrato deve sempre ter pai\r\n\t\tif ($doc->docPaiID == 0) {\r\n\t\t\tshowError(11);\r\n\t\t}\r\n\t\t\r\n\t\t// carrega info de processo pai\r\n\t\t$paiOwner = false;\r\n\t\t$docPai = new Documento($doc->docPaiID);\r\n\t\t$docPai->loadCampos();\r\n\t\tif ($docPai->owner == $_SESSION['id'] || ($docPai->owner == -1 && $docPai->areaOwner == $_SESSION['area']))\r\n\t\t\t$paiOwner = true;\r\n\t\t/**\r\n\t\t * Solicitacao 003\r\n\t\t * objetos com ids e conteudo dos span que irao receber o evento (dialog) presente no javascript\r\n\t\t */\r\n\t\trequireSubModule(array('aditivo','frontend'));//requisicao do sub_modulo aditivo\r\n\t\t$aditivos = new ArrayObject();\r\n\t\t//fim 003\r\n\t\t// monta tabelas para mostrar campos do contrato\r\n\t\tforeach ($campos as $c) {\r\n\t\t\t$aditivo_div = '';\r\n\t\t\t$tabela = 'tabelaEsq';\r\n\t\t\tif (Contrato::campoNaDireita($c)) {\r\n\t\t\t\t$tabela = 'tabelaDir';\r\n\t\t\t}\r\n\t\t\tif(strpos($doc->dadosTipo['emitente'],$c) === false){\r\n\t\t\t\t\r\n\t\t\t\tif ($c == 'empresaID') continue;\r\n\t\t\t\t$c = montaCampo($c,'edt',$doc->campos);\r\n\r\n\t\t\t\tif ($c['nome'] == \"numProcContr\") {\r\n\t\t\t\t\t$link = \"<a onclick=\\\"window.open('sgd.php?acao=ver&docID=\".$docPai->id;\r\n\t\t\t\t\t$link .= \"','doc','width='+screen.width*\".$conf[\"newWindowWidth\"].\"+',height='+screen.height*\";\r\n\t\t\t\t\t$link .= $conf[\"newWindowHeight\"].\"+',scrollbars=yes,resizable=yes').focus()\\\">\".$docPai->dadosTipo['nome'];\r\n\t\t\t\t\t$link .= \" \".$docPai->numeroComp.'</a>';\r\n\t\t\t\t\t$c['valor'] = $link;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// verifica se usuário tem permissão para ver este campo\r\n\t\t\t\tif ($c['verAcao'] < 0 || ($c['verAcao'] > 0 && !checkPermission($c['verAcao'])))\r\n\t\t\t\t\t continue;\r\n\t\t\t\telse {\r\n\t\t\t\t\t// verifica sigilo... contrato não tem campo de sigiloso, porém\r\n\t\t\t\t\t// não retirei porque pode ser que mudem de idéia...\r\n\t\t\t\t\tif (verificaSigilo($doc) && !checkPermission(67)) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// monta o display do campo\r\n\t\t\t\t\t\tif ($c['tipo'] == 'data') {\r\n\t\t\t\t\t\t\tif ($c['valor'] > 0)\r\n\t\t\t\t\t\t\t\t$c['valor'] = date(\"d/m/Y\", $c['valor']);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$c['valor'] = '';\r\n\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t$unity = '';\r\n\t\t\t\t\t\tif ($c['nome'] == \"prazoContr\" || $c['nome'] == \"prazoProjObra\") {\r\n\t\t\t\t\t\t\t$unity = 'dias';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//solicitacao 003: somando aditivos aos valores totais (finais)\r\n\t\t\t\t\t\tif($c[\"nome\"]==\"dataTermino\"){\r\n\t\t\t\t\t\t\t$sumAd=\"\";\r\n\t\t\t\t\t\t\t$total = 0;\r\n\t\t\t\t\t\t\tforeach ($aditivos as $ad){\r\n\t\t\t\t\t\t\t\t$unity=\" dias\";\r\n\t\t\t\t\t\t\t\tif($ad->getVar(\"tipo\")!=AditivoTipo::Diario)\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t$totAd = $ad->getSum();\r\n\t\t\t\t\t\t\t\tif($totAd>0){\r\n\t\t\t\t\t\t\t\t\t$total+=$totAd;\r\n// \t\t\t\t\t\t\t\t\tif($totAd==1)\r\n// \t\t\t\t\t\t\t\t\t\t$unity=\" dia\";\r\n// \t\t\t\t\t\t\t\t\t$sumAdTag = new HtmlTag(\"span\", \"\", \"\",\" (+) \".$totAd.$unity.\" Aditivo \".$ad->getVar(\"label\"));//soma dos aditivos\r\n// \t\t\t\t\t\t\t\t\t$sumAd .= \"<br/>\".$sumAdTag->toString();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$unity=\" dias\";\r\n// \t\t\t\t\t\t\t$sumAd .= \"<hr>\";\r\n\t\t\t\t\t\t\t$total = date('d/m/Y', strtotime(\"+\".$total.\" days\",strtotime(str_replace(\"/\", \"-\", $c[\"valor\"]))));\r\n\t\t\t\t\t\t\t$sumAdTag = new HtmlTag(\"span\", \"\", \"\",\" \".$total,new HtmlTagStyle(\"font-weight\",\"bold\"));//soma dos aditivos\r\n\t\t\t\t\t\t\t$sumAd .= $sumAdTag->toString();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if($c[\"nome\"]==\"valorTotal\"){\r\n\t\t\t\t\t\t\t$total=$c['valor'];\r\n\t\t\t\t\t\t\t$sumAd=\"\";\r\n\t\t\t\t\t\t\tforeach ($aditivos as $ad){\r\n\t\t\t\t\t\t\t\tif($ad->getVar(\"tipo\")!=AditivoTipo::Monetario)\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t$totAd = $ad->getSum();\r\n\t\t\t\t\t\t\t\tif($totAd>0){\r\n\t\t\t\t\t\t\t\t\t$total+=$totAd;\r\n// \t\t\t\t\t\t\t\t\t$sumAdTag = new HtmlTag(\"span\", \"\", \"\",\" (+) R$ \".number_format($totAd, 2, ',', '.').\" Aditivo \".$ad->getVar(\"label\"));//soma dos aditivos\n// \t\t\t\t\t\t\t\t\t$sumAd .= \"<br/>\".$sumAdTag->toString();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n// \t\t\t\t\t\t\t$sumAd .= \"<hr>\";\r\n\t\t\t\t\t\t\t$sumAdTag = new HtmlTag(\"span\", \"\", \"\",\" R$ \".number_format($total, 2, ',', '.'),new HtmlTagStyle(\"font-weight\",\"bold\"));//soma dos aditivos\r\n\t\t\t\t\t\t\t$sumAd .= $sumAdTag->toString();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$sumAd=\"\";\r\n\t\t\t\t\t\t//fim 003\r\n\t\t\t\t\t\t//003.5 : mudancas no layout\r\n\t\t\t\t\t\tif($c[\"nome\"]==\"valorProj\"||$c[\"nome\"]==\"valorMaoObra\"||$c[\"nome\"]==\"valorMaterial\"){\r\n\t\t\t\t\t\t\t$href=\"javascript:void(0)\";\n\t\t\t\t\t\t\t$onclick='javascript:show_aditivar_campo(\"'.$c['nome'].'\")';\n\t\t\t\t\t\t\t$aditivarDAO = new HtmlTag(\"a\", \"\", \"\",\"[Aditivo]\",null,new HtmlTagAttr(array(\"href\",\"onclick\"),array($href,$onclick)));\r\n\t\t\t\t\t\t\t$labelTB = new HtmlTable(rand(0, 100000), \"\", 1);\n\t\t\t\t\t\t\t$labelTB->appendLine(\"<b>\".$c[\"label\"].\"</b>\");\n\t\t\t\t\t\t\t$labelTB->appendLine($aditivarDAO->toString());\r\n\t\t\t\t\t\t\t$label = new HtmlTag(\"td\", \"\", \"c\");\n\t\t\t\t\t\t\t$label->setVar(\"content\", $labelTB->toString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if($c[\"nome\"]==\"prazoProjObra\"||$c[\"nome\"]==\"prazoContr\"){\r\n\t\t\t\t\t\t\t$href=\"javascript:void(0)\";\n\t\t\t\t\t\t\t$onclick='javascript:show_aditivar_campo(\"'.$c['nome'].'\")';\n\t\t\t\t\t\t\t$aditivarDAO = new HtmlTag(\"a\", \"\", \"\",\"[Aditivo]\",null,new HtmlTagAttr(array(\"href\",\"onclick\"),array($href,$onclick)));\n\t\t\t\t\t\t\t$labelTB = new HtmlTable(rand(0, 100000), \"\", 1);\n\t\t\t\t\t\t\t$labelTB->appendLine(\"<b>\".$c[\"label\"].\"</b>\");\n\t\t\t\t\t\t\t$labelTB->appendLine($aditivarDAO->toString());\n\t\t\t\t\t\t\t$label = new HtmlTag(\"td\", \"\", \"c\");\n\t\t\t\t\t\t\t$label->setVar(\"content\", $labelTB->toString());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t$label = new HtmlTag(\"td\", \"\", \"c\");\n\t\t\t\t\t\t\t$label->setVar(\"content\", \"<b>\".$c[\"label\"].\"</b>\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//fim 003.5\r\n\t\t\t\t\t\t$$tabela .= '\r\n\t\t\t\t\t\t<tr class=\"c\">'.$label->toString().'\r\n\t\t\t\t\t\t\t<td class=\"c\" id=\"'.$c['nome'].'_value_tr\">';\r\n\t\t\t\t\t\tif(isset($c['extra']) && strpos($c['extra'], 'moeda') !== false){\r\n\t\t\t\t\t\t\t//solicitacao 003 realiza a soma total\r\n\t\t\t\t\t\t\tif($c[\"nome\"]==\"valorTotal\")\n\t\t\t\t\t\t\t\t$$tabela .= $sumAd;\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t$$tabela .= 'R$ <span id=\"'.$c['nome'].'_val\">'.number_format($c['valor'], 2, ',', '.').'</span>';\r\n\t\t\t\t\t\t\t//fim 003\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t//solicitacao 003\r\n\t\t\t\t\t\t\tif($c[\"nome\"]==\"dataTermino\"){\r\n\t\t\t\t\t\t\t\t$unity=\"\";\r\n\t\t\t\t\t\t\t\t$$tabela .= $sumAd;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t$$tabela .= '<span id=\"'.$c['nome'].'_val\">'.$c['valor'].' '.$unity.'</span>';\r\n\t\t\t\t\t\t\t//fim 003\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//solicitacao 003\n// \t\t\t\t\t\t$$tabela .= $sumAd;\n\t\t\t\t\t\t//fim 003\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//clausula para aditivo\r\n\t\t\t\tif(isset($c['extra']) && strpos($c['extra'], 'aditivo') !== false) {\r\n\t\t\t\t\t/**\n\t\t\t\t\t * Solicitacao 003\n\t\t\t\t\t */\n\t\t\t\t\t$ad = new Aditivo($this->bd,$this->id,$c[\"nome\"],$c[\"label\"]);//criando novo objeto aditivo\n\t\t\t\t\tif(strpos($c['extra'], 'moeda') !== false)\n\t\t\t\t\t\t$ad->setVar('tipo', AditivoTipo::Monetario);\n\t\t\t\t\telse\n\t\t\t\t\t\t$ad->setVar('tipo', AditivoTipo::Diario);\r\n\t\t\t\t\t$adByName = $ad->getAditivos();//aditivos pelo nome\n\t\t\t\t\t$valorTotal = doubleval($c[\"valor\"]);//valor total do campo\n\t\t\t\t\t$adCount = count($adByName);//total de aditivos para essa campo\r\n\t\t\t\t\t//inicializa variaveis para calcular total dos aditivos\r\n\t\t\t\t\t$total_aditivos = 0;\r\n\t\t\t\t\t//abre tag onde os aditivos serao mostrados\r\n\t\t\t\t\t$aditivo_div .= '<div id=\"'.$c['nome'].'_aditivos_div\">';\r\n\t\t\t\t\t//vamos marcar o ultimo aditivo, apenas para inserir o botao de [Aditivar]\r\n\t\t\t\t\t$lastAdId = -1;\r\n\t\t\t\t\tforeach ($adByName as $a){\r\n\t\t\t\t\t\tif($a[\"valor\"]!=0)\r\n\t\t\t\t\t\t\t$lastAdId=$a[\"id\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//para cada aditivo achado\r\n\t\t\t\t\tforeach ($adByName as $k=>$a) {\r\n\t\t\t\t\t\t//div pai\r\n\t\t\t\t\t\t$div = new HtmlTag(\"div\",\"\",\"adpai\");\r\n\t\t\t\t\t\t$div->setStyle(array(\"float\",\"width\"), array(\"left\",\"100%\"));\r\n\t\t\t\t\t\t//div com valor\r\n\t\t\t\t\t\t$divValor = new HtmlTag(\"div\", \"\", \"\");\n\t\t\t\t\t\t$divValor->setStyle(array(\"float\",\"width\"), array(\"left\",\"70%\"));\r\n\t\t\t\t\t\t//div para DataAccessObject\r\n\t\t\t\t\t\t$divDAO = new HtmlTag(\"div\", \"\", \"\");\r\n\t\t\t\t\t\t$divDAO->setStyle(array(\"float\",\"text-align\",\"width\"), array(\"right\",\"right\",\"25%\"));\n\t\t\t\t\t\t//fazendo divValor ser filho de div pai\r\n\t\t\t\t\t\t$div->setChildren($divValor);\r\n\t\t\t\t\t\t//eh proxima da divValor\r\n\t\t\t\t\t\t$div->setChildren($divDAO);\r\n\t\t\t\t\t\t//guarda valor do aditivo\r\n\t\t\t\t\t\t$hidden = new HtmlTag(\"input\", \"\", \"\");\r\n\t\t\t\t\t\t$hidden->setAttr(array(\"type\",\"value\",\"name\"),array(\"hidden\",$a[\"valor\"],\"aditivo_valor_\".$a['id']));\r\n\t\t\t\t\t\t$hidden->setNext(new HtmlTag(\"input\", \"\", \"\",\"\",null,new HtmlTagAttr(array(\"type\",\"value\",\"name\"),array(\"hidden\",$a[\"motivo\"],\"aditivo_motivo_\".$a['id']))));\r\n\t\t\t\t\t\t//nova taghtml\r\n\t\t\t\t\t\t$htmlTag = new HtmlTag(\"span\", \"aditivo_valor_\".$a['id'], \"\");\r\n\t\t\t\t\t\t$htmlTag->setStyle(array(\"text-decoration\",\"cursor\"), array(\"none\",\"pointer\"));//estilo css\n\t\t\t\t\t\t$htmlTag->setAttr(array(\"show_admotivo_\".$ad->getVar(\"label\"),\"attr\"), array(true,\"aditivo_dialog\"));//attr para mostrar o motivo\r\n\t\t\t\t\t\t$htmlTag->setChildren($hidden);\r\n\t\t\t\t\t\t//dialog vai dentro da divValor\r\n\t\t\t\t\t\t$divValor->setVar(\"children\", $htmlTag);\r\n\t\t\t\t\t\t//conteudo \r\n\t\t\t\t\t\t$content=\"\";\r\n\t\t\t\t\t\t//div que virara dialog\r\n\t\t\t\t\t\t$divMore = new HtmlTag(\"div\", \"aditivo_show_more_\".$a[\"id\"], \"\");\r\n\t\t\t\t\t\t$divMore->setStyle(\"display\", \"none\");\r\n\t\t\t\t\t\t//input hidden para marcar o titulo do dialog\r\n\t\t\t\t\t\t$dialogTitle = new HtmlTag(\"input\", \"\", \"\");\r\n\t\t\t\t\t\t$dialogTitle->setAttr(array(\"type\",\"value\",\"name\"), array(\"hidden\",\"Aditivo: \".$c[\"label\"],\"dialogTitle\"));\r\n\t\t\t\t\t\t//tabela dentro do dialog\r\n\t\t\t\t\t\t$htmlTable = new HtmlTable(\"show_more_\".$a[\"id\"], \"aditivo_show_more\", 2);\r\n\t\t\t\t\t\t$htmlTable->setStyle(array(\"width\",\"border\"), array(\"90%\",\"1px solid #000000\"));\r\n\t\t\t\t\t\t$htmlTable->setLineStyle($htmlTable->getVar(\"style\"));\r\n\t\t\t\t\t\t//criando os filhos da divMore\r\n\t\t\t\t\t\t$divMore->setChildren($dialogTitle);\r\n\t\t\t\t\t\t$divMore->setChildren($htmlTable);\r\n\t\t\t\t\t\t//div more eh filha da tag Html principal\r\n\t\t\t\t\t\t$htmlTag->setChildren($divMore);\r\n\t\t\t\t\t\t//inserir o valor no aditivo\r\n\t\t\t\t\t\t$ad->setVar(\"valor\", $a[\"valor\"]);\r\n\t\t\t\t\t\t//se o aditivo for referente ao campo sendo montado\n\t\t\t\t\t\t//formata o valor aditivado na forma 00,00%\r\n\t\t\t\t\t\tif($a[\"valor\"]==0)\r\n\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t\n\t\t\t\t\t\t$porcentagem = ($c[\"valor\"]==0)?0.00:number_format($a['valor']/$c['valor']*100.00, 2, ',', '.');\r\n\t\t\t\t\t\t//se for tipo moeda, precisa colocar o R$ antes\n\t\t\t\t\t\tif(strpos($c['extra'], 'moeda') !== false){\r\n\t\t\t\t\t\t\t$valorAditivo=number_format($a['valor'], 2, ',', '.');\r\n\t\t\t\t\t\t\t$valorTotal += doubleval($a['valor']);\r\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Valor\",\"R$ \".$valorAditivo));\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Porcentagem\",$porcentagem.\"%\"));\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Motivo\",$a[\"motivo\"]));\r\n\t\t\t\t\t\t\t$content = \"(+) R$ \".$valorAditivo.\"(\".$porcentagem.\"%)\";\r\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t$valorTotal += intval($a['valor']);\r\n\t\t\t\t\t\t\t$valorAditivo = intval($a[\"valor\"]);\r\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Dias\",$valorAditivo));\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Porcentagem\",$porcentagem.\"%\"));\n\t\t\t\t\t\t\t$htmlTable->appendLine(array(\"Motivo\",$a[\"motivo\"]));\r\n\t\t\t\t\t\t\t$content = \"(+) \".$valorAditivo.' '.($valorTotal>1?'dias':'dia').\"(\".$porcentagem.\"%)\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$href=\"javascript:void(0)\";\n\t\t\t\t\t\t$onclick='javascript:show_editar_aditivo(\"'.$a['id'].'\",\"'.$c['nome'].'\")';\r\n\t\t\t\t\t\t$divDAO->setChildren(new HtmlTag(\"a\", \"\", \"\",\"[Editar]\",null,new HtmlTagAttr(array(\"href\",\"onclick\"),array($href,$onclick))));\r\n\t\t\t\t\t\t$htmlTable->setColumnStyle(new HtmlTagStyle(array(\"font-weight\"),array(\"bold\")),-1,0);\r\n\t\t\t\t\t\t$htmlTag->setVar(\"content\", $content);\r\n\t\t\t\t\t\tif($a[\"id\"]==$lastAdId)\r\n\t\t\t\t\t\t\t$div->setStyle(\"margin-bottom\", \"5px\");\r\n\t\t\t\t\t\t$aditivo_div .= \"\".$div->toString();\r\n\t\t\t\t\t\tif($a[\"id\"]==$lastAdId){\r\n\t\t\t\t\t\t\tif(strpos($c['extra'], 'moeda') !== false)\n\t\t\t\t\t\t\t\t$aditivo_div .= \"<hr><b>Total: R$ \".number_format($valorTotal, 2, ',', '.').\"</b>\";\r\n\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t$aditivo_div .= \"<hr><b>Dias aditivados: \".$valorTotal.' '.($valorTotal>1?'dias':'dia').\"</b>\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$aditivos->append($ad);\r\n\t\t\t\t\t$aditivo_div .= '</div>';\r\n\t\t\t\t\t// se houver aditivos, mostra o tota de aditivos\r\n\t\t\t\t\tif($total_aditivos){\r\n\t\t\t\t\t\t$aditivo_div .= '<br /> <b>Total de Aditivos</b>: ';\r\n\t\t\t\t\t\t//se campo for moeda, formata o R$ 00,00\r\n\t\t\t\t\t\tif(strpos($c['extra'], 'moeda') !== false)\r\n\t\t\t\t\t\t\t$aditivo_div .= 'R$ <span id=\"'.$c['nome'].'_total_aditivos\">'.number_format($total_aditivos, 2, ',', '.').'</span>';\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t$aditivo_div .= ' <span id=\"'.$c['nome'].'_total_aditivos\">'.$total_aditivos.'</span>';\r\n\t\t\t\t\t\t//se nao for data, coloca porcentagem\r\n\t\t\t\t\t\tif($c['tipo'] != 'data')\r\n\t\t\t\t\t\t\t$aditivo_div .= ' (<span id=\"'.$c['nome'].'_total_aditivos_porcentagem\">'.number_format($total_aditivos/$c['valor']*100, 2, ',', '.').'</span> %)';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$aditivo = true;\r\n\t\t\t\t}\r\n\t\t\t\t// verifica se o usuário tem permissão para editar o campo\r\n\t\t\t\tif ($c['editarAcao'] < 0 || ($c['editarAcao'] > 0 && !checkPermission($c['editarAcao'])) || !$doc->verificaEditavel($c['nome'])) {\r\n\t\t\t\t\t$$tabela .= $aditivo_div;\r\n\t\t\t\t\t$$tabela .= '</td></tr>';\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// caso tenha, monta formulário de edição\r\n\t\t\t\t$$tabela .= '<form accept-charset=\"'.$conf['charset'].'\" id=\"'.$c['nome'].'_form\" action=\"javascript: editContrVal(\\''.$c['nome'].'\\')\" method=\"post\" style=\"display: inline\">\r\n\t\t\t\t<span id=\"'.$c['nome'].'_edit\" style=\"display:none;\">\r\n\t\t\t\t'.$c['cod'].'\r\n\t\t\t\t</span>\r\n\t\t\t\t<input id=\"'.$c['nome'].'_link\" class=\"buttonlink\" type=\"submit\" value=\"[Editar]\" /> \r\n\t\t\t\t</form>';\r\n\t\t\t\t$$tabela .= $aditivo_div;\r\n\t\t\t\t$$tabela .= '</td></tr>';\r\n\t\t\t}//if\r\n\t\t}//foreach\r\n\t\t$tabelaEsq .= '</table>';\r\n\t\t$tabelaDir .= '</table>';\r\n\t\tif(isset($aditivo)) {\r\n\t\t\t//carrega o menu de motivos para atraso\r\n\t\t\t$motivos_aditivo = array(array('value'=> 'motivo1', 'label' => 'Erro de Calculo'), array('value'=> 'motivo2', 'label' => 'Erro Humano'), array('value'=> 'motivo3', 'label' => 'Motivo de Preguica Maior'), array('value'=> '_outro', 'label' => 'Outro Motivo'));\r\n\t\t\t//seta o HTML do dialog para inserir/editar aditivos\r\n\t\t\t/**\r\n\t\t * Solicitacao 003: arrumando o dialog para separar os input em dias e valor_moeda\r\n\t\t\t */\r\n\t\t\t$dialog_html = '<div id=\"aditivar_dialog\" title=\"Aditivar campo\" style=\"display:none\">';//dialog jquery\r\n\t\t\t$div_c_desc = '<div class=\"aditivar_c_desc\" style=\"float:left;\">';//descricao do campo a esquerda\r\n\t\t\t$div_c_input = '<div class=\"aditivar_c_input\" style=\"float:left;\">';//input do campo\r\n\t\t\t$closeElem = new stdClass();//para fechar um elemento html\r\n\t\t\t$closeElem->div = '</div>';\r\n\t\t\t$c = new stdClass();\r\n\t\t\t$c->desc = new stdClass();\r\n\t\t\t$c->input = new stdClass();\r\n\t\t\t$c->desc->dia = \"<div id='aditivar_desc_dia' attr='sw' style='display:none;'> Valor a ser adicionado (dias)</div>\";\r\n\t\t\t$c->desc->moeda = \"<div id='aditivar_desc_moeda' attr='sw' style='display:none;'>Valor a ser adicionado (R$)</div>\";\r\n\t\t\t$c->desc->razao = '<div id=\"aditivar_desc_razao\" style=\"display:block;\">Raz&atilde;o do aditivo: </div>';\r\n\t\t\t$c->input->dia = '<div id=\"aditivar_input_dia\" attr=\"sw\" style=\"display:none;\"><input id=\"aditivar_valor\" /></div>';\r\n\t\t\t$c->input->moeda = '<div id=\"aditivar_input_moeda\" attr=\"sw\" style=\"display:none;\"><input type=\"text\" id=\"aditivar_valor_moeda\" /></div>';\r\n\t\t\t$c->input->razao = '<div id=\"aditivar_input_razao\" style=\"display:block;\">'.geraSelect('aditivar_razao', $motivos_aditivo, null, '', 'aditivo_razao_select').'<input id=\"aditivar_razao_outro\" /></div>';\r\n\t\t\t$html .= $dialog_html.'<div style=\"float:left;\">'.($div_c_desc.\r\n\t\t\t\t\t ($c->desc->dia).($c->desc->moeda).$closeElem->div).\r\n\t\t\t\t\t ($div_c_input.($c->input->dia).($c->input->moeda).$closeElem->div).$closeElem->div;\r\n\t\t\t$html .= '<div style=\"float:left;\">'.$div_c_desc.$c->desc->razao.$closeElem->div.$div_c_input.$c->input->razao.$closeElem->div.$closeElem->div;\r\n\t\t\t$html .= $closeElem->div;\r\n\t\t\t//fim 003\r\n\t\t}\r\n\t\t$html = str_replace('{$tabelaEsq}', $tabelaEsq, $html);\r\n\t\t$html = str_replace('{$tabelaDir}', $tabelaDir, $html);\r\n\t\t\r\n\t\tif ($this->verificaEditavel(''))\r\n\t\t\t$html .= $this->showEditObrasRec();\r\n\t\t//retorna o cod html da tabela\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "ffe5880662ff6ca20023227953d414e2", "score": "0.5347078", "text": "public function executeListarMensajesRecibidosCorto()\n {\n $id_curso = $this->getRequestParameter('filtro');\n\n $mensajes = $this->getUser()->getMensajesRecibidosRolCursos(0,1);\n\n\t $primeros= array_chunk($mensajes,5);\n\n if ($primeros != null) {\n $this->mensajes = $primeros[0];\n } else {\n $this->mensajes = array();\n }\n\n }", "title": "" }, { "docid": "df3dd6e78c2f3e54b0020543e7b8360c", "score": "0.53424937", "text": "function ressourcesgrandhangar($autonomieM,$autonomieC,$autonomieD,$user_building)\r\n{\r\n global $user_data;\r\n\t$start = 101;\r\n\t$nb_planete = find_nb_planete_user($user_data[\"user_id\"]);\r\n\t$result = array();//force l'interpretation de $result comme un array : retire des erreurs (silencieuses) dns le journal des PHP 5\r\n\t\r\n\tfor ($i=$start ; $i<=$start+$nb_planete -1 ; $i++) \r\n\t\t{\r\n\t\t\t// test planete existante\r\n\t\t\tif($user_building[$i][0] === TRUE)\r\n\t\t\t\t{\r\n\t\t\t\t\t// lorsque pas d'autonomie, il faut quand meme des valeurs pour comparer\r\n\t\t\t\t\tif (empty($autonomieM[$i])) $autonomieM[$i] = 1;\r\n\t\t\t\t\tif (empty($autonomieC[$i])) $autonomieC[$i] = 1;\r\n\t\t\t\t\tif (empty($autonomieD[$i])) $autonomieD[$i] = 1;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$result[$i]=($user_building[$i]['M_hour']*$autonomieM[$i]+$user_building[$i]['C_hour']*$autonomieC[$i]+$user_building[$i]['D_hour']*$autonomieD[$i]);\r\n\t\t\t\t}\r\n\t\t}\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "00aa343c8b5b8f778a8307c64f69e8b7", "score": "0.53397787", "text": "function cl_controleacessoalunoregistro() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"controleacessoalunoregistro\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "98bd495fc29d4b5897e3e5318cdc2ccd", "score": "0.5339285", "text": "function modificarModalidades(){\n\t\t$this->procedimiento='adq.ft_modalidades_ime';\n\t\t$this->transaccion='ADQ_MODALI_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_modalidad','id_modalidad','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre_modalidad','nombre_modalidad','varchar');\n\t\t$this->setParametro('condicion_menor','condicion_menor','numeric');\n\t\t$this->setParametro('condicion_mayor','condicion_mayor','numeric');\n\t\t$this->setParametro('observaciones','observaciones','varchar');\n\n\t\t$this->setParametro('con_concepto','con_concepto','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "72dc6c982970f46c04d91055e1721e7f", "score": "0.53355724", "text": "function cl_modcarnepadraocobranca() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"modcarnepadraocobranca\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d71f9dc456e3d62a08f1667cbaadf33e", "score": "0.53324336", "text": "function cl_movimentacaoprontuario() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"movimentacaoprontuario\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d6e78db78141568cb4f74bab7264cf6d", "score": "0.53295994", "text": "function mc3_reseau_autoriser(){}", "title": "" }, { "docid": "c655decf9937553d1833d9fe9911a0cb", "score": "0.5327742", "text": "function modificarUnidadconstructivamcelec(){\n\t\t$this->procedimiento='snx.ft_unidadconstructivamcelec_ime';\n\t\t$this->transaccion='SNX_MCUC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_unidadconstructivamcelec','id_unidadconstructivamcelec','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('areasub','areasub','numeric');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('numerobahias','numerobahias','int4');\n\t\t$this->setParametro('longitudvia','longitudvia','numeric');\n\t\t$this->setParametro('id_claseaislacion','id_claseaislacion','int4');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('id_tensionservicio','id_tensionservicio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "bd612b8b97c642db3fb4b7dd334457b9", "score": "0.53248113", "text": "public function resumen()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'listas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que exista un colegio seleccionado\n\t\t */\n\t\tif ( ! ( $colegio = $this->Session->read('Flujo.Lista.colegio_id') ) )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Elimina productos del carro que no sean de listas\n\t\t */\n\t\t$catalogos\t\t= $this->Carro->catalogos();\n\n\t\tforeach ( $catalogos as $catalogo )\n\t\t{\n\t\t\tif ( $catalogo !== 'lista' )\n\t\t\t{\n\t\t\t\t$this->Carro->eliminarCatalogo($catalogo);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que existan productos en el carro\n\t\t */\n\t\t$productos\t\t\t= $this->Carro->productos('lista');\n\t\t// prx(! $productos);\n\t\t$carro\t\t\t\t= $this->Carro->estado();\n\t\tif ( ! $productos || ! $carro['Cantidad'] )\n\t\t{\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que el usuario haya seleccionado una direccion\n\t\t */\n\t\tif ( ! $direccion_id = $this->Session->read('Flujo.Carro.direccion_id') )\n\t\t{\n\t\t\t$this->redirect(array('controller' => 'direcciones', 'action' => 'add'));\n\t\t}\n\t\t$this->Lista->DetalleCompra->Compra->Direccion->id\t\t= $direccion_id;\n\t\tif ( ! $this->Lista->DetalleCompra->Compra->Direccion->exists() )\n\t\t{\n\t\t\t$this->redirect(array('controller' => 'direcciones', 'action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba si existe una compra en proceso\n\t\t */\n\t\tif ( ( $compra_id = $this->Session->read('Flujo.Carro.compra_id') ) && $this->Lista->DetalleCompra->Compra->pendiente($compra_id) )\n\t\t{\n\t\t\t$this->Lista->DetalleCompra->Compra->id\t\t\t= $compra_id;\n\t\t}\n\n\t\t/**\n\t\t * Guarda la compra en estado pendiente\n\t\t */\n\t\t$compra\t\t\t\t= $this->Lista->DetalleCompra->Compra->registrarCarro($productos, $direccion_id, $carro['Peso'], false, true);\n\t\t$this->Session->write('Flujo.Carro.compra_id', $compra['Compra']['id']);\n\n\t\t/**\n\t\t * Lista de listas y productos\n\t\t */\n\t\t$listas\t\t\t= $this->Lista->find('all', array(\n\t\t\t'conditions'\t\t=> array(\n\t\t\t\t'Lista.usuario_id'\t\t=> $this->Auth->user('id'),\n\t\t\t\t'Lista.activo'\t\t\t=> true,\n\t\t\t\t'Lista.colegio_id'\t\t=> $colegio\n\t\t\t\t/*\n\t\t\t\t'Lista.created >='\t=> sprintf('%d-01-01', date('Y')),\n\t\t\t\t'Lista.created <='\t=> sprintf('%d-12-31', date('Y'))\n\t\t\t\t*/\n\t\t\t),\n\t\t\t'contain'\t\t\t=> array('Colegio', 'Nivel'),\n\t\t\t'order'\t\t\t\t=> array('Lista.id' => 'DESC')\n\t\t));\n\n\t\t/**\n\t\t * Si existe error al guardar la compra, devuelve al usuario a la pagina de dirección\n\t\t * para reintentar la operacion\n\t\t */\n\t\tif ( ! $compra )\n\t\t{\n\t\t\t$this->redirect(array('controller' => 'direcciones', 'action' => 'add'));\n\t\t}\n\t\t$this->Session->write('Flujo.Carro.pendiente', false);\n\n\t\t/**\n\t\t * Camino de migas\n\t\t */\n\t\tBreadcrumbComponent::add('Lista de uniforme', array('action' => 'add'));\n\t\tBreadcrumbComponent::add('Despacho', array('controller' => 'direcciones', 'action' => 'add'));\n\t\tBreadcrumbComponent::add('Resumen');\n\t\t$this->set('title', 'Resumen de lista');\n\t\t$this->set(compact('colegio', 'listas', 'compra'));\n\t}", "title": "" }, { "docid": "21389d95a9a05576021a1c1643af41ff", "score": "0.5312668", "text": "function getTrabajosRealizados()\n\t{\n\t\t$trabajosrealizados=array();\n\t\t$conexion= conectar();\n\t\t\n\t\t$i=0;\n\t\t$resultado=mysql_query(\"SELECT idtrabajorealizado,descripcion,ruta,fechacreacion FROM trabajorealizado\", $conexion);\n\t\twhile ($fila=mysql_fetch_array($resultado))\n\t\t{\n\t\t\t$trabajosrealizados[$i]['idtrabajorealizado']=$fila['idtrabajorealizado'];\n\t\t\t$trabajosrealizados[$i]['descripcion']=$fila['descripcion'];\n\t\t\t$trabajosrealizados[$i]['ruta']=$fila['ruta'];\n\t\t\t$trabajosrealizados[$i]['fechacreacion']=$fila['fechacreacion'];\n\t\t\t$i++;\n\t\t}\t\t\n\t\treturn $trabajosrealizados;\n\t}", "title": "" }, { "docid": "713f855e18394d4575bd65b71d70fce0", "score": "0.5312511", "text": "public function listarrequisitosmatricula($id)\n {\n $a = Aspirante::find($id);\n $requisitos = Parametrizardocumentoanexo::where([['procesosacademico_id', 2], ['grado_id', $a->grado_id], ['jornada_id', $a->jornada_id], ['unidad_id', $a->unidad_id]])->get();\n $verificados = $a->requisitoverificados;\n if (count($requisitos) > 0) {\n foreach ($requisitos as $r) {\n $esta = \"NO\";\n $req = \"\";\n if (count($verificados) > 0) {\n foreach ($verificados as $v) {\n if ($v->documentoanexo_id == $r->documentoanexo_id && $v->procesosacademico_id == 2) {\n $esta = \"SI\";\n $req = $v->id;\n }\n }\n }\n $r->requisito = $req;\n $r->esta = $esta;\n }\n return view('matricula.matricula.verificar_requisitos.verificar')\n ->with('location', 'matricula')\n ->with('a', $a)\n ->with('requisitos', $requisitos);\n } else {\n flash(\"No hay requisitos establecidos para el aspirante seleccionado\")->error();\n return redirect()->route('verificarrequisitos.listaraspirantesmatricula', [$a->unidad_id, $a->periodoacademico_id, $a->jornada_id, $a->grado_id]);\n }\n }", "title": "" }, { "docid": "165a33d5e37b5e6686f5711323358c32", "score": "0.5310735", "text": "function recuperarRendicionDepositos(){\n\t\t$this->procedimiento='cd.ft_cuenta_doc_sel';\n\t\t$this->transaccion='CD_REPDEPREN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setCount(false);\t\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('importe_deposito','numeric');\n\t\t$this->captura('origen','varchar');\n\t\t$this->captura('nombre_finalidad','varchar');\n\t\t$this->captura('id_libro_bancos','int4');\n\t\t$this->captura('observaciones','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t//var_dump($this->consulta); exit;\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "56a832b5c78bd5b84b74f01e05f78e36", "score": "0.5308745", "text": "function procesarDetalleBoletos(){\n $this->procedimiento='obingresos.ft_detalle_boletos_web_ime';\n $this->transaccion='OBING_BOWEBPROC_MOD';\n $this->tipo_procedimiento='IME';\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "7ea1d4bd0a7c372493bbe51170a5a0a1", "score": "0.53085995", "text": "function listarTramitesAjustables(){\n\t\t$this->procedimiento='pre.ft_partida_ejecucion_sel';\n\t\t$this->transaccion='PRE_LISTRAPE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('fecha_ajuste','fecha_ajuste','date');\n\t\t$this->captura('id_gestion','int4');\n $this->captura('nro_tramite','varchar');\n $this->captura('codigo','varchar');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "73d33d1028d91a5eafe874567fe35185", "score": "0.5307233", "text": "function cl_far_complicacoescadacomp() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"far_complicacoescadacomp\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ff32f8fb5ab8aab43f622050f56b002e", "score": "0.5306446", "text": "public function calculaRecargos($queryCompleto)\r\n\t{\r\n\t\t\t\t$ORDEN1 = array();\r\n\t\t\t\tforeach($queryCompleto as $id => $valorData)\r\n\t\t\t\t{\r\n\t\t\t\t if($valorData['CODTRABAJO']=='REOPEX')\r\n\t\t\t\t {\r\n\t\t\t\t $ORDEN1[$valorData['ORDEN']]= array(\"CODTRABAJO2\"=>$valorData['CODTRABAJO'], \"DESCRIPCION_TRABAJO2\"=>$valorData['DESCRIPCION_TRABAJO2']);\r\n\t\t\t\t }else if($valorData['CODTRABAJO']=='RECAPEX')\r\n\t\t\t\t {\r\n\t\t\t\t $ORDEN1[$valorData['ORDEN']]= array(\"CODTRABAJO2\"=>$valorData['CODTRABAJO'], \"DESCRIPCION_TRABAJO2\"=>$valorData['DESCRIPCION_TRABAJO2']);\r\n\t\t\t\t }else\r\n\t\t\t\t {\r\n\t\t\t\t //$ORDEN1[$valorData['ORDEN']]= $valorData['CODTRABAJO'];\r\n\t\t\t\t }\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//asociamos la orden a los regsitros\r\n\t\t\t\tif($ORDEN1<>array())\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($queryCompleto as $id => $valorData) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t $ORDEN= $valorData['ORDEN'];\r\n\t\t\t\t\t $nuevosQuerys[$id][$ORDEN] = $valorData;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tforeach($nuevosQuerys as $id2 => $valor)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t foreach($valor as $id3 => $valor3)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t if($valor3['CODTRABAJO']=='RECAPEX')\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t }else if($valor3['CODTRABAJO']=='REOPEX')\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t }else\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t foreach($ORDEN1 as $id4 => $valor4)\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t if($id3 == $id4)\r\n\t\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t\t $valor3['CODTRABAJO2'] = $valor4['CODTRABAJO2'];\r\n\t\t\t\t\t\t\t\t\t $valor3['DESCRIPCION_TRABAJO2'] = $valor4['DESCRIPCION_TRABAJO2'];\r\n\t\t\t\t\t\t\t\t\t $valor5[] = $valor3;\r\n\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t }\r\n\t\t\t\t\t \r\n\t\t\t\t\t}\r\n\t\t\t\t\t$recargo = $this->ConsultaRecargos($valor5);\r\n\t\t\t\t $valores = array_merge($queryCompleto,$recargo);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($valores<>array())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t foreach($valores as $v => $value)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\tif($value['CANTIDAD']!='0')\r\n\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t if($value['CODTRABAJO']=='RECAPEX')\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t }else if($value['CODTRABAJO']=='REOPEX')\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t }else\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t $valor6[] = $value;\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t $valores = $valor6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}else\r\n\t\t\t\t{\r\n\t\t\t\t if($queryCompleto<>array())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t $valuedata = array();\r\n\t\t\t\t\t foreach($queryCompleto as $id => $valorData)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\t if($valorData['CANTIDAD']!='0')\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t $valuedata[] = $valorData;\r\n\t\t\t\t\t\t\t }\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\t\t $valores = $valuedata;\r\n\t\t\t\t\t \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\treturn $valores;\r\n\t}", "title": "" }, { "docid": "978c446e3b9c12ae7add361682b162d6", "score": "0.53034157", "text": "function cambiarRevisionBoleto(){\n $this->procedimiento='obingresos.ft_boleto_ime';\n $this->transaccion='OBING_REVBOL_MOD';\n $this->tipo_procedimiento='IME';\n //Define los parametros para la funcion\n $this->setParametro('id_boleto_amadeus','id_boleto_amadeus','int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "98c0857c90fec1f5c216e87609a3da2e", "score": "0.53016096", "text": "function actualiza_estado_de_reglas(){ \n\t//para saber cuantas reglas hay\n\t$numero_de_reglas = \"SELECT count(*) FROM regla_basica\";\n\t$query=mysql_query($numero_de_reglas);\n\twhile($rs=mysql_fetch_array($query,MYSQL_BOTH)){\n\t \t$id_regla_max = $rs['count(*)'];\n\t}//while\n \n\t\n\techo \"<br>\";\n\techo $id_regla_max;\n\techo \"<br>\";\n\t\n\t\n\tfor ($i = 0; $i < $id_regla_max; $i++)\n\t{\t\t\n\t\t//datos de la regla\n\t\t$regla = \"SELECT id_regla_basica, sensor_temperatura_humedad_id_sensor_temperatura_humedad, usuario_id_usuario, nombre_regla, sensor, simbolo, dato, estado FROM regla_basica WHERE id_regla_basica = '$i'\"; \n\t\t$sentencia=mysql_query($regla);\n\t\twhile($rs=mysql_fetch_array($sentencia,MYSQL_BOTH)){\n\t\t\t$id_regla_basica = $rs['id_regla_basica'];\n\t\t\t$sensor_temperatura_humedad_id_sensor_temperatura_humedad = $rs['sensor_temperatura_humedad_id_sensor_temperatura_humedad'];\n\t\t\t$usuario_id_usuario = $rs['usuario_id_usuario'];\n\t\t\t$nombre_regla = $rs['nombre_regla']; \n\t\t\t$sensor = $rs['sensor'];\n\t\t\t$simbolo = $rs['simbolo'];\n\t\t\t$dato = $rs['dato'];\n\t\t\t$estado = $rs['estado'];\n\t\t\t\n\t\t\techo \"<br>\";\n\t\t\techo $id_regla_basica;\n\t\t\techo \"<br>\";\n\t\t\techo $sensor_temperatura_humedad_id_sensor_temperatura_humedad;\n\t\t\techo \"<br>\";\n\t\t\techo $usuario_id_usuario;\n\t\t\techo \"<br>\";\n\t\t\techo $nombre_regla;\n\t\t\techo \"<br>\";\n\t\t\techo $sensor;\n\t\t\techo \"<br>\";\n\t\t\techo $simbolo;\n\t\t\techo \"<br>\";\n\t\t\techo $dato;\n\t\t\techo \"<br>\";\n\t\t\techo $estado;\n\t\t\techo \"<br>\";\n\t\t\t\n\t\t}//while\n\t\t//datos de la regla\n\n\t\t//datos del sensor\n\t\t$datos = \"SELECT id_sensor_temperatura_humedad,temperatura,humedad FROM sensor_temperatura_humedad WHERE id_sensor_temperatura_humedad = (SELECT MAX(id_sensor_temperatura_humedad) FROM sensor_temperatura_humedad)\";\n\t\t$sentencia=mysql_query($datos);\n\t\twhile($rs=mysql_fetch_array($sentencia,MYSQL_BOTH)){\n\t\t\t$id_sensor = $rs['id_sensor_temperatura_humedad'];\n\t\t\t$temperatura = $rs['temperatura'];\n\t\t\t$humedad = $rs['humedad']; \n\t\t}//while\n\t\t//datos del sensor\n\n\t\techo \"comparacion de datos\";\n\t\t\n\t\t//comparacion de datos y actualizacion de estado\n\t\tif($id_sensor == $sensor_temperatura_humedad_id_sensor_temperatura_humedad)\n\t\t{\n\t\t\tif($sensor == \"temperatura\")\n\t\t\t{\n\t\t\t\tif($simbolo == \"<\")\n\t\t\t\t{\n\t\t\t\t\tif($temperatura < $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($simbolo == \">\")\n\t\t\t\t{\n\t\t\t\t\tif($temperatura > $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($simbolo == \"=\")\n\t\t\t\t{\n\t\t\t\t\tif($temperatura == $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t//humedad\n\t\t\tif($sensor == \"humedad\")\n\t\t\t{\n\t\t\t\tif($simbolo == \"<\")\n\t\t\t\t{\n\t\t\t\t\tif($humedad < $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($simbolo == \">\")\n\t\t\t\t{\n\t\t\t\t\tif($humedad > $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($simbolo == \"=\")\n\t\t\t\t{\n\t\t\t\t\tif($humedad == $dato)\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '1' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$sql = \"UPDATE regla_basica SET estado = '0' WHERE id_regla_basica = '$i'\";\n\t\t\t\t\t\tmysql_query($sql);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}//if id_sensor \n\t}//for\n}", "title": "" }, { "docid": "30e792ba49c23ec647d52c560e8ed8f0", "score": "0.52960616", "text": "function llenarPropiedadesControlIngreso($ingresos) {\n require_once 'controlporteria.class.php';\n $controlporteria = new ControlPorteria();\n\n $retorno = array();\n // contamos los registros del array de productos\n $totalreg = (isset($ingresos[0][\"cedula\"]) ? count($ingresos) : 0);\n $i = 0;\n while ($i < $totalreg) {\n $cedulaAnterior = $ingresos[$i][\"cedula\"];\n /* $control = 'INGRESO';\n $fechaIngreso = $ingresos[$i][\"fecha\"];\n $horaIngreso = $ingresos[$i][\"hora\"]; */\n\n while ($i < $totalreg and $cedulaAnterior == $ingresos[$i][\"cedula\"]) {\n\n $fechaAnterior = $ingresos[$i][\"fecha\"];\n $control = 'INGRESO';\n $fechaIngreso = $ingresos[$i][\"fecha\"];\n $horaIngreso = $ingresos[$i][\"hora\"];\n\n while ($i < $totalreg and $cedulaAnterior == $ingresos[$i][\"cedula\"] and $fechaAnterior == $ingresos[$i][\"fecha\"]) {\n\n /* $horaAnterior = $ingresos[$i][\"hora\"];\n $control = 'INGRESO';\n $fechaIngreso = $ingresos[$i][\"fecha\"];\n $horaIngreso = $ingresos[$i][\"hora\"]; */\n\n //while($i < $totalreg and $cedulaAnterior == $ingresos[$i][\"cedula\"] and $fechaAnterior == $ingresos[$i][\"fecha\"] and $horaAnterior == $ingresos[$i]['hora'])\n //{\n //echo $fechaAnterior.' fecha Anterior</br>';\n //echo $horaIngreso .' hora de Ingreso <br/>';\n\n $nuevoserrores = $this->validarControlIngreso($i, $ingresos);\n\n if (!isset($nuevoserrores[0][\"error\"])) {\n\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $controlporteria->ControlPorteria();\n\n $datos = $controlporteria->ConsultarVistaControlPorteria(\"Tercero_idTercero = \" . $ingresos[$i]['Tercero_idTercero'] . \" and\n fechaIngresoControlPorteria = '$fechaIngreso' and\n horaIngresoControlPorteria = '$horaIngreso'\");\n if ($control == 'INGRESO') {\n $controlporteria->Visita_idVisita = 0;\n $controlporteria->Tercero_idTercero = $ingresos[$i]['Tercero_idTercero'];\n $controlporteria->descripcionControlPorteria = 'Importado desde Excel';\n\n $controlporteria->fechaIngresoControlPorteria = $ingresos[$i]['fecha'];\n $controlporteria->horaIngresoControlPorteria = $ingresos[$i]['hora'];\n //echo $i. ' -> '. $control . ' '. $ingresos[$i]['fecha']. ' ' .$ingresos[$i]['hora'].'<br>';\n // adicionamos el registro\n // si existe el registro con fecha de ingreso y hora de ingreso, no lo adicionamos de nuevo\n if (!isset($datos[0][\"Tercero_idTercero\"]) or ( $datos[0][\"Tercero_idTercero\"] == $ingresos[$i]['Tercero_idTercero'] and $datos[0][\"horaIngresoControlPorteria\"] != $ingresos[$i]['hora']))\n $controlporteria->AdicionarControlPorteria();\n\n $control = 'SALIDA';\n }\n else {\n\n //echo $datos[0][\"Tercero_idTercero\"] .' == '. $ingresos[$i]['Tercero_idTercero'] .' and '. $datos[0][\"horaIngresoControlPorteria\"] .' != '. $ingresos[($i-1)]['hora'].' if<br/>';\n\n if ($datos[0][\"Tercero_idTercero\"] == $ingresos[$i]['Tercero_idTercero'] and $datos[0][\"horaIngresoControlPorteria\"] != $ingresos[($i - 1)]['hora']) {\n $consulta = $controlporteria->ConsultarVistaControlPorteria(\"Tercero_idTercero = \" . $ingresos[$i]['Tercero_idTercero'] . \" and\n fechaIngresoControlPorteria = '$fechaIngreso' and\n horaIngresoControlPorteria = '\" . $ingresos[($i - 1)]['hora'] . \"'\");\n\n if (isset($consulta[0][\"idControlPorteria\"]))\n $idControl = $consulta[0][\"idControlPorteria\"];\n else\n $idControl = 0;\n }\n else {\n $idControl = 0;\n }\n //echo $idControl .' id consulta </br>';\n // como la consulta trae los datos llenos, solo reemplazamos los siguientes datos\n $controlporteria->idControlPorteria = ($idControl != 0 ? $consulta[0][\"idControlPorteria\"] : ((isset($datos[0][\"idControlPorteria\"]) ? $datos[0][\"idControlPorteria\"] : 0)));\n $controlporteria->descripcionControlPorteria = 'Importado desde Excel';\n $controlporteria->fechaSalidaControlPorteria = $ingresos[$i]['fecha'];\n $controlporteria->horaSalidaControlPorteria = $ingresos[$i]['hora'];\n //echo $i. ' -> id = '.$controlporteria->idControlPorteria.' -> '. $control . ' '. $ingresos[$i]['fecha']. ' ' .$ingresos[$i]['hora'].'<br>';\n // modificamos el registro\n $controlporteria->ModificarSalidaControlPorteria();\n $control = 'INGRESO';\n }\n } else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n $i++;\n\n //}\n }\n }\n }\n\n return $retorno;\n }", "title": "" }, { "docid": "7f9772674879ead96b2fce9a5658e72c", "score": "0.5295351", "text": "function corrige_examen( $client,$sesskey,$idcandidat,$idfield,$idexamen,$listequestions,$listereponses) {\n\n global $USER;\n\n \t if (!$this->validate_client($client, $sesskey,__FUNCTION__,$idexamen))\n return $this->error(traduction('ws_invalidclient'));\n //on ne v�rifie pas les droits pour une correction anonyme\n\n //listequestions doit �tre l'info envoy�e par get_anonyme cad une chaine 1.1_1.2_ ....\n //listereponses doit �tre un tableau avec des cl�s idetab_id_question_idreponse si coch�e\n // ceci correspond a l'element id envoy� pour chaque r�ponse\n\n //conversion au format attendu par la noteuse\n $tablereponses=array();\n foreach( $listereponses as $id)\n \t\t$tablereponses[$id]=1;\n\n $noteuse = new noteuseALaVolee($listequestions,$tablereponses);\n \t $res = $noteuse->note_etudiant($idcandidat);\n\n \t $ret=array();\n\t\t if ($res->score_global !=-1) { // l'a passe ???\n\n $res->ip_max=$USER->ip; //calcul�e par c2i_params\n $res->ts_date_max=time();\n $res->origine=$res->ip_max.'@webservice'; // rev 978\n /** TODO\n $res->ts_date_min=$date_debut;\n enregistre_resultats($examen->id_examen,$examen->id_etab,$user,$res);\n **/\n\n\t\t\t\t\t//ajouter les notes par referentiel, competences, ou les 2\n\t\t\t\t\t$refs = array ();\n\t\t\t\t\tforeach ($res->tabref_score as $ref => $note) {\n $tmp = new scoreRecord();\n $tmp->setCompetence('D:'.$ref);\n $tmp->setScore($note);\n\n\t\t\t\t\t\t//filtrage ????\n\t\t\t\t\t\t$refs[] = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\t$comps = array ();\n\t\t\t\t\tforeach ($res->tabcomp_score as $comp => $note) {\n\t\t\t\t\t\t $tmp = new scoreRecord();\n $tmp->setCompetence('A:'.$comp);\n $tmp->setScore($note);\n\n\t\t\t\t\t\t//filtrage ????\n\t\t\t\t\t\t$comps[] = $tmp;\n\t\t\t\t\t}\n\n\t\t\t\t\t$questions=array();\n\t\t\t\t\tforeach ($res->tab_points as $question => $note) {\n $tmp = new scoreRecord();\n $tmp->setCompetence('Q:'.$question);\n $tmp->setScore($note);\n\n\t\t\t\t\t\t//filtrage ????\n\t\t\t\t\t\t$questions[] = $tmp;\n\t\t\t\t\t}\n $tmp = new bilanDetailleRecord();\n $tmp->setLogin($idcandidat);\n //$tmp->setNumetudiant($etudiant->numetudiant);\n $tmp->setScore($res->score_global);\n $tmp->setExamen($idexamen);\n $tmp->setIp($res->ip_max);\n $tmp->setOrigine($res->origine);\n $tmp->setDate($res->ts_date_max);\n\t\t\t\t\t$tmp->setDetails(array_merge($refs, $comps,$questions));\n\t\t\t\t\t$ret[] = $tmp;\n\t\t\t\t}else {\n\t\t\t\t\t$ret[]=$this->non_fatal_error(traduction ('ws_erreurcorrectionexamen'));\n\t\t\t\t}\n\t\t\treturn $ret;\n\n\n\n }", "title": "" }, { "docid": "38917de650daf28687eb405dc23d55fc", "score": "0.5293144", "text": "public function recargos($id_membresia=\"\",$editable =\"\"){\n\n $data['modulos'] = $this->Menu_model->modulos();\n\n $data['modulos'] = (array)$data['modulos'];\n\n $data['vistas'] = $this->Menu_model->vistas($this->session-> userdata('id_rol'));\n \n $datos['editable'] = $editable;\n \n $data['modulo_user'] = [];\n foreach ($data['modulos'] as $modulo) {\n foreach ($data['vistas'] as $vista) {\n if((string)$modulo[\"_id\"]->{'$id'} == (string)$vista->id_modulo_vista){\n $data[\"modulo_user\"][] = $modulo[\"_id\"]->{'$id'};\n }\n }\n }\n\n\n $ids = array_unique($data['modulo_user']);\n $data['modulos_enconctrados'] = [];\n foreach ($ids as $value) {\n $data['modulos_enconctrados'][] = $this->Menu_model->modulosbyid($value);\n } \n $oneDim = array();\n foreach($data['modulos_enconctrados'] as $i) {\n $oneDim[] = $i[0];\n }\n \n $data['modulos_vistas'] = $oneDim;\n $this->load->view('cpanel/header');\n $this->load->view('catalogo/Jornadas/recargos',$datos);//$datos\n $this->load->view('cpanel/footer');\n }", "title": "" }, { "docid": "8741fc31fc1edfc130b8e882e3bab927", "score": "0.52866775", "text": "function cl_pensaoretencao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pensaoretencao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d2ead8a346f86224c611f87fa912f867", "score": "0.5280791", "text": "private function getDadosReceita() {\n\n // Busca os dados da receita\n $sSql = \" SELECT r.k00_numcgm, \";\n $sSql .= \" r.k00_dtvenc, \";\n $sSql .= \" r.k00_receit, \";\n $sSql .= \" UPPER(t.k02_descr) AS k02_descr, \";\n $sSql .= \" UPPER(t.k02_drecei) AS k02_drecei, \";\n $sSql .= \" r.k00_dtoper AS k00_dtoper, \";\n $sSql .= \" k00_codsubrec, \";\n $sSql .= \" COALESCE(UPPER(k07_descr),' ') AS k07_descr, \";\n $sSql .= \" SUM(r.k00_valor) AS valor, \";\n $sSql .= \" CASE \";\n $sSql .= \" WHEN taborc.k02_codigo IS NULL \";\n $sSql .= \" THEN tabplan.k02_reduz \";\n $sSql .= \" ELSE \";\n $sSql .= \" taborc.k02_codrec \";\n $sSql .= \" END AS codreduz, \";\n $sSql .= \" k00_hist, \";\n $sSql .= \" (SELECT (SELECT k02_codigo \";\n $sSql .= \" FROM tabrec \";\n $sSql .= \" WHERE k02_recjur = k00_receit \";\n $sSql .= \" OR k02_recmul = k00_receit LIMIT 1 \";\n $sSql .= \" ) IS NOT NULL \";\n $sSql .= \" ) AS codtipo \";\n $sSql .= \" FROM recibo r \";\n $sSql .= \" INNER JOIN tabrec t \t\t ON t.k02_codigo = r.k00_receit \";\n $sSql .= \" INNER JOIN tabrecjm \t\t ON tabrecjm.k02_codjm = t.k02_codjm \";\n $sSql .= \" LEFT OUTER JOIN tabdesc ON codsubrec = k00_codsubrec \";\n $sSql .= \" AND k07_instit = {$this->instituicao->getCodigo()} \";\n $sSql .= \" LEFT OUTER JOIN taborc ON t.k02_codigo = taborc.k02_codigo \";\n $sSql .= \" AND taborc.k02_anousu = {$this->anousu} \";\n $sSql .= \" LEFT OUTER JOIN tabplan ON t.k02_codigo = tabplan.k02_codigo \";\n $sSql .= \" AND tabplan.k02_anousu = {$this->anousu} \";\n $sSql .= \" WHERE r.k00_numpre = {$this->recibo->getNumpreRecibo()} \";\n $sSql .= \" GROUP BY r.k00_dtoper, \";\n $sSql .= \" r.k00_dtvenc, \";\n $sSql .= \" r.k00_receit, \";\n $sSql .= \" t.k02_descr, \";\n $sSql .= \" t.k02_drecei, \";\n $sSql .= \" r.k00_numcgm, \";\n $sSql .= \" k00_codsubrec, \";\n $sSql .= \" k07_descr, \";\n $sSql .= \" codreduz, \";\n $sSql .= \" r.k00_hist \";\n\n $rsDadosPagamento = db_query($sSql);\n if (!$rsDadosPagamento) {\n throw new \\DBException(\"Erro ao consultar dados da receita para geração da GRM\");\n }\n return $rsDadosPagamento;\n }", "title": "" }, { "docid": "7dd7d86f9d2dabd72b6b2aa26793c403", "score": "0.52802014", "text": "function cl_agendaconsultadesanula() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"agendaconsultadesanula\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6b1b34b8fe3a20bb4a228f44086b949d", "score": "0.5279851", "text": "function recuperar_pregunta_secreta($usuario)\r\n\t{\r\n\t\ttry {\r\n\t\t\t$aux = null;\r\n\t\t\t$cripter = toba_encriptador::instancia();\r\n\t\t\t$datos = toba::instancia()->get_pregunta_secreta($usuario);\r\n\t\t\tif (! is_null($datos)) {\r\n\t\t\t\t$cripter = toba_encriptador::instancia();\r\n\t\t\t\t$clave = toba::instalacion()->get_claves_encriptacion(); \r\n\t\t\t\t$aux['pregunta'] = $cripter->desencriptar($datos['pregunta'], $clave['get']);\r\n\t\t\t\t$aux['respuesta'] =$cripter->desencriptar($datos['respuesta'], $clave['get']);\r\n\t\t\t}\r\n\t\t\treturn $aux;\r\n\t\t} catch (toba_error $e) {\r\n\t\t\ttoba::logger()->error('Se intento modificar la clave del usuario:' . $usuario);\r\n\t\t\treturn array();\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "0049bb609b9cb8e69ca8ba32b314e080", "score": "0.5278685", "text": "static function resConsultaFinal($mostrar)\n {\n }", "title": "" }, { "docid": "adf8a86e5381f70fa72ee335371b39ff", "score": "0.52764744", "text": "function getRespuestas($Npreguntas,$Nactual){\n\t\t\t$res=array();\n\t\t\tfor($i=1+$Nactual;$i<=$Npreguntas+$Nactual;$i++){\t\t\t\t\t\t\n\t\t\t\t$res[$i]=$_POST['p'.$i];\t\t\t\t\n\t\t\t}\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "a40614fb874c73837e985e3e181906cd", "score": "0.527388", "text": "function llenarPropiedadesConceptoNominaEmpleado($encabezado) {\n require_once '../clases/conceptonominaempleado.class.php';\n $novedad = new ConceptoNominaEmpleado();\n\n $retorno = array();\n\n // contamos los registros del encabezado\n $totalreg = (isset($encabezado[0][\"Tercero_idEmpleado\"]) ? count($encabezado) : 0);\n\n\n $nuevoserrores = $this->validarConceptoNominaEmpleado($encabezado);\n $totalerr = count($nuevoserrores);\n //'ERRORES '.isset($nuevoserrores[0][\"error\"]).\"<br>\";\n if (!isset($nuevoserrores[0][\"error\"])) {\n $i = 0;\n while ($i < $totalreg) {\n $novedad->Tercero_idEmpleado = $encabezado[$i]['Tercero_idEmpleado'];\n\n $novedad->idConceptoNominaEmpleado = array();\n $novedad->ConceptoNomina_idConceptoNomina = array();\n $novedad->documentoConceptoNominaEmpleado = array();\n $novedad->horasConceptoNominaEmpleado = array();\n $novedad->valorConceptoNominaEmpleado = array();\n $novedad->fechaInicialConceptoNominaEmpleado = array();\n $novedad->numeroPeriodosConceptoNominaEmpleado = array();\n $novedad->observacionConceptoNominaEmpleado = array();\n\n $registroact = 0;\n\n while ($i < $totalreg and\n $novedad->Tercero_idEmpleado == $encabezado[$i]['Tercero_idEmpleado']) {\n\n $novedad->idConceptoNominaEmpleado[$registroact] = 0;\n $novedad->ConceptoNomina_idConceptoNomina[$registroact] = (isset($encabezado[$i]['ConceptoNomina_idConceptoNomina']) ? $encabezado[$i]['ConceptoNomina_idConceptoNomina'] : 0);\n $novedad->documentoConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['documentoConceptoNominaEmpleado']) ? $encabezado[$i]['documentoConceptoNominaEmpleado'] : '');\n $novedad->horasConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['horasConceptoNominaEmpleado']) ? $encabezado[$i]['horasConceptoNominaEmpleado'] : 0);\n $novedad->valorConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['valorConceptoNominaEmpleado']) ? $encabezado[$i]['valorConceptoNominaEmpleado'] : 0);\n $novedad->fechaInicialConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['fechaInicialConceptoNominaEmpleado']) ? $encabezado[$i]['fechaInicialConceptoNominaEmpleado'] : '');\n $novedad->numeroPeriodosConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['numeroPeriodosConceptoNominaEmpleado']) ? $encabezado[$i]['numeroPeriodosConceptoNominaEmpleado'] : 0);\n $novedad->observacionConceptoNominaEmpleado[$registroact] = (isset($encabezado[$i]['observacionConceptoNominaEmpleado']) ? $encabezado[$i]['observacionConceptoNominaEmpleado'] : '');\n\n $i++;\n $registroact++;\n }\n $novedad->AdicionarConceptoNominaEmpleado();\n }\n } else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n // cada que llenamos un documento, lo cargamos a la base de datos\n //print_r($retorno);\n return $retorno;\n }", "title": "" }, { "docid": "a90a045d24108a38408fb44dcf60b6ef", "score": "0.5264222", "text": "public function getResources()\r\n {\r\n // set selected value\r\n $flds=array(\"COL_R_RESC_ID\"=>NULL,\"COL_R_RESC_NAME\"=>NULL,\r\n \"COL_R_ZONE_NAME\"=>NULL,\"COL_R_TYPE_NAME\"=>NULL,\r\n \"COL_R_CLASS_NAME\"=>NULL,\"COL_R_LOC\"=>NULL,\r\n \"COL_R_VAULT_PATH\"=>NULL,\"COL_R_FREE_SPACE\"=>NULL,\r\n \"COL_R_RESC_INFO\"=>NULL,\"COL_R_RESC_COMMENT\"=>NULL, \r\n \"COL_R_CREATE_TIME\"=>NULL, \"COL_R_MODIFY_TIME\"=>NULL);\r\n $select=new RODSGenQueSelFlds(array_keys($flds), array_values($flds)); \r\n $condition=new RODSGenQueConds();\r\n $conn = RODSConnManager::getConn($this->account);\r\n $results= $conn->query($select, $condition); \r\n RODSConnManager::releaseConn($conn);\r\n $result_vals=$results->getValues();\r\n $retval=array();\r\n for ($i=0; $i < $results->getNumRow(); $i++)\r\n { \r\n $retval_row=array();\r\n $retval_row['id']=$result_vals[\"COL_R_RESC_ID\"][$i];\r\n $retval_row['name']=$result_vals[\"COL_R_RESC_NAME\"][$i];\r\n $retval_row['type']=$result_vals[\"COL_R_TYPE_NAME\"][$i];\r\n $retval_row['zone']=$result_vals[\"COL_R_ZONE_NAME\"][$i];\r\n $retval_row['class']=$result_vals[\"COL_R_CLASS_NAME\"][$i];\r\n $retval_row['loc']=$result_vals[\"COL_R_LOC\"][$i];\r\n $retval_row['info']=$result_vals[\"COL_R_RESC_INFO\"][$i];\r\n $retval_row['comment']=$result_vals[\"COL_R_RESC_COMMENT\"][$i];\r\n $retval_row['ctime']=$result_vals[\"COL_R_CREATE_TIME\"][$i];\r\n $retval_row['mtime']=$result_vals[\"COL_R_MODIFY_TIME\"][$i];\r\n $retval_row['vault_path']=$result_vals[\"COL_R_VAULT_PATH\"][$i];\r\n $retval_row['free_space']=$result_vals[\"COL_R_FREE_SPACE\"][$i];\r\n $retval[]=$retval_row;\r\n } \r\n return $retval;\r\n \r\n }", "title": "" }, { "docid": "5f4fdab99267f121f8168bb36d2755c6", "score": "0.5259396", "text": "public function aplicarRebotes(){\n $sql = \"INSERT IGNORE INTO \". TABLE_AGRUPADOR .\"_elemento ( uid_agrupador, uid_modulo, uid_elemento, rebote )\n SELECT agr.uid_agrupador, 1, ae.uid_elemento, aea.uid_agrupador\n FROM \". TABLE_AGRUPADOR .\"_elemento ae\n INNER JOIN \". TABLE_AGRUPADOR .\"_elemento_agrupador aea\n USING (uid_agrupador_elemento)\n INNER JOIN \". TABLE_AGRUPADOR .\"_elemento agr\n ON aea.uid_agrupador = agr.uid_elemento\n WHERE aea.uid_agrupador = \" . $this->getUID() .\"\n AND agr.uid_modulo = 11\";\n\n if( !$this->db->query($sql) ){ echo \"<br>Error al asignar los rebotes!!<br><br>\"; return false; }\n\n $asignados = $this->obtenerAgrupadores();\n\n $moduloEmpleado = util::getModuleId(\"empleado\");\n $moduloMaquina = util::getModuleId(\"maquina\");\n\n $empresasPropiasEmpleado = \"SELECT uid_empresa FROM \". TABLE_EMPLEADO .\"_empresa where uid_empleado = uid_elemento AND papelera = 0\";\n $empresasPropiasMaquina = \"SELECT uid_empresa FROM \". TABLE_MAQUINA .\"_empresa where uid_maquina = uid_elemento AND papelera = 0\";\n\n $empresasVisiblesEmpleado = \"SELECT uid_empresa FROM \". TABLE_EMPLEADO .\"_visibilidad\n where uid_empleado = uid_elemento\n UNION\n SELECT if(startIntList.uid_empresa_inferior IS NULL, v.uid_empresa, startIntList.uid_empresa) FROM \". TABLE_EMPLEADO .\"_visibilidad v\n LEFT JOIN (\n SELECT empresa.uid_empresa, uid_empresa_inferior FROM \". TABLE_EMPRESA .\"_relacion er\n INNER JOIN \". TABLE_EMPRESA.\" ON empresa.uid_empresa = er.uid_empresa_superior where activo_corporacion = 1\n ) as startIntList ON v.uid_empresa = startIntList.uid_empresa_inferior\n where uid_empleado = uid_elemento\n \";\n\n\n $empresasVisiblesMaquina = \"SELECT uid_empresa FROM \". TABLE_MAQUINA .\"_visibilidad\n where uid_maquina = uid_elemento\n UNION\n SELECT if(startIntList.uid_empresa_inferior IS NULL, v.uid_empresa, startIntList.uid_empresa) FROM \". TABLE_MAQUINA .\"_visibilidad v\n LEFT JOIN (\n SELECT empresa.uid_empresa, uid_empresa_inferior FROM \". TABLE_EMPRESA .\"_relacion er\n INNER JOIN \". TABLE_EMPRESA.\" ON empresa.uid_empresa = er.uid_empresa_superior where activo_corporacion = 1\n ) as startIntList ON v.uid_empresa = startIntList.uid_empresa_inferior\n where uid_maquina = uid_elemento\n \";\n\n $visibilidadEmpleado = \" (uid_modulo = $moduloEmpleado AND (a.uid_empresa IN ($empresasVisiblesEmpleado) OR a.uid_empresa IN ($empresasPropiasEmpleado))) \";\n $visibilidadMaquina = \" (uid_modulo = $moduloMaquina AND (a.uid_empresa IN ($empresasVisiblesMaquina) OR a.uid_empresa IN ($empresasPropiasMaquina))) \";\n $others = \" (uid_modulo != $moduloEmpleado AND uid_modulo != $moduloMaquina) \";\n\n $organization = $this->getOrganization();\n $hasBounceAssignToUser = (bool) $organization->obtenerDato('bounce_assign_user');\n\n if ($asignados && count($asignados)) {\n foreach($asignados as $asignado){\n\n // no asignamos los de anclaje\n if ($asignado->esAnclaje()) {\n continue;\n }\n\n $sql = \"INSERT IGNORE INTO \". TABLE_AGRUPADOR .\"_elemento ( uid_agrupador, uid_elemento, uid_modulo, rebote )\n SELECT \".$asignado->getUID().\", uid_elemento, uid_modulo, \". $this->getUID() .\"\n FROM \". TABLE_AGRUPADOR .\"_elemento ae\n INNER JOIN \". TABLE_AGRUPADOR .\" a using(uid_agrupador)\n WHERE uid_agrupador = \". $this->getUID() .\"\n AND ( ( uid_modulo = 11 && uid_elemento != \".$asignado->getUID().\" ) OR ( uid_modulo != 11 ) )\n AND ( $visibilidadEmpleado OR $visibilidadMaquina OR $others )\n \";\n\n if ($hasBounceAssignToUser) {\n $sql .= \" AND uid_modulo != 16\";\n }\n if( !$this->db->query($sql) ){ echo \"<br>Error al asignar los rebotes #2!!<br><br>\"; return false; }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "058a4a68db9c920886cd686d9a441d97", "score": "0.52486426", "text": "function cl_issarqsimples() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issarqsimples\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "7ae40be5730306760fae6d536ed204ec", "score": "0.5247535", "text": "public function relatorioAction() { \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n\t\t$paramsRel = array();\r\n\r\n\t\t$paramsRel['_no_sistema'] \t = 'gerador-relatorio';\r\n $paramsRel['_no_pasta_zend'] = 'gerador-relatorio';\r\n\t\t$paramsRel['sistema'] \t\t = 'Gerador de Relatório';\r\n\t\t$paramsRel['usuario'] \t\t = $params['cd_usuario'];\r\n\t\t$paramsRel['titulo'] \t\t = $params['titulo'];\r\n \r\n //Zend_Debug::dump($params);\r\n \r\n // Se possuir parâmetros\r\n if(isset($params['ds_complemento'])) {\r\n \r\n $i=0;\r\n $andOr = false;\r\n \r\n foreach ($params['ds_complemento'] as $ds_complemento) {\r\n\r\n $abre_par = $params['abre_par'][$i];\r\n $cd_cond_col = $params['cd_cond_col'][$i];\r\n $sg_tabela = $params['sg_tabela'][$i];\r\n $cd_coluna = $params['cd_coluna'][$i];\r\n $lig_int_par = $params['lig_int_par'][$i];\r\n $fecha_par = $params['fecha_par'][$i];\r\n $lig_ext_par = $params['lig_ext_par'][$i];\r\n $no_tp_filtro = $params['no_tp_filtro'][$i];\r\n $tp_coluna = strtolower($params['tp_coluna'][$i]);\r\n \r\n $valorParameter = trim($abre_par) . \" \";\r\n \r\n if (trim($ds_complemento) !== \"\"){\r\n \r\n if(trim(strtoupper($no_tp_filtro)) == \"IS\" || trim(strtoupper($no_tp_filtro)) == \"IS NOT\") {\r\n $valorParameter .= $sg_tabela . '.' . $cd_coluna . ' ' . $no_tp_filtro . ' ' . trim($ds_complemento);\r\n \r\n } else if ($tp_coluna == 'd' || $tp_coluna == 'date' || $tp_coluna == 'datetime' || $tp_coluna == 'smalldatetime' || $tp_coluna == 'timestamp') {\r\n if(trim(strtoupper($no_tp_filtro)) == \"BETWEEN\") {\r\n\t\t\t\t\t\t\t$matches = null;\r\n\t\t\t\t\t\t\tpreg_match_all('/\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}\\:\\d{2}/', substr($ds_complemento, 0, 16), $matches);\r\n\t\t\t\t\t\t\tif(count($matches[0]) == 2) {\r\n\t\t\t\t\t\t\t\t$valorParameter .= 'TO_DATE(TO_CHAR('.$sg_tabela . \".\" . $cd_coluna . \", 'DD/MM/YYYY HH24:MI'), 'DD/MM/YYYY HH24:MI') \" . $no_tp_filtro . \" TO_DATE('\" . trim($matches[0][0]) . \"', 'DD/MM/YYYY HH24:MI') AND TO_DATE('\" . trim($matches[0][1]) . \"', 'DD/MM/YYYY HH24:MI')\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tpreg_match_all('/\\d{2}\\/\\d{2}\\/\\d{4}/', $ds_complemento, $matches);\r\n\t\t\t\t\t\t\t\tif(count($matches[0]) == 2) {\r\n\t\t\t\t\t\t\t\t\t$valorParameter .= 'TO_DATE(TO_CHAR('.$sg_tabela . \".\" . $cd_coluna . \", 'DD/MM/YYYY'), 'DD/MM/YYYY') \" . $no_tp_filtro . \" TO_DATE('\" . trim($matches[0][0]) . \"', 'DD/MM/YYYY') AND TO_DATE('\" . trim($matches[0][1]) . \"', 'DD/MM/YYYY')\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n } else {\r\n\t\t\t\t\t\t\t$matches = null;\r\n\t\t\t\t\t\t\tpreg_match_all('/\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}\\:\\d{2}/', substr($ds_complemento, 0, 16), $matches);\r\n\t\t\t\t\t\t\tif(isset($matches[0][0]) && $matches[0][0] != \"\" && strlen($matches[0][0]) == 16) {\r\n\t\t\t\t\t\t\t\t$valorParameter .= 'TO_DATE(TO_CHAR('.$sg_tabela . \".\" . $cd_coluna . \", 'DD/MM/YYYY HH24:MI'), 'DD/MM/YYYY HH24:MI') \" . $no_tp_filtro . \" TO_DATE('\" . trim($ds_complemento) . \"', 'DD/MM/YYYY HH24:MI')\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$valorParameter .= 'TO_DATE(TO_CHAR('.$sg_tabela . \".\" . $cd_coluna . \", 'DD/MM/YYYY'), 'DD/MM/YYYY') \" . $no_tp_filtro . \" TO_DATE('\" . trim($ds_complemento) . \"', 'DD/MM/YYYY')\";\r\n\t\t\t\t\t\t\t}\r\n }\r\n \r\n } else if(strtolower($tp_coluna) == 'c' || strtolower($tp_coluna) == 'text' || strtolower($tp_coluna) == 'char' || strtolower($tp_coluna) == 'varchar') {\r\n // Se for entre aspas e o filtro for igual, muda para like\r\n if($no_tp_filtro == \"=\") {\r\n $no_tp_filtro = \"LIKE\";\r\n } else if($no_tp_filtro == \"<>\") {\r\n $no_tp_filtro = \"NOT LIKE\";\r\n }\r\n\r\n // Converte asterisco por porcento\r\n $ds_complemento = str_replace(\"*\", \"%\", $ds_complemento);\r\n\r\n $valorParameter .= $sg_tabela . '.' . $cd_coluna . ' ' . $no_tp_filtro . \" '\" . trim($ds_complemento) . \"'\";\r\n \r\n } else {\r\n $valorParameter .= $sg_tabela . '.' . $cd_coluna . ' ' . $no_tp_filtro . ' ' . trim($ds_complemento);\r\n }\r\n \r\n }else{\r\n $valorParameter .= '1=1';\r\n }\r\n\r\n $valorParameter .= \" \" . trim($lig_int_par) . \" \" . trim($fecha_par) . \" \" . trim($lig_ext_par);\r\n \r\n if($andOr === false) {\r\n $valorParameter = \" AND \" . $valorParameter;\r\n }\r\n\r\n if(trim($lig_int_par) != \"\" || trim($lig_ext_par) != \"\") {\r\n $andOr = true;\r\n } else {\r\n $andOr = false;\r\n }\r\n \r\n $indice = strtolower($cd_coluna) . \"_\" . $cd_cond_col;\r\n $paramsRel[$indice] = $valorParameter;\r\n \r\n $i++;\r\n }\r\n }\r\n\r\n //Zend_Debug::dump($paramsRel); die;\r\n \r\n\t\t$v1 = array(\"(\", \")\", \"'\", \"\\\"\", \"/\", \"\\\\\");\r\n\t\t$v2 = array(\"__par1__\", \"__par2__\", \"__apos__\", \"__aspas__\", \"__barra__\", \"__cbarra__\");\r\n\t\tforeach($paramsRel as $indice => $valor) {\r\n\t\t\t$paramsRel[$indice] = str_replace($v1, $v2, $valor);\r\n\t\t}\r\n\r\n\t\t// Chama o método relatório da classe pai\r\n\t\t$this->_helper->GeraRelatorioJasper->gerar('Rel' . $params['cd_consulta'], $paramsRel, $params['_rel_metodo']);\r\n }", "title": "" }, { "docid": "13c5e8717c0372fcadb963f63377c22e", "score": "0.5247318", "text": "function llenarPropiedadesListaPrecio($encabezado, $detalle, $componente, $tercerolista) {\n require_once 'listaprecio.class.php';\n $listaprecio = new ListaPrecio();\n // para cada registro, ejecutamos el constructor de la clase para que inicialice todas las variables y arrys\n $listaprecio->ListaPrecio();\n /* $idListaPrecio = $listaprecio->ConsultarIdListaPrecio(\"codigoAlternoListaPrecio = '\" . $encabezado[0][\"codigoAlternoListaPrecio\"] . \"'\n and nombreListaPrecio ='\" . $encabezado[0][\"nombreListaPrecio\"] . \"'\"); */\n sort($tercerolista);\n //print_r($detalle);\n $retorno = array();\n $nuevoserrores = array();\n // contamos los registros del encabezado\n //print_r($encabezado);\n $totalreg = (isset($encabezado[0][\"codigoAlternoListaPrecio\"]) ? count($encabezado) : 0);\n $totalter = (isset($tercerolista[0][\"EANTerceroLP\"]) ? count($tercerolista) : 0);\n $nuevoserrores = $this->validarListaPrecio($encabezado, $detalle, $tercerolista);\n for ($i = 0; $i < $totalreg; $i++) {\n $totaldet = (isset($detalle[0][\"codigoAlternoListaPrecio\"]) ? count($detalle) : 0);\n //'ERRORES '.isset($nuevoserrores[0][\"error\"]).\"<br>\";\n if (!isset($nuevoserrores[0][\"error\"])) {\n $listaprecio->codigoAlternoListaPrecio = (isset($encabezado[$i][\"codigoAlternoListaPrecio\"]) ? $encabezado[$i][\"codigoAlternoListaPrecio\"] : '');\n $listaprecio->nombreListaPrecio = (isset($encabezado[$i][\"nombreListaPrecio\"]) ? $encabezado[$i][\"nombreListaPrecio\"] : '');\n $listaprecio->redondeoListaPrecio = (isset($encabezado[$i][\"redondeoListaPrecio\"]) ? $encabezado[$i][\"redondeoListaPrecio\"] : 0);\n $listaprecio->fechaInicialListaPrecio = (isset($encabezado[$i][\"fechaInicialListaPrecio\"]) ? $encabezado[$i][\"fechaInicialListaPrecio\"] : '');\n $listaprecio->horaInicialListaPrecio = (isset($encabezado[$i][\"horaInicialListaPrecio\"]) ? $encabezado[$i][\"horaInicialListaPrecio\"] : '');\n $listaprecio->fechaFinalListaPrecio = (isset($encabezado[$i][\"fechaFinalListaPrecio\"]) ? $encabezado[$i][\"fechaFinalListaPrecio\"] : '');\n $listaprecio->horaFinalListaPrecio = (isset($encabezado[$i][\"horaFinalListaPrecio\"]) ? $encabezado[$i][\"horaFinalListaPrecio\"] : '');\n $listaprecio->Moneda_idMoneda = (isset($encabezado[$i][\"Moneda_idMoneda\"]) ? $encabezado[$i][\"Moneda_idMoneda\"] : 0);\n $listaprecio->ListaPrecio_idBasadoenListaPrecio = (isset($encabezado[$i][\"ListaPrecio_idBasadoenListaPrecio\"]) ? $encabezado[$i][\"ListaPrecio_idBasadoenListaPrecio\"] : 0);\n $listaprecio->redondeoListaPrecio = (isset($encabezado[$i][\"redondeoListaPrecio\"]) ? $encabezado[$i][\"redondeoListaPrecio\"] : '');\n $listaprecio->ComponenteCosto_idComponenteCosto = (isset($encabezado[$i][\"ComponenteCosto_idComponenteCosto\"]) ? $encabezado[$i][\"ComponenteCosto_idComponenteCosto\"] : 0);\n $listaprecio->modificarPrecioProductoListaPrecio = ((isset($encabezado[$i][\"modificarPrecioProductoListaPrecio\"]) && $encabezado[$i][\"modificarPrecioProductoListaPrecio\"] == 'X') ? 1 : 0);\n $listaprecio->ivaIncluidoProductoListaPrecio = ((isset($encabezado[$i][\"ivaIncluidoProductoListaPrecio\"]) && $encabezado[$i][\"ivaIncluidoProductoListaPrecio\"] == 'X') ? 1 : 0);\n\n // por cada registro del encabezado, recorremos el detalle para obtener solo los datos del mismo numero de movimiento del encabezado, con estos\n // llenamos arrays por cada campo\n $ter = 0;\n // llevamos un contador de registros por cada producto del detalle\n $registroact = 0;\n $registroter = 0;\n $registroprod = 0;\n\n for ($j = 0; $j < $totaldet; $j++) {\n $totalcompo = (isset($componente[$j][\"codigoAlternoComponenteCosto\"]) ? count($componente[$j][\"codigoAlternoComponenteCosto\"]) : 0);\n if ($encabezado[$i][\"ComponenteCosto_idComponenteCosto\"] > 0) {\n require_once '../clases/componentecosto.class.php';\n $componentecosto = new ComponenteCosto();\n $formula = $componentecosto->ConsultarVistaComponenteCosto(\"idComponenteCosto = \" . $encabezado[$i][\"ComponenteCosto_idComponenteCosto\"], \"\", \"formulaComponenteCosto\");\n //print_r($formula);\n $formulaComponente = $formula[0][\"formulaComponenteCosto\"];\n $formulaComponente = str_replace(\"Base\", ($detalle[$j][\"valorBaseListaPrecioDetalle\"] != 0 ? $detalle[$j][\"valorBaseListaPrecioDetalle\"] : 0), $formulaComponente);\n $formulaComponente = str_replace(\"Margen\", ($detalle[$j][\"margenListaPrecioDetalle\"] != 0 ? $detalle[$j][\"margenListaPrecioDetalle\"] : 0), $formulaComponente);\n $formulaComponente = str_replace(\"Descuento\", ($detalle[$j][\"descuentoListaPrecioDetalle\"] != 0 ? $detalle[$j][\"descuentoListaPrecioDetalle\"] : 0), $formulaComponente);\n for ($k = 1; $k < $totalcompo; $k++) {\n $formulaComponente = str_replace($componente[$j][\"codigoAlternoComponenteCosto\"][$k], ($componente[$j][\"valorListaPrecioComponenteCosto\"][$k] != 0 ? $componente[$j][\"valorListaPrecioComponenteCosto\"][$k] : 0), $formulaComponente);\n }\n $valor = '$resultadoprecioLista = ' . $formulaComponente . ';';\n\n eval($valor);\n } else if ($detalle[$j][\"precioListaPrecioDetalle\"] == '') {\n $preci = ($detalle[$j][\"valorBaseListaPrecioDetalle\"] * (1 + ((isset($detalle[$j][\"margenListaPrecioDetalle\"]) ? $detalle[$j][\"margenListaPrecioDetalle\"] : 0)) / 100));\n $des = $preci * ((isset($detalle[$j][\"descuentoListaPrecioDetalle\"]) ? $detalle[$j][\"descuentoListaPrecioDetalle\"] : 0)) / 100;\n $precio = $preci - $des;\n } else {\n $precio = $detalle[$j][\"precioListaPrecioDetalle\"];\n }\n if (isset($encabezado[$i][\"codigoAlternoListaPrecio\"]) and isset($detalle[$j][\"codigoAlternoListaPrecio\"]) and $encabezado[$i][\"codigoAlternoListaPrecio\"] == $detalle[$j][\"codigoAlternoListaPrecio\"]) {\n $listaprecio->idListaPrecioDetalle[$registroprod] = 0;\n $listaprecio->Producto_idProducto[$registroprod] = (isset($detalle[$j][\"Producto_idProducto\"]) ? $detalle[$j][\"Producto_idProducto\"] : 0);\n $listaprecio->valorBaseListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"valorBaseListaPrecioDetalle\"]) ? number_format($detalle[$j][\"valorBaseListaPrecioDetalle\"], $listaprecio->redondeoListaPrecio, \".\", \"\") : 0);\n $listaprecio->margenListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"margenListaPrecioDetalle\"]) ? number_format($detalle[$j][\"margenListaPrecioDetalle\"], $listaprecio->redondeoListaPrecio, \".\", \"\") : 0);\n $listaprecio->precioListaPrecioDetalle[$registroprod] = ((isset($resultadoprecioLista) && $resultadoprecioLista != '') ? number_format($resultadoprecioLista, $listaprecio->redondeoListaPrecio, \".\", \"\") : (isset($precio) ? number_format($precio, $listaprecio->redondeoListaPrecio, \".\", \"\") : 0));\n $listaprecio->descuentoListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"descuentoListaPrecioDetalle\"]) ? number_format($detalle[$j][\"descuentoListaPrecioDetalle\"], $listaprecio->redondeoListaPrecio, \".\", \"\") : 0);\n $listaprecio->descuentoMaxListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"descuentoMaxListaPrecioDetalle\"]) ? number_format($detalle[$j][\"descuentoMaxListaPrecioDetalle\"], $listaprecio->redondeoListaPrecio, \".\", \"\") : 0);\n $listaprecio->valorDescuentoMaxListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"valorDescuentoMaxListaPrecioDetalle\"]) ? number_format($detalle[$j][\"valorDescuentoMaxListaPrecioDetalle\"], $listaprecio->redondeoListaPrecio, \".\", \"\") : 0);\n $listaprecio->dineroListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"dineroListaPrecioDetalle\"]) ? $detalle[$j][\"dineroListaPrecioDetalle\"] : 0);\n $listaprecio->puntosListaPrecioDetalle[$registroprod] = (isset($detalle[$j][\"puntosListaPrecioDetalle\"]) ? $detalle[$j][\"puntosListaPrecioDetalle\"] : 0);\n $listaprecio->Bodega_idBodega[$registroprod] = (isset($detalle[$j][\"Bodega_idBodega\"]) ? $detalle[$j][\"Bodega_idBodega\"] : 0);\n $listaprecio->estadoListaPrecioDetalle[$registroprod] = (isset($encabezado[$i][\"estadoListaPrecioDetalle\"]) ? $encabezado[$i][\"estadoListaPrecioDetalle\"] : '');\n\n for ($k = 0; $k < $totalcompo; $k++) {\n // campos dinamicos de componentes del costo\n $listaprecio->idListaPrecioComponenteCosto[$registroact][$k] = (isset($componente[$j][\"idListaPrecioComponenteCosto\"][$k]) ? $componente[$j][\"idListaPrecioComponenteCosto\"][$k] : 0);\n $listaprecio->ComponenteCostoDetalle_idComponenteCostoDetalle[$registroact][$k] = (isset($componente[$j][\"ComponenteCostoDetalle_idComponenteCostoDetalle\"][$k]) ? $componente[$j][\"ComponenteCostoDetalle_idComponenteCostoDetalle\"][$k] : 0);\n $listaprecio->valorListaPrecioComponenteCosto[$registroact][$k] = (isset($componente[$j][\"valorListaPrecioComponenteCosto\"][$k]) ? $componente[$j][\"valorListaPrecioComponenteCosto\"][$k] : 0);\n }\n for ($t = 0; $t < $totalter; $t++) {\n $listaprecio->idListaPrecioTercero[$registroter] = 0;\n $listaprecio->Tercero_idTercero[$registroter] = (isset($tercerolista[$t][\"Tercero_idTercero\"]) ? $tercerolista[$t][\"Tercero_idTercero\"] : 0);\n }\n $registroact++;\n $registroprod++;\n }\n }\n //print_r($encabezado);\n // buscamos si ya existe la lista de precios con el mismo numero y la reemplazamos con la nueva\n $listaprecio->ConsultarIdListaPrecio(\"codigoAlternoListaPrecio = '\" . $encabezado[0][\"codigoAlternoListaPrecio\"] . \"' and nombreListaPrecio ='\" . $encabezado[0][\"nombreListaPrecio\"] . \"'\");\n if ($listaprecio->idListaPrecio != 0) {\n if (strtoupper($encabezado[0][\"actualizar\"]) == \"REEMPLAZAR\") {\n $listaprecio->ModificarListaPrecio('1');\n } else if (strtoupper($encabezado[0][\"actualizar\"]) == \"ACTUALIZAR\"){\n $listaprecio->ActualizarListaPrecioDetalle($detalle);\n } else if (strtoupper($encabezado[0][\"actualizar\"]) == \"MODIFICAR\"){\n $listaprecio->ModificarListaPrecioDetalle($detalle);\n }\n } else\n $listaprecio->AdicionarListaPrecio();\n }\n else {\n $retorno = array_merge((array) $retorno, (array) $nuevoserrores);\n }\n }\n //print_r($retorno);\n return $retorno;\n }", "title": "" }, { "docid": "ec798a2ebd55c6bd1b090d42ce62ad1d", "score": "0.52458346", "text": "function listarMonitores() {\n global $monitores;\n $monitores = findMonitores();\n}", "title": "" } ]
fa5833e396d87549729ccaf2fa46af08
Parse value as boolean Yes/No
[ { "docid": "92abcc867b66a117e14e0d154c5e7c18", "score": "0.0", "text": "public static function yesNo($value, $yes = 'Yes', $no = 'No')\n {\n if ($value === null || $value === '') {\n return $value;\n }\n\n if ($value == 1) {\n return $yes;\n }\n\n return $no;\n }", "title": "" } ]
[ { "docid": "76e39ff39e4a6942536cacfc8f07d103", "score": "0.73390555", "text": "public static function parseToBoolean($value)\n {\n if (strtoupper($value) === 'YES' || $value === '1') {\n return true;\n } elseif (strtoupper($value) === 'NO' || $value === '0' || $value === '') {\n return false;\n } else {\n throw new BadRequestHttpException('Cant parse that string to boolean '.$value);\n }\n }", "title": "" }, { "docid": "f80eef5e3c4f0198cbec1795a8bc7380", "score": "0.72716457", "text": "function str_to_bool( $value ) {\n\t\tif ( $value == 'yes' || $value == 'true' || $value === true )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ca1edeb548def3d495f70ba9b69fee9b", "score": "0.7158754", "text": "protected function strtobool($value)\n {\n $val = strtolower($value);\n\n if ($val == 'yes' || $val == 'true' || $val == 'on' || $val == '1' || $val == 1)\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "018708b71545a5f5ad31cf7ba0b8b5d7", "score": "0.70852065", "text": "function awp_to_boolean($value)\r\n{\r\n if (is_string($value)) {\r\n switch (strtolower($value)) {\r\n case '+':\r\n case '1':\r\n case 'y':\r\n case 'on':\r\n case 'yes':\r\n case 'true':\r\n case 'enabled':\r\n return true;\r\n\r\n case '-':\r\n case '0':\r\n case 'n':\r\n case 'no':\r\n case 'off':\r\n case 'false':\r\n case 'disabled':\r\n return false;\r\n }\r\n }\r\n\r\n return (boolean) $value;\r\n}", "title": "" }, { "docid": "0ad922492fbb17e51f0a12b7dde0a01e", "score": "0.7000761", "text": "function parseBoolFromSql($value){\n\t\tif(is_null($value)){return null; }\n\t\tif(is_numeric($value)){\n\t\t\treturn (bool)$value;\n\t\t}\n\t\treturn in_array(strtolower($value),array(\"t\",\"true\",\"y\"));\n\t}", "title": "" }, { "docid": "2fc51730c5ab358a7174aab04499aeec", "score": "0.69769955", "text": "public static function parseBoolean($val) {\n return filter_var($val, FILTER_VALIDATE_BOOLEAN);\n }", "title": "" }, { "docid": "0f76d0cf071b38a518999aec3c100f9d", "score": "0.69302225", "text": "private function parseBool($value)\n {\n $value = strtolower($value);\n\n return $value === \"true\" || $value === \"yes\";\n }", "title": "" }, { "docid": "cbbe359791840f8585610f4ae65a1c1c", "score": "0.69083226", "text": "protected function parseBoolean($value)\n {\n return $value === true || $value === '1' || $value === 'true';\n }", "title": "" }, { "docid": "2b54a04bd598e46961309f59923d4e96", "score": "0.66865623", "text": "public function toBoolean(): bool\n {\n $key = $this->toLowerCase()->str;\n $map = [\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\n '0' => false,\n 'off' => false,\n 'no' => false,\n ];\n\n if (\\array_key_exists($key, $map)) {\n return $map[$key];\n }\n\n if (\\is_numeric($this->str)) {\n return ((int)$this->str > 0);\n }\n\n return (bool)$this->regexReplace('[[:space:]]', '')->str;\n }", "title": "" }, { "docid": "b926b84a22aee36f84a4e72cfa5267d6", "score": "0.66771495", "text": "private function _get_boolean_value($value) {\n switch (strtolower($value)) {\n\t\t\tcase 'true': case 'yes': case 'on':\n\t\t\t\treturn true;\n\t\t\tcase 'false': case 'no': case 'off':\n\t\t\t\treturn false;\n\t\t}\n \n return false;\n }", "title": "" }, { "docid": "7ab0cc1c4bf47de11cd284df9344540b", "score": "0.66381806", "text": "public function getStringValueAsBoolean($psuedo_boolean);", "title": "" }, { "docid": "68012dac890dacb32fa2e897fc9c2189", "score": "0.6537831", "text": "function to_bool ($_val) {\n $_trueValues = array('yes', 'y', 'true');\n $_forceLowercase = true;\n\n if (is_string($_val)) {\n return (in_array(\n ($_forceLowercase?strtolower($_val):$_val),\n $_trueValues\n ));\n } else {\n return (boolean) $_val;\n }\n}", "title": "" }, { "docid": "f7ed60e5605641cfccfb9bd790fce01e", "score": "0.6504896", "text": "function testParseBooleanAttributesTrue()\n {\n // standard booleans\n $this->assertTrue($this->parser->parseBoolean('on'));\n $this->assertTrue($this->parser->parseBoolean('t'));\n $this->assertTrue($this->parser->parseBoolean('true'));\n $this->assertTrue($this->parser->parseBoolean('y'));\n $this->assertTrue($this->parser->parseBoolean('yes'));\n $this->assertTrue($this->parser->parseBoolean('1'));\n $this->assertTrue($this->parser->parseBoolean('one'));\n\n // HTML forms\n $this->assertTrue($this->parser->parseBoolean('checked'));\n $this->assertTrue($this->parser->parseBoolean('ok'));\n $this->assertTrue($this->parser->parseBoolean('okay'));\n\n // integers != [0, 1]\n $this->assertTrue($this->parser->parseBoolean(2));\n $this->assertTrue($this->parser->parseBoolean(5));\n $this->assertTrue($this->parser->parseBoolean(-30));\n\n // other\n $this->assertTrue($this->parser->parseBoolean('+'));\n }", "title": "" }, { "docid": "bdc3eb7120fe9a736b6b652225ad76c8", "score": "0.6477309", "text": "protected function validateBooleanResponse($value)\n {\n\n $value = trim($value);\n\n switch ($value) {\n case 'true':\n case 'yes':\n case 'y':\n return true;\n break;\n \n default:\n return false;\n break;\n }\n }", "title": "" }, { "docid": "015cbb36574a6ef21efaa398c12d9d16", "score": "0.64337885", "text": "public function toBoolean(): bool\n {\n return \\filter_var($this->getValue(), FILTER_VALIDATE_BOOLEAN);\n }", "title": "" }, { "docid": "7349e7ee1d9daeb6784d724f87b14c0d", "score": "0.6402294", "text": "private function get_bool($value) {\n switch( strtolower($value) ) {\n case 'true':\n return true;\n case 'false':\n return false;\n default:\n return null;\n }\n }", "title": "" }, { "docid": "89d33e1000f893442535afc626a933b7", "score": "0.63796705", "text": "public function slValidateBoolean(\n $value\n ) {\n if (is_array($value)) {\n $value = reset($value);\n }\n if (is_bool($value)) {\n $this->debbug('Value recognized as boolean ' .\n print_r(\n $value,\n 1\n ), 'syncdata');\n return $value;\n }\n\n if ((is_numeric($value) && $value === 0)\n || (is_string($value)\n && in_array(\n Tools::strtolower((string) trim($value)),\n array('false','0','no','nie','nein','nicht','deny','n','non','нет','nej','ne','denied','i','d','x'),\n false\n ))\n ) {\n $this->debbug('Value recognized as false ' .\n print_r(\n $value,\n 1\n ), 'syncdata');\n return false;\n }\n\n if ((is_numeric($value) && $value === 1)\n || (is_string($value)\n && in_array(\n Tools::strtolower((string) trim($value)),\n array('true','1','yes','si','sí','y','s','ja','já','ok','bai','oui',\n 'sì','Да','если','是的','はい','ano','áno','accept','taip','allow','v'),\n false\n ))\n ) {\n $this->debbug('Value recognized as true ' .\n print_r(\n $value,\n 1\n ), 'syncdata');\n return true;\n }\n\n return $value;\n }", "title": "" }, { "docid": "b08c3c4a9139dac6dfdb14cbb21f4781", "score": "0.6350838", "text": "private function parseBoolean( $string ) {\n\t\tif ( $string == \"true\" ) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "03d4557177ed21622b0ddaa92be1423c", "score": "0.63279116", "text": "function getYesOrNo($value)\n{\n if($value == 1)\n {\n return \"Yes\";\n }\n else\n {\n return \"No\";\n }\n}", "title": "" }, { "docid": "2cb8c2fe2ea35ebd42908b77cb3eea78", "score": "0.63161343", "text": "public function asBool(): bool\n {\n switch ($this->getValue()) {\n case '1':\n return true;\n case '':\n return false;\n default:\n throw new RuntimeException(\"{$this->getValue()} not valid bool attribute value\");\n }\n }", "title": "" }, { "docid": "26b20ac4f22a6931ca49419b0f56301a", "score": "0.630874", "text": "function boolean_value($input)\n{\n if (is_bool($input)) {\n return $input;\n }\n\n if ($input === 0) {\n return false;\n }\n\n if ($input === 1) {\n return true;\n }\n\n if (is_string($input)) {\n switch (strtolower($input)) {\n case \"true\":\n case \"on\":\n case \"1\":\n return true;\n break;\n\n case \"false\":\n case \"off\":\n case \"0\":\n return false;\n break;\n }\n }\n return null;\n}", "title": "" }, { "docid": "9671ebea6bef968533d5ac5f017f152c", "score": "0.6274673", "text": "function proton_validate_boolean( $value ) {\n\n\t\treturn wp_validate_boolean( $value ) ? 1 : false;\n\t}", "title": "" }, { "docid": "9dca7256db072684d11d80dbe8f594de", "score": "0.6271377", "text": "function YNBool( $Val ) {\r\n return ( $Val == 'Y' ) ? true : false;\r\n }", "title": "" }, { "docid": "3f6c42cd363b8da27b055a749be1ac0b", "score": "0.62607676", "text": "public function getTrueValue();", "title": "" }, { "docid": "6105b50d21320c5e515d580120fbaf92", "score": "0.62519866", "text": "private static function castBool($value)\n\t\t{\n\t\t\treturn ($value == 'false' || !$value) ? FALSE : TRUE;\n\t\t}", "title": "" }, { "docid": "08261468bd83939735bea915eb03630e", "score": "0.62292147", "text": "public function getBool();", "title": "" }, { "docid": "4d70b48cc5e4427a7dc6095976ec0f6f", "score": "0.62146354", "text": "function java_is_true($value) { return (boolean)(java_values ($value)); }", "title": "" }, { "docid": "30aac387c699a209f2292c96fb23347b", "score": "0.616898", "text": "protected function convert_bool( $value ) {\n\t\tif ( true === boolval( $value ) ) {\n\t\t\treturn 'on';\n\t\t}\n\n\t\tif ( false === boolval( $value ) ) {\n\t\t\treturn 'off';\n\t\t}\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "a8f359a43105126ab6eb2c65288c8831", "score": "0.61659867", "text": "public function getBoolValue()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "a8f359a43105126ab6eb2c65288c8831", "score": "0.61659867", "text": "public function getBoolValue()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "53f594891a24289d93c0a247850d118e", "score": "0.614293", "text": "protected function boolString($value, $yes='Yes', $no = 'No')\n {\n return $value ? $yes : $no;\n }", "title": "" }, { "docid": "cc3b490a0f99551e89acadd485e6d0b4", "score": "0.6127724", "text": "private function getBoolean(string $value, $default) {}", "title": "" }, { "docid": "33afcfc2ca365dfdc9b7a552388ec76e", "score": "0.6105307", "text": "function evf_string_to_bool( $string ) {\n\treturn is_bool( $string ) ? $string : ( 'yes' === $string || 1 === $string || 'true' === $string || '1' === $string );\n}", "title": "" }, { "docid": "7840d0086edcad61ca51b6e878a92978", "score": "0.60870373", "text": "public function checkYesNo($value) {\r\n $result = false;\r\n if($value == 'Y'){\r\n $result = true;\r\n }elseif($value == 'N'){\r\n $result = true;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "c5e175b9463ff96f277677ac55e48eaa", "score": "0.6079791", "text": "public function value(): bool\n {\n if (($val = $this->raw()) === null) {\n return false;\n }\n\n return (new Boolean)->decode($val);\n }", "title": "" }, { "docid": "c8e460dba426481d1c714713ca49fc46", "score": "0.6061456", "text": "public function readBoolean() {\n\t\treturn (bool) $this->readChar();\n\t}", "title": "" }, { "docid": "9b3b76a57cf7320d9458c2c1d16371df", "score": "0.60442495", "text": "public function getBoolValue()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "697bc6a7fa3774f6d15181e9edd9e9bb", "score": "0.6040502", "text": "function wlm_boolean_value($value, $no_match_value = false) {\n\t$value = trim(strtolower($value));\n\tif(in_array($value,array(false, 0, 'false','0','n','no'),true)){\n\t\treturn false;\n\t}\n\tif(in_array($value,array(true, 1, 'true','1','y','yes'),true)){\n\t\treturn true;\n\t}\n\treturn $no_match_value;\n}", "title": "" }, { "docid": "6aba342d8ce90fe130ec5fa0b8bdcbea", "score": "0.60006064", "text": "function is_true($value) {\r\n\treturn (($value === true) || ($value === 1) || ($value === \"1\") || ($value === \"true\"));\r\n}", "title": "" }, { "docid": "940e09ad433cde340c66dee6ac127622", "score": "0.5960684", "text": "static function getYesNo($value) {\n\n if ($value) {\n return __('Yes');\n }\n return __('No');\n }", "title": "" }, { "docid": "4603b1b2249261a17593d287417a073e", "score": "0.59551907", "text": "function isBoolOrString($result){\n if(is_bool($result))return TRUE;\n else return FALSE;\n }", "title": "" }, { "docid": "f728083b4fd0a0dde0a75fbef46dcf80", "score": "0.5930422", "text": "public function getBoolValue()\n {\n return $this->readOneof(5);\n }", "title": "" }, { "docid": "703d6238357e6f22ff3ae343f8ff37da", "score": "0.592268", "text": "function selectBool($query,$bind_ar = array(),$options = array()){\n\t\t$value = $this->selectString($query,$bind_ar,$options);\n\t\tif(!isset($value)){ return null; }\n\t\treturn\n\t\t\tin_array(strtoupper($value),array(\"Y\",\"YES\",\"YUP\",\"T\",\"TRUE\",\"1\",\"ON\",\"E\",\"ENABLE\",\"ENABLED\")) ||\n\t\t\t(is_numeric($value) && $value>0);\n\t}", "title": "" }, { "docid": "0b6a2c917fb3c93b3b4866bd5e4b41a8", "score": "0.5910913", "text": "function _bonsai_field_formatter_view__bonsai_boolean($entity_type, $entity, $field, $instance, $langcode, $items, $display) {\n $element = [];\n\n foreach ($items as $delta => $item) {\n $element[$delta] = array(\n '#markup' => $item['value'] ? 'Yes' : 'No',\n );\n }\n\n return $element;\n}", "title": "" }, { "docid": "95bb520241cb360355749f3ec448263d", "score": "0.590385", "text": "public function testDataPrivateGetBoolFromStringYesNo(): void\n {\n $this->dataPrivateSet('test', 'yes');\n $this->assertTrue($this->dataPrivateGetBool('test'));\n\n $this->dataPrivateSet('test', 'no');\n $this->assertFalse($this->dataPrivateGetBool('test'));\n }", "title": "" }, { "docid": "441348db5bf4c09cab014aa2dde4e7de", "score": "0.5894031", "text": "private static function _isTrue($value){\n\t\treturn in_array($value, array(\"yes\", \"y\", \"1\", TRUE, \"true\", \"TRUE\"));\n\t}", "title": "" }, { "docid": "2a910f9668a79fd3b341b3432ef056c1", "score": "0.58918685", "text": "public static function valueToBool($value)\n {\n if ($value === '1') {\n return true;\n }\n if ($value === '0') {\n return false;\n }\n\n return $value;\n }", "title": "" }, { "docid": "558dc0e499cdf2985e46e481bcb137a4", "score": "0.5891828", "text": "public static function getBoolean($b){\n\t\treturn $b? '1' : '0';\n\t}", "title": "" }, { "docid": "7c940080f393705cffa30ae98e45199d", "score": "0.5871649", "text": "public static function normalizeBool($value)\n {\n return in_array(strtolower((string) $value), [\n 'true',\n '1',\n 'required',\n 'yes',\n self::findAlias('yes'),\n self::findAlias('true')\n ], true);\n }", "title": "" }, { "docid": "c9d1245a06d80aa40a62b75bf9434fd4", "score": "0.5863001", "text": "public function bool()\n {\n return $this->fieldOpen('bool');\n }", "title": "" }, { "docid": "d207f12236c68e4cef29f2a021dcbcf4", "score": "0.5858666", "text": "public static function AsBool($value)\n\t{\n\t\tif(is_bool($value))\n\t\t\treturn $value;\n\t\tif(is_null($value))\n\t\t\treturn false;\n\t\tif(is_string($value))\n\t\t{\n\t\t\t// special case to handle BIT fields in a database\n\t\t\tif(strlen($value) > 0 && $value[0] == chr(1))\n\t\t\t\treturn true;\n\n\t\t\t$s = trim(strtolower($value));\n\t\t\treturn ($s === '1' || $s === 'true' || $s === 'on' || $s === 'yes') ? true : false;\n\t\t}\n\n\t\treturn $value ? true : false;\n\t}", "title": "" }, { "docid": "7cbdd40485c82cb6eb042a8096d4680f", "score": "0.585189", "text": "private function _assertBoolean($value)\n {\n return (boolean)$value;\n }", "title": "" }, { "docid": "8d177528fc8e3166b4081acf15dc4210", "score": "0.584934", "text": "public function bool()\n {\n return $this->markErrorIf(!in_array(strtoupper($this->value), array('TRUE','FALSE')));\n }", "title": "" }, { "docid": "23820fe52693b2e95d6437e0f7789f6c", "score": "0.5833989", "text": "abstract public function toBool(): bool;", "title": "" }, { "docid": "fc15fcf2116fef2055425af1f6f83362", "score": "0.5826293", "text": "public function testDataPrivateSetBoolAsStringYesNo(): void\n {\n $this->dataPrivateSetBool('bool', 'yes');\n $this->assertTrue($this->dataPrivateGet('bool'));\n\n $this->dataPrivateSetBool('bool', 'no');\n $this->assertFalse($this->dataPrivateGet('bool'));\n }", "title": "" }, { "docid": "474dd506e4a3fe352ac0231e4fbb6801", "score": "0.5823928", "text": "final public function retype($value)\n {\n\tif ( is_null($value))\n\t{\n\t return null;\n\t}\n\telseif( is_bool($value) )\n\t{\n\t return $value;\n\t}\n\telse {\n\t if ( preg_match('#^(t|true|y|yes|1)$#i', $value))\n\t {\n\t\treturn true;\n\t }\n\t elseif ( preg_match('#^(f|false|n|no|0)$#i', $value))\n\t {\n\t\treturn false;\n\t }\n\t else {\n\t\t$this->_addError(\"unable to retype value '$value' to boolean\");\n\t }\n\t}\n }", "title": "" }, { "docid": "4a711d5bc60a807445e66e8a5cc4ee26", "score": "0.5783762", "text": "public function transformInput(FieldMetadata $metadata, $value) {\n return $value === 'true' ? true : false;\n }", "title": "" }, { "docid": "a8ca3cfe6bec124657f6df5cc8d69d99", "score": "0.5781462", "text": "protected function boolean($boolean)\n {\n return $this->getFromModel($boolean) ? 'Yes' : 'No';\n }", "title": "" }, { "docid": "ceabaa0dce6836d9860cab32e0dbd2ec", "score": "0.57802296", "text": "public function attribute_is_true( $value ) {\n\t\tif ( ! $value || in_array( $value, array( 'no','false', 'off' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8abe0be01d021e0ba01a817ed19240c0", "score": "0.5771604", "text": "public function valueBool($column) {\n return $this->valueMixed($column, 'bool');\n }", "title": "" }, { "docid": "119550cbd9e9ebddeb3786f8308c99c9", "score": "0.57450616", "text": "public function testBooleanType()\n {\n $expectedValue = false;\n $output = $this->serializer->serialize($expectedValue);\n $actualResult = $this->serializer->unserialize($output);\n\n $this->assertEquals($expectedValue, $actualResult);\n }", "title": "" }, { "docid": "9efd32e9e5e41e222558042e00cafd6b", "score": "0.57071126", "text": "public function convert( $value )\n\t{\n\t\tif ( false === is_bool( $value ) )\n\t\t{\n\t\t\tthrow $this->getInvalidTypeException( $value, ValidTypes::BOOL );\n\t\t}\n\n\t\treturn false === $value\n\t\t\t? '0'\n\t\t\t: '1';\n\t}", "title": "" }, { "docid": "f8483c451a8bc139ea7aef87df322393", "score": "0.5706981", "text": "public static function toBool( $var ) {\n\t\t\tif ( ! is_string( $var ) ) {\n\t\t\t\treturn (bool) $var;\n\t\t\t}\n\n\t\t\tswitch ( strtolower( $var ) ) {\n\t\t\t\tcase '1':\n\t\t\t\tcase 'true':\n\t\t\t\tcase 'on':\n\t\t\t\tcase 'yes':\n\t\t\t\tcase 'y':\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b6284c948a538350f5c4a94fb055e96c", "score": "0.5700437", "text": "public static function aBoolean($value)\n {\n return (is_bool($value))?:false;\n }", "title": "" }, { "docid": "91dc8fefbddfc886f22c9c5c26a2674a", "score": "0.5696491", "text": "function TrueFalse($input){\nif($input == \"TRUE\")\n\t\techo 1;\n\telse\n\t\techo 0;\n}", "title": "" }, { "docid": "418359c67091d1b011c42d9b6c84a160", "score": "0.5695376", "text": "public function getFalseValue();", "title": "" }, { "docid": "1a7cf48295268dbdacc3431b77dcd905", "score": "0.56741357", "text": "function yy_r109(){\n if (preg_match('~^true$~i',$this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = 'true';\n } elseif (preg_match('~^false$~i',$this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = 'false';\n } elseif (preg_match('~^null$~i',$this->yystack[$this->yyidx + 0]->minor)) {\n $this->_retvalue = 'null';\n } else {\n $this->_retvalue = \"'\" . $this->yystack[$this->yyidx + 0]->minor . \"'\";\n }\n }", "title": "" }, { "docid": "5d97e76101150e44318ca667e2b28ffb", "score": "0.5668911", "text": "public static final function bool(): BaseBoolType { return BaseBoolType::value(); }", "title": "" }, { "docid": "fffac99376f491740506afdfdb0b31bb", "score": "0.5663686", "text": "public static function isTrue() {\n\t\treturn self::build(self::COMP_BOOL_TRUE);\n\t}", "title": "" }, { "docid": "51201ed3d3058e302a92eba0e4901905", "score": "0.5648569", "text": "function ini_bool(string $ini): bool{\n $val = ini_get($ini);\n return (preg_match('/^(on|true|yes)$/i', $val) || (int) $val); // boolean values set by php_value are strings\n}", "title": "" }, { "docid": "048457dd5abc9dc20bd13aff38f79482", "score": "0.5642349", "text": "function boolh( bool $bool ) {\n\treturn $bool ? \"Yes\" : \"No\";\n}", "title": "" }, { "docid": "db23ab9d9d362bdd2ea1c40b740002c1", "score": "0.56150776", "text": "public static function getYesNo() {\n return array('0'=>'Нет', '1'=>'Да'); \n }", "title": "" }, { "docid": "eb8ef2530051b448e612b38b37eea85c", "score": "0.56081265", "text": "public function testConvertXmlrpcArgToPhpScalarBoolean() {\n $phpValue = $this->protocol->convertXmlrpcArgToPhp(new Value(TRUE, 'boolean'));\n $this->assertInternalType('boolean', $phpValue);\n $this->assertEquals(TRUE, $phpValue);\n }", "title": "" }, { "docid": "63467f68a80189231e7a27df0c076b8f", "score": "0.5607164", "text": "public static function toBoolean($value, $default = true)\n {\n if (is_null($value)) {\n return $default;\n } elseif (is_string($value)) {\n $trimmedVal = strtolower(trim($value));\n if (\"1\" == $trimmedVal or \"true\" == $trimmedVal or \"yes\" == $trimmedVal or \"on\" == $trimmedVal) {\n return true;\n } elseif (\"\" == $trimmedVal or \"0\" == $trimmedVal or \"false\" == $trimmedVal or \"no\" == $trimmedVal or \"off\" == $trimmedVal) {\n return false;\n }\n } elseif (is_bool($value)) {\n return $value;\n } elseif (is_int($value)) {\n return !($value == 0); // true is everything but 0 like in C\n }\n \n return $default;\n }", "title": "" }, { "docid": "e136c16bb650501388b01d9cbbdb14da", "score": "0.56019485", "text": "public function asBool($string) {\n switch ($string) {\n case 'true': return TRUE;\n case 'false': return FALSE;\n default: throw new IllegalArgumentException('Unrecognized boolean value '.$value);\n }\n }", "title": "" }, { "docid": "ea001fa25e692ceefde3bde3bddfdd1e", "score": "0.55812347", "text": "public function testToBooleanMatch()\n {\n $this->assertTrue(String::toBoolean('true', false));\n $this->assertTrue(String::toBoolean('tRuE', false));\n $this->assertTrue(String::toBoolean('TRUE', false));\n $this->assertFalse(String::toBoolean('false', true));\n $this->assertFalse(String::toBoolean('fAlSe', true));\n $this->assertFalse(String::toBoolean('FALSE', true));\n }", "title": "" }, { "docid": "a4a3212e22a0e0c033aed1ea3a5915bd", "score": "0.55581915", "text": "public function testBooleanFormat()\n {\n Mindy::app()->setComponent('format', new LocalizedFormatter());\n\n $this->assertEquals('Yes', Mindy::app()->format->boolean(true));\n $this->assertEquals('No', Mindy::app()->format->boolean(false));\n\n Mindy::app()->setComponent('format', new LocalizedFormatter());\n Mindy::app()->setLanguage('de');\n\n $this->assertEquals('Ja', Mindy::app()->format->boolean(true));\n $this->assertEquals('Nein', Mindy::app()->format->boolean(false));\n\n Mindy::app()->setComponent('format', new LocalizedFormatter());\n Mindy::app()->setLanguage('en_US');\n\n $this->assertEquals('Yes', Mindy::app()->format->boolean(true));\n $this->assertEquals('No', Mindy::app()->format->boolean(false));\n }", "title": "" }, { "docid": "160b9027f17a1051e0d66be8e53d84b9", "score": "0.5553283", "text": "protected function validBooleanValues()\n {\n return [true, false, 1, 0, '1', '0'];\n }", "title": "" }, { "docid": "4486fc0a4c086b307167307dd9938320", "score": "0.55451", "text": "public static function getBooleanList()\n {\n return $boolean = [\n BaseData::NUMBER_ONE_TRUE => 'Ja',\n BaseData::NUMBER_ZERO_FALSE => 'Nein',\n ];\n }", "title": "" }, { "docid": "b57346b56f48bf0d8448299894a0adad", "score": "0.5538979", "text": "function evf_bool_to_string( $bool ) {\n\tif ( ! is_bool( $bool ) ) {\n\t\t$bool = evf_string_to_bool( $bool );\n\t}\n\treturn true === $bool ? 'yes' : 'no';\n}", "title": "" }, { "docid": "6f8a40cc78a6d915ea07b7a305e6bdcc", "score": "0.5530035", "text": "private function ini_get_bool($a)\n {\n $b = ini_get($a);\n\n switch (strtolower($b))\n {\n case 'on':\n case 'yes':\n case 'true':\n return 'assert.active' !== $a;\n\n case 'stdout':\n case 'stderr':\n return 'display_errors' === $a;\n\n default:\n return (bool) (int) $b;\n }\n }", "title": "" }, { "docid": "346cae29d0698814c39c6ab69d2e9022", "score": "0.55299324", "text": "public function convertToBool( $mixed ) {\r\n \r\n $boolean_strings=array('1','0','on','off','true','false','yes','no');\r\n if ( !is_array($mixed)) {\r\n \r\n return filter_var($mixed, FILTER_VALIDATE_BOOLEAN);\r\n }else {\r\n \r\n foreach ( $mixed as $key=>$value ) {\r\n if ( is_array($value)) {\r\n $mixed[$key]=$this->convertToBool($value);\r\n }else {\r\n if ( in_array(trim((string)$mixed[$key]),$boolean_strings)) {\r\n $mixed[$key]=filter_var($mixed[$key], FILTER_VALIDATE_BOOLEAN); \r\n }\r\n\r\n \r\n \r\n }\r\n }\r\n\r\n \r\n }\r\n return $mixed;\r\n }", "title": "" }, { "docid": "3eecb94bb47671bba874cd25bf217011", "score": "0.55270654", "text": "function getBooleanField1() {\n return $this->getFieldValue('boolean_field_1');\n }", "title": "" }, { "docid": "047f12cec4fcbea6d5905230e68e497a", "score": "0.55251604", "text": "public function bool(string $key): bool\n {\n $value = $this->getInputSource()->get($key);\n\n if(in_array($value, ['1', 'on', 'yes', 'true', true, 1])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6fa9a8ad2b2b434dba0f7335f45a987c", "score": "0.55169827", "text": "public function toBool(): bool\n\t{\n\t\treturn $this->run()->toBool();\n\t}", "title": "" }, { "docid": "d80c737e9b366f2e5598313a3cff4c98", "score": "0.5502615", "text": "public function testToBooleanDefault()\n {\n $this->assertTrue(String::toBoolean('FOO', true));\n $this->assertFalse(String::toBoolean('BAR', false));\n $this->assertTrue(String::toBoolean('', true));\n $this->assertTrue(String::toBoolean(null, true));\n }", "title": "" }, { "docid": "9faa77113cc70500f65d45f650cdcc42", "score": "0.5495905", "text": "public function hasBoolValue(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "ae7b1be7b5f8a2a80688dec90987d958", "score": "0.54938936", "text": "protected function parseBool(string $value): ?bool\n {\n return filter_var(\n $value,\n FILTER_VALIDATE_BOOLEAN,\n [\n 'flags' => FILTER_NULL_ON_FAILURE,\n 'options' => [\n 'default' => null,\n ],\n ]\n );\n }", "title": "" }, { "docid": "cc62588cdda4ce5324f2126dcc6250a8", "score": "0.54921013", "text": "public function serialize($value): bool\n {\n return (bool) $value;\n }", "title": "" }, { "docid": "f1daed8c66b8cbe6989e55f42908fcf0", "score": "0.54811984", "text": "public function testPhpBoolTrueSerializedToAmf0Bool()\n {\n $data = true;\n $newBody = new Zend_Amf_Value_MessageBody('/1/onResult', null, $data);\n $this->_response->setObjectEncoding(0x00);\n $this->_response->addAmfBody($newBody);\n $this->_response->finalize();\n $testResponse = $this->_response->getResponse();\n\n // Load the expected response.\n $mockResponse = file_get_contents(dirname(__FILE__) . '/Response/mock/boolTrueAmf0Response.bin');\n\n // Check that the response matches the expected serialized value\n $this->assertEquals($mockResponse, $testResponse);\n }", "title": "" }, { "docid": "9e510ad34d3087b2d508f765b7f577f1", "score": "0.54804754", "text": "function BoolYN( $Val ) {\r\n return ( $Val ) ? 'Y' : 'N';\r\n }", "title": "" }, { "docid": "13b4eeb41d7355fe6e91a2cfb213b948", "score": "0.5479878", "text": "public static function parseBooleanEnvSetting($value): ?bool\n {\n if (is_bool($value)) {\n return $value;\n }\n\n if (is_string($value)) {\n $value = strtoupper($value);\n if ($value === '1' || $value === 'TRUE') {\n return true;\n } elseif ($value === '0' || $value === 'FALSE') {\n return false;\n }\n\n return null;\n }\n\n return null;\n }", "title": "" }, { "docid": "2393d2a5398548eec7d5bb3d4d2eb19f", "score": "0.5479175", "text": "protected function toBoolean($value): bool\n {\n return filter_var($value, FILTER_VALIDATE_BOOLEAN);\n }", "title": "" }, { "docid": "3c2cfb6a56bdb426d10ea1283f636f3e", "score": "0.54783344", "text": "static public function is_valid_bool( $value ) {\n switch( strtoupper( $value ) ) :\n case TRUE:\n case FALSE:\n case 1:\n case 0:\n case 'ON':\n case 'OFF':\n case 'YES':\n case 'NO':\n case 'Y':\n case 'N':\n return TRUE;\n break;\n default:\n return FALSE;\n endswitch;\n }", "title": "" }, { "docid": "1fc33cbb87da235baf84298d0a3b2039", "score": "0.54726267", "text": "public static function parseBoolean($value): bool\n {\n $falseValues = [false, 'false', 0, '0', 'no'];\n if (isset($value) && in_array($value, $falseValues, true)) {\n // Without strict=true, in_array(true, $falseValues) is true!\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "3a721852108e5657aaf624c4bd6e8b1a", "score": "0.5470565", "text": "public static function booleanText($text)\n {\n return ($text == 1 || $text == true) ? __('yes') : __('no');\n }", "title": "" }, { "docid": "b2db45baf123cf7ee81c789561411233", "score": "0.54590154", "text": "public function rule_bool($a)\n {\n // We don't use PHP inbuilt test - a bit restrictive\n\n // Changes PHP true/false to 1, 0\n $a = strtolower($a);\n\n $vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');\n\n if (!in_array($a, $vals)) {\n return $this->fail('Must be a boolean value');\n }\n }", "title": "" }, { "docid": "82f6f27045b729f6360a9135476629c2", "score": "0.544864", "text": "function db_boolean($input) {\n\t//accept (boolean)TRUE\n\tif (is_bool($input)) {\n\t\tif ($input) {\n\t\t\treturn \"t\";\n\t\t}\n\t//accept (int)1\n\t} else if (is_integer($input)) {\n\t\tif ($input === 1) {\n\t\t\treturn \"t\";\n\t\t}\n\t//accept strings 1, t, true, True, TRUE, etc.\n\t} else if (is_string($input)) {\n\t\t$input = trim(strtolower($input));\n\t\tif ($input == \"1\" || $input == \"t\" || $input == \"true\") {\n\t\t\treturn \"t\";\n\t\t}\n\t}\n\n\t//everything else is false.\n\treturn \"f\";\n}", "title": "" }, { "docid": "59493133dbdf244554961f520b6905c3", "score": "0.5446687", "text": "public function toBool($bool) {\n return $bool ? 'true' : 'false';\n }", "title": "" }, { "docid": "c9809ed555f1e2220a39679de03c7b05", "score": "0.5443129", "text": "public static function bool(): self\n {\n return self::make('bool');\n }", "title": "" }, { "docid": "cebc1a6bd3a3523a308c4697acbeab83", "score": "0.5439574", "text": "public function bool(): self\n\t{\n\t\treturn $this->tinyint(1);\n\t}", "title": "" } ]
5e74741e8eff9beb408d8d0023ea9811
Checks if import was successful
[ { "docid": "8fc31f704888bd459c5d50e19e4c9f55", "score": "0.0", "text": "public function isOk()\n {\n return $this->getState() == static::STATE_OK;\n }", "title": "" } ]
[ { "docid": "119a63c3b375200cd0a91a193f2912cc", "score": "0.70896155", "text": "public function canImport() {\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "26d32d2e05248b60f84d5b367adc3c6c", "score": "0.6827699", "text": "public function is_imported() {\n\t\t$imported_content_type = $this->get_content_pack()->get_import_instance()->get_imported_content_type();\n\t\treturn isset( $imported_content_type[ $this->get_import_id() ] );\n }", "title": "" }, { "docid": "e43524da89b443bc62455b742e3560ba", "score": "0.6716326", "text": "abstract protected function before_import();", "title": "" }, { "docid": "42472db8463ec623d708979655732e87", "score": "0.670909", "text": "public function do_import() {\n\n\t\t// Check if required plugins are active\n\t\tif ( ! $this->plugins_are_active() ) {\n\t\t\t$this->errors->add( 'kalium_demo_content_import_plugins_not_active', sprintf( 'Required plugins are not active, <strong>%s</strong> cannot be imported.', $this->get_name() ) );\n\t\t}\n\t}", "title": "" }, { "docid": "a813fd40437be8c6d0ed94d9ac380473", "score": "0.6656238", "text": "public function execute() {\n\n\t\tif(empty($this->settings['importUid'])) {\n\t\t\tthrow new \\CabagImport\\Exceptions\\ImportTaskException(\n\t\t\t\t'No import has been selected!',\n\t\t\t\t1411459548\n\t\t\t\t);\n\t\t}\n\n\t\tif(!class_exists('tx_cabagimport_handler')) {\n\t\t\trequire_once \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath('cabag_import') . 'lib/class.tx_cabagimport_handler.php';\n\t\t}\n\n\t\t$importConf = \\Cabag\\CabagImport\\Handler\\ImportHandler::getConf($this->settings['importUid']);\n\n\t\tif (empty($importConf)){\n\t\t\tthrow new \\CabagImport\\Exceptions\\ImportTaskException(\n\t\t\t\t'No import configuration found!',\n\t\t\t\t1411459524\n\t\t\t);\n\t\t}\n\n\t\ttry {\n\t\t\t$cabagImportHandler = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('tx_cabagimport_handler', $importConf);\n\t\t\t$cabagImportHandler->main(false);\n\t\t} catch(Exception $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "2bd6a19adf090cf58aa665f8c4363d6d", "score": "0.65192235", "text": "public function isImported()\n {\n return false;\n }", "title": "" }, { "docid": "fda2ff1bde74edad5553494a5817daf8", "score": "0.65094054", "text": "abstract protected function after_import();", "title": "" }, { "docid": "757bec3a439f2503764fba8534e6a20b", "score": "0.64054", "text": "public function execute()\n {\n // Get database name and import file\n $name = get($this->params, PARAM_DB, null);\n $version = get($this->params, PARAM_VERSION, null);\n\n info(\" Importing database [$name:$version] from [$this->file]...\");\n\n // Verify that import is allowed with given parameters\n if(TRUE !== ($message = $this->verify($name, $version, $this->file))) {\n return error(sprintf(' %s. %s', sprintf(DB_NOT_IMPORTED, 'Database'), $message));\n }\n\n // Get queries\n $queries = DB::instance()->fetch_queries(file($this->file));\n\n if (DB::instance()->exists($name)) {\n info(sprintf(' Database [%s] exists', $name));\n info(\" Importing database [$name:$version] from [$this->file]...SKIPPED\");\n }\n else {\n if(!DB::instance()->create($name)) {\n $message = 'check database credentials';\n return error(sprintf(' %s - %s', sprintf(DB_NOT_IMPORTED, 'Database'), $message));\n }\n info(\" Database schema [$name] created\");\n\n try {\n $count = DB::instance()->source($queries);\n info(sprintf(' Sourced %s queries into [%s]', $count, $name));\n } catch (DBException $e) {\n return error(SQL_NOT_IMPORTED . ' ' . $e);\n }\n DB::instance()->setVersion($version);\n\n info(\" Importing database [$name:$version] from [$this->file]...DONE\");\n }\n\n return true;\n\n }", "title": "" }, { "docid": "0fd4a6033b2af40719284a731ceda219", "score": "0.6405231", "text": "private function setup_import() {\n\t\treturn (bool) $this->get_meta( '_give_payment_import' );\n\t}", "title": "" }, { "docid": "5eb928f8b69dfe604def0b572313cbf1", "score": "0.63636285", "text": "function test_import()\n {\n // so disabled temporary\n\n //$this->assertFalse(class_exists('Ethna_Plugin_Cachemanager'));\n //$this->assertFalse(class_exists('Ethna_Plugin_Cachemanager_Localfile'));\n //Ethna_Plugin::import(\"Cachemanager\", \"Localfile\");\n //$this->assertTrue(class_exists('Ethna_Plugin_Cachemanager'));\n //$this->assertTrue(class_exists('Ethna_Plugin_Cachemanager_Localfile'));\n }", "title": "" }, { "docid": "5d69125853be8cc6d8d878e403219f77", "score": "0.63594484", "text": "protected function postImport() { }", "title": "" }, { "docid": "a1cbaf74131af98e02c6fc6121e6a538", "score": "0.6272719", "text": "function mcs_get_import_status() {\n\n\tif ( FALSE !== get_transient( 'mcs-parsed-files' ) ) {\n\t\t$parsed_files = floatval( get_transient( 'mcs-parsed-files' ) );\n\t\t$total_files = floatval( get_transient( 'mcs-number-of-files' ) );\n\t\tif ( $total_files != 0 ) {\n\t\t\t// prevent duplicate imports\n\t\t\tif ( $parsed_files == 'true' ) {\n\t\t\t\t$parsed_files = 0;\n\t\t\t}\n\t\t\tif ( get_transient( \"mcs-parsing-$parsed_files\" ) != 'true' ) {\n\t\t\t\tmcs_import_files( $parsed_files );\n\t\t\t\t/**\n\t\t\t\t * Update data about imports \n\t\t\t\t */\n\t\t\t\tset_transient( 'mcs-parsed-files', $parsed_files + 1, 60 );\n\t\t\t}\n\t\t\t$progress = $parsed_files / $total_files;\n\t\t\t/* Return progress values */\n\t\t\tif ( $progress == 1 ) {\n\t\t\t\tdie( '-1' );\n\t\t\t}\n\t\t\tdie( $progress );\n\t\t} else {\n\t\t\tdie ( '0' );\n\t\t}\n\t\t\n\t} else {\t\t\n\t\tdie( '-1' );\n\t}\n}", "title": "" }, { "docid": "48d22bf5175aa7c1d96782310159b1ea", "score": "0.6197873", "text": "public function import()\n {}", "title": "" }, { "docid": "d8aff83a80ab04c8a228eaaf5a1063cd", "score": "0.61825025", "text": "public static function maybe_import() {\n\t\tif ( ! isset( $_POST['action'] ) || $_POST['action'] != 'lc_import' )\n\t\t\treturn;\n\n\t\treturn c2c_LastContacted::handle_import();\n\t}", "title": "" }, { "docid": "b8564d33747a851982264f036a96ca2e", "score": "0.6182118", "text": "public function check_post() {\n\t\t\t// Check if import was requested.\n\t\t\tif (\n\t\t\t\tisset( $_REQUEST['action'] ) &&\n\t\t\t\t'import' === sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ) // input var okay.\n\t\t\t) {\n\t\t\t\t// Security check.\n\t\t\t\t$wp_nonce = isset( $_REQUEST['_wpnonceimport'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonceimport'] ) ) : '?'; // input var okay.\n\t\t\t\tif ( ! wp_verify_nonce( $wp_nonce, \"wpda-import-from-data-explorer\" ) ) {\n\t\t\t\t\twp_die( __( 'ERROR: Not authorized', 'wp-data-access' ) );\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $_FILES['filename'] ) ) {\n\n\t\t\t\t\tif ( 0 === $_FILES['filename']['error']\n\t\t\t\t\t && is_uploaded_file( $_FILES['filename']['tmp_name'] )\n\t\t\t\t\t) {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t'application/zip' === $_FILES['filename']['type'] ||\n\t\t\t\t\t\t\t'application/x-zip' === $_FILES['filename']['type'] ||\n\t\t\t\t\t\t\t'application/x-zip-compressed' === $_FILES['filename']['type']\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// Process ZIP file.\n\t\t\t\t\t\t\tif ( $this->isinstalled_ziparchive ) {\n\t\t\t\t\t\t\t\t$zip = new \\ZipArchive;\n\t\t\t\t\t\t\t\tif ( $zip->open( $_FILES['filename']['tmp_name'] ) ) {\n\t\t\t\t\t\t\t\t\tfor ( $i = 0; $i < $zip->numFiles; $i ++ ) {\n\t\t\t\t\t\t\t\t\t\t$this->file_pointer = $zip->getStream( $zip->getNameIndex( $i ) );\n\t\t\t\t\t\t\t\t\t\t$this->import( $zip->getNameIndex( $i ) );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// Error reading ZIP file.\n\t\t\t\t\t\t\t\t\t$this->import_failed( sprintf( __( 'Import failed [error reading ZIP file `%s`]', 'wp-data-access' ), $_FILES['filename']['name'] ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// ZipArchive not installed.\n\t\t\t\t\t\t\t\t$this->import_failed( sprintf( __( 'Import failed - ZipArchive not installed %s', 'wp-data-access' ), SELF::SOLUTIONS ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Process plain file.\n\t\t\t\t\t\t\t$this->file_pointer = fopen( $_FILES['filename']['tmp_name'], 'rb' );\n\t\t\t\t\t\t\t$this->import( $_FILES['filename']['name'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->upload_failed();\n\t\t\t\t}\n\t\t\t} elseif ( isset( $_REQUEST['impchk'] ) ) {\n\t\t\t\t$this->upload_failed();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "82482a98ada29d8b4335c087c3682ec8", "score": "0.61786914", "text": "function HandleImportFile()\n\t{\n\t\t$newfilename = '';\n\t\t$fromlocal = false;\n\n\t\tif (isset($_POST['useserver']) && $_POST['useserver']) {\n\t\t\t$newfilename = $_POST['serverfile'];\n\t\t\t$fromlocal = true;\n\n\t\t\tif (!is_file(SENDSTUDIO_IMPORT_DIRECTORY . \"/{$newfilename}\")) {\n\t\t\t\t$this->ImportSubscribers_Step2(GetLang('ImportFile_ServerFileDoesNotExist'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\n\t\t\tif (!is_uploaded_file($_FILES['importfile']['tmp_name'])) {\n\t\t\t\t$this->ImportSubscribers_Step2(GetLang('FileNotUploadedSuccessfully'));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// now check for the temp directory if cache folder already exist..\n\t\t\tif (!is_dir(IEM_STORAGE_PATH . '/import')) {\n\t\t\t\t$createdir = @mkdir(IEM_STORAGE_PATH . '/import');\n\t\t\t\tif (!$createdir) {\n\t\t\t\t\ttrigger_error(__FILE__ . '::' . __METHOD__ . ' -- Unable to create import directory', E_USER_WARNING);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t@chmod(IEM_STORAGE_PATH . '/import', 0777);\n\t\t\t}\n\n\t\t\t// finding the new filename for import...\n\t\t\twhile (true) {\n\t\t\t\t$newfilename = 'import-' . md5(uniqid(rand(), true) . SENDSTUDIO_LICENSEKEY);\n\t\t\t\tif (!is_file(IEM_STORAGE_PATH . \"/import/{$newfilename}\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$uploadstatus = move_uploaded_file($_FILES['importfile']['tmp_name'], IEM_STORAGE_PATH . \"/import/{$newfilename}\");\n\t\t\tif (!$uploadstatus) {\n\t\t\t\t$this->ImportSubscribers_Step2(GetLang('FileNotUploadedSuccessfully'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tchmod(IEM_STORAGE_PATH . \"/import/{$newfilename}\", 0666);\n\t\t}\n\n\t\t$importinfo = IEM::sessionGet('ImportInfo');\n\t\t$importinfo['Filename'] = $newfilename;\n\t\t$importinfo['FromLocal'] = $fromlocal;\n\n\t\t$topline = $this->FileGetLine((($fromlocal? SENDSTUDIO_IMPORT_DIRECTORY : IEM_STORAGE_PATH . '/import') . \"/{$newfilename}\"), false);\n\t\tif (!$topline) {\n\t\t\t$this->ImportSubscribers_Step2(GetLang('FileNotUploadedSuccessfully'));\n\t\t\treturn false;\n\t\t}\n\n\t\t$file_num = 1;\n\t\t$linecount = 1;\n\n\t\t$lines = array();\n\t\t$filelist = array();\n\n\t\t$fp = fopen((($fromlocal? SENDSTUDIO_IMPORT_DIRECTORY : IEM_STORAGE_PATH . '/import') . \"/{$newfilename}\"), 'r');\n\t\twhile (!feof($fp)) {\n\t\t\t$line = fgets($fp, 10240);\n\t\t\tif (($linecount % $this->PerRefresh) == 0) {\n\t\t\t\t$broken_filename = $newfilename . '.file.' . $file_num;\n\t\t\t\t$broken_filename_handle = fopen(IEM_STORAGE_PATH . '/import' . '/' . $broken_filename, 'w');\n\t\t\t\tfputs($broken_filename_handle, implode(\"\", $lines));\n\t\t\t\tfclose($broken_filename_handle);\n\t\t\t\tchmod(IEM_STORAGE_PATH . '/import' . '/' . $broken_filename, 0666);\n\n\t\t\t\tarray_push($filelist, $broken_filename);\n\n\t\t\t\t$lines = array();\n\t\t\t\t$file_num++;\n\t\t\t}\n\t\t\t$linecount++;\n\t\t\t$lines[] = $line;\n\t\t}\n\n\t\tif (!empty($lines)) {\n\t\t\t$file_num++;\n\t\t\t$broken_filename = $newfilename . '.file.' . $file_num;\n\t\t\t$broken_filename_handle = fopen(IEM_STORAGE_PATH . '/import' . '/' . $broken_filename, 'w');\n\t\t\tfputs($broken_filename_handle, implode(\"\", $lines));\n\t\t\tfclose($broken_filename_handle);\n\t\t\tchmod(IEM_STORAGE_PATH . '/import' . '/' . $broken_filename, 0666);\n\n\t\t\tarray_push($filelist, $broken_filename);\n\t\t}\n\n\t\t$topline = $topline[0];\n\n\t\t/**\n\t\t * Since the linecount started at 1, we need to take one off\n\t\t * as the first line in the imported file then becomes \"linecount=2\".\n\t\t *\n\t\t * We can't start at linecount=0 as this will cause an extra empty file to be written.\n\t\t * Instead, just decrement the counter here.\n\t\t */\n\t\t$linecount--;\n\n\t\t$importinfo['ImportList'] = $topline;\n\t\t$importinfo['FileList'] = $filelist;\n\t\t$importinfo['TotalSubscribers'] = $linecount;\n\t\tif ($importinfo['Headers']) {\n\t\t\t/**\n\t\t\t * if there are headers, don't include them here - the first line will be another 'non-subscriber' entry.\n\t\t\t */\n\t\t\t$importinfo['TotalSubscribers']--;\n\t\t}\n\n\t\tIEM::sessionSet('ImportInfo', $importinfo);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5035afa49fc81297341c76cf7f90127d", "score": "0.6153405", "text": "public function check_post() {\n\n\t\t\t// Check if import was requested.\n\t\t\t// Import is not possible for WPDA_List_Table::LIST_BASE_TABLE (view in mysql information_schema).\n\t\t\tif ( WPDA_List_Table::LIST_BASE_TABLE !== $this->table_name &&\n\t\t\t isset( $_REQUEST['action'] ) && 'import' === sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ) // input var okay.\n\t\t\t) {\n\t\t\t\t// Security check.\n\t\t\t\t$wp_nonce = isset( $_REQUEST['_wpnonceimport'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['_wpnonceimport'] ) ) : '?'; // input var okay.\n\t\t\t\tif ( ! wp_verify_nonce( $wp_nonce, \"wpda-import-{$this->table_name}\" ) ) {\n\t\t\t\t\twp_die( __( 'ERROR: Not authorized', 'wp-data-access' ) );\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $_FILES['filename'] ) ) {\n\n\t\t\t\t\tif ( UPLOAD_ERR_OK === $_FILES['filename']['error']\n\t\t\t\t\t && is_uploaded_file( $_FILES['filename']['tmp_name'] )\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Get file content.\n\t\t\t\t\t\t$wpda_import = new WPDA_Import_File( $_FILES['filename']['tmp_name'] );\n\n\t\t\t\t\t\t// Check if errors should be shown.\n\t\t\t\t\t\t$hide_errors = isset( $_REQUEST['hide_errors'] ) ? $_REQUEST['hide_errors'] : 'off';\n\n\t\t\t\t\t\t// Process file content.\n\t\t\t\t\t\t$wpda_import->import( $this->schema_name, $this->table_name, $hide_errors );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// File upload failed: inform user.\n\t\t\t\t\t$msg = new WPDA_Message_Box(\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'message_text' => __( 'File upload failed', 'wp-data-access' ),\n\t\t\t\t\t\t\t'message_type' => 'error',\n\t\t\t\t\t\t\t'message_is_dismissible' => false,\n\t\t\t\t\t\t]\n\t\t\t\t\t);\n\t\t\t\t\t$msg->box();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "0347095552b82b89a23b55445bd793a1", "score": "0.60870856", "text": "protected function import()\n {\n $this->prepareImport();\n\n $step = 0;\n $percentDone = $this->getProgress($step, $this->stepCount);\n $msg = \"Importing: $percentDone\";\n $this->out($msg, 0);\n $statisticsTable = TableRegistry::get('Statistics');\n\n // Insert\n if (! empty($this->toInsert)) {\n foreach ($this->toInsert as $i => $statEntity) {\n $step++;\n $percentDone = $this->getProgress($step, $this->stepCount);\n $msg = \"Importing: $percentDone\";\n $this->_io->overwrite($msg, 0);\n $statisticsTable->save($statEntity);\n }\n }\n\n // Overwrite\n if (! empty($this->toOverwrite)) {\n if ($this->getOverwrite()) {\n foreach ($this->toOverwrite as $i => $statEntity) {\n $step++;\n $percentDone = $this->getProgress($step, $this->stepCount);\n $msg = \"Importing: $percentDone\";\n $this->_io->overwrite($msg, 0);\n $statisticsTable->save($statEntity);\n }\n }\n }\n\n $msg = \"Preparing import: 100%\";\n $this->_io->overwrite($msg, 0);\n\n $this->out();\n $msg = $this->helper('Colorful')->success('Import complete');\n $this->out($msg);\n\n if (! empty($this->toOverwrite) && ! $this->getOverwrite()) {\n $overwriteCount = count($this->toOverwrite);\n $msg = $overwriteCount . ' updated ' . __n('statistic', 'statistics', $overwriteCount) . ' ignored';\n $msg = $this->helper('Colorful')->importOverwriteBlocked($msg);\n $this->out($msg);\n }\n\n return true;\n }", "title": "" }, { "docid": "b55a95fae2f9da9ecf35170465558df9", "score": "0.6078014", "text": "protected function _importData()\n {\n\n $this->updateEntity();\n return true;\n }", "title": "" }, { "docid": "568e55e57e165342b9f77d8db45ef969", "score": "0.606208", "text": "public function validateImport()\n {\n if(!is_array($this->importData)){\n return false;\n }\n\n foreach ($this->importData as $key => &$data)\n {\n if($data['id'] == 'id')\n {\n unset($data);\n continue;\n }\n\n if(!is_array($data))\n {\n $this->setInfo(\"One line is missing!\",\"error\");\n return false;\n }\n\n if(empty($data['id']) || empty($data['alias']))\n {\n $this->setInfo(\"Value \\\"id\\\" or \\\"alias\\\" form ID: \".$data['id'].\" or from alias: \".$data['alias'].\" is empty!\",\"error\");\n return false;\n }\n\n if(\n ($data['robots'] === 'index,follow' && $data['sitemap'] !== 'map_default') ||\n ($data['robots'] === 'noindex,nofollow' && $data['sitemap'] !== 'map_never') ||\n ($data['robots'] === 'noindex,follow' && $data['sitemap'] !== 'map_never')\n )\n {\n $this->setInfo(\"I think there is an mistake with the sitemap and robots on ID: \" . $data['id']);\n }\n\n if($data['pageTitle'] === '')\n {\n $this->setInfo(\"PageTitle is empty on ID: \" . $data['id']);\n }\n\n if($data['description'] === '')\n {\n $this->setInfo(\"Description is empty on ID: \" . $data['id']);\n }\n\n foreach ($data as &$value)\n {\n $value = \\Input::xssClean($value);\n }\n }\n return true;\n }", "title": "" }, { "docid": "a66d3b5a2ca4dde31b26dea89a4fc517", "score": "0.604986", "text": "public function actionImport()\n {\n // Load posted json data into a variable.\n $importData = Craft::$app->request->getBodyParam('importData');\n\n $updateExisting = (bool)Craft::$app->request->getBodyParam('updateExisting');\n\n list($parseError, $noErrors, $backup, $results) = Architect::$plugin->architectService->import($importData, false, $updateExisting);\n\n if ($parseError) {\n $this->renderTemplate('architect/import', [\n 'invalidJSON' => $results[0],\n 'invalidYAML' => $results[1],\n 'updateExisting' => $updateExisting,\n 'importData' => $importData,\n ]);\n return;\n }\n\n $this->renderTemplate('architect/import_results', [\n 'noErrors' => $noErrors,\n 'backupLocation' => $backup,\n 'results' => $results,\n 'updateExisting' => $updateExisting,\n 'importData' => $importData,\n ]);\n }", "title": "" }, { "docid": "c0c9537f89471aabbd7a28f91a0281dc", "score": "0.6049378", "text": "protected function preImport()\n {\n }", "title": "" }, { "docid": "928dcba70af9d27262a1afd55b295965", "score": "0.60454", "text": "function DoImport()\t{\n\t\tGLOBAL $TSFE, $_FILES;\n\t\t$importError = '';\n\n\t\t\n\t\t$basePathLocal = t3lib_extMgm::extPath('sg_zlib').'locallang_import.php';\n\t\t$basePathExt = t3lib_extMgm::extPath($this->extKey).dirname($this->scriptRelPath).'/locallang_import.php';\n\t\t$tempLOCAL_LANG = t3lib_div::readLLfile($basePathExt,$this->LLkey);\n\t\t$this->LOCAL_LANG = t3lib_div::array_merge_recursive_overrule\n\t\t\t(is_array($this->LOCAL_LANG) ? $this->LOCAL_LANG : array(),$tempLOCAL_LANG);\n\n\t\t$this->constText = $this->langObj->getLangArray($basePathLocal,$basePathExt);\n\t\t// t3lib_div::debug(Array('$this->constText'=>$this->constText, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\n\n\n\n\n\n\t\t// Here again similar to old version\n\t\t$TSFE->set_no_cache();\n\n\t\t$preset = Array(0, 0,0,0,0,0,0,0,0,0);\n\t\t$content = '';\n\t\t// ----------------------------------------------------------------------------------------------------------------\n\n\t\t$importName = 'u'.$TSFE->fe_user->user['uid'].'_'.(strlen($this->importName)>1 ? $this->importName : 'z_import');\n\n\t\t$importState = intval(t3lib_div::_GP('impSt'));\n\t\t$fileType = intval(t3lib_div::_GP('filetype'));\n\t\t$myTime = time();\n\t\t$this->myTime = $myTime;\n\t\t$this->myMaxTime = $myTime + 365 * 24 * 3600;\n\t\t$minImportFields = 2;\n\n\t\t$cfImport = $this->confObj->import; //(isset($this->conf['import.']) ? $this->conf['import.'] : Array() );\n\t\t$cfImportGlobal = $cfImport['global.'];\n\t\tunset ($cfImport['global.']);\n\n\t\tif (!$this->permitObj->allowed['import'] && $cfImportGlobal['denyMessage']) {\n\t\t\treturn ($cfImportGlobal['denyMessage']);\n\t\t}\n\n\t\t$myTypes = Array();\n\t\t$myLabels = Array();\n\t\t$myTables = Array();\n\t\tif (is_array($cfImport)) {\n\t\t\tfor (reset($cfImport);$key=key($cfImport);next($cfImport)) {\n\t\t\t\t$table = $cfImport[$key]['table'] ? $cfImport[$key]['table'] : str_replace('.','',$key);\n\t\t\t\tif (strcmp('be_',substr($table,0,3)) && strcmp('cache',substr($table,0,5))) {\n\t\t\t\t\t$myTypes[] = str_replace('.','',$key);\n\t\t\t\t\t// $myLabels[] = $cfImport[$key]['label'];\n\t\t\t\t\t$myLabels[] = $this->cObj->stdWrap($cfImport[$key]['label'],$cfImport[$key]['label.']);\n\t\t\t\t\t$myTables[] = $table;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$content = \"<br />ERROR: No Imports defined in TS ! <br />\";\n\t\t}\n\n\t\tif ($importState<1) {\n\t\t\tif (count($myTypes)>1) {\n\t\t\t\t$content .= '<br /><table border=1 cellspacing=0 cellpadding=3>';\n\t\t\t\t$content .= '<tr><td colspan=\"2\"><b>Please select Import-Mode</b></td></tr>';\n\t\t\t\tfor ($i=0;$i<count($myTypes);$i++) {\n\t\t\t\t\t$content .= '<tr><td align=\"center\" valign=\"top\">'.($i+1).'</td>';\n\t\t\t\t\t$content .= '<td align=\"left\" valign=\"top\"><a href=\"'.$this->myPage.'&filetype='.($i+1).'&impSt=1'.'\">'.$myLabels[$i].'</a></td></tr>';\n\t\t\t\t}\n\t\t\t\t$content .= '</table>';\n\t\t\t\t$importState = 0;\n\t\t\t} else if (count($myTypes)>0) {\n\t\t\t\t$importState = 1;\n\t\t\t\t$fileType = 1;\n\t\t\t} else {\n\t\t\t\t$importState = -1;\n\t\t\t}\n\t\t} else if ($importState==2 && (!is_array($_FILES) || strlen($_FILES['datei']['name'])<1 ) ) {\n\t\t\t$importState = 1;\n\t\t\t$importError = $this->constText['imp_error_nofile'];\n\t\t}\n\n\t\tif ($importState<0) {\n\t\t\t$content .= 'ERROR: importstate=0<br />';\n\t\t} else if ($importState>0) {\n\n\t\t\t$myFile = $myTables[($fileType-1)];\n\t\t\t$cfImport = $cfImport[$myTypes[($fileType-1)].'.'];\n\t\t\t$this->workOnTable = $cfImport['table'] ? $cfImport['table'] : $this->mainTable;\n\n\t\t\t$importTmpl = $this->templateObj->getTemplate(($cfImport['useTemplate']) ? $cfImport['useTemplate'] : 'import',$this->globalMarkers);\n\n\t\t\t$this->PCA = $this->felib->getPCA($myFile,$this->prefixId,$this->pid,$this->conf,$this->localConf);\n\t\t\t//t3lib_div::debug(Array('$myFile'=>$myFile, '$cfImport'=>$cfImport, '$this->pid'=>$this->pid, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t$this->headerLine = $this->cObj->getSubpart($importTmpl,'###PART_HEADLINE###');\n\t\t\t$this->headerField = $this->cObj->getSubpart($this->headerLine,'###PART_FIELD###');\n\t\t\t$this->listLine = $this->cObj->getSubpart($importTmpl,'###PART_LISTLINE###');\n\t\t\t$this->listField = $this->cObj->getSubpart($this->listLine,'###PART_FIELD###');\n\n\t\t\t$settings = isset($cfImport['settings.']) ? $cfImport['settings.'] : '';\n\t\t\t$fields = isset($cfImport) ? $cfImport['fields.'] : '';\n\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t$fields[$key]['id'] = explode(',',$fields[$key]['id']);\n\t\t\t}\n\n\t\t\t$this->columnRef = $settings['columns.'];\n\n\t\t\t$totalStates = 5;\n\t\t\t$activeState = $importState;\n\t\t\tif ($settings['skip3']) {\n\t\t\t\t$totalStates--;\n\t\t\t\tif ($importState==3) {\n\t\t\t\t\t$importState = 4;\n\t\t\t\t}\n\t\t\t\tif ($activeState>3) {\n\t\t\t\t\t$activeState--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($cfImport) && isset($cfImport['show.']) && count($cfImport['show.'])>0) {\n\t\t\t\t$show = Array();\n\t\t\t\tfor (reset($cfImport['show.']);$key=key($cfImport['show.']);next($cfImport['show.'])) {\n\t\t\t\t\t$show[] = $cfImport['show.'][$key];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($cfImport) && isset($cfImport['result.']) && count($cfImport['result.'])>0) {\n\t\t\t\t$result = Array();\n\t\t\t\tfor (reset($cfImport['result.']);$key=key($cfImport['result.']);next($cfImport['result.'])) {\n\t\t\t\t\t$result[] = $cfImport['result.'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!is_array($result)) {\n\t\t\t\t$result = $show;\n\t\t\t}\n\n\t\t\tif (is_array($settings) && is_array($fields)) {\n\t\t\t\t$mHeaders = Array();\n\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t$mHeaders['###'.str_replace('.','',$key).'###'] = str_replace('.','',$key);\n\t\t\t\t}\n\n\t\t\t\t$mHeaders['###headline###'] = $this->getHeadLine();\n\n\t\t\t\t$impIdx = Array();\n\t\t\t\t$imports = Array();\n\t\t\t\t$setvals = Array();\n\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\tif (count($fields[$key]['id'])>1) {\n\t\t\t\t\t\tfor ($i1=0;$i1<count($fields[$key]['id']);$i1++) {\n\t\t\t\t\t\t\t$imports[$fields[$key]['id'][$i1].'.'] = str_replace('.','',$key);\n\t\t\t\t\t\t\t$impIdx[$fields[$key]['id'][$i1].'.'] = '('.($i1+1).'/'.count($fields[$key]['id']).')';\n\t\t\t\t\t\t\tif (intval($fields[$key]['id'][$i1])>intval($minImportFields)) { $minImportFields = intval($fields[$key]['id'][$i1]); }\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (intval($fields[$key]['id'][0])>0) {\n\t\t\t\t\t\t$imports[$fields[$key]['id'][0].'.'] = str_replace('.','',$key);\n\t\t\t\t\t\t$impIdx[$fields[$key]['id'][0].'.'] = '';\n\t\t\t\t\t\tif (intval($fields[$key]['id'][0])>intval($minImportFields)) { $minImportFields = intval($fields[$key]['id'][0]); }\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$setvals[str_replace('.','',$key)] = $fields[$key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tksort ($imports);\n\n\t\t\t\t$sp = $this->templateObj->getSubpart($importTmpl,'###TITLE###');\n\t\t\t\t$m = Array();\n\t\t\t\t$m['###TITLETEXT###'] = $this->cObj->stdWrap($settings['title'],$settings['title.']);\n\t\t\t\t$m['###STATE###'] = $activeState;\n\t\t\t\t$m['###MAXSTATE###'] = $totalStates;\n\t\t\t\t$content .= $this->cObj->substituteMarkerArray($sp,$m);\n\n\t\t\t\t$this->constText['imp_info_pid'] = sprintf($this->constText['imp_info_pid'],$this->pid);\n\t\t\t\t$this->constText['imp_info_userid'] =\n\t\t\t\t\tsprintf($this->constText['imp_info_userid'],$TSFE->fe_user->user['uid'],$TSFE->fe_user->user['username']);\n\t\t\t\t$this->constText['imp_info_defaultpid'] =\n\t\t\t\t\tsprintf($this->constText['imp_info_defaultpid'],$this->confObj['userStorageID']);\n\t\t\t\t$this->constText['imp_info_usergroup'] =\n\t\t\t\t\tsprintf($this->constText['imp_info_usergroup'],$this->confObj['defaultUsergroup']);\n\n\t\t\t\t$m = Array();\n\t\t\t\tfor (reset($this->constText);$key=key($this->constText);next($this->constText)) {\n\t\t\t\t\t$m['###'.$key.'###'] = $this->constText[$key];\n\t\t\t\t}\n\t\t\t\t$m['###ERROR_HEADER###'] = $this->constObj->getWrap('hot',$this->constText['imp_error_header']);\n\t\t\t\t$m['###ERROR_MESSAGE###'] = '';\n\t\t\t\t$m['###COUNT_DBERROR###'] = 0;\n\t\t\t\t$m['###COUNT_INSERT###'] = $this->countInsert = 0;\n\t\t\t\t$m['###COUNT_REPLACE###'] = 0;\n\t\t\t\t$m['###LIST_DBERROR###'] = '';\n\n\t\t\t\t$this->getCrFeUser_id ($cfImport,t3lib_div::_GP('import'));\n\n\t\t\t\tif ($importState==1) {\n\t\t\t\t\t$errors = FALSE;\n\t\t\t\t\t$sp = $this->templateObj->getSubpart($importTmpl,'###PART1###');\n\n\t\t\t\t\t$m['###PARTNUMBER###'] = $this->cObj->stdWrap($settings['part1'],$settings['part1.']);\n\t\t\t\t\t$m['###ACTION###'] = $this->pi_getPageLink($GLOBALS[\"TSFE\"]->id);\n\t\t\t\t\t$m['###HIDDENDATA###'] = '<input type=\"hidden\" name=\"id\" value=\"'.$GLOBALS[\"TSFE\"]->id.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"import[tstamp]\" value=\"'.time().'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"import[pid]\" value=\"'.$this->pid.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"import[feuser]\" value=\"'.$this->permitObj->getFeUid().'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"impSt\" value=\"2\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"50000000\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"filetype\" value=\"'.$fileType.'\" />'.\n\t\t\t\t\t\t\t'';\n\n\t\t\t\t\t$m['###INPUT###'] = '';\n\t\t\t\t\t$m['###FILE###'] = (($importError) ? $this->constObj->getWrap('hot',$importError).'<br />' : '').\n\t\t\t\t\t\t'<input name=\"datei\" type=\"file\" size=\"50\" maxlength=\"60000000\" accept=\"text/*\" />';\n\t\t\t\t\t$m['###FILEINFO###'] = str_replace('###COUNT###',$minImportFields,\n\t\t\t\t\t\t\t$this->cObj->stdWrap($settings['fieldCountText'],$settings['fieldCountText.']));\n\n\t\t\t\t\tif (is_array($settings['separator.'])) {\n\t\t\t\t\t\tif (count($settings['separator.'])>1) {\n\t\t\t\t\t\t\t$m['###FILESEPARATOR###'] = '<select name=\"import[separator]\">';\n\t\t\t\t\t\t\tfor (reset($settings['separator.']);$key=key($settings['separator.']);next($settings['separator.'])) {\n\t\t\t\t\t\t\t\t$m['###FILESEPARATOR###'] .= '<option value=\"'.$settings['separator.'][$key]['value'].'\">'.\n\t\t\t\t\t\t\t\t\t$this->cObj->stdWrap($settings['separator.'][$key]['text'],$settings['separator.'][$key]['text.'])\n\t\t\t\t\t\t\t\t\t.'</option>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m['###FILESEPARATOR###'] .= '</select>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treset($settings['separator.']);\n\t\t\t\t\t\t\t$key = key($settings['separator.']);\n\t\t\t\t\t\t\t$m['###FILESEPARATOR###'] = '<input type=\"hidden\" value=\"'.\n\t\t\t\t\t\t\t\t$settings['separator.'][$key]['value'].'\" />'.\n\t\t\t\t\t\t\t\t$this->cObj->stdWrap($settings['separator.'][$key]['text'],$settings['separator.'][$key]['text.']);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###FILESEPARATOR###'] = '<input type=\"hidden\" value=\"tab\" />[TAB]';\n\t\t\t\t\t}\n\n\t\t\t\t\t$dbCharSet = $settings['encodingTo'] ? $settings['encodingTo'] : 'utf-8'; // wrong!! $GLOBALS['TYPO3_DB']->default_charset;\n\t\t\t\t\tif ($settings['encodingText']) {\n\t\t\t\t\t\t$tmpFileEncoding = '<br />'.$this->constObj->TSConstObj($settings['encodingText'],$settings['encodingText.']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmpFileEncoding = '<br />'.$this->constText['imp_encodingtext'];\n\t\t\t\t\t}\n\t\t\t\t\t$m['###FILEENCODING###'] = sprintf ($tmpFileEncoding,$dbCharSet);\n\t\t\t\t\t$m['###FILEENCODING###'] .= '<select name=\"import[encoding]\" />'.CRLF;\n\t\t\t\t\t$defaultText = $this->constObj->TSConstObj($settings['encodingDefault'],$settings['encodingDefault.']);\n\t\t\t\t\t$defaultText = sprintf ($defaultText ? $defaultText : $this->constText['imp_dontrecode'], $dbCharSet);\n\t\t\t\t\t$presetEncoding = $settings['encodingPreset'];\n\t\t\t\t\t$m['###FILEENCODING###'] .= '<option value=\"\">'.$defaultText.'</option>'.CRLF;\n\t\t\t\t\tif ($settings['encodingFullList']) {\n\t\t\t\t\t\t$cs = t3lib_div::makeInstance('t3lib_cs');\n\t\t\t\t\t\t$charsetList = Array('windows-1252'=>'windows-1252', 'utf-8'=>'utf-8','-'=>'-');\n\t\t\t\t\t\t$charsetList = array_merge($charsetList,$cs->synonyms);\n\t\t\t\t\t\tif (is_array($charsetList)) foreach ($charsetList as $key=>$params) {\n\t\t\t\t\t\t\t$selected = ($presetEncoding && strcmp($presetEncoding,$key)==0) ? ' selected=\"selected\"' : '' ;\n\t\t\t\t\t\t\t$m['###FILEENCODING###'] .= '<option value=\"'.$key.','.$dbCharSet.'\"'.$selected.'>'.$key.'</option>'.CRLF;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (is_array($settings['encoding.'])) foreach ($settings['encoding.'] as $key=>$params) {\n\t\t\t\t\t\t\t$encoding = $params['value'];\n\t\t\t\t\t\t\t$selected = ($presetEncoding && strcmp($presetEncoding,$encoding)==0) ? ' selected=\"selected\"' : '' ;\n\t\t\t\t\t\t\t$name = $this->constObj->TSConstObj($params['name'],$params['name.']);\n\t\t\t\t\t\t\t$name = $name ? $name : $encoding;\n\t\t\t\t\t\t\t$m['###FILEENCODING###'] .= '<option value=\"'.$encoding.','.$dbCharSet.'\"'.$selected.'>'.$name.'</option>'.CRLF;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$m['###FILEENCODING###'] .= '</select>'.CRLF;\n\n\t\t\t\t\tif (is_array($settings['media.']) && $settings['media.']['upload']) {\n\t\t\t\t\t\t\t$m['###MEDIAFILE###'] .= '<hr />Mediafile (*.zip):<br />';\n\t\t\t\t\t\t\t$m['###MEDIAFILE###'] .= '<input name=\"mediazip\" type=\"file\" size=\"50\" maxlength=\"50000000\" accept=\"application/zip\" />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###MEDIAFILE###'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t$m['###SUBMIT###'] = '<input type=\"submit\" value=\"'.$this->constText['imp_submit'].'\" />';\n\n\n\t\t\t\t\t$m['###STATE###'] = $activeState;\n\t\t\t\t\t$m['###MAXSTATE###'] = $totalStates;\n\n\t\t\t\t\tif (intval($settings['pid.']['value'])>(-5) || is_array($settings['input.']) || $cfImport['settings.']['deleteAll']) {\n\t\t\t\t\t\t$m['###INPUT###'] = '<table border=0 cellspacing=0 cellpadding=1>';\n\t\t\t\t\t\t$hiddenPid = '';\n\n\t\t\t\t\t\t$tmpPid = (intval($settings['pid.']['value'])>=0 ? intval($settings['pid.']['value']):intval($this->pid));\n\t\t\t\t\t\tif (intval($settings['pid.']['value'])>(-5)) {\n\t\t\t\t\t\t\t$m['###INPUT###'] .= '<tr><td>'.$settings['pid.']['label'].': &nbsp;</td>';\n\t\t\t\t\t\t\t$m['###INPUT###'] .= '<td>'.$this->getPidInputField ('pid',$settings['pid.'],$tmpPid).'</td></tr>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$hiddenPid = '<input type=\"hidden\" name=\"import[pid]\" value=\"'.$tmpPid.'\" />';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (is_array($settings['input.'])) {\n\t\t\t\t\t\t\tfor (reset($settings['input.']);$key=key($settings['input.']);next($settings['input.'])) {\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<tr><td>'.$settings['input.'][$key]['label'].': &nbsp;</td>';\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<td>'.$hiddenPid.$this->getUserInputField ($key,$settings['input.'][$key],$preset[intval($key)]).'</td></tr>';\n\t\t\t\t\t\t\t\t$hiddenPid = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($cfImport['settings.']['deleteAll']) {\n\t\t\t\t\t\t\t$m['###INPUT###'] .= '<tr><td>Delete ? &nbsp;</td>';\n\t\t\t\t\t\t\tif (strncmp(strtolower($cfImport['settings.']['deleteAll']),'query',5)==0) {\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<td><select name=\"deleteAll\">';\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<option value=\"\">-nothing-</option>';\n\t\t\t\t\t\t\t\tif ($this->felib->allow['admin'] && strcmp(strtolower($cfImport['settings.']['deleteAll']),'queryall')==0) {\n\t\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<option value=\"all\">Absolutely ALL records will be deleted before import</option>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<option value=\"own\">ALL records of given FeUser will be deleted before import</option>';\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '</select></td></tr>';\n\t\t\t\t\t\t\t} else if (strcmp(strtolower($cfImport['settings.']['deleteAll']),'all')==0) {\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<td><input type=\"hidden\" name=\"deleteAll\" value=\"all\" />Absolutely ALL records will be deleted before import</td></tr>';\n\t\t\t\t\t\t\t} else if (strcmp(strtolower($cfImport['settings.']['deleteAll']),'own')==0) {\n\t\t\t\t\t\t\t\t$m['###INPUT###'] .= '<td><input type=\"hidden\" name=\"deleteAll\" value=\"own\" />ALL records of given FeUser will be deleted before import</td></tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$m['###INPUT###'] .= '</table>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1INPUT###','');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!is_array($imports) || count($imports)<1) {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1FIELDORDERBLOCK###','');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$fob = '';\n\t\t\t\t\t\t$fobTmpl = $this->templateObj->getSubpart($importTmpl,'###PART1FIELDORDER###');\n\t\t\t\t\t\tfor (reset($imports);$key=key($imports);next($imports)) {\n\t\t\t\t\t\t\tif (intval($key)>0) {\n\t\t\t\t\t\t\t\tif (isset($this->PCA['conf'][$imports[$key]]) || strcmp('uid',$imports[$key])==0) {\n\t\t\t\t\t\t\t\t\t$myText = $imports[$key].' '.$impIdx[$key];\n\t\t\t\t\t\t\t\t\t$myLabel = $this->langObj->getLL($this->PCA['conf'][$imports[$key]]['label']);\n\t\t\t\t\t\t\t\t\tif (isset($fields[$myText.'.']['eval']) && strlen($fields[$myText.'.']['eval'])>0) {\n\t\t\t\t\t\t\t\t\t\t$myText .= ' <i>(eval='.$fields[$myText.'.']['eval'].')</i>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$myText = $this->constObj->getWrap('hot','ERROR: \"'.$imports[$key].'\" undefined');\n\t\t\t\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t\t\t\t\t$myLabel = '??';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$fob .= str_replace('###LABEL###',$myLabel,\n\t\t\t\t\t\t\t\t\t\tstr_replace('###ID###',$key,\n\t\t\t\t\t\t\t\t\t\tstr_replace('###TEXT###',$myText,$fobTmpl)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1FIELDORDER###',$fob);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($setvals) && count($setvals)>0) {\n\t\t\t\t\t\t$fsb = '';\n\t\t\t\t\t\t$fsbTmpl = $this->templateObj->getSubpart($importTmpl,'###PART1FIELDSET###');\n\t\t\t\t\t\tfor (reset($setvals);$key=key($setvals);next($setvals)) {\n\t\t\t\t\t\t\tif (isset($this->PCA['conf'][$key]) || strcmp($key,'pid')==0 || strcmp($key,'tstamp')==0 || strcmp($key,'crdate')==0 ) {\n\t\t\t\t\t\t\t\t$mySet = $setvals[$key]['set'];\n\t\t\t\t\t\t\t\tif (strlen($mySet)<1) {\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>--empty--</i></font>';\n\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'input',5)==0) {\n\t\t\t\t\t\t\t\t\t$mySet = 'val(<font color=#000080>'.$settings['input.'][intval(substr($mySet,5)).'.']['label'].'</font>)';\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'pid')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>'.$this->constText['imp_act_pid'].' = '.$this->pid.'</i></font>';\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'feuser')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>'.$this->constText['imp_act_feuser'].' = '.\n\t\t\t\t\t\t\t\t\t\t$this->permitObj->getFeUid().'</i></font>';\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'time')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>'.$this->constText['imp_act_time'].' = '.time().'</i></font>';\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'empty')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = '\"\"';\n\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'CONST:',6)==0) {\n\t\t\t\t\t\t\t\t\t$tmp = str_replace('###time###',date('His',$myTime),str_replace('###date###',date('Ymd',$myTime),\n\t\t\t\t\t\t\t\t\t\tsubstr($mySet,6)));\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>'.$this->constText['imp_act_const'].' = '.$tmp.'</i></font>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$mySet = DQT.$mySet.DQT;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$mySet = $this->constObj->getWrap('hot','ERROR: \"'.$key.'\" undefined');\n\t\t\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$fsb .= str_replace('###FIELD###',$key,str_replace('###TEXT###',$mySet,$fsbTmpl));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1FIELDSET###',$fsb);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1FIELDSETBLOCK###','');\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($errors) {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART1SUBMIT###','');\n\t\t\t\t\t}\n\n\t\t\t\t\t$content .= $this->cObj->substituteMarkerArray($sp,$m);\n\n\t\t\t\t} else if ($importState==2) { // ##################################################################################\n\t\t\t\t\t$errors = FALSE;\n\t\t\t\t\t$sp = $this->templateObj->getSubpart($importTmpl,'###PART2###');\n\t\t\t\t\t$import = t3lib_div::_GP('import');\n\t\t\t\t\t$this->deleteAll = t3lib_div::_GP('deleteAll');\n\n\t\t\t\t\t$this->deleteAllMode = (strcmp($this->deleteAll,'own')==0 || strcmp($this->deleteAll,'all')==0);\n\t\t\t\t\t$this->debugObj->debugIf('importDelete',Array('$this->deleteAll'=>$this->deleteAll, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t$m['###PARTNUMBER###'] = $this->cObj->stdWrap($settings['part2'],$settings['part2.']);\n\t\t\t\t\t$m['###ACTION###'] = $this->pi_getPageLink($GLOBALS[\"TSFE\"]->id);\n\t\t\t\t\t$m['###HIDDENDATA###'] = '<input type=\"hidden\" name=\"id\" value=\"'.$GLOBALS[\"TSFE\"]->id.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"filetype\" value=\"'.$fileType.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"deleteAll\" value=\"'.$this->deleteAll.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"moreimport\" value=\"'.urlencode(serialize($import)).'\" />'.\n\t\t\t\t\t\t\t'';\n\t\t\t\t\t$m['###STATE###'] = $activeState;\n\t\t\t\t\t$m['###MAXSTATE###'] = $totalStates;\n\n\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\tif (strlen($import['separator'])>0) {\n\t\t\t\t\t\tif (strcmp($import['separator'],'tab')==0) {\n\t\t\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\t\t} else if (strcmp($import['separator'],'pipe')==0) {\n\t\t\t\t\t\t\t$separator = \"|\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$separator = $import['separator'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$m['###TEXT_FILENAME###'] = $_FILES['datei']['name'];\n\t\t\t\t\t$m['###STATUS_FILENAME###'] = 'OK';\n\n\t\t\t\t\t$m['###TEXT_FILESIZE###'] = $_FILES['datei']['size'].\"bytes = \".\n\t\t\t\t\t\tfloor(($_FILES['datei']['size']+512)/1024).\"kBytes\";\n\t\t\t\t\t$maxSizeError = intval($settings['maxSizeError']) ? intval($settings['maxSizeError']) : 9000000;\n\t\t\t\t\t$minSizeError = intval($settings['minSizeError']) ? intval($settings['minSizeError']) : 2000;\n\t\t\t\t\t$minSizeWarn = intval($settings['minSizeWarn']) ? intval($settings['minSizeWarn']) : 200;\n\t\t\t\t\tif ($_FILES['datei']['size']>$maxSizeError)\t{\n\t\t\t\t\t\t$m['###STATUS_FILESIZE###'] = \"<font color=#ff0000>FEHLER: zu gro&szlig;</font>\";\n\t\t\t\t\t} else if ($_FILES['datei']['size']<$minSizeWarn) {\n\t\t\t\t\t\t$m['###STATUS_FILESIZE###'] =\"<font color=#ff0000>WARNUNG: Datei evtl. nicht vollständig</font>\";\n\t\t\t\t\t} else if ($_FILES['datei']['size']<$minSizeError) {\n\t\t\t\t\t\t$m['###STATUS_FILESIZE###'] =\"<font color=#ff0000>FEHLER: Datei vermutlich nicht vollständig</font>\";\n\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###STATUS_FILESIZE###'] =\"<font color=#008000>OK</font>\";\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t$m['###TEXT_FILETEMP###'] = $_FILES['datei']['tmp_name'];\n\t\t\t\t\tif (file_exists($_FILES['datei']['tmp_name'])) {\n\t\t\t\t\t\t$tmpFileSize = @filesize ($_FILES['datei']['tmp_name']);\n\t\t\t\t\t\t$m['###TEXT_FILETEMP###'] .= ' - Size = '.intval((floor($tmpFileSize+512)/1024)).'kBytes<br />=&gt; \"'.$importName.'.txt\"';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmpFileSize = 0;\n\t\t\t\t\t\t$m['###TEXT_FILETEMP###'] .= ' - Missing !';\n\t\t\t\t\t}\n\t\t\t\t\t$m['###STATUS_FILETEMP###'] = 'OK';\n\n\t\t\t\t\t$m['###TEXT_FILELINES###'] = '';\n\t\t\t\t\t$m['###STATUS_FILELINES###'] = '';\n\n\t\t\t\t\tif (is_uploaded_file($_FILES['datei']['tmp_name']) && $tmpFileSize>0) {\n\t\t\t\t\t\tmove_uploaded_file($_FILES['datei']['tmp_name'], 'typo3temp/'.$importName.'.txt');\n\t\t\t\t\t\t$uploadedFileSize = @filesize('typo3temp/'.$importName.'.txt');\n\t\t\t\t\t\tif ($uploadedFileSize!=$tmpFileSize) {\n\t\t\t\t\t\t\t\t\t$m['###STATUS_FILENAME###'] .= ' ('.intval((floor($uploadedFileSize+512)/1024)).'!='.intval((floor($tmpFileSize+512)/1024)).' kBytes)';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//$aLines = file ('typo3temp/'.$importName.'.txt');\n\t\t\t\t\t\t$concat = $settings['concat'];\n\t\t\t\t\t\t$recode = $import['encoding'] ? $import['encoding'] :$settings['recode'];\n\t\t\t\t\t\t$aLines = $this->felib->getImportFile('typo3temp/'.$importName.'.txt',$minImportFields,$separator,$concat,$recode);\n\n\t\t\t\t\t\t$maxLineWarn = intval($settings['maxLineWarn']) ? intval($settings['maxLineWarn']) : 20000;\n\t\t\t\t\t\t$minLineWarn = intval($settings['minLineWarn']) ? intval($settings['minLineWarn']) : 5;\n\t\t\t\t\t\t$m['###TEXT_FILELINES###'] = count($aLines);\n\t\t\t\t\t\tif (count($aLines)>$maxLineWarn)\n\t\t\t\t\t\t\t{ $m['###STATUS_FILELINES###'] = '<font color=#ff0000>FEHLER: Datei vermutlich Fehlerhaft</font>'; }\n\t\t\t\t\t\telse if (count($aLines)<=$minLineWarn)\n\t\t\t\t\t\t\t{ $m['###STATUS_FILELINES###'] = '<font color=#ff0000>FEHLER: Datei vermutlich Fehlerhaft</font>'; }\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{ $m['###STATUS_FILELINES###'] = '<font color=#008000>OK</font>'; }\n\n\t\t\t\t\t\t$fsb = '';\n\t\t\t\t\t\t$fsbTmpl = $this->templateObj->getSubpart($importTmpl,'###PART2FIELDSET###');\n\n\t\t\t\t\t\tfor (reset($setvals);$key=key($setvals);next($setvals)) {\n\t\t\t\t\t\t\tif (isset($this->PCA['conf'][$key]) || strcmp($key,'pid')==0 || strcmp($key,'tstamp')==0 || strcmp($key,'crdate')==0 ) {\n\t\t\t\t\t\t\t\t$mySet = $setvals[$key]['set'];\n\t\t\t\t\t\t\t\t$myLabel = $this->langObj->getLL($this->PCA['conf'][$key]['label']);\n\t\t\t\t\t\t\t\tif (strlen($mySet)<1) {\n\t\t\t\t\t\t\t\t\t$mySet = '<font color=#008000><i>--empty--</i></font>';\n\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'input',5)==0) {\n\t\t\t\t\t\t\t\t\t$mySet = $import['input'][intval(substr($mySet,5)).'.'];\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'pid')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = $import['pid'];\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'feuser')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = $import['feuser'];\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'time')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = $import['tstamp'];\n\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'empty')==0) {\n\t\t\t\t\t\t\t\t\t$mySet = '\"\"';\n\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'CONST:',6)==0) {\n\t\t\t\t\t\t\t\t\t$mySet = str_replace('###time###',date('His',$myTime),str_replace('###date###',date('Ymd',$myTime),\n\t\t\t\t\t\t\t\t\t\tsubstr($mySet,6)));\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$mySet = $mySet;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$mySet = $this->constObj->getWrap('hot','ERROR: \"'.$key.'\" undefined');\n\t\t\t\t\t\t\t\t$myLabel = '??';\n\t\t\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//$content .= '<tr><td align=right>'.$key.' =</td><td>'.$mySet.'</td></tr>';\n\t\t\t\t\t\t\t$fsb .= str_replace('###TEXT_CONSTFIELD###',$key,\n\t\t\t\t\t\t\t\tstr_replace('###TEXT_CONSTLABEL###',$myLabel,\n\t\t\t\t\t\t\t\tstr_replace('###TEXT_CONSTVALUE###',$mySet,\n\t\t\t\t\t\t\t\t$fsbTmpl)));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART2FIELDSET###',$fsb);\n\n\t\t\t\t\t\t//<!-- ###PART2FIELDSET### -->\n\t\t\t\t\t\t$listTmpl = $this->templateObj->getSubpart($importTmpl,'###PART2LIST###');\n\t\t\t\t\t\t$listLine = $this->templateObj->getSubpart($importTmpl,'###PART2LISTLINE###');\n\t\t\t\t\t\t$headLine = $this->templateObj->getSubpart($importTmpl,'###PART2HEADERLINE###');\n\n\t\t\t\t\t\t// Show Headers\n\t\t\t\t\t\t$ct = $this->cObj->substituteMarkerArray($headLine, $mHeaders);\n\n\t\t\t\t\t\t$dupCheck = Array();\n\t\t\t\t\t\t$dupCheck2 = Array();\n\t\t\t\t\t\t$dupFields = ($settings['replace.']['byFields']) ?\n\t\t\t\t\t\t\tt3lib_div::trimExplode(',',$settings['replace.']['byFields']) : '';\n\n\t\t\t\t\t\tif (!is_array($dupFields)) {\n\t\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART2REPLACEBLOCK###','');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$maxC = count ($aLines);\n\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t$tPar = explode($separator, $aLines[$i]);\n\t\t\t\t\t\t\tif ($settings['removeFieldQuotes']) {\n\t\t\t\t\t\t\t\t$tPar = $this->stripAllQuotes($tPar);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$myData = Array();\n\t\t\t\t\t\t\t$mData = Array('###id###'=>($i+1).'.');\n\t\t\t\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t\t\t\t$xKey = str_replace('.','',$key);\n\t\t\t\t\t\t\t\tif (count($fields[$key]['id'])>0 && intval($fields[$key]['id'][0])>0) {\n\t\t\t\t\t\t\t\t\t$myVal = $this->newsGetImportFields ($fields,$key,$xKey,$tPar,$myData,$mData,$fields[$key]['preprocess']);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$myData[str_replace('.','',$key)] = $fields[$key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!$i && $settings['skipFirstRow']) {\n\t\t\t\t\t\t\t\t$mData['###listline###'] = $this->getHeadLine($mData);\n\t\t\t\t\t\t\t\t$ct .= $this->cObj->substituteMarkerArray($listLine, $mData);\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tif (is_array($dupFields)) {\n\t\t\t\t\t\t\t\t\t$tmp = Array();\n\t\t\t\t\t\t\t\t\t$tmp2 = Array();\n\t\t\t\t\t\t\t\t\tfor ($k=0;$k<count($dupFields);$k++) {\n\t\t\t\t\t\t\t\t\t\t$d = $myData[$dupFields[$k]];\n\t\t\t\t\t\t\t\t\t\tif (is_array($d)) {\n\t\t\t\t\t\t\t\t\t\t\t$tmp[] = $dupFields[$k];\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$tmp[] = $dupFields[$k].'='.$d;\n\t\t\t\t\t\t\t\t\t\t\t$tmp2[] = QT.$d.QT;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$tmp2Implode = implode ('',$tmp2);\n\t\t\t\t\t\t\t\t\tif (strlen($tmp2Implode)>2) {\n\t\t\t\t\t\t\t\t\t\t$dupCheck[] = implode (' / ',$tmp);\n\t\t\t\t\t\t\t\t\t\t$dupCheck2[] = $tmp2Implode;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$mData['###listline###'] = $this->getListLine($mData);\n\n\t\t\t\t\t\t\t\tif ($i<7 || $i>$maxC-8) {\n\t\t\t\t\t\t\t\t\t$ct .= $this->cObj->substituteMarkerArray($listLine, $mData);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($maxC>19 && $i==6) {\n\t\t\t\t\t\t\t\t\t$ct .= $this->cObj->substituteMarkerArray($headLine, $mHeaders);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($dupCheck)>0 && !$this->deleteAllMode) {\n\t\t\t\t\t\t\t$dups = Array();\n\t\t\t\t\t\t\tfor ($k=0;$k<count($dupCheck);$k++) {\n\t\t\t\t\t\t\t\t$dups[$dupCheck[$k]]++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\twhile ( list($key, $val) = each($dups) ) {\n\t\t\t\t\t\t\t\tif ($val<2) {\n\t\t\t\t\t\t\t\t\tunset($dups[$key]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//- more checks\n\t\t\t\t\t\t\t$where = Array();\n\t\t\t\t\t\t\t$dup2implode = implode(',',$dupCheck2);\n\t\t\t\t\t\t\t$where[] = $dup2implode ? 'concat('.implode(',',$dupFields).') IN ('.$dup2implode.')' : '1=2';\n\t\t\t\t\t\t\t$where[] = 'deleted=0';\n\t\t\t\t\t\t\tif ($settings['replace.']['excludeExpired']) {\n\t\t\t\t\t\t\t\t$where[] = '(endtime=0 OR endtime>'.time().')';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($settings['replace.']['restrict']) {\n\t\t\t\t\t\t\t\t$tmp = t3lib_div::trimExplode(',',$settings['replace.']['restrict']);\n\t\t\t\t\t\t\t\tfor ($k=0;$k<count($tmp);$k++) {\n\t\t\t\t\t\t\t\t\tif (strcmp($tmp[$k],'pid')==0) {\n\t\t\t\t\t\t\t\t\t\t$where[] = 'pid='.intval($import['pid']);\n\t\t\t\t\t\t\t\t\t} else if (strcmp($tmp[$k],'crfeuser_id')==0) {\n\t\t\t\t\t\t\t\t\t\t$where[] = 'crfeuser_id='.intval($this->crfeuser_id);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$select = 'count(*) as cnt, uid, concat('.implode(',',$dupFields).') as dupcheck';\n\t\t\t\t\t\t\t$where = implode (' AND ',$where);\n\t\t\t\t\t\t\t$group = 'concat('.implode(',',$dupFields).')';\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select,$this->workOnTable,$where,$group,'','');\n\t\t\t\t\t\t\t$dupErrors = Array();\n\t\t\t\t\t\t\t$replaceCount = 0;\n\t\t\t\t\t\t\t$m['###LIST_DBERROR###'] = '';\n\t\t\t\t\t\t\tif ($res) {\n\t\t\t\t\t\t\t\twhile ($s = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t\t\t\tif ($s['cnt']==1) {\n\t\t\t\t\t\t\t\t\t\t$replaceCount++;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$dupErrors[] = $s;\n\t\t\t\t\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t\t\t\t\t\t$m['###LIST_DBERROR###'] .= implode(',',$dupFields).' = '.$s['dupcheck'].' '.\n\t\t\t\t\t\t\t\t\t\t\t$this->constObj->getWrap('hot',sprintf($this->constText['imp_descr_dberrorcount_cnt'],$s['cnt'])).\n\t\t\t\t\t\t\t\t\t\t\t' ('.$s['uid'].')<br />';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//t3lib_div::debug(Array('$replaceCount'=>$replaceCount, 'dupErrors'=>$dupErrors, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t$m['###COUNT_DBERROR###'] = count($dupErrors)<1 ? 0 :\n\t\t\t\t\t\t\t\t$this->constObj->getWrap('hot',sprintf($this->constText['imp_descr_dberrorcount_text'],count($dupErrors)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$m['###COUNT_INSERT###'] = $this->countInsert = $m['###TEXT_FILELINES###'] - $replaceCount - count($dupErrors);\n\t\t\t\t\t\t$m['###COUNT_REPLACE###'] = $replaceCount;\n\n\t\t\t\t\t\t$o2File = fopen ('typo3temp/'.$importName.'_pre.txt','wb');\n\t\t\t\t\t\tif($o2File) {\n\t\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t\tif (!$i && $settings['skipFirstRow']) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfwrite ($o2File,$aLines[$i].CRLF);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfclose ($o2File);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$o2File = fopen ('typo3temp/'.$importName.'_repl.txt','wb');\n\t\t\t\t\t\tif($o2File) {\n\t\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t\tif (!$i && $settings['skipFirstRow']) {\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfwrite ($o2File,$aLines[$i].CRLF);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfclose ($o2File);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$ct .= $this->cObj->substituteMarkerArray($headLine, $mHeaders);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###TEXT_FILELINES###'] = '-none-';\n\t\t\t\t\t\t$m['###STATUS_FILELINES###'] = 'ERROR !!';\n\t\t\t\t\t\t$errors = TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] = '-none-';\n\t\t\t\t\t$m['###STATUS_MEDIAZIP###'] = '-';\n\t\t\t\t\tif (is_array($_FILES['mediazip']) && strlen($_FILES['mediazip']['name'])) {\n\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] = $_FILES['mediazip']['name'].'<br />';\n\t\t\t\t\t\tif (strcmp($_FILES['mediazip']['type'],'application/zip')==0 || strcasecmp(substr($_FILES['mediazip']['name'],-4),'.zip')==0) {\n\t\t\t\t\t\t\t$mediaDestPath = t3lib_div::getFileAbsFileName($settings['media.']['tempPath'],1);\n\t\t\t\t\t\t\tif (strlen($mediaDestPath)>5 && substr($mediaDestPath,0,1)=='/') {\n\t\t\t\t\t\t\t\tt3lib_div::mkdir($mediaDestPath);\n\t\t\t\t\t\t\t\t$zip = new ZipArchive;\n\t\t\t\t\t\t\t\t$countOfFilesInSubDirs = 0;\n\t\t\t\t\t\t\t\tif ($zip->open($_FILES['mediazip']['tmp_name']) === TRUE) {\n\t\t\t\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] .= 'Filesize = '.floor(($_FILES['mediazip']['size']+512)/1024).'kBytes<br />';\n\t\t\t\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] .= 'Files = '.$zip->numFiles.'<br />';\n\t\t\t\t\t\t\t\t\t$myCount = 0;\n\t\t\t\t\t\t\t\t\tfor ($i=0; $i<$zip->numFiles;$i++) {\n\t\t\t\t\t\t\t\t\t\t$fileInfo = $zip->statIndex($i);\n\t\t\t\t\t\t\t\t\t\t$slashPos = strrpos(' '.$fileInfo['name'],'/');\n\t\t\t\t\t\t\t\t\t\tif ($slashPos===FALSE) {\n\t\t\t\t\t\t\t\t\t\t\t$myCount++;\n\t\t\t\t\t\t\t\t\t\t\t$zip->extractTo($mediaDestPath,array($fileInfo['name']));\n\t\t\t\t\t\t\t\t\t\t\tt3lib_div::fixPermissions($mediaDestPath.'/'.$fileInfo['name']);\n\t\t\t\t\t\t\t\t\t\t\t$this->debugObj->debugIf('mediazip',Array('Found FileInfo'=>$fileInfo, 'copied to'=>$mediaDestPath,'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$myCount++;\n\t\t\t\t\t\t\t\t\t\t\t$countOfFilesInSubDirs++;\n\t\t\t\t\t\t\t\t\t\t\t$name = substr($fileInfo['name'],$slashPos);\n\t\t\t\t\t\t\t\t\t\t\t$zip->extractTo($mediaDestPath,$fileInfo['name']);\n\t\t\t\t\t\t\t\t\t\t\trename($mediaDestPath.'/'.$fileInfo['name'], $mediaDestPath.'/'.$name);\n\t\t\t\t\t\t\t\t\t\t\tt3lib_div::fixPermissions($mediaDestPath.'/'.$name);\n\t\t\t\t\t\t\t\t\t\t\t$this->debugObj->debugIf('mediazip',Array('Found FileInfo'=>$fileInfo, 'MOVED to'=>$mediaDestPath.'/'.$name,'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ($myCount!=$zip->numFiles) {\n\t\t\t\t\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] .= $this->constObj->getWrap('hot','WARNING: '.($zip->numFiles-$myCount).' Subdirs / Files in SubDirs ignored!');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ($countOfFilesInSubDirs) {\n\t\t\t\t\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] .= $this->constObj->getWrap('hot','WARNING: Zip contained '.$countOfFilesInSubDirs.' Files in Subdirectories! ');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$zip->close();\n\t\t\t\t\t\t\t\t\t$m['###STATUS_MEDIAZIP###'] = 'OK';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$m['###STATUS_MEDIAZIP###'] = $this->constObj->getWrap('hot','FAILED');\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$m['###STATUS_MEDIAZIP###'] = $this->constObj->getWrap('hot','TempPath Error!!');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$m['###STATUS_MEDIAZIP###'] = $this->constObj->getWrap('hot','ERROR');\n\t\t\t\t\t\t\t$m['###TEXT_MEDIAZIP###'] .= $this->constObj->getWrap('hot','Error: Must be *.zip');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$sepError = false;\n\t\t\t\t\tif (count($this->felib->impErrors) && count($aLines)>1) {\n\t\t\t\t\t\t$feb = '';\n\t\t\t\t\t\t$febTmpl = sprintf($this->templateObj->getSubpart($importTmpl,'###PART2_ERROR_INCOMPLETEMESSAGE###'));\n\t\t\t\t\t\t//t3lib_div::debug(Array('$incompLines'=>$incompLines, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\tfor (reset($this->felib->impErrors);$iKey=key($this->felib->impErrors);next($this->felib->impErrors)) {\n\t\t\t\t\t\t\t$feb .= str_replace('###TEXT###',$this->felib->impErrors[$iKey],\n\t\t\t\t\t\t\t\tstr_replace('###NUM###',$iKey,\n\t\t\t\t\t\t\t\t$febTmpl));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count($aLines)<2) {\n\t\t\t\t\t\t\t$errors = 1;\n\t\t\t\t\t\t\t$m['###INCOMPLETEERROR_HEADER###'] =\n\t\t\t\t\t\t\t\tsprintf($this->constObj->getWrap('hot',$this->constText['imp_error_incomplete']),\n\t\t\t\t\t\t\t\tcount($this->felib->impErrors));\n\t\t\t\t\t\t} else if (!$concat) {\n\t\t\t\t\t\t\t$m['###INCOMPLETEERROR_HEADER###'] =\n\t\t\t\t\t\t\t\tsprintf($this->constObj->getWrap('hot',$this->constText['imp_error_incomplete']),\n\t\t\t\t\t\t\t\tcount($this->felib->impErrors));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$m['###INCOMPLETEERROR_HEADER###'] =\n\t\t\t\t\t\t\t\tsprintf($this->constObj->getWrap('warn',$this->constText['imp_warn_incomplete']),\n\t\t\t\t\t\t\t\tcount($this->felib->impErrors));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART2_ERROR_INCOMPLETEMESSAGE###',$feb);\n\t\t\t\t\t} else if (count($this->felib->impErrors) && count($aLines)==1) {\n\t\t\t\t\t\t$errors = 1;\n\t\t\t\t\t\t$sepError = true;\n\t\t\t\t\t\t$m['###STATUS_FILELINES###'] = $this->constObj->getWrap('hot',$this->constText['imp_error_separator']);\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###ERROR_BLOCK_INCOMPLETE###','');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###ERROR_BLOCK_INCOMPLETE###','');\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($sepError) {\n\t\t\t\t\t\t$m['###SHOW_MATCH_LIST###'] =\n\t\t\t\t\t\t\t$this->constObj->getWrap('warn',$this->constText['imp_warn_sep_info']).'<br />'.\n\t\t\t\t\t\t\tsubstr($aLines[0],0,200).'<br />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$listTmpl = $this->cObj->substituteSubpart($listTmpl,'###PART2LISTLINE###',$ct);\n\t\t\t\t\t\t$listTmpl = $this->cObj->substituteSubpart($listTmpl,'###PART2HEADERLINE###','');\n\t\t\t\t\t\t$m['###SHOW_MATCH_LIST###'] = $this->cObj->substituteMarkerArray($listTmpl, $m);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (count($dups)>0) {\n\t\t\t\t\t\t$errors = 1;\n\t\t\t\t\t\t$m['###DUPERROR_HEADER###'] = $this->constObj->getWrap('hot',$this->constText['imp_error_duplicate']);\n\t\t\t\t\t\t$feb = '';\n\t\t\t\t\t\t$febTmpl = $this->templateObj->getSubpart($importTmpl,'###PART2_ERROR_DUPMESSAGE###');\n\t\t\t\t\t\tfor (reset($dups);$iKey=key($dups);next($dups)) {\n\t\t\t\t\t\t\t$feb .= str_replace('###TEXT###',$iKey,\n\t\t\t\t\t\t\t\tstr_replace('###NUM###',$dups[$iKey],\n\t\t\t\t\t\t\t\t$febTmpl));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###PART2_ERROR_DUPMESSAGE###',$feb);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sp = $this->cObj->substituteSubpart($sp,'###ERROR_BLOCK_DUP###','');\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($errors) {\n\t\t\t\t\t\t$m['###SUBMIT###'] = '<input type=\"hidden\" name=\"impSt\" value=\"1\" />'.\n\t\t\t\t\t\t\t'<input type=\"submit\" value=\"'.$this->constText['imp_prev'].'\" />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###SUBMIT###'] = '<input type=\"hidden\" name=\"impSt\" value=\"3\" />'.\n\t\t\t\t\t\t\t'<input type=\"submit\" value=\"'.$this->constText['imp_next'].'\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t$m['###FEUSER_INFO###'] = $this->getFeUserInfo($cfImport);\n\n\t\t\t\t\t$content .= $this->cObj->substituteMarkerArray($sp,$m);\n\t\t\t\t} else if ($importState==3) { // ##################################################################################\n\t\t\t\t\t\t$import = unserialize(urldecode(t3lib_div::_GP('moreimport')));\n\t\t\t\t\t\t$this->getCrFeUser_id ($cfImport,$import);\n\t\t\t\t\t\t$content .= '<form action=\"'.$this->pi_getPageLink($GLOBALS[\"TSFE\"]->id).\n\t\t\t\t\t\t\t'\" enctype=\"multipart/form-data\" method=\"post\">';\n\t\t\t\t\t\t$content .= '<input type=\"hidden\" name=\"id\" value=\"'.$GLOBALS[\"TSFE\"]->id.'\" />';\n\t\t\t\t\t\t$content .= str_replace('###STATE###',$activeState,str_replace('###MAXSTATE###',$totalStates,\n\t\t\t\t\t\t\t$this->cObj->stdWrap($settings['part3'],$settings['part3.'])));\n\t\t\t\t\t\t$content .= '<input type=\"hidden\" name=\"filetype\" value=\"'.$fileType.'\" />';\n\t\t\t\t\t\t$this->deleteAll = t3lib_div::_GP('deleteAll');\n\t\t\t\t\t\t$this->deleteAllMode = (strcmp($this->deleteAll,'own')==0 || strcmp($this->deleteAll,'all')==0);\n\t\t\t\t\t\t$this->debugObj->debugIf('importDelete',Array('$this->deleteAll'=>$this->deleteAll, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t$this->importPid = $import['pid'];\n\t\t\t\t\t\t$quotaParams = t3lib_div::_GP('quota');\n\t\t\t\t\t\t$this->debugObj->debugIf('quota',Array('$quotaParams'=>$quotaParams, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t$content .= '<input type=\"hidden\" name=\"moreimport\" value=\"'.urlencode(serialize($import)).'\" />'.\n\t\t\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"deleteAll\" value=\"'.$this->deleteAll.'\" />'.\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"quota[maxCount]\" value=\"'.intval($quotaParams['maxCount']).'\" />'.\n\t\t\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"quota[exceed]\" value=\"'.intval($quotaParams['exceed']).'\" />';\n\t\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\t\tif (strlen($import['separator'])>0) {\n\t\t\t\t\t\t\tif (strcmp($import['separator'],'tab')==0) {\n\t\t\t\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\t\t\t} else if (strcmp($import['separator'],'pipe')==0) {\n\t\t\t\t\t\t\t\t$separator = \"|\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$separator = $import['separator'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$recode = $import['encoding'] ? $import['encoding'] :$settings['recode'];\n\t\t\t\t\t\t$aLines = $this->felib->getImportFile('typo3temp/'.$importName.'_pre.txt',$minImportFields,$separator,1,'');\n\t\t\t\t\t\t$maxC = count($aLines);\n\n\t\t\t\t\t\tif (is_array($cfImport['global.'])) {\n\t\t\t\t\t\t\t//t3lib_div::debug(Array('$cfImport[global.]'=>$cfImport['global.'], 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\tif (count($cfImport['global.']['replaces.'])) {\n\t\t\t\t\t\t\t\t$eregList = Array();\n\t\t\t\t\t\t\t\t$eregCount = Array();\n\n\t\t\t\t\t\t\t\t$cfIgr = $cfImport['global.']['replaces.'];\n\t\t\t\t\t\t\t\tif (is_array($cfIgr['ereg.'])) {\n\t\t\t\t\t\t\t\t\t//t3lib_div::debug(Array('$cfIgr'=>$cfIgr, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t\t\t\t\t$maxC = count ($aLines);\n\t\t\t\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t\t\t\t$aLines[$i] = newsReplace($cfIgr,$aLines[$i],$eregList,$eregCount);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//t3lib_div::debug(Array('$eregList'=>$eregList, '$eregCount'=>$eregCount, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t\t\t\tif (count($eregCount)>0) {\n\t\t\t\t\t\t\t\t\tksort($eregCount);\n\t\t\t\t\t\t\t\t\t$eregCont = '<table border=1; cellspacing=0 cellpadding=0><tr><td colspan=2><b>Ereg Replace-Count</td></tr>';\n\t\t\t\t\t\t\t\t\tfor (reset($eregCount);$eKey=key($eregCount);next($eregCount)) {\n\t\t\t\t\t\t\t\t\t\t$eregCont .= '<tr><td>'.htmlspecialchars($eKey).'</td><td>'.$eregCount[$eKey].'</td></tr>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$eregCont .= '</table><br />';\n\n\t\t\t\t\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'_eregcount_glob.htm','w');\n\t\t\t\t\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\t\t\t\t\tfwrite ($logfile,$eregCont);\n\t\t\t\t\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content .= '<br />Show <a target=\"_neweregcountlog\" href=\"typo3temp/'.\n\t\t\t\t\t\t\t\t\t\t\t$importName.'_eregcount_glob.htm\">Logfile for Ereg-Replace Counter</a> in new Window.<br />'.$eregCont;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (count($eregList)>0) {\n\t\t\t\t\t\t\t\t\t$eregCont = '<table border=1; cellspacing=0 cellpadding=0><tr><td colspan=2><b>Ereg Replace-List</td></tr>';\n\t\t\t\t\t\t\t\t\tfor (reset($eregList);$eKey=key($eregList);next($eregList)) {\n\t\t\t\t\t\t\t\t\t\t$eregCont .= '<tr><td>'.htmlspecialchars($eKey).'</td><td>'.htmlspecialchars($eregList[$eKey]).'</td></tr>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$eregCont .= '</table><br />';\n\n\t\t\t\t\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'_ereg_glob.htm','w');\n\t\t\t\t\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\t\t\t\t\tfwrite ($logfile,$eregCont);\n\t\t\t\t\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content .= '<br />Show <a target=\"_newereglog\" href=\"typo3temp/'.$importName.'_ereg_glob.htm\">Logfile for Ereg-Replaces</a> in new Window.<br />'.$eregCont;\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$content .= '<b>No global Replaces to perform.</b><br />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$content .= '<br />';\n\t\t\t\t\t\t\tif (count($cfImport['global.']['checks.'])) {\n\t\t\t\t\t\t\t\t$checked = Array();\n\t\t\t\t\t\t\t\tfor (reset($cfImport['global.']['checks.']);$cKey=key($cfImport['global.']['checks.']);next($cfImport['global.']['checks.'])) {\n\t\t\t\t\t\t\t\t\tif (intval($cfImport['global.']['checks.'][$cKey])) {\n\t\t\t\t\t\t\t\t\t\t$checked[$cKey]['title'] = 'Checking for \"href\"';\n\t\t\t\t\t\t\t\t\t\t$checked[$cKey]['count'] = 0;\n\t\t\t\t\t\t\t\t\t\t$checked[$cKey]['list'] = Array();\n\n\t\t\t\t\t\t\t\t\t\t$maxC = count ($aLines);\n\t\t\t\t\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t\t\t\t\t$tPar = explode($separator, $aLines[$i]);\n\t\t\t\t\t\t\t\t\t\t\t$myHref = newsImportHasHref($aLines[$i]);\n\t\t\t\t\t\t\t\t\t\t\tif ($myHref) {\n\t\t\t\t\t\t\t\t\t\t\t\t$checked[$cKey]['count']++;\n\t\t\t\t\t\t\t\t\t\t\t\t$checked[$cKey]['list'][] = Array(($i+1).'.',$tPar[0],$tPar[1],$myHref);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$content .= '<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">';\n\t\t\t\t\t\t\t\t\t$content .= '<tr><td colspan=\"2\"><b>Globals Checks</b></td></tr>';\n\t\t\t\t\t\t\t\t\t$content .= '<tr><td><b>Count</b></td><td><b>Type of Check</b></td></tr>';\n\t\t\t\t\t\t\t\t\tfor (reset($checked);$cKey=key($checked);next($checked)) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<tr><td>'.$checked[$cKey]['count'].'</td><td>'.$checked[$cKey]['title'].'</td></tr>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content .= '</table><br />';\n\n\n\t\t\t\t\t\t\t\t\t$chkCont .= '<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\">';\n\t\t\t\t\t\t\t\t\t$chkCont .= '<tr><td colspan=\"3\"><b>Globals Checks - Details</b></td></tr>';\n\t\t\t\t\t\t\t\t\tfor (reset($checked);$cKey=key($checked);next($checked)) {\n\t\t\t\t\t\t\t\t\t\t$chkCont .= '<tr><td colspan=\"3\">&nbsp;</td></tr>';\n\t\t\t\t\t\t\t\t\t\t$chkCont .= '<tr><td colspan=\"3\"><b>'.$checked[$cKey]['title'].' (Count='.$checked[$cKey]['count'].')</b></td></tr>';\n\t\t\t\t\t\t\t\t\t\tfor ($ll=0;$ll<count($checked[$cKey]['list']);$ll++) {\n\t\t\t\t\t\t\t\t\t\t\t$chkCont .= '<tr><td>'.$checked[$cKey]['list'][$ll][0].'</td>';\n\t\t\t\t\t\t\t\t\t\t\t$chkCont .= '<td>'.$this->divObj->cropHtmlText($checked[$cKey]['list'][$ll][1],10).' - '.\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->divObj->cropHtmlText($checked[$cKey]['list'][$ll][2],22).'</td>';\n\t\t\t\t\t\t\t\t\t\t\t$chkCont .= '<td>'.$this->divObj->cropHtmlText($checked[$cKey]['list'][$ll][3],68).'</td></tr>';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$chkCont .= '</table>';\n\n\t\t\t\t\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'_check_glob.htm','w');\n\t\t\t\t\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\t\t\t\t\tfwrite ($logfile,$chkCont);\n\t\t\t\t\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$content .= '<br />Show <a target=\"_newchecklog\" href=\"typo3temp/'.$importName.\n\t\t\t\t\t\t\t\t\t\t'_check_glob.htm\">Logfile for Checks</a> in new Window.<br />'.$chkCont;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$content .= '<b>No global Checks to perform.</b><br />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$content .= '<b>No global Checks or Replaces</b><br />';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$o2File = fopen ('typo3temp/'.$importName.'_repl.txt','wb');\n\t\t\t\t\t\tif($o2File) {\n\t\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t\tfwrite ($o2File,$aLines[$i].CRLF);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfclose ($o2File);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$content .= '<br /><input type=\"hidden\" name=\"impSt\" value=\"4\" />';\n\t\t\t\t\t\t$content .= '<input type=\"submit\" value=\"Weiter\" />';\n\t\t\t\t\t\t$content .= '</form>';\n\t\t\t\t} else if ($importState==4) { // ##################################################################################\n\t\t\t\t\t$fatalErrors = FALSE;\n\t\t\t\t\t$detailsFormat = '';\n\t\t\t\t\t$detailsLog = '';\n\t\t\t\t\t$detailsInfo = '';\n\t\t\t\t\t$pnConf = $cfImport['notify.'];\n\t\t\t\t\tif (is_array($pnConf)) {\n\t\t\t\t\t\t$detailsFormat = $this->constObj->TSConstConfObj($pnConf,'detailsLine');\n\t\t\t\t\t\t$detailsInfo = $this->constObj->TSConstConfObj($pnConf,'detailsInfo');\n\t\t\t\t\t}\n\n\t\t\t\t\t$sp = $this->templateObj->getSubpart($importTmpl,'###PART4SUMMARY###');\n\t\t\t\t\t$ep = $this->templateObj->getSubpart($importTmpl,'###PART4ERRORS###');\n\t\t\t\t\t$fepBlock = $this->templateObj->getSubpart($importTmpl,'###PART4LISTLINE###');\n\t\t\t\t\t$fepHeader = $this->templateObj->getSubpart($importTmpl,'###PART4HEADERLINE###');\n\t\t\t\t\t$fep = '';\n\t\t\t\t\t$import = unserialize(urldecode(t3lib_div::_GP('moreimport')));\n\t\t\t\t\t$this->getCrFeUser_id ($cfImport,$import);\n\t\t\t\t\t$this->deleteAll = t3lib_div::_GP('deleteAll');\n\t\t\t\t\t$this->deleteAllMode = (strcmp($this->deleteAll,'own')==0 || strcmp($this->deleteAll,'all')==0);\n\t\t\t\t\t$this->debugObj->debugIf('importDelete',Array('$this->deleteAll'=>$this->deleteAll, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t$quotaParams = t3lib_div::_GP('quota');\n\t\t\t\t\t$maxDirect = ($quotaParams['maxCount']-$quotaParams['ownedRecords'])<1 ? 0 : $quotaParams['maxCount']-$quotaParams['ownedRecords'];\n\t\t\t\t\tif ($settings['quota']) {\n\t\t\t\t\t\t$query = $this->workOnTable.'.deleted=0 AND '.$this->workOnTable.'.crfeuser_id='.$this->crfeuser_id;\n\t\t\t\t\t\t$this->oldRecordList = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid',$this->workOnTable,$query,'uid','crdate',$quotaParams['maxCount']); \n\t\t\t\t\t}\n\t\t\t\t\t$this->oldRecordList = (array) $this->oldRecordList;\n\t\t\t\t\t$this->debugObj->debugIf('quota',Array('$quotaParams'=>$quotaParams, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t$this->importPid = $import['pid'];\n\t\t\t\t\t$m['###PARTNUMBER###'] = $this->cObj->stdWrap($settings['part4'],$settings['part4.']);\n\t\t\t\t\t$m['###ACTION###'] = $this->pi_getPageLink($GLOBALS[\"TSFE\"]->id);\n\t\t\t\t\t$m['###HIDDENDATA###'] = '<input type=\"hidden\" name=\"id\" value=\"'.$GLOBALS[\"TSFE\"]->id.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"filetype\" value=\"'.$fileType.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"deleteAll\" value=\"'.$this->deleteAll.'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"quota[maxCount]\" value=\"'.intval($quotaParams['maxCount']).'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"quota[exceed]\" value=\"'.intval($quotaParams['exceed']).'\" />'.\n\t\t\t\t\t\t\t'<input type=\"hidden\" name=\"moreimport\" value=\"'.urlencode(serialize($import)).'\" />'.\n\t\t\t\t\t\t\t'';\n\t\t\t\t\t$m['###STATE###'] = $activeState;\n\t\t\t\t\t$m['###MAXSTATE###'] = $totalStates;\n\t\t\t\t\t$m['###COUNT_DELETE###'] = 0;\n\n\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\tif (strlen($import['separator'])>0) {\n\t\t\t\t\t\tif (strcmp($import['separator'],'tab')==0) {\n\t\t\t\t\t\t\t$separator = \"\\t\";\n\t\t\t\t\t\t} else if (strcmp($import['separator'],'pipe')==0) {\n\t\t\t\t\t\t\t$separator = \"|\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$separator = $import['separator'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$of = fopen ('typo3temp/'.$importName.'.sql','wb');\n\t\t\t\t\tif ($of) {\n\t\t\t\t\t\tfwrite ($of,'# DELETE FROM '.$myFile.' WHERE comment LIKE'.QT.'import %'.QT.\";\\r\\n\");\n\t\t\t\t\t\t$errCount = 0;\n\t\t\t\t\t\t$ewCount = 0;\n\t\t\t\t\t\t$cntArchived = 0;\n\t\t\t\t\t\t$cntNotArchived = 0;\n\t\t\t\t\t\t$cntSaved = 0;\n\t\t\t\t\t\t$cntInsert = 0;\n\t\t\t\t\t\t$cntDeleteForQuota = 0;\n\t\t\t\t\t\t$cntATag = 0;\n\t\t\t\t\t\t$nfSC = Array();\n\t\t\t\t\t\t$errors = Array('e'=>Array(), 'w'=>Array());\n\n\t\t\t\t\t\tif ($settings['deleteExpired']) {\n\t\t\t\t\t\t\t$select = 'uid';\n\t\t\t\t\t\t\t$where = 'deleted=0 AND endtime>0 AND endtime<'.time();\n\t\t\t\t\t\t\t$globalWhere = '';\n\t\t\t\t\t\t\tif ($settings['deleteExpired.']['restrict']) {\n\t\t\t\t\t\t\t\t$tmp = t3lib_div::trimExplode(',',$settings['deleteExpired.']['restrict']);\n\t\t\t\t\t\t\t\tfor ($k=0;$k<count($tmp);$k++) {\n\t\t\t\t\t\t\t\t\tif (strcmp($tmp[$k],'pid')==0) {\n\t\t\t\t\t\t\t\t\t\t$globalWhere .= ' AND pid='.intval($import['pid']);\n\t\t\t\t\t\t\t\t\t} else if (strcmp($tmp[$k],'crfeuser_id')==0) {\n\t\t\t\t\t\t\t\t\t\t$globalWhere .= ' AND crfeuser_id='.intval($this->crfeuser_id);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select,$this->workOnTable,$where.$globalWhere,'','','');\n\t\t\t\t\t\t\t$m['###COUNT_DELETE###'] = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\t\t\t\t\t$tmp = 'UPDATE '.$this->workOnTable.' SET deleted=1 WHERE '.$where;\n\t\t\t\t\t\t\t//t3lib_div::debug(Array('$tmp'=>$tmp, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\tfwrite ($of,'# '.$tmp.\";\\r\\n\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// $aLines = file ('typo3temp/'.$importName.'.txt');\n\t\t\t\t\t\t$recode = $import['encoding'] ? $import['encoding'] :$settings['recode'];\n\t\t\t\t\t\t$aLines = $this->felib->getImportFile('typo3temp/'.$importName.'_repl.txt',\t$minImportFields,$separator,1,'');\n\n\t\t\t\t\t\t//t3lib_div::debug(Array('count($aLines)'=>count($aLines), 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t// CHECK for replacing data\n\t\t\t\t\t\t$dupFields = ($settings['replace.']['byFields']) ?\n\t\t\t\t\t\t\tt3lib_div::trimExplode(',',$settings['replace.']['byFields']) : '';\n\n\t\t\t\t\t\t$myReplaces = Array();\n\t\t\t\t\t\t$toReplace = Array();\n\t\t\t\t\t\t$noReplace = Array();\n\t\t\t\t\t\tif (is_array($dupFields)) {\n\t\t\t\t\t\t\tfor ($i=0;$i<count($aLines);$i++) {\n\t\t\t\t\t\t\t\t$tPar = explode($separator, $aLines[$i]);\n\n\t\t\t\t\t\t\t\t$myData = Array();\n\t\t\t\t\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t\t\t\t\t$xKey = str_replace('.','',$key);\n\t\t\t\t\t\t\t\t\tif (count($fields[$key]['id'])>0 && intval($fields[$key]['id'][0])>0) {\n\t\t\t\t\t\t\t\t\t\t$myVal = $this->newsGetImportFields ($fields,$key,$xKey,$tPar,$myData,$mData,$fields[$key]['preprocess']);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$myData[str_replace('.','',$key)] = $this->doFieldPreprocess($fields[$key],$fields[$key]['preprocess']);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$tmp = Array();\n\t\t\t\t\t\t\t\tfor ($k=0;$k<count($dupFields);$k++) {\n\t\t\t\t\t\t\t\t\t$d = $myData[$dupFields[$k]];\n\t\t\t\t\t\t\t\t\tif (!is_array($d)) {\n\t\t\t\t\t\t\t\t\t\t$tmp[] = $d;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$tmp = QT.implode ('',$tmp).QT;\n\t\t\t\t\t\t\t\tif (strlen($tmp)>2) {\n\t\t\t\t\t\t\t\t\t$myReplaces[] = $tmp;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$where = Array();\n\t\t\t\t\t\t\t$myReplacesImplode = implode(',',$myReplaces);\n\t\t\t\t\t\t\t$where[] = $myReplacesImplode ? 'concat('.implode(',',$dupFields).') IN ('.$myReplacesImplode.')' : '1=2';\n\t\t\t\t\t\t\t$where[] = 'deleted=0';\n\t\t\t\t\t\t\tif ($settings['replace.']['excludeExpired']) {\n\t\t\t\t\t\t\t\t$where[] = '(endtime=0 OR endtime>'.time().')';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($settings['replace.']['restrict']) {\n\t\t\t\t\t\t\t\t$tmp = t3lib_div::trimExplode(',',$settings['replace.']['restrict']);\n\t\t\t\t\t\t\t\tfor ($k=0;$k<count($tmp);$k++) {\n\t\t\t\t\t\t\t\t\tif (strcmp($tmp[$k],'pid')==0) {\n\t\t\t\t\t\t\t\t\t\t$where[] = 'pid='.intval($import['pid']);\n\t\t\t\t\t\t\t\t\t} else if (strcmp($tmp[$k],'crfeuser_id')==0) {\n\t\t\t\t\t\t\t\t\t\t$where[] = 'crfeuser_id='.intval($this->crfeuser_id);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$select = 'count(*) as cnt, uid, concat('.implode(',',$dupFields).') as dupcheck';\n\t\t\t\t\t\t\t$where = implode (' AND ',$where);\n\t\t\t\t\t\t\t$group = 'concat('.implode(',',$dupFields).')';\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select,$this->workOnTable,$where,$group,'','');\n\t\t\t\t\t\t\t$replaceCount = 0;\n\t\t\t\t\t\t\t$dupLines = 0;\n\t\t\t\t\t\t\t$m['###LIST_DBERROR###'] = '';\n\t\t\t\t\t\t\tif ($res) {\n\t\t\t\t\t\t\t\twhile ($s = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t\t\t\tif ($s['cnt']==1) {\n\t\t\t\t\t\t\t\t\t\t//$replaceCount++;\n\t\t\t\t\t\t\t\t\t\t$toReplace[$s['dupcheck']] = $s['dupcheck'];\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$dupLines++;\n\t\t\t\t\t\t\t\t\t\t$noReplace[$s['dupcheck']] = $s['dupcheck'];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m['###COUNT_REPLACE###'] = $replaceCount;\n\t\t\t\t\t\t\t$m['###COUNT_INSERT###'] = $this->countInsert = count($myReplaces)-$replaceCount-$dupLines;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// read foreign tables\n\t\t\t\t\t\t$foreign = Array();\n\t\t\t\t\t\t$altForeign = Array();\n\t\t\t\t\t\t$unique = Array();\n\t\t\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t\t\t$xKey = str_replace('.','',$key);\n\t\t\t\t\t\t\tif (isset($fields[$key]['check']) && stristr($fields[$key]['check'],'unique')) {\n\t\t\t\t\t\t\t\t$unique[$xKey] = Array();\n\t\t\t\t\t\t\t\t$query = 'pid=0 OR pid='.intval($import['pid']);\n\t\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($xKey,$this->PCA['table'],$query);\n\t\t\t\t\t\t\t\tif ($err=$GLOBALS['TYPO3_DB']->sql_error()) {\n\t\t\t\t\t\t\t\t\tt3lib_div::debug(Array('Select='=>$xKey, 'Table='=>$this->PCA['table'], \"Query=\"=>$query, \"Res=\"=>$res, \"Error=\"=>$err ));\n\t\t\t\t\t\t\t\t} else if (!t3lib_div::inArray($dupFields,substr($key,0,-1))) {\n\t\t\t\t\t\t\t\t\t//t3lib_div::debug(Array(\"Query=\"=>$query, \"Res=\"=>$res, \"Count=\"=>$GLOBALS['TYPO3_DB']->sql_num_rows($res) ));\n\t\t\t\t\t\t\t\t\twhile ($row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t\t\t\t\t$unique[$xKey][strtolower($row[$xKey])]++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//for ($i=0;$i<250;$i++) {\n\t\t\t\t\t\t\t\tfor ($i=0;$i<count($aLines);$i++) {\n\t\t\t\t\t\t\t\t\t$tPar = explode($separator, $aLines[$i]);\n\t\t\t\t\t\t\t\t\t$unique[$xKey][strtolower($tPar[$fields[$key]['id'][0]-1])]++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($fields[$key]['eval']) && strcmp($fields[$key]['eval'],'foreign')==0) {\n\t\t\t\t\t\t\t\t$this->itemsObj->prepareItems($this->PCA['table'],$xKey,0,$row);\n\t\t\t\t\t\t\t\t$tmp = $this->itemsObj->getItemList($this->PCA['table'],$xKey,0);\n\t\t\t\t\t\t\t\t$foreign[$xKey] = Array();\n\t\t\t\t\t\t\t\tfor (reset($tmp);$tKey=key($tmp);next($tmp)) {\n\t\t\t\t\t\t\t\t\t$foreign[$xKey][strtolower($tmp[$tKey])] = intval($tKey);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (isset($fields[$key]['altforeign'])) {\n\t\t\t\t\t\t\t\t$myTmp = $this->PCA['conf'][$xKey]['foreign']['label'];\n\t\t\t\t\t\t\t\t$this->PCA['conf'][$xKey]['foreign']['label'] = $fields[$key]['altforeign'];\n\t\t\t\t\t\t\t\t$this->itemsObj->prepareItems($this->PCA['table'],$xKey,0,$row);\n\t\t\t\t\t\t\t\t$tmp = $this->itemsObj->getItemList($this->PCA['table'],$xKey,0);\n\t\t\t\t\t\t\t\t$altForeign[$xKey] = Array();\n\t\t\t\t\t\t\t\tfor (reset($tmp);$tKey=key($tmp);next($tmp)) {\n\t\t\t\t\t\t\t\t\t$altForeign[$xKey][strtolower($tmp[$tKey])] = intval($tKey);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->PCA['conf'][$xKey]['foreign']['label'] = $myTmp;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//t3lib_div::debug(Array('$altForeign'=>$altForeign, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t\t// Show Headers\n\t\t\t\t\t\t$fep = $this->cObj->substituteMarkerArray($fepHeader, $mHeaders);\n\t\t\t\t\t\t$fepLCnt = 0;\n\n\t\t\t\t\t\t$lastId = 0;\n\t\t\t\t\t\t$eregList = Array();\n\t\t\t\t\t\t$eregCount = Array();\n\n\t\t\t\t\t\tif (count($this->felib->impErrors)) {\n\t\t\t\t\t\t\t$tmpStr = $this->constText['imp_warn_incomplete'];\n\t\t\t\t\t\t\t$errors['w'][$tmpStr] = count($this->felib->impErrors);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//for ($i=0;$i<250;$i++) {\n\t\t\t\t\t\t$maxC = count($aLines);\n\t\t\t\t\t\tfor ($i=0;$i<$maxC;$i++) {\n\t\t\t\t\t\t\t$tmpMode = '???';\n\t\t\t\t\t\t\t$isError = FALSE;\n\t\t\t\t\t\t\t$isWarning = FALSE;\n\t\t\t\t\t\t\t$errText = Array ('e'=>'', 'w'=>'');\n\n\t\t\t\t\t\t\t$tPar = explode($separator, $aLines[$i]);\n\t\t\t\t\t\t\t$myData = Array();\n\t\t\t\t\t\t\t$mData = Array();\n\t\t\t\t\t\t\t$orgData = Array();\n\t\t\t\t\t\t\t// now create data for INSERT statement\n\t\t\t\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t\t\t\t$xKey = str_replace('.','',$key);\n\t\t\t\t\t\t\t\t$myVal = '';\n\t\t\t\t\t\t\t\tif (count($fields[$key]['id'])>0 && intval($fields[$key]['id'][0])>0) {\n\t\t\t\t\t\t\t\t\t$myVal = $this->newsGetImportFields ($fields,$key,$xKey,$tPar,$myData,$mData,$fields[$key]['preprocess']);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (isset($fields[$key]['set'])) {\n\n\t\t\t\t\t\t\t\t\t\t$mySet = $fields[$key]['set'];\n\t\t\t\t\t\t\t\t\t\tif (strlen($mySet)<1) {\n\t\t\t\t\t\t\t\t\t\t\t$mySet = '';\n\t\t\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'input',5)==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $import['input'][intval(substr($mySet,5)).'.'];\n\t\t\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'time')==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $import['tstamp'];\n\t\t\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'pid')==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $import['pid'];\n\t\t\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'feuser')==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $import['feuser'];\n\t\t\t\t\t\t\t\t\t\t} else if (strcmp($mySet,'empty')==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = '';\n\t\t\t\t\t\t\t\t\t\t} else if (strncmp($mySet,'CONST:',6)==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = str_replace('###time###',date('His',$myTime),str_replace('###date###',date('Ymd',$myTime),\n\t\t\t\t\t\t\t\t\t\t\t\tsubstr($mySet,6)));\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $mySet;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = '';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($fields[$key]['cutLen'])) {\n\t\t\t\t\t\t\t\t\t$ml = intval($fields[$key]['cutLen']);\n\t\t\t\t\t\t\t\t\tif ($ml && strlen($myVal)>$ml) {\n\t\t\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$myVal = substr($myVal,0,$ml);\n\t\t\t\t\t\t\t\t\t\t\t$myData[$xKey] = $myVal;\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_cutoffstr'],$xKey,$ml);\n\t\t\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_cutoff'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$myVal = $this->doFieldPreprocess($myVal,$fields[$key]['preprocess']);\n\t\t\t\t\t\t\t\tif ($fields[$key]['preprocess']) {\n\t\t\t\t\t\t\t\t\t$myData[$xKey] = $myVal;\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t$mData['###org_'.$xKey.'###'] = $myVal;\n\t\t\t\t\t\t\t\t$orgData[$xKey] = $myVal;\n\t\t\t\t\t\t\t\t$myVal = str_replace(\"\\x0b\",\"\\n\",$myVal);\n\t\t\t\t\t\t\t\tif (is_array($fields[$key]['replace.'])) {\n\t\t\t\t\t\t\t\t\t$myVal = newsReplace($fields[$key]['replace.'],$myVal,$eregList,$eregCount);\n\t\t\t\t\t\t\t\t\t$myData[$xKey] = $myVal;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($fields[$key]['eval'])) {\n\t\t\t\t\t\t\t\t\t$myVal = str_replace(\"\\x0b\",\"\\n\",$myData[$xKey]);\n\t\t\t\t\t\t\t\t\t$myOldVal = str_replace(\"\\x0b\",\"\\n\",$myVal);\n\t\t\t\t\t\t\t\t\tswitch($fields[$key]['eval']) {\n\t\t\t\t\t\t\t\t\t\tcase 'foreign':\n\t\t\t\t\t\t\t\t\t\t\tif (strlen($myVal)<1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $foreign[$xKey][strtolower($myOldVal)];\n\t\t\t\t\t\t\t\t\t\t\t\tif (intval($myVal)==0 && isset($fields[$key]['altforeign'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $altForeign[$xKey][strtolower($myOldVal)];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif (intval($myVal)==0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_unknown'],$xKey,$myOldVal);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($fields[$key]['iferror'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $fields[$key]['iferror'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t\t\t\t\t\tif (strlen($myVal)<1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $this->felib->dateStringToTime($myVal);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($myVal<1 || $this->felib->lastCheckError) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_novaliddate'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($fields[$key]['iferror'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $fields[$key]['iferror'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.' (\"'.$myOldVal.'\")<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.' (\"'.$myOldVal.'\")<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'time':\n\t\t\t\t\t\t\t\t\t\t\tif (strlen($myVal)<1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = 0;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $this->felib->timeStringToTime($myVal);\n\t\t\t\t\t\t\t\t\t\t\t\tif ($myVal<1 || $this->felib->lastCheckError) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_novalidtime'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (isset($fields[$key]['iferror'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $fields[$key]['iferror'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.' (\"'.$myOldVal.'\")<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.' (\"'.$myOldVal.'\")<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tcase 'media':\n\t\t\t\t\t\t\t\t\t\t\tif (trim($myVal)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$myVal = $this->getMediaList($myVal,$myData,$settings,$errText,$errors,$isError,$isWarning);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\t$myVal .= '<font color=#c0c000>'.$fields[$key]['eval'].'</font>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$myData[$xKey] = $myVal;\n\t\t\t\t\t\t\t\t\t$mData['###'.$xKey.'###'] = $myVal;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$tmp = count_chars($myVal,1);\n\t\t\t\t\t\t\t\tunset($tmp[10]);\n\t\t\t\t\t\t\t\tunset($tmp[13]);\n\t\t\t\t\t\t\t\tif (count($tmp)>0 && key($tmp)<32) {\n\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_containsctrl'],$xKey);\n\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($fields[$key]['check'])) {\n\t\t\t\t\t\t\t\t\t$myCheck = explode(',',$fields[$key]['check']);\n\t\t\t\t\t\t\t\t\tfor ($k=0;$k<count($myCheck);$k++) {\n\t\t\t\t\t\t\t\t\t\t//t3lib_div::debug(Array('check'=>$fields[$key]['check'], '$myCheck['.$k.']'=>$myCheck[$k], 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'checkhref')==0) {\n\t\t\t\t\t\t\t\t\t\t\t$myHref = newsImportHasHref($myVal);\n\t\t\t\t\t\t\t\t\t\t\tif ($myHref) {\n\t\t\t\t\t\t\t\t\t\t\t\t$isWarning = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_warn_containsx'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t$errText['w'] .= $tmpStr.' '.htmlspecialchars($myHref).'<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = $tmpStr.' href';\n\t\t\t\t\t\t\t\t\t\t\t\t$errors['w'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'notempty')==0 && strlen($myVal)<1) {\n\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isempty'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'numeric')==0 && $myVal && 'x'.intval($myVal)!='x'.$myVal) {\n\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isnotnumeric'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'notnull')==0 && intval($myVal)==0) {\n\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isnull'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'unique')==0 && $unique[$xKey][strtolower($myVal)]>1) {\n\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isnotunique'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'(\"'.$myVal.'\")<br />';\n\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (strcmp($myCheck[$k],'email')==0) {\n\t\t\t\t\t\t\t\t\t\t\tif (strlen($myVal)<1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isempty'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t} else if (substr_count($myVal,\"@\")!=1) {\n\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_isinvalid'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.' (@)<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//t3lib_div::debug(Array('$myData'=>$myData, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t$this->importPreProcess($myData,$tPar,$cfImport);\n\n\t\t\t\t\t\t\t// check if endtime is in the past\n\t\t\t\t\t\t\tif (intval($myData['endtime'])>0 && intval($myData['endtime'])<time()) {\n\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_expired']);\n\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.' '.date('d.m.Y',intval($myData['endtime'])).'<br />';\n\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!$isError) {\n\t\t\t\t\t\t\t\t$uidMode = FALSE;\n\t\t\t\t\t\t\t\t$s = Array();\n\t\t\t\t\t\t\t\t$q = Array();\n\t\t\t\t\t\t\t\t$u = Array();\n\t\t\t\t\t\t\t\tfor (reset($myData);$key=key($myData);next($myData)) {\n\t\t\t\t\t\t\t\t\t$s[] = $key;\n\t\t\t\t\t\t\t\t\t$myVal = str_replace(\"\\x0b\",'\\n',$myData[$key]);\n\t\t\t\t\t\t\t\t\t$q[] = QT.str_replace(QT,DQT,$myVal).QT;\n\t\t\t\t\t\t\t\t\t$u[$key] = $key.'='.QT.str_replace(QT,DQT,$myVal).QT;\n\t\t\t\t\t\t\t\t\tif (strcmp($key,'uid')==0) {\n\t\t\t\t\t\t\t\t\t\t$uidMode = TRUE;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// $toReplace $noReplace;\n\t\t\t\t\t\t\t\t$doReplace = FALSE;\n\t\t\t\t\t\t\t\t$doNothing = FALSE;\n\t\t\t\t\t\t\t\t$check = 'xz/jksehd jkhjkdsfjktz78d';\n\t\t\t\t\t\t\t\tif (is_array($dupFields) && !$this->deleteAllMode) {\n\t\t\t\t\t\t\t\t\t$check = '';\n\t\t\t\t\t\t\t\t\tfor ($k=0;$k<count($dupFields);$k++) {\n\t\t\t\t\t\t\t\t\t\t$check .= $myData[$dupFields[$k]];\n\t\t\t\t\t\t\t\t\t\tunset($u[$dupFields[$k]]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (strcmp($check,$toReplace[$check])==0) {\n\t\t\t\t\t\t\t\t\t\t$doReplace = TRUE;\n\t\t\t\t\t\t\t\t\t} else if (strcmp($check,$noReplace[$check])==0) {\n\t\t\t\t\t\t\t\t\t\t$doNothing = TRUE;\n\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t$tmpStr = $this->constText['imp_error_dberror'];\n\t\t\t\t\t\t\t\t\t\t$errText['e'] .= implode('/',$dupFields).' = '.$check.': '.$tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t$errors['e'][implode('/',$dupFields).' = '.$check.': '.$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t$tmpMode = 'DBERROR';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($doNothing) {\n\t\t\t\t\t\t\t\t\t$query = '# NOTHING INTO '.$myFile.' ( '.implode(',',$s).') VALUES ( '.implode(',',$q).');';\n\t\t\t\t\t\t\t\t} else if ($doReplace) {\n\t\t\t\t\t\t\t\t\t$replaceCount++;\n\t\t\t\t\t\t\t\t\t$tmpMode = 'REPLACE';\n\t\t\t\t\t\t\t\t\t$query = 'UPDATE '.$myFile.' SET '.implode(',',$u).' '.\n\t\t\t\t\t\t\t\t\t\t'WHERE CONCAT('.implode('',$dupFields).')='.QT.$check.QT.$globalWhere.';';\n\t\t\t\t\t\t\t\t} else if ($uidMode || $cfImport['noUid']) {\n\t\t\t\t\t\t\t\t\t$tmpMode = 'INSERT';\n\t\t\t\t\t\t\t\t\t$cntInsert++;\n\t\t\t\t\t\t\t\t\t$query = 'INSERT INTO '.$myFile.' ( '.implode(',',$s).') VALUES ( '.implode(',',$q).');';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tmpMode = 'INSERT';\n\t\t\t\t\t\t\t\t\t$cntInsert++;\n\t\t\t\t\t\t\t\t\t$query = 'INSERT INTO '.$myFile.' ( uid,'.implode(',',$s).') VALUES ( NULL,'.implode(',',$q).');';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$quotaMode = '';\n\t\t\t\t\t\t\t\tif ($tmpMode=='INSERT' && $settings['quota']) {\n\n\t\t\t\t\t\t\t\t\tif ($settings['quota']) {\n\t\t\t\t\t\t\t\t\t\tif ($cntInsert>$maxDirect) {\n\t\t\t\t\t\t\t\t\t\t\t// t3lib_div::debug(Array('$cntInsert'=>$cntInsert, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t\t\t\t\tif ($quotaParams['exceed'] && $cntInsert<=$quotaParams['maxCount']) {\n\t\t\t\t\t\t\t\t\t\t\t\tif (intval($this->oldRecordList[$cntDeleteForQuota]['uid'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$query .= \"\\r\\n\".'DELETE FROM '.$myFile.' WHERE uid='.intval($this->oldRecordList[$cntDeleteForQuota]['uid']).';';\n\t\t\t\t\t\t\t\t\t\t\t\t\t$quotaMode = ' DELETE : uid='.intval($this->oldRecordList[$cntDeleteForQuota]['uid']);\n\t\t\t\t\t\t\t\t\t\t\t\t\t// t3lib_div::debug(Array('delete rec '.$cntDeleteForQuota=>$this->oldRecordList[$cntDeleteForQuota], '$query'=>$query, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cntDeleteForQuota++;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_error_exceedquota'],$xKey);\n\t\t\t\t\t\t\t\t\t\t\t\t$errText['e'] .= $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (!$isError) {\n\t\t\t\t\t\t\t\t\tif (fwrite($of, $query.\"\\r\\n\")) {\n\t\t\t\t\t\t\t\t\t\tif (!$doNothing) {\n\t\t\t\t\t\t\t\t\t\t\t$cntSaved++;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// check mm_data\n\t\t\t\t\t\t\t\t\t\tfor (reset($fields);$key=key($fields);next($fields)) {\n\t\t\t\t\t\t\t\t\t\t\tif (is_array($fields[$key]['mm.'])) {\n\t\t\t\t\t\t\t\t\t\t\t\t$fgTable = $fields[$key]['mm.']['table'];\n\t\t\t\t\t\t\t\t\t\t\t\t$fgLocal = $fields[$key]['mm.']['local'];\n\t\t\t\t\t\t\t\t\t\t\t\tif ($fgTable && $fgLocal) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$fgLocalId = intval($myData[$fgLocal]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t$fgForId = explode (',',$myData[str_replace('.','',$key)]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//t3lib_div::debug(Array('$fgForId='=>$fgForId,'$fgLocalId'=>$fgLocalId ));\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($i4=0;$i4<count($fgForId);$i4++) if (intval($fgForId[$i4])) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$query = 'INSERT INTO '.$fgTable.' ( uid_local,uid_foreign ) '.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'VALUES ( '.$fgLocalId.', '.$fgForId[$i4].' );';\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfwrite($of, $query.\"\\r\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t\t\t$tmpStr = $this->constText['imp_error_writeerror_sql'];\n\t\t\t\t\t\t\t\t\t\t$errText['e'] = $tmpStr.'<br />';\n\t\t\t\t\t\t\t\t\t\t$errors['e'][$tmpStr]++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($isError) {\n\t\t\t\t\t\t\t\t$tmpMode = 'ERROR';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($isError || $isWarning) {\n\t\t\t\t\t\t\t\t$ewCount++;\n\t\t\t\t\t\t\t\tif ($isError) {\n\t\t\t\t\t\t\t\t\t$errCount++;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$mData['###id###'] = ($i+1);\n\t\t\t\t\t\t\t\t$mData['###errorcounter###'] = $isError ? '('.$this->constObj->getWrap('hot',$errCount).')' : '';\n\t\t\t\t\t\t\t\t$mData['###errormessages###'] = '';\n\t\t\t\t\t\t\t\tif ($errText['e']) {\n\t\t\t\t\t\t\t\t\t$mData['###errormessages###'] .= $this->constObj->getWrap('hot',$errText['e']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ($errText['w']) {\n\t\t\t\t\t\t\t\t\t$mData['###errormessages###'] .= $this->constObj->getWrap('warn',$errText['w']);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$mData['###listline###'] = $this->getListLine($mData);\n\t\t\t\t\t\t\t\t$fep .= $this->cObj->substituteMarkerArray($fepBlock, $mData);\n\t\t\t\t\t\t\t\t$fepLCnt++;\n\t\t\t\t\t\t\t\tif (fmod($ewCount,10.0)<0.005) {\n\t\t\t\t\t\t\t\t\t$fep .= $this->cObj->substituteMarkerArray($fepHeader, $mHeaders);\n\t\t\t\t\t\t\t\t\t$fepLCnt = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t//\t\t\t\t\t\tif (intval($tPar[0])>0) { $lastId = substr($tPar[0],0,6); }\n\t//\t\t\t\t\t\tif ($errCount>($cntSaved / 5) + 20) { $i = count($aLines)+10; }\n\n\t\t\t\t\t\t\tif ($quotaMode) {\n\t\t\t\t\t\t\t\t$tmp = sprintf ($detailsInfo,($i+1),$quotaMode);\n\t\t\t\t\t\t\t\t$detailsLog .= $tmp.CRLF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$tmp = sprintf ($detailsInfo,($i+1),$tmpMode);\n\t\t\t\t\t\t\t$line = $this->cObj->substituteMarkerArray($detailsFormat, $myData, '###|###');\n\t\t\t\t\t\t\t$detailsLog .= str_replace('###detailsline###',$tmp,$line).CRLF;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cntDeleteAll = 0;\n\t\t\t\t\t\t$delCommand = strtolower($cfImport['settings.']['deleteAll']);\n\t\t\t\t\t\tif (strncmp($delCommand,'query',5)==0) {\n\t\t\t\t\t\t\t$delCommand = trim($this->deleteAll);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (strcmp($delCommand,'own')==0) {\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($cfImport['noUid'] ? '*' : 'uid',$this->workOnTable,'crfeuser_id='.$this->crfeuser_id);\n\t\t\t\t\t\t\t$cntDeleteAll = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\t\t\t\t} else if (strcmp($delCommand,'all')==0) {\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($cfImport['noUid'] ? '*' : 'uid',$this->workOnTable,'1=1');\n\t\t\t\t\t\t\t$cntDeleteAll = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->debugObj->debugIf('delCommand',Array('$delCommand'=>$delCommand, 'crfeuser_id'=>$this->crfeuser_id, '$cntDeleteAll'=>$cntDeleteAll, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t$m['###COUNT_DELETE_ALL###'] = $cntDeleteAll;\n\n\n\t\t\t\t\t\tksort ($errors['e']);\n\t\t\t\t\t\t$m['###COUNT_TOTAL###'] = count($aLines);\n\t\t\t\t\t\t$m['###COUNT_SAVE###'] = $cntSaved;\n\t\t\t\t\t\t$m['###COUNT_ERROR###'] = $errCount;\n\t\t\t\t\t\t$m['###COUNT_WARNING###'] = count($errors['w']);\n\t\t\t\t\t\t$m['###LIST_WARNINGS###'] = '';\n\t\t\t\t\t\t$m['###LIST_ERRORS###'] = '';\n\t\t\t\t\t\t$m['###MAILLIST_WARNINGS###'] = '';\n\t\t\t\t\t\t$m['###MAILLIST_ERRORS###'] = '';\n\t\t\t\t\t\tif (count($errors['e'])>0) {\n\t\t\t\t\t\t\t$m['###LIST_ERRORS###'] = '<table border=0 cellspacing=0 cellpadding=0>';\n\t\t\t\t\t\t\t$m['###MAILLIST_ERRORS###'] = $this->constText['imp_error_mailheader'].CRLF;\n\t\t\t\t\t\t\tfor (reset($errors['e']);$key=key($errors['e']);next($errors['e'])) {\n\t\t\t\t\t\t\t\t$m['###LIST_ERRORS###'] .= '<tr><td valign=\"top\" align=\"right\">'.$errors['e'][$key].'&nbsp;</td><td>'.$key.'</td></tr>';\n\t\t\t\t\t\t\t\t$m['###MAILLIST_ERRORS###'] .= '- '.$key.': '.$errors['e'][$key].CRLF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m['###LIST_ERRORS###'] .= '</table>';\n\t\t\t\t\t\t\t$m['###MAILLIST_ERRORS###'] .= CRLF;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$m['###LIST_ERRORS###'] .= '&nbsp;';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count($errors['w'])>0) {\n\t\t\t\t\t\t\t$m['###LIST_WARNINGS###'] = '<table border=0 cellspacing=0 cellpadding=0>';\n\t\t\t\t\t\t\t$m['###MAILLIST_WARNINGS###'] = $this->constText['imp_warn_mailheader'].CRLF;\n\t\t\t\t\t\t\tfor (reset($errors['w']);$key=key($errors['w']);next($errors['w'])) {\n\t\t\t\t\t\t\t\t $m['###LIST_WARNINGS###'] .= '<tr><td align=\"right\">'.$errors['w'][$key].'&nbsp;</td><td>'.$key.'</td></tr>';\n\t\t\t\t\t\t\t\t $m['###MAILLIST_WARNINGS###'] .= '- '.$key.': '.$errors['w'][$key].CRLF;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$m['###LIST_WARNINGS###'] .= '</table>';\n\t\t\t\t\t\t\t$m['###MAILLIST_WARNINGS###'] .= CRLF;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$m['###LIST_WARNINGS###'] .= '&nbsp;';\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tif ($ewCount>0) {\n\t\t\t\t\t\t\tfor (reset($foreign);$key=key($foreign);next($foreign)) {\n\t\t\t\t\t\t\t\t$content .= '<table border=1; cellspacing=0 cellpadding=0><tr><td colspan=2><b>Selectlist ('.$key.')</td></tr>';\n\t\t\t\t\t\t\t\t\tfor (reset($foreign[$key]);$xKey=key($foreign[$key]);next($foreign[$key])) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<tr><td>'.$xKey.'</td><td>'.$foreign[$key][$xKey].'</td></tr>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$content .= '</table><br />';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (reset($altForeign);$key=key($altForeign);next($altForeign)) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfclose ($of);\n\n\n\t\t\t\t\t\tif (count($eregList)>0) {\n\t\t\t\t\t\t\t$eregCont = '<table border=1; cellspacing=0 cellpadding=0><tr><td colspan=2><b>Ereg Replace-List</td></tr>';\n\t\t\t\t\t\t\tfor (reset($eregList);$eKey=key($eregList);next($eregList)) {\n\t\t\t\t\t\t\t\t$eregCont .= '<tr><td>'.htmlspecialchars($eKey).'</td><td>'.htmlspecialchars($eregList[$eKey]).'</td></tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$eregCont .= '</table><br />';\n\n\t\t\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'_ereg.htm','w');\n\t\t\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\t\t\tfwrite ($logfile,$eregCont);\n\t\t\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$content .= '<br />Show <a target=\"_newereglog\" href=\"typo3temp/'.$importName.'_ereg.htm\">Logfile for Ereg-Replaces</a> in new Window.<br />'.$eregCont;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (count($eregCount)>0) {\n\t\t\t\t\t\t\tksort($eregCount);\n\t\t\t\t\t\t\t$eregCont = '<table border=1; cellspacing=0 cellpadding=0><tr><td colspan=2><b>Ereg Replace-Count</td></tr>';\n\t\t\t\t\t\t\tfor (reset($eregCount);$eKey=key($eregCount);next($eregCount)) {\n\t\t\t\t\t\t\t\t$eregCont .= '<tr><td>'.htmlspecialchars($eKey).'</td><td>'.$eregCount[$eKey].'</td></tr>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$eregCont .= '</table><br />';\n\n\t\t\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'_eregcount.htm','w');\n\t\t\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\t\t\tfwrite ($logfile,$eregCont);\n\t\t\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$content .= '<br />Show <a target=\"_neweregcountlog\" href=\"typo3temp/'.\n\t\t\t\t\t\t\t\t\t$importName.'_eregcount.htm\">Logfile for Ereg-Replace Counter</a> in new Window.<br />'.$eregCont;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$content .= sprintf($this->constText['imp_error_writeerror_fname'],\n\t\t\t\t\t\t\t'typo3temp/'.$importName.'.sql').'<br />';\n\t\t\t\t\t\t$fatalErrors = TRUE;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($fepLCnt>5) {\n\t\t\t\t\t\t// Show Headers\n\t\t\t\t\t\t$fep .= $this->cObj->substituteMarkerArray($fepHeader, $mHeaders);\n\t\t\t\t\t}\n\n\n\t\t\t\t\tif ($fatalErrors) {\n\t\t\t\t\t\t$m['###SUBMIT###'] = '<input type=\"hidden\" name=\"impSt\" value=\"'.\n\t\t\t\t\t\t\t($settings['skip3'] ? 2 : 3).'\" />'.\n\t\t\t\t\t\t\t'<input type=\"submit\" value=\"'.$this->constText['imp_prev'].'\" />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m['###SUBMIT###'] = '<input type=\"hidden\" name=\"impSt\" value=\"5\" />'.\n\t\t\t\t\t\t\t'<input type=\"submit\" value=\"'.$this->constText['imp_next'].'\" />';\n\t\t\t\t\t}\n\n\t\t\t\t\t$m['###BUTTON_SHOWLOG###'] = '';\n\t\t\t\t\t$m['###COUNT_INSERT###'] = $this->countInsert = $cntInsert;\n\t\t\t\t\t$m['###COUNT_REPLACE###'] = $replaceCount;\n\t\t\t\t\t$m['###COUNT_PROCESS###'] = $cntInsert+$replaceCount+$errCount;\n\n\t\t\t\t\t$m['###BLOCK_SUMMARY###'] = $this->cObj->substituteMarkerArray($sp,$m);\n\n\t\t\t\t\t$ep = $this->cObj->substituteSubpart($ep,'###PART4HEADERLINE###','');\n\t\t\t\t\t$ep = $this->cObj->substituteSubpart($ep,'###PART4LISTLINE###',$fep);\n\t\t\t\t\t$m['###BLOCK_ERRORLIST###'] = $this->cObj->substituteMarkerArray($ep,$m);\n\n\t\t\t\t\t$logfile = fopen ('typo3temp/'.$importName.'.htm','w');\n\t\t\t\t\tif ($logfile) {\n\t\t\t\t\t\tfwrite ($logfile,$m['###BLOCK_SUMMARY###'].'<br /><br />'.$m['###BLOCK_ERRORLIST###']);\n\t\t\t\t\t\tfclose ($logfile);\n\t\t\t\t\t\tif ($ewCount>0) {\n\t\t\t\t\t\t\t$m['###BUTTON_SHOWLOG###'] = sprintf($this->constText['imp_log_errorloglink'],\n\t\t\t\t\t\t\t\t\t'target=\"_newlog\" href=\"typo3temp/'.$importName.'.htm\"');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$m['###SUBMIT_NOTE###'] = sprintf($this->constText['imp_finally_import'],$cntSaved).'<br />';\n\t\t\t\t\tif ($cntDeleteAll) {\n\t\t\t\t\t\tif (strcmp($delCommand,'own')==0) {\n\t\t\t\t\t\t\t$m['###SUBMIT_NOTE###'] .= $this->constObj->getWrap('hot',sprintf($this->constText['imp_finally_deletewarning_own'],\n\t\t\t\t\t\t\t\t$cntDeleteAll,$this->crfeuser_id));\n\t\t\t\t\t\t} else if (strcmp($delCommand,'all')==0) {\n\t\t\t\t\t\t\t$m['###SUBMIT_NOTE###'] .= $this->constObj->getWrap('hot',sprintf($this->constText['imp_finally_deletewarning_all'],\n\t\t\t\t\t\t\t\t$cntDeleteAll));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($cntDeleteForQuota) {\n\t\t\t\t\t\t$m['###SUBMIT_NOTE###'] .= $this->constObj->getWrap('hot',sprintf($this->constText['imp_finally_deletequota'],\n\t\t\t\t\t\t\t$cntDeleteForQuota,$this->crfeuser_id));\n\t\t\t\t\t}\n\n\t\t\t\t\t$sp = $this->templateObj->getSubpart($importTmpl,'###PART4###');\n\t\t\t\t\t$content .= $this->cObj->substituteMarkerArray($sp,$m);\n\n\t\t\t\t\t// Now prepare email to admin and importer\n\t\t\t\t\t$pnConf = $cfImport['notify.'];\n\t\t\t\t\tif (is_array($pnConf)) {\n\t\t\t\t\t\t$mailbody = $this->constObj->TSConstConfObj($pnConf,'mailbody');\n\t\t\t\t\t\t$m['###DETAILED_LOG###'] = $detailsLog;\n\t\t\t\t\t\t$mailbody = $this->cObj->substituteMarkerArray($mailbody, $m);\n\t\t\t\t\t\t$mailfile = fopen ('typo3temp/'.$importName.'-maillog.txt','w');\n\t\t\t\t\t\tif ($mailfile) {\n\t\t\t\t\t\t\tfwrite ($mailfile,$mailbody);\n\t\t\t\t\t\t\tfclose ($mailfile);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$content .= $this->constObj->getWrap('hot',sprintf($this->constText['imp_error_writeerror_fname'],\n\t\t\t\t\t\t\t\t'typo3temp/'.$importName.'-maillog.txt').'<br />');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//t3lib_div::debug(Array('$mailbody'=>$mailbody, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t}\n\t\t\t\t\tif ($cfImport['postProcessPrepare']) {\n\t\t\t\t\t\tif (is_callable(Array($this,$cfImport['postProcessPrepare']))) {\n\t\t\t\t\t\t\t$content .= $this->$cfImport['postProcessPrepare']($cfImport);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$content .= $this->constObj->getWrap('warn','ERROR: Missing postprocessprepare-function $this->'.$cfImport['postProcessPrepare']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$content .= '<br />'.$this->importPreProcessSummary();\n\n\t\t\t\t} else if ($importState==5) { // ##################################################################################\n\t\t\t\t\t$import = unserialize(urldecode(t3lib_div::_GP('moreimport')));\n\t\t\t\t\t$this->getCrFeUser_id ($cfImport,$import);\n\t\t\t\t\t$processed = 0;\n\t\t\t\t\t$content .= str_replace('###STATE###',$activeState,str_replace('###MAXSTATE###',$totalStates,\n\t\t\t\t\t\t$this->cObj->stdWrap($settings['part5'],$settings['part5.'])));\n\t\t\t\t\t$aLines = file ('typo3temp/'.$importName.'.sql');\n\t\t\t\t\t$lastId = 0;\n\t\t\t\t\t$isError = FALSE;\n\t\t\t\t\t$errCount = 0;\n\t\t\t\t\t$commentCount = 0;\n\t\t\t\t\t$errText = Array();\n\t\t\t\t\t$import = unserialize(urldecode(t3lib_div::_GP('moreimport')));\n\t\t\t\t\t$this->deleteAll = t3lib_div::_GP('deleteAll');\n\t\t\t\t\t$this->debugObj->debugIf('importDelete',Array('$this->deleteAll'=>$this->deleteAll, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t$quotaParams = t3lib_div::_GP('quota');\n\t\t\t\t\t$this->debugObj->debugIf('quota',Array('$quotaParams'=>$quotaParams, 'crfeuser_id'=>$this->crfeuser_id, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t$delCommand = strtolower($cfImport['settings.']['deleteAll']);\n\t\t\t\t\tif (strncmp($delCommand,'query',5)==0) {\n\t\t\t\t\t\t$delCommand = $this->deleteAll;\n\t\t\t\t\t}\n\t\t\t\t\tif (strcmp($delCommand,'own')==0) {\n\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->workOnTable,'crfeuser_id='.$this->crfeuser_id);\n\t\t\t\t\t\t$cntDeleted = $GLOBALS['TYPO3_DB']->sql_affected_rows();\n\t\t\t\t\t} else if (strcmp($delCommand,'all')==0) {\n\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_DELETEquery($this->workOnTable,'1=1');\n\t\t\t\t\t\t$cntDeleted = $GLOBALS['TYPO3_DB']->sql_affected_rows();\n\t\t\t\t\t}\n\t\t\t\t\t$this->debugObj->debugIf('delCommand',Array('$delCommand'=>$delCommand, 'crfeuser_id'=>$this->crfeuser_id, '$cntDeleted'=>$cntDeleted, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t$counter = Array();\n\t\t\t\t\tfor ($i=0;$i<count($aLines);$i++) {\n\t\t\t\t\t\tif (strlen(trim($aLines[$i]))>1 && substr($aLines[$i],0,1)!='#') {\n\t\t\t\t\t\t\t$cmd = substr($aLines[$i],0,6);\n\t\t\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db,$aLines[$i]);\n\t\t\t\t\t\t\t//t3lib_div::debug(Array('$aLines['.$i.']'=>$aLines[$i], 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t\t\t\t\tif ($tmp=$GLOBALS['TYPO3_DB']->sql_error()) {\n\t\t\t\t\t\t\t\t$isError = TRUE;\n\t\t\t\t\t\t\t\t$errCount++;\n\t\t\t\t\t\t\t\t$errText[] = Array('Query'=>$aLines[$i], 'Error'=>$tmp);\n\t\t\t\t\t\t\t\t//t3lib_div::debug(Array(\"Query=\"=>$query, \"Res=\"=>$res, \"Error=\"=>$tmp ));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$counter[$cmd]++;\n\t\t\t\t\t\t\t\t$processed++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (strlen(trim($aLines[$i]))>1 && substr($aLines[$i],0,1)=='#') {\n\t\t\t\t\t\t\t\t$commentCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Now email to admin and importer\n\t\t\t\t\t$pnConf = $cfImport['notify.'];\n\t\t\t\t\tif (is_array($pnConf)) {\n\t\t\t\t\t\t$mailto = $this->constObj->TSConstConfObj($pnConf,'mailto');\n\t\t\t\t\t\t$mailfrom = $this->constObj->TSConstConfObj($pnConf,'mailfrom');\n\t\t\t\t\t\t$subject = $this->constObj->TSConstConfObj($pnConf,'subject');\n\t\t\t\t\t\t$replyto = $this->constObj->TSConstConfObj($pnConf,'replyto');\n\t\t\t\t\t\t$returnpath = $this->constObj->TSConstConfObj($pnConf,'returnpath');\n\t\t\t\t\t\t$replyto = (strlen($replyto)>1) ? $replyto : $mailfrom;\n\t\t\t\t\t\t$returnpath = (strlen($returnpath)>1) ? $returnpath : $mailfrom;\n\t\t\t\t\t\t$tmp = file('typo3temp/'.$importName.'-maillog.txt');\n\t\t\t\t\t\t$mailbody = implode('',$tmp);\n\n\t\t\t\t\t\tforeach ($counter as $key=>$cnt) {\n\t\t\t\t\t\t\t$mailbody .= \"\\r\\n\".sprintf($this->constText['imp_log_details'],$cnt,$key);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (strlen($mailto)>0) {\n\t\t\t\t\t\t\t$hd = \"From: \".$mailfrom.\"\\r\\n\"\n\t\t\t\t\t\t\t\t.\"Reply-To: \".$replyto.\"\\r\\n\"\n\t\t\t\t\t\t\t\t.\"Return-Path: \".$returnpath.\"\\r\\n\"\n\t\t\t\t\t\t\t\t.\"X-Mailer: PHP/\".phpversion();\n\t\t\t\t\t\t\t$result = $this->felib->sendMail($mailto,$subject,$mailbody,$hd,\"-f\".$returnpath\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$content .= '<hr />';\n\t\t\t\t\tif ($cntDeleted) {\n\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_log_result_deleted'],$cntDeleted);\n\t\t\t\t\t\t$content .= '<font color=\"#00c000\">'.$tmpStr.'</font><br />';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (($processed+$commentCount)==count($aLines)) {\n\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_log_result_ok'],$processed,(count($aLines)-$commentCount));\n\t\t\t\t\t\t$content .= '<font color=\"#00c000\">'.$tmpStr.'</font><br />';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tmpStr = sprintf($this->constText['imp_log_result_error'],$processed,(count($aLines)-$commentCount));\n\t\t\t\t\t\t$content .= $this->constObj->getWrap('warn',$tmpStr.'<br />');\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ($counter as $key=>$cnt) {\n\t\t\t\t\t\t$content .= '<br />'.sprintf($this->constText['imp_log_details'],$cnt,$key);\n\t\t\t\t\t}\n\n\t\t\t\t\t$content .= '<br /><hr />';\n\t\t\t\t\tif ($cfImport['postProcess']) {\n\t\t\t\t\t\tif (is_callable(Array($this,$cfImport['postProcess']))) {\n\t\t\t\t\t\t\t$content .= $this->$cfImport['postProcess']($cfImport);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$content .= $this->constObj->getWrap('warn','ERROR: Missing postprocess-function $this->'.$cfImport['postProcess']);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (count($errText)>0) {\n\t\t\t\t\t\tt3lib_div::debug(Array('$errText'=>$errText, 'File:Line'=>__FILE__.':'.__LINE__));\n\n\t\t\t\t\t}\n\t\t\t\t} // ############################################################################################################\n\t\t\t} else {\n\t\t\t\tt3lib_div::debug(Array('ERROR'=>'ERROR import.settings or import.fields not defined', '$settings'=>$settings, '$fields'=>$fields, '$show'=>$show, 'File:Line'=>__FILE__.':'.__LINE__));\n\t\t\t}\n\t\t\tif ($cfImportGlobal['showExecutionTime']) {\n\t\t\t\t$content .= '<br /><br />Execution Time = '.(time()-$myTime).'<br />';\n\t\t\t}\n\n\t\t}\n\n\n\t// ----------------------------------------------------------------------------------------------------------------\n\treturn $content;\n\t}", "title": "" }, { "docid": "4e5abdfeadc79969b95d00eac3ff9ec0", "score": "0.6028699", "text": "public function testImport()\n {\n try {\n $passports = $this->passports->import(__DIR__ . '/../inputs/day-04-sample.input');\n } catch (Exception $e) {\n $this->fail('Unexpected exception thrown importing sample passport file.');\n }\n\n $this->assertCount(4, $passports);\n }", "title": "" }, { "docid": "4b492d33b08e302de00348c127d02fe0", "score": "0.6014987", "text": "public function execute()\n {\n try {\n $mapping = $this->createDataMapping();\n } catch (ImportException $exception) {\n $this->getType()->addErrorMessage($exception->getMessage());\n $this->getType()->addMessagesNow(0);\n\n return false;\n }\n\n /*\n * Mapping is now created and verified -> process the single data rows\n */\n $sheet = $this->excel->setActiveSheetIndex(0);\n $maxRows = $sheet->getHighestDataRow();\n\n if ($maxRows < 2) {\n $this->getType()->addErrorMessage('No data rows found in file');\n $this->getType()->addMessagesNow(0);\n\n return false;\n }\n\n $error = false;\n for ($row = 2; $row <= $maxRows; $row++) { // starting with 2: rows are 1-relative and 1 is the header row\n echo '<br /><br />';\n $data = $this->parseDataRow($sheet, $row, $mapping);\n if ($data === null) {\n // empty row\n continue;\n } else if ($data === false) {\n // invalid data\n $error = true;\n continue;\n } else {\n if ($this->getType()->hasDateFields()) {\n // prepare the date fields and add them to the data array\n $data['timestamp'] = $this->getTimestamp($data);\n }\n\n // next, check if the given data is valid for inserting\n $rowDataValid = $this->checkAndPrepareRowData($data, $row);\n if (!$rowDataValid) {\n// $this->getType()->addErrorMessage('Invalid data found at row ' . $row);\n $error = true;\n }\n\n if ($error) {\n // if an error already occurred, just continue to check the other rows, but do not process the data\n $this->getType()->addMessagesNow($row);\n continue;\n }\n\n $rowDataStored = $this->storeRowData($data, $row);\n\n if (!$rowDataStored) {\n $error = true;\n } else {\n $this->importEntity->incrementNumberOfEntries();\n }\n $this->getType()->addMessagesNow($row);\n }\n }\n\n if ($error) {\n // remove all success and info messages on error as they are invalid (no processing on error)\n $this->getType()->removeMessages('success');\n $this->getType()->removeMessages('info');\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "247b398a71858315d87e4c388ba3010a", "score": "0.60010797", "text": "public function _import_end() {\n\t\t$this->after_import();\n\t\t$this->show_success();\n\t\t$this->show_errors();\n\t\tdo_action( 'import_end' );\n\t}", "title": "" }, { "docid": "ebfcfd55b1194ee959deff4daf84ad9e", "score": "0.59773636", "text": "public function import();", "title": "" }, { "docid": "4703419bd8000e453347f8afb8a0900c", "score": "0.5910863", "text": "function loadImportingData()\r\n\t{\r\n\t\tTienda::load( 'TiendaFile', 'library.file' );\r\n\t\t$this->vars->upload = new TiendaFile();\r\n $this->vars->upload->full_path = $this->vars->upload->file_path = $this->source_import;\r\n $this->vars->upload->proper_name = TiendaFile::getProperName( $this->source_import );\r\n\r\n // load file\r\n if( !$this->import_throttled_import )\r\n {\r\n \t$this->vars->upload->fileToText();\r\n \t$this->source_data = $this->vars->upload->fileastext;\r\n }\r\n return true;\r\n\t}", "title": "" }, { "docid": "1902055fb984f3f066034dd58e1b76cf", "score": "0.5892083", "text": "public function importSource()\n {\n $this->setData('entity', $this->getDataSourceModel()->getEntityTypeCode());\n $this->setData('behavior', $this->getDataSourceModel()->getBehavior());\n $this->importHistoryModel->updateReport($this);\n\n $this->addLogComment(__('Begin import of \"%1\" with \"%2\" behavior', $this->getEntity(), $this->getBehavior()));\n\n $result = $this->processImport();\n\n if ($result) {\n $this->addLogComment(\n [\n __(\n 'Checked rows: %1, checked entities: %2, invalid rows: %3, total errors: %4',\n $this->getProcessedRowsCount(),\n $this->getProcessedEntitiesCount(),\n $this->getErrorAggregator()->getInvalidRowsCount(),\n $this->getErrorAggregator()->getErrorsCount()\n ),\n __('The import was successful.'),\n ]\n );\n $this->importHistoryModel->updateReport($this, true);\n } else {\n $this->importHistoryModel->invalidateReport($this);\n }\n\n return $result;\n }", "title": "" }, { "docid": "aa9a12ec1f2d80e3124855bc3e043dc0", "score": "0.5801363", "text": "function isNewImport() {\n\t\tif ($this->original_token) return false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "045d449ebfbe3475732d5f374afc407e", "score": "0.5763789", "text": "private function _import_2()\r\n\t{\r\n\t\t$this->layout->add_breadcrumb(lang('step') . ' 2', 'users/import/2');\r\n\t\t\r\n\t\t$this->load->library('csv_data');\r\n\t\t\r\n\t\t$this->csv_data->load($this->data['import']['file_path']);\r\n\t\t\r\n\t\tif ( ! $this->csv_data->countRows() > 1)\r\n\t\t{\r\n\t\t\t$this->flash->set('error', lang('users_import_insufficient_rows'));\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t// Check the data is symmetric (data columns match headers)\r\n\t\tif ( ! $this->csv_data->isSymmetric())\r\n\t\t{\r\n\t\t\t$this->csv_data->symmetrize();\r\n\t\t}\r\n\t\t\r\n\t\t// Get the CSV headers\r\n\t\t$this->data['headers'] = $this->csv_data->getHeaders();\r\n\t\t\r\n\t\tif ($this->input->post())\r\n\t\t{\r\n\t\t\t// Get the matched fields but store them the other way round, with our data as keys and header index as value\r\n\t\t\t$fields = $this->input->post('fields');\r\n\t\t\t$fields = array_filter($fields, 'strlen');\r\n\t\t\t$fields = array_flip($fields);\r\n\t\t\t\r\n\t\t\t// Iterate through the fields and update the CSV header value to use the name instead of the index\r\n\t\t\tforeach ($fields as $crbs => &$csv_index)\r\n\t\t\t{\r\n\t\t\t\t$csv_index = $this->data['headers'][$csv_index];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Check that some of the required fields are valid\r\n\t\t\t\r\n\t\t\tif ( ! array_key_exists('u_username', $fields))\r\n\t\t\t{\r\n\t\t\t\t// No username field chosen\r\n\t\t\t\t$this->flash->set('error', lang('users_import_no_username_field'));\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! array_key_exists('u_password', $fields) && empty($this->data['import']['password']))\r\n\t\t\t{\r\n\t\t\t\t// No password field, and the default password is empty\r\n\t\t\t\t$this->flash->set('error', lang('users_import_no_password_field'));\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! array_key_exists('u_email', $fields) && empty($this->data['import']['email_domain']))\r\n\t\t\t{\r\n\t\t\t\t// No email field and the default email domain is empty\r\n\t\t\t\t$this->flash->set('error', lang('users_import_no_email'));\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Update session data\r\n\t\t\t$this->data['import']['fields'] = $fields;\r\n\t\t\t$this->data['import']['step'] = '3';\r\n\t\t\t$this->session->set_userdata('import', $this->data['import']);\r\n\t\t\t\r\n\t\t\t// Go to next step!\r\n\t\t\tredirect('users/import/3');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8fbafe8d18e3ba3a03dd4f0620777d6a", "score": "0.5718242", "text": "protected function runImportJob()\n {\n (new ImportFromJson(resource_path('stubs/fullData.json')))->handle();\n }", "title": "" }, { "docid": "23fd00beaba89651f0dbfd83e4cb9e37", "score": "0.5712394", "text": "public function import(User $user)\n {\n return $user->hasAccess('user','import');\n }", "title": "" }, { "docid": "ed63731aeb02ce006ada96330563b7a1", "score": "0.5710703", "text": "private function validateImport() {\n\t\t$project_api_key = $this->sanitizeAPIToken($_POST['project-api-key']);\n\t\t$server_url = $_POST['server-url'];\n\t\t$server_type = htmlentities($_POST['server-type'], ENT_QUOTES);\n\t\t\n\t\t// validate server_type\n\t\tif ($server_type != 'import' and $server_type != 'export') {\n\t\t\treturn \"Server type '$server_type' not recognized.\";\n\t\t}\n\t\t\n\t\tif (!isset($_POST['table_saved'])) {\n\t\t\t// check for file error / 0 size\n\t\t\tif ($_FILES['attach-file-1']['error'] != '0' or $_FILES['attach-file-1']['size'] == '0') {\n\t\t\t\treturn \"There was an issue uploading the file to the server.\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// find the target server\n\t\t$server_settings_key = $server_type == 'import' ? 'servers' : 'export-servers';\n\t\t$servers = $this->getSubSettings($server_settings_key);\n\t\t$server_setting_key_prefix = $server_type == 'export' ? 'export-' : '';\n\t\t\n\t\tforeach ($servers as $server_index => $server) {\n\t\t\tif ($server[$server_setting_key_prefix . 'redcap-url'] == $server_url) {\n\t\t\t\t$target_server = $server;\n\t\t\t\t$target_server_index = $server_index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (empty($target_server)) {\n\t\t\treturn \"Couldn't find server in settings with URL: '\" . htmlentities($server_url, ENT_QUOTES) . \"'.\";\n\t\t}\n\t\t\n\t\t// find target project in target server\n\t\tforeach($target_server[$server_setting_key_prefix . 'projects'] as $project_index => $project) {\n\t\t\tif ($project[$server_setting_key_prefix . 'api-key'] == $project_api_key) {\n\t\t\t\t$target_project_index = $project_index;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!isset($target_project_index)) {\n\t\t\treturn \"Couldn't find project in server settings with API key: '$project_api_key'.\";\n\t\t}\n\t\t\n\t\treturn [\n\t\t\t'target_server' => $target_server,\n\t\t\t'target_server_type' => $server_type,\n\t\t\t'target_server_index' => $target_server_index,\n\t\t\t'target_project_index' => $target_project_index\n\t\t];\n\t}", "title": "" }, { "docid": "e849c3dd3cc343fd34eb8419505852b6", "score": "0.5696499", "text": "public function do_complete() {\n\n\t\t// Import instance\n\t\t$content_pack = $this->get_content_pack();\n\t\t$import_instance = $content_pack->get_import_instance();\n\t\t$do_download = $import_instance->get_task_args( 'download' );\n\t\t$do_import = $import_instance->get_task_args( 'import' );\n\n\t\t// Mark complete if download and import were successful\n\t\tif ( kalium_get_array_key( $do_download, 'success' ) && kalium_get_array_key( $do_import, 'success' ) ) {\n\t\t\t$import_instance->set_successful( true );\n\t\t}\n\t}", "title": "" }, { "docid": "5b8708e3747dc060ce5e60ffc426a600", "score": "0.5695969", "text": "private function process_import_file() {\n\n\t\t/* Ensure the import file exists */\n\t\tif ( ! isset( $_FILES['code_snippets_import_file']['tmp_name'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/* Import the snippets */\n\t\t$result = import_snippets( $_FILES['code_snippets_import_file']['tmp_name'], $network );\n\n\t\t/* Send the amount of imported snippets to the page */\n\t\t$url = add_query_arg(\n\t\t\t$result ?\n\t\t\tarray( 'imported' => count( $result ) ) :\n\t\t\tarray( 'error' => true )\n\t\t);\n\n\t\twp_redirect( esc_url_raw( $url ) );\n\t\texit;\n\t}", "title": "" }, { "docid": "cdc4288a55500823af430d8f51b3d6d7", "score": "0.56881464", "text": "private function _import_finish()\r\n\t{\r\n\t\t$this->session->set_userdata('import', array());\r\n\t\tredirect('users');\r\n\t}", "title": "" }, { "docid": "e94be193bb705e209958589d2b68db06", "score": "0.56852394", "text": "protected function CheckLocalPath()\n {\n $returnVal = true;\n\n if (!is_dir($this->sImportFolder)) {\n $returnVal = TGlobal::Translate('chameleon_system_core.document_local_import.error_path_not_found', array('%path%' => $this->sImportFolder));\n } else {\n if (!is_readable($this->sImportFolder)) {\n $returnVal = TGlobal::Translate('chameleon_system_core.document_local_import.error_no_read_access_to_path', array('%path%' => $this->sImportFolder));\n }\n }\n\n return $returnVal;\n }", "title": "" }, { "docid": "aca162c0afbaee5f84532de2ca880751", "score": "0.56723213", "text": "public function handle_upload() {\n\t\tif ( isset( $_POST['local_file'] ) && ! empty( $_POST['local_file'] ) ) {\n\t\t\tif ( file_exists( ABSPATH . $_POST['local_file'] ) ) {\n\t\t\t\t$this->set_option( 'file_url', esc_attr( $_POST['local_file'] ) );\n\t\t\t} else {\n\t\t\t\t$this->importer_error( __( 'Given Local File Not Found!', 'wponion' ) );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$file = wp_import_handle_upload();\n\t\t\tif ( isset( $file['error'] ) ) {\n\t\t\t\t$this->importer_error( $file['error'] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->set_option( 'file_id', absint( $file['id'] ) );\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d4a95ff8870130363165d988feaa81b7", "score": "0.5653737", "text": "public function testImportFailure()\n {\n $this->session->open($this->url.'events/import/1');\n $file = $this->session->elementWithWait(PHPWebDriver_WebDriverBy::ID, 'ImportEventsFile');\n $file->sendKeys(dirname(__FILE__).'/files/import-test-fail.csv');\n $this->session->elementWithWait(PHPWebDriver_WebDriverBy::CSS_SELECTOR, \"div[class='submit'] input\")->click();\n $msg = $this->session->elementWithWait(PHPWebDriver_WebDriverBy::ID, 'flashMessage')->text();\n $this->assertEqual($msg, \"Import Failed\\nEvent \\\"test-event-4\\\" (on row 4), has an invalid field: \\\"Type\\\": Please select a template type.\");\n\n // wrong extension\n $this->session->open($this->url.'events/import/1');\n $file = $this->session->elementWithWait(PHPWebDriver_WebDriverBy::ID, 'ImportEventsFile');\n $file->sendKeys(dirname(__FILE__).'/files/docx.docx');\n $this->session->elementWithWait(PHPWebDriver_WebDriverBy::CSS_SELECTOR, \"div[class='submit'] input\")->click();\n $msg = $this->session->elementWithWait(PHPWebDriver_WebDriverBy::ID, 'flashMessage')->text();\n $this->assertEqual($msg, \"extension is not allowed.\\nFileUpload::processFile() - Unable to save temp file to file system.\");\n\n }", "title": "" }, { "docid": "3d27e4f89efb35124b191a8dcebff7b6", "score": "0.5647991", "text": "function import();", "title": "" }, { "docid": "02c7bb17fb79de731c1f8f7576fa9869", "score": "0.56455106", "text": "protected function validateImport(array $data) { }", "title": "" }, { "docid": "3926a6365c56263f1ff2c6e8dcee4e08", "score": "0.5613771", "text": "abstract function canImport($datastream);", "title": "" }, { "docid": "4a3dc7dd0277e8f686becfaeb6212165", "score": "0.5610248", "text": "public function import(string $uniqueid, string $modeldir, string $importdir) : bool {\n\n if (!$this->useserver) {\n // Use the local file system.\n\n list($result, $exitcode) = $this->exec_command('import', [$uniqueid, $modeldir, $importdir],\n 'errorimportmodelresult');\n\n if ($exitcode != 0) {\n throw new \\moodle_exception('errorimportmodelresult', 'analytics');\n }\n\n } else {\n // Use the server.\n\n // Zip the $importdir to send a single file.\n $importzipfile = $this->zip_dir($importdir);\n if (!$importzipfile) {\n // There was an error zipping the directory.\n throw new \\moodle_exception('errorimportmodelresult', 'analytics');\n }\n\n $requestparams = ['uniqueid' => $uniqueid, 'dirhash' => $this->hash_dir($modeldir),\n 'importzip' => curl_file_create($importzipfile, null, 'import.zip')];\n $url = $this->get_server_url('import');\n list($result, $httpcode) = $this->server_request($url, 'post', $requestparams);\n }\n\n return (bool)$result;\n }", "title": "" }, { "docid": "7983ebf461139a0f81e8e30323dfaf73", "score": "0.55892223", "text": "public function beforePostImport() {\n\t\t$this->pauseSyncHooks();\n\t}", "title": "" }, { "docid": "050baf6f266b7d7696e3cccda4dc4de1", "score": "0.5578253", "text": "function registerImport();", "title": "" }, { "docid": "27f6d3cb2a3dec2e07b9280b1936e592", "score": "0.5575455", "text": "function do_individuals_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_individuals($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_individuals', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "f1761ccbb72287a9b07496d5a5e25f9c", "score": "0.556789", "text": "function do_loans_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_loans($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_loans', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "078df23648a3e55cace35faf10fadb76", "score": "0.5561569", "text": "public function clearImportFiles()\r\n\t{\r\n\t\t$importdir = IEM_STORAGE_PATH . '/import';\r\n\r\n\t\t// Since this might not necessarily a failure (No import have been done before)\r\n\t\tif (!is_dir($importdir)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\r\n\t\t$handle = @opendir($importdir);\r\n\t\tif (!$handle) {\r\n\t\t\ttrigger_error(__CLASS__ . '::' . __METHOD__ . ' -- Unable to read import directory', E_USER_WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$cutoff_time = time() - self::IMPORT_EXPIRY_TIME;\r\n\r\n\t\twhile (false !== ($file = @readdir($handle))) {\r\n\t\t\tif ($file{0} == '.') {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t$filedate = @filemtime($importdir . '/' . $file);\r\n\t\t\tif ($filedate === false) {\r\n\t\t\t\ttrigger_error(__CLASS__ . '::' . __METHOD__ . ' -- Unable to obtain import file timestamp', E_USER_WARNING);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif ($filedate < $cutoff_time) {\r\n\t\t\t\tif (!unlink($importdir . '/' . $file)) {\r\n\t\t\t\t\ttrigger_error(__CLASS__ . '::' . __METHOD__ . ' -- Unable to delete old import file', E_USER_WARNING);\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t@closedir($handle);\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "99adc2fefea39ede9e3f287fb0b0fb4a", "score": "0.5549324", "text": "private static function is_processing_import() {\n\t\treturn ( get_query_var( 'page' ) == __CLASS__ . '_import' );\n\t}", "title": "" }, { "docid": "c84d7338162a4cec24bbe603470676b1", "score": "0.5545471", "text": "public function verify_imported_gallery() {\n\n\t\treturn isset( $_POST['envira-gallery-import'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['envira-gallery-import'] ) ), 'envira-gallery-import' );\n\n\t}", "title": "" }, { "docid": "63eddad614871324c516083c67b3ff91", "score": "0.55213785", "text": "public function import_export() {\n\t\t\techo \"this is import_export !\";\n\t\t}", "title": "" }, { "docid": "1ee99839948722e357c8b8256acbcc37", "score": "0.55125713", "text": "function do_savings_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_savings($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_savings', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "04ee41dfde2b6abcb604fc93b7f61592", "score": "0.55123234", "text": "public function isSuccessful();", "title": "" }, { "docid": "04ee41dfde2b6abcb604fc93b7f61592", "score": "0.55123234", "text": "public function isSuccessful();", "title": "" }, { "docid": "1359c1bd5b63968c69b1e89a3f7c0324", "score": "0.5506633", "text": "public function run()\n {\n $ImportController = new ImportController();\n $request = \\Illuminate\\Http\\Request::create(\n '/v1/import',\n 'POST',\n [], [], [], [],\n file_get_contents(database_path().'/seeds/products.csv')\n );\n $response = $ImportController->create($request, new \\App\\Product);\n if ($response->status() != 201) {\n throw new Exception('Error inserting data: '.$response->getContent());\n }\n\n $body = json_decode($response->getContent(), true);\n if ($body['failed_total'] > 0) {\n throw new Exception('failed_total greater than 0'.$response->getContent());\n }\n\n if ($body['total_imported'] == 0) {\n throw new Exception('No data was imported'.$response->getContent());\n }\n\n return $body['total_imported'].' rows inserted';\n }", "title": "" }, { "docid": "c466e643c5e737b72e5187623a8e93a5", "score": "0.55007684", "text": "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_VKGROUP_MODULE_NOT_INSTALLED_MSGVER_1'));\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0c8812c468f40bf093f1e7bfe8bb8d90", "score": "0.54996896", "text": "function import($xml)\n\t{\n\t\tglobal $IMPORTED_DATA, $IMPORTED_OBJECT_COUNTER;\n\t\n\t\t$IMPORTED_DATA = array();\n\t\t$IMPORTED_OBJECT_COUNTER = 0;\n\t\t\n\t\t$document = ODD_Import($xml);\n\t\tif (!$document)\n\t\t\tthrow new ImportException(elgg_echo('ImportException:NoODDElements'));\n\t\t\n\t\tforeach ($document as $element)\n\t\t\t__process_element($element);\n\t\t\n\t\tif ($IMPORTED_OBJECT_COUNTER!= count($IMPORTED_DATA))\n\t\t\tthrow new ImportException(elgg_echo('ImportException:NotAllImported'));\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "170f2588c1dcf48520a9ade929c3f938", "score": "0.54961896", "text": "public function test_version1importpreventsinvalidlinkoncreate() {\n global $DB;\n\n // Validate setup.\n $initialnumcourses = $DB->count_records('course');\n\n // Run the import.\n $this->run_core_course_import(array('shortname' => 'invalidlink', 'link' => 'bogusshortname'));\n\n // Validate that no new course was created.\n $this->assertEquals($DB->count_records('course'), $initialnumcourses);\n }", "title": "" }, { "docid": "afebbbeba98768c21897eea5703fdd52", "score": "0.5488225", "text": "function doImport($nopost=false)\n {\n ini_set('max_execution_time',300);\n $db = &$this->m_importNode->getDb();\n $fileid = $this->m_postvars[\"fileid\"];\n $file = $this->getTmpFileDestination($fileid);\n\n $validated = $this->getValidatedRecords($file);\n\n if (!$this->m_postvars['novalidatefirst'] && $this->showErrors($validated['importerrors']))\n {\n $db->rollback();\n return;\n }\n\n $this->addRecords($validated['importerrors'], $validated['validatedrecs']);\n\n if (!$this->m_postvars['novalidatefirst'] && $this->showErrors($validated['importerrors']))\n {\n $db->rollback();\n return;\n }\n\n $db->commit();\n\n // clean-up\n @unlink($file);\n\n // clear recordlist cache\n $this->clearCache();\n\n // register message\n atkimport('atk.utils.atkmessagequeue');\n $messageQueue = &atkMessageQueue::getInstance();\n\n $count = count((array)$validated['validatedrecs']['add']) + count((array)$validated['validatedrecs']['update']);\n if ($count == 0)\n {\n $messageQueue->addMessage(sprintf($this->m_node->text('no_records_to_import'), $count), AMQ_GENERAL);\n }\n else if ($count == 1)\n {\n $messageQueue->addMessage($this->m_node->text('successfully_imported_one_record'), AMQ_SUCCESS);\n }\n else\n {\n $messageQueue->addMessage(sprintf($this->m_node->text('successfully_imported_x_records'), $count), AMQ_SUCCESS);\n }\n\n $this->m_node->redirect();\n }", "title": "" }, { "docid": "1a4b11d08a140e1cac522b7a0f4f05c9", "score": "0.54855746", "text": "function handle_upload() {\n\n if ( empty( $_POST['file_url'] ) ) {\n\n $file = wp_import_handle_upload();\n\n if ( isset( $file['error'] ) ) {\n echo '<p><strong>' . __( 'Sorry, there has been an error.', 'rf-exhibitor-importer' ) . '</strong><br />';\n echo esc_html( $file['error'] ) . '</p>';\n return false;\n }\n\n $this->id = (int) $file['id'];\n\n } else {\n\n if ( file_exists( ABSPATH . $_POST['file_url'] ) ) {\n\n $this->file_url = esc_attr( $_POST['file_url'] );\n\n } else {\n\n echo '<p><strong>' . __( 'Sorry, there has been an error.', 'rf-exhibitor-importer' ) . '</strong></p>';\n return false;\n\n }\n\n }\n\n return true;\n }", "title": "" }, { "docid": "7a39619a5baa4b58b5ab726bd85a9e4d", "score": "0.5483373", "text": "private function checkinstall()\n\t{\n\t\t$file = APPPATH.'controllers/setup/install.php';\n\t\tif ( ! file_exists($file))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8f94f9e37656b003371a0a6c497b55fc", "score": "0.54731166", "text": "public function execute()\n\t{\n\t\tif (User::isGuest())\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&task=import', false, true))),\n\t\t\t\tLang::txt('COM_CITATIONS_NOT_LOGGEDIN'),\n\t\t\t\t'warning'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t$this->importer = new Importer(\n\t\t\tApp::get('db'),\n\t\t\tApp::get('filesystem'),\n\t\t\tApp::get('config')->get('tmp_path') . DS . 'citations',\n\t\t\tApp::get('session')->getId()\n\t\t);\n\n\t\t$this->registerTask('import_upload', 'upload');\n\t\t$this->registerTask('import_review', 'review');\n\t\t$this->registerTask('import_save', 'save');\n\t\t$this->registerTask('import_saved', 'saved');\n\n\t\tparent::execute();\n\t}", "title": "" }, { "docid": "2b617514816d60887041b8efc0482380", "score": "0.5471333", "text": "protected function handleImport()\n {\n $useCachedCsv = !empty($this->option('use_cached_csv'));\n $useCachedDownload = !empty($this->option('use_cached_download')) || $useCachedCsv ;\n $ignoreOffices= !empty($this->option('ignore_offices')) || $useCachedCsv ;\n\n $tarFile = $this->downloadData($useCachedDownload);\n ini_set('memory_limit', '512M');\n $csvUrl = $this->extractAndCleanCsv($tarFile, 'organizations', $useCachedCsv);\n $this->analyzeData($csvUrl, $ignoreOffices);\n }", "title": "" }, { "docid": "bcfce84b17acb25b1db4fbcea3b527d3", "score": "0.54681087", "text": "public function checkForErrors()\n {\n\n }", "title": "" }, { "docid": "bd42024ef9be4a95473a8bbca596521c", "score": "0.5465316", "text": "public function testListOrderImports()\n {\n $vimandoMerchantApi = $this->api;\n\n try {\n /* call listOrderImports API */\n $orderImportList = $vimandoMerchantApi->listOrderImports(1,50);\n /* print result count */\n echo 'OrderImport count : ', $orderImportList->getCount(), PHP_EOL;\n /* iterate over results */\n foreach($orderImportList->getOrderImports() as $orderImport){\n /* print orderImport */\n print_r($orderImport);\n if(VimandoMerchantApi::CODES_OrderImport_FAILED == $orderImport->getStateCode()){\n echo 'OrderImport failed : ', $orderImport->getInfo(), PHP_EOL;\n }\n }\n } catch (ApiException $e) {\n echo 'Exception when calling MerchantApi->listOrderImports: ', $e->getMessage(), PHP_EOL;\n /* get error data */\n $errorResponse = $vimandoMerchantApi->getErrorResponse($e);\n echo 'Got ErrorResponse Code: ', $errorResponse->getCode(), PHP_EOL;\n }\n }", "title": "" }, { "docid": "6787465cfb9500a8d6af7b0fcc3030ec", "score": "0.5463834", "text": "function verifyInstallation(){\n\t\tif(!$this->isInstalled()){\n\t\t\t# Install Module\n\t\t\t$this->install();\n\t\t\t$_SESSION['PAGE_RELOAD_TOAST'] = success(process($this->_moduleName).' module installed successfully');\n\t\t\theader('Location: index.php');\n\t\t\texit;\n\t\t}\n\n\t}", "title": "" }, { "docid": "03dadc47a6048dd5f8abce5a832164a1", "score": "0.5452166", "text": "public function doImport()\n\t{\n\t\tif ( Request::ajax() ){\n\t\t\t$import = new Import;\n\t\t\t$count = $import->getCount();\n\t\t\treturn Response::json(['status' => 'success', 'import_count' => $count]);\n\t\t}\n\t}", "title": "" }, { "docid": "8ae797ffc4817909656fad57b9a52b0d", "score": "0.5451966", "text": "public function execute() {\n\t\t$row = t3lib_BEfunc::getRecord('tx_newsfeedimport_feeds', $this->feed);\n\n\t\tif (is_array($row)) {\n\t\t\t$importer = t3lib_div::makeInstance('Tx_Newsfeedimport_Import', $row);\n\t\t\treturn $importer->doImportFeed();\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "64ef643330b10233370084db0aada144", "score": "0.5451187", "text": "public function has_imported_gallery() {\n\n\t\treturn ! empty( $_POST['envira_import'] ); // @codingStandardsIgnoreLine\n\n\t}", "title": "" }, { "docid": "9a4628cc2a525b79e88f9f172114de8f", "score": "0.5446725", "text": "public function postImportValidation(): void\n {\n// $lines = ImportLine::query()\n// ->where('import_batch_id', $this->batch->id)\n// ->get(['id', 'row']);\n//\n// $duplicates = $lines->groupBy('unique_key')\n// ->filter(function (Collection $groups) {\n// return $groups->count() > 1;\n// });\n//\n// if ($duplicates->isEmpty()) return;\n//\n// // duplicates are collection of collections of import lines\n// $duplicates->each(function (Collection $groups) {\n//\n// // iterate into each group, to assign errors to all line with duplicates\n// $groups->each(function (ImportLine $line) use ($groups) {\n//\n// $line->errors = $groups\n// // filter out matching with self\n// ->filter(function (ImportLine $subLine) use ($line) {\n// return $subLine->id != $line->id;\n// })\n// // map duplicate line into error\n// ->map(function (ImportLine $line) {\n// return sprintf(\n// '%s %s is duplicate with row %s',\n// static::getUniqueKey(),\n// $line->unique_key,\n// $line->row\n// );\n// })\n// ->all();\n//\n// $line->preview_status = ImportLinePreviewStatus::ERROR();\n// $line->save();\n// });\n// });\n }", "title": "" }, { "docid": "c15fd9dc18e9eb5bcc216eb6d25af6b1", "score": "0.543564", "text": "public function processFile($import_manager_id = false, $file_path = false)\n\t{\n\t\tif(!$import_manager_id)\n\t\t{\n\t\t\t$this->modelError = __('Unknown Import Manager ID');\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$file_path)\n\t\t{\n\t\t\t$this->modelError = __('Unknown File Path');\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// file exists\n\t\tif(!is_file($file_path))\n\t\t{\n\t\t\t$this->modelError = __('File doesn\\'t exist. path: %s', $file_path);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// able to read file\n\t\tif(!is_readable($file_path))\n\t\t{\n\t\t\t$this->modelError = __('File isn\\'t readable. path: %s', $file_path);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// check the sha1 to make sure it doesn't already exist\n\t\t$sha1 = sha1_file($file_path);\n\t\tif($this->checkSha1Exists($sha1))\n\t\t{\n\t\t\t$this->modelError = __('File already imported according to the sha1. file_path: %s - sha1: %s', $file_path, $sha1);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the import manager\n\t\t$import_manager = false;\n\t\tif(isset($import_managers[$import_manager_id]))\n\t\t{\n\t\t\t$import_manager = $import_managers[$import_manager_id];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$import_manager = $import_managers[$import_manager_id] = $this->ImportManager->read(null, $import_manager_id);\n\t\t}\n\t\t\n\t\tif(!$import_manager)\n\t\t{\n\t\t\t$this->modelError = __('Unknown Import Manager');\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$filename = basename($file_path);\n\t\t$finfo = finfo_open(FILEINFO_MIME_TYPE);\n\t\t$mimetype = finfo_file($finfo, $file_path);\n\t\tfinfo_close($finfo);\n\t\t\n\t\t// track the import data for when we add an import later\n\t\t$import_data = array(\n\t\t\t'import_manager_id' => $import_manager_id,\n\t\t\t'name' => $filename,\n\t\t\t'filename' => $filename,\n\t\t\t'mimetype' => $mimetype,\n\t\t\t'size' => filesize($file_path),\n\t\t\t'type' => pathinfo($filename, PATHINFO_EXTENSION),\n\t\t\t'sha1' => $sha1,\n\t\t\t\n\t\t);\n\t\t\n\t\t// set the Importer Behavior settings from the import manager settings\n\t\t$importer_settings = array(\n\t\t\t'source_key' => $filename,\n\t\t\t'parser' => $import_manager['ImportManager']['parser'],\n\t\t\t'vector_fields' => array(),\n\t\t);\n\t\t\n\t\tif($import_manager['ImportManager']['parser'] == 'csv')\n\t\t{\n\t\t\t$importer_settings['vector_fields'] = array_keys($import_manager['ImportManager']['csv_fields']);\n\t\t}\n\t\t\n\t\t// get the vectors as defined in the import manager\n\t\t$settings = $this->Importer_setConfig($importer_settings);\n\t\t$vector_count = 0;\n\t\tif(!$vectors = $this->Importer_extractItemsFromFile($file_path, $mimetype))\n\t\t{\n\t\t\t$this->modelError = __('Unable to find any vectors in the file: %s - sha1: %s', $file_path, $sha1);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'warning');\n\t\t\treturn $vector_count;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$vector_count = count($vectors);\n\t\t\t$this->modelError = __('Found %s vectors in the file: %s - sha1: %s', $vector_count, $file_path, $sha1);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'info');\n\t\t}\n\t\t\n\t\t// mark as reviewed if auto_reviewed is check in the import manager\n\t\tif($import_manager['ImportManager']['auto_reviewed'])\n\t\t{\n\t\t\t$import_data['reviewed'] = date('Y-m-d H:i:s');\n\t\t}\n\t\t\n\t\t// save the import\n\t\t$this->create();\n\t\t$this->data = $import_data;\n\t\tif(!$this->save($this->data))\n\t\t{\n\t\t\t$this->modelError = __('Unable to save the Import record from the file: %s - sha1: %s - Import Manager: (%s) %s', $file_path, $sha1, $import_manager['ImportManager']['id'], $import_manager['ImportManager']['name']);\n\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// copy the file over to the proper place\n\t\t$paths = $this->paths($this->id, true, $filename);\n\t\tif($paths['sys'])\n\t\t{\n\t\t\tumask(0);\n\t\t\tif (!copy($file_path, $paths['sys'])) \n\t\t\t{\n\t\t\t\t$this->modelError = __('Unable to copy the file from: %s - to: %s - Import Manager: (%s) %s', $file_path, $paths['sys'], $import_manager['ImportManager']['id'], $import_manager['ImportManager']['name']);\n\t\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tchmod($paths['sys'], 0777);\n\t\t}\n\t\t\n\t\t// process the vectors\n\t\tif($import_manager['ImportManager']['auto_reviewed'])\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'ImportsVector' => array(\n\t\t\t\t\t'vectors' => $vectors,\n\t\t\t\t\t'import_id' => $this->id,\n\t\t\t\t\t'vector_settings' => $import_manager['ImportManager']['csv_fields'],\n\t\t\t\t\t'source' => 'import',\n\t\t\t\t\t'subsource' => $filename,\n\t\t\t\t),\n\t\t\t);\n\t\t\t\n\t\t\tif(!$this->ImportsVector->add($data))\n\t\t\t{\n\t\t\t\t$this->modelError = __('Unable to add the Temp Vectors from the file: %s - Import Id: %s - Import Manager: (%s) %s', $file_path, $this->id, $import_manager['ImportManager']['id'], $import_manager['ImportManager']['name']);\n\t\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data = array(\n\t\t\t\t'TempImportsVector' => array(\n\t\t\t\t\t'temp_vectors' => $vectors,\n\t\t\t\t\t'import_id' => $this->id,\n\t\t\t\t\t'vector_settings' => $import_manager['ImportManager']['csv_fields'],\n\t\t\t\t\t'source' => 'import',\n\t\t\t\t\t'subsource' => $filename,\n\t\t\t\t),\n\t\t\t);\n\t\t\t\n\t\t\tif(!$this->TempImportsVector->add($data))\n\t\t\t{\n\t\t\t\t$this->modelError = __('Unable to add the Temp Vectors from the file: %s - Import Id: %s - Import Manager: (%s) %s', $file_path, $this->id, $import_manager['ImportManager']['id'], $import_manager['ImportManager']['name']);\n\t\t\t\t$this->shellOut($this->modelError, 'imports', 'error');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $vector_count;\n\t}", "title": "" }, { "docid": "a8b4648816dca07933c89abbe8eec66e", "score": "0.54330593", "text": "public function importInschrijvingen() {\n\t\t$app = JFactory::getApplication();\n\t\t$jinput = $app->input;\n\t\t$formdata = $jinput->get('jform', array(), 'array');\n\t\t$jaar = $formdata[\"jaar\"];\n\n\t\tif ($jaar < 2000) {\n\t\t\t$app->enqueueMessage('Geen jaartal opgegeven');\n\t\t\treturn false;\n\t\t}\n\t\t$app->enqueueMessage('Voor het jaartal ' . $jaar);\n\n\t\t$file = self::getUploadedFile('import_inschrijvingen');\n\n\t\tif (!$file) {\n\t\t\t$app->enqueueMessage('Geen file geupload?!');\n\t\t\treturn false;\n\t\t}\n\t\t$app->enqueueMessage('File: ' . $file);\n\n\t\t$mapper = new CsvMapper(SolMapping::getInschrijvingenMapping($jaar));\n\t\t$rows = $mapper->read($file);\n\n\t\t$count = count($rows);\n\n\t\tif ($count == 0) {\n\t\t\t$app->enqueueMessage('geen rijen gevonden');\n\t\t\treturn false;\n\t\t}\n\t\t$app->enqueueMessage('aantal import rijen gevonden: ' . $count);\n\n\t\t$count = self::updateInschrijvingen($rows, $jaar);\n\t\t\n\t\t$msg = \"Er zijn nu $count kampen gewijzigd met hun inschrijvingen t.o.v. de vorige keer\";\n\t\t$app->enqueueMessage($msg);\n\t\t$this->updateLaatstBijgewerkt($jaar, 'INSC', $msg);\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "565f8420e307706caa43ddafe5f5aee6", "score": "0.54213846", "text": "public function testDbImportCommand() {\n $connection_info = [\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ];\n Database::addConnectionInfo($this->databasePrefix, 'default', $connection_info);\n\n $command = new DbImportCommand();\n $command_tester = new CommandTester($command);\n $command_tester->execute([\n 'script' => __DIR__ . '/../../../fixtures/update/drupal-8.8.0.bare.standard.php.gz',\n '--database' => $this->databasePrefix,\n ]);\n\n // The tables should now exist.\n $connection = Database::getConnection('default', $this->databasePrefix);\n foreach ($this->tables as $table) {\n $this->assertTrue($connection\n ->schema()\n ->tableExists($table), strtr('Table @table created by the database script.', ['@table' => $table]));\n }\n }", "title": "" }, { "docid": "2d31667d8a36870a1935d86625cd7d4a", "score": "0.54211974", "text": "public function import()\n {\n if (empty($_POST[\"wpstg_import_nonce\"])) {\n return;\n }\n\n if (!wp_verify_nonce($_POST[\"wpstg_import_nonce\"], \"wpstg_import_nonce\")) {\n return;\n }\n\n if (!current_user_can(\"update_plugins\")) {\n return;\n }\n\n $fileExtension = explode('.', $_FILES[\"import_file\"][\"name\"]);\n $fileExtension = end($fileExtension);\n if ($fileExtension !== \"json\") {\n wp_die(\"Please upload a valid .json file\", \"wp-staging\");\n }\n\n\n $importFile = $_FILES[\"import_file\"][\"tmp_name\"];\n\n if (empty($importFile)) {\n wp_die(__(\"Please upload a file to import\", \"wp-staging\"));\n }\n\n update_option(\"wpstg_settings\", json_decode(file_get_contents($importFile, true)));\n\n wp_safe_redirect(admin_url(\"admin.php?page=wpstg-tools&amp;wpstg-message=settings-imported\"));\n\n return;\n }", "title": "" }, { "docid": "56b09cb5a7f1851ff34c4c49d0a1cdd0", "score": "0.5417315", "text": "function handle_import() {\n\n $file = $this->import_and_save();\n\n if(!$file) {\n\n // stop buffering to see the errors\n if(isset($_POST['sendfile']) && $_POST['sendfile'] == '1' ) {\n ob_end_flush();\n }\n\n echo \"<p><strong>Could not create import file</strong></p>\";\n return false;\n }\n\n\n // from function\n // wp_import_handle_upload() {\n // the wordpress importer want to work with the file id\n // Construct the object array\n $object = array( 'post_title' => \"title:$file\",\n 'post_content' => \"content:$file\",\n 'post_mime_type' => 'text/xml',\n 'guid' => \"guid:$file\",\n 'context' => 'import',\n 'post_status' => 'private'\n );\n\n // Save the data\n mysql_select_db( DB_NAME );\n $id = wp_insert_attachment($object, $file);\n\n // schedule a cleanup for one day from now in case of\n // failed import or missing wp_import_cleanup() call\n wp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );\n\n $this->id = $id;\n \n // from here the rest of the function is identical to original function\n $import_data = $this->parse( $file );\n if ( is_wp_error( $import_data ) ) {\n echo '<p><strong>' . __( 'Sorry, there has been an error.', 'wordpress-importer' ) . '</strong><br />';\n echo esc_html( $import_data->get_error_message() ) . '</p>';\n return false;\n }\n\n $this->version = $import_data['version'];\n if ( $this->version > $this->max_wxr_version ) {\n echo '<div class=\"error\"><p><strong>';\n printf( __( 'This WXR file (version %s) may not be supported by this version of the importer. Please consider updating.', 'wordpress-importer' ), esc_html($import_data['version']) );\n echo '</strong></p></div>';\n }\n\n // now its time to delete old posts and comments\n // we have a new import file and it looks ok :)\n\n $this->delete_all_posts_and_comments();\n\n $this->get_authors_from_import( $import_data );\n\n return true;\n }", "title": "" }, { "docid": "bd06ec38ee793460b96cd4b973cb8afb", "score": "0.5416256", "text": "protected function import() {\n\t\t$results = $this->retrieve_posts();\n\t\tforeach ( $results as $post ) {\n\t\t\t$return = $this->import_post_values( $post->identifier );\n\t\t\tif ( ! $return ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "81f31e04d56ce20dc604c5f52aefcade", "score": "0.5415126", "text": "public function importFromCsv($path)\n {\n /** @var $import Mage_ImportExport_Model_Import */\n $import = Mage::getModel('importexport/import');\n\n // Inform importer what type of entity we'll be processing\n $import->setData(array(\n 'entity' => 'catalog_product'\n ));\n\n// try {\n// } catch (Exception $e) {\n// }\n\n // Validate CSV before import\n //$validationResult = $import->validateSource($path);\n\n// // Handle failed import\n// if ($validationResult == false) {\n// // Get validation error messages so we can log and email them\n// $messages = $import->getOperationResultMessages($validationResult);\n// Mage::log($messages, Zend_Log::ALERT, 'sapimport.log');\n// // Notify admin contact\n// Mage::helper('inecom_sap/data')->notify(print_r($messages, true));\n//\n// return false;\n// }\n $notices = '';\n try {\n\n //$import = Mage::getModel('importexport/import');\n $validationResult = $import->validateSource($path);\n\n if (!$import->getProcessedRowsCount()) {\n $errors[] = 'File does not contain data. Please upload another one';\n } else {\n if (!$validationResult) {\n if ($import->getProcessedRowsCount() == $import->getInvalidRowsCount()) {\n $errors[] = 'File is totally invalid. Please fix errors and re-upload file';\n } elseif ($import->getErrorsCount() >= $import->getErrorsLimit()) {\n $errors[] = sprintf('Errors limit (%d) reached. Please fix errors and re-upload file', $import->getErrorsLimit());\n } else {\n if ($import->isImportAllowed()) {\n $errors[] = 'Please fix errors and re-upload file or simply press \"Import\" button to skip rows with errors';\n } else {\n $errors[] = 'File is partially valid, but import is not possible';\n }\n }\n // errors info\n foreach ($import->getErrors() as $errorCode => $rows) {\n $error = $errorCode . ' ' . $this->__('in rows:') . ' ' . implode(', ', $rows);\n $errors[] = $error;\n }\n } else {\n if ($import->isImportAllowed()) {\n $errors[] = 'File is valid! To start import process press \"Import\" button';\n } else {\n $errors[] = 'File is valid, but import is not possible';\n }\n }\n\n $notices = $import->getNotices();\n $notices[] = sprintf('Checked rows: %d, checked entities: %d, invalid rows: %d, total errors: %d',\n $import->getProcessedRowsCount(), $import->getProcessedEntitiesCount(),\n $import->getInvalidRowsCount(), $import->getErrorsCount()\n );\n }\n } catch (Exception $e) {\n // Log error\n Mage::log('import error creating product CSV: '.$path.' - '.$e->getMessage(), Zend_Log::ALERT, 'sapimport.log');\n // Notify admin contact\n Mage::helper('inecom_sap/data')->notify($e->getMessage(), 'SAP Exception while creating product CSV!');\n }\n\n // Now attempt import\n try {\n $import->importSource();\n //$import->invalidateIndex();\n\n Mage::log('CSV file imported succesfully: '. $path, Zend_Log::INFO, 'sapimport.log');\n\n } catch (Exception $e) {\n\n // Log & notify phpdev via email\n Mage::log('import error importing product CSV: '.$path.' - '.$e->getMessage(), Zend_Log::ALERT, 'sapimport.log');\n\n // Notify admin contact\n Mage::helper('inecom_sap/data')->notify(\"Importing: $path\\n\".$e->getMessage(), 'SAP Exception while importing product CSV!'.\"\\n\\n\".print_r($notices,true).\"\\n\\n\".print_r($errors,true));\n }\n }", "title": "" }, { "docid": "7a4669cb4e7877b13db2994a91950031", "score": "0.5414399", "text": "function runImport() {\n $sandbox = false;\n\n // If import is enabled, the script will push the data generated into the eTapestry database.\n $importEnabled = true;\n\n $etapestryConfig = json_decode(\n file_get_contents(__DIR__.'/input/etapestry.config.json'), true\n );\n\n if ($sandbox) {\n $databaseId = $etapestryConfig['sandbox']['databaseId'];\n $apiKey = $etapestryConfig['sandbox']['apiKey'];\n } else {\n $databaseId = $etapestryConfig['production']['databaseId'];\n $apiKey = $etapestryConfig['production']['apiKey'];\n }\n\n // Start BB session\n $bbClient = new BlackbaudClient($databaseId, $apiKey);\n\n $rdOrgs = json_decode(\n file_get_contents(__DIR__.'/input/raisedonors.config.json'), true\n );\n \n print_r($rdOrgs);\n\n foreach ($rdOrgs as $key => $org) {\n // Start RD session\n $rdClient = new RaiseDonorsClient($org['key'], $org['license']);\n\n // Create our migrator\n $migrator = new Migrator($rdClient, $bbClient, $key, !$sandbox);\n\n $migrator->processLastWeekDonations();\n $migrator->writeOutput();\n\n if ($importEnabled) {\n $migrator->import();\n }\n }\n}", "title": "" }, { "docid": "c6f4e66b4129ddf210c63237bf771c6a", "score": "0.54065925", "text": "public function test_version1importpreventsinvalidcourselangoncreate() {\n $this->run_core_course_import(array('shortname' => 'invalidcourselangcreate', 'lang' => 'boguslang'));\n $this->assert_core_course_does_not_exist('invalidcourselangcreate');\n }", "title": "" }, { "docid": "f81ab5a208f62a6e3f473f8615d73be3", "score": "0.54023784", "text": "function do_individual_contacts_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_individual_contacts($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_individual_contacts', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "0a9c68c3f191ad5a0c71ac716be765c1", "score": "0.53984207", "text": "function do_withdrawals_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_withdrawals($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_withdrawals', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "5b1b4c3ff776310a2a2172527f81f626", "score": "0.53967077", "text": "public function test_version1importpreventsinvalidcoursevisibleoncreate() {\n $this->run_core_course_import(array('shortname' => 'invalidcoursevisiblecreate', 'visible' => 2));\n $this->assert_core_course_does_not_exist('invalidcoursevisiblecreate');\n }", "title": "" }, { "docid": "f5c9c1cb9063a2b8cfeac0cf88193d42", "score": "0.53966933", "text": "protected function checkInstallation(){\r\n\t\t\r\n\t}", "title": "" }, { "docid": "52808ce191e3bc3726d8b17c5f7b351f", "score": "0.5385401", "text": "function importtck() {\n\t\t$model = $this->getModel('template');\n\t\tif (!$model->installGabarit()) {\n\t\t\t$msg = JText::_('CK_INSTALL_GABARIT_ERROR');\n\t\t\t$link = 'index.php?option=com_templateck&view=template&layout=install';\n\t\t\t$type = 'error';\n\t\t} else {\n\t\t\t$msg = JText::_('CK_GABARIT_INSTALLED');\n\t\t\t$link = 'index.php?option=com_templateck&view=templates';\n\t\t\t$type = 'message';\n\t\t}\n\n\t\t$this->setRedirect($link, $msg, $type);\n\t}", "title": "" }, { "docid": "81eb2584c27b45be90fb4763dbca7544", "score": "0.5381668", "text": "private function _import_1()\r\n\t{\r\n\t\t$this->layout->add_breadcrumb(lang('step') . ' 1', 'users/import/1');\r\n\t\t\r\n\t\tif ($this->input->post())\r\n\t\t{\r\n\t\t\t$upload_config = array(\r\n\t\t\t\t'upload_path' => APPPATH . '/uploads',\r\n\t\t\t\t'allowed_types' => 'csv|txt|tsv',\r\n\t\t\t\t'encrypt_name' => TRUE,\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$this->load->library('upload', $upload_config);\r\n\t\t\t\r\n\t\t\t$upload = $this->upload->do_upload();\r\n\t\t\t\r\n\t\t\tif ( ! $upload)\r\n\t\t\t{\r\n\t\t\t\t// Fail\r\n\t\t\t\t$this->flash->set('error', strip_tags($this->upload->display_errors()));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// OK. Upload data\r\n\t\t\t$upload_data = $this->upload->data();\r\n\t\t\t\r\n\t\t\t// All import data that will be stored in the session between steps\r\n\t\t\t$import_data = array(\r\n\t\t\t\t'file_name' => $upload_data['file_name'],\r\n\t\t\t\t'file_path' => $upload_data['full_path'],\r\n\t\t\t\t'existing' => $this->input->post('existing'),\r\n\t\t\t\t'password' => $this->input->post('password'),\r\n\t\t\t\t'g_id' => $this->input->post('g_id'),\r\n\t\t\t\t'd_id' => $this->input->post('d_id'),\r\n\t\t\t\t'email_domain' => str_replace('@', '', $this->input->post('email_domain')),\r\n\t\t\t\t'u_enabled' => $this->input->post('u_enabled'),\r\n\t\t\t\t'step' => '2',\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// Store this info in the session for retrieval in next stages\r\n\t\t\t$this->session->set_userdata('import', $import_data);\r\n\t\t\t\r\n\t\t\t// ALL DONE!!!\r\n\t\t\t\r\n\t\t\t// Go to next step!\r\n\t\t\tredirect('users/import/2');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2dc513a91d196beda1cb76f478baaa53", "score": "0.53803194", "text": "function do_loan_payments_import()\n\t{\n\t\tif(isset($_FILES['import_csv']))\n\t\t{\n\t\t\tif(is_uploaded_file($_FILES['import_csv']['tmp_name']))\n\t\t\t{\n\t\t\t\t//import products from excel \n\t\t\t\t$response = $this->import_model->import_csv_loan_payments($this->csv_path);\n\t\t\t\t\n\t\t\t\tif($response == FALSE)\n\t\t\t\t{\n\t\t\t\t\t$v_data['import_response_error'] = 'Something went wrong. Please try again.';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif($response['check'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$v_data['import_response_error'] = $response['response'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$v_data['import_response_error'] = 'Please select a file to import.';\n\t\t}\n\t\t\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t\n\t\t$data['content'] = $this->load->view('import/import_loan_payments', $v_data, true);\n\t\t$this->load->view('admin/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "f5c208d38d3380b45cd2bf2729a0786a", "score": "0.5377085", "text": "function doimport()\n\t{\n\t\t$messages = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $this->ipsclass->input['lang_name'] )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"You must enter a name for this language import!\");\n\t\t}\n\t\t\n\t\tif ( $_FILES['FILE_UPLOAD']['name'] == \"\" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == \"none\") )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// check and load from server\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( ! $this->ipsclass->input['lang_location'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->main_msg = \"No upload file was found and no filename was specified.\";\n\t\t\t\t$this->import();\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! file_exists( ROOT_PATH . $this->ipsclass->input['lang_location'] ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->main_msg = \"Could not find the file to open at: \" . ROOT_PATH . $this->ipsclass->input['lang_location'];\n\t\t\t\t$this->import();\n\t\t\t}\n\t\t\t\n\t\t\tif ( preg_match( \"#\\.gz$#\", $this->ipsclass->input['lang_location'] ) )\n\t\t\t{\n\t\t\t\tif ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['lang_location'], 'rb' ) )\n\t\t\t\t{\n\t\t\t\t\twhile ( ! @gzeof( $FH ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$content .= @gzread( $FH, 1024 );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t@gzclose( $FH );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $FH = @fopen( ROOT_PATH.$this->ipsclass->input['lang_location'], 'rb' ) )\n\t\t\t\t{\n\t\t\t\t\t$content = @fread( $FH, filesize(ROOT_PATH.$this->ipsclass->input['lang_location']) );\n\t\t\t\t\t@fclose( $FH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Get uploaded schtuff\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$tmp_name = $_FILES['FILE_UPLOAD']['name'];\n\t\t\t$tmp_name = preg_replace( \"#\\.gz$#\", \"\", $tmp_name );\n\t\t\t\n\t\t\t$content = $this->ipsclass->admin->import_xml( $tmp_name );\n\t\t\t\n\t\t\tif( !$content )\n\t\t\t{\n\t\t\t\t$this->ipsclass->main_msg = \"There was an error processing the file.\";\n\t\t\t\t$this->import();\n\t\t\t}\t\t\t\t\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check dirs, etc\n\t\t//-----------------------------------------\n\t\t\n\t\t$safename = substr( str_replace( \" \", \"\", strtolower( preg_replace( \"[^a-zA-Z0-9]\", \"\", $this->ipsclass->input['lang_name'] ) ) ), 0, 10 );\n\t\t\n\t\tif ( @file_exists( CACHE_PATH.'cache/lang_cache/'.$safename ) )\n\t\t{\n\t\t\t$safename = $safename . substr( time(), 5, 10 );\n\t\t}\n\t\t\n\t\tif ( ! $content )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"The XML file appears to be empty - please check the form and try again\";\n\t\t\t$this->import();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unpack the datafile\n\t\t//-----------------------------------------\n\t\t\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\t//-----------------------------------------\n\t\t// pArse\n\t\t//-----------------------------------------\n\t\t\n\t\t$lang_array = array();\n\t\t\n\t\tif( count($xml->xml_array['languageexport']['languagegroup']['langbit']) )\n\t\t{\n\t\t\tforeach( $xml->xml_array['languageexport']['languagegroup']['langbit'] as $entry )\n\t\t\t{\n\t\t\t\tif( $entry['file']['VALUE'] == 'lang_javascript.js' )\n\t\t\t\t{\n\t\t\t\t\t$lang_array[ $entry['file']['VALUE'] ] = $entry['value']['VALUE'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$key = $entry['key']['VALUE'];\n\t\t\t\t\t$value = $entry['value']['VALUE'];\n\t\t\t\t\t$file = $entry['file']['VALUE'];\n\t\t\t\t\t\n\t\t\t\t\t$lang_array[ $file ][ $key ] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( ! count( $lang_array ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"The XML file appears to be empty - please check the form and try again\";\n\t\t\t$this->import();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Sort...\n\t\t//-----------------------------------------\n\t\t\n\t\tksort($lang_array);\n\t\t\n\t\t//-----------------------------------------\n\t\t// Attempt dir creation\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! @mkdir( CACHE_PATH.'cache/lang_cache/'.$safename, 0777 ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Cannot create the directory '$safename' in the './cache/lang_cache' directory - please check directory permissions on 'lang_cache' and try again.\";\n\t\t\t$this->import();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@chmod( CACHE_PATH.'cache/lang_cache/'.$safename, 0777 );\n\t\t}\n\t\t\n\t\t//print \"<pre>\"; print_r( $new_file_array ); exit();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Loop, sort - compile and save\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach( $lang_array as $file => $data )\n\t\t{\n\t\t\t$new_file_array = array();\n\t\t\t\n\t\t\t$real_name = $file;\n\n\t\t\tif( $real_name == 'lang_javascript.js' )\n\t\t\t{\n\t\t\t\t$file_contents = base64_decode( $data );\n\t\t\t\t\n\t\t\t\tif ( $FH = @fopen( CACHE_PATH.'cache/lang_cache/'.$safename.'/'.$real_name, 'w' ) )\n\t\t\t\t{\n\t\t\t\t\t@fwrite( $FH, $file_contents );\n\t\t\t\t\t@fclose( $FH );\n\t\t\t\t\n\t\t\t\t\t$messages[] = \"'{$file}' imported correctly!\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$messages[] = \"Cannot create '{$file}' - skipping...\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\tif( is_array($lang_array[ $file ]) AND count($lang_array[ $file ]) )\n\t\t\t{\n\t\t\t\tforeach( $lang_array[ $file ] as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$new_file_array[ $k ] = $v;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tksort($new_file_array);\n\t\t\t}\n\t\t\t\n\t\t\tif ( count( $new_file_array ) )\n\t\t\t{\n\t\t\t\t$file_contents = \"<?php\\n\\n\".'$lang = array('.\"\\n\";\n\t\t\t\t\n\t\t\t\tforeach( $new_file_array as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$file_contents .= \"\\n'\".$k.\"' => \\\"\".preg_replace( '/\"/', '\\\\\"', stripslashes($v) ).\"\\\",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$file_contents .= \"\\n\\n);\\n\\n?\".\">\";\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ( $FH = @fopen( CACHE_PATH.'cache/lang_cache/'.$safename.'/'.$real_name, 'w' ) )\n\t\t\t\t{\n\t\t\t\t\t@fwrite( $FH, $file_contents );\n\t\t\t\t\t@fclose( $FH );\n\t\t\t\t\n\t\t\t\t\t$messages[] = \"'{$file}' imported correctly!\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$messages[] = \"Cannot create '{$file}' - skipping...\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$messages[] = \"'{$file}' appears to be empty - skipping...\";\n\t\t\t}\n\t\t\t\n\t\t\tunset($new_file_array);\n\t\t\tunset($file_contents);\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Write to DB\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'languages', array(\n\t\t\t\t\t\t\t\t\t\t\t'ldir' => $safename,\n\t\t\t\t\t\t\t\t\t\t\t'lname' => $this->ipsclass->input['lang_name'],\n\t\t\t\t\t\t\t\t\t\t\t'lauthor' => $xml->xml_array['languageexport']['ATTRIBUTES']['author'],\n\t\t\t\t\t\t\t\t\t\t\t'lemail' => $xml->xml_array['languageexport']['ATTRIBUTES']['email'],\n\t\t\t\t\t ) );\n\t\t\n\t\t$this->rebuild_cache();\n\t\t\n\t\t$this->ipsclass->main_msg = \"Import attempt completed<br />\".implode( \"\\n<br />\", $messages );\n\t\t$this->import();\n\t}", "title": "" }, { "docid": "1cd9c04c5effe2fee5b9a2ee43617c0c", "score": "0.5375614", "text": "public function test_version1manualimportlogsruntimedatabaseerror() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/blocks/rlip/lib.php');\n\n // Our import data.\n $data = array(\n array('action', 'username', 'password', 'firstname', 'lastname', 'email', 'city', 'country'),\n array('create', 'testuser', 'Password!0', 'firstname', 'lastname', '[email protected]', 'test', 'CA'),\n array('create', 'testuser', 'Password!0', 'firstname', 'lastname', '[email protected]', 'test', 'CA'),\n array('create', 'testuser', 'Password!0', 'firstname', 'lastname', '[email protected]', 'test', 'CA')\n );\n\n // Import provider that creates an instance of a file plugin that delays two seconds between reading the third and\n // fourth entry.\n $provider = new rlip_importprovider_delay_after_three_users($data);\n $manual = true;\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1', $provider, null, $manual);\n\n // We should run out of time after processing the second real entry.\n ob_start();\n // Using three seconds to allow for one slow read when counting lines.\n $importplugin->run(0, 0, 3);\n ob_end_clean();\n\n $expectedmsg = \"Failed importing all lines from import file bogus due to time limit exceeded. Processed 2 of 3 records.\";\n\n // Validation.\n $select = \"{$DB->sql_compare_text('statusmessage')} = :message\";\n $params = array('message' => $expectedmsg);\n $exists = $DB->record_exists_select(RLIP_LOG_TABLE, $select, $params);\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "bb90ae1b563c6a27d85252f4b12fc30d", "score": "0.5374773", "text": "function isSuccessful();", "title": "" }, { "docid": "531c0cc5a71ff20eadeaf5ab89988ac7", "score": "0.5374597", "text": "function gathercontent_drush_import_process_finished($success, $results, $operations) {\n if ($success) {\n if ($results['success'] > 0) {\n drush_log(\\Drupal::translation()\n ->formatPlural($results['success'], '1 item was imported successfully.', '@count items were imported successfully.'));\n }\n\n if ($results['failed'] > 0) {\n drush_log(\\Drupal::translation()\n ->formatPlural($results['failed'], '1 item was not imported. Check errors below.', '@count items were not imported. Check errors below.'), 'error');\n }\n\n if ($results['failed'] == 0 && $results['success'] == 0) {\n drush_log(\\Drupal::translation()\n ->translate('Nothing was imported or updated.'));\n }\n }\n else {\n $error_operation = reset($operations);\n\n drush_set_error(\n 'gathercontent_import_failed',\n dt('An error occurred while processing @operation with arguments : @args',\n [\n '@operation' => $error_operation[0],\n '@args' => print_r($error_operation[0], TRUE),\n ]\n )\n );\n }\n}", "title": "" }, { "docid": "65ea18d68af10fc3cf1ad49f74a686fb", "score": "0.5368589", "text": "public function uploaded() {\n\t\tif (isset($_FILES[$this->name]) && $_FILES[$this->name]['error'] == UPLOAD_ERR_OK) {\n\t\t\treturn true;\n\t\t} else\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "e7329fb3404738cfd2ec5df51fa95f1a", "score": "0.53627634", "text": "public function test_version1importpreventsinvalidcourseguestoncreate() {\n $this->run_core_course_import(array('shortname' => 'invalidcourseguestcreate', 'guest' => 2));\n $this->assert_core_course_does_not_exist('invalidcourseguestcreate');\n }", "title": "" }, { "docid": "4ba8f2c998834d2e927e64979647d2f1", "score": "0.53606105", "text": "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_SETTINGS_STATUS_CONFIG_MODULE_NOT_INSTALLED'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9ccd5d5d1963f63a8e489038001fd675", "score": "0.5355556", "text": "public function has_imported_gallery_files() {\n\n\t\treturn ! empty( $_FILES['envira_import_gallery']['name'] ) || ! empty( $_FILES['envira_import_gallery']['tmp_name'] );\n\n\t}", "title": "" }, { "docid": "3553b61d2489d48f4aa952c14e717722", "score": "0.53472155", "text": "abstract public function isSuccessful();", "title": "" }, { "docid": "75edbf6c91be461ad558be7438bb833a", "score": "0.53249145", "text": "public function test_version1importpreventsinvalidcourseformatoncreate() {\n $this->run_core_course_import(array('shortname' => 'invalidcourseformatcreate', 'format' => 'invalid'));\n $this->assert_core_course_does_not_exist('invalidcourseformatcreate');\n }", "title": "" }, { "docid": "01dadcbcc37cf7442873f434c23720ba", "score": "0.53187364", "text": "function importXml() {\n global $i18n;\n\n // Do we have a compressed file?\n $compressed = false;\n $file_ext = substr($_FILES['xmlfile']['name'], strrpos($_FILES['xmlfile']['name'], '.') + 1);\n if (in_array($file_ext, array('bz','tbz','bz2','tbz2'))) {\n $compressed = true;\n }\n\n // Create a temporary file.\n $dirName = dirname(TEMPLATE_DIR . '_c/.');\n $filename = tempnam($dirName, 'import_');\n\n // If the file is compressed - uncompress it.\n if ($compressed) {\n if (!$this->uncompress($_FILES['xmlfile']['tmp_name'], $filename)) {\n $this->errors->add($i18n->get('error.sys'));\n return;\n }\n unlink($_FILES['xmlfile']['tmp_name']);\n } else {\n if (!move_uploaded_file($_FILES['xmlfile']['tmp_name'], $filename)) {\n $this->errors->add($i18n->get('error.upload'));\n return;\n }\n }\n\n // Initialize XML parser.\n $parser = xml_parser_create();\n xml_set_object($parser, $this);\n xml_set_element_handler($parser, 'startElement', false);\n\n // We need to parse the file 2 times:\n // 1) First pass: determine if import is possible.\n // 2) Second pass: import data, one tag at a time.\n\n // Read and parse the content of the file. During parsing, startElement is called back for each tag.\n $file = fopen($filename, 'r');\n while (($data = fread($file, 4096)) && $this->errors->no()) {\n if (!xml_parse($parser, $data, feof($file))) {\n $this->errors->add(sprintf($i18n->get('error.xml'),\n xml_get_current_line_number($parser),\n xml_error_string(xml_get_error_code($parser))));\n }\n }\n if ($this->conflicting_logins) {\n $this->canImport = false;\n $this->errors->add($i18n->get('error.user_exists'));\n $this->errors->add(sprintf($i18n->get('error.cannot_import'), $this->conflicting_logins));\n }\n\n $this->firstPass = false; // We are done with 1st pass.\n xml_parser_free($parser);\n if ($file) fclose($file);\n if (!$this->canImport) {\n unlink($filename);\n return;\n }\n if ($this->errors->yes()) return; // Exit if we have errors.\n\n // Now we can do a second pass, where real work is done.\n $parser = xml_parser_create();\n xml_set_object($parser, $this);\n xml_set_element_handler($parser, 'startElement', false);\n\n // Read and parse the content of the file. During parsing, startElement is called back for each tag.\n $file = fopen($filename, 'r');\n while (($data = fread($file, 4096)) && $this->errors->no()) {\n if (!xml_parse($parser, $data, feof($file))) {\n $this->errors->add(sprintf($i18n->get('error.xml'),\n xml_get_current_line_number($parser),\n xml_error_string(xml_get_error_code($parser))));\n }\n }\n xml_parser_free($parser);\n if ($file) fclose($file);\n unlink($filename);\n }", "title": "" }, { "docid": "00a2489d455c3d157fe0f98e1d170daa", "score": "0.5312791", "text": "public function do_import()\n {\n echo '<br><br><span class=\"success\">beginning script:</span>';\n if (!$_FILES) {\n echo '<br><span class=\"error\"> error: No file selected!</span>';\n return;\n } //$_FILES\n \n foreach ($_FILES as $file) {\n echo '<br>starting upload:';\n $fields = array();\n $insert = array();\n $rows = array();\n $test = array( //order matters\n 'project_name',\n 'sample_name',\n 'collection_date',\n 'collection_time',\n 'collection_timezone',\n 'samp_store_loc',\n 'samp_period',\n 'biome',\n 'material',\n 'samp_type',\n 'feature_primary',\n 'feature_secondary',\n 'samp_lat',\n 'samp_lon',\n 'geo_loc_name',\n 'country',\n 'env_package',\n 'notes',\n 'source_subject_id',\n 'source_name_primary',\n 'source_name_secondary',\n 'source_treatment'\n );\n \n $ext = end(explode('.', $file['name']));\n if ($ext !== 'csv') {\n echo '<br><span class=\"error\"> error: wrong file type. only \"csv\" allowed.</span>';\n return;\n } //$ext !== 'csv'\n \n // echo '<pre>';\n // print_r($file);\n // echo '</pre>';\n \n $row = 1;\n echo '<br>opening file \"' . $file['name'] . '\"';\n if (($handle = fopen($file['tmp_name'], \"r\")) !== FALSE) {\n echo '<br>parsing';\n while (($data = fgetcsv($handle, 10000, \",\")) !== FALSE) {\n \n $num = count($data);\n \n if ($row == 1) {\n echo '<br>finding field names';\n echo '<br>found:';\n for ($i = 0; $i < $num; $i++) {\n if (requiredError($data[$i], $test[$i])) {\n $fields[$i] = $data[$i];\n echo \"<br>\\t - \" . $fields[$i];\n } //requiredError($data[$i], $test[$i])\n else {\n return;\n }\n } //$i = 0; $i < $num; $i++\n \n $row++;\n continue;\n } //$row == 1\n elseif ($row == 2) {\n $row++;\n continue;\n } //$row == 2\n else {\n if ($row == 3)\n echo '<br>adding rows:';\n echo '<br> - ' . $row;\n for ($i = 0; $i < $num; $i++) {\n $data[$i] = trim($data[$i]);\n switch ($fields[$i]) {\n case 'project_name':\n if (strlen($data[$i]) > 10) {\n echo '<br><span class=\"error\"> error: \"project_name\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 10\n if (empty($data[$i])) {\n echo '<br><span class=\"error\"> error: \"project_name\" on row ' . $row . ' is required.</span>';\n return;\n } //empty($data[$i])\n \n $insert['SAMP_EXP_ID'] = $data[$i];\n break;\n \n case 'sample_name':\n if (empty($data[$i])) {\n echo '<br><span class=\"error\"> error: \"sample_name\" on row ' . $row . ' is required.</span>';\n return;\n } //empty($data[$i])\n if (!is_numeric($data[$i])) {\n echo '<br><span class=\"error\"> error: \"sample_name\" on row ' . $row . ' is the wrong type.</span>';\n return;\n } //is_numeric($data[$i])\n \n $insert['SAMP_ID'] = (int) $data[$i];\n break;\n \n case 'collection_date':\n if (preg_match('/^(\\d{4})-(\\d{2})-(\\d{2})$/', $data[$i], $datebit)) {\n if(!checkdate($datebit[2] , $datebit[3] , $datebit[1])){\n echo '<br><span class=\"error\"> error: \"collection_date\" on row ' . $row . ' has invalid date.</span>';\n }\n } else {\n echo '<br><span class=\"error\"> error: \"collection_date\" on row ' . $row . ' is wrong format (yyyy-mm-dd required).</span>';\n return false;\n }\n \n if (empty($data[$i])) {\n echo '<br><span class=\"error\"> error: \"collection_date\" on row ' . $row . ' is required.</span>';\n return;\n } //empty($data[$i])\n \n $insert['SAMP_DATE'] = $data[$i];\n break;\n \n case 'collection_time':\n if (!empty($data[$i]) && !preg_match('/^([01]\\d|2[0123]):([0-5]\\d):([0-5]\\d)$/', $data[$i])) {\n echo '<br><span class=\"error\"> error: \"collection_time\" on row ' . $row . ' is wrong format (hh:mm:ss required).</span>';\n return;\n } \n \n $insert['SAMP_TIME'] = $data[$i];\n break;\n \n case 'collection_timezone':\n if (strlen($data[$i]) > 10) {\n echo '<br><span class=\"error\"> error: \"collection_timezone\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 10\n \n $insert['SAMP_TMZ'] = $data[$i];\n break;\n \n case 'samp_period':\n if (!empty($data[$i]) && !is_numeric($data[$i])) {\n echo '<br><span class=\"error\"> error: \"samp_period\" on row ' . $row . ' is the wrong type.</span>';\n return;\n } //empty($data[$i]) && !is_numeric($data[$i])\n \n $insert['SAMP_PERIOD'] = (int) $data[$i];\n break;\n \n case 'samp_store_loc':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"samp_store_loc\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n if (empty($data[$i])) {\n echo '<br><span class=\"error\"> error: \"samp_store_loc\" on row ' . $row . ' is required.</span>';\n return;\n } //empty($data[$i])\n \n $insert['SAMP_STOR_LOC'] = $data[$i];\n break;\n \n case 'biome':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"biome\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_BIOME'] = $data[$i];\n break;\n \n case 'material':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"material\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_MAT'] = $data[$i];\n break;\n \n case 'samp_type':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"samp_type\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_TYPE'] = $data[$i];\n break;\n \n case 'feature_primary':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"feature_primary\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_SITE'] = $data[$i];\n break;\n \n case 'feature_secondary':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"feature_secondary\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_SUBSITE'] = $data[$i];\n break;\n \n case 'samp_lat':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"samp_lat\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_GEO_LAT'] = $data[$i];\n break;\n \n case 'samp_lon':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"samp_lon\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_GEO_LONG'] = $data[$i];\n break;\n \n case 'geo_loc_name':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"geo_loc_name\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_GEO_DESC'] = $data[$i];\n break;\n \n case 'env_package':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"env_package\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_ENVPKG'] = $data[$i];\n break;\n \n case 'country':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"country\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SAMP_COUNTRY'] = $data[$i];\n break;\n \n case 'notes':\n \n $insert['SAMP_NOTES'] = $data[$i];\n break;\n \n case 'source_subject_id':\n if (empty($data[$i])) {\n echo '<br><span class=\"error\"> error: \"source_subject_id\" on row ' . $row . ' is required.</span>';\n return;\n } //empty($data[$i])\n if (!is_numeric($data[$i])) {\n echo '<br><span class=\"error\"> error: \"source_subject_id\" on row ' . $row . ' is the wrong type. (integer expected)</span>';\n return;\n } //is_numeric($data[$i])\n \n $insert['SOURCE_NUM'] = (int) $data[$i];\n break;\n \n case 'source_name_primary':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"source_name_primary\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SOURCE_TYPE'] = $data[$i];\n break;\n \n case 'source_name_secondary':\n if (strlen($data[$i]) > 40) {\n echo '<br><span class=\"error\"> error: \"source_name_secondary\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 40\n \n $insert['SOURCE_SUBTYPE'] = $data[$i];\n break;\n \n case 'source_treatment':\n if (strlen($data[$i]) > 60) {\n echo '<br><span class=\"error\"> error: \"source_treatment\" on row ' . $row . ' exceeded set length.</span>';\n return;\n } //strlen($data[$i]) > 60\n \n $insert['SOURCE_TREATMENT'] = $data[$i];\n break;\n \n default:\n echo '<br><span class=\"error\"> error: unrecognised field</span>';\n return;\n } //$fields[$i]\n \n } //$i = 0; $i < $num; $i++\n array_push($rows, $insert);\n $row++;\n }\n } //($data = fgetcsv($handle, 10000, \",\")) !== FALSE\n \n echo '<br>closing file \"' . $file['name'] . '\"';\n fclose($handle);\n } //($handle = fopen($file['tmp_name'], \"r\")) !== FALSE\n \n echo '<br>preparing rows for insert:';\n echo '<br> - checking for duplicate keys';\n $sample_keys = array();\n foreach ($rows as $sample) {\n array_push($sample_keys, $sample['SAMP_EXP_ID'] . ' ' . $sample['SAMP_ID']);\n } //$rows as $sample\n if (checkDuplicates($sample_keys)) {\n echo '<span class=\"error\"><br>error: duplicate primary keys present in file (SAMP_EXP_ID, SAMP_ID)</span>';\n return;\n } //checkDuplicates($sample_keys)\n \n $row = 1;\n foreach ($rows as &$sample) {\n createNulls($sample);\n \n echo '<br>' . $row . ' - checking for existing IDs';\n $source = array(\n 'SAMP_EXP_ID',\n 'SAMP_ID'\n );\n $query = array(\n $sample['SAMP_EXP_ID'],\n $sample['SAMP_ID']\n );\n if ($result = $this->sample->search($query, $source, 'SAMPLE', 'SAMP_EXP_ID, SAMP_ID')) {\n echo '<span class=\"error\"><br>error: record ' . $sample['SAMP_EXP_ID'] . ' ' . $sample['SAMP_ID'] . ' already exists</span>';\n return;\n } //$result = $this->sample->search($query, $source, 'SAMPLE', 'SAMP_EXP_ID, SAMP_ID')\n \n echo '<br>' . $row . ' - resolving foreign keys';\n $source = array(\n 'SOURCE_NUM',\n 'SOURCE_TYPE',\n 'SOURCE_SUBTYPE',\n 'SOURCE_TREATMENT'\n );\n $query = array(\n $sample['SOURCE_NUM'],\n $sample['SOURCE_TYPE'],\n $sample['SOURCE_SUBTYPE'],\n $sample['SOURCE_TREATMENT']\n );\n if ($result = $this->sample->search($query, $source, 'SOURCE', 'SOURCE_ID')) {\n echo '<br>' . $row . ' - found existing source record';\n $sample['SOURCE_ID'] = $result[0]['SOURCE_ID'];\n unset($sample['SOURCE_NUM']);\n unset($sample['SOURCE_TYPE']);\n unset($sample['SOURCE_SUBTYPE']);\n unset($sample['SOURCE_TREATMENT']);\n } //$result = $this->sample->search($query, $source, 'SOURCE', 'SOURCE_ID')\n else {\n $query = array(\n 'SOURCE_NUM' => $sample['SOURCE_NUM'],\n 'SOURCE_TYPE' => $sample['SOURCE_TYPE'],\n 'SOURCE_SUBTYPE' => $sample['SOURCE_SUBTYPE'],\n 'SOURCE_TREATMENT' => $sample['SOURCE_TREATMENT']\n );\n echo '<br>' . $row . ' - creating new source record';\n $id = $this->sample->create_source($query);\n $sample['SOURCE_ID'] = $id;\n unset($sample['SOURCE_NUM']);\n unset($sample['SOURCE_TYPE']);\n unset($sample['SOURCE_SUBTYPE']);\n unset($sample['SOURCE_TREATMENT']);\n }\n $row++;\n } //$rows as &$sample\n \n echo '<br>performing batch insert';\n $this->sample->import($rows);\n echo '<pre>';\n print_r($rows);\n echo '</pre>';\n \n } //$_FILES as $file\n \n echo '<br><span class=\"success\">Complete!</span>';\n }", "title": "" }, { "docid": "989501038bdcea6942191f8dcd209345", "score": "0.53104967", "text": "private function check_install_status() {\n\t\tglobal $db;\n\n\t\t// Check if a table exists\n\t\t$result = $db->query( \"SHOW TABLES LIKE '$db->galleries'\" );\n\n\t\t// If already installed, redirect to home page\n\t\tif ( ! empty( $result ) ) {\n\t\t\tredirect( get_site_url() );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "f35bdb6e0a31144e72eb35288a0e2edb", "score": "0.5310072", "text": "public function testImportAccounts($filename)\n {\n $this->testlogin();\n $file = $this->prepareFile($filename);\n $this->get('/admin/' . $this->baseUri)->assertStatus(200);\n $this->from('/admin/' . $this->baseUri)->post('/admin/' . $this->baseUri . '/account/import', [\n 'import_file' => $file\n ])->assertStatus(302);\n foreach ($this->dataCheck as $data) {\n unset($data['company_uen']);\n $this->assertDatabaseHas('users', $data);\n }\n }", "title": "" } ]
8bacda54d0653096f6709070688ee6c1
Determine if the pivot model has timestamp attributes.
[ { "docid": "4a9a7e28e7ab26919c8d7c217b1c1560", "score": "0.8088977", "text": "public function hasTimestampAttributes()\n {\n return array_key_exists($this->getCreatedAtColumn(), $this->attributes);\n }", "title": "" } ]
[ { "docid": "596ef5150f0e0c213c19e02a8f71ae08", "score": "0.7988365", "text": "public function isTimeStamp()\n {\n return in_array($this->getEloquentDataMethod(), ['timestamp', 'timestampTz']);\n }", "title": "" }, { "docid": "50b902d94556f8895aae23ca5b31d577", "score": "0.76763266", "text": "public function hasTimestampValue(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "35e7a91dc0d778c773413c448fab5d9e", "score": "0.76018614", "text": "public function hasTimestamp()\n {\n return $this->timestamp !== null;\n }", "title": "" }, { "docid": "d075a99612baa2572280367fbe92084f", "score": "0.75812954", "text": "public function hasTimestamps(): bool\n {\n return $this->timestamps;\n }", "title": "" }, { "docid": "dde6d55e7b8e4cc317ff8a818c12d665", "score": "0.71569854", "text": "public function usesTimestamps()\n {\n return $this->timestamps || $this->userTimestamps || $this->polymorphicTimestamps;\n }", "title": "" }, { "docid": "e24be106a75b0d968a7b4b9bf3d61ece", "score": "0.7099996", "text": "public function isTimestamped(): bool\n {\n return $this->getFormat() == static::TIMESTAMP_FORMAT;\n }", "title": "" }, { "docid": "61127357a95af4d836185e74cb5c2e0a", "score": "0.6809823", "text": "public function hasTimestampTicks()\n {\n return $this->TimestampTicks !== null;\n }", "title": "" }, { "docid": "3707a1411fc4bfd2ef7b333b6501b731", "score": "0.67101014", "text": "public function isDateTime()\n {\n return in_array($this->getEloquentDataMethod(), ['dateTime', 'dateTimeTz'])\n || in_array($this->name, ['created_at', 'updated_at', 'deleted_at']);\n }", "title": "" }, { "docid": "a03db602724537bdfd1398186dc1dfcf", "score": "0.6668851", "text": "public function hasCreateTime(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "a03db602724537bdfd1398186dc1dfcf", "score": "0.6668851", "text": "public function hasCreateTime(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "69eb059631a23fad094126a08705283d", "score": "0.6592102", "text": "public function usesUserTimestamps()\n {\n return $this->userTimestamps || $this->polymorphicTimestamps;\n }", "title": "" }, { "docid": "2d17491e0560b5ef54fe2908af0613da", "score": "0.6572792", "text": "public function isTime()\n {\n return in_array($this->getEloquentDataMethod(), ['time', 'timeTz']);\n }", "title": "" }, { "docid": "2609c68359d18f72d8ca2aed7fd8f0e9", "score": "0.6529581", "text": "function isUseTimestamp($field)\n\t{\n\t\treturn $this->getFieldData($field, \"UseTimestamp\");\n\t}", "title": "" }, { "docid": "98a9766f4796029fe936f4d0129dd0c3", "score": "0.64449644", "text": "public function usesPolymorphicTimestamps()\n {\n return $this->polymorphicTimestamps;\n }", "title": "" }, { "docid": "7975d6f225f59d5be69a8c4538ed6463", "score": "0.6372255", "text": "public function hasPublishTime(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "29b1196eb6e68446835d1751fc67706c", "score": "0.6335577", "text": "public function hasTime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "23402c563c1b70f7e001394f34e40b9b", "score": "0.63092065", "text": "public static function usesTimestamps(){}", "title": "" }, { "docid": "96e44777a55bd69bfc0854baa5182823", "score": "0.63075465", "text": "public function isDateTime(){\n\t\tswitch(strtolower($this->getType())){\n\t\t\tcase 'datetime':\n\t\t\tcase 'timestamp':\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "35f5c99b7ee62e0abae54c4c730c8246", "score": "0.62775767", "text": "public function hasCreationTimestampTicks()\n {\n return $this->CreationTimestampTicks !== null;\n }", "title": "" }, { "docid": "040bd2679bc83aa6fe16b4e58df4fdaa", "score": "0.62738484", "text": "public function hasEventTime(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cf0735c9e73e5434f1fa9b4861d9f845", "score": "0.614126", "text": "public function usesTimestampsInIndex()\n {\n return $this->usesTimestampsInIndex;\n }", "title": "" }, { "docid": "8028d7b2f5b1d9059db0cc073d14bf76", "score": "0.61272615", "text": "public function hasTimetick(){\n return $this->_has(19);\n }", "title": "" }, { "docid": "b379354c527ffb8f2d8161314b864a40", "score": "0.60575634", "text": "public function hasSendTimestamp()\n {\n return $this->SendTimestamp !== null;\n }", "title": "" }, { "docid": "78b8f8f6f11f44cee888850aa4953610", "score": "0.6022786", "text": "public function isTime(){\n\t\tswitch(strtolower($this->getType())){\n\t\t\tcase 'datetime':\n\t\t\tcase 'timestamp':\n\t\t\tcase 'time':\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "99ad9703be9246105cad713b92a4d360", "score": "0.5993483", "text": "public function existsInStorage()\n {\n return $this->created_at !== null;\n }", "title": "" }, { "docid": "649010be0e1ee56bae9e84cb46fa37e4", "score": "0.5990728", "text": "public function hasDate(){\n return $this->_has(17);\n }", "title": "" }, { "docid": "da85076bf4b25aa8b8287603ce48c30f", "score": "0.59510356", "text": "public function isSetDateTime()\n {\n return !is_null($this->_fields['DateTime']['FieldValue']);\n }", "title": "" }, { "docid": "96e58054deae06c7b49d40dc4ccbd24e", "score": "0.5927424", "text": "public function validateTimestamps()\n {\n $rootNode = $this->_document;\n $timestampNodes = $rootNode->getElementsByTagName('Conditions');\n for ($i = 0; $i < $timestampNodes->length; $i++) {\n $nbAttribute = $timestampNodes->item($i)->attributes->getNamedItem(\"NotBefore\");\n $naAttribute = $timestampNodes->item($i)->attributes->getNamedItem(\"NotOnOrAfter\");\n if ($nbAttribute && strtotime($nbAttribute->textContent) > time()) {\n return false;\n }\n if ($naAttribute && strtotime($naAttribute->textContent) <= time()) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "953111f3784177d4c318e0657d069033", "score": "0.5925494", "text": "public function isDatetime()\n\t{\n\t\tif($this->_type === Column::TYPE_DATETIME)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9e4e0f398883998a15b3f47a79e7047c", "score": "0.59179264", "text": "public function hasUpdateTime(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "d7c522b14969cff2bc7a8525dfd6e807", "score": "0.5901447", "text": "private static function field_is_timestamp($fieldname){\n $retval = 1; // default to \n $length = strlen('_ts');\n if ($length == 0) {\n $retval = 1;\n } else { \n $retval = substr($fieldname, -$length) === '_ts' ? 1 : 0;\n }\n return $retval; \n }", "title": "" }, { "docid": "98a8a4a2c7d23443c7c702a52b421e2b", "score": "0.5897478", "text": "public function hasStarttime(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "ab4214f329b514b85b23b7abf85b28f5", "score": "0.58753186", "text": "private function isDateTimeColumn(ColumnSchema $column)\n {\n return in_array($column->type, ['datetime', 'timestamp']);\n }", "title": "" }, { "docid": "de112601382e1774142d986c04307354", "score": "0.58290845", "text": "public function isTimingPoint(): bool\n {\n return $this->timingPoint;\n }", "title": "" }, { "docid": "7a16401def8f12c5bf96f2b4c991d814", "score": "0.5825323", "text": "public function isSetTimepointType()\n {\n return !is_null($this->_fields['TimepointType']['FieldValue']);\n }", "title": "" }, { "docid": "6fba9a9933b7b613ea17e3a1df11c3bb", "score": "0.58240604", "text": "public function hasStarttime(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "5149335ba0c7ddda75369b9bb5d18c8e", "score": "0.5790817", "text": "public function testTimestamps ()\n {\n $attribute = $this->getAttribute();\n\n // The creation timestamp is automatically set\n $this->assertInstanceOf('DateTime', $attribute->getCreatedAt());\n\n // The updated timestamp is null by default\n $this->assertNull($attribute->getUpdatedAt());\n\n // Both are mutable\n $now = new \\DateTime();\n $attribute->setCreatedAt($now);\n $attribute->setUpdatedAt($now);\n\n $this->assertEquals($now, $attribute->getCreatedAt());\n $this->assertEquals($now, $attribute->getUpdatedAt());\n }", "title": "" }, { "docid": "78e665b9222f328ecc0416ebbf7176b4", "score": "0.57826585", "text": "public function touchUnixTimestamp() {\n if (! $this->usesUnixTimestamps()) {\n return false;\n }\n\n $this->updateUnixTimestamps();\n\n return true;\n }", "title": "" }, { "docid": "23fdd720ab4af9955c17a18cc17d3321", "score": "0.57554185", "text": "public function hasSendTimestampTicks()\n {\n return $this->SendTimestampTicks !== null;\n }", "title": "" }, { "docid": "d423d593464c8cbd7b17291e4cea6096", "score": "0.5719042", "text": "public function getHasDate()\n {\n return $this->getEntity()->getHasAttributeType('date');\n }", "title": "" }, { "docid": "703e4daf86fba36224191584dfc6926d", "score": "0.5707246", "text": "public function hasDeliveryTimestamp()\n {\n return $this->DeliveryTimestamp !== null;\n }", "title": "" }, { "docid": "2f8382a3c9ed017624e9918d15ceca0c", "score": "0.57012415", "text": "public function isTimestamp($dateTimestamp) {\n if (CheckInput::isDate($dateTimestamp)) { // The parameter is a timestamp\n return true; \n }\n return false; // The parameter is a date\n }", "title": "" }, { "docid": "106f747a1c88d21c6a4e279dd907848c", "score": "0.5700528", "text": "public function hasLastEventTimestampTicks()\n {\n return $this->LastEventTimestampTicks !== null;\n }", "title": "" }, { "docid": "6e1cb50c4391e5d0e3e669e19b7908a3", "score": "0.5673291", "text": "public function hasPivot()\n {\n return static::$hasPivot;\n }", "title": "" }, { "docid": "83212407030ec2361fd82d825b793743", "score": "0.5636364", "text": "public function hasTime() {\n return $this->hasGranularity('hour');\n }", "title": "" }, { "docid": "e98ff47dbf38c2507e825318bfc24d37", "score": "0.5635521", "text": "public function isDatetime()\n {\n return $this instanceof DatetimeColumnInterface;\n }", "title": "" }, { "docid": "7d0d083172e737b956bd04fe0837bb26", "score": "0.5634147", "text": "public function hasTimelineData(): bool\n {\n return (bool) $this->hasTimeline;\n }", "title": "" }, { "docid": "68f000137cca7606f7f93dafc19665fd", "score": "0.5628524", "text": "public function getPublishedAttribute(): bool\n {\n return ! is_null($this->published_at) && $this->published_at <= now()->toDateTimeString();\n }", "title": "" }, { "docid": "b195902b04d86780f43e346060dc938a", "score": "0.5590443", "text": "public function hasDeliveryTimestampTicks()\n {\n return $this->DeliveryTimestampTicks !== null;\n }", "title": "" }, { "docid": "16925c4c7406f7fbeddb070f58e9fca5", "score": "0.5570194", "text": "public function hasSetendtime(){\n return $this->_has(18);\n }", "title": "" }, { "docid": "b2f54f8b1e199162efc8fe943a2c3e2f", "score": "0.5542288", "text": "public function hasOgsDataReportTimeWindow()\n {\n return $this->ogs_data_report_time_window !== null;\n }", "title": "" }, { "docid": "518ac65c9971f4c1048e111f9a8d12a0", "score": "0.55347794", "text": "public function isDateOrTime()\n {\n return $this->isDate() || $this->isDateTime() || $this->isTime() || $this->isTimeStamp();\n }", "title": "" }, { "docid": "4e71bd40036d238915565270e275ceb6", "score": "0.5534375", "text": "public function hasPublishedSeconds(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "b6fc2547c084ca7c91471f0711e51861", "score": "0.5533437", "text": "public function isTimeSet()\n {\n // date starts at 01.01.2000 when box starts ...\n // so test, if we're later then 2009 to find out that\n // we're already synchronized ...\n if (time() > (40 * 365 * 24 * 3600)) // ~40 years ... means somewhere in 2009\n {\n // means we are much later that 2000 (date as wdtv starts) ...\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "7463805c8bbd04f4e044dcdc67442d0c", "score": "0.5526215", "text": "private function validateMeasurementTimestamp() {\r\n\t\t// Maybe passed through the form by the Controller: formInput['sequenceType']\r\n\t\t$this->measurement_timestamp = $this->extractForm('measurement_timestamp');\r\n\r\n\t\t$sensorSequenceType = $this->extractForm('sequenceType');\r\n\t\tswitch ($sensorSequenceType) {\r\n\t\t\tcase 'TIME_CODED':\r\n\t\t\t\t// Non-empty\r\n\t\t\t\tif (empty($this->measurement_timestamp))\r\n\t\t\t\t\t$this->setError('measurement_timestamp', 'MEASUREMENT_TIMESTAMP_EMPTY');\r\n\t\t\t\t// Timestamp Format\r\n\t\t\t\telse if (!$this->validTimestampFormat($this->measurement_timestamp)) {\r\n\t\t\t\t\t$this->setError('measurement_timestamp', 'MEASUREMENT_TIMESTAMP_FORMAT_INVALID');\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t// Timestamp represents a legitimate point in time\r\n\t\t\t\telse if (!$this->validTimestampValue($this->measurement_timestamp)) {\r\n\t\t\t\t\t$this->setError('measurement_timestamp', 'MEASUREMENT_TIMESTAMP_VALUE_INVALID');\r\n\t\t\t\t}\r\n\t\t\t\t// Timestamp fall between Epoch and the current time\r\n\t\t\t\telse if (!$this->timestampWithinValidRange($this->measurement_timestamp)) {\r\n\t\t\t\t\t$this->setError('measurement_timestamp', 'MEASUREMENT_TIMESTAMP_RANGE_INVALID');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'SEQUENTIAL':\r\n\t\t\t\t// Sequential measurements are ordered by index and don't have\r\n\t\t\t\t// associated timestamps\r\n\t\t\t\t// However, if this is a sequential measurement that already has\r\n\t\t\t\t// a timestamp, preserve it.\r\n\t\t\t\tif (!empty($this->measurement_timestamp))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t// Otherwise, set it to an empty string\r\n\t\t\t\t$this->measurement_timestamp = '';\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->setError('measurement_timestamp', 'MEASUREMENT_TIMESTAMP_INVALID');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "722b40cc1843916e77da2eff18bf16a2", "score": "0.5501043", "text": "public function getIsPublishedAttribute()\n {\n if ($this->published_at == null) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "9af17c5d53fe18293e7c5ab7a29710fd", "score": "0.54897404", "text": "public function hasTimestamps(string $createdAttribute = null, string $updatedAttribute = null): Model\n {\n $this->main['timestamps'] = true;\n $this->main['timestamp_created'] = $createdAttribute ?: 'created_at';\n $this->main['timestamp_updated'] = $updatedAttribute ?: 'updated_at';\n\n return $this;\n }", "title": "" }, { "docid": "89968c928a839114d5ba692d1ca46f34", "score": "0.548263", "text": "public function getTimeStampProperty()\n {\n return $this->timeStampProperty;\n }", "title": "" }, { "docid": "6874f4822acf6684b3d935e888f62ca8", "score": "0.54752594", "text": "public function hasRequestTime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "6874f4822acf6684b3d935e888f62ca8", "score": "0.54752594", "text": "public function hasRequestTime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "7c2f9dcc5feab98dcc302feda3362cbf", "score": "0.54743826", "text": "public function hasBeginTime()\n {\n return $this->get(self::BEGINTIME) !== null;\n }", "title": "" }, { "docid": "9f4ab3242f694535765943fcb5206faf", "score": "0.5455592", "text": "public function hasLastModificationTimestampTicks()\n {\n return $this->LastModificationTimestampTicks !== null;\n }", "title": "" }, { "docid": "4404ae06c605341577bd48f08cc76542", "score": "0.54482245", "text": "public function hasLastUseTime(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "4a11d73de54b821a6d6d6772a1ed8f0d", "score": "0.5433724", "text": "private function getTimestamps($model)\n {\n /* if(is_a($model, 'App\\BounceMessage')); */\n if($model->usesTimestamps()) return [\n 'created_at',\n 'updated_at'\n ];\n return [];\n }", "title": "" }, { "docid": "51de86f31f1337f2261c37520f83fae2", "score": "0.54290146", "text": "public function set_timestamps(){\n if($this->date_added==\"\"){\n $this->date_added = date(\"F j, Y, g:i a\"); \n }\n $this->date_updated = date(\"F j, Y, g:i a\");\n if(property_exists($this, \"publish_json\")===true){\n if($this->publish_json!=\"\"){\n \t $this->publish_date = date(\"F j, Y, g:i a\");\n }\n }\n }", "title": "" }, { "docid": "e9fcce40648cd9aed64a6dedb4c6c6d3", "score": "0.53876907", "text": "public function wasPublishedRecently()\n {\n return $this->created_at->gt(Carbon::now()->subMinute());\n }", "title": "" }, { "docid": "f405275f96c38916fc9ef20e640118c5", "score": "0.53874844", "text": "public function hasDateStart() {\r\n\t\treturn $this->get('date_start') !== '0';\r\n\t}", "title": "" }, { "docid": "0ae903b64b451c39fe8081058da39e25", "score": "0.5384741", "text": "protected function regenerateTimestampOnSave(): bool\n {\n return true;\n }", "title": "" }, { "docid": "ceb0bc5427cd152465aec6e4155aa059", "score": "0.5371631", "text": "public function hasTableMeta()\n {\n return isset($this->table_meta);\n }", "title": "" }, { "docid": "ceb0bc5427cd152465aec6e4155aa059", "score": "0.5371631", "text": "public function hasTableMeta()\n {\n return isset($this->table_meta);\n }", "title": "" }, { "docid": "9a97c462af31161b4f6a124cadaedf05", "score": "0.534935", "text": "public function isMutable()\n {\n return $this instanceof DateTime;\n }", "title": "" }, { "docid": "e25eabb83e9349cfedc9e42b50f12267", "score": "0.53428483", "text": "public function hasPublishedSeconds(){\n return $this->_has(20);\n }", "title": "" }, { "docid": "bad18ff1b464979c61fb5b18d82525f9", "score": "0.52762514", "text": "public function hasExpired()\n {\n $column = $this->getExpiredAtColumn();\n\n if (is_object($this->{$column})) {\n return ($this->{$column} < Carbon::now());\n }\n return false;\n }", "title": "" }, { "docid": "8ca9a1caf75511b52ef951427ed17928", "score": "0.5269878", "text": "protected function isTime()\n {\n $interval = $this->time ? ($this->time * 60 * 60) : 43200;\n\n if( (time() - $last_update) > $interval)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "21a1febaaf335d04860092d8220f7b9f", "score": "0.5258343", "text": "public function hasVat()\n {\n return $this->Vat !== null;\n }", "title": "" }, { "docid": "21a1febaaf335d04860092d8220f7b9f", "score": "0.5258343", "text": "public function hasVat()\n {\n return $this->Vat !== null;\n }", "title": "" }, { "docid": "878eb0ffab4157ae2ac6cf4d4bdd12c2", "score": "0.5255623", "text": "public function hasStartTime($value = null)\n {\n return (bool)$this->startTime;\n }", "title": "" }, { "docid": "aa37db7655c78f0d4a164fc1cfcdd6f0", "score": "0.5252935", "text": "public function getCanUpdateAttribute()\n {\n return $this->start_date > now();\n }", "title": "" }, { "docid": "84191e2be1dc793bfe8bedc643c01253", "score": "0.52519524", "text": "public function hasAddtime(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "0c788076272048af7798d617188577dc", "score": "0.5244269", "text": "function isTimestamp($timestamp)\n\t{\n\t\t$check = ( is_int($timestamp) || is_float($timestamp) ) ? $timestamp : (string) (int) $timestamp;\n\n\t\treturn ( $check === $timestamp ) && ( (int) $timestamp <= PHP_INT_MAX ) && ( (int) $timestamp >= ~PHP_INT_MAX );\n\t}", "title": "" }, { "docid": "643ed11234e4250147963c6e8f6cead4", "score": "0.52409637", "text": "public function hasOtpTimedrift()\n {\n return $this->otp_timedrift !== null;\n }", "title": "" }, { "docid": "e932d54390409c73d34cd14519ff0015", "score": "0.52367383", "text": "public function timestampMode()\n {\n return (string)$this->config()['MIGRATIONS_TIMESTAMP'];\n }", "title": "" }, { "docid": "b126f144dd07ca27cd5cea0827bcda24", "score": "0.52364224", "text": "public function has_meta()\n\t{\n\t\treturn (sizeof($this->_meta) > 0);\n\t}", "title": "" }, { "docid": "dbc131eb1cc415818617a400316dae7c", "score": "0.5233615", "text": "public function hasOriginalDocumentDateAndNumber()\n {\n return $this->OriginalDocumentDateAndNumber !== null;\n }", "title": "" }, { "docid": "d560d160d3aba590150ebaa3d14bf6f3", "score": "0.5232954", "text": "public function hasMeta()\n {\n return $this->meta !== null;\n }", "title": "" }, { "docid": "bbd9bda951fec7b790b3105302c94f6e", "score": "0.52329177", "text": "function getTimestamp() {\n return $this->timestamp;\n }", "title": "" }, { "docid": "be1e6a5d26b14f79b936f4a14158aec5", "score": "0.52310246", "text": "public function hasExpiretime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "4fef63803d89220ab2a195bdaf831585", "score": "0.52021766", "text": "public function isStartOfTime(): bool\n {\n return $this->startOfTime ?? false;\n }", "title": "" }, { "docid": "2e4d17946664f52763138f48d004a778", "score": "0.51956105", "text": "public function setTimestamp($time){\n\t\tif(is_numeric($time)){\n\t\t\t$this->_timestamp = $time;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ee4947eea269da89a4b097713e6b1fa7", "score": "0.5185643", "text": "public function isPresent(): bool\n {\n return $this->appear_at <= DateTimeHelper::nowSql();\n }", "title": "" }, { "docid": "c605edd4152d6ec7c5e8d858e704954a", "score": "0.5181929", "text": "public function hasEndtime(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "2c034c8e30abe2a13df641ca85e92523", "score": "0.51757324", "text": "public function getTimeStamping()\n {\n return $this->time_stamping;\n }", "title": "" }, { "docid": "c51ab80355085212a3a090be1e45897b", "score": "0.51567644", "text": "public function details(): bool {\n\t\t\t// Clear Errors\n\t\t\t$this->clearError();\n\n\t\t\t// Load Services\n\t\t\t$database = new \\Database\\Service();\n\n\t\t\t// Initialize Query\n\t\t\t$get_object_query = \"\n\t\t\t\tSELECT\t*,unix_timestamp(date_event) timestamp_event\n\t\t\t\tFROM\t`\".$this->_tableName.\"`\n\t\t\t\tWHERE\t`\".$this->_tableIDColumn.\"` = ?\";\n\n\t\t\t// Bind Params\n\t\t\t$database->AddParam($this->id);\n\n\t\t\t// Execute Query\n\t\t\t$rs = $database->Execute($get_object_query);\n\t\t\tif (! $rs) {\n\t\t\t\t$this->SQLError($database->ErrorMsg());\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Fetch Results From Database\n\t\t\t$object = $rs->FetchNextObject();\n\t\t\tif ($object->id) {\n\t\t\t\t$this->id = $object->id;\n\t\t\t\t$this->date_event = $object->date_event;\n\t\t\t\t$this->timestamp_event = $object->timestamp_event;\n\t\t\t\t$this->type = $object->type;\n\t\t\t\t$this->version_id = $object->version_id;\n\t\t\t\t$this->user_id = $object->user_id;\n\n\t\t\t\t$this->exists(true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Null out any values\n\t\t\t\t$this->id = null;\n\t\t\t\t$this->type = null;\n\n\t\t\t\t$this->exists(false);\n\t\t\t}\n\n\t\t\t// Return True as long as No Errors - Not Found is NOT an error\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "bc516e9953ea126ff0ca781ffd16f4d7", "score": "0.51566327", "text": "public function hasAttrs(){\n return $this->_has(14);\n }", "title": "" }, { "docid": "f329aed2009db91b3624a375ef0838af", "score": "0.5152285", "text": "public function Timestamp(): Schema{\n\n\n self::$attrib['field_type'] = \" TIMESTAMP ,\";\n return $this;\n }", "title": "" }, { "docid": "8d969ec7d586b93452905d5904409722", "score": "0.5151783", "text": "public function hasMetadata();", "title": "" }, { "docid": "247e8850ec2d3bda82b7a1adef97a532", "score": "0.5144276", "text": "protected function beforeSave() {\n if (parent::beforeSave()) {\n if ($this->isNewRecord) {\n if (property_exists(get_called_class(), 'created_date')) {\n $this->created_date = date('Y-m-d h:i:s', time());\n }\n }\n if (property_exists(get_called_class(), 'updated_date')) {\n $this->updated_date = date('Y-m-d h:i:s', time());\n }\n }\n return true;\n }", "title": "" }, { "docid": "76b5798b3573ffd6fd896968e582bdd0", "score": "0.5139148", "text": "public function hasEndtime(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "6990f673fd2e59fbc46bf04cf85571d1", "score": "0.5135779", "text": "public function hasDocumentDate()\n {\n return $this->DocumentDate !== null;\n }", "title": "" }, { "docid": "f9bf02dc35fc054d65d64546fa38230a", "score": "0.51295817", "text": "public function hasRuntimeMeasurement() {\n return FALSE;\n }", "title": "" } ]
ce34c899a51616b35edcad27778fa144
Thrown in there's a logic error during serialization
[ { "docid": "831490b82bf3efa7dc0a6b70307900b0", "score": "0.0", "text": "protected function assertionFailed(string $message): void\n {\n throw new LogicException($message.\\sprintf(' at \"%s\"', $this->getPath()));\n }", "title": "" } ]
[ { "docid": "ec81b58a7559428b1419adae940245c5", "score": "0.71228707", "text": "public function testUnserialise_exception()\n\t{\n\t\t$this->_instance->unserialize('s:7:\"default\";');\n\t}", "title": "" }, { "docid": "ec3b4f01f6e6cc6412fd3717ffbd9374", "score": "0.7071743", "text": "public function testUnserializationThrowsAnError() {\n $serialized = serialize(Multi::getInstance('1'));\n $this->setExpectedException(\"PHPUnit_Framework_Error_Warning\");\n unserialize($serialized);\n }", "title": "" }, { "docid": "cb69acab4cf41b22818f23cf3ea514e3", "score": "0.65227646", "text": "private function errorCheck()\n\t{\n\t\tif ( 0 < $errorCode = json_last_error() ) {\n\t\t\tthrow new Exception(\n\t\t\t\tsprintf('Error Loading Json %s.', $this->getErrorMessage($errorCode))\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "dfcdb0545ef75c4b030f18ef15f39e7d", "score": "0.6234699", "text": "public function testCreateParserForRequestInvalidSerialization()\n {\n $this->setExpectedException('\\Exception');\n\n $this->newInstance()->createParserFor('invalid serialization');\n }", "title": "" }, { "docid": "9c18825fe605b368ba001b23604a627a", "score": "0.61358225", "text": "protected function checkJsonErrors()\n {\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new \\Exception(json_last_error_msg());\n }\n }", "title": "" }, { "docid": "c66ffac8fb72bafe53ccd329568fb14d", "score": "0.60808754", "text": "public function __wakeup()\n {\n throw new \\BadMethodCallException('Cannot unserialize ' . __CLASS__);\n }", "title": "" }, { "docid": "a344af2f040bd8de9e705c000b3dc001", "score": "0.6027903", "text": "public static function ThrowStateInvalidException() {\n throw new StateInvalidException(\"Unserialization failed as class was not found or not compatible\");\n }", "title": "" }, { "docid": "b8cb6aaa473c9e632a3bab486f8babb7", "score": "0.6008372", "text": "public function testUnserializeWhenProperyNotFoundAndHasNoParent()\n {\n $obj = new class {\n };\n\n $data = [\n 'string' => '_doesnt_matter_'\n ];\n\n $this->expectException(AutoUnserializeException::class);\n AutoUnserializeHelper::unserialize($obj, $data);\n }", "title": "" }, { "docid": "5382e45b8f99e346850d07b54c16ddf4", "score": "0.597292", "text": "private static function throwJsonException()\n {\n // Check if the decoding was successful\n switch ( json_last_error() )\n {\n case JSON_ERROR_DEPTH:\n $msg = 'The maximum stack depth has been exceeded';\n break;\n\n case JSON_ERROR_STATE_MISMATCH:\n $msg = 'Invalid or malformed JSON';\n break;\n\n case JSON_ERROR_CTRL_CHAR:\n $msg = 'Control character error, possibly incorrectly encoded';\n break;\n\n case JSON_ERROR_SYNTAX:\n $msg = 'Syntax error';\n break;\n\n case JSON_ERROR_UTF8:\n $msg = 'Malformed UTF-8 characters, possibly incorrectly'\n .' encoded';\n break;\n\n default:\n $msg = 'An unknown error ocurred';\n break;\n }\n\n throw new ParserException(\n 'Could not process JSON: ' . $msg, ParserException::BAD_REQUEST\n );\n }", "title": "" }, { "docid": "633b052988853ecb85e788ff715c1135", "score": "0.5962771", "text": "public function testUnserializeWhenNonObjectProvided()\n {\n $this->expectException(AutoUnserializeException::class);\n\n /** @var object $obj */\n $obj = '_non_object_';\n\n AutoUnserializeHelper::unserialize($obj, ['_something_']);\n }", "title": "" }, { "docid": "bfb8624320d2c47b6edbd7f5a36f3fb9", "score": "0.5933821", "text": "public function unserialize_handler($errno,$errstr){\n // don't do anything\n}", "title": "" }, { "docid": "33f3c55ee8cd0547cdb83bfef2dc688e", "score": "0.5822303", "text": "public function testUnserializeWhenProperyNotFoundAndHasParent()\n {\n $obj = new class extends EntityBase {\n public static function create(array $data) : Serializable\n {\n $obj = new self();\n return AutoUnserializeHelper::unserialize($obj, $data);\n }\n public function serialize() : array\n {\n return AutoSerializeHelper::serialize($this);\n }\n };\n\n $data = [\n 'string' => '_doesnt_matter_'\n ];\n\n $this->expectException(AutoUnserializeException::class);\n AutoUnserializeHelper::unserialize($obj, $data);\n }", "title": "" }, { "docid": "0b5b484363c7ab22e0cf2f786deeee92", "score": "0.5786543", "text": "public function testInvalidJsonConvert()\n {\n $data = '\"in_office\": true}';\n $output = new \\FurryBear\\Output\\Strategy\\JsonToArray();\n \n try {\n $output->convert($data);\n } catch (\\FurryBear\\Common\\Exception\\InvalidJsonException $e) {\n $this->setExpectedException('\\\\FurryBear\\\\Common\\\\Exception\\\\InvalidJsonException', 'Invalid json');\n throw new \\FurryBear\\Common\\Exception\\InvalidJsonException('Invalid json');\n }\n }", "title": "" }, { "docid": "ded323d99f8c46fd8d797d6efeae5a60", "score": "0.5753883", "text": "protected function checkDecodeError(): void\n {\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new BadRequestHttpException('Received invalid json payload from webhook');\n }\n }", "title": "" }, { "docid": "1f7dd61987bd0f6459829f29aea5325c", "score": "0.57116634", "text": "static function unprocessable_entity()\n {\n header($_SERVER['SERVER_PROTOCOL'] . ' 422 Unprocessable Entity',\n true,\n 422);\n exit();\n }", "title": "" }, { "docid": "e4860709fde028b5d14c8894efbea4a4", "score": "0.57010365", "text": "public function testHydrateWithInvalidValue()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->strategy->hydrate('FOOBAR');\n }", "title": "" }, { "docid": "c46da3d95c53e9f421c507b7305584b6", "score": "0.5698756", "text": "protected function _throwException()\n {\n throw new Bear_Xml_Sax_Exception($this->_parser);\n }", "title": "" }, { "docid": "cd6efe973f1def01b2d3c25c8546c848", "score": "0.5677831", "text": "public function testNoErrorJSON() {\n $vld = new TestValidation();\n $json = $vld->jsonSerialize();\n $this->assertSame(['message' => '!Validation succeeded.', 'code' => 200, 'errors' => []], $json);\n }", "title": "" }, { "docid": "1e4a8b2efcf5b6727788cafe963a62d1", "score": "0.56770635", "text": "public final function __wakeup ()\n {\n throw new \\ Exception ('Cannot unserialize the class \"' . get_called_class () . '\".');\n }", "title": "" }, { "docid": "9e4d1038959054f10012fe61c0f58b26", "score": "0.56676507", "text": "public function check_data()\n {\n parent::check_data();\n\n if(!array_key_exists('BatchID', $this->data_array))\n {\n throw new exception('<strong>Data missing: BatchID</strong>');\n }\n\n if(!array_key_exists('Reference', $this->data_array))\n {\n throw new exception('<strong>Data missing: Reference</strong>');\n }\n }", "title": "" }, { "docid": "e19dd5d18f7b856b020d8a28f90c1131", "score": "0.5601101", "text": "public function __wakeup() {\n trigger_error('Deserializing não é permitido.', E_USER_ERROR);\n }", "title": "" }, { "docid": "99e4ece3b0eca81664bf4bc1bd7dd361", "score": "0.5576042", "text": "public function testNotMarshallsDueToInvalidItemType()\n {\n $this->marshaller->marshall(array());\n }", "title": "" }, { "docid": "f27752ecb664e621cbd401738b3ddf2e", "score": "0.5572462", "text": "public function testNotMarshallsDueToInvalidItemType()\n {\n $this->marshaller->marshall(array(\n ));\n }", "title": "" }, { "docid": "a96785847d03e82c069c58c5f0278788", "score": "0.5553027", "text": "public function test___construct_failure()\n {\n $this->engine_struct_param->type = \"fooo\";\n $this->setExpectedException(\"Exception\");\n new Engines_MyMemory($this->engine_struct_param);\n }", "title": "" }, { "docid": "d727d71ef69bc02efdd40c9009c6ecb7", "score": "0.55378044", "text": "protected function initSerializer()\n {\n if (is_string($this->serializer)) {\n $this->serializer = Yii::createObject([\n 'class' => $this->serializer,\n 'exporter' => $this\n ]);\n } elseif (is_array($this->serializer)) {\n $this->serializer['exporter'] = $this;\n $this->serializer = Yii::createObject($this->serializer);\n }\n\n if (!$this->serializer instanceof Serializer) {\n throw new InvalidConfigException('The \"serializer\" property must be either a Serializer object.');\n }\n }", "title": "" }, { "docid": "6359ed234bde3ecf5820a87ec1a6d18b", "score": "0.5530507", "text": "public function testUnserializeNoUnserializableObeject()\n {\n $this->expectException(AutoUnserializeException::class);\n\n $obj = new class {\n public $obj;\n public function __construct()\n {\n $this->obj = new \\stdClass();\n }\n };\n\n $data = [\n 'obj' => null\n ];\n\n AutoUnserializeHelper::unserialize($obj, $data);\n }", "title": "" }, { "docid": "ad5239e6a09081a0605011646d5bc51b", "score": "0.5513385", "text": "final public function __wakeUp() {\n throw new IllegalStateException('You cannot deserialize me: '.get_class($this));\n }", "title": "" }, { "docid": "b899f428f61033fdd4d52043b33a7002", "score": "0.5505256", "text": "public function test_shouldThrowException_IfSaleDataIsBad() {\n $this->tempQuotationJSON['total'] = 5000;\n $response = $this->newSaleQuotation();\n $this->assertError($response);\n }", "title": "" }, { "docid": "6ec1b92db50d2d6637266635a87c0f45", "score": "0.54866225", "text": "public function testExecuteUnserializableMessage()\n {\n $message = $this->createMessage(DebugTransport::class, [], 'unserializable');\n $actual = $this->job->execute($message);\n $this->assertSame(Processor::REJECT, $actual);\n }", "title": "" }, { "docid": "c1e68733eb7c5edcacf1d27c4447160d", "score": "0.5473751", "text": "function im_not_error_object() {\n }", "title": "" }, { "docid": "3c744a3bfc82c37886d0f944073771db", "score": "0.54530007", "text": "public function testSaveNegotiatedQuoteDataException()\n {\n $this->connection->expects($this->any())\n ->method('insertOnDuplicate')\n ->with(null, ['bad array'], [0])\n ->willThrowException(new \\Exception(''));\n $quote = $this->createMock(\\Magento\\NegotiableQuote\\Model\\NegotiableQuote::class);\n $quote->expects($this->any())->method('getData')->willReturn(['bad array']);\n\n $this->expectException(\\Magento\\Framework\\Exception\\CouldNotSaveException::class);\n $this->negotiableQuoteMock->saveNegotiatedQuoteData($quote);\n }", "title": "" }, { "docid": "838b0901a1a34968ef92b75d50f29795", "score": "0.5445435", "text": "public function validationException()\n {\n $this->xorValidator->validate('foo');\n }", "title": "" }, { "docid": "523cc0e6bd0a0fa636d7b66c2968404d", "score": "0.5441315", "text": "public function whenInvalid()\n {\n }", "title": "" }, { "docid": "e4e07be09e8d3b13c4cad4a008be723a", "score": "0.5437385", "text": "public function lastError()\n {\n throw new Exception('Not Implemented');\n }", "title": "" }, { "docid": "ea2feb880fe13e66bacf38142f259430", "score": "0.54311204", "text": "abstract public function serialize();", "title": "" }, { "docid": "4debba4fc2738e78215fcbdb9bad2c02", "score": "0.5427842", "text": "public static function raiseJsonExceptionError() {\n\n if ( function_exists( \"json_last_error\" ) ) {\n switch ( json_last_error() ) {\n case JSON_ERROR_NONE:\n// \t Log::doLog(' - No errors');\n break;\n case JSON_ERROR_DEPTH:\n $msg = ' - Maximum stack depth exceeded';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_DEPTH);\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $msg = ' - Underflow or the modes mismatch';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_STATE_MISMATCH);\n break;\n case JSON_ERROR_CTRL_CHAR:\n $msg = ' - Unexpected control character found' ;\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_CTRL_CHAR);\n break;\n case JSON_ERROR_SYNTAX:\n $msg = ' - Syntax error, malformed JSON' ;\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_SYNTAX);\n break;\n case JSON_ERROR_UTF8:\n $msg = ' - Malformed UTF-8 characters, possibly incorrectly encoded';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_UTF8);\n break;\n default:\n $msg = ' - Unknown error';\n Log::doLog( $msg );\n throw new Exception( $msg, 6);\n break;\n }\n }\n\n }", "title": "" }, { "docid": "4debba4fc2738e78215fcbdb9bad2c02", "score": "0.5427842", "text": "public static function raiseJsonExceptionError() {\n\n if ( function_exists( \"json_last_error\" ) ) {\n switch ( json_last_error() ) {\n case JSON_ERROR_NONE:\n// \t Log::doLog(' - No errors');\n break;\n case JSON_ERROR_DEPTH:\n $msg = ' - Maximum stack depth exceeded';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_DEPTH);\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $msg = ' - Underflow or the modes mismatch';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_STATE_MISMATCH);\n break;\n case JSON_ERROR_CTRL_CHAR:\n $msg = ' - Unexpected control character found' ;\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_CTRL_CHAR);\n break;\n case JSON_ERROR_SYNTAX:\n $msg = ' - Syntax error, malformed JSON' ;\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_SYNTAX);\n break;\n case JSON_ERROR_UTF8:\n $msg = ' - Malformed UTF-8 characters, possibly incorrectly encoded';\n Log::doLog( $msg );\n throw new Exception( $msg, JSON_ERROR_UTF8);\n break;\n default:\n $msg = ' - Unknown error';\n Log::doLog( $msg );\n throw new Exception( $msg, 6);\n break;\n }\n }\n\n }", "title": "" }, { "docid": "7691a32add1d03986c6655511817b587", "score": "0.54247713", "text": "private function dataValidation() {\n if (!$this->subject) {\n throw new \\Exception(\"Cannot send message without a subject\");\n }\n if (!$this->from) {\n throw new \\Exception(\"Cannot send message without a sender address\");\n }\n if (!$this->to) {\n throw new \\Exception(\"Cannot send message without TO email\");\n }\n if (!$this->body) {\n throw new \\Exception(\"Cannot send message without body\");\n }\n if ($this->attach != NULL AND ! file_exists($this->attach)) {\n throw new \\Exception(\"Attached file is not found\");\n }\n }", "title": "" }, { "docid": "bae4637fa2904fe1c8015019d5f26e43", "score": "0.5412452", "text": "public function isErrorByParsing();", "title": "" }, { "docid": "6e873f1a4db597198989708a9c663c7c", "score": "0.5405584", "text": "public function testSerializeToXDDLNoTagNameException()\n {\n $this->column->serializeToXDDL();\n }", "title": "" }, { "docid": "28c949b2bb8c7f3db84952619d09e719", "score": "0.5399377", "text": "function test_serializeWithInfiniteRecursion()\n\t{\n\n\t \t$table = new Piwik_DataTable;\n\t \t$table->addRow(array(Piwik_DataTable_Row::COLUMNS => array( 'visits'=>245,'visitors'=>245),\n\t \t\t\t\t\t\tPiwik_DataTable_Row::DATATABLE_ASSOCIATED => $table,));\n\n\n \ttry {\n \t\t$table->getSerialized();\n \t$this->fail(\"Exception not raised.\");\n \t}\n \tcatch (Exception $expected) {\n return;\n }\n\t}", "title": "" }, { "docid": "71c87f81acbe398bd66fd1649b39a20d", "score": "0.5393695", "text": "public function forceError()\n {\n throw new Exception('Not Implemented');\n }", "title": "" }, { "docid": "e45c34f37a4987f53329c8593e8a4325", "score": "0.5383436", "text": "public function testSodiumErrorExceptionBadConfigFile(): void\n {\n $json = $this->tdir . '/badjson.json';\n $this->expectException(\\ErrorException::class);\n $simpleCache = new \\AWonderPHP\\SimpleCacheRedis\\SimpleCacheRedisSodium($this->redis, $json);\n }", "title": "" }, { "docid": "dfb722d2886809945ecfdb72d0ac818e", "score": "0.5380503", "text": "public static function checkLastError()\n {\n $error = json_last_error();\n\n if ($error === \\JSON_ERROR_NONE) {\n return;\n }\n\n throw new \\Exception(\"JSON Error: \" . json_last_error_msg(), $error);\n }", "title": "" }, { "docid": "1b2cdf94f819a2600213643b4e1f2e61", "score": "0.5370922", "text": "public function test_parse_response_error() {\n\n\t\t$this->markTestIncomplete( 'Under construction…' );\n\t}", "title": "" }, { "docid": "97e74e9ed63db751497f042a4d67d32d", "score": "0.53645235", "text": "private function verifySerializer()\n\t{\n\t\tswitch(nZEDb_CACHE_SERIALIZER) {\n\t\t\tcase self::SERIALIZER_IGBINARY:\n\t\t\t\tif (extension_loaded('igbinary')) {\n\t\t\t\t\t$this->IgBinarySupport = true;\n\t\t\t\t\tif ($this->isRedis === true) {\n\t\t\t\t\t\treturn \\Redis::SERIALIZER_IGBINARY;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (\\Memcached::HAVE_IGBINARY > 0) {\n\t\t\t\t\t\t\treturn \\Memcached::SERIALIZER_IGBINARY;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new CacheException('Error: You have not compiled Memcached with igbinary support!');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new CacheException('Error: The igbinary extension is not loaded!');\n\t\t\t\t}\n\t\t\tcase self::SERIALIZER_NONE:\n\t\t\t\tif ($this->isRedis === true) {\n\t\t\t\t\treturn \\Redis::SERIALIZER_NONE;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new CacheException('Error: Disabled serialization is not available on Memcached!');\n\t\t\t\t}\n\t\t\tcase self::SERIALIZER_PHP:\n\t\t\tdefault:\n\t\t\t\tif ($this->isRedis === true) {\n\t\t\t\t\treturn \\Redis::SERIALIZER_PHP;\n\t\t\t\t} else {\n\t\t\t\t\treturn \\Memcached::SERIALIZER_PHP;\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0445fe511d17728a7d36c0b61126327d", "score": "0.5361754", "text": "abstract protected function modelNotSetError();", "title": "" }, { "docid": "c51f367ebdb80b57064aedfac428930f", "score": "0.5339077", "text": "public function testInflateDataThrowsErrorWhenGivenObjectIsNotTableFormat() {\n $this->markTestIncomplete();\n }", "title": "" }, { "docid": "1f5117652cff634de43aff75eac8c3d9", "score": "0.5338933", "text": "public function testToXmlSubException()\n {\n $object = $this->getMock('Varien_Object', array('__toXml'));\n $object->expects($this->once())\n ->method('__toXml')\n ->will($this->throwException(new BadMethodCallException('some exception')));\n $result = $object->toXml();\n }", "title": "" }, { "docid": "82504fa7c3af3e8759d6fd6d0f5a6ba2", "score": "0.53240836", "text": "function exception_noParameter(){\n\t\t//meta infomation\n\t\t$meta = metaInformation();\n\n\t\t//error message\n\t\t$error = array(\n\t\t\t'message' => 'Error. user data or content data is NULL'\n\t\t);\n\n\t\t//to json\n\t\t$result = array(\n\t\t\t'meta'=>$meta,\n\t\t\t'error'=>$error\n\t\t);\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "2b1946e9d2c4bdc4066f7fbec97da49a", "score": "0.5292478", "text": "public function testHydrateWithInvalidInteger()\n {\n $this->expectException(InvalidArgumentException::class);\n\n $this->strategy->hydrate(-1);\n }", "title": "" }, { "docid": "89dea6e90ea0a231de25f8a3d8f9f62f", "score": "0.52839905", "text": "public function testSavingInvalidObject()\n {\n $mocks = $this->provideMocks();\n $mocks['objectClass'] = Fixtures\\Orc::class;\n $repository = $this->provideRepository($mocks);\n\n $repository->save($this->provideHobbit(['name' => 'Frodo']));\n }", "title": "" }, { "docid": "c796a4a45657fce159e6e0ce161d5434", "score": "0.5272721", "text": "abstract protected function _prepareError($data);", "title": "" }, { "docid": "4183a19c5bb4af973f16d8816ed952a0", "score": "0.5257438", "text": "public function isSerialized($str){\n if($str === 0){\n return false;\n }else{\n set_error_handler(array('App_Model','unserialize_handler'));\n $return=($str == serialize(false)||@unserialize($str) !== false);\n restore_error_handler();\n return $return;\n }\n}", "title": "" }, { "docid": "8f7c10dbd59737aff46d46e0572ddb2c", "score": "0.524408", "text": "public function testHydrateWithBadObject()\n {\n $object = new \\stdClass();\n\n $result = $this->hydrator->hydrate(array(), $object);\n\n $this->assertEquals($object, $result);\n }", "title": "" }, { "docid": "7ef03091ebb6e330107a7dcf361e5130", "score": "0.52425206", "text": "public function it_json_invalid_fail()\n {\n $this->expectException(\\InvalidArgumentException::class);\n $json = \"{'id': 1, 'active': 'TESTE'}\";\n $entity = new EntityToClass();\n $entity->make($json);\n }", "title": "" }, { "docid": "109772baf0d50704f72b1674f9d155d9", "score": "0.52415574", "text": "public function testFailingValidationThrowsAnException()\n {\n $schema = (object) [\n 'type' => 'object',\n 'properties' => (object) [\n 'test' => (object) [\n 'description' => 'A test value.',\n 'type' => 'integer'\n ]\n ]\n ];\n\n $this->expectException(ValidationException::class);\n\n $this->json->validate($schema, (object) ['test' => '123']);\n }", "title": "" }, { "docid": "785f803eff00cf9fa3ab014074b7728a", "score": "0.523536", "text": "public function testSupportsNormalizationInvalidObject(): void\n {\n $this->assertFalse($this->normalizer->supportsNormalization(null));\n }", "title": "" }, { "docid": "1978e2c3bad5a4a15608832b15dd8576", "score": "0.52312773", "text": "abstract public function dataParameterInvalid();", "title": "" }, { "docid": "fce2d2c3db9195166c8fbc81d5bd1f08", "score": "0.52283466", "text": "public function testConstructJSONDecodeError()\n {\n // Prepare testing Exception to return\n $oJSONException = new Exception('JSON Test Exception');\n\n // Create a mocked version of the Services_AMEE_Profile class, with\n // the _hasJSONDecode() method mocked\n $aMockMethods = array(\n '_hasJSONDecode'\n );\n $oMockProfile = $this->getMock(\n 'Services_AMEE_Profile',\n $aMockMethods,\n array(),\n '',\n false\n );\n\n // Set the expectation on the mocked object that the _hasJSONDecode()\n // method will be called exactly once and set the Exception that\n // will be thrown by the method call.\n $oMockProfile->expects($this->once())\n ->method('_hasJSONDecode')\n ->will($this->throwException($oJSONException));\n\n // Call the __construct() method\n try {\n $oMockProfile->__construct('1234567890AB');\n } catch (Exception $oException) {\n // Test the Exception was correctly bubbled up\n $this->assertSame($oException, $oJSONException);\n return;\n }\n\n // If we get here, the test has failed\n $this->fail('Test failed because expected Exception was not thrown');\n }", "title": "" }, { "docid": "8047cc03864773d3fd92a8d58fd241e1", "score": "0.5224948", "text": "function _mbank_save_error() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "84c96bb8122cb8edde3a9b28e4df2b24", "score": "0.5224784", "text": "protected function catchConcreteResponseError()\n {\n $complete = explode(':', $this->getResponse());\n \n if (isset($complete[0]) && $complete[0] === 'COMPLETE') {\n $this->key = (int) $complete[1];\n } else {\n $this->validateXml();\n $this->catchRuntimeErrors();\n $this->catchValidationErrors();\n }\n }", "title": "" }, { "docid": "de53fb6ffc1a0ac26fa0c994326af3cd", "score": "0.52242935", "text": "public function testMagicGetError() {\n $this->_instance->getTest();\n }", "title": "" }, { "docid": "77bb1d890fc3f210ddf6f2c21a548850", "score": "0.52206796", "text": "public function testValidateThrowDataMissingException()\n {\n try {\n $this->job->validate();\n } catch (\\Exception $e) {\n $this->assertEquals($e->getMessage(), JobException::MSG_JOB_DATA_MISSING);\n }\n }", "title": "" }, { "docid": "b04d7ce68458d929bb80e005ade79c5d", "score": "0.52170813", "text": "public function testExceptionIsRaisedForInvalidDSN()\n {\n new \\SameAsLite\\Store('foo:baa', self::STORE_NAME);\n }", "title": "" }, { "docid": "1edbcc10e6497fceb81f31f924117650", "score": "0.5210975", "text": "public function testTypeHandlingWithInvalidType() {\n $data_with_invalid_type = [\n '_links' => [\n 'type' => [\n 'href' => Url::fromUri('base:rest/type/entity_test/entity_test_invalid', ['absolute' => TRUE])->toString(),\n ],\n ],\n ];\n\n $this->expectException(UnexpectedValueException::class);\n $this->serializer->denormalize($data_with_invalid_type, $this->entityClass, $this->format);\n }", "title": "" }, { "docid": "077403c0213f31ef2fdf5dcc4829e617", "score": "0.5208406", "text": "public function testMakeMethodAllowsPassingOnlySerializer()\n {\n $this->serializer->shouldReceive('format')->andReturn($error = ['foo' => 1]);\n\n $result = $this->factory->make($this->serializer);\n\n $this->assertEquals($error, $result);\n }", "title": "" }, { "docid": "0242464eea239c5bcac073ec6790f2ca", "score": "0.5205655", "text": "public function __wakeup()\n {\n trigger_error('Something went bananas while un-serializing this instance');\n }", "title": "" }, { "docid": "30ee81ca2c67af1e1e494389df45d607", "score": "0.5205507", "text": "public function forceError() {}", "title": "" }, { "docid": "30ee81ca2c67af1e1e494389df45d607", "score": "0.5205507", "text": "public function forceError() {}", "title": "" }, { "docid": "2c14e99d24546583c5502325117ce897", "score": "0.51988065", "text": "public function prevError()\n {\n throw new Exception('Not Implemented');\n }", "title": "" }, { "docid": "f606b39d3232382f25f9fcbe21d0e257", "score": "0.51967895", "text": "public function test_shouldThrowException_IfProductIsNotSalable() {\n $this->tempQuotationJSON['sale_detail'][0]['product_id'] = 3;\n $response = $this->newSaleQuotation();\n $this->assertError($response);\n }", "title": "" }, { "docid": "622909b69534ef59be71fd6899e2d79f", "score": "0.51933146", "text": "public function testWrite_throwsInvalidArgumentException_ifFormatIsNotValid()\n\t{\n\t\t$this->setExpectedException('InvalidArgumentException');\n\t\t\n\t\t$writer = new Writer();\n\t\t$writer->write(new Element\\Group(), 'foo');\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "782579927c85b2d6426306128cb0defa", "score": "0.5193204", "text": "public function testToStringThrowsException() {\n\n\t\t$value = new ObjectValue(new stdClass(), $this->valueContext, $this->config);\n\t\t$value->toString();\n\t}", "title": "" }, { "docid": "3bc821f93d0e47994dd5217d13967b24", "score": "0.5188256", "text": "public function testOneFieldlessErrorJSON() {\n $vld = $this->createErrors('', 1);\n $json = $vld->jsonSerialize();\n $this->assertEquals(['message' => '!Validation failed.', 'code' => 400, 'errors' => [\n '' => [['error' => 'error 1', 'message' => '!error 1']]\n ]], $json);\n }", "title": "" }, { "docid": "abf8f55b0088fd28659a97ad3d99daf9", "score": "0.51784503", "text": "public function __wakeup()\n {\n throw new Exception(\"Cannot unserialize a singleton.\");\n }", "title": "" }, { "docid": "e18cc0ff364686cbaf242533c541cbf4", "score": "0.51700646", "text": "public function __wakeup()\n {\n throw new \\Exception(\"Cannot unserialize a singleton.\");\n }", "title": "" }, { "docid": "f5ad38914c87c04955dcc1ac2bcac881", "score": "0.5169169", "text": "private static function jsonError()\n {\n $encoder = Encoder::instance();\n\n return $encoder->encodeErrors(self::$errorsCollection);\n }", "title": "" }, { "docid": "5a983347a5562a272558b2161c0b9919", "score": "0.5168738", "text": "public function testSuccessfulValidationDoesNotThrowAnException()\n {\n $schema = (object) [\n 'type' => 'object',\n 'properties' => (object) [\n 'test' => (object) [\n 'description' => 'A test value.',\n 'type' => 'integer'\n ]\n ]\n ];\n\n $this->json->validate($schema, (object) ['test' => 123]);\n\n self::assertTrue(true);\n }", "title": "" }, { "docid": "98a8c254a46d8b206aa5a743bf88030c", "score": "0.51649773", "text": "public function __sleep()\n {\n throw new \\BadMethodCallException('Cannot serialize ' . __CLASS__);\n }", "title": "" }, { "docid": "cb0dc56d05ff26d068df2e0e8accc7a3", "score": "0.5151411", "text": "function isJson() {\n if(is_string($this->zipData)) {\n $json = json_decode($this->zipData, true);\n if(json_last_error() == JSON_ERROR_NONE) {\n $this->zipData = $json;\n unset($json);\n }\n return (json_last_error() == JSON_ERROR_NONE);\n } else {\n throw new Exception(\"File was not read properly. Maybe file is empty, corrupted, or source is invalid.\");\n }\n }", "title": "" }, { "docid": "429b61a775181152937c5fc19b99e827", "score": "0.51466066", "text": "public function __wakeup()\n\t{\n\t\ttrigger_error(\"Unserializing \".__CLASS__.\" is not allowed.\", E_USER_ERROR);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5b699735290310cf1a78207f0971c4ba", "score": "0.514019", "text": "public function testInvalidArgumentShouldThrowException()\n {\n new Reader(new \\stdClass());\n }", "title": "" }, { "docid": "f6b053af96811fb42a6bc21a5bc8e81d", "score": "0.5127052", "text": "public function testSubmitResultServiceBadJsonFormat()\n {\n $submitResultController = new SubmitResultController($this->submitResultService);\n $submitResultController->setContainer($this->container);\n\n $this->request->expects($this->once())\n ->method('getContent')\n ->willReturn('[}');\n $this->expectException(\\InvalidArgumentException::class);\n $this->expectExceptionMessage(self::DECODING_ERROR_MESSAGE);\n $submitResultController->submitResultService(\n $this->request,\n $this->serviceResource->getParent()->getId(),\n $this->serviceResource->getId()\n );\n }", "title": "" }, { "docid": "1371cd880ec1c37ded9ec364222b9ac8", "score": "0.51258993", "text": "public function testFailingLintingThrowsAnException()\n {\n $this->expectException(LintingException::class);\n\n $this->json->lint('{');\n }", "title": "" }, { "docid": "920c884899012dd18611ea172493df30", "score": "0.5124654", "text": "private function __construct(){\n throw new Exception(\"Can't get an instance of Errors\");\n }", "title": "" }, { "docid": "407854a2f8cafef71656137c4111cbff", "score": "0.51170915", "text": "public function testJsonExceptionString() : void\n {\n $json = '{\"a\": \"b\",}';\n\n try {\n ApiProblem::fromJson($json);\n }\n catch (JsonParseException $e) {\n $this->assertEquals($json, $e->getJson());\n }\n }", "title": "" }, { "docid": "c53214fde5c3209e400dfc8ff236070f", "score": "0.5098573", "text": "function testWellformedError() {\n $file = realpath(dirname(__FILE__).'/../res/xmlfile-malformed.xml');\n $this->expectException(new binarypool_exception(117, 400, \"XML document is not well-formed.\"));\n $this->assertIdentical(binarypool_validate_xml::validate($file), false);\n }", "title": "" }, { "docid": "fd949297b9db880ab192165a03b834ab", "score": "0.5097525", "text": "public function failure()\n {\n }", "title": "" }, { "docid": "31196b8db5b7c4b0e4083faf41597180", "score": "0.5094417", "text": "protected function throwUploadFailureException()\n {\n throw new ConflictFileUploadHttpException('Could not store the file on disk.');\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.5084534", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.5084534", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.5084534", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.5084534", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "dd22980d0a5afdfb211143f940b06b58", "score": "0.5084534", "text": "public function serialize()\n {\n }", "title": "" }, { "docid": "9eab30345007147f88566527d06d530d", "score": "0.5083077", "text": "public function __wakeup() {\n\t\tthrow new \\Exception( 'Cannot serialize singleton' );\n\t}", "title": "" }, { "docid": "22e2326923a63af7cf4f90af8baed3ad", "score": "0.5080449", "text": "public function testDenormalizeInvalidCustomSerializedField() {\n $entity = EntitySerializedField::create(['serialized_long' => serialize(['Hello world!'])]);\n $normalized = $this->serializer->normalize($entity);\n $this->assertEquals(['Hello world!'], $normalized['serialized_long'][0]['value']);\n\n $normalized['serialized_long'][0]['value'] = 'boo';\n $this->expectException(\\LogicException::class);\n $this->expectExceptionMessage('The generic FieldItemNormalizer cannot denormalize string values for \"value\" properties of the \"serialized_long\" field (field item class: Drupal\\Core\\Field\\Plugin\\Field\\FieldType\\StringLongItem).');\n $this->serializer->denormalize($normalized, EntitySerializedField::class);\n }", "title": "" }, { "docid": "69c8a56f30e93eea6b4e3fbf31fd58c7", "score": "0.5073294", "text": "public function save()\n {\n throw new Exception\\UnimplementedException(__METHOD__.' is not implemented.');\n }", "title": "" }, { "docid": "c46701597b6d1b0c651943a86d46688e", "score": "0.50675005", "text": "public function tryAnException()\n {\n try {\n $iterator = $this->endpoint->listRecords('foobardoesnotexist');\n $iterator->current();\n } catch (\\Phpoaipmh\\Exception\\OaipmhException $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "0076fbf2a2af868391af0861263ed565", "score": "0.50660884", "text": "public function test_filesystem_read_files_that_could_not_be_parsed_throws_a_parse_exception()\n {\n $filesystem = new Scan\\Adapter\\Filesystem(dirname(__FILE__).'/Assets/Data/Corrupt.yml');\n $filesystem->read();\n }", "title": "" }, { "docid": "104c1d9467b87ecde2eae6a576d84f36", "score": "0.5065183", "text": "public function isCorrupted()\n {\n return $this->_hasError;\n }", "title": "" } ]
ded9e4a546c08a6b984ffb0eae9819a4
Generates a readable name using the setting_key
[ { "docid": "6a6c72946e7d7d9e7ebfb44530e82e2b", "score": "0.6934133", "text": "public function getNameAttribute()\n {\n return ucwords(strtolower(str_replace('_', ' ', $this->setting_key)));\n }", "title": "" } ]
[ { "docid": "8c47488e5ad7f7ef677cf83ed1476fb6", "score": "0.7212163", "text": "protected static function get_key($key)\n {\n return sprintf('%s[%s]', self::SETTING, $key);\n }", "title": "" }, { "docid": "64602214b0dced2ac2e11894f13e87b6", "score": "0.64713436", "text": "public function getSettingName($field)\n {\n return 'CustomSettings[' . $field . ']';\n }", "title": "" }, { "docid": "068d4363f50671ff6256d68baab0be08", "score": "0.63564163", "text": "public function getSettingKey()\n {\n return $this->settingKey;\n }", "title": "" }, { "docid": "8008554556a7b26578b103632ccdf718", "score": "0.6355412", "text": "private function getKey($key) {\r\n return 'TCM_'.$key;\r\n }", "title": "" }, { "docid": "90adeb8a16539cb351c935d9701ea1d0", "score": "0.6341084", "text": "public function getKey(): string\n {\n return $this->fillSettings->getKey();\n }", "title": "" }, { "docid": "55176d7ca4c1d3271893ea85d2d1c27a", "score": "0.609817", "text": "public static function attributionSettingsName($property)\n {\n return self::getAttributionSettingsNameTemplate()->render([\n 'property' => $property,\n ]);\n }", "title": "" }, { "docid": "e7672db86345523a66f9317ed9caefd7", "score": "0.6097914", "text": "protected function makeCacheKey()\n {\n return 'log' . $this->id;\n }", "title": "" }, { "docid": "240cffeedefa0c942d134b0d265820d3", "score": "0.60736805", "text": "function _wpsc_get_user_meta_key( $key ) {\n\tglobal $wpdb;\n\t$blog_prefix = is_multisite() ? $wpdb->get_blog_prefix() : '';\n\treturn \"{$blog_prefix}_wpsc_{$key}\";\n}", "title": "" }, { "docid": "0916e283e17409aa7ef496aebd6e2ba8", "score": "0.60552555", "text": "function make_user_meta_key( $key = '' ) {\n\n\t// Bail if we don't have a key to check.\n\tif ( empty( $key ) ) {\n\t\treturn;\n\t}\n\n\t// Run the main cleanup.\n\t$clean = sanitize_key( $key );\n\n\t// Now swap the dashes for underscores.\n\t$strip = str_replace( array( '-', ' ' ), '_', $clean );\n\n\t// Return the key name with our prefix as a constant.\n\treturn Core\\META_PREFIX . esc_attr( $strip );\n}", "title": "" }, { "docid": "a18ebb6cd8b4ac9356d7a547cb0d3e4c", "score": "0.60490996", "text": "public function getFullCacheKey( $value, $key )\r\n {\r\n return \"CACHE_MODELS.\". trim($key) .\".\". trim($value);\r\n }", "title": "" }, { "docid": "a3652a2443878ac0228786458efa9a76", "score": "0.6043534", "text": "public function getUniqueShortname() \n {\n $keyparts = explode('/',$this->m_menukey);\n $lastidx = count($keyparts) - 1;\n return $keyparts[$lastidx];\n }", "title": "" }, { "docid": "055b03da6bdd53a9cc5c5df9f9588bd8", "score": "0.6013915", "text": "public function getKey() {\n\t\t$tmp = explode( '\\\\', get_class( $this ) );\n\t\treturn lcfirst( str_replace( 'CustomFormat', '', array_pop( $tmp ) ) );\n\t}", "title": "" }, { "docid": "29ba75b4b180585f7bc8d1925376cc05", "score": "0.59913945", "text": "public function get_option_key() {\n return $this->plugin_id . $this->id . '_settings';\n }", "title": "" }, { "docid": "067208764345643b7f1b8a72ead990a3", "score": "0.59868425", "text": "private function get_field_name( $field ) {\n\t\treturn $this->setting_prefix ? $this->setting_prefix . '_' . $field['id'] : $field['id'];\n\t}", "title": "" }, { "docid": "ee6bf7cb85fdf6e7276af2467afc04a4", "score": "0.59596753", "text": "private function getKey ($id) {\n\t\treturn \"buildingInfo-\".$id;\n\t}", "title": "" }, { "docid": "71977b82d9dedb5f6cfcda216479c364", "score": "0.5956747", "text": "function kickpress_shortener_key($key) {\n\tif ( ! $key )\n\t\treturn '23456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';\n\telse\n\t\treturn $key;\n}", "title": "" }, { "docid": "f6b915868c3fae019b8f044816132e4a", "score": "0.5933574", "text": "public function generate($keyVar): string;", "title": "" }, { "docid": "b1abc7a335ea96857abfcd94c3f63e9f", "score": "0.5907601", "text": "protected function getNameToStore(): string\n {\n $base = \"_{$this->analystName}_{$this->methodName}\";\n $hash = $this->analyst->hash($this->methodName, $this->parameters);\n\n // Null-value identical check used because empty string is considered\n // to be valid hash value.\n return ($hash !== null)\n ? $base . '@' . $hash\n : $base;\n }", "title": "" }, { "docid": "3c16bad5eafdab1304fd3d1b31cd73c3", "score": "0.58967847", "text": "public function getFriendlyName() {\n return $this->_kitchen_settings['friendly_name'];\n }", "title": "" }, { "docid": "3c749a4aea2cda89912f62afa4d58589", "score": "0.5883329", "text": "private function generateKey( string $key ) : string {\n\t\treturn $this->prefix . str_replace( ':', '', $key );\n\t}", "title": "" }, { "docid": "8313e05d8a92fce8120f4908db3fcdd6", "score": "0.5869986", "text": "public function getKeyForFieldLang($key)\n\t{\n\t\t$data = explode('_', $key);\n\t\t$config_name = '';\n\t\tfor ($i=0; $i < count($data) - 1; $i++) { \n\t\t\t$config_name .= $data[$i];\n\t\t\tif($i < count($data) - 2)\n\t\t\t\t$config_name .= '_';\n\t\t}\n\t\treturn $config_name;\n\t}", "title": "" }, { "docid": "8f7e16f96af486857160ceccfe1a2dc6", "score": "0.5847016", "text": "private function generateName()\n {\n return 'child_'.time().'_'.rand();\n }", "title": "" }, { "docid": "8ca5204e33d530d141d991d71ce88612", "score": "0.58470154", "text": "public function getAttributeName()\n {\n return 'Setting';\n }", "title": "" }, { "docid": "22399152dc38b26e9636753303bc6273", "score": "0.58458066", "text": "public function key(): string\n {\n return $this->name;\n }", "title": "" }, { "docid": "207e1b3445afcd49e425158936b132f2", "score": "0.58378", "text": "private function realKey(): string\n {\n return Helpers::formatString(\"{key}::{ip}\", [\"key\" => $this->_key, \"ip\" => $this->request->ip()]);\n }", "title": "" }, { "docid": "d747b4d21eb3c7df43e8ad03495ade4f", "score": "0.5834989", "text": "public static function generate_name($value)\n { //return str_slug(strtolower($value), '-');\n return strtolower($value);\n }", "title": "" }, { "docid": "9bb170ea321d715ef2666959cda92865", "score": "0.5809499", "text": "static public function config_key_to_http_name( $id ) {\n\t\tif ( is_array( $id ) )\n\t\t\t$id = $id[0] . '___' . $id[1];\n\n\t\treturn str_replace( '.', '__', $id );\n\t}", "title": "" }, { "docid": "6d115ecbf06cd164bb562bfe75a8eab8", "score": "0.5808759", "text": "public function getKey(): string\n {\n if ($this->key) {\n return $this->key;\n }\n\n if ($this->config->has('key')) {\n $key = Key::validate($this->config->get('key'), 'layout');\n\n $this->key = $key;\n\n return $this->key;\n }\n\n $this->key = sprintf(\n '%s_%s',\n $this->parentKey,\n Key::sanitize($this->config->get('name'))\n );\n\n return $this->key;\n }", "title": "" }, { "docid": "af2292f3f8717a22fd07fefe4fab3507", "score": "0.57898825", "text": "abstract protected function getConfigName();", "title": "" }, { "docid": "1ffd471b7ed99ccbcaa30fec45dbb5d7", "score": "0.5777464", "text": "protected function buildID() {\n $source = val('source', $this->config);\n return \"{$this->type}-{$source}\";\n }", "title": "" }, { "docid": "27b1186a56971a27b99df1b9ead8b827", "score": "0.5765412", "text": "public function generateName()\n {\n }", "title": "" }, { "docid": "d839455fe01210d72b462d17e76424b4", "score": "0.57624125", "text": "private function fromSettings($key){\n return (call_user_func([$this->getModelType(),'crudSettings']))[$key];\n }", "title": "" }, { "docid": "ddf3e7e39ef1197381e290995ecc44cf", "score": "0.5759107", "text": "public function getArgTemplate(string $key): string\n\t{\n\t\treturn \"%{$key}%\";\n\t}", "title": "" }, { "docid": "2d016562454f67365dfceab8a01de84b", "score": "0.575687", "text": "protected static function getCacheDynKeyName()\n {\n return 'u_variable:dynamic_key';\n }", "title": "" }, { "docid": "501784e5e84ce94a37985e7141788c31", "score": "0.5749132", "text": "function name () {\r\n\t\treturn strval ( $this->options ( __FUNCTION__, '' ) );\r\n\t}", "title": "" }, { "docid": "5fdf146649f726988774f42f48a04487", "score": "0.57422256", "text": "public function get_option_database_key() {\n\t\treturn $this->get_section_name(); // database serialized array of settings. just reuse the shortcode name (doesn't have to be that way, though)\n\t}", "title": "" }, { "docid": "dc1a57a441739c04d18ddac6036f126d", "score": "0.5733292", "text": "function emp_get_module_setting_placeholder($key)\n{\n if (emp_get_string_ends_with($key, \"PAGE_TITLE\")) {\n return \"This name will be displayed on the checkout page\";\n } elseif (emp_get_string_ends_with($key, \"USERNAME\")) {\n return \"Enter your Genesis Username here\";\n } elseif (emp_get_string_ends_with($key, \"PASSWORD\")) {\n return \"Enter your Genesis Password here\";\n } elseif (emp_get_string_ends_with($key, \"TOKEN\")) {\n return \"Enter your Genesis Token here\";\n }\n\n return null;\n}", "title": "" }, { "docid": "df5c3eb1f01a0ee0b79ba14c9b763bbf", "score": "0.5723463", "text": "private function key(string $key): string\n {\n return $this->isSupportTags ? $key : $this->prefix.$key;\n }", "title": "" }, { "docid": "9616ed148899604c8eee699c9411f841", "score": "0.5723317", "text": "public static function html_name($param_name) {\n return self::SettingsId . \"[$param_name]\";\n }", "title": "" }, { "docid": "b740c5d8f704fdc71c74dd2a82bb8292", "score": "0.5722319", "text": "abstract protected function makeKeyString($key) : string;", "title": "" }, { "docid": "dd3e82989bbc0a5825965484baca1212", "score": "0.5719513", "text": "public static function googleSignalsSettingsName($property)\n {\n return self::getGoogleSignalsSettingsNameTemplate()->render([\n 'property' => $property,\n ]);\n }", "title": "" }, { "docid": "cb1c1479b0c5259cb784a76b4eddaf8c", "score": "0.57188404", "text": "protected function createCacheKey($key)\n {\n return sprintf('OpeningHours:%s', $key);\n }", "title": "" }, { "docid": "e3e3e2b3f7c57ae73de0d7422cdaf09a", "score": "0.57151014", "text": "function system_name()\n{\n return Settings::get('name');\n}", "title": "" }, { "docid": "3c8788689bd10f68c03821ea4fb86465", "score": "0.5714389", "text": "public function getCacheKey()\n {\n return $this->country.'_'.$this->city.now()->format(\"Ymd\");\n }", "title": "" }, { "docid": "a880d4e6b1fbad1b055ed1abe9c4f836", "score": "0.571192", "text": "function wp_wodify_admin_api_key_field_callback ( ) {\n $setting = esc_attr( get_option( 'wp-wodify-api-key' ) );\n echo '<input type=\"text\" name=\"wp-wodify-api-key\" value=\"' . $setting . '\" />';\n}", "title": "" }, { "docid": "8aebe186a5927378cad1359f5e6cdc88", "score": "0.57117105", "text": "protected function getKey($name): string\n {\n return \"locker_$name\";\n }", "title": "" }, { "docid": "dffb51040fe0b2c7f19b9ba4881c5005", "score": "0.570853", "text": "public function name() {\n\t\tif (isset($this->name)) {\n\t\t\tif (defined($this->name)) {\n\t\t\t\treturn constant($this->name);\n\t\t\t} else {\n\t\t\t\treturn $this->name;\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "cb1b179ee1abc71a324bf6b5d5d856e6", "score": "0.5705069", "text": "function get_ra_membership_mapping_title($member_type_key) {\n \tswitch ($member_type_key) {\n \t\tcase \"Platinum RA\":\n \t\t\treturn \"AUTO + RV PLATINUM\";\n \t\tcase \"Standard\":\n \t\t\treturn \"AUTO + RV STANDARD\";\n \t\tcase \"Auto Platinum RA (CVP)\":\n \t\t\treturn \"AUTO PLATINUM\";\n \t\tdefault:\n \t\t\treturn $member_type_key;\n \t}\n }", "title": "" }, { "docid": "cbd14c5bdf984a7c5e262e92146ca890", "score": "0.57040435", "text": "protected function keyToFileName($key)\n {\n return str_replace('*', str_replace(['-', '/', '\\\\', ' ',], '_', $key), $this->configFileTemplate);\n }", "title": "" }, { "docid": "574b0ffbe0f13b5177ca7545bb6b4371", "score": "0.5696828", "text": "function getName($key)\n\t{\n\t\treturn $this->get($key);\n\t}", "title": "" }, { "docid": "68238bfa9c4d518b20e438863c32e4dd", "score": "0.5693957", "text": "function getName($simple)\n{\n global $config_json;\n $this_name = $simple['name'];\n if ($config_json->name_required) {\n\n if ($config_json->brand_required) {\n $this_name = $simple['brand'];\n }\n\n foreach ($config_json->generate_name as $part) {\n $this_name .= ' ' . $simple[$part];\n }\n }\n\n return $this_name;\n}", "title": "" }, { "docid": "90d88c04add3aa86e66f1492a9e074f2", "score": "0.56891966", "text": "public function key() {\n\t\treturn $this->set . '@' . static::NAME;\n\t}", "title": "" }, { "docid": "e67951777180daca385e8f3fa502c380", "score": "0.568743", "text": "function get_name_field( $name = '' ) {\n return 'yit_' . $this->settings['parent'] . '_options[' . $name . ']';\n }", "title": "" }, { "docid": "c80fb1b410b17bb6302487ecb7cc6a20", "score": "0.5679893", "text": "public static function projectSettingsName($project)\n {\n return self::getProjectSettingsNameTemplate()->render([\n 'project' => $project,\n ]);\n }", "title": "" }, { "docid": "0dfc75638c06dd984b9be30d8b0bd229", "score": "0.5677583", "text": "public static function dataRetentionSettingsName($property)\n {\n return self::getDataRetentionSettingsNameTemplate()->render([\n 'property' => $property,\n ]);\n }", "title": "" }, { "docid": "e0d9983cafd87759d9d4343402d7a5dd", "score": "0.56767666", "text": "public function getIdentifier(): string\r\n {\r\n return lcfirst(generalUtility::underscoredToUpperCamelCase($this->extension)) . $this->key . 'UpdateWizard';\r\n }", "title": "" }, { "docid": "c61659a3c08fcee97d67fa0ffc2c2957", "score": "0.56759024", "text": "private function makeCacheKey($key = null): string\n {\n if ($key !== null) {\n return $key;\n }\n\n $cacheKey = $this->getBaseKey();\n\n $backtrace = debug_backtrace()[2];\n\n return sprintf(\"$cacheKey %s %s\", $backtrace['function'], \\serialize($backtrace['args']));\n }", "title": "" }, { "docid": "997981e4cacb67c136e37cf321691a1c", "score": "0.5646805", "text": "public function getRawName() {\r\n\t\treturn $this->cfg->prefix.$this->cfg->name;\r\n\t}", "title": "" }, { "docid": "c527eea2168fbfb4c11c4d150bdb4a7c", "score": "0.56356657", "text": "function get_ta_membership_mapping_title($member_type_key) {\n \tswitch ($member_type_key) {\n \t\tcase \"TA-GS Base\":\n \t\t\treturn \"BASIC PLAN\";\n \t\tcase \"TA-GS Premier\":\n \t\t\treturn \"PREMIER PLAN\";\n \t\tdefault:\n \t\t\treturn $member_type_key;\n \t}\n }", "title": "" }, { "docid": "c488665e17bb690c664fd95a8e40cfdd", "score": "0.5633465", "text": "public function buildKey($key, $group = 'default')\n {\n if (empty($group)) {\n $group = 'default';\n }\n\n if (false !== array_search($group, $this->global_groups)) {\n $prefix = $this->global_prefix;\n } else {\n $prefix = $this->blog_prefix;\n }\n\n return preg_replace('/\\s+/', '', WP_CACHE_KEY_SALT . \"$prefix$group:$key\");\n }", "title": "" }, { "docid": "322d0db00ff614874499d46017c334d1", "score": "0.56272304", "text": "private function generateName(): string {\n\t\t$genName = bin2hex(openssl_random_pseudo_bytes(12)) . md5($this->file['name']);\n\n\t\treturn $genName;\n\t}", "title": "" }, { "docid": "7566a716ccb6041b95c83e0115563ffb", "score": "0.56204104", "text": "private function get_option_name() {\n\t\treturn $this->provider->get_option_name();\n\t}", "title": "" }, { "docid": "1963f6d398f53ef12b161d02f914540e", "score": "0.5614258", "text": "protected function _getAssetName() {\n $k = $this->_tbl_key;\n return 'com_easysdi_catalog.profile.' . (int) $this->$k;\n }", "title": "" }, { "docid": "5bfc65a3be5a5b0e8159dcea674e3d08", "score": "0.56109506", "text": "public function getUserSetting($key);", "title": "" }, { "docid": "202ef111d5953acfa43dcb5ebdd5c094", "score": "0.5608753", "text": "private function getWpmlName()\n {\n return sprintf( '%s_%s_%d', $this->getGateway(), $this->getType(), $this->getId() );\n }", "title": "" }, { "docid": "2581a60c68406431b5269dd3c9f8a034", "score": "0.5608528", "text": "private function _getKey($name)\n {\n return $this->_prefix . ':' . $name;\n }", "title": "" }, { "docid": "14de86b8da9847294964373bc8e62195", "score": "0.560219", "text": "protected function _getContextNameKey() {\n\t\treturn 'manager.setup.journalTitle';\n\t}", "title": "" }, { "docid": "318f4c654a0df9f6dc7f11c5c128fc93", "score": "0.56007284", "text": "function optionsframework_option_name() {\n\t\t$themename = get_option( 'stylesheet' );\n\t\t$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\n\t\t$optionsframework_settings = get_option('optionsframework');\n\t\t$optionsframework_settings['id'] = $themename;\n\t\tupdate_option('optionsframework', $optionsframework_settings);\n\n\t\t// echo $themename;\n\t}", "title": "" }, { "docid": "493ac82a25b1cb0c2391dc4b6060e928", "score": "0.56000936", "text": "public function getUniqueKey () : string\n {\n return \"{$this->class}::{$this->property}\";\n }", "title": "" }, { "docid": "e2be1897a6b05e736e493bfb48f98d43", "score": "0.5597955", "text": "function _acf_generate_local_key($field)\n{\n}", "title": "" }, { "docid": "78c28b415aee9dccae9a41dabb59c447", "score": "0.55874354", "text": "protected function _getAssetName()\n {\n $k = $this->_tbl_key;\n return 'com_jresearch.member.'.(int) $this->$k;\n }", "title": "" }, { "docid": "3b8233b1929734c79834c2cb6d4e02ec", "score": "0.5584362", "text": "public function get_name() {\n return get_string('pushtoapitask', 'local_jirapush');\n }", "title": "" }, { "docid": "cfa0a9844673fd2a311d624ab53429a8", "score": "0.5583479", "text": "protected function _getAssetName()\n\t{\n\t\t$k = $this->_tbl_key;\n\t\treturn 'com_realtor.property.' . (int) $this->$k;\n\t}", "title": "" }, { "docid": "7d3af3c705e26bed2e77378156f6e2d7", "score": "0.5577862", "text": "public static function projectSettingsName(string $project): string\n {\n return self::getPathTemplate('projectSettings')->render([\n 'project' => $project,\n ]);\n }", "title": "" }, { "docid": "3ca495b9714ae87d8d67563848f3c9cd", "score": "0.5574118", "text": "public function real($key)\n {\n return $this->cachePrefix . \"_\" .$key;\n }", "title": "" }, { "docid": "8e09648a0a809de4ade56c2d9ad03298", "score": "0.5570378", "text": "protected function key(): string\n\t{\n\t\treturn 'roster-fruits';\n\t}", "title": "" }, { "docid": "e3d87548bfe6c155c17e38e3de19b9ac", "score": "0.5570276", "text": "function optionsframework_option_name() {\n\n\t// This gets the theme name from the stylesheet (lowercase and without spaces)\n\t//$themename = get_option( 'stylesheet' );\n\t//$themename = preg_replace(\"/\\W/\", \"_\", strtolower($themename) );\n\t$themename = 'serge';\n\n\t$optionsframework_settings = get_option('optionsframework');\n\t$optionsframework_settings['id'] = $themename;\n\tupdate_option('optionsframework', $optionsframework_settings);\n\n\t// echo $themename;\n}", "title": "" }, { "docid": "4795fe54576f6de66c5fb8afb50f1f11", "score": "0.55591327", "text": "public function getName()\n {\n return $this->getKey('real_name');\n }", "title": "" }, { "docid": "ebd74ec9b4607cb996c8a5d7a9b64e51", "score": "0.5558488", "text": "protected function keys()\n {\n return snake_case(str_singular($this->argument('model'))) . \"_id\";\n }", "title": "" }, { "docid": "55d9d33d420963bc2dc12d6423da8553", "score": "0.5555915", "text": "private function generateName($isReadableName)\n {\n if ($isReadableName) {\n $readableNames = array ('qatqiia', 'toka', 'siki', 'necka', 'tyuko', 'piaktu', 'avil', 'narta', 'inik', 'tipva');\n return $readableNames[rand(0, count($readableNames) - 1)] . rand(0, 9) . rand(0, 9) . rand(0, 9) . rand(0, 9);\n } else {\n return uniqid();\n }\n }", "title": "" }, { "docid": "42605b1b56eeeff05e0e81e8de18e64d", "score": "0.5550149", "text": "public function name()\n {\n switch($this->role){\n case 'admin':\n return 'ADM-'.$this->id;\n case 'member':\n if($this->isPerson()) return 'MP-'.$this->id;\n return 'MO-'.$this->id;\n case 'seller':\n if($this->type=='builder') return 'SBU-'.$this->id;\n if($this->type=='developper') return 'SDE-'.$this->id;\n return 'SEL-'.$this->id;\n case 'afa':\n if($this->type=='seller') return 'AFS'.$this->id;\n return 'AFA-'.$this->id;\n case 'apl':\n return 'APL-'.$this->id;\n }\n }", "title": "" }, { "docid": "4557958470d614e0148cb38043c75d4c", "score": "0.5542974", "text": "protected function generateKey(ResourceOwnerInterface $resourceOwner, string $key, string $type): string\n {\n return sprintf('_core_oauth.%s.%s.%s.%s', $resourceOwner->getName(), $resourceOwner->getOption('client_id'), $type, $key);\n }", "title": "" }, { "docid": "738052f79d9956e83e47933246c0d18e", "score": "0.5538871", "text": "public function getKeyName(): string;", "title": "" }, { "docid": "806edc801465453a185e5185abf4300f", "score": "0.5535462", "text": "public function getConfigName()\n {\n // Format : 'core-entity_form_display-{entity_type}-{bundle}-{view_mode}'.\n return 'core.entity_form_display.' . $this->entity_type . '.' . $this->data['id'] . '.' . $this->view_mode;\n }", "title": "" }, { "docid": "e92801d2a1a36572529543f6cde80fee", "score": "0.552757", "text": "function mcs_get_field_name( $key, $value ) {\n\t$values = array_merge( mcs_default_fields(), mcs_default_location_fields() );\n\n\treturn ( in_array( $key, array_keys( $values ) ) ) ? $values[$key] : $value;\n}", "title": "" }, { "docid": "7bd10e4bd90616cfd1425b277cf946b6", "score": "0.55274814", "text": "protected function getSlugKey()\n {\n return property_exists($this, 'slugKey') ? $this->slugKey : 'slug';\n }", "title": "" }, { "docid": "94833c47f5be60bcde00600fade5838a", "score": "0.55241525", "text": "public function get_shortname() : string {\n return $this->data->get_field()->get('shortname');\n }", "title": "" }, { "docid": "117a778be810421e180eca370dd1b8c5", "score": "0.55180454", "text": "public function indexKeyToName($indexKey) : string\n {\n foreach (ALGOLIA_FRONTEND_INDEXES as $index) {\n if (in_array($indexKey, $index)) {\n return $index[2];\n }\n }\n return \"\";\n }", "title": "" }, { "docid": "2c1fcf78d305b996780cb79fd96d213b", "score": "0.5515735", "text": "function short_name() {\n\t\t//@TODO ht_dms prefix needs to be set dynamically everywhere.\n\t\t$prefix = 'ht_dms';\n\t\t$prefix = $prefix.'_';\n\t\treturn str_replace( $prefix, '', $this->get_type() );\n\n\t}", "title": "" }, { "docid": "fcec3367f7bb97776bc4ffed204c09d6", "score": "0.551467", "text": "function _wpsc_get_visitor_meta_key( $key ) {\n\treturn \"_wpsc_{$key}\";\n}", "title": "" }, { "docid": "04ec7d928e8e1e34b21030919362a86b", "score": "0.5514189", "text": "protected function logFileName($key) {\n\t\treturn str_replace( ['logs/', '/'], ['', '_'], $key) . '.txt';\n\t}", "title": "" }, { "docid": "299b8168c5346a83430776cb5da468f5", "score": "0.5514001", "text": "public function get_option_key() {\n return $this->plugin_id . self::WC_ONPAY_SETTINGS_ID . '_settings';\n }", "title": "" }, { "docid": "35e43bf03265e17bb96815b4a2e4206b", "score": "0.5512804", "text": "public function getName()\n {\n return $this->getConfig('name');\n }", "title": "" }, { "docid": "5bdd1f1d49e4d04825399574c3f0d5bc", "score": "0.55113727", "text": "private static function getCacheKey(): string\n {\n return md5(static::class.Splash::configuration()->WsIdentifier);\n }", "title": "" }, { "docid": "5a7d8108fdc4a2bf6f1f197ceef9020b", "score": "0.5502098", "text": "private function getFileName($key) {\n \t\t\n\t\tglobal $_base_path;\n\t\t\n\t\t$md5 = md5($key);\n\t\t\n\t\t$folder = substr($md5, 0, 2);\n\t\t$subfolder = substr($md5, 2, 2);\n\t\treturn $_base_path.'cache/'.$folder.'/'.$subfolder.'/'.md5($key);\n\t}", "title": "" }, { "docid": "fcc3d729ec788c3d2d4b40a04ea3667e", "score": "0.54931736", "text": "abstract protected function getConfigKey();", "title": "" }, { "docid": "825cd5f917284f9876955794cf90503e", "score": "0.54929525", "text": "private static function key( $type, $key ) {\n\t\treturn self::KEY_PREFIX . '/' . $type . '/' . $key;\n\t}", "title": "" }, { "docid": "5d523785a99654dd47e903bb9cde688a", "score": "0.5489847", "text": "protected function makeKey() {\n $appCount = WorkActivityModel::all()->count();\n $appNumber = str_pad($appCount+1, 8, '0', STR_PAD_LEFT);\n\n return 'Act-'.$appNumber.'-'.date('Y');\n }", "title": "" }, { "docid": "0cfa218b8532e38751a25e0c88d82bcc", "score": "0.548929", "text": "public function getName()\n\t{\n\t\treturn $this->getConfig('name');\n\t}", "title": "" }, { "docid": "d6ab50f5a307133f1f159ed70ce5df0b", "score": "0.54892033", "text": "public function getName()\n\t{\n\t\treturn Craft::t('Global Sets');\n\t}", "title": "" } ]
5a5eaf02fa92cc079cf2878558eff9ed
FIM GETTERS AND SETTERS
[ { "docid": "48d9e24b11dfa212dfab37d3a69bd433", "score": "0.0", "text": "public function __construct($path,$mode){\n\n\t\t$this->setFileName($path);\n\n\t\t$this->setFilePointer($mode);\n\n\t}", "title": "" } ]
[ { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6957308", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6957308", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6957308", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6957308", "text": "public static function setters();", "title": "" }, { "docid": "c750e6d98cc91450b042bee03a72ea16", "score": "0.6922744", "text": "public function masheryUseSettersAndGetters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6700946", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6700946", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6700946", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6700946", "text": "public static function getters();", "title": "" }, { "docid": "5793c63735699422daa834390870dcb8", "score": "0.666108", "text": "abstract public function getter();", "title": "" }, { "docid": "e86a267c68cc5b0ff9ae0bd7fe528056", "score": "0.6318096", "text": "abstract protected function _set();", "title": "" }, { "docid": "66af83cdcd03f677ae290b1e6e584692", "score": "0.6245123", "text": "function get()\n {\n }", "title": "" }, { "docid": "ac34c3a36b1a7d63b4eb2c0161cdcd91", "score": "0.6241503", "text": "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "title": "" }, { "docid": "ac34c3a36b1a7d63b4eb2c0161cdcd91", "score": "0.6241503", "text": "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "title": "" }, { "docid": "ac34c3a36b1a7d63b4eb2c0161cdcd91", "score": "0.6241503", "text": "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "title": "" }, { "docid": "ac34c3a36b1a7d63b4eb2c0161cdcd91", "score": "0.6241503", "text": "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "title": "" }, { "docid": "ac34c3a36b1a7d63b4eb2c0161cdcd91", "score": "0.6241503", "text": "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "title": "" }, { "docid": "6bb1dbac14d97c6cf15ada971448264e", "score": "0.618397", "text": "abstract public function gettersAndSettersDataProvider(): array;", "title": "" }, { "docid": "96654de38665b75132383188326b4d18", "score": "0.6159008", "text": "abstract protected function set();", "title": "" }, { "docid": "fad06ec827822ea7ab5c95cbad1131f2", "score": "0.61319023", "text": "public function use_get_mutator()\n {\n $venda = \\App\\Models\\Venda::factory()->make();\n $venda->valor = \"100,00\";\n $this->assertEquals(100.0, $venda->valor);\n }", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.61271155", "text": "abstract protected function _get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.6063576", "text": "abstract public function get();", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "8f87316e22d187fb1d2bd0b72b44c5ea", "score": "0.6041547", "text": "public static function setters()\r\n {\r\n return self::$setters;\r\n }", "title": "" }, { "docid": "89149176e1161f5f8a5af68f62581c67", "score": "0.6018215", "text": "public function getFila() {\n return $this->fila;\n}", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.59720665", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.59720665", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.59720665", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.59720665", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "b7180ac905c0f0de932ab28d00d35d2a", "score": "0.59720665", "text": "public static function getters()\n {\n return parent::getters() + self::$getters;\n }", "title": "" }, { "docid": "7d44c3469578b94e1442feda5d1d451e", "score": "0.5969253", "text": "static function setters() {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" }, { "docid": "8c376e25c47556bb117b71df74073275", "score": "0.59632117", "text": "public static function setters()\n {\n return self::$setters;\n }", "title": "" } ]
2d1d4beca47d1b3450b8288dd7b80db0
Removes the given out from this collection.
[ { "docid": "942c0d1dfea5ed9a5b0ecf9ac7a37154", "score": "0.69453245", "text": "public function removeOut(Node $out)\n {\n if (\\func_num_args() !== 1) {\n throw new \\BadMethodCallException(\n sprintf(\n 'removeOut() has one argument but %d given.',\n \\func_num_args()\n )\n );\n }\n\n if (! $this->out instanceof \\Doctrine\\Common\\Collections\\Collection\n || ! $this->out->contains($out)\n ) {\n return $this;\n }\n\n $this->out->removeElement($out);\n\n $property = new \\ReflectionProperty(Node::class, 'in');\n $property->setAccessible(true);\n $collection = $property->getValue($out);\n if ($collection) {\n $collection->removeElement($this);\n }\n $property->setAccessible(false);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5765254", "text": "public function remove(){}", "title": "" }, { "docid": "6fc549255499b0566e4edbae94960d92", "score": "0.571287", "text": "public function removeOutputElement($name)\n {\n if (isset($this->output[$name])) {\n unset($this->output[$name]);\n }\n return $this;\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56602883", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56602883", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56602883", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56602883", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.56602883", "text": "public function remove();", "title": "" }, { "docid": "4af84a8eede9f748aeb8e5000f4b70c8", "score": "0.55910665", "text": "public function unsetCurrentEntry() {\n unset($this->collection[$this->position]);\n $this->collection = array_values($this->collection);\n }", "title": "" }, { "docid": "b42cfd530394ce6130cd4eac18fcd71a", "score": "0.5490377", "text": "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "title": "" }, { "docid": "e1f7a7ed9f3619b4d0da13e77ce9c81d", "score": "0.54698336", "text": "public function remove($input);", "title": "" }, { "docid": "9c790b5fdb5687a36f81fb0da001c51f", "score": "0.5460983", "text": "public function remove()\n\t{\n\t\treturn static::getMapper()->remove( array( '_id' => $this->_id ) );\n\t}", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.53917205", "text": "public abstract function remove();", "title": "" }, { "docid": "6ad33e567a1fba101093f4112f154be4", "score": "0.52710944", "text": "public function rem()\n {\n $this->remove();\n }", "title": "" }, { "docid": "c124d5aa07f4ef922ab8290ba8c5756b", "score": "0.52546537", "text": "function removeResponse($inIdent = null) {\r\n\t\treturn $this->_removeItem($inIdent);\r\n\t}", "title": "" }, { "docid": "d1d876bfaf5b2e5c8e95ae21230d69df", "score": "0.51035535", "text": "public function remove()\n {\n }", "title": "" }, { "docid": "d1d876bfaf5b2e5c8e95ae21230d69df", "score": "0.5103411", "text": "public function remove()\n {\n }", "title": "" }, { "docid": "d1d876bfaf5b2e5c8e95ae21230d69df", "score": "0.5103411", "text": "public function remove()\n {\n }", "title": "" }, { "docid": "7f2f992a8616bd50b543423fb29e6501", "score": "0.50839883", "text": "protected abstract function RemovalObject();", "title": "" }, { "docid": "d00d6d672a601604cd157c653642de66", "score": "0.50721574", "text": "public function removeResult () {\n $this->_aResult = array();\n }", "title": "" }, { "docid": "93c680822d6cfff26a17a5c427f26168", "score": "0.50306535", "text": "public function remove() {\n }", "title": "" }, { "docid": "bbd615130f3091ee11d2207f5d1bc403", "score": "0.49708122", "text": "public function __unset($key) {\n unset( $this->output[$key] );\n }", "title": "" }, { "docid": "164fe750ce262529a19233abfb981883", "score": "0.4953859", "text": "public function removed()\n {\n $this->addOption('removed');\n\n /* For the fluent API */\n return $this;\n }", "title": "" }, { "docid": "ddf2dca8bf894325e6aac286c6f9b774", "score": "0.49468812", "text": "public function setOut($out)\n {\n $this->out = $out;\n\n return $this;\n }", "title": "" }, { "docid": "20d2e242d68ae5b87ef2ed1863ea8e17", "score": "0.49020603", "text": "public function remove()\n {\n $this->collection()->pull($this->getKey());\n\n return $this;\n }", "title": "" }, { "docid": "a8f092fb41c304b0ea13b0dcd2fd96cf", "score": "0.48868886", "text": "function pop()\n {\n if ($this->stackOut->isEmpty()) {\n $this->fillStackOut();\n }\n return $this->stackOut->pop();\n }", "title": "" }, { "docid": "070b1c3de56c09db70e8529a37207724", "score": "0.48822725", "text": "public function remover(){\n\t\t\t\t\t\t\techo ' Remover --';\n\t\t\t\t\t\t}", "title": "" }, { "docid": "9e4aca47aab172064bef50c253be6639", "score": "0.48802388", "text": "function cwrc_dtoc_edition_reveal_form_collections_remove_item($form, &$form_state) {\n $triggering_element = $form_state['triggering_element'];\n $removed_object = $triggering_element['#collection_object'];\n unset($form_state['selected_collection'][$removed_object->id]);\n cwrc_dtoc_edition_delete_selected_collection_files_from_session($removed_object->id);\n $form_state['rebuild'] = TRUE;\n}", "title": "" }, { "docid": "2131350e8340f9ce8c63b943f51fcaef", "score": "0.48796624", "text": "function remove() {\n\n if ($this->is_dummy) return;\n\n if (false === $this->remove_before()) {\n return false;\n }\n\n // load secondary, if not did it earlier\n $this->load_secondary(true);\n\n $data = $this->get_data();\n\n $this->format_fields($data, 'remove');\n\n if (!$this->get_key()) {\n throw new collection_exception('Cant delete without PK');\n }\n\n $sql = sprintf(\"DELETE FROM %s WHERE %s = %s LIMIT 1\"\n , $this->get_table()\n , $this->get_key()\n , $this->format_field_sql($this->get_key(), $this->get_id())\n );\n\n $res = $this->db->sql_query($sql);\n\n $this->remove_after();\n\n return $res;\n }", "title": "" }, { "docid": "6a4e9effb2c313a731dd504d64a6a63f", "score": "0.4867075", "text": "public function remove( $mixed );", "title": "" }, { "docid": "32887fd7e18ada0c71acdeb5f3273ffe", "score": "0.48656467", "text": "public function removeInput($input)\n {\n unset($this->additionalInputs[$input]);\n return $input;\n }", "title": "" }, { "docid": "ab8c65853e36a692cdbd60441a7458b7", "score": "0.48442692", "text": "public function __unset($name) {\n\t\treturn $this->remove ( $name );\n\t}", "title": "" }, { "docid": "65bc31eec64254c85f1d3377b530cc00", "score": "0.48345667", "text": "protected function removeFromParentCollection()\n {\n if ($this->parentCollection === null) {\n return;\n }\n $this->parentCollection->removeChild($this);\n }", "title": "" }, { "docid": "5fe195788ffdfa3e2af91164c08701ba", "score": "0.4831052", "text": "public function remove( Inx_Api_IndexSelection $oSelection );", "title": "" }, { "docid": "deae2247d83f0461a32298d03d788be8", "score": "0.4818875", "text": "public function remove($event){\n\t\t\tif(array_key_exists($event, $this->events)):\t\t\t\t\t\t\t\t// Checks if Event exists\n\t\t\t\tunset($this->events[$event]);\t\t\t\t\t\t\t\t\t\t\t// Delete Event from the List\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "af60d7deb2c6aa38423ea7d93737129d", "score": "0.48159906", "text": "public function removeReference();", "title": "" }, { "docid": "e4e170283911f623ec25b6e95d8d0eb3", "score": "0.4814886", "text": "public function pop()\n {\n return array_pop($this->set);\n }", "title": "" }, { "docid": "a94881c90c51c75458dfbfe318962798", "score": "0.48041403", "text": "function remove(){\n\t\tcall_user_func_array(array($this, 'primary'), func_get_args());\n\t\t$this->query->delete($this->table)->where($this->primary());\n\t\t$query = (string) $this->query;\n\n\t\techo $query;\n\t\t$this->dbQuery($query);\n\t}", "title": "" }, { "docid": "2e278246a96597df56f154483c5e2f23", "score": "0.4799304", "text": "public function removeEvent($event)\n {\n return $this->events()->detach($event);\n }", "title": "" }, { "docid": "25369c023b7513a9bbcf56f5787c3252", "score": "0.47814658", "text": "function removeObject(commsGatewayNetworkMapping $inObject) {\n\t\treturn $this->_removeItem($inObject->getGatewayRef());\n\t}", "title": "" }, { "docid": "f6788354450a3027dabb07c27f95b33b", "score": "0.47703254", "text": "public function remove(){\n }", "title": "" }, { "docid": "d836d8aedbdf09782a76e79f57870c10", "score": "0.47640365", "text": "public function testRemove(TreeCollection $Tree, TreeCollectionNode $Node, TreeCollection $OutputTree) {\n\t\t$this->assertTrue($Tree->remove($Node)->isEquals($OutputTree));\n\t}", "title": "" }, { "docid": "899eb169012dc6b06f73d02e88d497d5", "score": "0.47444835", "text": "public function removeAt($index)\n\t{\n\t\t$this->scrubWeakReferences();\n\t\t$item = parent::removeAt($index);\n\t\t$this->filterItemForOutput($item);\n\t\tif (is_object($item)) {\n\t\t\t$this->weakCustomRemove($item);\n\t\t}\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "cd30122a6728b90a244478000aa7104f", "score": "0.47382283", "text": "public function destroy(TransactionOut $transactionOut)\n {\n //\n }", "title": "" }, { "docid": "27cbd434e50a0e52fdc37c3733afb0ab", "score": "0.4713551", "text": "public function clean()\n {\n unlink($this->outFile);\n }", "title": "" }, { "docid": "2772521602528666227c69c2c85b0bbe", "score": "0.47014254", "text": "public function remove(): void { }", "title": "" }, { "docid": "ce1a40b43c6258c1f7d1e64252f53cc4", "score": "0.4700356", "text": "public function __destruct() {\n unset($this->map);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.46875602", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.46875602", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "a339b171037442e518fea29eb54c3b6a", "score": "0.46843374", "text": "public function unQueue();", "title": "" }, { "docid": "aa2ecdc37ed6ad5a90bd98e93eaf1f19", "score": "0.46753392", "text": "public function unsubscribe(): ?bool\n\t{\n\t\tif (!$this->_isSubscribed) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->_isSubscribed = false;\n\n\t\tif ($this->_filterClass !== null) {\n\t\t\t$this->_filterClass::filterItemForOutput($this->_item);\n\n\t\t\tif ($this->_isReplacing) {\n\t\t\t\t$this->_filterClass::filterItemForOutput($this->_originalItem);\n\t\t\t}\n\t\t\t$this->_filterClass = null;\n\t\t}\n\n\t\t$collection = &$this->getArray();\n\n\t\tif (!is_array($collection) && !($collection instanceof ArrayAccess)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ($collection instanceof TList) {\n\t\t\t$args = [$this->getItem()];\n\t\t\tif ($collection instanceof IPriorityCollection) {\n\t\t\t\tarray_push($args, $this->getPriority());\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t$collection->remove(...$args);\n\t\t\t} catch (TInvalidDataValueException $e) {\n\t\t\t\t// if not found, continue.\n\t\t\t}\n\t\t} else {\n\t\t\tif ($this->_isAssoc || !is_array($collection)) {\n\t\t\t\t$key = $this->_key;\n\t\t\t\tif (isset($collection[$key]) || is_array($collection) && array_key_exists($key, $collection)) {\n\t\t\t\t\t$item = $collection[$key];\n\t\t\t\t\tif ($item === $this->getItem()) {\n\t\t\t\t\t\tunset($collection[$key]);\n\t\t\t\t\t\tif ($this->_isReplacing && (!($collection instanceof IWeakCollection) || $this->_originalItem !== null)) {\n\t\t\t\t\t\t\tif ($collection instanceof TPriorityMap) {\n\t\t\t\t\t\t\t\t$collection->add($key, $this->_originalItem, $this->_originalPriority);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$collection[$key] = $this->_originalItem;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset($this->_originalItem);\n\t\t\t\tunset($this->_originalPriority);\n\t\t\t\t$this->_isReplacing = null;\n\t\t\t} else {\n\t\t\t\t$key = array_search($this->getItem(), $collection, true);\n\t\t\t\tif ($key !== false) {\n\t\t\t\t\tarray_splice($collection, $key, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "76bf5facda17c7a7d3d0757b754ed063", "score": "0.46651113", "text": "function __unset ($item) {\n\t\t$this->del($item);\n\t}", "title": "" }, { "docid": "3181aa8dbe2d2ee1468353c578b6dd1c", "score": "0.46554875", "text": "public function removeAll() {}", "title": "" }, { "docid": "97d44760a923efa504ebfdfe30b243fe", "score": "0.4649186", "text": "private function remove_item() {\n\t\t\n\t\tforeach($_POST['delete_item'] as $value) {\n\t\t\tunset($this->contents[$value]);\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "541eafe9c8ce70664b87b6ba7a51c353", "score": "0.46406922", "text": "public function remove($entryIdentifier);", "title": "" }, { "docid": "d76a59743aa2a623f54ade70af0e4fbf", "score": "0.46279916", "text": "public function remove_Reference($ref_in) {\n foreach($this->ref as $key => $ref) {\n if($ref->get_ID() == $ref_in->get_ID()) {\n unset($this->ref[$key]);\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "2426aebb76eab0e891278ffa36caf296", "score": "0.4621525", "text": "function remove($options = '')\n\t{\n\t\t$sql = array();\n\n\t\treturn $this->_remove($sql);\n\t}", "title": "" }, { "docid": "58d11f312746ae8456eec0537ff44ea8", "score": "0.46209008", "text": "public function clearMous()\n {\n $this->collMous = null; // important to set this to null since that means it is uninitialized\n $this->collMousPartial = null;\n\n return $this;\n }", "title": "" }, { "docid": "012aabbf9be77c0d44ea5ffa1f19c3fd", "score": "0.4618588", "text": "function removeAll()\r\n {\r\n foreach($this->_getObjectVars() as $name => $var)\r\n $this->remove($name);\r\n }", "title": "" }, { "docid": "9187d6535c86586748d0fe5fd2785cc8", "score": "0.46185324", "text": "public function UnsetClipping() {\n $this->_out('Q');\n }", "title": "" }, { "docid": "fc85ab6d308b3b66c216bbcc4ec6e966", "score": "0.46154496", "text": "public function __destruct() {\n unset($this);\n }", "title": "" }, { "docid": "eb50c3e35ade24d6cf784228b92f0942", "score": "0.46143308", "text": "public function delete() {\r\n\t\tunset(Item::$rawItems[$this->idItem]);\r\n\t}", "title": "" }, { "docid": "4c203b55d6ba54b028474f0deecfcaf3", "score": "0.4608781", "text": "public function remove()\n {\n $json = array();\n\n $this->session->data['voucher'] = null;\n\n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput(json_encode($json));\n }", "title": "" }, { "docid": "627c725f9177c3e4dab6e51d7207a207", "score": "0.46076992", "text": "public function discard() {}", "title": "" }, { "docid": "960f46b2ad0431c9d7e0d3a7d2ec0f4e", "score": "0.4607646", "text": "public function __destruct() {\n unset($this);\n }", "title": "" }, { "docid": "960f46b2ad0431c9d7e0d3a7d2ec0f4e", "score": "0.4607646", "text": "public function __destruct() {\n unset($this);\n }", "title": "" }, { "docid": "47596221b4f428b66e8f7fef8d78cb96", "score": "0.46047807", "text": "function remove($options='')\n {\n\t\t$sql = array();\n\n\t\treturn $this->_remove($sql,$options);\n }", "title": "" }, { "docid": "47596221b4f428b66e8f7fef8d78cb96", "score": "0.46047807", "text": "function remove($options='')\n {\n\t\t$sql = array();\n\n\t\treturn $this->_remove($sql,$options);\n }", "title": "" }, { "docid": "da7b8306ee5265a0939ecbd8761e65ff", "score": "0.46043006", "text": "public function __destruct() {\n\t\tunset($this);\n\t}", "title": "" }, { "docid": "c4953e522a8d1d5fe762688730927dda", "score": "0.45993936", "text": "public function pop()\n {\n return array_pop($this->data);\n }", "title": "" }, { "docid": "2bf128b25b90c96d8ebc96592e1c72dd", "score": "0.45921367", "text": "public function remove($key) {\n\t\t$value = isset($this->data[$key]) ? $this->data[$key] : null;\n\t\t$this->trackChange(\"unset:$key\", $value, null); \n\t\tunset($this->data[$key]); \n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1e186d2193560879cd8d9ad2f42fbe47", "score": "0.4589733", "text": "public function remove()\n {\n if (isset($this->job_number)) {\n Wrapper::removeJob((int)$this->job_number);\n }\n }", "title": "" }, { "docid": "3d2ce5f29919ed3f15306988a00f0094", "score": "0.45652413", "text": "public function remove($obj);", "title": "" }, { "docid": "de48b3bff0578ab83bc58549a383c125", "score": "0.45648548", "text": "public function pop() {\n if(isset($this->_objects[0])) {\n return $this->_objects[0];\n }\n }", "title": "" }, { "docid": "6710525e9236a89149f872e723f25ec1", "score": "0.45609015", "text": "private function removeCard(){\n $removed_card = $this->deck->removeCard();\n return $removed_card;\n }", "title": "" }, { "docid": "708aafb065579281b62c068c68a03f89", "score": "0.4558943", "text": "public function pop()\n {\n return array_pop($this->elements);\n }", "title": "" }, { "docid": "708aafb065579281b62c068c68a03f89", "score": "0.4558943", "text": "public function pop()\n {\n return array_pop($this->elements);\n }", "title": "" }, { "docid": "1a60dd852beb4ece79482f2bcc6ef2f0", "score": "0.45588222", "text": "public function remove()\n {\n\n }", "title": "" }, { "docid": "5b0bf536db038bde5f618e947df885c3", "score": "0.4557138", "text": "public function destroy(Linkout $linkout)\n {\n DB::transaction(function() use ($linkout) {\n PathLinkout::where('linkout_id', $linkout->id)->delete();\n $linkout->delete();\n });\n\n return response(['success' => true]);\n }", "title": "" }, { "docid": "ef2427516735422748b6aaea28bd8bb0", "score": "0.45533627", "text": "public function __destruct() {\n\t\tunset($this->data);\n\t}", "title": "" }, { "docid": "5f3be0998c59177de3f18ecbe5480d7e", "score": "0.45495445", "text": "public function discard()\n {\n $this->dirty = false;\n }", "title": "" }, { "docid": "7ebae840b00f523b7e483ae1fa70d1ae", "score": "0.45418403", "text": "protected function release()\n {\n $marker = $this->markers->pop();\n $this->seek($marker);\n }", "title": "" }, { "docid": "1f63881279b4ac28c814f70dda1bba5d", "score": "0.45409867", "text": "public final function __unset( $name ) {\n return $this->delete($name);\n }", "title": "" }, { "docid": "1bfc6a4e2616c8a46eea74d74bae084b", "score": "0.45320472", "text": "public function destroy(Output $output)\n {\n $output->delete();\n return redirect()->route('output.index')->with('pesan', 'Data Output Berhasil Dihapus ');\n }", "title": "" }, { "docid": "7df616e0dda2e9b9943cb5fba21a327c", "score": "0.45298043", "text": "function clear() {\n unset($this->calcdata);\n }", "title": "" }, { "docid": "0a685e2e53684ec8d4f3620c0d6fd59c", "score": "0.45276788", "text": "public function remove($element) {\n $this->collection = array_filter($this->collection, function(TaggedCollectionElement $wrapper) use ($element) {\n if($this->objectsAreEqual($wrapper->getElement(), $element)) {\n $tags = $this->_refs[ $wrapper->getReference() ];\n foreach($tags as $tag) {\n $this->_tags[$tag] = array_filter($this->_tags[$tag], function($v) use ($wrapper) {\n return $v != $wrapper->getReference();\n });\n }\n unset($this->_refs[ $wrapper->getReference() ]);\n return false;\n }\n return true;\n });\n }", "title": "" }, { "docid": "a52497367df0600687e2b81cda386d15", "score": "0.4527192", "text": "function removePermission($inPermission) {\n\t\treturn $this->_removeItemWithValue($inPermission);\n\t}", "title": "" }, { "docid": "420904f26ee991400ef56b7a33f8c7e3", "score": "0.45266932", "text": "public function testUnsettingItem()\n {\n $this->collection->add('foo', 'bar');\n unset($this->collection['foo']);\n $this->assertEquals(null, $this->collection['foo']);\n }", "title": "" }, { "docid": "5b9bc35d2617782d6d87b3eba8fc3734", "score": "0.4523477", "text": "public function removeLast();", "title": "" }, { "docid": "d57c0399bd158093354d7449442c675c", "score": "0.45170662", "text": "public function remove($name) {\n if (isset($this->data[$name])) unset($this->data[$name]);\n }", "title": "" }, { "docid": "097520e074638b127f86f41c9c6f8e8e", "score": "0.4514069", "text": "public function __destruct() {\n unset($this->data);\n }", "title": "" }, { "docid": "ba219c8f235e3d9c1d7615b76bd9681d", "score": "0.45131865", "text": "public function remove()\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "c89c8a979ba71ece20fac4d2bb3a59a1", "score": "0.45125994", "text": "public function offsetUnset($option)\n {\n return $this->removeOption($option);\n }", "title": "" }, { "docid": "8c4231b88b8778dc30515cf49704564b", "score": "0.4507193", "text": "public static function off($event)\n {\n return self::removeEvent($event);\n }", "title": "" }, { "docid": "114d50291ee2d1cf6869a991c0eb1ac5", "score": "0.45022717", "text": "public function removeAllExcept ($storage) {}", "title": "" }, { "docid": "bef955a1de99d9c9d2f8c9307fe2efb9", "score": "0.4498776", "text": "public function __destruct() {\n\t\tif ( $this->sub_converter ) {\n\t\t\tunset( $this->sub_converter );\n\t\t}\n\t\tResult::get_result()->add( '</ul>' );\n\t}", "title": "" }, { "docid": "964c5cac5f772923495d9b2c5f49897c", "score": "0.44985923", "text": "public function remove_capteur_to_room() {\n $this->id_piece = -1;\n return $this->update();\n }", "title": "" }, { "docid": "13d184d2546d378fda1476b33b95b53d", "score": "0.44981754", "text": "public function __unset($attr) { return $this->set($attr, null, array('unset'=>true)); }", "title": "" }, { "docid": "0a1d52ff2a5a3119709359fe6ff69562", "score": "0.4497771", "text": "function complement($collection);", "title": "" }, { "docid": "fd116fe793b7ea30b162a329976d856e", "score": "0.44963527", "text": "public function remove($name)\n\t{\n\t\t$this->offsetUnset($name);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7df7e89aa4abc6f82766bc506517c8c2", "score": "0.4495707", "text": "public function pop() {}", "title": "" } ]
6a0777bc88b757b406503051f3b21570
Override this method to execute anything after the initialization
[ { "docid": "f3524b51d74801bc177000ddd9931b98", "score": "0.81872094", "text": "protected function postInit()\n {\n \n }", "title": "" } ]
[ { "docid": "0fd31dab61876ae6c0fd240b462a8da6", "score": "0.8245232", "text": "protected function _afterInit() : void\n {\n\n }", "title": "" }, { "docid": "b600497472054e67346847614e358f4f", "score": "0.8015052", "text": "protected function after_construction() {\n }", "title": "" }, { "docid": "5808b10a3d9644d5f4fb0df23fd70f68", "score": "0.7557968", "text": "function PostInit()\n {\n parent::PostInit();\n }", "title": "" }, { "docid": "5808b10a3d9644d5f4fb0df23fd70f68", "score": "0.7557968", "text": "function PostInit()\n {\n parent::PostInit();\n }", "title": "" }, { "docid": "17b39e7fb8009ec77382eacb9eca8887", "score": "0.7432797", "text": "function PostInit()\n {\n }", "title": "" }, { "docid": "17b39e7fb8009ec77382eacb9eca8887", "score": "0.7432797", "text": "function PostInit()\n {\n }", "title": "" }, { "docid": "49b2a57b3aa7dc45351669baf7e75dfc", "score": "0.7323441", "text": "protected function after_run() {\n\t}", "title": "" }, { "docid": "e8773c6fd019b52057820c29923f3cf7", "score": "0.7315018", "text": "public function post_run(){\n //Leave empty in the library\n }", "title": "" }, { "docid": "cef750408e7d1d68dba15adfcbfcd516", "score": "0.72826153", "text": "protected function after_creation() {\n }", "title": "" }, { "docid": "b8d647871ac9763dd0f5dbde40dea9a0", "score": "0.7265629", "text": "protected function __onInit(): void\n\t{\n\t}", "title": "" }, { "docid": "a16ee56261b983950b750f4517735496", "score": "0.7255818", "text": "protected function _postStartup()\n {\n }", "title": "" }, { "docid": "c81c122955d488148afa5262a5422427", "score": "0.7220563", "text": "protected function afterLoad()\n\t{\n\t}", "title": "" }, { "docid": "607a8b21f2ca053fc137e9fd2f1583a4", "score": "0.7212437", "text": "public function afterConstruct() {\n\n }", "title": "" }, { "docid": "6fda583db6a4264a58b2b10dfdbdfcf1", "score": "0.7168375", "text": "protected function INITIALIZE()\n {\n\n }", "title": "" }, { "docid": "df5f3b72867b85e3fa8772e2c5c104d0", "score": "0.71656245", "text": "public function init()\n {\n // method called before any other\n }", "title": "" }, { "docid": "726bc13402637ffbd9e9373aa3234595", "score": "0.70816314", "text": "public function after()\n\t{\n\t\t// Run anything that needs to run after this.\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "b984bb9161aaa444ce476baf7241d4b9", "score": "0.70607346", "text": "public function init() {\n\t\tparent::init();\n\t\t$this->afterRestore();\n\t}", "title": "" }, { "docid": "e2c54d504931e33d4754217507afa06d", "score": "0.7057812", "text": "protected function postSetup() {}", "title": "" }, { "docid": "98ac38bda32ab72e1f3ac1982a95a463", "score": "0.70329434", "text": "protected function after()\n\t{\n\t\t// Nothing by default\n\t}", "title": "" }, { "docid": "bceab16a3f35208487c06ca0af7d7b52", "score": "0.7024894", "text": "protected function init() {\n $this->load();\n }", "title": "" }, { "docid": "8d47858e0764ed52cf9a88bee072e117", "score": "0.7020443", "text": "public function onAfterInitialise()\n\t{\n\t\t// Databases initialized\n\t}", "title": "" }, { "docid": "86cfb019aaa6160c1a4992b262b98b8f", "score": "0.70164776", "text": "public function onLoad() {\r\n\t\techo 'initialised';\r\n\t}", "title": "" }, { "docid": "971ca6fcbae0556534b5943eaed5c56d", "score": "0.70156336", "text": "protected function afterLoad(){\n\n\t}", "title": "" }, { "docid": "5e74c5cee42e8dc68dfa832ad8b374fc", "score": "0.7002819", "text": "public function after()\n\t{\n\t\t// New things go here:\n\n\t\t// Run anything that needs to run after this.\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "138c59558ddfb98c482064365e3db4f2", "score": "0.6995809", "text": "public function exp_onInit()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.6994444", "text": "protected function initialize() {}", "title": "" }, { "docid": "5faa048623a2f6d156307dc1c41cc30e", "score": "0.6970691", "text": "protected function _init()\n {\n $this->init();\n }", "title": "" }, { "docid": "bfc60ddb34d41a565062b4986acd8c07", "score": "0.6965893", "text": "public function on_init_own()\n {\n // This is overriden in context-specific classes\n }", "title": "" }, { "docid": "c1836c7d4e9e065d5a12edd9870088b4", "score": "0.6952454", "text": "protected function doInit()\n {\n }", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.6939576", "text": "protected function after(){}", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.6939576", "text": "protected function after(){}", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.6939576", "text": "protected function after(){}", "title": "" }, { "docid": "cbd0f89b64e8805f78b313b88abc7a2c", "score": "0.6908031", "text": "protected function _init () { /* Implement me. */ }", "title": "" }, { "docid": "492a9c1c3ee3b1981791e794c46b36c7", "score": "0.69052553", "text": "protected function after()\n {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6894168", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6894168", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6894168", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.6894168", "text": "protected function init() {}", "title": "" }, { "docid": "61858e908850bf7de60f2ee1e10351cc", "score": "0.68823", "text": "protected function initialize()\n {\n }", "title": "" }, { "docid": "61858e908850bf7de60f2ee1e10351cc", "score": "0.68823", "text": "protected function initialize()\n {\n }", "title": "" }, { "docid": "ddee5108542b9b6817d603fe96afc85a", "score": "0.6879216", "text": "protected function init() {\n\t\n }", "title": "" }, { "docid": "7aac48e556d9dc1cc00f48d06ff444ed", "score": "0.6878909", "text": "public function postLoad() {}", "title": "" }, { "docid": "125e41f587ad62f32e991c07c156a736", "score": "0.6870458", "text": "public function _initialize() {\n parent::_initialize();\n }", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.68541837", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "a463f7ea2a8acc6bd3c6e66d6adb0cff", "score": "0.68541837", "text": "protected function init() {\n\t}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.68541026", "text": "protected function init(){}", "title": "" }, { "docid": "80a281e06e8905abaff0ac3db7c09b8e", "score": "0.68541026", "text": "protected function init(){}", "title": "" }, { "docid": "bb01749c18a46d0c66d6a69b668575b9", "score": "0.6853547", "text": "protected function initialize() {\n\t}", "title": "" }, { "docid": "d79c65614e68db3eec474c7313f327b9", "score": "0.68482137", "text": "public function afterLoadCaller()\n\t{\n\t\t$this->afterLoad();\n\t}", "title": "" }, { "docid": "191bf4d26dffbfff5d16c531efde1810", "score": "0.68477136", "text": "protected function _init(){ /* Implement this function in final controller */ }", "title": "" }, { "docid": "31bafc8821916ab206d237277d758b56", "score": "0.68440485", "text": "public function initialize()\n {\n // TODO: Implement initialize() method.\n }", "title": "" }, { "docid": "522adc4e0b25760f46a6a4522be3db38", "score": "0.6840649", "text": "public function init ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "99b3cabdfaa0a0f6b499afba8a1656e3", "score": "0.6837193", "text": "protected function _init()\n {\n \n }", "title": "" }, { "docid": "a4ee4ff43df9b11e43934907e6c6b479", "score": "0.68333834", "text": "protected function _init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "87d1b3ff5d5d0d3869961cbd3ee8ece9", "score": "0.68016833", "text": "public function init() {\n }", "title": "" }, { "docid": "013b5d2b99bc319967b442888c668b8a", "score": "0.6798572", "text": "public function init()\n {\n \t\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "c2d5a5b2c37e00663f4b2a2c49b2ff11", "score": "0.6787918", "text": "protected function init()\n {\n }", "title": "" }, { "docid": "6c8ed1edf47afaab2af2eefd6bb2bc4d", "score": "0.67799145", "text": "protected function initialize() {\n\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.6776425", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.6776425", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "d4597f53705403274f5a06a57062ddb4", "score": "0.6776425", "text": "protected function init()\n {\n\n }", "title": "" }, { "docid": "e165abfeab90abbd63dbad721ddf08be", "score": "0.6767983", "text": "protected function init() {\n\n }", "title": "" }, { "docid": "2c1091505b59ab13378f989153cb7715", "score": "0.6764966", "text": "public function initialize()\n\t{\n\t\t/* NOOP */\n\t}", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.6762582", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.6762582", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.6762582", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.6762582", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "ccdfd7908044a1b9d157471c3d29e9f6", "score": "0.6762582", "text": "protected function after()\n {\n }", "title": "" }, { "docid": "122468c71b97752091ef8a50d5b13aa1", "score": "0.675961", "text": "public function postBootstrapInit(){}", "title": "" }, { "docid": "d97f871a83d84ed0eb30d30b672ab85b", "score": "0.6753569", "text": "public function initialize() {\n \n }", "title": "" }, { "docid": "203c66b4705f2d77d74754ec5727cab7", "score": "0.6746775", "text": "public function init()\n {\n \treturn;\n }", "title": "" }, { "docid": "74b601774b4686e91e59e68cd7051e28", "score": "0.67418647", "text": "public function initialize()\r\n {\r\n }", "title": "" }, { "docid": "749255fe0b71c6b432eabc5bb1606a57", "score": "0.67395085", "text": "public static function after_controller_constructor(){\n }", "title": "" }, { "docid": "8c8ebdb0a9ab13a56aa2bfc5a2df6db4", "score": "0.6737564", "text": "public function init_hook()\n {\n\n $this->filemaker = new FileMaker();\n\n if (is_callable($this->after_init_callback)) {\n call_user_func($this->after_init_callback);\n }\n }", "title": "" }, { "docid": "3605041a9b039df9fc1838aebc05c380", "score": "0.6737405", "text": "public function init()\r\n {\r\n\t\t\r\n }", "title": "" }, { "docid": "907f7237bf5f797415ddffd263978886", "score": "0.6736485", "text": "public function init(){\n\t\t\t\n\t\t\t//$this->(); \n\t\t\t \n\t\t}", "title": "" }, { "docid": "34e9af9bbd720122a9036b770ce0ce27", "score": "0.67358994", "text": "public function after()\n\t{\n\n\t}", "title": "" }, { "docid": "02e7062ef7ab7d3167f60c10e55eacc3", "score": "0.67353886", "text": "public function after() {}", "title": "" }, { "docid": "faa60ee5f41b60f0545c339d7ed72582", "score": "0.6727516", "text": "public function init()\n\t{\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "297083b430616b1d2990a01260528dac", "score": "0.672224", "text": "public function init() {\n\t\t\n\t\t\n }", "title": "" }, { "docid": "01069025b26003837bd6d8e438a09591", "score": "0.6719681", "text": "public function init() {\n \n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.6715913", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "0d6412e1a142a2869baa761ad1798235", "score": "0.6715272", "text": "public function startup()\n {\n\n parent::startup();\n }", "title": "" }, { "docid": "866aa01b33d8babe6becc949d71938a8", "score": "0.67132694", "text": "public function init() {\n\n\t\t\t$this->register_hook_callbacks();\n\t\t}", "title": "" }, { "docid": "2e327aa70ebb4a0192ae6b7dc879fc89", "score": "0.6707884", "text": "public function initialize()\r\n {\r\n \r\n }", "title": "" }, { "docid": "2b0508779a7e8bd404e08d0499028499", "score": "0.6698617", "text": "public function after() {\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "25e3884c72a7f4cb072fbf4c2bc0b257", "score": "0.669614", "text": "public function init() {\n \n }", "title": "" }, { "docid": "c4e31dafd03c0aad42bab59a35bec2b7", "score": "0.6688968", "text": "protected function postInitialize()\n {\n // Disable caching by default.\n $this->view->setCaching(Zikula_View::CACHE_DISABLED);\n }", "title": "" }, { "docid": "a2d8deba08a6b86b019bd8f241b8b8d1", "score": "0.6686193", "text": "public function init() {\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "1182ee2f1e2e3fa4976c97c5a5e395ec", "score": "0.66843104", "text": "public function _initialize()\n {\n }", "title": "" }, { "docid": "a6e07b8988157fa45ecb0b1406194e88", "score": "0.66784865", "text": "protected function initialize();", "title": "" }, { "docid": "06b9df18e0620ae0a915fd38813c43fa", "score": "0.6678389", "text": "public function init() {\r\n }", "title": "" }, { "docid": "5770244757619e5d3e6b25f4032c1727", "score": "0.6672061", "text": "public function init()\n {\n //\n }", "title": "" }, { "docid": "7f9ce0b9e6ac7d88f15a659f8fe15ac3", "score": "0.66693807", "text": "public function init()\n\t{\n\t parent::init();\n\t}", "title": "" }, { "docid": "cef02c100025e8adda973f3584a39d56", "score": "0.6665915", "text": "protected function initialize() {\n parent::initialize();\n }", "title": "" } ]
c31a233d68ab02a4d9565f5a30600fd0
Alias for the '_show_block'.
[ { "docid": "ff8f1a10504d9ddf18143c60a6a68441", "score": "0.78326607", "text": "public function show_block($params = [])\n {\n return $this->_show_block($params);\n }", "title": "" } ]
[ { "docid": "c72bb97fd3f5e930b2c0dc1eb19c088d", "score": "0.7657336", "text": "public function _show_block($input = [])\n {\n return _class('core_blocks')->_show_block($input);\n }", "title": "" }, { "docid": "85a84b74f96351fa4bae2ab87f0cd3ef", "score": "0.72774136", "text": "public function viewBlockAction() {\n $blockClass = $this->getRequest()->get('block');\n $absoluteFilePath = Mage::helper('debug')->getBlockFilename($blockClass);\n\n $source = highlight_string(file_get_contents($absoluteFilePath), true);\n\n $content = $this->_debugPanel(\"Block Source: <code>{$blockClass}</code>\", $source);\n $this->getResponse()->setBody($content);\n }", "title": "" }, { "docid": "4da52759b36e598135cc4558564a7411", "score": "0.7207654", "text": "function COM_showBlock( $name, $help='', $title='', $position='' )\n{\n global $_CONF, $topic, $_TABLES, $_USER;\n\n $retval = '';\n\n if( !isset( $_USER['noboxes'] ))\n {\n if( !COM_isAnonUser() )\n {\n $_USER['noboxes'] = DB_getItem( $_TABLES['userindex'], 'noboxes',\n \"uid = {$_USER['uid']}\" );\n }\n else\n {\n $_USER['noboxes'] = 0;\n }\n }\n\n switch( $name )\n {\n case 'user_block':\n $retval .= COM_userMenu( $help,$title, $position );\n break;\n\n case 'admin_block':\n $retval .= COM_adminMenu( $help,$title, $position );\n break;\n\n case 'section_block':\n $retval .= COM_startBlock( $title, $help,\n COM_getBlockTemplate( $name, 'header', $position ))\n . COM_showTopics( $topic )\n . COM_endBlock( COM_getBlockTemplate( $name, 'footer', $position ));\n break;\n\n case 'whats_new_block':\n if( !$_USER['noboxes'] )\n {\n $retval .= COM_whatsNewBlock( $help, $title, $position );\n }\n break;\n }\n\n return $retval;\n}", "title": "" }, { "docid": "0119112fc44bd36ae5fe3949de20ef96", "score": "0.6861479", "text": "public function show(Blocklist $blocklist)\n {\n //\n }", "title": "" }, { "docid": "25143bf34e3af9d8a5f76f5b9292dc0a", "score": "0.6709463", "text": "function show_blocks()\n {\n ?>\n <script type=\"text/javascript\">\n jQuery('h2.retailcrm_hidden').hover().css({\n 'cursor':'pointer',\n 'width':'310px'\n });\n jQuery('h2.retailcrm_hidden').bind(\n 'click',\n function() {\n if(jQuery(this).next('table.form-table').is(\":hidden\")) {\n jQuery(this).next('table.form-table').show(100);\n jQuery(this).find('span').html('&#11014;');\n } else {\n jQuery(this).next('table.form-table').hide(100);\n jQuery(this).find('span').html('&#11015;');\n }\n }\n );\n </script>\n <?php\n }", "title": "" }, { "docid": "b2690e4d6629410833e71950e01ddfde", "score": "0.66199934", "text": "public static function mentorz_show_block()\n {\n\n //Delete a message if youre an admin\n if ( current_user_can( 'manage_options' ) && isset( $_GET['mz_msg_del'] ) ) {\n mz_Func::delete_message( $_GET['mz_msg_del'] );\n } else {\n\n //First check we have a message to show\n if ( isset( $_GET['mz_msg'] ) ){\n\n $message = mz_Generator::get_message( $_GET['mz_msg'] );\n\n //Clean up my date\n $stamp = date('jS M Y h:i a' , strtotime( $message['stamp'] ) );\n\n //Get the info about the sender\n $messagefrom = mz_Func::get_users_display_name( $message['messagefrom'] );\n\n echo '<section class=\"mz_show_page\">';\n\n $replyURL = add_query_arg( array( 'mz_msg_recipient' => $message['messagefrom'] , 'mz_msg_subject' => $message['subject'] ) , get_site_url().'/'.PLUGIN_CREATE_PAGE. '/' );\n\n echo '<a href=\"'.$replyURL.'\" class=\"mz_button\">Reply</a>';\n\n\n echo '<p><strong>Message Sent: </strong>'.$stamp.'</p>';\n echo '<p><strong>Message From: </strong>'.$messagefrom.'</p>';\n echo '<p><strong>Subject: </strong>'.$message['subject'].'</p>';\n echo '<p><strong>Body: </strong>'.$message['body'].'</p>';\n\n echo '</section>';\n\n\n } else {\n\n echo '<h3>No message selected</h3>';\n echo '<p><a href=\"'.get_site_url( null , 'inbox' ).'\">Go to inbox</a></p>';\n\n }\n\n }\n\n\n\n\n }", "title": "" }, { "docid": "88ea4bf925f95d2cbfa39293a99017b9", "score": "0.65533763", "text": "function show() {\n }", "title": "" }, { "docid": "65ac3369b6cb564121be94998e76e50f", "score": "0.64800465", "text": "public function actionView(){\n\t\t$model = $this->loadModel('Block');\n\t\t$this->render('viewBlock', array('model' => $model));\n\t}", "title": "" }, { "docid": "9902007baad29e25ff204fdc76878a5d", "score": "0.6467919", "text": "public function getBlock()\n\t{\n\t\t$output\t\t= '';\n\n\t\t/* Loop through the dashboard extensions in the specified application */\n\t\tforeach( \\IPS\\Application::load( \\IPS\\Request::i()->appKey )->extensions( 'core', 'Dashboard', 'core' ) as $key => $_extension )\n\t\t{\n\t\t\tif( \\IPS\\Request::i()->appKey . '_' . $key == \\IPS\\Request::i()->blockKey )\n\t\t\t{\n\t\t\t\tif( method_exists( $_extension, 'getBlock' ) )\n\t\t\t\t{\n\t\t\t\t\t$output\t= $_extension->getBlock();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t\\IPS\\Output::i()->output\t= $output;\n\t}", "title": "" }, { "docid": "eb14323488eb257f88819e9bb09d45f3", "score": "0.64615375", "text": "public static function show()\n {\n }", "title": "" }, { "docid": "0c41502f62d0a3bb1fd89354d3751849", "score": "0.6411521", "text": "public function blockAction($block)\n {\n return $this->render('block/demo_action_block.html.twig', [\n 'block' => $block,\n ]);\n }", "title": "" }, { "docid": "7b0719445f4819d0e4d928b8f8fff5d6", "score": "0.64084864", "text": "function _print_one_block ($block_name, $align = \"\")\n {\n global $vnT, $conf, $DB, $input;\n $file_name = \"blocks/\" . $block_name . \"/block_\" . $block_name . \".php\";\n if (file_exists($file_name)) {\n $class_name = \"block_\" . $block_name;\n if (! class_exists($class_name)) {\n $vnT->load_language($block_name, \"blocks\");\n include $file_name;\n }\n }\n $this->title = $vnT_Block->get_title();\n $this->content = $vnT_Block->get_content();\n if ($this->title == NULL) {\n return $this->content;\n } else {\n $nd['f_title'] = $this->title;\n $nd['content'] = $this->content;\n $vnT->skin_box->assign(\"data\", $nd);\n if ($align) {\n $vnT->skin_box->reset(\"box_\" . $align);\n $vnT->skin_box->parse(\"box_\" . $align);\n return $vnT->skin_box->text(\"box_\" . $align);\n } else {\n $vnT->skin_box->reset(\"box\");\n $vnT->skin_box->parse(\"box\");\n return $vnT->skin_box->text(\"box\");\n }\n }\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.63746274", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.63732356", "text": "public function show(){}", "title": "" }, { "docid": "b5f790b960b2034f6e78c6415575fcf4", "score": "0.6351578", "text": "public function show()\n {\n return 'show';\n }", "title": "" }, { "docid": "7af6dc5f5a180ee24e548a14bb9caaab", "score": "0.6337416", "text": "public function preview_block() {\n\n\t\t$id = $_POST['id'];\n\t\t$document = $_POST['document'];\n\n\t\t$block = Cortex::get_block($document, $id);\n\n\t\tif ($block == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t$block->preview();\n\t\texit;\n\t}", "title": "" }, { "docid": "c5d496bec14d76d47ee0a1e91a6773a2", "score": "0.63304424", "text": "public static function show()\n {\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.63301915", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.63301915", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "8f649c8bfadc458e13dcb382eee73a2d", "score": "0.63127756", "text": "public function show_center()\n {\n return _class('core_blocks')->show_center();\n }", "title": "" }, { "docid": "4113966ff2672798966a084bb48940d9", "score": "0.62882185", "text": "public function show()\n {\n # code...\n }", "title": "" }, { "docid": "f164f00674a6155972b5134fab269495", "score": "0.6274708", "text": "public function show()\r\n {\r\n \r\n }", "title": "" }, { "docid": "70c9f17fdc8fcff816c7f0f83c71cac9", "score": "0.6273566", "text": "public function getBlock ()\r\n {\r\n return $this->block;\r\n }", "title": "" }, { "docid": "aa20b840bd2af3efbba1dd78d5331ff8", "score": "0.62729466", "text": "abstract public function show();", "title": "" }, { "docid": "7b6c1862780f06160470fb5efaeace00", "score": "0.6249559", "text": "public function show() {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62383527", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62383527", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62383527", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62383527", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.62383527", "text": "public function show()\n {\n }", "title": "" }, { "docid": "65454a4c24991511838ee5f572e6b4c9", "score": "0.6232715", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "37add6283bc5fec14ba688f028edae5d", "score": "0.6227372", "text": "public function show() {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "429b03f6e46b42c2adcb681c9105301f", "score": "0.62046313", "text": "public function showAction()\n {\n if ($this->showSnippets) {\n $params = $this->_processParameters($this->showParameters);\n\n $this->addSnippets($this->showSnippets, $params);\n }\n }", "title": "" }, { "docid": "f70abfe2640415c4519b11d2e7f73215", "score": "0.6195415", "text": "public function show(Block $block)\n {\n $block->load('classrooms.type');\n return view('pages.admin.salas.blocos.ver-bloco', compact('block'));\n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.6160779", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.6160779", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.6160779", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "e66b56efa18cd014d88107efb3f2354b", "score": "0.6157778", "text": "public function block($block, $vars = array(), $return = TRUE)\n\t{\n\t\t$view = '_blocks/'.$block;\n\t\treturn $this->view($view, $vars, $return);\n\t}", "title": "" }, { "docid": "db9ffcd740f560b0bd2d632049b27b29", "score": "0.61373246", "text": "public function displayBlock()\n {\n $this->context->smarty->assign(\n array(\n 'updateNotif' => $this\n )\n );\n\n return $this->module->display(\n $this->module->name,\n 'views/templates/hook/updateNotif.tpl'\n );\n }", "title": "" }, { "docid": "db750b3e511e63d406ae28df64eaaebe", "score": "0.613058", "text": "public function show()\n {\n }", "title": "" }, { "docid": "854df3b1a36e7ff889b3b0c2a6831bbe", "score": "0.6119788", "text": "public function show()\n {\n\n \n }", "title": "" }, { "docid": "8311aad998cb038d90070e2d530c81f6", "score": "0.6109768", "text": "public function with($block);", "title": "" }, { "docid": "5195070a6f9ada39136926897a40c417", "score": "0.61091775", "text": "public function show(){\n }", "title": "" }, { "docid": "3526b38ac52dbd9ac841b681003689bb", "score": "0.6100807", "text": "function render_block( $attributes, $content ) {\n\treturn do_shortcode( $content );\n}", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "c63f5265dbf55da86cd1d1e76ce33f28", "score": "0.6097685", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "e928f1aa8febf90d42461f04cacdcb06", "score": "0.60528356", "text": "public function show()\n {\n\n }", "title": "" }, { "docid": "c0abb3274ba6ba638880392d6df32e45", "score": "0.6039105", "text": "public function getBlock()\n {\n return $this->_block;\n }", "title": "" }, { "docid": "2a85d71af4062e475974962b9eab27b2", "score": "0.60348314", "text": "public function show(BlockRequest $request, Block $block)\n {\n Form::populate($block);\n\n return $this->theme->of('block::user.block.show', compact('block'))->render();\n }", "title": "" }, { "docid": "ba1468ad785a9f3f67a880e7586b7aed", "score": "0.601884", "text": "public function show()\n { \n }", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.6012457", "text": "public function show();", "title": "" }, { "docid": "199d4abcf65483361bdc32dc5353f244", "score": "0.6012457", "text": "public function show();", "title": "" }, { "docid": "33c576bcbff028889f92a3cfd83eaa25", "score": "0.60030156", "text": "public function getName()\n {\n return 'site_block';\n }", "title": "" }, { "docid": "86a9bcc8e2166384b96c6420de9a3a7c", "score": "0.5999247", "text": "public function render(/**\n * Filters the content of a single block.\n *\n * @since 5.0.0\n *\n * @param string $block_content The block content about to be appended.\n * @param array $block The full block, including name and attributes.\n */\n$options = array( )) {}", "title": "" }, { "docid": "4ebd0eba4f44156a2bea74633463ac1c", "score": "0.59941083", "text": "public function show()\n {\n\n\n }", "title": "" }, { "docid": "396bab1ed8c01fa17e38d8c870bd62fa", "score": "0.5984009", "text": "public function canShowBlock()\n {\n if ($this->config->getType() === Config::FASTLY && $this->config->isEnabled()) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "235d4b9dd4f676738a23a9dacb7b7976", "score": "0.5959909", "text": "function COM_showBlocks( $side, $topic='', $name='all' )\n{\n global $_CONF, $_TABLES, $_USER, $LANG21, $topic, $page;\n\n $retval = '';\n\n // Get user preferences on blocks\n if( !isset( $_USER['noboxes'] ) || !isset( $_USER['boxes'] ))\n {\n if( !COM_isAnonUser() )\n {\n $result = DB_query( \"SELECT boxes,noboxes FROM {$_TABLES['userindex']} \"\n .\"WHERE uid = '{$_USER['uid']}'\" );\n list($_USER['boxes'], $_USER['noboxes']) = DB_fetchArray( $result );\n }\n else\n {\n $_USER['boxes'] = '';\n $_USER['noboxes'] = 0;\n }\n }\n\n $blocksql['mssql'] = \"SELECT bid, is_enabled, name, type, title, tid, blockorder, cast(content as text) as content, \";\n $blocksql['mssql'] .= \"rdfurl, rdfupdated, rdflimit, onleft, phpblockfn, help, owner_id, \";\n $blocksql['mssql'] .= \"group_id, perm_owner, perm_group, perm_members, perm_anon, allow_autotags,UNIX_TIMESTAMP(rdfupdated) AS date \";\n\n $blocksql['mysql'] = \"SELECT *,UNIX_TIMESTAMP(rdfupdated) AS date \";\n\n $commonsql = \"FROM {$_TABLES['blocks']} WHERE is_enabled = 1\";\n\n if( $side == 'left' )\n {\n $commonsql .= \" AND onleft = 1\";\n }\n else\n {\n $commonsql .= \" AND onleft = 0\";\n }\n\n if( !empty( $topic ))\n {\n $commonsql .= \" AND (tid = '$topic' OR tid = 'all')\";\n }\n else\n {\n if( COM_onFrontpage() )\n {\n $commonsql .= \" AND (tid = 'homeonly' OR tid = 'all')\";\n }\n else\n {\n $commonsql .= \" AND (tid = 'all')\";\n }\n }\n\n if( !empty( $_USER['boxes'] ))\n {\n $BOXES = str_replace( ' ', ',', $_USER['boxes'] );\n\n $commonsql .= \" AND (bid NOT IN ($BOXES) OR bid = '-1')\";\n }\n\n $commonsql .= ' ORDER BY blockorder,title ASC';\n\n $blocksql['mysql'] .= $commonsql;\n $blocksql['mssql'] .= $commonsql;\n $result = DB_query( $blocksql );\n $nrows = DB_numRows( $result );\n\n // convert result set to an array of associated arrays\n $blocks = array();\n for( $i = 0; $i < $nrows; $i++ )\n {\n $blocks[] = DB_fetchArray( $result );\n }\n\n // Check and see if any plugins have blocks to show\n $pluginBlocks = PLG_getBlocks( $side, $topic, $name );\n $blocks = array_merge( $blocks, $pluginBlocks );\n\n // sort the resulting array by block order\n $column = 'blockorder';\n $sortedBlocks = $blocks;\n $num_sortedBlocks = sizeof( $sortedBlocks );\n for( $i = 0; $i < $num_sortedBlocks - 1; $i++ )\n {\n for( $j = 0; $j < $num_sortedBlocks - 1 - $i; $j++ )\n {\n if( $sortedBlocks[$j][$column] > $sortedBlocks[$j+1][$column] )\n {\n $tmp = $sortedBlocks[$j];\n $sortedBlocks[$j] = $sortedBlocks[$j + 1];\n $sortedBlocks[$j + 1] = $tmp;\n }\n }\n }\n $blocks = $sortedBlocks;\n\n // Loop though resulting sorted array and pass associative arrays\n // to COM_formatBlock\n foreach( $blocks as $A )\n {\n if( $A['type'] == 'dynamic' or SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon'] ) > 0 )\n {\n $retval .= COM_formatBlock( $A, $_USER['noboxes'] );\n }\n }\n\n return $retval;\n}", "title": "" }, { "docid": "d94eb46c8f0f5d30ebf49093d0f02d4c", "score": "0.59508246", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "d94eb46c8f0f5d30ebf49093d0f02d4c", "score": "0.59508246", "text": "public function show()\n {\n //\n }", "title": "" }, { "docid": "e842bb8758e2e1ed92e9cc64bb2a95bb", "score": "0.5941938", "text": "public function toString()\n {\n return 'Sample block for downloadable product on front-end is visible.';\n }", "title": "" }, { "docid": "963fda2c9bdbfaac433798db844defbd", "score": "0.5915547", "text": "public function show()\n {\n return true;\n }", "title": "" }, { "docid": "04d311ca36f9c022c5c12342a0fca7c3", "score": "0.5907849", "text": "public function render_block( $attributes = array() ) {\n\t\t\tif ( is_user_logged_in() ) {\n\n\t\t\t\t$shortcode_params_str = '';\n\t\t\t\tforeach ( $attributes as $key => $val ) {\n\t\t\t\t\tif ( ( empty( $key ) ) || ( is_null( $val ) ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( 'preview_show' === $key ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( 'preview_show' === $key ) {\n\t\t\t\t\t\tif ( empty( $val ) ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( ( isset( $attributes['preview_show'] ) ) && ( true === $attributes['preview_show'] ) ) {\n\t\t\t\t\t\t\t$key = str_replace( 'preview_', '', $key );\n\t\t\t\t\t\t\t$val = intval( $val );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( empty( $val ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$shortcode_params_str .= ' ' . $key . '=\"' . esc_attr( $val ) . '\"';\n\t\t\t\t}\n\n\t\t\t\t$shortcode_params_str = '[' . $this->shortcode_slug . $shortcode_params_str . ']';\n\t\t\t\t$shortcode_out = do_shortcode( $shortcode_params_str );\n\n\t\t\t\treturn $this->render_block_wrap( $shortcode_out );\n\t\t\t}\n\t\t\twp_die();\n\t\t}", "title": "" }, { "docid": "6ffd426b375b4c7d71f3d59c4cd98c4b", "score": "0.5903395", "text": "public function getViewBlockInformationPackage();", "title": "" }, { "docid": "aa0c52de91029b1f3365c73017058137", "score": "0.5885022", "text": "public function getShow()\n\t{\n\t\treturn $this->show;\n\t}", "title": "" }, { "docid": "aa0c52de91029b1f3365c73017058137", "score": "0.5885022", "text": "public function getShow()\n\t{\n\t\treturn $this->show;\n\t}", "title": "" }, { "docid": "5473902e2c7da0fff454ed736cd7e347", "score": "0.58814657", "text": "public function get_show()\n {\n }", "title": "" }, { "docid": "d8cb4d4ca12fecdd8fbe8bb1d4986f4f", "score": "0.5875931", "text": "public function show()\n {\n //return ;\n }", "title": "" }, { "docid": "61c99030863fd8dbb6393374fa8e562b", "score": "0.5874592", "text": "public function show(PrivateShowTime $privateShowTime)\n {\n //\n }", "title": "" }, { "docid": "54dbb8568e65124389af98ed3f04a9de", "score": "0.5867249", "text": "public function show()\n {\n \n\n }", "title": "" }, { "docid": "1bdad016dfe2856e882b4f8dd40f71ab", "score": "0.5860849", "text": "public function get_block_type() {\n\t\treturn 'html';\n\t}", "title": "" }, { "docid": "06c2940b13d3f3648e30e2e0265686cf", "score": "0.58551526", "text": "function show()\n {\n parent::show();\n echo $this->title;\n }", "title": "" }, { "docid": "9389c00fe112ab36c4098d5916a0daf8", "score": "0.58550125", "text": "public function getBlock($name)\n {\n if($this->viewBlocks->hasBlock($name))\n return $this->viewBlocks->get($name);\n else\n return '';\n }", "title": "" }, { "docid": "a6495cf64dd00136868f8cbe6076913e", "score": "0.5843711", "text": "function showHiddenBlock( $title, $text, $field_name = '', $value = '' )\n\t{\n\t\t$this->showDataBlock( array(), true, $title );\n\n\t\techo '<b>' . $text . '</b>' . ( $field_name ? '<input type=\"hidden\" name=\"' . $field_name . '\" value=\"' . $value . '\"/>' : '' );\n\n\t\t$this->showDataBlock();\n\n\t}", "title": "" }, { "docid": "eaea138f7dd2810180c71fff43d52ceb", "score": "0.58423865", "text": "function show() {\r\n\t\t\treturn $this->getHtml();\r\n\t\t}", "title": "" }, { "docid": "b2c60065169a03f2b724e99c8fee9b74", "score": "0.5839779", "text": "public function actionShow()\n {\n $this->render('show');\n }", "title": "" }, { "docid": "f47d2e9783af4deacf7143b5a3b266c7", "score": "0.5837616", "text": "public function show($fol){\n \n }", "title": "" }, { "docid": "5574d8a3df6df085fdcc200c9b16cd89", "score": "0.58371127", "text": "public function block()\n {\n return $this->setRelationship('block');\n }", "title": "" }, { "docid": "9beae1aafab75d1c394d4a9236984089", "score": "0.58364135", "text": "public function beginBlock($id, $renderInPlace = false);", "title": "" }, { "docid": "bf5401d249a8f91af1bfbf8065c21a6b", "score": "0.580158", "text": "public function show(Node $node)\n {\n //\n }", "title": "" }, { "docid": "bf5401d249a8f91af1bfbf8065c21a6b", "score": "0.580158", "text": "public function show(Node $node)\n {\n //\n }", "title": "" }, { "docid": "9af2344e8d1fdc7ebe8324e65ad76ee9", "score": "0.5796123", "text": "public function block($name, $return = false)\n {\n $html = null;\n $name = '__block_'. $name;\n if (isset($this->blocks[$name]))\n $html = $this->blocks[$name];\n\n if (!$return)\n echo $html;\n else\n return $html;\n }", "title": "" }, { "docid": "000b10c758963aba24f12a6fe3a89850", "score": "0.5795065", "text": "function render_block($block)\r\n {\r\n $search_portal_block = SearchPortalBlock :: factory($this, $block);\r\n return $search_portal_block->run();\r\n }", "title": "" }, { "docid": "3e758d0bb3f2d23bd92571bd5962a88a", "score": "0.5788574", "text": "public function getIsBlock()\n {\n return true;\n }", "title": "" }, { "docid": "3e758d0bb3f2d23bd92571bd5962a88a", "score": "0.5788574", "text": "public function getIsBlock()\n {\n return true;\n }", "title": "" }, { "docid": "d1e55a9b4cf387a03a1bd86a5f67b5ad", "score": "0.57825196", "text": "protected function showed()\n {\n }", "title": "" }, { "docid": "c415e3c30062dbd514110eb7dbc21375", "score": "0.5777261", "text": "public function show(Better $better)\n {\n //\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "720c95f60f4bc0e54023ac57981e0307", "score": "0.0", "text": "public function index()\n {\n if (!Session::get('login')) {\n return redirect('auth/login')->with(['pesan' => 'Kamus harus login terlebih dahulu']);\n }\n\n $data = [\n 'judul' => 'Data Kandidat',\n 'kandidat' => Kandidat::orderBy('no_urut')->get()\n ];\n\n \n return view('kandidat/index', $data);\n }", "title": "" } ]
[ { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.77891225", "text": "public function listAction()\n {\n $this->_messenger = $this->getHelper('MessengerPigeon');\n\n\t\tif ($this->_messenger->broadcast()) {\n\t\t\t// disables the back button for 1 hop\n\t\t\t$this->_namespace->noBackButton = true;\n\t\t\t$this->_namespace->setExpirationHops(1);\n\t\t}\n\n\t\t$this->view->assign(array(\n\t\t\t\t'partialName' => sprintf(\n\t\t\t\t\t'partials/%s-list.phtml', $this->_controller),\n\t\t\t\t'controller' => $this->_controller\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * @var Svs_Controller_Action_Helper_Paginator\n\t\t */\n\t\t$this->_helper->paginator(\n $this->_service->findAll($this->_findAllCriteria),\n $this->_entriesPerPage\n );\n\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/list', null, true);\n }", "title": "" }, { "docid": "1632f74e581286fce11b428cee004b2f", "score": "0.72384894", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "ec9493ef0340397f64bb67b1aea5887e", "score": "0.71595275", "text": "public function listAction()\r\n {\r\n $modelType = $this->modelType();\r\n $this->view->items = $this->dbService->getObjects($modelType);\r\n $this->renderView($this->_request->getControllerName().'/list.php');\r\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.7078552", "text": "public function listAction() {\n $this->view->category = $this->category->full_List();\n $this->view->alert = $this->params->alert->toArray();\n $this->view->notfound = $this->params->label_not_found;\n }", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.70473844", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "a0e66c2a11450ae99c175dd520d5d27a", "score": "0.7017443", "text": "public function index()\n {\n //list\n $list = $this->model->all();\n //return list view\n return view($this->getViewFolder().\".index\",[\n 'list' => $list,\n 'properties' => $this->model->getPropertiesShow(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "9bcef73798e00117c331333c00edef00", "score": "0.69753855", "text": "public function index()\n {\n return $this->sendResponse($this->resource::collection($this->model->all()));\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.6944075", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.69046986", "text": "function index()\n\t\t{\t\n\t\t\t\t//Call show_list by default\n\t\t\t\t$this->show_list();\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b64b879e653308029c5411df996e30a5", "score": "0.68639064", "text": "public function listAll(){\n $this->render('intervention.list');\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "5959432636f2924b51d09876dd5202b6", "score": "0.68528235", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.6819029", "text": "public function show_list() {\n }", "title": "" }, { "docid": "8403a5ff042f4c677d7d939d9b2b750f", "score": "0.68169737", "text": "public function view_crud_list () {\n $this->getResponse()->setData('context', 'crud');\n if($this->getRequest()->getData('action') == 'crud_stats') {\n $this->getCrudinstance()->stats();\n } else {\n $this->getCrudinstance()->listview();\n }\n return;\n }", "title": "" }, { "docid": "01bc93b08e6ad107f9316b34bcad9511", "score": "0.68048567", "text": "public function index()\n\t{\n $resources = Resource::all();\n return View::make('resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "3389c0d5e9637b099b7cd7e20021ea55", "score": "0.67939425", "text": "public function listsAction()\n {\n // Checks authorization of users\n if (!$this->isGranted('ROLE_DATA_REPOSITORY_MANAGER')) {\n return $this->render('template/AdminOnly.html.twig');\n }\n\n $GLOBALS['pelagos']['title'] = 'Lists Available';\n return $this->render('List/Lists.html.twig');\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.67760646", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "c545ab38f5dbdba7091a7d9ce680b802", "score": "0.67675877", "text": "public function index()\n\t{\n\t\t$subResourceDetails = $this->subResourceDetailRepository->paginate(10);\n\n\t\treturn view('subResourceDetails.index')\n\t\t\t->with('subResourceDetails', $subResourceDetails);\n\t}", "title": "" }, { "docid": "6d63bb11ea8b0a8583e9363e358ff9b7", "score": "0.6752695", "text": "public function index()\n {\n\n $total = isset($this->parameters['total']) ? $this->parameters['total'] : config('awesovel')['total'];\n\n $this->data['collection'] = $this->api('HEAD', 'paginate', $total);\n\n\n return $this->view($this->operation->layout, ['items' => $this->model->getItems()]);\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.6749301", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "e7e46511a4b7697f60b99262a9448541", "score": "0.674787", "text": "public function index(){\n\n $entries = $this->paginate();\n\n $this->set(\"entries\", $entries);\n\n }", "title": "" }, { "docid": "8f58024e3cccac78c2edf40dcdf1d9b5", "score": "0.6738217", "text": "public function index()\n {\n return VideomakerResource::collection(Videomaker::orderBy('sort', 'asc')->get());\n }", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.67326105", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "82ffea34883f2d4ec003859ff27130f4", "score": "0.6717062", "text": "public function index()\n {\n // Get results\n $results = Result::orderBy('created_at', 'desc')->get();\n\n // Return collection of results as a resource\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.6711562", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "1ca180cd47a9c5ba1d48b4b6c9917a8e", "score": "0.6701197", "text": "public function index()\n {\n $resources = Ressource::orderby('created_at','DESC')->get();;\n return RessourceR::collection($resources);\n }", "title": "" }, { "docid": "443c1ed051c412c645eecf92a9792f61", "score": "0.6685732", "text": "public function listAction()\n {\n $request=$this->getRequest();\n $requestUtil=$this->getRequestUtil();\n \n $pageRequestData=$requestUtil->getPageRequestDataFrom($request);\n $dataPage=$this->getSystemUserManager()->findPageFrom($pageRequestData);\n \n return $requestUtil->defaultListJsonResponse($dataPage->getData(), $dataPage->getTotalRecords());\n }", "title": "" }, { "docid": "3e2213e2e64e6d315c5f7f2b9390d5af", "score": "0.66802585", "text": "public function index()\n {\n return $this->showAll();\n }", "title": "" }, { "docid": "d387587609cbbdf03cfc0669056e5bc7", "score": "0.66796803", "text": "public function action_list()\n\t{\n\t\t$client = Model::factory('Client');\n\t\t$rs = $client->select()\n\t\t\t//->select('id', 'name', 'email', 'phone', 'is_active')\n\t\t\t->order_by('name')\n\t\t\t->execute();\n\t\t$client_data = $rs->as_array();\n\t\t\n\t\t// Remap client data for JS lookup\n\t\t$client_details = array();\n\t\tforeach($client_data as $item) {\n\t\t\t$client_details[$item['id']] = $item;\n\t\t}\n\t\t\n\t\t$view = View::factory('client/list');\n\t\t$view->set('client_data', $client_data);\n\t\t$view->set('client_details', $client_details);\n\t\t$this->response->body($view);\n\t}", "title": "" }, { "docid": "dd7ea5bccadd522adc846631298726c5", "score": "0.6678547", "text": "public function index()\n {\n return RecordResource::collection(\n auth()->user()->records()->paginate(config('general.pagination.perPage'))\n );\n }", "title": "" }, { "docid": "bf724845d7b3ef1d4914762d244fb1ab", "score": "0.6675193", "text": "public function listAction()\n {\n $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : PostDB::LIMIT;\n $offset = isset($_GET['offset']) ? (int)$_GET['offset'] : 0;\n\n return $this->render([\n 'posts' => $this->model->fetchList($limit, $offset),\n 'limit' => $limit,\n 'offset' => $offset,\n 'totalPosts' => $this->model->count(),\n 'alert' => $this->getAlerts(['post_created', 'post_deleted', 'post_updated'])\n ]);\n }", "title": "" }, { "docid": "a8301ed92dc9170afd4b6448fca5d0f3", "score": "0.6674207", "text": "public function index()\n {\n $products = Product::paginate(100);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "1fd7963662b3e9d8e35a3c5a837bbc57", "score": "0.6667426", "text": "public function listAction()\n {\n $configName = filter_var($_GET['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n $trieurConfig = $this->getConfig($configName);\n\n $this->view->name = $configName;\n $this->view->title = isset($trieurConfig['title']) ? $trieurConfig['title'] : '';\n\n $this->view->breadCrumbs[] = [\n 'title' => $this->view->title,\n 'url' => FrontController::getCurrentUrl(),\n ];\n }", "title": "" }, { "docid": "0fe4e291e7634c2aeb63063cd376272f", "score": "0.6666447", "text": "public function index()\n {\n // $this->authorize('all', User::class);\n \n $allResources = Resource::all();\n\n $view_elements = [];\n \n $view_elements['allResources'] = $allResources; \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n \n $view = viewName('resources.all');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "333a397f407728909d14c6eb4e496493", "score": "0.664738", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:News')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:News:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.66408366", "text": "public function list() {\n //kalau HRD pusat bisa milih dari cabang mana saja\n //kalau HRD cabang cuma list document masuk yg ada di cabang doang.\n }", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.6629056", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "e4852525485e4ed47dcb985523ad108d", "score": "0.6627158", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Mae();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "728b150b646c20e91cdcb0b476ee8df4", "score": "0.6626183", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n $datagrid = $this->admin->getDatagrid();\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n if(isset($_GET['activityId'])){\n $activityId = $_GET['activityId'];\n $em = $this->getDoctrine()->getManager();\n $activity = $em->getRepository('ZesharCRMCoreBundle:Activity')->findOneBy(array('id' => $activityId));\n $activityTitle = $activity->getTitle();\n }\n\n return $this->render($this->admin->getTemplate('list'), array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n 'pageTitle' => $activityTitle ? $activityTitle : '',\n ));\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.66242784", "text": "public function indexAction() {\n $locationFieldEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('list.locationfield', 1);\n if ( empty($locationFieldEnable) ) {\n return $this->setNoRender();\n }\n\n $items_count = $this->_getParam('itemCount', 5);\n\n //GET LIST LIST FOR MOST RATED\n $this->view->listLocation = Engine_Api::_()->getDbTable('listings', 'list')->getPopularLocation($items_count);\n\n //DONT RENDER IF LIST COUNT IS ZERO\n if (!(count($this->view->listLocation) > 0)) {\n return $this->setNoRender();\n }\n\n $this->view->searchLocation = null;\n if (isset($_GET['list_location']) && !empty($_GET['list_location'])) {\n $this->view->searchLocation = $_GET['list_location'];\n\t\t}\n }", "title": "" }, { "docid": "90baaa24c8a589876a1c98f625e68458", "score": "0.6623648", "text": "public function index()\n {\n $categories = BusinessCategory::all();\n $listings = BusinessListingResource::collection(BusinessListing::all());\n return Inertia::render('Admin/BusinessListing', ['categories'=> $categories, 'listings'=>$listings]);\n }", "title": "" }, { "docid": "75a5bb13804a5d6235a9088089fdf3dc", "score": "0.6607636", "text": "public static function list()\n {\n if (isset($_POST[\"search\"])) {\n foreach ($_POST[\"search\"] as $key => $value) {\n $queryOptions[\"$key LIKE\"] = \"%$value%\";\n }\n };\n static::render(\"list\", [\n 'entities' => static::getDao()::findAll()\n ]);\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.6607086", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "ca1737541b9936d406a94bdf9aa8a617", "score": "0.65998626", "text": "public function index()\n {\n $cat = Category::paginate(10);\n\t\treturn CategoryResources::collection($cat);\n }", "title": "" }, { "docid": "9053e22130cf25ad82ec7601e536a4b4", "score": "0.65884763", "text": "public function index()\n\t{\n\t\t$subResourceDetailAudios = $this->subResourceDetailAudioRepository->paginate(10);\n\n\t\treturn view('subResourceDetailAudios.index')\n\t\t\t->with('subResourceDetailAudios', $subResourceDetailAudios);\n\t}", "title": "" }, { "docid": "c7230f7fbeb33b3a78b09ad92bcf4b13", "score": "0.6586963", "text": "public function index()\n {\n $article=Booklover::paginate(10);\n //return collection of articles as resource\n return BookloverResource::collection($article);\n }", "title": "" }, { "docid": "ad00df27d12646f83d77fce9a7bb953d", "score": "0.6586538", "text": "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n \t$em = $this->getDoctrine()->getManager();\n \t$oRepRobot = $em->getRepository('BoAdminBundle:Robot');\n\t\t$nb_tc = $oRepRobot->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$robots = $em->getRepository('BoAdminBundle:Robot')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n \treturn $this->render('robot/index.html.twig', array(\n \t\t'robots' => $robots,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"tools\",\n\t\t\t'sm'=>\"robot\",\n \t));\n }", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.65858775", "text": "public function listAction(): void\n {\n $demand = $this->getRequestArgument('demand') ?: $this->getDemand(true);\n\n // Get posts depending on demand object\n $posts = $this->getRequestArgument('posts') ?: RepositoryService::getPostRepository()->findByDemand($demand);\n\n // Set list id\n if ($demand->getListId() === 0) {\n $demand->setListId($this->contentData['uid']);\n }\n\n // Create pagination\n $itemsPerPage = $this->settings['items_per_stages'] ?: $this->settings['post']['list']['itemsPerStages'] ?: '6';\n $pagination = GeneralUtility::makeInstance(Pagination::class, $posts, $demand->getStage(), $itemsPerPage, $this->settings['max_stages']);\n\n // Pass variables to the fluid template\n $this->view->assignMultiple([\n 'pagination' => $pagination,\n 'demand' => $demand,\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "54716cd3af1f040766e6972b2709f836", "score": "0.6585739", "text": "public function index()\n {\n $lists = $this->shareRepository->lists();\n\n return $this->respond($lists , new ShareTransformer);\n }", "title": "" }, { "docid": "6a06fa8c4288da120ae96f4207dfe6a2", "score": "0.65765756", "text": "public function index()\n {\n $dummies=dummy::paginate(10);\n\n return dummyResource::collection($dummies);\n }", "title": "" }, { "docid": "1d717f725bf8e320ff8af8985fc9e146", "score": "0.6575916", "text": "public function all(){\n $products = $this->product->getProducts();\n\n $data['products'] = $products;\n\n $this->render('list', $data);\n }", "title": "" }, { "docid": "ac951f46baeea8952ab1bf72102e758d", "score": "0.6571351", "text": "public function indexAction($pageNumber)\n {\n\t$connectedUser = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $userContext = new UserContext($em, $connectedUser); // contexte utilisateur\n\n $resourceRepository = $em->getRepository('SDCoreBundle:Resource');\n\n $numberRecords = $resourceRepository->getResourcesCount($userContext->getCurrentFile());\n\n $listContext = new ListContext($em, $connectedUser, 'core', 'resource', $pageNumber, $numberRecords);\n\n $listResources = $resourceRepository->getDisplayedResources($userContext->getCurrentFile(), $listContext->getFirstRecordIndex(), $listContext->getMaxRecords());\n \n return $this->render('SDCoreBundle:Resource:index.html.twig', array(\n 'userContext' => $userContext,\n 'listContext' => $listContext,\n\t\t'listResources' => $listResources));\n }", "title": "" }, { "docid": "b7e9ea6b80279bc7feede5632a90202e", "score": "0.65709573", "text": "public function resourcesList(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Guarda todos los recursos de la base de datos en una variable.\r\n\t\t$resources = $this->resourceMapper->findAll();\r\n\t\t$this->view->setVariable(\"resources\", $resources);\r\n\t\t// Se elige la plantilla y renderiza la vista.\r\n\t\t$this->view->setLayout(\"default\");\r\n\t\t$this->view->render(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "bccc75a4abe2c6c3bd9fc15d85ca4be6", "score": "0.657009", "text": "public function listAction ()\n {\n $dbAlbums = $this->_albumsMapper->fetchAllDesc();\n $albums = array();\n foreach ($dbAlbums as $dbAlbum) {\n /* @var $dbAlbum Application_Model_Album */\n $album = array();\n $album['id'] = $dbAlbum->getId();\n $album['name'] = $dbAlbum->getName();\n $album['folder'] = $dbAlbum->getFolder();\n $path = self::GALLERY_PATH . $album['folder'];\n $counter = 0;\n if (file_exists($path)) {\n foreach (scandir($path) as $entry) {\n $entrypath = $path . '/' . $entry;\n if (! is_dir($entrypath)) {\n $finfo = new finfo();\n $fileinfo = $finfo->file($entrypath, FILEINFO_MIME_TYPE);\n if (in_array($fileinfo, $this->image_types)) {\n $counter ++;\n }\n }\n }\n }\n $album['pictures'] = $counter;\n $albums[] = $album;\n }\n $this->view->albums = $albums;\n return;\n }", "title": "" }, { "docid": "d3246fb2ff9e0523d1570475de5151d9", "score": "0.65691483", "text": "public function listing()\n {\n\n // check the acl permissions\n if( !$this->acl->access( array( 'daidalos/projects:access' ) ) )\n {\n $this->errorPage( \"Permission denied\", Response::FORBIDDEN );\n return false;\n }\n\n // check the access type\n if( !$view = $response->loadView( 'table_daidalos_projects', 'DaidalosProjects' ) )\n return false;\n\n $view->display( $this->getRequest(), $this->getFlags( $this->getRequest() ) );\n\n\n }", "title": "" }, { "docid": "81af47766ea10675d82eb09c7177c488", "score": "0.65669", "text": "public function lists()\n\t{\n\t\treturn View::make(\"loan.list\");\n\t}", "title": "" }, { "docid": "80fe37cd073c0845deb3f2f3dc56f953", "score": "0.6564314", "text": "public function _list() {\n return $this->run('list', array());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "f32df56cd8eb057e778dd688838ae6e1", "score": "0.6558956", "text": "public function index() {\n $fds = FactoryDevice::paginate(50);\n return FactoryDeviceResource::collection($fds);\n }", "title": "" }, { "docid": "2d830a7f9271146c892f5525ff06cba8", "score": "0.6546971", "text": "public function index()\n {\n save_resource_url();\n //$items = VideoRecordPlaylist::with(['category', 'photos'])->get();\n $items = VideoRecordPlaylist::all();\n\n return $this->view('video_records.playlists.index', compact('items'));\n }", "title": "" }, { "docid": "592ef21e8cf01343d8f7bf69f6571783", "score": "0.65467274", "text": "public function listAction() {\n\ttry {\n\t\t$page = new Knowledgeroot_Page($this->_getParam('id'));\n\t} catch(Exception $e) {\n\t\t// redirect to homepage on error\n\t\t$this->_redirect('');\n\t}\n\n\t$contents = Knowledgeroot_Content::getContents($page);\n\t$files = array();\n\n\t// get files for each content\n\tforeach($contents as $value) {\n\t $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));\n\t}\n\n\t// set page for view\n\t$this->view->id = $page->getId();\n\t$this->view->title = $page->getName();\n\t$this->view->subtitle = $page->getSubtitle();\n\t$this->view->description = $page->getDescription();\n\t$this->view->contentcollapse = $page->getContentCollapse();\n\t$this->view->showpagedescription = $page->getShowContentDescription();\n\t$this->view->showtableofcontent = $page->getShowTableOfContent();\n\n\t// set contents for view\n\t$this->view->contents = $contents;\n\n\t// set files for view\n\t$this->view->files = $files;\n }", "title": "" }, { "docid": "ec0437b332d8ab59b1dc12514564cf24", "score": "0.65349644", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository(Collection::class)->findAll();\n\n return $this->render('CollectionBundle::index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "e28f7ac3556efbf46ef07a458594e0f4", "score": "0.6534658", "text": "public function listView()\r\n {\r\n $todosResults = $this->AdminToDoModel->getTodos();\r\n $todos = $todosResults['records'];\r\n echo json_encode(array(\r\n 'pagination' => $todosResults['pagination'],\r\n 'total_pages' => $todosResults['total_pages'],\r\n 'list' => $this->load->view('admin/todos/item', compact('todos'), TRUE),\r\n ));\r\n }", "title": "" }, { "docid": "d2551d513444995f440c040295b5f79a", "score": "0.6531914", "text": "public function listAction() {\n\t\t$newsRecords = $this->newsRepository->findList();\n\n\t\t$this->view->assign('news', $newsRecords);\n\t}", "title": "" }, { "docid": "7ff71fea74a014e23f3059d0628ca0c1", "score": "0.652987", "text": "public function index()\n {\n return view('resources/index', [\n 'categories' => ResourceCategory::all()\n ]);\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.65274894", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "13c10da740abbcd8b1714424cd80b7f0", "score": "0.6523997", "text": "public function index()\n\t{\n\t\t$tools = Tool::paginate(12);\n\n\t\treturn view( self::$prefixView . 'lists', compact('tools'));\n\t}", "title": "" }, { "docid": "8658a767a07d5f3d222e30b3461f8908", "score": "0.6519245", "text": "public function index() {\n\n\t\tself::init();\n\n\t\t$result = $this->_dbTable->paginatorCat(\n\t\t\t$this->_paginatorParams,\t\t\t\n\t\t\t$offset = $this->_list, \n\t\t\t$limit = 50,\n\t\t\t$this->_lang\n\t\t);\n\n\t\t$this->registry['layout']->sets(array(\n\t\t\t'titleMenu' => $this->translate->translate('Pages'),\n\t\t\t'content' => $this->_content.'index.phtml',\n\t\t\t'records' => $result['records'],\n\t\t\t'paginator' => $result['paginator'],\n\t\t));\t\n\t\t$this->registry['layout']->view();\t\n\t}", "title": "" }, { "docid": "b4ddd46c2382d5ddf2a44ea188de6a3b", "score": "0.6519022", "text": "public function actionIndex()\n {\n $dataProvider = (new Route())->search();\n return $this->render('index', ['dataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "116c403ea907dd01837aaf78536361f2", "score": "0.6515897", "text": "public function actionListing()\n {\n require_once Yii::app()->basePath . '/vendor/facebook-php-sdk/src/facebook.php';\n $fb = new Facebook(array(\n 'appId' => '894567207287021',\n 'secret' => 'cf43d6c081acaed16c908cac9d49bc07',\n ));\n $model = new FacebookModel();\n $customer = $model->setCustomer($fb);\n $getLikes = $model->getLikes($fb);\n $this->render('list',array('data'=>array('customer' => $customer, 'getLikes' => $getLikes)));\n }", "title": "" }, { "docid": "e3cdc4c3d9ae3aaa6a0cd5478456a58d", "score": "0.65145594", "text": "public function index()\n {\n return UnityResource::collection(Unity::paginate());\n }", "title": "" }, { "docid": "bc53de285b94ddd2a447a5820f5b4765", "score": "0.65121585", "text": "public function listing($route) {\n\t\t$this->render_view('listing', null);\n\t}", "title": "" }, { "docid": "9e06846e2f6d2e1269338eadf8e0b894", "score": "0.6510727", "text": "public function index()\n {\n $categories = Category::paginate(10);\n return CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.6510369", "text": "public function index()\n {\n $abonnes = AbonneModel::all();\n $count = AbonneModel::count();\n //$this->debug($abonnes);\n $this->render('app.abonne.listing',array(\n // faire passer les abonnes à la vue dans view/app/abonne/listing.php\n 'abonnes' => $abonnes,\n 'count' => $count\n ));\n }", "title": "" }, { "docid": "7a4839b9dce0e81aa7d22a30b5050ba1", "score": "0.65067625", "text": "public function index()\n {\n return View::make('pages.listing')->with([\n 'listings' => Listing::all()\n ]);\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6504046", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.6501504", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "8f4a27465d71a62a589ec5adaeb0986b", "score": "0.64991456", "text": "public function index()\n {\n $todos = Todo::orderBy('created_at', 'DESC')->get();\n return TodoResource::collection($todos);\n }", "title": "" }, { "docid": "dc0149898375c89e944c9a4e88c4c3a8", "score": "0.6499016", "text": "public function index()\n {\n $table = item::all();\n return view('list')->with('table', $table);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "046c051adc81c4edc84279daf9165d00", "score": "0.64961153", "text": "public function index() {\n\t\t$this->paginate = array(\n\t\t\t\t'limit' => 6,\n\t\t\t\t'order' => 'Listing.last_mod DESC'\n\t\t);\n\t\t//debug($this->params);\n\t\t$cond = $this->searchCriteria($this->params['data'], $this->params['pass'], $this->params['named']);\n\t\t$lt = $this->paginate('Listing', $cond);\n\t\t$this->getAddress($lt);\n\t\t$this->getListingPrice($lt);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('GetMapListingData', $this->GetMapListingData($lt));\n\t\t$this->set('search_title', $this->searchTitle($this->params['pass']));\n\t\t$this->set('heading', $this->pageHeading($this->params['pass']));\n\t\t$this->set('bodyClass', 'listings');\n\t\t$this->render('listings');\n\t}", "title": "" }, { "docid": "b3705b62ffca7af4878e295922e07f4b", "score": "0.6494691", "text": "public function index()\n {\n $categories = Category::all();\n\n\t\treturn CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "2acb8764426117ce1e24a4dffeca03b3", "score": "0.6488265", "text": "public function getList() {\n $pages = PageModel::getList();\n\n $this->renderView( $pages );\n }", "title": "" }, { "docid": "19401e81d482911677b86104e4316af5", "score": "0.6483004", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(5));\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.64802396", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "984e2e8264667b3d8e5fbfff39850e73", "score": "0.64776826", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('AppBundle:Book')->findAllOrderedByName();\n\n return $this->render('dashboard/listBook.html.twig', ['books' => $books]);\n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.6475312", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "221cee52eb0850b671832164d9811aa5", "score": "0.64749444", "text": "public function listAction() {\n }", "title": "" }, { "docid": "f19185733d416e8afe327cca78be3112", "score": "0.64742154", "text": "public function index()\n {\n // returns the latest inventory info and constricts the page to entries\n return Inventory::latest()->paginate(10);\n }", "title": "" }, { "docid": "548f4f0a081099012cd8664830d71f5f", "score": "0.6473625", "text": "public function index()\n {\n $books = Book::paginate(1);\n return view('admin.books.book-lists', compact('books'));\n }", "title": "" }, { "docid": "ed4ac6060cb66e23543b207ea1f66b10", "score": "0.6470538", "text": "public function index()\n {\n $shops = Shop::paginate(20);\n return ShopResource::collection($shops);\n }", "title": "" }, { "docid": "207685ef95ff8434191b610cea3c73d5", "score": "0.6470286", "text": "public function index()\n {\n $items = $this->itemService->all();\n\n return JsonResource::collection($items);\n }", "title": "" }, { "docid": "4e5084aa458aae2dccdd7bdb7ebbdaf1", "score": "0.6469868", "text": "public function indexAction() {\n $this->view->headTitle('Lista zarejestrowanych obiektów');\n $request = $this->getRequest();\n \n $qb = $this->_helper->getEm()->createQueryBuilder();\n $qb->select('c')\n ->from('\\Trendmed\\Entity\\Clinic', 'c');\n $qb->setMaxResults(50);\n $qb->setFirstResult(0);\n \n $query = $qb->getQuery();\n \n \n $paginator = new Paginator($query, $fetchJoin = true);\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "f8cb4b5b72a3f7046a46ff5e92d156e6", "score": "0.6469414", "text": "public function allAction()\n {\n /* Getting total questions number */\n $totalQuestions = Question::count();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Adding pagination */\n $paginator = new Paginator($_GET['page'] ?? 1, $this->config->per_page_user, $totalQuestions, '/questions/all?page=(:num)');\n\n /* Getting questions list */\n $questions = Question::get([\n 'offset' => $paginator->offset, \n 'limit' => $paginator->limit,\n 'order_by' => $this->sortTypeColumn,\n 'order_type' => 'DESC',\n 'current_user' => $user\n ]);\n\n /* Load view template */\n View::renderTemplate('Questions/stream.twig',[\n 'this_page' => [\n 'title' => 'All Questions',\n 'menu' => 'questions_all',\n 'url' => 'questions/all',\n 'order_name' => $this->sortTypeName,\n ],\n 'questions' => $questions,\n 'paginator' => $paginator,\n 'total_questions' => $totalQuestions,\n ]);\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" } ]
9e1caae986a3d86fb840d278ef637f98
Unsets an attribute via key. Used for ArrayAccess.
[ { "docid": "d97a1f4a716864243b8e54c2868eb97f", "score": "0.81066656", "text": "public function offsetUnset($key): void\n {\n if (isset($this->attributes[$key])) {\n unset($this->attributes[$key]);\n }\n }", "title": "" } ]
[ { "docid": "3618548722ba5349168e6b1aaccdc78f", "score": "0.8685515", "text": "public function unsetAttribute($key);", "title": "" }, { "docid": "8d9b6cfd0e993540d6a27ea561ccba51", "score": "0.83360374", "text": "public function __unset($key)\n\t{\n\t\tunset($this->attributes[$key]);\n\t}", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.8292209", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.8292209", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "774caade9697edc47a70a74e349beeaa", "score": "0.82570153", "text": "public function offsetUnset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "80152b4c779e76b9fda5fb36b0489e6d", "score": "0.8145617", "text": "public function offsetUnset($key)\n {\n $key = $this->resolveAttrKey($key);\n\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "88d2b68af18fb76fa420fc5e78134f36", "score": "0.8109251", "text": "public function resetAttribute($key);", "title": "" }, { "docid": "f590f38568b50b2e9942e8d677f9ed75", "score": "0.78929335", "text": "public function offsetUnset(mixed $key): void\n {\n $this->removeAttribute(Coercion::toString($key));\n }", "title": "" }, { "docid": "d447e06167f816ec2814214d5fa3954b", "score": "0.7782947", "text": "public function __unset($key)\n {\n $config = $this->isJsonModelAttribute($key);\n if (!$config) {\n parent::__unset($key);\n return;\n }\n Arr::forget($this->jsonModelAttributeCache, $key);\n [$type, $attribute, $attribute_key, $is_collection, $primary_key] = $config;\n if ($attribute_key) {\n $wholeAttribute = $this->{$attribute};\n unset($wholeAttribute[$attribute_key]);\n $this->{$attribute} = $wholeAttribute;\n } else {\n Arr::forget($this->attributes, $attribute);\n }\n }", "title": "" }, { "docid": "7a45e61978f0bc05187cba4e7b982353", "score": "0.76723653", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n unset($this->relations[$key]);\n }", "title": "" }, { "docid": "8ddf9d22e3340f87ff71adc99de35b29", "score": "0.7455599", "text": "public function __unset($key) {\n unset($this->data[$key]);\n $this->keys = array_keys($this->data);\n }", "title": "" }, { "docid": "7c4c3cf0a130f9c13079962b533cd28b", "score": "0.7434727", "text": "public function __unset($key)\n {\n $this->UnsetData($key);\n\t}", "title": "" }, { "docid": "00424de7dd6ee34e38d8812345721f77", "score": "0.7393391", "text": "public function __unset ($key) {\n\t\tif (isset($this->data[$key])) unset($this->data[$key]);\n\t}", "title": "" }, { "docid": "0a9ab1ff93620060c28ad2c9594cc5f9", "score": "0.7350549", "text": "public static function offsetUnset($key)\n {\n \\Cache::offsetUnset(self::getUniacid() . $key);\n }", "title": "" }, { "docid": "b8cbd9d1b4dd9d77234d3f02940c97a6", "score": "0.7331383", "text": "public function unsetInfo ($key);", "title": "" }, { "docid": "86f94087f8a371633986e0b3d488b83b", "score": "0.73282", "text": "public function __unset($key)\n\t{\n\t\tunset($this->data[$key]);\n\t}", "title": "" }, { "docid": "86f94087f8a371633986e0b3d488b83b", "score": "0.73282", "text": "public function __unset($key)\n\t{\n\t\tunset($this->data[$key]);\n\t}", "title": "" }, { "docid": "526f0ef1b8fdcc6014b8046072ffccc6", "score": "0.7310744", "text": "public function unset(string $key): void;", "title": "" }, { "docid": "0df8760a567e0a8e310181f781dcb15d", "score": "0.72877824", "text": "public function __unset( $key )\n {\n unset( $this->data[ $key ] );\n }", "title": "" }, { "docid": "f10a2ec31ee33270cac9796131f794af", "score": "0.7286187", "text": "public function __unset($key)\n {\n unset($this->_data[$key]);\n }", "title": "" }, { "docid": "ea20f5b2ae35e66e815ecb395f19248a", "score": "0.72857416", "text": "public function __unset( $key ) {\n\t\tif ( isset( $this->data[ $key ] ) ) {\n\t\t\tunset( $this->data[ $key ] );\n\t\t}\n\t}", "title": "" }, { "docid": "732b54c4a81a6ff354e09c90de3a8293", "score": "0.72736245", "text": "public function offsetUnset($key)\n {\n $this->__unset($key);\n }", "title": "" }, { "docid": "2e42f911c9874790133d9e47651b23ae", "score": "0.72623116", "text": "public function __unset($key)\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "2e42f911c9874790133d9e47651b23ae", "score": "0.72623116", "text": "public function __unset($key)\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "45b953e14cbcc149bad35b3731472313", "score": "0.7255196", "text": "public function offsetUnset($key) {\n\t\tunset($this->data[$key]);\n\t}", "title": "" }, { "docid": "c074b336a3a31087c30d3ea1bd1f146e", "score": "0.7230077", "text": "public function offsetUnset($key) {\n\t\tunset(self::$cache[$key]);\n\t\tself::$persistentCache->delete(new \\Scrivo\\Str($key));\n\t}", "title": "" }, { "docid": "16bdd267e165065edfd0ce97a057086e", "score": "0.7181168", "text": "function offsetunset($key) {\n\t\t$this->clear($key);\n\t}", "title": "" }, { "docid": "1656ec041afd9dc1f2cade60e5f29f0d", "score": "0.71682495", "text": "public function __unset( string $key )\n\t{\n\t\t$this->delete( $key );\n\t}", "title": "" }, { "docid": "01d6665d6b0916222a0c1db6453de583", "score": "0.7167732", "text": "#[\\ReturnTypeWillChange]\n\tpublic function offsetUnset($key)\n\t{\n\t\t$this->primary()->offsetUnset($key);\n\t}", "title": "" }, { "docid": "b28643f851c7090b725ff2676d81d6fc", "score": "0.7167522", "text": "public function __unset($key)\n {\n $this->offsetUnset($key);\n }", "title": "" }, { "docid": "b28643f851c7090b725ff2676d81d6fc", "score": "0.7167522", "text": "public function __unset($key)\n {\n $this->offsetUnset($key);\n }", "title": "" }, { "docid": "cec3afb31c1916a8f01e0b0681e47364", "score": "0.71662307", "text": "#[\\ReturnTypeWillChange]\n public function offsetUnset($key)\n {\n unset($this->raw_data[$key]);\n }", "title": "" }, { "docid": "45382275775352f4e7aa4d41da5bde9f", "score": "0.71582866", "text": "public function __unset(string $key): void\n {\n if ($this->isMappedDbColumn($key)) {\n return;\n }\n\n $dbColumn = $this->mapProperty($key);\n\n unset($this->attributes[$dbColumn]);\n }", "title": "" }, { "docid": "b1004edd18193754cb5ef06909cb4f6b", "score": "0.71570075", "text": "public function __unset($key)\n {\n if (isset($this->$key)) {\n unset($this->$key);\n }\n }", "title": "" }, { "docid": "e785e4850d301d200963a3f9ebd65f06", "score": "0.7133598", "text": "public function __unset($key) {\n if(array_key_exists($key, $this->_data)) {\n $this->_data[$key] = null;\n }\n }", "title": "" }, { "docid": "8a8a37dfbe47a3721143490975fda783", "score": "0.7131253", "text": "public function unsetExtra($key);", "title": "" }, { "docid": "4576fe6785c44c68de572cb260677b3a", "score": "0.70924497", "text": "public function offsetUnset($key)\n {\n \n }", "title": "" }, { "docid": "a52c532018967eee724cf1013f231955", "score": "0.7087316", "text": "public function offsetUnset($key)\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "a52c532018967eee724cf1013f231955", "score": "0.7087316", "text": "public function offsetUnset($key)\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "a52c532018967eee724cf1013f231955", "score": "0.7087316", "text": "public function offsetUnset($key)\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "f0e202fb2404feabae384634d563c981", "score": "0.70866823", "text": "#[\\ReturnTypeWillChange]\n public function offsetUnset($key)\n {\n if (Arr::accessible($this->value)) {\n unset($this->value[$key]);\n }\n }", "title": "" }, { "docid": "c3e97e5a214e025428ed924652fc1246", "score": "0.7083214", "text": "public function __unset($key)\n {\n if (isset($this->_data[$key])) {\n unset($this->_data[$key]);\n }\n }", "title": "" }, { "docid": "d3b157ad955264579a608eef7fff0b22", "score": "0.7074899", "text": "public function removeAttribute($strKey) {\r\n\t\tunset($this->tblAttributes[$strKey]);\r\n\t}", "title": "" }, { "docid": "781084aefc138392cd3db8467e75bba9", "score": "0.7070893", "text": "public function delete($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "da03f0c4b33592d9731db0b893f0f034", "score": "0.70333105", "text": "public function offsetUnset($key): void\n {\n unset($this->data[$key]);\n }", "title": "" }, { "docid": "ba8d16ce77b6b5993600b1f35d1dec6d", "score": "0.70271236", "text": "public function __unset($key) {\n unset($this->_data[$key], self::$_global_data[$key]);\n }", "title": "" }, { "docid": "e993b8770fcbb461bcb2a5ffb6cf09d4", "score": "0.69780785", "text": "public function __unset ($key) { return $this->offsetUnset($key); }", "title": "" }, { "docid": "58ea62ed6241c7e47ee7fdac9a45842e", "score": "0.69726646", "text": "public function __unset($key)\n {\n $this->query->forget($key);\n }", "title": "" }, { "docid": "cc14956cd3c43935d4a424141cb60133", "score": "0.6949361", "text": "public function offsetUnset($key): void\n\t{\n\t\t$this->set($key, null);\n\t}", "title": "" }, { "docid": "b30563df80527a2b68bf424fbc9d6413", "score": "0.69233805", "text": "public function offsetUnset($key)\n {\n $this->set($key, null);\n }", "title": "" }, { "docid": "3a61c9c89b33b9b787853d78b52fd3bc", "score": "0.6922298", "text": "public function unsetRelation($key);", "title": "" }, { "docid": "b0c3048414f52b76cad9131aa4416c77", "score": "0.69179225", "text": "public function offsetUnset($key)\n {\n $this->delete($key);\n }", "title": "" }, { "docid": "c2baa35c616773b2098e2b4f1b03e692", "score": "0.69077593", "text": "public function offsetUnset($key){\n unset($this->elements[$key]);\n $this->iteratorCount = count($this->elements);\n }", "title": "" }, { "docid": "6209de2d79d0ba12af9702f5d2f45c36", "score": "0.6905802", "text": "public function __unset($key)\n\t{\n\t\tunset($this->_data[$key], View::$_global_data[$key]);\n\t}", "title": "" }, { "docid": "5c6245ba784eeb0971e6d64d133d4566", "score": "0.6905554", "text": "public function __unset($key)\n {\n unset($this->resource->{$key});\n }", "title": "" }, { "docid": "7b79cebcdb7eca3b48ec0a3513f1965b", "score": "0.68929774", "text": "public function clearKey($key);", "title": "" }, { "docid": "7c76bcc31d0bc4d2121cd605cde4c541", "score": "0.68741524", "text": "public function removeAttribute($key)\n {\n unset($this->attributes[$key]);\n return $this;\n }", "title": "" }, { "docid": "b1c55985602e4170d5313792afa349cc", "score": "0.68639535", "text": "public function unsetCacheKey($key);", "title": "" }, { "docid": "39b4e5e732722d64ac99665704673a6c", "score": "0.6846131", "text": "public function __unset($key)\n {\n // nullify the value regardless\n $this->_data[$key] = null;\n \n // if keys are not locked, unset the value\n if (! $this->_data_keylock) {\n unset($this->_data[$key]);\n }\n \n // finally, mark as dirty\n $this->_setIsDirty();\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.68223494", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "30227115d1c40b50d4ce968f04f5be6b", "score": "0.68223494", "text": "public function offsetUnset($key)\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "abf08750a6296b821f6711bf4f9b062c", "score": "0.68191683", "text": "public function removeAttribute(string $key)\n {\n unset($this->attributes[$key]);\n return $this;\n }", "title": "" }, { "docid": "a5eb0ace5d885a70caad650b298203b7", "score": "0.68065417", "text": "public function offsetUnset($key)\n {\n unset($this->rows[$key]);\n }", "title": "" }, { "docid": "b499b5652be00c45e8b3510334abbd26", "score": "0.6794484", "text": "public function unsetAttribute($index)\n {\n unset($this->attribute[$index]);\n }", "title": "" }, { "docid": "7e250097c585ced962428f57433733d5", "score": "0.67940164", "text": "public function offsetUnset($key)\n\t{\n\t\tunset($this->bindings[$key], $this->instances[$key], $this->resolved[$key]);\n\t}", "title": "" }, { "docid": "382899998b3246be3f6ad9e7168066ae", "score": "0.6793036", "text": "public function offsetUnset($key): void\n {\n unset($this->items[$key]);\n }", "title": "" }, { "docid": "5fe0c3531dc3da801736dabc00194625", "score": "0.6789517", "text": "public function __unset($key)\n {\n $this->_xslt->removeParameter('', $key);\n unset($this->_assignedVars[$key]);\n }", "title": "" }, { "docid": "49ebde0608e17b5f91d9b50d237adf24", "score": "0.6787707", "text": "final public function offsetUnset($key):void\n {\n if(!is_int($key) || !$this->hasRow($key))\n static::throw('arrayAcces','doesNotExist');\n\n $this->row($key)->unlink();\n }", "title": "" }, { "docid": "219f9f3830d365ac0146992b7df4bd8c", "score": "0.676505", "text": "public function __unset($key)\n {\n $this->_smarty->clear_assign($key);\n }", "title": "" }, { "docid": "219f9f3830d365ac0146992b7df4bd8c", "score": "0.676505", "text": "public function __unset($key)\n {\n $this->_smarty->clear_assign($key);\n }", "title": "" }, { "docid": "891249d15621a88d81977b66aa24fc2f", "score": "0.67429125", "text": "public function offsetUnset ($key): void\n\t{\n\t\tif ($this->offsetExists($key)) {\n\t\t\tunset($this->storage[$key]);\n\t\t}\n\t}", "title": "" }, { "docid": "a1d3188cb585abcbb7781c026632bfed", "score": "0.67217314", "text": "public function unset(string $key){\n $sql = \"DELETE * FROM session_values WHERE sessionId='$this->sessionId' AND keyName = '$key'\";\n $this->db->delete($sql)->fromSQL()->execute();\n //finally update last activity time\n $this->_updateLastActivityDatetime();\n }", "title": "" }, { "docid": "8562dbb8cbade4a7c75bdca8e9b7c1e6", "score": "0.6713589", "text": "public function __unset($key)\n\t{\n\t\tunset($this->_variables[$key]);\n\t}", "title": "" }, { "docid": "93f64099769afd01e1f2851a00f98e2a", "score": "0.6710749", "text": "public function offsetUnset($key)\n {\n $key = $this->normalize($key);\n\n unset($this->bindings[$key], $this->instances[$key]);\n }", "title": "" }, { "docid": "c16c77727e35c0a6b229532925f8eed5", "score": "0.66850376", "text": "abstract public function clear($key);", "title": "" }, { "docid": "fb7867b444795f8c44aa5b70e7285410", "score": "0.6678717", "text": "public function unsetAttributeSet($index)\n {\n unset($this->attributeSet[$index]);\n }", "title": "" }, { "docid": "8bcfd89527158ddbcfb50b41c66f70d6", "score": "0.6672592", "text": "public function unsetLookupAttribute($index)\n {\n unset($this->lookupAttribute[$index]);\n }", "title": "" }, { "docid": "d644136ad74f9d909d3367df470bd082", "score": "0.6641278", "text": "private static function destroyKey(&$attributes, $key)\n\t{\n\t\tunset($attributes[$key]);\n\t}", "title": "" }, { "docid": "ca28cd3cfb2e3d8f9349eec86c6f39bb", "score": "0.6629733", "text": "public static function offsetUnset($key)\n {\n /** @var \\Illuminate\\Cache\\Repository $instance */\n $instance->offsetUnset($key);\n }", "title": "" }, { "docid": "7bd873ab7a4e1d8b644d607532c6f58c", "score": "0.66233855", "text": "public function remove($key ) {\n\t\tparent::offsetUnset($key);\n\t}", "title": "" }, { "docid": "eff2bf81636211588e2222d4ecd3fdd3", "score": "0.66164315", "text": "public function offsetUnset($key)\n {\n unset($this->defaultVariables[$key]);\n }", "title": "" }, { "docid": "abb6a75a91f23e24d249bbbd543315a2", "score": "0.66161114", "text": "public function __unset($key) \r\n { \r\n unset($_SESSION[$this->_namespace][$key]);\r\n }", "title": "" }, { "docid": "29a20e3432ca900fd435743a49869041", "score": "0.66148365", "text": "public function __unset($name)\n {\n if (array_key_exists($name, $this->_attributes)) {\n unset($this->_attributes[$name]);\n } else {\n parent::__unset($name);\n }\n }", "title": "" }, { "docid": "0f8d70b48bf2d673aef677214ff55a6e", "score": "0.66033846", "text": "public function removeAttr($attr){\r\n foreach($this->attributes as $key=>$val){\r\n if($key == $attr)\r\n unset($this->attributes[$key]);\r\n }\r\n \r\n }", "title": "" }, { "docid": "60533d512b163bf758cd243ada7d47a0", "score": "0.6600646", "text": "public function RemoveAttribute($key, $is_tag = FALSE)\n {\n if ($is_tag) {\n $stmt = Bugdar::$db->Prepare(\"\n DELETE FROM \" . TABLE_PREFIX . \"bug_attributes\n WHERE bug_id = ?\n AND value = ?\n AND attribute_title = ''\n \");\n $stmt->Execute(array($this->bug_id, $key));\n } else {\n $stmt = Bugdar::$db->Prepare(\"\n DELETE FROM \" . TABLE_PREFIX . \"bug_attributes\n WHERE bug_id = ?\n AND attribute_title = ?\n \");\n $stmt->Execute(array($this->bug_id, $key));\n }\n // Remove the attribute from the cache.\n foreach ($this->attributes as $i => $attr) {\n if ((!$is_tag && $attr->attribute_title == $key) ||\n ($is_tag && $attr->value == $key)) {\n unset($this->attributes[$i]);\n break;\n }\n }\n }", "title": "" }, { "docid": "82ca5b9e9c92ae03eb40c3d1b497ac9b", "score": "0.6582919", "text": "public function unsetSessionValue($key);", "title": "" }, { "docid": "6795a60e9ce2a80188d174e4063d11ae", "score": "0.6542204", "text": "public function offsetUnset($key)\n {\n unset($this->bindings[$key]);\n }", "title": "" }, { "docid": "d53ad0df5ea9a1aa922d45faf45bc191", "score": "0.65370476", "text": "public function resetExtra($key);", "title": "" }, { "docid": "53385504f413e059ce291286e6d230e2", "score": "0.6519347", "text": "public function unsetAttributeArray($index)\n {\n unset($this->attributeArray[$index]);\n }", "title": "" }, { "docid": "c3a4ff948467bdeb607bab7527381a27", "score": "0.65037423", "text": "public function offsetUnset($offset) {\n if ($this->offsetExists($offset)) {\n unset($this->attributes[$offset]);\n }\n }", "title": "" }, { "docid": "2f3f711c7f8327f6818940b737f94821", "score": "0.6493641", "text": "function acfe_unset(&$array, $key){\n\n if(isset($array[$key]))\n unset($array[$key]);\n\n}", "title": "" }, { "docid": "b34529801e891bddbb09b9d1a0b70d4a", "score": "0.6489007", "text": "public function unsetAttributeSetArray($index)\n {\n unset($this->attributeSetArray[$index]);\n }", "title": "" }, { "docid": "d75b1bd3498b193569b266e178e891b1", "score": "0.647359", "text": "public function offsetUnset($key)\n {\n $this->config->set($this->key($key), null);\n }", "title": "" }, { "docid": "3df91d4b95b03c671720dd09af479588", "score": "0.6454511", "text": "public function unsetLookupAttributeArray($index)\n {\n unset($this->lookupAttributeArray[$index]);\n }", "title": "" }, { "docid": "4dd04c421c04ba0da70eccd45bcec688", "score": "0.6435491", "text": "public function __unset($name) {\n\t\tif (array_key_exists($name, $this->attributes)) {\n\t\t\t$this->attributes[$name] = \"\";\n\t\t} else {\n\t\t\t$this->deleteMetadata($name);\n\t\t}\n\t}", "title": "" }, { "docid": "a2ce98916b0c07a047ae05d83039335d", "score": "0.64259857", "text": "public function unsetValue($key, $secondKey = false, $thirdKey = false)\n {\n unset($this->data[$key][$secondKey][$thirdKey]);\n }", "title": "" }, { "docid": "3646f04e04080ff15a9dce99d6cac6ff", "score": "0.6404269", "text": "public function __unset(string $key): void\n\t{\n\t\tunset($_SESSION[$this->_getKey($key)]);\n\t}", "title": "" }, { "docid": "6834f57dd4b82e7906c86b265ba190d7", "score": "0.64016736", "text": "public function __unset($key)\n {\n if (isset($this->_container[$key])) {\n unset($this->_container[$key]);\n }\n }", "title": "" }, { "docid": "35d2c179c6593d9718cc7917873657f0", "score": "0.63937086", "text": "public function clear(string $key): void;", "title": "" }, { "docid": "b9a50c19308358e30f8624012bb5213d", "score": "0.63921237", "text": "public function offsetUnset($offset)\n {\n unset($this->_attributes[$offset]);\n }", "title": "" } ]
efd490e0bf48fa71e0374f463279e6a0
The list of managed devices.
[ { "docid": "96788f4c3552425a165574f4352f7665", "score": "0.0", "text": "public function get(?ManagedDeviceItemRequestBuilderGetRequestConfiguration $requestConfiguration = null): Promise {\n $requestInfo = $this->toGetRequestInformation($requestConfiguration);\n try {\n $errorMappings = [\n '4XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n '5XX' => [ODataError::class, 'createFromDiscriminatorValue'],\n ];\n return $this->requestAdapter->sendAsync($requestInfo, [ManagedDevice::class, 'createFromDiscriminatorValue'], $errorMappings);\n } catch(Exception $ex) {\n return new RejectedPromise($ex);\n }\n }", "title": "" } ]
[ { "docid": "c6b7acc851d9ecd0904c31db8fb074e9", "score": "0.7605542", "text": "public function getManagedDevices()\n {\n if (array_key_exists(\"managedDevices\", $this->_propDict)) {\n return $this->_propDict[\"managedDevices\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b776f1abbd2d087a7f39ae8e321c285d", "score": "0.726251", "text": "function listdata() \n {\n return Device::all();\n }", "title": "" }, { "docid": "08e4d8a38214317abc6b40f2ec43c757", "score": "0.6944157", "text": "public function getDevices() {\n $query = EntityQuery::create(DeviceEntity::class, [[Module::class, Control::class], [Firmware::class], [Room::class]]);\n $devices = $this->_service->find($query);\n\n return array_map(function (DeviceEntity $device) {\n return $this->_transformDevice($device);\n }, $devices);\n }", "title": "" }, { "docid": "e46c4084b7420c531f56dfbb631dafd2", "score": "0.68988985", "text": "public function get_device_list()\r\n\t{\r\n\t\t$dir_contents = $this->list_dir_contents($this->mrtg_path, 0);\r\n\t\t$device_list = array();\r\n\t\t\r\n\t\t// This for loops though all dir returned from $dir\r\n\t\tforeach($dir_contents as $file)\r\n\t\t{\r\n\t\t\tif ($file !== '.' && $file !== '..' && strpos($file, '_'))\r\n\t\t\t{\r\n\t\t\t\tlist($ip, $name) = explode(\"_\", $file); // Splits the DIR name into two sections IP address and Name\r\n\t\t\t\t$device_list[$name]['name'] = $name;\r\n\t\t\t\t$device_list[$name]['ip'] = $ip;\r\n\t\t\t\t$device_list[$name]['path'] = $this->mrtg_path . \"/\" . $file;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $device_list;\r\n\t}", "title": "" }, { "docid": "a8d4b76f060cd4c3f8396d8a6cf6ab03", "score": "0.6850064", "text": "private function getDevices()\n {\n $url = \"https://fmipmobile.icloud.com/fmipservice/device/\" . $this->username . \"/initClient\";\n list($headers, $body) = $this->curlPOST($url, \"\", $this->username . \":\" . $this->password);\n $this->devices = array();\n for ($x = 0; $x < sizeof($body[\"content\"]); $x++) {\n $device = $this->generateDevice($body[\"content\"][$x]);\n $this->devices[$device->ID] = $device;\n }\n }", "title": "" }, { "docid": "ab91d05f3b62f18169cd29b3a8357b90", "score": "0.67958045", "text": "public function devices()\n\t{\n\t\tif ( empty( $this->all_devices ) )\n\t\t{\n\t\t\t$devices = $this->api->get('devices')->json()['devices'];\n\n\t\t\tforeach ( $devices as $device )\n\t\t\t{\n\t\t\t\t$this->all_devices[] = new Device( $device );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->all_devices;\n\t}", "title": "" }, { "docid": "2d7f39a6d53d1b3dfee54597a56df60a", "score": "0.6743683", "text": "public function devices()\n {\n return $this->hasMany('App\\Device', 'device_id', 'id');\n }", "title": "" }, { "docid": "4b91d9daa6ee8bdd72421a67962c165c", "score": "0.66834396", "text": "public function setManagedDevices($val)\n {\n $this->_propDict[\"managedDevices\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "7ba15f443e25362856e2b755bd3b919f", "score": "0.6636523", "text": "public function devices() {\n return $this->hasMany('Device');\n }", "title": "" }, { "docid": "974de255673eb12873cd7dd153fdec71", "score": "0.66308373", "text": "public function devices() {\n return new DeviceCollection($this->client, array(), false, $this);\n }", "title": "" }, { "docid": "e983a25ca8165d2f2b4e47d3fda904e7", "score": "0.65694624", "text": "public function devices()\n {\n return $this->hasMany('App\\Device');\n }", "title": "" }, { "docid": "c96f9c3477ed2739e242d3aea1c09008", "score": "0.6524303", "text": "public function devices()\n {\n return $this->hasMany('OOD\\Users\\Device', 'user_id');\n }", "title": "" }, { "docid": "1d6db71726cff4ed9d9670ba466b6e1e", "score": "0.64763623", "text": "public function getComanagedDevices()\n {\n if (array_key_exists(\"comanagedDevices\", $this->_propDict)) {\n return $this->_propDict[\"comanagedDevices\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "5e1809220de833641bb532fee580f363", "score": "0.6429745", "text": "public function getManagedDevices(): ?array {\n $val = $this->getBackingStore()->get('managedDevices');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, VulnerableManagedDevice::class);\n /** @var array<VulnerableManagedDevice>|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'managedDevices'\");\n }", "title": "" }, { "docid": "58054785b3cd54a23f75023eaa0d23ca", "score": "0.6422363", "text": "public function getPlatformList()\n {\n return $this->online->call('/storage/c14/platform');\n }", "title": "" }, { "docid": "13ab6019ae47c3022cda15ede7672de8", "score": "0.6374368", "text": "public function DeviceList(): GraphQLOperationQuery\n {\n return $this->prepareExecution(\n Globals::OAUTH_ACCESS_AS_AGENT_USER,\n Globals::OAUTH_SCOPE_USER,\n Globals::GRAPHQL_OPERATION_TYPE_QUERY,\n 'DeviceList',\n [],\n ['id', 'name', 'uuid,', 'created_at'],\n true\n );\n }", "title": "" }, { "docid": "a753e14dc8efc4569c7e1ac41bd48579", "score": "0.6358278", "text": "public function getDevicesFromFile(): array\n {\n return $this->getDevicesFile()->devices;\n }", "title": "" }, { "docid": "02427d1749f9b65272494a495f69679b", "score": "0.62680846", "text": "public function devices() {\n\t\tif (!isset($this->devices)) {\n\t\t\t$this->devices = array();\n\n\t\t\ttry {\n\t\t\t\t$deviceNodes = $this->getDevices(100, 0);\n\n\t\t\t\tif ($deviceNodes) {\n\t\t\t\t\tforeach ($deviceNodes as $deviceNode) {\n\t\t\t\t\t\t$deviceId = $deviceNode['id'];\n\t\t\t\t\t\t$this->devices[\"$deviceId\"] = new SDPDevice($this, $deviceNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\n\t\t\t}\n\t\t}\n\n\t\treturn $this->devices;\n\t}", "title": "" }, { "docid": "459c753599b5675b069c3703a98e4c44", "score": "0.624142", "text": "public function get_all_device(){\n\t\t$this->db->select('device.*');\n\t\t$this->db->from('device');\n\t\t$this->db->where('deleted',0);\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\n\t}", "title": "" }, { "docid": "239d41e61166ee124e28d89e49bdf498", "score": "0.619546", "text": "public function ListDevices(\\Google\\Home\\Enterprise\\Sdm\\V1\\ListDevicesRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.home.enterprise.sdm.v1.SmartDeviceManagementService/ListDevices',\n $argument,\n ['\\Google\\Home\\Enterprise\\Sdm\\V1\\ListDevicesResponse', 'decode'],\n $metadata, $options);\n }", "title": "" }, { "docid": "a17f15e47ec49efe75c7c3de9886fd40", "score": "0.61389685", "text": "function enumerateDevicesList($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.getlist\");\n\t\t// Get the system network interface devices.\n\t\t$result = $this->callMethod(\"enumerateDevices\", NULL, $context);\n\t\t// Filter the result.\n\t\treturn $this->applyFilter($result, $params['start'],\n\t\t $params['limit'], $params['sortfield'], $params['sortdir']);\n\t}", "title": "" }, { "docid": "114e7adaf34fa479b172627ebd36abc2", "score": "0.6130837", "text": "function list($id=null) \n {\n return $id?Device::find($id):Device::all();\n }", "title": "" }, { "docid": "8fb5937a152ce244907bf8ecf2c34b04", "score": "0.6114164", "text": "public function devices_get()\n\t{\n\t\t$user_id = $this->_check_apikey();\n\t\t\n\t\t$data = $this->device_model->get_devices($user_id);\n\t\tif ($data === FALSE)\n\t\t\t$this->response(array (\n\t\t\t\t\t'info' => 'no device found under this user'\n\t\t\t), 400);\n\t\telse\n\t\t\t$this->response($data, 200);\n\t}", "title": "" }, { "docid": "f60b6d8dbb43eb7bc687945c7eaef700", "score": "0.6109281", "text": "public static function getPhoneDevices()\n {\n return self::$phoneDevices;\n }", "title": "" }, { "docid": "bd2fee7806fd2f8e3e7364ffdd9faacf", "score": "0.6091538", "text": "function getPosDevices() {\n $t = new App_Models_Db_Wigi_AuthorizedDevice();\n\n $result = $t->fetchAll(\n $t->select()\n ->where('user_id = ?', $this->userid)\n );\n\n return $result;\n\n\n }", "title": "" }, { "docid": "a018f87d1abbbd4858c2d023e613dd2a", "score": "0.609082", "text": "function get_smart_drive_list() {\n\t/* SMART supports some disks directly, and some controllers directly,\n\t * See https://redmine.pfsense.org/issues/9042 */\n\t$supported_disk_types = array(\"ad\", \"da\", \"ada\");\n\t$supported_controller_types = array(\"nvme\");\n\t$disk_list = explode(\" \", get_single_sysctl(\"kern.disks\"));\n\tforeach ($disk_list as $id => $disk) {\n\t\t// We only want certain kinds of disks for S.M.A.R.T.\n\t\t// 1 is a match, 0 is no match, False is any problem processing the regex\n\t\tif (preg_match(\"/^(\" . implode(\"|\", $supported_disk_types) . \").*[0-9]{1,2}$/\", $disk) !== 1) {\n\t\t\tunset($disk_list[$id]);\n\t\t\tcontinue;\n\t\t}\n\t}\n\tforeach ($supported_controller_types as $controller) {\n\t\t$devices = glob(\"/dev/{$controller}*\");\n\t\tif (!is_array($devices)) {\n\t\t\tcontinue;\n\t\t}\n\t\tforeach ($devices as $device) {\n\t\t\t$disk_list[] = basename($device);\n\t\t}\n\t}\n\tsort($disk_list);\n\treturn $disk_list;\n}", "title": "" }, { "docid": "050e44eaa75ed0e6c9632f6463e5d074", "score": "0.5999447", "text": "public function getDeviceTypes()\n {\n return $this->device_types;\n }", "title": "" }, { "docid": "f43769c3a5fc2cd901ca0857d0a65c39", "score": "0.59732586", "text": "public function DMCAList() {\r\n\t\treturn $this->api_call('dmca', 'list', array());\r\n\t}", "title": "" }, { "docid": "3d1f58f0173e9797b0bb77206b3155f0", "score": "0.5953425", "text": "public function deviceArray()\n {\n return [\n 'type' => $this->getType(),\n 'name' => $this->getName(),\n 'os' => $this->agent->platform(),\n 'version' => $this->agent->version($this->agent->platform()),\n ];\n }", "title": "" }, { "docid": "b58ed4e9f56a151501104e68610c70a4", "score": "0.59188616", "text": "private function deviceTypeList()\n {\n return array(\n 'ipad',\n 'iphone',\n 'tablet',\n 'mobile',\n 'desktop',\n 'android'\n );\n }", "title": "" }, { "docid": "637a5cfea7ec4d065767e12d7ecb54a6", "score": "0.58994734", "text": "public function index()\n {\n $devices = Device::where('status', 'subscribe')->get();\n return $devices;\n }", "title": "" }, { "docid": "2a91158f27276e278a39eb1bfcee62ed", "score": "0.58979464", "text": "public function getDeviceAll(Request $request)\n {\n //for audit logs\n try {\n $ip = $request->ip();\n $username = auth()->user();\n $host = $username->USERNAME;\n $module = 'Device Management';\n $instruction = 'Retrieved all the Devices';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n return $this->createGetResponse($request, (new Device)->newQuery());\n } catch (\\Throwable $e) {\n\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "8cabb43d42d8d41541bfeba6496e3285", "score": "0.58832514", "text": "public function getDeletedDevices(Request $request)\n {\n //for audit logs\n $ip = $request->ip();\n $username = auth()->user();\n $host = $username->USERNAME;\n $module = 'Device Management';\n $instruction = 'Retrieved Deleted Devices';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n return $this->createGetResponse($request, Device::where('REG_FLAG', 9));\n }", "title": "" }, { "docid": "8415d4a30b073740c783f3ba4711c1c9", "score": "0.5872943", "text": "protected function updateDeviceList(){\n \tif(is_array($this->deviceList) && count($this->deviceList)>0) return;\n \t$this->deviceList = $this->wurfl->db->getFullDeviceList($this->wurfl->fullTableName());\n }", "title": "" }, { "docid": "608abbebf3f8815cff652c6ddd430042", "score": "0.5869287", "text": "public function indexManagerDevice()\n {\n $dg = DeviceGroup::all();\n $device = DB::table('device')\n ->join('device_group','device.dg_id','=','device_group.dg_id')\n ->select('device.*','.dg_name')->get();\n return view('admin/device/managerDevice',\n [\n 'dg'=>$dg]);\n // return $device;\n }", "title": "" }, { "docid": "8df37462476970992db123cad545d578", "score": "0.58674675", "text": "public function getDevicesExecuted() {\n $components = array();\n $parser = new JsonComponentsParser($this->fk_ethernet);\n\n if ($this->group) {\n $components = $parser->getDevicesByGroup($this->group);\n } else {\n if ($this->lc_id) {\n if ($this->dvc_id) {\n $component = $parser->getDeviceByLcIdAndDvcId($this->lc_id, $this->dvc_id);\n $components[] = $component;\n } else {\n $components = $parser->getDevicesByLcID($this->lc_id);\n }\n } else {\n $components = $parser->getAllDevices();\n }\n }\n\n $response = array();\n /** @var DeviceTransfer $component */\n foreach ($components as $component) {\n $response[$component->lc_id][] = $component->dvc_id;\n }\n return $response;\n }", "title": "" }, { "docid": "b9a58dee14273238dc9ace51a12e1740", "score": "0.5866814", "text": "public function managedDevices(): ManagedDevicesRequestBuilder {\n return new ManagedDevicesRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "01863250bbcf032623c75711fcdb6ae5", "score": "0.58667487", "text": "function getDeviceList(){\n\t\tglobal $conn;\n\t\t$query = \"SELECT deviceID, name, type, year, availability, unit,\n\t\t\t\t\t\t cost, maxuse, overuse\n\t\t\t\t FROM devices\"; \n\t\t$stid = oci_parse($conn, $query);\n\t\toci_execute($stid);\n\t\treturn $stid;\n\t}", "title": "" }, { "docid": "297252efed56d7a90953e683a4e34ba7", "score": "0.584643", "text": "public function adb()\n {\n return [];\n }", "title": "" }, { "docid": "e43a838a3610ac4ead38b3c427647322", "score": "0.58057284", "text": "public function indexAction()\n {\n $devices = (new DeviceModel())->getAllDevices();\n \n if($devices){\n return $this->response($devices, 200);\n }\n return $this->response('Data not found', 404);\n }", "title": "" }, { "docid": "59513343cb96efb18f4616ed49a36269", "score": "0.578954", "text": "public function __invoke(Request $request)\n {\n return $this->client->devices();\n }", "title": "" }, { "docid": "c9ebe1db25a14cc150de2989df2384e6", "score": "0.5738704", "text": "public function index()\n {\n return view('devices.index', [\n 'devices' => Device::all(),\n ]);\n }", "title": "" }, { "docid": "56779f75a5ed2830b052ddf1b1813961", "score": "0.57366616", "text": "public function getDeviceConfigurations()\n {\n if (array_key_exists(\"deviceConfigurations\", $this->_propDict)) {\n return $this->_propDict[\"deviceConfigurations\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "337cec39356dfb947201b0c587972be0", "score": "0.5677812", "text": "public function getDMs()\n {\n return $this->apiCall('im.list')->then(function ($response) {\n $dms = [];\n foreach ($response['ims'] as $dm) {\n $dms[] = new DirectMessageChannel($this, $dm);\n }\n return $dms;\n });\n }", "title": "" }, { "docid": "98b14aabf78b40ecea174cd434139556", "score": "0.56731486", "text": "public function listStorageServices();", "title": "" }, { "docid": "98b14aabf78b40ecea174cd434139556", "score": "0.56731486", "text": "public function listStorageServices();", "title": "" }, { "docid": "47446d27ce0827318fe2f9074c977fe8", "score": "0.56709015", "text": "public function index()\n {\n $devices = Device::all();\n \n return view('devices.index',compact('devices'));\n }", "title": "" }, { "docid": "fecdc4dcce1a072f6e670dc5e0acf638", "score": "0.5668524", "text": "public function index()\n {\n $data = [\n 'devices' => Device::orderBy('created_at', 'desc')->paginate(15),\n ];\n return view('admin.device.index', $data);\n }", "title": "" }, { "docid": "bc3e88c8086a1c05a05b011318d9da56", "score": "0.5667717", "text": "public function getLoggedOnManagedDevices(): GetLoggedOnManagedDevicesRequestBuilder {\n return new GetLoggedOnManagedDevicesRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" }, { "docid": "accdf0095ec495a2f3974d2e94c53b49", "score": "0.56675464", "text": "public function lists()\n\t{\n\t\tif (is_null($this->list))\n\t\t{\n\t\t\t$this->list = $this->getListDrivers();\n\t\t}\n\n\t\treturn $this->list;\n\t}", "title": "" }, { "docid": "3933ce0899839761cf84df903e03ed1b", "score": "0.5635401", "text": "public function index() {\n $data = LendDevice::where('flag', '=', '1')\n ->where('create_user', '=', Helper::loginUser())\n ->orderBy('create_date', 'desc')->get();\n \n return view('store.manageLendDevice')->with('lendDevices', $data);\n }", "title": "" }, { "docid": "ba20943dbb390bb429da970b8d494894", "score": "0.562234", "text": "public function get_management_device_connections()\n {\n if ($this->m_cached_management_device_connection === null)\n {\n $this->map_management_device_connection();\n } // if\n\n return $this->m_cached_management_device_connection;\n }", "title": "" }, { "docid": "09ca5c639cc84088e94bf08ceaa8f741", "score": "0.5619025", "text": "private function discoverCloudDevices(): void\n\t{\n\t}", "title": "" }, { "docid": "3f01a6bed8f96fb15f7923274fb0cf45", "score": "0.56110823", "text": "public function devices(){\n return $this->hasMany('App\\Device'); \n }", "title": "" }, { "docid": "099b149b1779e613036e6e1f3158f61b", "score": "0.5605026", "text": "function netmgmt_device ()\n {\n $this->tablename = 'Devices';\n $this->dbname = 'netmgmt';\n $this->rows_per_page = 0;\n $this->fieldlist = array('MacAddress', 'UserId', 'DepartmentId', 'Type', 'InventoryTag', 'Description', 'DateAdded', 'UserAdded', 'DateModified', 'UserModified', 'DateLastSeen');\n $this->fieldlist['MacAddress'] = array('pkey' => 'y');\n\t\t\t\t\n }", "title": "" }, { "docid": "0bf2a0451e1fc0bbd771fc5a50fe743c", "score": "0.55746174", "text": "public function getDevices()\n {\n if (array_key_exists(\"devices\", $this->_propDict)) {\n if (is_a($this->_propDict[\"devices\"], \"\\Microsoft\\Graph\\Model\\ConditionalAccessDevices\") || is_null($this->_propDict[\"devices\"])) {\n return $this->_propDict[\"devices\"];\n } else {\n $this->_propDict[\"devices\"] = new ConditionalAccessDevices($this->_propDict[\"devices\"]);\n return $this->_propDict[\"devices\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "a1c9d040d0791e60fd6d4f7af92a717a", "score": "0.55611086", "text": "public function getInvalidDevices();", "title": "" }, { "docid": "f8ac952d7bd1dfab4b2f9588506c8e33", "score": "0.55408734", "text": "public function index()\n {\n $devices = Device::all();\n return view('app.device.index', compact('devices'));\n }", "title": "" }, { "docid": "bd3f49993e93a9414c7c739aa19d9a2a", "score": "0.55355656", "text": "public function getRegisteredDevices(Request $request)\n {\n return $this->createGetResponse($request, Device::where('REG_FLAG', 1)->with('deviceBindings'));\n }", "title": "" }, { "docid": "781dee2915758c04d975500ce3d21ea5", "score": "0.55316544", "text": "public function index()\n {\n //\n $devices = Device::all();\n\n return View('devices.index', compact('devices'));\n }", "title": "" }, { "docid": "2b2c2fc0d70fabf41f1a5194c2599fa4", "score": "0.55302477", "text": "public function get_subDevices()\n {\n $serial = $this->get_serialNumber();\n return YAPI::getSubDevicesFrom($serial);\n }", "title": "" }, { "docid": "993d07a27037d0c153e878064a0c2601", "score": "0.55301464", "text": "public function indexManagerDeviceGroup()\n {\n return view('admin/device/managerDeviceGroup');\n }", "title": "" }, { "docid": "6eaaa91729fad61d5818a1ef1e7ea928", "score": "0.5527215", "text": "public function setComanagedDevices($val)\n {\n $this->_propDict[\"comanagedDevices\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d3fdeb004e226bbc38c858cf33da267e", "score": "0.552681", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $networkDevices = $em->getRepository('ManagerITBundle:NetworkDevice')->findAll();\n\n return $this->render('networkdevice/index.html.twig', array(\n 'networkDevices' => $networkDevices,\n ));\n }", "title": "" }, { "docid": "25d882bc19b63fec2ddb60946608fa82", "score": "0.5518295", "text": "public function list() {\r\n\t\treturn $this->getList();\r\n\t}", "title": "" }, { "docid": "52a7e31678c821c7bb3a4a024deb8339", "score": "0.5517832", "text": "public function setDevices($val)\n {\n $this->_propDict[\"devices\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "8e4134a3c03c0716dd6e97a601c2af56", "score": "0.55041826", "text": "public function list()\n {\n return $this->subServices->get('instance/list');\n }", "title": "" }, { "docid": "d070f0280adc8589b6195e2648a47df1", "score": "0.55025005", "text": "public function index()\n {\n try {\n $data = DevicesManager::query();\n\n return response()->json($data, 200);\n } catch (\\Exception $e) {\n ExceptionLogger::log($e);\n return response()->json($e->getMessage(), 500);\n }\n }", "title": "" }, { "docid": "204cd5a67226738233dcc88e8cbe732e", "score": "0.54911196", "text": "public function getAllProvidersWithDevices(bool $returnFullClass = false): array\n {\n $providers = $this->providers->filter(fn ($provider) => $provider['devices'] === true);\n\n if ($returnFullClass) {\n return $providers->keys()->toArray();\n }\n\n return $providers\n ->map(fn ($provider) => $provider['morph_class'])\n ->flatten()\n ->toArray();\n }", "title": "" }, { "docid": "4b0f28492f9fe0199e10f788e5447f41", "score": "0.5487951", "text": "public function getDevice()\n\t{\n\t\t$client = $this->getClient();\n\n\t\treturn $this->getObject('device', $client->devices);\n\t}", "title": "" }, { "docid": "bf4e3d0510bb852665022b3eaf6bd374", "score": "0.54847914", "text": "public function get_all_user_devices(Request $request){\n\t\t$id = $request->input(\"id\");\n if(!isset($id) || $id === ''){\n $ret = array(\n \"success\"=>false,\n \"msg\"=>'The id was not recieved.'\n );\n die(json_encode($ret));\n }\n $cur = User::where('id',$id)->first();\n if(is_null($cur)){ //user not found\n $ret = array(\n \"success\"=>false,\n \"msg\"=>\"The id ({$id}) provided was not found in the database.\"\n );\n die(json_encode($ret));\n }\n $devices = UserDevice::all();\n die(json_encode($devices->all()));\n\t}", "title": "" }, { "docid": "92ddd979214c0bdb527d0ad6fa2ef8f4", "score": "0.5479994", "text": "public function getAllDeviceTokens()\n {\n\n $deviceTokenModel = app('App\\Models\\DeviceToken');\n\n $deviceTokens = $deviceTokenModel->where('entity_type', 'USER')\n ->where('entity_id', $this->id)->get();\n\n return $deviceTokens->pluck('device_token')->all();\n\n }", "title": "" }, { "docid": "2178cd859ccd4186814eeec490031289", "score": "0.54208547", "text": "public function getList(){\n\n //Get a list of all the controllers, since each controller\n //is set up through the AppController to allow for management\n //we know that we can edit any database table with a controller\n $databaseList = App::objects( 'controller' );\n\n //But we don't want to be worrying about this controller or the\n //app controller so we take those off.\n foreach( $databaseList as $databaseIndex => $controllerName ){\n\n if(\n $controllerName == 'AppController' ||\n $controllerName == 'DatabasesController'\n ){\n unset( $databaseList[$databaseIndex] );\n }\n\n }\n\n //Pass the database list to the view and serialize it\n $this->set( 'databaseList', $databaseList );\n $this->set( '_serialize', [\n 'databaseList'\n ]);\n\n\n }", "title": "" }, { "docid": "f099601017136b762e2b17f6fedb7451", "score": "0.54125965", "text": "public function indexManagerDeviceLine()\n {\n $dg = DeviceGroup::all();\n // return $dg;\n return view('admin/device/managerDeviceLine',\n ['dg'=>$dg]);\n }", "title": "" }, { "docid": "869229b0db74e8c9f9e3daf7431f2908", "score": "0.5412144", "text": "public function totalDevices()\n {\n return Poke::distinct()->count('mac');\n }", "title": "" }, { "docid": "c774ca0cef5bdca194b88f2b30285065", "score": "0.53979164", "text": "public function setManagedDevices(?array $value): void {\n $this->getBackingStore()->set('managedDevices', $value);\n }", "title": "" }, { "docid": "6d8ca818fb736e4df83da001cb95529f", "score": "0.5394426", "text": "public function getRegisteredDevices()\n {\n try {\n $result = $this->client->listSubscriptions([]);\n\n return $result;\n } catch (AwsException $e) {\n // output error message if fails\n \\Log::info($e->getMessage());\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "4e54f85f0f0db57392101259318a6665", "score": "0.5387911", "text": "public function enumerateDevices($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t$mngr = \\OMV\\System\\Net\\NetworkInterfaceBackend\\Manager::getInstance();\n\t\t// Enumerate all network interface devices on the system.\n\t\tif (FALSE === ($devs = $mngr->enumerate(\n\t\t OMV_NETWORK_INTERFACE_TYPE_ALL))) {\n\t\t\tthrow new \\OMV\\Exception(\n\t\t\t \"Failed to get list of network interface devices.\");\n\t\t}\n\t\t// Generate the result objects including all information about\n\t\t// the network interfaces.\n\t\t$result = [];\n\t\tforeach ($devs as $devk => $devv) {\n\t\t\t// Get the network interface backend.\n\t\t\t$mngr->assertBackendExists($devv);\n\t\t\t$nib = $mngr->getBackend($devv);\n\t\t\t// Set the default attributes.\n\t\t\t$object = [\n\t\t\t\t\"uuid\" => \\OMV\\Environment::get(\"OMV_CONFIGOBJECT_NEW_UUID\"),\n\t\t\t\t\"comment\" => \"\",\n\t\t\t\t\"_used\" => FALSE,\n\t\t\t\t\"_readonly\" => FALSE\n\t\t\t];\n\t\t\t// Is there any configuration for the given network interface?\n\t\t\t$filter = [\n\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\"arg0\" => \"devicename\",\n\t\t\t\t\"arg1\" => $devv\n\t\t\t];\n\t\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t\tif ($db->exists(\"conf.system.network.interface\", $filter)) {\n\t\t\t\t// Get the interface configuration object.\n\t\t\t\t$cfgObject = $db->getByFilter(\"conf.system.network.interface\",\n\t\t\t\t $filter, 1);\n\t\t\t\t// Append the configuration attributes.\n\t\t\t\t$object = array_merge($object, $cfgObject->getAssoc());\n\t\t\t\t// Is the interface device somewhere referenced?\n\t\t\t\t$object['_used'] = $db->isReferenced($cfgObject);\n\t\t\t}\n\t\t\t// Get the current network interface information. Note, this will\n\t\t\t// override various configuration values.\n\t\t\t$object = array_merge($object, $this->getIfaceInfo($devv));\n\t\t\t// Categorize the network interface.\n\t\t\t$typeNames = \\OMV\\Environment::get(\n\t\t\t \"OMV_NETWORK_INTERFACE_TYPE_NAMES\");\n\t\t\tif (array_key_exists($nib->getType(), $typeNames))\n\t\t\t\t$object['type'] = $typeNames[$nib->getType()];\n\t\t\telse\n\t\t\t\t$object['type'] = \"unknown\";\n\t\t\t// Check whether the interface device is used by a bonding\n\t\t\t// interface.\n\t\t\tif ($db->exists(\"conf.system.network.interface\", [\n\t\t\t\t\"operator\" => \"and\",\n\t\t\t\t\"arg0\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"type\",\n\t\t\t\t\t\"arg1\" => \"bond\"\n\t\t\t\t],\n\t\t\t\t\"arg1\" => [\n\t\t\t\t\t\"operator\" => \"stringContains\",\n\t\t\t\t\t\"arg0\" => \"slaves\",\n\t\t\t\t\t\"arg1\" => $devv\n\t\t\t\t]\n\t\t\t])) {\n\t\t\t\t$object['_used'] = TRUE;\n\t\t\t\t$object['_readonly'] = TRUE;\n\t\t\t\t$object['method'] = \"\";\n\t\t\t\t$object['method6'] = \"\";\n\t\t\t}\n\t\t\t// Append network interface device to result list.\n\t\t\t$result[] = $object;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "251997f9543165ac4fe1b74a15a6403a", "score": "0.5383521", "text": "public function administrators()\n {\n return $this->belongsToMany('User', 'device_admin', 'device_id')\n ->withPivot('can_read', 'can_edit', 'can_execute', 'owner', 'user_id');\n }", "title": "" }, { "docid": "2647565858cd6f6365877c43d5ac54d8", "score": "0.5351154", "text": "public function getComanagementEligibleDevices()\n {\n if (array_key_exists(\"comanagementEligibleDevices\", $this->_propDict)) {\n return $this->_propDict[\"comanagementEligibleDevices\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4d2cfe76bdd63d1fc28969779cbb657d", "score": "0.5336783", "text": "public function deviceTokens()\n {\n return $this->hasMany('App\\Models\\DeviceToken', 'entity_id')->where('entity_type', 'USER');\n }", "title": "" }, { "docid": "9a01d0fcd4c58a64545e66f774b53139", "score": "0.53285915", "text": "function getAllDevices($db)\n{\n\t$all=\"\";\n\t$query=\"SELECT * FROM DeviceName\";\n\ttry{\n\t\t$result = $db->query($query);\n\t\t\n\t\t$all = $result->fetchAll(PDO::FETCH_ASSOC);\n\t}catch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $all;\n}", "title": "" }, { "docid": "fcbed3e8d5a9a73859d5061eb5abb9f3", "score": "0.5328452", "text": "public function getDeviceManagementPartners()\n {\n if (array_key_exists(\"deviceManagementPartners\", $this->_propDict)) {\n return $this->_propDict[\"deviceManagementPartners\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0217d42b00833748f9dfc7213fa10120", "score": "0.5313299", "text": "function enumerateConfiguredDevices($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Get all network interface configuration objects.\n\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t$objects = $db->get(\"conf.system.network.interface\");\n\t\t// Now get the network interface configuration objects.\n\t\t$result = [];\n\t\tforeach ($objects as $objectk => $objectv) {\n\t\t\t$objectAssoc = $objectv->getAssoc();\n\t\t\t// Is the ethernet interface device somewhere referenced?\n\t\t\t$objectAssoc['_used'] = $db->isReferenced($objectv);\n\t\t\t$objectAssoc['_readonly'] = FALSE;\n\t\t\t// Check if it is used by a bonding interface.\n\t\t\tif ($db->exists(\"conf.system.network.interface\", [\n\t\t\t\t\"operator\" => \"and\",\n\t\t\t\t\"arg0\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"type\",\n\t\t\t\t\t\"arg1\" => \"bond\"\n\t\t\t\t],\n\t\t\t\t\"arg1\" => [\n\t\t\t\t\t\"operator\" => \"stringContains\",\n\t\t\t\t\t\"arg0\" => \"slaves\",\n\t\t\t\t\t\"arg1\" => $objectv->get(\"devicename\")\n\t\t\t\t]\n\t\t\t])) {\n\t\t\t\t$objectAssoc['_used'] = TRUE;\n\t\t\t\t$objectAssoc['_readonly'] = TRUE;\n\t\t\t}\n\t\t\t$result[] = $objectAssoc;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0c31fc5d508ae93ced27b6aca4de36fc", "score": "0.5306017", "text": "public function getDeviceActions(){\n\t\t\treturn ArrayHelper::map(DeviceAction::find()->where(['action_id' => $this->id])->asArray()->all(), 'device_id', 'device_id');\n\t\t}", "title": "" }, { "docid": "9b75d013555200ca0fd2482741d3b105", "score": "0.5304274", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Device::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "07b195feccf4441c5b738558345a7e36", "score": "0.52991176", "text": "public function list()\n {\n return $this->fetch();\n }", "title": "" }, { "docid": "b5c97e8d073f5d4f7ffcba64dd5363f4", "score": "0.5298006", "text": "public function getMountedDrives() : array {\n return $this->mountedDrives;\n }", "title": "" }, { "docid": "7bd4914ac993e0fa660f34999677b08b", "score": "0.5297837", "text": "public function list(): array\n {\n return $this->list;\n }", "title": "" }, { "docid": "fee17b802fc93593fd2c9e91ed22b2c1", "score": "0.5290298", "text": "function knxdevices() {\n $this->name=\"knxdevices\";\n $this->title=\"KNX\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "title": "" }, { "docid": "945d40db68990a7cf0e69a98cad7cb55", "score": "0.5284101", "text": "public function get()\r\n {\r\n // Set the response headers...\r\n $response['data'] = $response = array();\r\n $params = $this->app->request()->params();\r\n\r\n $userId = $params['userId'];\r\n $groups = $params['groups'];\r\n $objectTypes = $params['objectTypes'];\r\n\r\n try{\r\n\r\n $valToModel = array(\"userId\" => $userId, \"groups\" => $groups, \"objectTypes\" => $objectTypes);\r\n $resultModel = $this->_devices_model->getDevices($valToModel);\r\n\r\n if ( count($resultModel) > 0 ) {\r\n foreach ($resultModel as $key => $row) {\r\n switch ($row['object_type_id']) {\r\n case '13': // Conductor\r\n\r\n break;\r\n\r\n case '24': // Vehiculo\r\n $vehiculos = $this->_devices_model->getDevicesVehiclesProperties((int)$row['object_id']);\r\n $vehiculos = $this->_devices_model->getDevicesVehiclesProperties((int)$row['object_id']);\r\n if (isset($vehiculos['tracker_imei'])) {\r\n $data = array(\r\n 'deviceId' => $row['object_id'],\r\n 'name' => $vehiculos['tracker_license_plate'],\r\n 'object_type_id' => $row['object_type_id'],\r\n 'type_vehicle' => self::castTypeVehicle($vehiculos['type_vehicle_id']),\r\n 'phone' => $vehiculos['tracker_phone_number'],\r\n 'imei' => $vehiculos['tracker_imei']);\r\n $response['data'][] = $data;\r\n }\r\n break;\r\n\r\n case '25': // Tracker\r\n\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n //$response['data'] = $resultModel['objects'];\r\n $response['status'] = true;\r\n\r\n } else {\r\n throw new Exception(\"Error Processing Request\", 400);\r\n }\r\n\r\n } catch (Exception $e) {\r\n $response['data'] = null;\r\n $response['status'] = false;\r\n $response['message'] = $e->getMessage();\r\n }\r\n header('Content-type: application/json;charset=utf-8');\r\n echo json_encode($response);\r\n }", "title": "" }, { "docid": "fd0d3b94d6e11a28456566ec96741105", "score": "0.5258417", "text": "public function searchDevices(Request $request)\n {\n //for audit logs\n $ip = $request->ip();\n $username = auth()->user();\n $host = $username->USERNAME;\n $module = 'Device Management';\n $instruction = 'Searched for a Device';\n $this->auditLogs($ip,$host,$module,$instruction);\n\n if (!$request->q) {\n abort(400, \"Invalid search query\");\n }\n\n return $this->createGetResponse($request,\n Devices::where('DEVICE_NAME', 'like', '%' . $request->q . '%'));\n }", "title": "" }, { "docid": "d81907f837b21cf49f281965fc790ab0", "score": "0.52382815", "text": "public function getList() {\r\n return $this->list;\r\n }", "title": "" }, { "docid": "9b58080a486a5c188eb69442de6d3556", "score": "0.5238205", "text": "function get_interface_list() {\n\t$devices = array();\n\t$file_name = \"/proc/net/dev\";\n\n\tif ($fopen_file = fopen($file_name, 'r')) {\n\t\twhile ($buffer = fgets($fopen_file, 4096)) {\n\t\t\tif (preg_match(\"/eth[0-9][0-9]*/i\", trim($buffer), $match)) {\n\t\t\t\t$devices[] = $match[0];\n\t\t\t}\n\t\t}\n\t\t$devices = array_unique($devices);\n\t\tsort($devices);\n\t\tfclose ($fopen_file);\n\t}\n\treturn $devices;\n}", "title": "" }, { "docid": "202b5571261ac645f2e7fe3c55f6d6de", "score": "0.5228357", "text": "public static function get_devices_of_current_user()\n {\n $devices = array();\n\n $user = self::require_login();\n\n if (! is_object($user))\n {\n return null;\n }\n\n // all devices from this user and by fellow members of the same provider\n $memberships = com_meego_devprogram_membutils::get_memberships_of_current_user();\n\n foreach($memberships as $membership)\n {\n // check status\n if ($membership->status == CMD_MEMBERSHIP_APPROVED)\n {\n // get provider objects and add it to the array\n $devices = array_merge($devices, self::get_devices(array('provider' => $membership->provider)));\n }\n }\n\n return $devices;\n }", "title": "" }, { "docid": "9044be2729dc1ff713c9be564baf2c9a", "score": "0.52215797", "text": "public function getlist()\n {\n return $this->_repository->findAll();\n }", "title": "" }, { "docid": "d2beb1e92a9852ad7ad684235a13095b", "score": "0.52051836", "text": "public function get_computers()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $ldap = new OpenLDAP_Driver();\n\n return $ldap->get_computers();\n }", "title": "" }, { "docid": "312d6e451173ed6a09bd5a5bc7de0a06", "score": "0.52028376", "text": "public function get_list_installed()\n\t{\n\t\treturn model('ext')->get($this->model);\n\t}", "title": "" }, { "docid": "d5fece97339724bb0012e74c6b9ada69", "score": "0.5178973", "text": "public function actionList(){ \n $lang = CommonFacade::getLanguage();\n $facade = new VendorFacade();\n $response = $facade->getVendorList(); \n $Data = $response['DATA']['SUBDATA']; \n $permission = \\app\\facades\\common\\CommonFacade::getPermissions(Yii::$app->request);\n return $this->render('list', ['model' => $Data, 'permission'=>$permission, 'lang'=>$lang]);\n }", "title": "" }, { "docid": "9da49bc8c3450ef7eeffce6a8db32ff3", "score": "0.5174719", "text": "public function getManagedDeviceId()\n {\n if (array_key_exists(\"managedDeviceId\", $this->_propDict)) {\n return $this->_propDict[\"managedDeviceId\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ccd07ea19cbdac406db96930cd5d2f6d", "score": "0.5170557", "text": "public function device_listing($start = 0) \n\t{ \n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] \t= $link;\n\t\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t\t\t\n\t\t$limit = $this->page_limit;\n\t\t$list_data = $this->mod_system_settings->get_device_manufacturers($this->status);\n\t\t\n\t\t$config['per_page'] = $limit;\n\t\t//$config['base_url'] = site_url(\"system_settings/device_manufacturers/device_list/\");\n\t\t if($this->status==\"active\"){\n \t\t$config['base_url'] = site_url(\"admin/settings_device_manufacturers/active/\");\n }\n else if($this->status == \"inactive\") /* Active Base Url */\n {\n $config['base_url'] = site_url(\"admin/settings_device_manufacturers/inactive/\");\n }\n\t\t else{ /* InActive Base Url */\n\t\t \t$config['base_url'] = site_url(\"admin/settings_device_manufacturers/device_listing/\");\n\t\t }\n\t\t$config['uri_segment'] = 4;\n\t\t$config['total_rows'] \t= count($list_data);//'5';\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\t\t\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\t\t\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t\n\t\t$this->pagination->initialize($config);\t\t\n\t\t\n\t\t$list_data = $this->mod_system_settings->get_device_manufacturers($this->status,$limit,$start);\n\t\t$data['device_manufacturer_list']\t=\t$list_data;\n\t\t\t\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_device_manufacturer_title');\t\n\t\t\n\t\t\n\t\t/** Get the Number of Records ****/\n\t\t\n\t\t$status_field_name\t\t\t=\t'manufacturer_status'; // Provide The name of Status field\n\t\t$tbl_name\t\t\t\t\t\t=\t'djx_device_manufacturer'; // Provide the table name\n\t\t\n\t\t$data['active_records']\t\t= $this->mod_system_settings->get_num_records('active',$status_field_name,$tbl_name);\n\t\t$data['all_records']\t\t\t= $this->mod_system_settings->get_num_records('all',$status_field_name,$tbl_name);\n\t\t$data['inactive_records']\t= $this->mod_system_settings->get_num_records('inactive',$status_field_name,$tbl_name);\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['offset']\t\t\t=($start ==0)?1:($start + 1);\n\t\t$data['page_content']\t= $this->load->view(\"device_manufacturer/device_manufacturers_list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t\t//redirect('settings/system/device_manufacturers')\t;\n\t}", "title": "" } ]
0799a34f9460055065a4b0a35150acfc
Create request for operation 'ezsigntemplateformfieldgroupEditObjectV1'
[ { "docid": "74ab957762edda72264874c4bc43b78c", "score": "0.7282755", "text": "public function ezsigntemplateformfieldgroupEditObjectV1Request($pkiEzsigntemplateformfieldgroupID, $ezsigntemplateformfieldgroupEditObjectV1Request, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupEditObjectV1'][0])\n {\n\n // verify the required parameter 'pkiEzsigntemplateformfieldgroupID' is set\n if ($pkiEzsigntemplateformfieldgroupID === null || (is_array($pkiEzsigntemplateformfieldgroupID) && count($pkiEzsigntemplateformfieldgroupID) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pkiEzsigntemplateformfieldgroupID when calling ezsigntemplateformfieldgroupEditObjectV1'\n );\n }\n if ($pkiEzsigntemplateformfieldgroupID < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$pkiEzsigntemplateformfieldgroupID\" when calling ObjectEzsigntemplateformfieldgroupApi.ezsigntemplateformfieldgroupEditObjectV1, must be bigger than or equal to 0.');\n }\n \n // verify the required parameter 'ezsigntemplateformfieldgroupEditObjectV1Request' is set\n if ($ezsigntemplateformfieldgroupEditObjectV1Request === null || (is_array($ezsigntemplateformfieldgroupEditObjectV1Request) && count($ezsigntemplateformfieldgroupEditObjectV1Request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ezsigntemplateformfieldgroupEditObjectV1Request when calling ezsigntemplateformfieldgroupEditObjectV1'\n );\n }\n\n\n $resourcePath = '/1/object/ezsigntemplateformfieldgroup/{pkiEzsigntemplateformfieldgroupID}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($pkiEzsigntemplateformfieldgroupID !== null) {\n $resourcePath = str_replace(\n '{' . 'pkiEzsigntemplateformfieldgroupID' . '}',\n ObjectSerializer::toPathValue($pkiEzsigntemplateformfieldgroupID),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($ezsigntemplateformfieldgroupEditObjectV1Request)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($ezsigntemplateformfieldgroupEditObjectV1Request));\n } else {\n $httpBody = $ezsigntemplateformfieldgroupEditObjectV1Request;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n\n if ($apiKey !== null) {\n $secret = $this->config->getSecret();\n if ($secret !== '') {\n //Let's sign the request\n $headers = array_merge($headers, RequestSignature::getHeadersV1($apiKey, $secret, 'PUT', $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''), $httpBody));\n }\t\t\n }\n\n return new Request(\n 'PUT',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" } ]
[ { "docid": "d4269221f57b87f1efddaf63cf10a15c", "score": "0.639642", "text": "public function ezsigntemplateformfieldgroupGetObjectV2Request($pkiEzsigntemplateformfieldgroupID, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupGetObjectV2'][0])\n {\n\n // verify the required parameter 'pkiEzsigntemplateformfieldgroupID' is set\n if ($pkiEzsigntemplateformfieldgroupID === null || (is_array($pkiEzsigntemplateformfieldgroupID) && count($pkiEzsigntemplateformfieldgroupID) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pkiEzsigntemplateformfieldgroupID when calling ezsigntemplateformfieldgroupGetObjectV2'\n );\n }\n if ($pkiEzsigntemplateformfieldgroupID < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$pkiEzsigntemplateformfieldgroupID\" when calling ObjectEzsigntemplateformfieldgroupApi.ezsigntemplateformfieldgroupGetObjectV2, must be bigger than or equal to 0.');\n }\n \n\n $resourcePath = '/2/object/ezsigntemplateformfieldgroup/{pkiEzsigntemplateformfieldgroupID}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($pkiEzsigntemplateformfieldgroupID !== null) {\n $resourcePath = str_replace(\n '{' . 'pkiEzsigntemplateformfieldgroupID' . '}',\n ObjectSerializer::toPathValue($pkiEzsigntemplateformfieldgroupID),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n\n if ($apiKey !== null) {\n $secret = $this->config->getSecret();\n if ($secret !== '') {\n //Let's sign the request\n $headers = array_merge($headers, RequestSignature::getHeadersV1($apiKey, $secret, 'GET', $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''), $httpBody));\n }\t\t\n }\n\n return new Request(\n 'GET',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "9aee408005cd08d1a9cdb200d263e34d", "score": "0.6392895", "text": "public function ezsigntemplateformfieldgroupCreateObjectV1Request($ezsigntemplateformfieldgroupCreateObjectV1Request, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupCreateObjectV1'][0])\n {\n\n // verify the required parameter 'ezsigntemplateformfieldgroupCreateObjectV1Request' is set\n if ($ezsigntemplateformfieldgroupCreateObjectV1Request === null || (is_array($ezsigntemplateformfieldgroupCreateObjectV1Request) && count($ezsigntemplateformfieldgroupCreateObjectV1Request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ezsigntemplateformfieldgroupCreateObjectV1Request when calling ezsigntemplateformfieldgroupCreateObjectV1'\n );\n }\n\n\n $resourcePath = '/1/object/ezsigntemplateformfieldgroup';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (isset($ezsigntemplateformfieldgroupCreateObjectV1Request)) {\n if (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the body\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($ezsigntemplateformfieldgroupCreateObjectV1Request));\n } else {\n $httpBody = $ezsigntemplateformfieldgroupCreateObjectV1Request;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n\n if ($apiKey !== null) {\n $secret = $this->config->getSecret();\n if ($secret !== '') {\n //Let's sign the request\n $headers = array_merge($headers, RequestSignature::getHeadersV1($apiKey, $secret, 'POST', $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''), $httpBody));\n }\t\t\n }\n\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "794d865a8147e65b170d53fb26cb6fcf", "score": "0.63216996", "text": "public function ezsigntemplateformfieldgroupDeleteObjectV1Request($pkiEzsigntemplateformfieldgroupID, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupDeleteObjectV1'][0])\n {\n\n // verify the required parameter 'pkiEzsigntemplateformfieldgroupID' is set\n if ($pkiEzsigntemplateformfieldgroupID === null || (is_array($pkiEzsigntemplateformfieldgroupID) && count($pkiEzsigntemplateformfieldgroupID) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $pkiEzsigntemplateformfieldgroupID when calling ezsigntemplateformfieldgroupDeleteObjectV1'\n );\n }\n if ($pkiEzsigntemplateformfieldgroupID < 0) {\n throw new \\InvalidArgumentException('invalid value for \"$pkiEzsigntemplateformfieldgroupID\" when calling ObjectEzsigntemplateformfieldgroupApi.ezsigntemplateformfieldgroupDeleteObjectV1, must be bigger than or equal to 0.');\n }\n \n\n $resourcePath = '/1/object/ezsigntemplateformfieldgroup/{pkiEzsigntemplateformfieldgroupID}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($pkiEzsigntemplateformfieldgroupID !== null) {\n $resourcePath = str_replace(\n '{' . 'pkiEzsigntemplateformfieldgroupID' . '}',\n ObjectSerializer::toPathValue($pkiEzsigntemplateformfieldgroupID),\n $resourcePath\n );\n }\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', ],\n $contentType,\n $multipart\n );\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\Utils::jsonEncode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n\n if ($apiKey !== null) {\n $secret = $this->config->getSecret();\n if ($secret !== '') {\n //Let's sign the request\n $headers = array_merge($headers, RequestSignature::getHeadersV1($apiKey, $secret, 'DELETE', $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''), $httpBody));\n }\t\t\n }\n\n return new Request(\n 'DELETE',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e195c5a1ecd00d5d9cca1a6d5ab4ff3e", "score": "0.5963533", "text": "public function groupV2EditGroupRequest($group_id)\n {\n // verify the required parameter 'group_id' is set\n if ($group_id === null || (is_array($group_id) && count($group_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_id when calling groupV2EditGroup'\n );\n }\n\n $resourcePath = '/GroupV2/{groupId}/Edit/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($group_id !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($group_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "4044544084a56196438d059955509938", "score": "0.553811", "text": "public function updateGroupRequest($id, $group_dto = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling updateGroup'\n );\n }\n\n $resourcePath = '/group/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($group_dto)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($group_dto));\n } else {\n $httpBody = $group_dto;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "24e8bae3f0a928f68e40f9a413c2b657", "score": "0.5345903", "text": "public function createGroupRequest($group_dto = null)\n {\n\n $resourcePath = '/group/create';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($group_dto)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($group_dto));\n } else {\n $httpBody = $group_dto;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "01130c0269d33d495de151d98e05b7b6", "score": "0.53276324", "text": "protected function updateGroupRequest($group, $group_oid)\n {\n // verify the required parameter 'group' is set\n if ($group === null || (is_array($group) && count($group) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group when calling updateGroup'\n );\n }\n // verify the required parameter 'group_oid' is set\n if ($group_oid === null || (is_array($group_oid) && count($group_oid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_oid when calling updateGroup'\n );\n }\n\n $resourcePath = '/user/groups/{group_oid}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($group_oid !== null) {\n $resourcePath = str_replace(\n '{' . 'group_oid' . '}',\n ObjectSerializer::toPathValue($group_oid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($group)) {\n $_tempBody = $group;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json; charset=UTF-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "28ff0acc3d8c515a56de6086e44075a2", "score": "0.53208685", "text": "public function formGroupEdit($group_id){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('uri_groups')){\n $this->_app->notFound();\n }\n\n $get = $this->_app->request->get();\n\n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n\n // Get the group to edit\n $group = Group::find($group_id);\n\n // Get a list of all themes\n $theme_list = $this->_app->site->getThemes();\n\n if ($render == \"modal\")\n $template = \"components/common/group-info-modal.twig\";\n else\n $template = \"components/common/group-info-panel.twig\";\n\n // Determine authorized fields\n $fields = ['name', 'new_user_title', 'landing_page', 'theme', 'is_default'];\n $show_fields = [];\n $disabled_fields = [];\n $hidden_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => $field]))\n $show_fields[] = $field;\n else if ($this->_app->user->checkAccess(\"view_group_setting\", [\"property\" => $field]))\n $disabled_fields[] = $field;\n else\n $hidden_fields[] = $field;\n }\n\n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-update.json\");\n $this->_app->jsValidator->setSchema($schema);\n\n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"Edit Group\",\n \"submit_button\" => \"Update group\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/groups/g/$group_id\",\n \"group\" => $group,\n \"themes\" => $theme_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => $hidden_fields\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"delete\"\n ]\n ],\n \"validators\" => $this->_app->jsValidator->rules()\n ]);\n }", "title": "" }, { "docid": "8cebcb85b99806e9687d5c402fceb527", "score": "0.5264913", "text": "public function editgroup ($request) {\n\t\n\t\t// check for actions\n\t\tif ($request->set(\"action\") == \"edit\") {\n\t\t\t$this->groupsModel->write($_REQUEST, FrontController::getParam(0));\n\t\t\t$this->engine->setMessage($this->groupsModel->getMessage());\n\t\t}\n\t\t\n\t\t// output page\n\t\t$group = $this->groupsModel->getById(FrontController::getParam(0));\n\t\tif ($group === false) { throw new \\HttpErrorException(404); }\n\t\t\n\t\t$this->engine->assign(\"form\", $this->groupsForm(\"edit\", $group->getAllData()));\n\t\t$this->engine->display(\"members/editgroup.tpl\");\n\t\n\t}", "title": "" }, { "docid": "a2a8ed736f7c8966264b501ca05b1490", "score": "0.5209836", "text": "public function createGroup(){\n $post = $this->_app->request->post();\n\n // DEBUG: view posted data\n //error_log(print_r($post, true));\n\n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-create.json\");\n\n // Get the alert message stream\n $ms = $this->_app->alerts;\n\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_group')){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post);\n\n // Sanitize data\n $rf->sanitize();\n\n // Validate, and halt on validation errors.\n $error = !$rf->validate(true);\n\n // Get the filtered data\n $data = $rf->data();\n\n // Remove csrf_token from object data\n $rf->removeFields(['csrf_token']);\n\n // Perform desired data transformations on required fields.\n $data['name'] = trim($data['name']);\n $data['new_user_title'] = trim($data['new_user_title']);\n $data['landing_page'] = strtolower(trim($data['landing_page']));\n $data['theme'] = trim($data['theme']);\n $data['can_delete'] = 1;\n\n // Check if group name already exists\n if (Group::where('name', $data['name'])->first()){\n $ms->addMessageTranslated(\"danger\", \"GROUP_NAME_IN_USE\", $post);\n $error = true;\n }\n\n // Halt on any validation errors\n if ($error) {\n $this->_app->halt(400);\n }\n\n // Set default values if not specified or not authorized\n if (!isset($data['theme']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"theme\"]))\n $data['theme'] = \"default\";\n\n if (!isset($data['new_user_title']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"new_user_title\"])) {\n // Set default title for new users\n $data['new_user_title'] = \"New User\";\n }\n\n if (!isset($data['landing_page']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"landing_page\"])) {\n $data['landing_page'] = \"dashboard\";\n }\n\n if (!isset($data['icon']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"icon\"])) {\n $data['icon'] = \"fa fa-user\";\n }\n\n if (!isset($data['is_default']) || !$this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => \"is_default\"])) {\n $data['is_default'] = \"0\";\n }\n\n // Create the group\n $group = new Group($data);\n\n // Store new group to database\n $group->store();\n\n // Success message\n $ms->addMessageTranslated(\"success\", \"GROUP_CREATION_SUCCESSFUL\", $data);\n }", "title": "" }, { "docid": "735beb5285984f9f539c3609f5c8ab39", "score": "0.5203012", "text": "#[Route('/{id}/edit', name: 'edit', methods: ['GET', 'POST'])]\n public function editAction(Request $request, Group $group): Response\n {\n $this->denyAccessUnlessGranted('edit_group', $group);\n\n $form = $this->createForm('App\\Form\\Group\\GroupType', $group);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $this->em->flush();\n\n return $this->redirectToRoute('admin_group_show', ['id' => $group->getId()]);\n }\n\n return $this->render('admin/group/edit.html.twig', [\n 'group' => $group,\n 'form' => $form->createView(),\n ]);\n }", "title": "" }, { "docid": "4067836c19c33bb43f3a8ace86b13853", "score": "0.51984733", "text": "public function edit(Group $group)\n {\n //\n }", "title": "" }, { "docid": "4067836c19c33bb43f3a8ace86b13853", "score": "0.51984733", "text": "public function edit(Group $group)\n {\n //\n }", "title": "" }, { "docid": "4067836c19c33bb43f3a8ace86b13853", "score": "0.51984733", "text": "public function edit(Group $group)\n {\n //\n }", "title": "" }, { "docid": "4067836c19c33bb43f3a8ace86b13853", "score": "0.51984733", "text": "public function edit(Group $group)\n {\n //\n }", "title": "" }, { "docid": "15f88d0e055397348239b3fee94b5bd1", "score": "0.5190566", "text": "public function editAction()\n {\n // try to get the group\n $group = $this->_checkGroupExists($this->getRequest()->getParam('id'));\n \n $this->view->layout()->title = $this->view->t(\n 'Edit group <em>%s</em>', $group->name\n );\n \n // get the form\n $form = $this->_model->getGroupForm($group);\n $form->setAction($this->view->url());\n $this->view->form = $form;\n \n // Post?\n if (!$this->_request->isPost()) {\n return;\n }\n \n // Validate the form\n $isValid = $form->isValid($this->_request->getPost());\n \n // Check if cancel not clicked\n if($form->getElement('cancel')->isChecked()) {\n $this->_goToOverview();\n return;\n }\n \n // Has errors?\n if(!$isValid) {\n return;\n }\n \n // update the group in the DB\n $group = $this->_model->saveGroupForm($form);\n if(!$group) {\n $this->_messenger->addError($this->view->t(\n 'There was a problem saving the group, try again or contact platform administrator.'\n ));\n return;\n }\n \n // we created the group\n $this->_messenger->addSuccess($this->view->t(\n 'Group <strong>%s</strong> updated', $group->name\n ));\n \n $this->_goToOverview();\n }", "title": "" }, { "docid": "e612d22f730c0447a420ef1fd34545aa", "score": "0.51599777", "text": "protected function insertGroupRequest($group)\n {\n // verify the required parameter 'group' is set\n if ($group === null || (is_array($group) && count($group) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group when calling insertGroup'\n );\n }\n\n $resourcePath = '/user/groups';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($group)) {\n $_tempBody = $group;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json; charset=UTF-8']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "71bf2416cb43b8eddc39e82173e2e280", "score": "0.51415753", "text": "function _EditGroup() {\n\t\t\t\n\t\t\t// Get external parameters\n\t\t\t$GroupID = GetPostOrGet('group_id');\n\t\t\t\n\t\t\t// Gether the groupinformation from the database\n\t\t\t$sql = 'SELECT *\n\t\t\t\t\tFROM ' . DB_PREFIX . \"groups\n\t\t\t\t\tWHERE group_id={$GroupID}\";\n\t\t\t$result = $this->_SqlConnection->SqlQuery($sql);\n\t\t\t\n\t\t\tif ($group = mysql_fetch_object($result)) {\n\t\t\t\t\n\t\t\t\t// Free unused dataspace\n\t\t\t\tmysql_free_result($result);\n\t\t\t\t\n\t\t\t\t// Generate the formular using formmaker\n\t\t\t\t$formMaker = new FormMaker($this->_Translation->GetTranslation('todo'), $this->_SqlConnection);\n\t\t\t\t$formMaker->AddForm('edit_group', 'admin.php', $this->_Translation->GetTranslation('save'), $this->_Translation->GetTranslation('group'), 'post');\n\t\t\t\t\n\t\t\t\t$formMaker->AddHiddenInput('edit_group', 'page', 'groups');\n\t\t\t\t$formMaker->AddHiddenInput('edit_group', 'action', 'save_group');\n\t\t\t\t$formMaker->AddHiddenInput('edit_group', 'group_id', $GroupID);\n\t\t\t\t\n\t\t\t\t$formMaker->AddInput('edit_group', 'group_name', 'text', $this->_Translation->GetTranslation('name'), $this->_Translation->GetTranslation('this_is_the_name_of_the_new_group'), $group->group_name);\n\t\t\t\t\n\t\t\t\t$formMaker->AddInput('edit_group', 'group_description', 'text', $this->_Translation->GetTranslation('description'), $this->_Translation->GetTranslation('this_is_a_description_of_the_new_group'), $group->group_description);\n\t\t\t\t\n\t\t\t\t// Generate the template to edit the inputs\n\t\t\t\t$template = \"\\r\\n\\t\\t\\t\\t\" . $formMaker->GenerateSingleFormTemplate($this->_ComaLate, false);\n\t\t\t\treturn $template;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this->_Translation->GetTranslation('this_group_id_does_not_exist');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "47ec72bd66b36e9be7267941c4be79ca", "score": "0.5137887", "text": "public function edit(TemplateFormBuilder $form, $group, $id)\n {\n if (!$this->groups->findBySlug($group)) {\n abort(404);\n }\n\n return $form->render($id);\n }", "title": "" }, { "docid": "fa8927bb21a15ecde2812484350c1df3", "score": "0.51178926", "text": "private function genEditForm($configGroup)\n {\n $form = $this->createForm('accetic_config_group', $configGroup, array(\n 'attr' => array( 'id' => 'morus_accetic_config_inv_edit_form'),\n 'action' => $this->generateUrl('morus_accetic_config_invoice_update'),\n 'method' => 'PUT',\n ));\n \n $form->add('save', 'submit', array(\n 'label' => $this->get('translator')->trans('btn.save'),\n ));\n\n return $form;\n }", "title": "" }, { "docid": "cd9d6476734644dcaadb301fb66c7488", "score": "0.51103806", "text": "public function ezsigntemplateformfieldgroupEditObjectV1AsyncWithHttpInfo($pkiEzsigntemplateformfieldgroupID, $ezsigntemplateformfieldgroupEditObjectV1Request, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupEditObjectV1'][0])\n {\n $returnType = '\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupEditObjectV1Response';\n $request = $this->ezsigntemplateformfieldgroupEditObjectV1Request($pkiEzsigntemplateformfieldgroupID, $ezsigntemplateformfieldgroupEditObjectV1Request, $contentType);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "850ba35e3e6c5813e062fa403130d31a", "score": "0.5032586", "text": "public function updateGroup($group_id){\n $post = $this->_app->request->post();\n\n // DEBUG: view posted data\n //error_log(print_r($post, true));\n\n // Load the request schema\n $requestSchema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-update.json\");\n\n // Get the alert message stream\n $ms = $this->_app->alerts;\n\n // Get the target group\n $group = Group::find($group_id);\n\n // If desired, put route-level authorization check here\n\n // Remove csrf_token\n unset($post['csrf_token']);\n\n // Check authorization for submitted fields, if the value has been changed\n foreach ($post as $name => $value) {\n if ($group->attributeExists($name) && $post[$name] != $group->$name){\n // Check authorization\n if (!$this->_app->user->checkAccess('update_group_setting', ['group' => $group, 'property' => $name])){\n $ms->addMessageTranslated(\"danger\", \"ACCESS_DENIED\");\n $this->_app->halt(403);\n }\n } else if (!$group->attributeExists($name)) {\n $ms->addMessageTranslated(\"danger\", \"NO_DATA\");\n $this->_app->halt(400);\n }\n }\n\n // Check that name is not already in use\n if (isset($post['name']) && $post['name'] != $group->name && Group::where('name', $post['name'])->first()){\n $ms->addMessageTranslated(\"danger\", \"GROUP_NAME_IN_USE\", $post);\n $this->_app->halt(400);\n }\n\n // TODO: validate landing page route, theme, icon?\n\n // Set up Fortress to process the request\n $rf = new \\Fortress\\HTTPRequestFortress($ms, $requestSchema, $post);\n\n // Sanitize\n $rf->sanitize();\n\n // Validate, and halt on validation errors.\n if (!$rf->validate()) {\n $this->_app->halt(400);\n }\n\n // Get the filtered data\n $data = $rf->data();\n\n // Update the group and generate success messages\n foreach ($data as $name => $value){\n if ($value != $group->$name){\n $group->$name = $value;\n // Add any custom success messages here\n }\n }\n\n $ms->addMessageTranslated(\"success\", \"GROUP_UPDATE\", [\"name\" => $group->name]);\n $group->store();\n\n }", "title": "" }, { "docid": "a8a040f3d8a0764afe61d9ad8c67cf36", "score": "0.50231266", "text": "function venture_group_alter(&$form) {\n // Content type editing page passes the same form_id as the content\n // editing form. The cck_dummy_node_form allows to distinguish the two.\n if (!$form['#node']->cck_dummy_node_form) {\n $form['#after_build'][] = 'venture_group_after_build'; \n $form['#submit'] = array('venture_group_submit' => array());\n $form['submit']['#value'] = 'Save Changes';\n \n // Remove Delete button for non-admins\n if (!venture_profile_is_admin()) {\n unset($form['delete']);\n }\n \n $form['body_filter']['body']['#description'] = 'Display a message to group members.';\n $form['body_filter']['body']['#rows'] = 5;\n unset($form['body_filter']['format']);\n \n $form['og_description']['#type'] = 'textarea';\n $form['og_description']['#maxlength'] = 255;\n unset($form['og_description']['#description']);\n \n $form['og_selective']['#title'] = 'Membership';\n $form['og_selective']['#options']['0'] = 'Open - membership requests are accepted immediately';\n $form['og_selective']['#options']['1'] = 'Moderated - membership requests must be approved';\n $form['og_selective']['#description'] = 'Group deals may be submitted to moderated groups only.';\n unset($form['og_selective']['#options'][2]);\n unset($form['og_selective']['#options'][3]);\n \n // Remove formatting instructions\n unset($form['field_group_guidelines'][0]['format']);\n \n venture_group_image_alter($form);\n }\n}", "title": "" }, { "docid": "6db73812d3250cd89507fa02ac60865a", "score": "0.5017964", "text": "public function formGroupCreate(){\n // Access-controlled resource\n if (!$this->_app->user->checkAccess('create_group')){\n $this->_app->notFound();\n }\n\n $get = $this->_app->request->get();\n\n if (isset($get['render']))\n $render = $get['render'];\n else\n $render = \"modal\";\n\n // Get a list of all themes\n $theme_list = $this->_app->site->getThemes();\n\n // Set default values\n $data['is_default'] = \"0\";\n // Set default title for new users\n $data['new_user_title'] = \"New User\";\n // Set default theme\n $data['theme'] = \"default\";\n // Set default icon\n $data['icon'] = \"fa fa-user\";\n // Set default landing page\n $data['landing_page'] = \"dashboard\";\n\n // Create a dummy Group to prepopulate fields\n $group = new Group($data);\n\n if ($render == \"modal\")\n $template = \"components/common/group-info-modal.twig\";\n else\n $template = \"components/common/group-info-panel.twig\";\n\n // Determine authorized fields\n $fields = ['name', 'new_user_title', 'landing_page', 'theme', 'is_default', 'icon'];\n $show_fields = [];\n $disabled_fields = [];\n foreach ($fields as $field){\n if ($this->_app->user->checkAccess(\"update_group_setting\", [\"property\" => $field]))\n $show_fields[] = $field;\n else\n $disabled_fields[] = $field;\n }\n\n // Load validator rules\n $schema = new \\Fortress\\RequestSchema($this->_app->config('schema.path') . \"/forms/group-create.json\");\n $this->_app->jsValidator->setSchema($schema);\n\n $this->_app->render($template, [\n \"box_id\" => $get['box_id'],\n \"box_title\" => \"New Group\",\n \"submit_button\" => \"Create group\",\n \"form_action\" => $this->_app->site->uri['public'] . \"/groups\",\n \"group\" => $group,\n \"themes\" => $theme_list,\n \"fields\" => [\n \"disabled\" => $disabled_fields,\n \"hidden\" => []\n ],\n \"buttons\" => [\n \"hidden\" => [\n \"edit\", \"delete\"\n ]\n ],\n \"validators\" => $this->_app->jsValidator->rules()\n ]);\n }", "title": "" }, { "docid": "1c37de0383441b214ee9c59f9da64428", "score": "0.5013361", "text": "public function ezsigntemplateformfieldgroupEditObjectV1Async($pkiEzsigntemplateformfieldgroupID, $ezsigntemplateformfieldgroupEditObjectV1Request, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupEditObjectV1'][0])\n {\n return $this->ezsigntemplateformfieldgroupEditObjectV1AsyncWithHttpInfo($pkiEzsigntemplateformfieldgroupID, $ezsigntemplateformfieldgroupEditObjectV1Request, $contentType)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "3f491db0e29c7d282929599e9018a384", "score": "0.5007633", "text": "function gameForm($object=null){\n global $action; \n ?>\n\n \n <!-- action is global -->\n <fieldset>\n <legend><?php if($object->getId()!=null) echo \"EDIT\"; else echo \"ADD\";?> Group</legend>\n <form action=\"<?=base_path?>?page=game&update=<?=$object->getId()?>\" method=post >\n\n Name:&nbsp;&nbsp;&nbsp;<input type=\"text\" name=\"name\" value=\"<?=$object->getName()?>\" >\n <br> <br>\n Description:&nbsp;&nbsp;&nbsp;<textarea cols=\"\" rows=\"\"><?=$object->getDescription()?></textarea>\n <br> <br>\n Face:&nbsp;&nbsp;&nbsp;<input type=\"text\" name=\"no_of_face\" value=\"<?=$object->getFace()?>\" >\n <br><br>\n Interval:&nbsp;&nbsp;&nbsp;<input type=\"text\" name=\"interval\" value=\"<?=$object->getInterval()?>\" >\n <br><br>\n Publish: <input type=\"checkbox\" name=\"is_publish\" <? if($object->getIsPublish()==1){echo \"checked\";} ?>>\n <br><br>\n \n <input type=submit name=\"addORupdate\" value=\"<?php if($object->getId()==null){ echo \"add\"; }else{ echo \"update\"; } ?>\">\n\n </form>\n </fieldset>\n <?php }", "title": "" }, { "docid": "0c51e52deb73cf11374d40ff55d0966d", "score": "0.49934748", "text": "public function update(Request $request, Group $group)\n {\n //\n }", "title": "" }, { "docid": "0c51e52deb73cf11374d40ff55d0966d", "score": "0.49934748", "text": "public function update(Request $request, Group $group)\n {\n //\n }", "title": "" }, { "docid": "0c51e52deb73cf11374d40ff55d0966d", "score": "0.49934748", "text": "public function update(Request $request, Group $group)\n {\n //\n }", "title": "" }, { "docid": "0c51e52deb73cf11374d40ff55d0966d", "score": "0.49934748", "text": "public function update(Request $request, Group $group)\n {\n //\n }", "title": "" }, { "docid": "455b51d80c05225849936cc1d240e388", "score": "0.49911296", "text": "public function ___setImportData(Template $template, array $data) {\n\n\t\t$template->set('_importMode', true); \n\t\t$fieldgroupData = array();\n\t\t$changes = array();\n\t\t$_data = $this->getExportData($template);\n\n\t\tif(isset($data['fieldgroupFields'])) $fieldgroupData['fields'] = $data['fieldgroupFields'];\n\t\tif(isset($data['fieldgroupContexts'])) $fieldgroupData['contexts'] = $data['fieldgroupContexts'];\n\t\tunset($data['fieldgroupFields'], $data['fieldgroupContexts'], $data['id']);\n\n\t\tforeach($data as $key => $value) {\n\t\t\tif($key == 'fieldgroups_id' && !ctype_digit(\"$value\")) {\n\t\t\t\t$fieldgroup = $this->wire('fieldgroups')->get($value);\n\t\t\t\tif(!$fieldgroup) {\n\t\t\t\t\t$fieldgroup = $this->wire(new Fieldgroup());\n\t\t\t\t\t$fieldgroup->name = $value;\n\t\t\t\t}\n\t\t\t\t$oldValue = $template->fieldgroup ? $template->fieldgroup->name : '';\n\t\t\t\t$newValue = $fieldgroup->name;\n\t\t\t\t$error = '';\n\t\t\t\ttry {\n\t\t\t\t\t$template->setFieldgroup($fieldgroup);\n\t\t\t\t} catch(\\Exception $e) {\n\t\t\t\t\t$this->trackException($e, false);\n\t\t\t\t\t$error = $e->getMessage();\n\t\t\t\t}\n\t\t\t\tif($oldValue != $fieldgroup->name) {\n\t\t\t\t\tif(!$fieldgroup->id) $newValue = \"+$newValue\";\n\t\t\t\t\t$changes['fieldgroups_id'] = array(\n\t\t\t\t\t\t'old' => $template->fieldgroup->name,\n\t\t\t\t\t\t'new' => $newValue,\n\t\t\t\t\t\t'error' => $error\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$template->errors(\"clear\");\n\t\t\t$oldValue = isset($_data[$key]) ? $_data[$key] : '';\n\t\t\t$newValue = $value;\n\t\t\tif(is_array($oldValue)) $oldValue = wireEncodeJSON($oldValue, true, false);\n\t\t\telse if(is_object($oldValue)) $oldValue = (string) $oldValue;\n\t\t\tif(is_array($newValue)) $newValue = wireEncodeJSON($newValue, true, false);\n\t\t\telse if(is_object($newValue)) $newValue = (string) $newValue;\n\n\t\t\t// everything else\n\t\t\tif($oldValue == $newValue || (empty($oldValue) && empty($newValue))) {\n\t\t\t\t// no change needed\n\t\t\t} else {\n\t\t\t\t// changed\n\t\t\t\ttry {\n\t\t\t\t\t$template->set($key, $value);\n\t\t\t\t\tif($key == 'roles') $template->getRoles(); // forces reload of roles (and resulting error messages)\n\t\t\t\t\t$error = $template->errors(\"clear\");\n\t\t\t\t} catch(\\Exception $e) {\n\t\t\t\t\t$this->trackException($e, false);\n\t\t\t\t\t$error = array($e->getMessage());\n\t\t\t\t}\n\t\t\t\t$changes[$key] = array(\n\t\t\t\t\t'old' => $oldValue,\n\t\t\t\t\t'new' => $newValue,\n\t\t\t\t\t'error' => (count($error) ? $error : array())\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif(count($fieldgroupData)) {\n\t\t\t$_changes = $template->fieldgroup->setImportData($fieldgroupData);\n\t\t\tif($_changes['fields']['new'] != $_changes['fields']['old']) {\n\t\t\t\t$changes['fieldgroupFields'] = $_changes['fields'];\n\t\t\t}\n\t\t\tif($_changes['contexts']['new'] != $_changes['contexts']['old']) {\n\t\t\t\t$changes['fieldgroupContexts'] = $_changes['contexts'];\n\t\t\t}\n\t\t}\n\n\t\t$template->errors('clear');\n\t\t$template->set('_importMode', false); \n\n\t\treturn $changes;\n\t}", "title": "" }, { "docid": "cfdd8751ad4314b8db904eec32762be9", "score": "0.49877805", "text": "function edit_group_fields_save($group_id){\n global $wpdb, $bp;\n\n // If the edit form has been submitted, save the edited details\n if (\n (bp_is_group() && 'edit-details' == $bp->action_variables[0])\n && ($bp->is_item_admin || $bp->is_item_mod)\n && isset( $_POST['save'] )\n ) {\n /* Check the nonce first. */\n if ( !check_admin_referer( 'groups_edit_group_details' ) )\n return false;\n\n $to_save = array();\n\n foreach($_POST as $data => $value){\n if ( substr($data, 0, 5) === 'bpge-' )\n $to_save[$data] = $value;\n }\n\n foreach($to_save as $key => $value){\n $key = substr($key, 5);\n if ( !is_array($value) ) {\n $data = wp_kses_data($value);\n $data = force_balance_tags($value);\n }else{\n $value = array_map(\"wp_kses_data\", $value);\n $value = array_map(\"force_balance_tags\", $value);\n $data = json_encode($value);\n }\n\n $wpdb->update(\n $wpdb->posts,\n array(\n 'post_content' => $data, // string\n ),\n array( 'ID' => $key ),\n array( '%s' ), // data format\n array( '%d' ) // where format\n );\n\n }\n\n do_action('bpge_group_fields_save', $this, $to_save);\n }\n }", "title": "" }, { "docid": "177cd8d83b3865bc9f5d0ca5326910d4", "score": "0.4963229", "text": "public function addtsgroupAction(Request $request,$idgroup)\n {\n\t\t//Initialisation et déclaration des variables\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$ContractEntity = $em->getRepository('BoAdminBundle:Contracts');\n\t\t$oGroupEntity = $em->getRepository('BoAdminBundle:Group');\n \t$timesheet = new Timesheet();\n\t\t$aContract=$aGroups=$aStudents=$aTeacher=$oContract=$message=null;\n\t\t$valid=1;\n\t\t//Récupérer les information de l'utilisateur connecté\n\t\t$employee = $this->getConnectedEmployee();\n\t\t//Récupérer le type de timesheet par défaut : \"Teaching\"\n\t\t$aTypets = $em->getRepository('BoAdminBundle:Typets')->findByName(\"Teaching\");\n\t\tif(isset($aTypets[0])) $timesheet->setTypets($aTypets[0]);\n\t\t//Récupérer les informations liées au group \n\t\t$oGroup=$oGroupEntity->find($idgroup);\n\t\tif($oGroup){\n\t\t\t$aContract = $em->getRepository('BoAdminBundle:Contracts')->findByGroup($oGroup);\n\t\t\t$aStudents = $em->getRepository('BoAdminBundle:Students')->StudentAndContractKey($aContract);\n\t\t\t//Check if a absence is entered for this student and if it's of type \"N-S\" or \"ABS\"\n\t\t\t$aTst = $em->getRepository('BoAdminBundle:TsStudent')->getAllBy($aStudents,date(\"Y-m-d\"));\n\t\t\t$aTeacherSchedule=$em->getRepository('BoAdminBundle:Agenda')->getGroupSchedule($oGroup,$employee);\n\t\t\tif(isset($aTeacherSchedule[0])){\n\t\t\t\t$timesheet = $this->initialize($timesheet,$aTeacherSchedule[0]);\n\t\t\t}else{\n\t\t\t\t$timesheet = $this->initialize($timesheet);\n\t\t\t}\n\t\t}\n\t\t//Verify if the teacher is authoriwed to change the form date\n\t\t$tsdateautho = $this->getTsDateAuthorized($employee);\n\t\t$formtype = ($tsdateautho==1)?\"Bo\\AdminBundle\\Form\\TimesheetType3\":\"Bo\\AdminBundle\\Form\\TimesheetType4\";\n\t\t$form = $this->createForm($formtype, $timesheet);\t\t\n\t\t$form->handleRequest($request);\n if($form->isSubmitted() && $form->isValid()){\n\t\t\t$legend = $this->getHighPresenceBy($oGroup,$this->getTsTime($timesheet,\"am\"),$this->getTsTime($timesheet,\"pm\"),1);\n\t\t\t$timesheet->setLegende($legend);\t\n\t\t\t//Get timesheet validation level ($iTvl) setting, interger\n\t\t\t//If $iTvl=1 students have to valide the timesheet at the first step else they do not\n\t\t\t$timesheet->setGroup($oGroup);\t\n\t\t\t$timesheet->setEmployee($employee);\t\n\t\t\t$RepTs = $em->getRepository('BoAdminBundle:Timesheet');\n\t\t\tif($RepTs->existEmployeeTS($timesheet,$employee)==0){\n\t\t\t\t$iTvl = $em->getRepository('BoAdminBundle:Param')->getParam(\"timesheet_validation_level\",5);\n\t\t\t\tif($iTvl==2) $timesheet->setValidatedStatus();\t\t\n\t\t\t\t$oTsweek = $this->getTsWeek($timesheet->getDdate());\n\t\t\t\t$timesheet->setTsweek($oTsweek);\n\t\t\t\t$timesheet->setMonth($timesheet->getDdate()->format(\"m\"));\n\t\t\t\t$timesheet->setYear($timesheet->getDdate()->format(\"Y\"));\n\t\t\t\t$timesheet=$this->setTsAmOrPM($timesheet);\n\t\t\t\t$aAttendance = $this->getArrayAttendance($request,$aStudents);\n\t\t\t\t$res = $this->updateEntity($timesheet);\n\t\t\t\tif($res>0){\n\t\t\t\t\t$res = $this->createTsStudent($timesheet,$aAttendance);\n\t\t\t\t\tif(!$this->getExistPP($timesheet)){\n\t\t\t\t\t\t$oPP = $this->createPP($timesheet);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t/*\n\t\t\t\tenvoie de mail à l'apprenant pour validation\n\t\t\t\t*/\n\t\t\t\treturn $this->redirectToRoute('home_timesheet_index');\t\n\t\t\t\n\t\t\t}else{\n\t\t\t\t$message=array('type'=>\"Warning\",'texte'=>$this->getErrorMessage(2));\n\t\t\t}\n\t\t}\n//print_r($this->getPresence($aStudents));\n//exit(0);\n return $this->render('BoHomeBundle:Timesheet:addtsgroup.html.twig', array(\n 'timesheet' => $timesheet,\n\t\t\t'message'=>$message,\n\t\t\t'contract'=>$oContract,\n\t\t\t'group'=>$oGroup,\n\t\t\t'authorization'=>$tsdateautho,\n\t\t\t'url'=> $request->headers->get('referer'),\n\t\t\t'ddate'=>new \\DateTime(),\n\t\t\t'idgroup'=>(isset($oGroup) and $oGroup!=null)?$oGroup->getid():null,\n\t\t\t'students'=>$aStudents,\n\t\t\t//'absleg'=>$this->getStudentAbsLegend($aStudents),\n\t\t\t'presence'=>$this->getPresence($aStudents),\n\t\t\t'tam'=>$this->getTsTime($timesheet,\"am\"),\n\t\t\t'tpm'=>$this->getTsTime($timesheet,\"pm\"),\n\t\t\t'tst'=>$aTst,\n\t\t\t'employee'=>$employee,\n \t\t'form' => $form->createView(),\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"timesheet\"\t\t\t\n ));\n }", "title": "" }, { "docid": "a343a8599a7d6799fb10c8f7fd36e6b4", "score": "0.49393123", "text": "public function testModifyAdditionalServicesGroupUsingPUT()\n {\n }", "title": "" }, { "docid": "6be394a33ef0c16930bcbc2277f5b966", "score": "0.49252096", "text": "public function groupV2GetGroupRequest($group_id)\n {\n // verify the required parameter 'group_id' is set\n if ($group_id === null || (is_array($group_id) && count($group_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_id when calling groupV2GetGroup'\n );\n }\n\n $resourcePath = '/GroupV2/{groupId}/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($group_id !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($group_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "965ad189a44336ed3d69e4b40a2e9de6", "score": "0.4919595", "text": "public function update_fields_for_object( $object, WP_REST_Request $request, $object_type = '' );", "title": "" }, { "docid": "ba34d3f18ebf4ddc6c816d4ad8b5c58a", "score": "0.4888869", "text": "function edit_group_fields(){\n $fields = bpge_get_group_fields('publish');\n\n if (empty($fields))\n return false;\n\n foreach( $fields as $field ){\n $field->desc = get_post_meta($field->ID, 'bpge_field_desc', true);\n $field->options = get_post_meta($field->ID, 'bpge_field_options', true);\n\n $req_text = $req_class = false;\n if ( $field->pinged == 'req' ) {\n $req_text = '* ';\n $req_class = 'required';\n }\n\n echo '<label class=\"'.$req_class.'\" for=\"bpge-' . $field->ID . '\">' . $req_text . $field->post_title . '</label>';\n\n switch($field->post_excerpt){\n case 'text':\n echo '<input id=\"bpge-' . $field->ID . '\" name=\"bpge-' . $field->ID . '\" type=\"text\" value=\"' . $field->post_content . '\" />';\n break;\n case 'textarea':\n echo '<textarea id=\"bpge-' . $field->ID . '\" name=\"bpge-' . $field->ID . '\">' . $field->post_content . '</textarea>';\n break;\n case 'select':\n echo '<select id=\"bpge-' . $field->ID . '\" name=\"bpge-' . $field->ID . '\">';\n echo '<option value=\"\">-------</option>';\n foreach($field->options as $option){\n echo '<option ' . ($field->post_content == $option ? 'selected=\"selected\"' : '') .' value=\"' . $option . '\">' . $option . '</option>';\n }\n echo '</select>';\n break;\n case 'checkbox':\n echo '<span id=\"bpge-' . $field->ID . '\">';\n $content = json_decode($field->post_content);\n foreach($field->options as $option){\n echo '<input ' . ( in_array($option, (array)$content) ? 'checked=\"checked\"' : '') .' type=\"checkbox\" name=\"bpge-' . $field->ID . '[]\" value=\"' . $option . '\"> ' . $option . '<br />';\n }\n echo '</span>';\n break;\n case 'radio':\n echo '<span id=\"bpge-' . $field->ID . '\">';\n foreach($field->options as $option){\n echo '<input ' . ($field->post_content == $option ? 'checked=\"checked\"' : '') .' type=\"radio\" name=\"bpge-' . $field->ID . '\" value=\"' . $option . '\"> ' . $option . '<br />';\n }\n echo '</span>';\n if ($req_text)\n echo '<a class=\"clear-value\" href=\"javascript:clear( \\'bpge-' . $field->ID . '\\' );\">'. __( 'Clear', 'bpge' ) .'</a>';\n break;\n case 'datebox':\n echo '<input id=\"bpge-' . $field->ID . '\" class=\"datebox\" name=\"bpge-' . $field->ID . '\" type=\"text\" value=\"' . $field->post_content . '\" />';\n break;\n }\n if ( ! empty($field->desc) ) echo '<p class=\"description\">' . $field->desc . '</p>';\n }\n do_action('bpge_group_fields_edit', $this, $fields);\n }", "title": "" }, { "docid": "938e47b2ad794d9e12bf378b1293baa5", "score": "0.48673055", "text": "function venture_group_post_alter(&$form) {\n global $user;\n \n // Content type editing page passes the same form_id as the content\n // editing form. The cck_dummy_node_form allows to distinguish the two.\n if (!$form['#node']->cck_dummy_node_form) {\n $form['#submit'] = array('venture_group_post_submit' => array());\n \n // Remove the Audience field\n unset($form['og_nodeapi']['visible']);\n if (!$form['og_nodeapi']['invisible']['og_groups']) {\n $gid = arg(0) == 'group' && arg(2) == 'post' ? arg(1) : $form['#node']->og_groups[0];\n $form['og_nodeapi']['invisible']['og_groups'] = array(\n '#type' => 'value',\n '#value' => array($gid => $gid)\n );\n }\n \n $form['body_filter']['body']['#required'] = TRUE;\n unset($form['body_filter']['format']);\n \n // Remove Delete button for non-admins\n if (!venture_profile_is_admin()) {\n unset($form['delete']);\n }\n }\n}", "title": "" }, { "docid": "b21dae68791ba39134c30d1bb2b329f2", "score": "0.48554465", "text": "public function edit(facbook_group $facbook_group)\n {\n //\n }", "title": "" }, { "docid": "64b675c91c3e0aaee778f4a493ae6f1f", "score": "0.4848832", "text": "public function editAction() {\r\n $postData = $this->getRequest()->getPost();\r\n\r\n if (!isset($postData['parent_id'])) {\r\n return;\r\n }\r\n\r\n if ((int) $postData['parent_id'] == false) {\r\n return;\r\n }\r\n\r\n $block = $this->getLayout()\r\n ->createBlock('classifieds/form_element_fieldset')\r\n ->getCategoryHtml($postData['parent_id']);\r\n //->getAttributesFieldset($postData['parent_id']);\r\n $this->getResponse()->setBody($block->toHtml());\r\n }", "title": "" }, { "docid": "a3e3ee707ce383e39cca9e4e5f22f304", "score": "0.48468912", "text": "public function saveEditGroupAction()\n {\n $params = Zend_Json_Decoder::decode($this->request->getParam('groups'));\n $groupModel = new Admin_Model_DbTable_Groups;\n $groupRow = new Admin_Model_DbRow_Group($groupModel->find($params['id']));\n $errors = array();\n\n IF(strtolower($params['name']) !== strtolower($groupRow->get('name'))) {\n $dubGroupRow = $groupModel->fetchRowByGroupName($params['name']);\n IF($dubGroupRow) {\n $errors[] = 'The group already exists';\n }\n }\n\n IF($groupRow->get('id') && count($errors) === 0) {\n $groupRow->fromArray($params);\n $groupModel->update($groupRow->toDbArray(), $groupRow->get('id'));\n RETURN $this->responseSuccess(array(\n $groupRow->toDbArray()\n ));\n } \n\n RETURN $this->responseFailure('Error editing the group', $errors);\n\n }", "title": "" }, { "docid": "0aab5281f0d45ecb74d2c0a57172bf99", "score": "0.48385504", "text": "function form_addgroup() {\n $oForm = new KTForm;\n $oForm->setOptions(array(\n 'identifier' => 'ktcore.groups.add',\n 'label' => _kt(\"Create a new group\"),\n 'submit_label' => _kt(\"Create group\"),\n 'action' => 'creategroup',\n 'fail_action' => 'addgroup',\n 'cancel_action' => 'main',\n 'context' => $this,\n ));\n $oForm->setWidgets(array(\n array('ktcore.widgets.string',array(\n 'name' => 'group_name',\n 'label' => _kt(\"Group Name\"),\n 'description' => _kt('A short name for the group. e.g. <strong>administrators</strong>.'),\n 'value' => null,\n 'required' => true,\n )),\n array('ktcore.widgets.boolean',array(\n 'name' => 'sysadmin',\n 'label' => _kt(\"System Administrators\"),\n 'description' => _kt('Should all the members of this group be given <strong>system</strong> administration privileges?'),\n 'value' => null,\n )), \n ));\n \n $oForm->setValidators(array(\n array('ktcore.validators.string', array(\n 'test' => 'group_name',\n 'output' => 'group_name',\n )),\n array('ktcore.validators.boolean', array(\n 'test' => 'sysadmin',\n 'output' => 'sysadmin',\n )),\n ));\n \n // if we have any units.\n $aUnits = Unit::getList();\n if (!PEAR::isError($aUnits) && !empty($aUnits)) {\n $oForm->addWidgets(array(\n array('ktcore.widgets.entityselection', array(\n 'name' => 'unit',\n 'label' => _kt('Unit'),\n 'description' => _kt('Which Unit is this group part of?'),\n 'vocab' => $aUnits,\n 'label_method' => 'getName',\n 'simple_select' => false,\n 'unselected_label' => _kt(\"No unit\"), \n )),\n array('ktcore.widgets.boolean',array(\n 'name' => 'unitadmin',\n 'label' => _kt(\"Unit Administrators\"),\n 'description' => _kt('Should all the members of this group be given <strong>unit</strong> administration privileges?'),\n 'important_description' => _kt(\"Note that its not possible to set a group without a unit as as having unit administration privileges.\"),\n 'value' => null,\n )), \n )); \n \n $oForm->addValidators(array(\n array('ktcore.validators.entity', array(\n 'test' => 'unit',\n 'class' => 'Unit',\n 'output' => 'unit',\n )),\n array('ktcore.validators.boolean', array(\n 'test' => 'unitadmin',\n 'output' => 'unitadmin',\n )), \n ));\n }\n \n return $oForm;\n }", "title": "" }, { "docid": "532106506cb3b3273773d11966b52bef", "score": "0.4837039", "text": "private function createEditForm(UserGroup $entity)\n {\n $form = $this->createForm($this->get(\"form.type.usergroup\"), $entity, array(\n 'action' => $this->generateUrl('usergroup_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "d6ab11bab907f3af7848a38f1d6496cc", "score": "0.48367342", "text": "public function update(DocumentTemplateRequest $request, DocumentGroup $documentGroup)\n {\n //$documentGroup->company_id = $request->company;\n $documentGroup->name = $request->name;\n $documentGroup->tab_name = $request->tab_name;\n $documentGroup->save();\n\n return redirect('/dashboard/document_templates')->with('message', 'Successfully updated document group!');\n }", "title": "" }, { "docid": "d0ddf89e7585c54cf2caba74c9d1ece6", "score": "0.4835427", "text": "public function edit(GroupType $type)\n {\n //\n }", "title": "" }, { "docid": "f7d2d87dc4a582156d6162b720ac306a", "score": "0.48258707", "text": "protected function initGroupForm($a_group_id = 0)\n\t{\n\t\tinclude_once './Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroup.php';\n\t\t$group = new ilConsultationHourGroup($a_group_id);\n\t\t\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));\n\t\t\n\t\tif($a_group_id)\n\t\t{\n\t\t\t$form->setTitle($GLOBALS['lng']->txt('cal_ch_grp_update_tbl'));\n\t\t\t$form->addCommandButton('updateGroup', $GLOBALS['lng']->txt('save'));\n\t\t\t$form->addCommandButton('groupList', $GLOBALS['lng']->txt('cancel'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setTitle($GLOBALS['lng']->txt('cal_ch_grp_add_tbl'));\n\t\t\t$form->addCommandButton('saveGroup', $GLOBALS['lng']->txt('save'));\n\t\t\t$form->addCommandButton('appointmentList', $GLOBALS['lng']->txt('cancel'));\n\t\t}\n\t\t\n\t\t$title = new ilTextInputGUI($GLOBALS['lng']->txt('title'),'title');\n\t\t$title->setMaxLength(128);\n\t\t$title->setSize(40);\n\t\t$title->setRequired(true);\n\t\t$title->setValue($group->getTitle());\n\t\t$form->addItem($title);\n\t\t\n\t\t$multiple = new ilNumberInputGUI($GLOBALS['lng']->txt('cal_ch_grp_multiple'),'multiple');\n\t\t$multiple->setRequired(true);\n\t\t$multiple->setMinValue(1);\n\t\t$multiple->setSize(1);\n\t\t$multiple->setMaxLength(2);\n\t\t$multiple->setInfo($GLOBALS['lng']->txt('cal_ch_grp_multiple_info'));\n\t\t$multiple->setValue($group->getMaxAssignments());\n\t\t$form->addItem($multiple);\n\t\t\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "7a6a7bf8af185bc39c6e058cd90264e8", "score": "0.48203167", "text": "public function build_extended_editing_form()\n {\n $counter = 1; // Index 1 means the first child, index 0 is the 'parent' course group.\n $data_set = $this->course_group->get_children(false);\n\n while ($next = $data_set->next_result())\n {\n $course_groups = $next;\n $this->build_header($course_groups->get_name());\n\n $this->addElement(\n 'text',\n CourseGroup::PROPERTY_NAME . $counter,\n Translation::getInstance()->getTranslation('Title', null, Utilities::COMMON_LIBRARIES),\n array(\"size\" => \"50\")\n );\n\n $this->addElement(\n 'select',\n CourseGroup::PROPERTY_PARENT_ID . $counter,\n Translation::getInstance()->getTranslation('GroupParent'),\n $this->get_groups()\n );\n $this->addRule(\n CourseGroup::PROPERTY_PARENT_ID . $counter,\n Translation::getInstance()->getTranslation('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES),\n 'required'\n );\n\n $this->addElement(\n 'text',\n CourseGroup::PROPERTY_MAX_NUMBER_OF_MEMBERS . $counter,\n Translation::getInstance()->getTranslation('MaxNumberOfMembers'),\n 'size=\"4\"'\n );\n $this->addRule(\n CourseGroup::PROPERTY_MAX_NUMBER_OF_MEMBERS . $counter,\n Translation::getInstance()->getTranslation(\n 'ThisFieldShouldBeNumeric', null, Utilities::COMMON_LIBRARIES\n ),\n 'regex',\n '/^[0-9]*$/'\n );\n\n $this->addElement(\n 'textarea',\n CourseGroup::PROPERTY_DESCRIPTION . $counter,\n Translation::getInstance()->getTranslation('Description'),\n 'cols=\"100\"'\n );\n $this->addElement(\n 'checkbox',\n CourseGroup::PROPERTY_SELF_REG . $counter,\n Translation::getInstance()->getTranslation('Registration'),\n Translation::getInstance()->getTranslation('SelfRegAllowed')\n );\n $this->addElement(\n 'checkbox',\n CourseGroup::PROPERTY_SELF_UNREG . $counter,\n null,\n Translation::getInstance()->getTranslation('SelfUnRegAllowed')\n );\n\n $this->add_tools($course_groups);\n\n $this->addElement('hidden', CourseGroup::PROPERTY_ID . $counter);\n $this->addElement('hidden', CourseGroup::PROPERTY_PARENT_ID . $counter . 'old');\n $this->addElement('hidden', CourseGroup::PROPERTY_COURSE_CODE . $counter);\n\n $this->setDefaults_extended($counter, $course_groups);\n $this->close_header();\n $counter ++;\n }\n $this->close_header();\n }", "title": "" }, { "docid": "ad4b0f467695f8e8e846123ec5b3842b", "score": "0.4818426", "text": "public function groupV2EditFounderOptionsRequest($group_id)\n {\n // verify the required parameter 'group_id' is set\n if ($group_id === null || (is_array($group_id) && count($group_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_id when calling groupV2EditFounderOptions'\n );\n }\n\n $resourcePath = '/GroupV2/{groupId}/EditFounderOptions/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($group_id !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($group_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "2f9554b726badc1fe409467116f492e0", "score": "0.48166016", "text": "public function betterbrowser_acf_update_field_group($group)\n {\n //wp_die($group);\n $this->current_group_being_saved = $group['key'];\n\n add_action('acf/settings/save_json', [$this, 'betterbrowser_acf_save_json'], 9999);\n\n // return\n return $group;\n }", "title": "" }, { "docid": "c8004e169689b2ee74d9eb31ec60553b", "score": "0.48158035", "text": "public function addtsgroupAction(Request $request,$idgroup)\n {\n\t\t//Initialisation et déclaration des variables\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t$ContractEntity = $em->getRepository('BoAdminBundle:Contracts');\n\t\t$oGroupEntity = $em->getRepository('BoAdminBundle:Group');\n $timesheet = new Timesheet();\n\t\t$aContract=$aGroups=$aStudents=$aTeacher=$oContract=$message=null;\n\t\t$valid=1;\n\t\t//Récupérer les information de l'utilisateur connecté\n\t\t$user=$this->getTokenUser();\n\t\t$employee=$user?$user->getEmployee():null;\n\t\t//Récupérer le type de timesheet par défaut : \"Teaching\"\n\t\t$aTypets = $em->getRepository('BoAdminBundle:Typets')->findByName(\"Teaching\");\n\t\tif(isset($aTypets[0])) $timesheet->setTypets($aTypets[0]);\n\t\t//Récupérer les informations liées au group \n\t\t$oGroup=$oGroupEntity->find($idgroup);\n\t\tif($oGroup){\n\t\t\t$aContract = $em->getRepository('BoAdminBundle:Contracts')->findByGroup($oGroup);\n\t\t\t$aStudents = $em->getRepository('BoAdminBundle:Students')->StudentAndContractKey($aContract);\n\t\t\t$aTeacherSchedule=$em->getRepository('BoAdminBundle:TeacherSchedule')->getGroupSchedule($oGroup,$employee);\n\t\t\tif(isset($aTeacherSchedule[0])){\n\t\t\t\t\t$timesheet = $this->initialize($timesheet,$aTeacherSchedule[0]);\n\t\t\t\t}else{\n\t\t\t\t\t$timesheet = $this->initialize($timesheet);\n\t\t\t}\n\t\t}\n $form = $this->createForm('Bo\\AdminBundle\\Form\\TimesheetType2', $timesheet);\n\t\t$form->handleRequest($request);\n if($form->isSubmitted() && $form->isValid()){\n\t\t\t//Get timesheet validation level ($iTvl) setting, interger\n\t\t\t//If $iTvl=1 students have to valide the timesheet at the first step else they do not\n\t\t\t$timesheet->setGroup($oGroup);\t\n\t\t\t$timesheet->setEmployee($employee);\t\n\t\t\t$RepTs = $em->getRepository('BoAdminBundle:Timesheet');\n\t\t\tif($RepTs->existEmployeeTS($timesheet,$employee)==0){\n\t\t\t\t$iTvl = $em->getRepository('BoAdminBundle:Param')->getParam(\"timesheet_validation_level\",5);\n\t\t\t\tif($iTvl==2) $timesheet->setValidatedStatus();\t\t\n\t\t\t\t$oTsweek = $this->getTsWeek($timesheet->getDdate());\n\t\t\t\t$timesheet->setTsweek($oTsweek);\n\t\t\t\t$aAttendance = $this->getArrayAttendance($request,$aStudents);\n\t\t\t\t$res = $this->updateEntity($timesheet);\n\t\t\t\tif($res>0){\n\t\t\t\t\t$res = $this->createTsStudent($timesheet,$aAttendance);\n\t\t\t\t\tif(!$this->getExistPP($timesheet)) $oPP = $this->createPP($timesheet);\n\t\t\t\t} \n\t\t\t\t/*\n\t\t\t\tenvoie de mail à l'apprenant pour validation\n\t\t\t\t*/\n\t\t\t\treturn $this->redirectToRoute('dash_timesheet_index');\t\n\t\t\t\n\t\t\t}else{\n\t\t\t\t$message=array('type'=>\"Warning\",'texte'=>$this->getErrorMessage(2));\n\t\t\t}\n\t\t}\n return $this->render('BoAdvisorsBundle:Timesheet:addtsgroup.html.twig', array(\n 'timesheet' => $timesheet,\n\t\t\t'message'=>$message,\n\t\t\t'contract'=>$oContract,\n\t\t\t'group'=>$oGroup,\n\t\t\t'idgroup'=>(isset($oGroup) and $oGroup!=null)?$oGroup->getid():null,\n\t\t\t'students'=>$aStudents,\n\t\t\t'employee'=>$user?$user->getEmployee():null,\n 'form' => $form->createView(),\n\t\t\t'pm'=>\"tabeau-bord\",\n\t\t\t'sm'=>\"timesheet\"\t\t\t\n ));\n }", "title": "" }, { "docid": "0a175cade4934b1354080ba6b8d699ce", "score": "0.48073462", "text": "public function groupV2EditOptionalConversationRequest($conversation_id, $group_id)\n {\n // verify the required parameter 'conversation_id' is set\n if ($conversation_id === null || (is_array($conversation_id) && count($conversation_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $conversation_id when calling groupV2EditOptionalConversation'\n );\n }\n // verify the required parameter 'group_id' is set\n if ($group_id === null || (is_array($group_id) && count($group_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_id when calling groupV2EditOptionalConversation'\n );\n }\n\n $resourcePath = '/GroupV2/{groupId}/OptionalConversations/Edit/{conversationId}/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($conversation_id !== null) {\n $resourcePath = str_replace(\n '{' . 'conversationId' . '}',\n ObjectSerializer::toPathValue($conversation_id),\n $resourcePath\n );\n }\n // path params\n if ($group_id !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($group_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "22f182e33478ebd0a226e36702bf4d83", "score": "0.48058903", "text": "public function postEditGroup($id)\n {\n $input = array(\n 'name' => Input::get('name')\n );\n\n $valid = array(\n 'name' => 'required'\n );\n\n $v = Validator::make($input, $valid);\n if($v->fails()) {\n return Redirect::back()->withInput()->withErrors($v);\n }\n\n $group = CommodityGroup::getCommodityGroupByID($id);\n $group->name = Input::get('name');\n $group->parent_id = Input::get('parent_id');\n\n if($group->save()) {\n return Redirect::route('management.products.groups')->with('flashSuccess', 'Cập nhật nhóm hàng thành công!');\n }else {\n return Redirect::back()->with('flashError', 'Lỗi hệ thống, vui lòng thử lại!');\n }\n }", "title": "" }, { "docid": "2202a07e6fa03914d7b5d0bd25ed63b4", "score": "0.48054826", "text": "public function testUpdateGroup()\n {\n $group = Tinebase_Group::getInstance()->getGroupByName($this->objects['initialGroup']->name);\n \n // set data array\n $data = $this->objects['updatedGroup']->toArray();\n $data['id'] = $group->getId();\n \n // add group members array\n $groupMembers = array($this->objects['user']->accountId);\n \n $result = $this->_json->saveGroup($data, $groupMembers);\n\n $this->assertGreaterThan(0,sizeof($result['groupMembers'])); \n $this->assertEquals($this->objects['updatedGroup']->description, $result['description']); \n }", "title": "" }, { "docid": "4270edd537a4abb5a04834983a7163d8", "score": "0.47967058", "text": "public function update(GroupEditRequest $request)\n {\n if($request->messages())\n {\n Utils::OutputResponse(405, $request->messages());\n }\n\n Group::whereId($request['form_edit_id'])->update([\n \"name\" => $request['form_edit_name']\n ]);\n\n\n Utils::OutputResponse(200, \"Group was edited successfully\");\n }", "title": "" }, { "docid": "3eb951e67dfd4628c91d3b40ee60a545", "score": "0.47965276", "text": "public function edit(ProductGroup $productGroup)\n {\n //\n }", "title": "" }, { "docid": "b9b7630272b24554bb911aaa3931e888", "score": "0.47925732", "text": "public function ezsigntemplateformfieldgroupCreateObjectV1WithHttpInfo($ezsigntemplateformfieldgroupCreateObjectV1Request, string $contentType = self::contentTypes['ezsigntemplateformfieldgroupCreateObjectV1'][0])\n {\n $request = $this->ezsigntemplateformfieldgroupCreateObjectV1Request($ezsigntemplateformfieldgroupCreateObjectV1Request, $contentType);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 201:\n if ('\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupCreateObjectV1Response' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupCreateObjectV1Response' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupCreateObjectV1Response', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupCreateObjectV1Response';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\eZmaxAPI\\Model\\EzsigntemplateformfieldgroupCreateObjectV1Response',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "ce0cb8528d5bd5239255661965b22d1c", "score": "0.47828928", "text": "public function actionCreate($template_id)\n {\n $this->layout = \"main_modules\";\n $model = new ApproveGroup();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if($model->groupType->group_type_name == 'อาจารย์ประจำวิชา'){\n return $this->redirect(['view-subject', 'id' => $model->group_id]);\n }else if ($model->groupType->group_type_name == 'อาจารย์ที่ปรึกษา'){\n $groupID = $model->group_id;\n $insertTeacher = new ApprovePosition();\n if (isset($_POST)) {\n $insertTeacher = new ApprovePosition();\n $insertTeacher->position_id = '9999';\n $insertTeacher->position_name = 'อาจารย์ที่ปรึกษา';\n $insertTeacher->position_order = '1';\n $insertTeacher->approve_group_id = $groupID;\n $insertTeacher->save();\n }\n return $this->redirect(['view', 'id' => $model->group_id]);\n }else{\n return $this->redirect(['view', 'id' => $model->group_id]);\n }\n\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'template_id' => $template_id,\n ]);\n }", "title": "" }, { "docid": "3c7eafe79a5a2f574154107c97676a2d", "score": "0.47763836", "text": "public function update(Request $request, Group $group):GroupResource\n {\n $attributes = request()->validate([\n 'name' => ['required', 'string', 'max:100', 'unique:projects'],\n 'description' => ['required', 'string', 'max:1000'],\n ]);\n\n $group->update($attributes);\n return new GroupResource($group);\n }", "title": "" }, { "docid": "82fc14fe7ddc04de05fad1e2fb35279b", "score": "0.477074", "text": "function submit(\\User $user = null) {\n $serv = \\Factory::getServiceGroupService();\n $newValues = getSGroupDataFromWeb();\n $sg = $serv->getServiceGroup($newValues['ID']);\n\n try {\n $sg = $serv->editServiceGroup($sg, $newValues, $user);\n $params = array('serviceGroup' => $sg);\n show_view(\"service_group/submit_edited_service_group.php\", $params);\n } catch (Exception $e) {\n show_view('error.php', $e->getMessage());\n die();\n }\n}", "title": "" }, { "docid": "201378cb75292b63c466b931985b785c", "score": "0.47415614", "text": "public function getFormProductGroupCreate()\n {\n return $this->productgroup->getCreateForm();\n }", "title": "" }, { "docid": "e766b2d1bedc113552e6ef38230955d4", "score": "0.47362462", "text": "public function update(GroupRequest $request,Group $group) \n { \n logger()->info(__METHOD__);\n $this->model->storeGroup($group);\n return $this->getView(); \n }", "title": "" }, { "docid": "2a2d5096db47f09893dac505efa758d4", "score": "0.47335008", "text": "public function saveGroupAction()\n {\n\t\t$this -> _helper -> layout -> disableLayout();\n\t\t\n\t\t$resume = Engine_Api::_() -> getItem('ynresume_resume', $this ->_getParam('resume_id'));\n\t\t\n\t\t//get profile question\n\t\t$topStructure = Engine_Api::_() -> fields() -> getFieldStructureTop('ynresume_resume');\n\t\tif (count($topStructure) == 1 && $topStructure[0] -> getChild() -> type == 'profile_type') {\n\t\t\t$profileTypeField = $topStructure[0] -> getChild();\n\t\t\t$formArgs = array(\n\t\t\t\t'topLevelId' => $profileTypeField -> field_id, \n\t\t\t\t'topLevelValue' => 1,\n\t\t\t\t'heading' => $this ->_getParam('field_id'),\n\t\t\t);\n\t\t}\n\t\t\n\t \t $form = new Ynresume_Form_Custom_Create( array(\n\t\t\t'formArgs' => $formArgs,\n\t\t ));\n\t\t \n\t\t// Check method and data validity.\n\t\t$posts = $this -> getRequest() -> getPost();\n\t\tif (!$form -> isValid($posts)) {\n\t\t\t$form_messages = $form->getMessages();\n\t\t\techo Zend_Json::encode(array('error_code' => 1, 'message' => $form_messages));\n\t\t\texit ;\n\t\t}\n\t\t\n\t\t//save custom field values\n\t\t$customdefaultfieldform = $form -> getSubForm('fields');\n\t\t$customdefaultfieldform -> setItem($resume);\n\t\t$customdefaultfieldform -> saveValues();\n\t\techo Zend_Json::encode(array('error_code' => 0));\n\t\texit();\n }", "title": "" }, { "docid": "710ca56f088584fe9ae531e5444b28da", "score": "0.47285107", "text": "public function editGroup( $group )\n\t{\n\t\t$g = $this->model->find($group['id']);\n\t\t$g->update([\n\t\t\t'name' => $group['name'],\n\t\t\t'description' => $group['description']\n\t\t]);\n\t\t$g->save();\n\t}", "title": "" }, { "docid": "dbcb5973c9e8322844caeb8aa6bbb42e", "score": "0.4719939", "text": "function addContactGroup () {\r\n\r\n\tglobal $p;\r\n\r\n\t$contactgroup = ((isset($p['contactgroup_name'])) ? $p['contactgroup_name'] : null);\r\n\tif (empty($contactgroup)) return false;\r\n\t$contactgroup = prepareDBValue($contactgroup);\r\n\r\n\t$contactgroup_short = ((isset($p['contactgroup_name_short'])) ? $p['contactgroup_name_short'] : null);\r\n\tif (empty($contactgroup_short)) return false;\r\n\t$contactgroup_short = prepareDBValue($contactgroup_short);\r\n\t$timeframe_id = ((isset($p['timeframe'])) ? $p['timeframe'] : '0');\r\n\t$timezone_id = ((isset($p['timezone'])) ? $p['timezone'] : '372');\r\n $timeframe_id = prepareDBValue($timeframe_id);\r\n $timezone_id = prepareDBValue($timezone_id);\r\n\t\r\n\t$contactgroup_view_only = (isset($p['contactgroup_view_only'])) ? (int)$p['contactgroup_view_only'] : '0';\r\n\r\n\t// insert new group\r\n\t$query = sprintf(\r\n\t\t'insert into contactgroups (name,name_short,view_only,timezone_id,timeframe_id) values (\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\',\\'%s\\')',\r\n\t\t$contactgroup,\r\n\t\t$contactgroup_short,\r\n\t\t$contactgroup_view_only,\r\n\t\t$timezone_id,\r\n\t\t$timeframe_id\r\n\t);\r\n\tqueryDB($query);\r\n\r\n\t// set new contactgroup to 'edit'\r\n\t$query = sprintf(\r\n\t\t'select id from contactgroups where name=\\'%s\\' and name_short=\\'%s\\' and timezone_id=\\'%s\\' and timeframe_id=\\'%s\\'',\r\n\t\t$contactgroup,\r\n\t\t$contactgroup_short,\r\n\t\t$timezone_id,\r\n\t\t$timeframe_id\r\n\t);\r\n\t$dbResult = queryDB($query);\r\n\tif (!is_array($dbResult)) return false;\r\n\tif(!count($dbResult)) return false;\r\n\t$p['contactgroup'] = $dbResult[0]['id'];\r\n\r\n\treturn true;\r\n\r\n}", "title": "" }, { "docid": "07a36e0c4b96616b0c3be82b25976a63", "score": "0.47180223", "text": "public function group_post()\n {\n if(!$this->post('groupID'))\n {\n $this->response('Invalid Parameter');\n }\n $parameter = array();\n $parameter['groupID'] = $this->post('groupID');\n $parameter['Name'] = $this->post('group_name');\n \n $user =$this->Api_model->updateGroup($parameter);\n $this->response($user,200); \n }", "title": "" }, { "docid": "5a9d9e16914a58e6671e65e8ba34f021", "score": "0.47105575", "text": "public function save_group($args)\n\t{\n\n\t\tif (!isset($args['id'], $args['fields'], $this->data_to_save[$args['id']]) || !is_array($args['fields'])) {\n\t\t\treturn;\n\t\t}\n\n\t\t$field_group = new CMB2_Field(array(\n\t\t\t'field_args' => $args,\n\t\t\t'object_type' => $this->object_type(),\n\t\t\t'object_id' => $this->object_id(),\n\t\t));\n\t\t$base_id = $field_group->id();\n\t\t$old = $field_group->get_data();\n\t\t// Check if group field has sanitization_cb\n\t\t$group_vals = $field_group->sanitization_cb($this->data_to_save[$base_id]);\n\t\t$saved = array();\n\t\t$field_group->index = 0;\n\n\t\tforeach (array_values($field_group->fields()) as $field_args) {\n\t\t\t$field = new CMB2_Field(array(\n\t\t\t\t'field_args' => $field_args,\n\t\t\t\t'group_field' => $field_group,\n\t\t\t));\n\t\t\t$sub_id = $field->id(true);\n\n\t\t\tforeach ((array)$group_vals as $field_group->index => $post_vals) {\n\n\t\t\t\t// Get value\n\t\t\t\t$new_val = isset($group_vals[$field_group->index][$sub_id])\n\t\t\t\t\t? $group_vals[$field_group->index][$sub_id]\n\t\t\t\t\t: false;\n\n\t\t\t\t// Sanitize\n\t\t\t\t$new_val = $field->sanitization_cb($new_val);\n\n\t\t\t\tif ('file' == $field->type() && is_array($new_val)) {\n\t\t\t\t\t// Add image ID to the array stack\n\t\t\t\t\t$saved[$field_group->index][$new_val['field_id']] = $new_val['attach_id'];\n\t\t\t\t\t// Reset var to url string\n\t\t\t\t\t$new_val = $new_val['url'];\n\t\t\t\t}\n\n\t\t\t\t// Get old value\n\t\t\t\t$old_val = is_array($old) && isset($old[$field_group->index][$sub_id])\n\t\t\t\t\t? $old[$field_group->index][$sub_id]\n\t\t\t\t\t: false;\n\n\t\t\t\t$is_updated = (!empty($new_val) && $new_val != $old_val);\n\t\t\t\t$is_removed = (empty($new_val) && !empty($old_val));\n\t\t\t\t// Compare values and add to `$updated` array\n\t\t\t\tif ($is_updated || $is_removed) {\n\t\t\t\t\t$this->updated[] = $base_id . '::' . $field_group->index . '::' . $sub_id;\n\t\t\t\t}\n\n\t\t\t\t// Add to `$saved` array\n\t\t\t\t$saved[$field_group->index][$sub_id] = $new_val;\n\n\t\t\t}\n\t\t\t$saved[$field_group->index] = array_filter($saved[$field_group->index]);\n\t\t}\n\t\t$saved = array_filter($saved);\n\n\t\t$field_group->update_data($saved, true);\n\t}", "title": "" }, { "docid": "7869825001577a86764a99173f17d5d6", "score": "0.4688182", "text": "public function editAction(Request $request, Group $group)\n {\n $deleteForm = $this->createDeleteForm($group);\n $editForm = $this->createForm('Shm\\UserBundle\\Form\\GroupType', $group);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $this->getDoctrine()->getManager()->flush();\n\n return $this->redirectToRoute('groups_show', array('id' => $group->getId()));\n }\n\n return $this->render('ShmUserBundle:Group:edit.html.twig', array(\n 'group' => $group,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "8cb26d87fe053d8ad0f7b3ccf33f9502", "score": "0.4680828", "text": "public static function save($id){\n\n\t\t$obj = new self($id);\n\n\t\t$obj->fields['group_name']['value']\t\t= $_POST['group_name'];\n\t\t$obj->fields['group_status']['value']\t= isset($_POST['group_status']) ? number($_POST['group_status']) : 0;\n\t\t$obj->fields['group_hidden']['value']\t= '0';\n\t\t$obj->fields['group_isroot']['value']\t= isset($_POST['group_isroot']) ? number($_POST['group_isroot']) : 0;\n\t\t$obj->fields['group_timestamp']['value']\t=\tdate(\"Y-m-d H:i:s\");\n\n\t\tif(Login::get(\"group_isroot\") == 1):\n\t\t\tforeach($_POST as $pk => $pv):\n\t\t\t\tif(strpos($pk, \"_permission_\") !== false):\n\t\t\t\t\t$key = explode(\"|\", str_replace(\"_permission_\",\"|\",$pk));\n\t\t\t\t\t$permission[$key[0]][$key[1]] = true;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\n\t\t\t$permission['group']['update'] = true;\n\t\t\t$obj->fields['group_permission']['value'] = json_encode($permission);\n\t\tendif;\n\n\t\tif($id > 0):\n\n\t\t\t$res = self::select($id);\n\t\t\tif(Login::get(\"group_isroot\") == 1):\n\t\t\t\t$obj->fields['group_isroot']['value'] = isset($_POST['group_isroot']) ? number($_POST['group_isroot']) : 0;\n\t\t\telse:\n\t\t\t\t$obj->fields['group_isroot']['value'] = $res[0]['group_isroot'];\n\t\t\tendif;\n\t\t\tif(!isset($permission)):\n\t\t\t\t$obj->fields['group_permission']['value'] = $res[0]['group_permission'];\n\t\t\tendif;\n\n\t\t\tif(count($res) > 0 && is_array($res)):\n\n\t\t\t\t$obj->fields['group_random_seed']['value'] = $res[0]['group_random_seed'];\n\n\t\t\tendif;\n\n\t\tendif;\n\n\t\tif($obj->validate($obj,$id)):\n\t\t\t$obj->update($obj, $id);\n\t\telse:\n\t\t\treturn $obj->error;\n\t\tendif;\n\t}", "title": "" }, { "docid": "0307ac27457ec69fca6f84d3f69bdfcf", "score": "0.46799913", "text": "function deleteTemplateGroup() {\n if (!$this->isAuthenticated())\n exit;\n\n $group = $this->input->post('element');\n echo json_encode($this->adminmodel->deleteTemplateGroup($group));\n }", "title": "" }, { "docid": "7685bac816089469d80aa0d04ad06998", "score": "0.46777034", "text": "public function testCreateAdditionalServicesGroupUsingPOST()\n {\n }", "title": "" }, { "docid": "e7428783a742c2102c37946d933dd214", "score": "0.46676353", "text": "public function store(FieldGroupRequest $request)\n {\n auth()->user()->tenant->customFieldGroups()->create([\n 'name' => $request->input('name'),\n ]);\n\n return response()\n ->json($this->response());\n }", "title": "" }, { "docid": "2f00871947cc4038e36b92d07b102c76", "score": "0.466262", "text": "public static function updateGroup($group)\r\n {\r\n \r\n }", "title": "" }, { "docid": "d900350783b507ece9703a9845aff239", "score": "0.4662351", "text": "function saveObject( $task )\n{\n\t// Modif Joomla 1.6/1.7+\n $mainframe = JFactory::getApplication();\n\t$error=false;\n\t// Check for request forgeries\n\tJRequest::checkToken() or jexit( 'Invalid Token' );\n $log = &JLog::getInstance('com_hecmailing.log.php');\n $log->addEntry(array('comment' => '======= saveObject Group ========='));\n\t// Initialize variables\n\t$db\t\t=& JFactory::getDBO();\n\t$row\t=& JTable::getInstance('groupe', 'Table');\n\t$tmppost = JRequest::get( 'post' );\n\t$tmpfile = JRequest::get( 'FILES' );\n\t// $tmpfile = JRequest::getVar('jform', null, 'files', 'array');\n\t$post=array();\n\t$post['grp_id_groupe'] = $tmppost['grp_id_groupe'];\n\t$post['grp_nm_groupe'] = $tmppost['grp_nm_groupe'];\n\t$post['grp_cm_groupe'] = $tmppost['grp_cm_groupe'];\n\t$post['published'] = $tmppost['published'];\n\tif (!$row->bind( $post )) {\n\t\tJError::raiseError(500, $row->getError() );\n\t}\n\t\n\n\t// pre-save checks\n\tif (!$row->check()) {\n\t\tJError::raiseError(500, $row->getError() );\n\t}\n\n\t// save the changes\n\tif (!$row->store()) {\n\t\tJError::raiseError(500, $row->getError() );\n\t}\n\t\n\t\n\t$nbold = $tmppost['nbold'];\n\t$nbnew= $tmppost['nbnew'];\n\t\n\t// Traite les suppression de detail\n\t$todel = $tmppost['todel'];\n if (isset($todel))\n {\n $listToDel = split(';',$todel);\n \n foreach ($listToDel as $item)\n {\n \tif ($item)\n \t{\n\t $query = \"delete from #__hecmailing_groupdetail Where gdet_id_detail=\".$item;\n\t $db->setQuery($query);\n\t if (!($result=$db->query()))\n\t {\n\t \t$log->addEntry(array('comment'=>'query to delete detail='.$query));\n\t \t$log->addEntry(array('comment'=>\"Error deleting detail =\".$db->stderr()));\n\t \t\t$error = \"Error Deleting group detail\";\n\t }\n\t else\n\t {\n\t \t$log->addEntry(array('comment'=>'query='.$query));\n\t }\n \t}\n }\n }\n else \n \t$log->addEntry(array('comment'=>'No detail to delete '.$todel));\n \n /*if ($tmpfile)\n foreach ($tmpfile as $k=>$e)\n {\n $log->addEntry(array('comment'=>'FILE:'.$k.\"=\".$e));\n if ($e)\n foreach($e as $kk=>$i)\n {\n $log->addEntry(array('comment'=>'FILE:'.$kk.\"=+\".$i));\n }\n }*/\n /* Ajoute les detail au groupe */\n for ($i=1;$i<=$nbnew;$i++)\n {\n $v = $tmppost['new'.$i];\n \n if (isset($v))\n {\n \n $tv = split(\";\",$v);\n $t=$tv[0];\n $n=$tv[1];\n $l='';\n if ($t==4)\n {\n $l = $n;\n $n=0;\n }\n $log->addEntry(array('comment'=>'Adding new detail #'.$i.\"= type \".$t.\" code \".$n.\" value \".$l));\n \n $detail = new stdClass();\n\t $detail->grp_id_groupe = $row->grp_id_groupe;\n\t $detail->gdet_cd_type = $t;\n\t $detail->gdet_id_value = $n;\n\t $detail->gdet_vl_value =$l; \n\t if (!$db->insertObject( '#__hecmailing_groupdetail', $detail, '' )) {\n \t$log->addEntry(array('comment'=>\"Error=\".$db->stderr()));\n \t$error = \"Error Adding group detail\";\n \t\n \t }\n }\n }\n // Traite import fichier\n $msgimport='';\n $f = $tmpfile['import_file'];\n if (isset($f) && strlen($f['name'])>0)\n {\n\t\n \n \n\t $log->addEntry(array('comment'=>\"Import File=\".$f['name']));\n if (!$f['error'] )\n {\n\t\t $log->addEntry(array('comment'=>\"File Ok=\".$f['tmp_name']));\n $ndelim = $tmppost['import_delimiter'];\n\t\t $ldelim = $tmppost['import_linedelimiter'];\n switch($ndelim)\n {\n case '1':\n $delim=\"\\t\";\n break;\n case '2':\n $delim=\";\";\n break;\n case '3':\n $delim=\",\";\n break;\n case '4':\n $delim=\" \";\n break;\n default:\n $delim=\"*\";\n \n }\n\t\t switch($ldelim)\n {\n case '1':\n $ldelim=\"\\r\\n\";\n break;\n case '2':\n $ldelim=\"\\n\";\n break;\n case '3':\n $ldelim=\"\\r\";\n break;\n default:\n $ldelim=\"*\";\n \n }\n $col = (int)$tmppost['import_column'];\n $len =$tmppost['import_len'];\n if (isset($len ))\n {\n $len=(int)$len;\n } \n\t\t if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 5) \n\t\t {\n\t\t\t\t$php5=true;\n\t\t } \n\t\t else \n\t\t {\n\t\t\t$php5=false;\n\t\t }\n \t$nimport=0;\t \n\t\tini_set(\"auto_detect_line_endings\", true);\n $handle = @fopen($f['tmp_name'], \"rb\");\n if ($handle) {\n while (!feof($handle)) {\n\t\t\t\tif ($php5 && $ldelim!=\"*\")\n\t\t\t\t{\n\t\t\t\t\t$buffer = stream_get_line($handle, 4096, \"\\r\"); \n\t\t\t\t\t$log->addEntry(array('comment'=>'stream_get_line('.$ldelim.','.$delim.'):'.$buffer));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$buffer = fgets($handle, 4096);\n\t\t\t\t\t$log->addEntry(array('comment'=>'fgets (Col='.$delim.'):'.$buffer));\n\t\t\t\t}\n $adr=false;\n\t\t\t \n if (strlen($buffer)>0 && $buffer)\n {\n\t\t\t\t$buffer=rtrim($buffer,\"\\r\\n\");\n if ($delim==\"*\")\n {\n if ($col+$len<strlen($buffer))\n {\n $adr = substr($buffer,$col,$len);\n }\n }\n else\n {\n $cols = split($delim,$buffer);\n if ($col<count($cols))\n {\n $adr=$cols[$col];\n }\n }\n }\n if ($adr)\n {\n $log->addEntry(array('comment'=>'import '.$buffer.\"=\".$col.\".\".$adr.\".\".$delim));\n $query = \"insert into #__hecmailing_groupdetail (grp_id_groupe,gdet_cd_type,gdet_id_value,gdet_vl_value)\n values (\".$row->grp_id_groupe.\",4,0,\".$db->Quote( $adr, true ).\")\";\n\t\t\t\t$db->setQuery($query);\n\t\t\t\tif (!$db->query())\n\t\t\t\t{\n\t\t\t\t\t$log->addEntry(array('comment'=>\"Error=\".$db->stderr()));\n\t\t\t\t\t$error = \"Error Adding email \".adr.\" from file :\".$db->stderr();\n\t\t\t\t}\n else\n\t\t\t\t{\n\t\t\t\t\t$log->addEntry(array('comment'=>\"import=\".$adr.\" OK(\".$query.\")\"));\n }\n\t\t\t\t$nimport++;\n\t\t\t}\n $msgimport = \" - \".$nimport.\" adresses import&eacute;e(s)\";\n }\n fclose($handle);\n }\n\t\telse\n\t\t{\n\t\t\t$error = \"Probleme ouverture fichier \".$f['tmp_name'].\"(\".$f['size'].\")\";\n\t\t}\n \n }\n\t else\n\t {\n\t\tswitch ($f['error']){ \n case 1: // UPLOAD_ERR_INI_SIZE \n\t\t\t\t\t\n $error=\"Le fichier dépasse la limite autorisée par le serveur (fichier php.ini) !\"; \n break; \n case 2: // UPLOAD_ERR_FORM_SIZE \n $error=\"Le fichier dépasse la limite autorisée dans le formulaire HTML !\"; \n break; \n case 3: // UPLOAD_ERR_PARTIAL \n $error=\"L'envoi du fichier a été interrompu pendant le transfert !\"; \n break; \n case 4: // UPLOAD_ERR_NO_FILE \n $error=\"Le fichier que vous avez envoyé a une taille nulle !\"; \n break; \n } \n\t\t $log->addEntry(array('error'=>$error));\n\t }\n }\n \n // Traite permissions\n $nboldperm = $tmppost['nboldperm'];\n\t$nbnewperm= $tmppost['nbnewperm'];\n\t$todelperm = $tmppost['todelperm'];\n\n if (isset($todelperm))\n {\n $listToDel = split(';',$todelperm);\n if ($listToDel)\n foreach ($listToDel as $item)\n {\n \t$k = split('-', $item);\n \t$g = $k[0];\n \t$u=$k[1];\n \t$jg=$k[2];\n \tif ($u!=\"0\")\n \t{\n \t\t$cond = \"userid=\".$u;\n \t\t$jg=\"null\";\n \t}\n \telse\n \t{\n \t\t$cond = \"groupid=\".$jg;\n \t\t$u=\"null\";\n \t}\n\t\tif ($g!=\"\")\n\t\t{\n\t\t\t$query = \"delete from #__hecmailing_rights Where grp_id_groupe=\".$g.\" and \".$cond;\n\t\t\t$db->setQuery($query);\n\t\t\tif (!$db->query())\n\t\t\t{\n\t\t\t\t$log->addEntry(array('comment'=>\"Error=\".$db->stderr()));\n\t\t\t\t$error = \"Error Deletin group perm \".$i;\n\t\t\t}\n\t\t}\n \n }\n }\n \n for ($i=1;$i<=$nbnewperm;$i++)\n {\n $v = $tmppost['newperm'.$i];\n $right_send=$tmppost['newperm_send'.$i];\n\t$right_manage=$tmppost['newperm_manage'.$i];\n\t$right_grant=$tmppost['newperm_grant'.$i];\n if (isset($v))\n {\n \n $tv = split(\";\",$v);\n $t=$tv[0];\n $n=$tv[1];\n $l='';\n if ($t==4)\n {\n $l = $n;\n $n=0;\n }\n \n if ($t==2)\n { \n \t$u=$n;\n \t$g=null;\n }\n else\n {\n \t$u=null;\n \t$g=$n;\n }\n\t \n\t $rights=0;\n\t if ($right_send==1 || $right_send==\"on\") $rights+=1;\n\t if ($right_manage==1 || $right_manage==\"on\") $rights+=2;\n\t if ($right_grant==1 || $right_grant==\"on\") $rights+=4;\n\t $log->addEntry(array('comment'=>'newperm'.$i.\"=\".$t.\".\".$n.\" => \".$rights. \"{\".$right_send.\",\".$right_manage.\",\".$right_grant.\"}\"));\n /*$query = \"insert into #__hecmailing_rights (grp_id_groupe,userid,groupid)\n values (\".$row->grp_id_groupe.\",\".$u.\",\".$g.\")\";\n \n $db->execute($query);\n $log->addEntry(array('comment'=>\"Query=\".$query));*/\n $perm = new stdClass();\n\t $perm->grp_id_groupe = $row->grp_id_groupe;\n\t $perm->userid = $u;\n\t $perm->groupid = $g;\n\t $perm->flag = $rights;\n\t \n\t if (!$db->insertObject( '#__hecmailing_rights', $perm, '' )) {\n \t$log->addEntry(array('comment'=>\"Error=\".$db->stderr()));\n \t$error = \"Error Adding group perm\";\n \t\n \t }\n }\n }\n\t$log->addEntry(array('comment'=>'nboldperm'.$nboldperm));\n for ($i=1;$i<=$nboldperm;$i++)\n {\n $v = $tmppost['oldperm'.$i];\n\t$log->addEntry(array('comment'=>'oldperm'.$i.\"=\".$tmppost['oldperm'.$i]));\n\tif (isset($v))\n {\n \t$tv = split(\";\",$v);\n\t\t$right_send=$tmppost['perm_send'.$i];\n\t\t$right_manage=$tmppost['perm_manage'.$i];\n\t\t$right_grant=$tmppost['perm_grant'.$i];\n\t\t$rights=0;\n\t\tif ($right_send==1) $rights+=1;\n\t\tif ($right_manage==1) $rights+=2;\n\t\tif ($right_grant==1) $rights+=4;\n\t\t$query=\"update #__hecmailing_rights set flag=\".$rights.\" Where grp_id_groupe=\".$row->grp_id_groupe.\" \";\n\t\t\n\t\tif ($tv[1]!=\"0\") {\t$query.=\" AND userid=\".$tv[1]; }\n\t\telse {\t$query.=\" AND groupid=\".$tv[2]; }\n\t\t$log->addEntry(array('comment'=>'update right query'.$query.\" => \".$rights. \"{\".$right_send.\",\".$right_manage.\",\".$right_grant.\"}\"));\n\t\t$db->setQuery($query);\n\t\tif (!$db->query())\n\t\t{\n\t\t\t$log->addEntry(array('comment'=>\"Error=\".$db->stderr()));\n\t\t\t$error = \"Error Updating group perm\";\n \t\n\t\t}\n\t}\n\t}\n\t$row->checkin();\n\t\n\n\tswitch ($task)\n\t{\n\t\tcase 'apply':\n\t\tcase 'save2copy':\n\t\t\tif (!$error)\n\t\t\t\t$msg\t= JText::_( 'GROUPE_SAVED' );\n\t\t\telse \n\t\t\t\t$msg=$error;\n\t\t\t$link\t= 'index.php?option=com_hecmailing&task=edit&cid[]='. $row->grp_id_groupe .'';\n\t\t\tbreak;\n\n\t\tcase 'save2new':\n\t\t\tif (!$error)\n\t\t\t\t$msg\t= JText::sprintf( 'CHANGES_TO_X_SAVED', 'Group' );\n\t\t\telse \n\t\t\t\t$msg=$error;\n\t\t\t$link\t= 'index.php?option=com_hecmailing&task=edit';\n\t\t\tbreak;\n\n\t\tcase 'save':\n\t\tdefault:\n\t\t\tif (!$error)\n\t\t\t\t$msg\t= JText::_( 'GROUPE_SAVED') .$msgimport;\n\t\t\telse \n\t\t\t\t$msg=$error;\n\t\t\t$link\t= 'index.php?option=com_hecmailing';\n\t\t\tbreak;\n\t}\n\n\t$mainframe->redirect( $link, $msg );\n}", "title": "" }, { "docid": "b8e65028e414ddfde8d1ea3445ac1e06", "score": "0.46576148", "text": "public function createAction()\n {\n if (!$this->_helper->requireUser->isValid()) return;\n $viewer = Engine_Api::_()->user()->getViewer();\n\n // Check authorization to create group.\n if (!$this->_helper->requireAuth()->setAuthParams('group', null, 'create')->isValid()) return;\n\n // Navigation\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('advgroup_main');\n\n $this->_helper->content\n //->setNoRender()\n ->setEnabled();\n\n // Create Form\n if ($this->_getParam('parent') && is_numeric($this->_getParam('parent'))) {\n $this->view->form = $form = new Advgroup_Form_Create(array('parent_id' => $this->_getParam('parent')));\n } else {\n $this->view->form = $form = new Advgroup_Form_Create();\n }\n\n if ($this->_getParam('parent')) {\n $form->removeElement('auth_sub_group');\n $parent_id = $this->_getParam('parent');\n if (is_numeric($parent_id)) {\n $parent_group = Engine_Api::_()->advgroup()->getParent($parent_id);\n if (!$parent_group || $parent_group->is_subgroup) {\n return $this->_helper->requireSubject->forward();\n } else if (!$parent_group->membership()->isMember($viewer) || !$parent_group->authorization()->isAllowed(null, 'sub_group')) {\n return $this->_helper->requireAuth->forward();\n }\n $subGroupNum = Engine_Api::_()->advgroup()->getNumberValue('group', $viewer->level_id, 'numberSubgroup');\n if ($parent_group->countSubGroups() >= $subGroupNum) {\n $this->view->errorMessage = $this->view->translate(\"You have reached the limit of sub group.\");\n return;\n }\n }\n }\n\n $arrPlugins = array('ynwiki' => 'auth_wiki', 'ynevent' => 'auth_event', 'ynlistings' => 'auth_listing');\n foreach ($arrPlugins as $key => $permission) {\n if (!Engine_Api::_()->advgroup()->checkYouNetPlugin($key)) {\n $form->removeElement($permission);\n }\n }\n\n if (!Engine_Api::_()->advgroup()->checkYouNetPlugin('ynfilesharing')) {\n $form->removeElement('auth_folder');\n $form->removeElement('auth_file_upload');\n $form->removeElement('auth_file_down');\n }\n\n $music_enable = Engine_Api::_()->advgroup()->checkYouNetPlugin('music');\n $mp3music_enable = Engine_Api::_()->advgroup()->checkYouNetPlugin('mp3music');\n $socialmusic_enable = Engine_Api::_()->hasModuleBootstrap('ynmusic');\n if (!$music_enable && !$mp3music_enable & !$socialmusic_enable) {\n $form->removeElement('auth_music');\n }\n\n // Populate category list.\n $categories = Engine_Api::_()->getDbtable('categories', 'advgroup')->getAllCategoriesAssoc();\n $form->category_id->setMultiOptions($categories);\n\n if (count($form->category_id->getMultiOptions()) <= 1) {\n $form->removeElement('category_id');\n }\n\n // Check method and data validity.\n if (!$this->getRequest()->isPost()) {\n return;\n }\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n // Process\n $values = $form->getValues();\n\n $values['location'] = Zend_Json::encode(array(\n 'location' => $values['location_address'],\n 'latitude' => $values['lat'],\n 'longitude' => $values['long'],\n ));\n $values['latitude'] = $values['lat'];\n $values['longitude'] = $values['long'];\n $values['user_id'] = $viewer->getIdentity();\n if ($this->_getParam('parent') && is_numeric($this->_getParam('parent'))) {\n $values['is_subgroup'] = 1;\n $values['parent_id'] = $this->_getParam('parent');\n }\n $db = Engine_Api::_()->getDbtable('groups', 'advgroup')->getAdapter();\n $db->beginTransaction();\n\n try {\n // Create group\n $table = Engine_Api::_()->getDbtable('groups', 'advgroup');\n $group = $table->createRow();\n $group->setFromArray($values);\n $group->save();\n\n if (isset($group->advgroup_id)) {\n $group->advgroup_id = $group->getIdentity();\n $group->save();\n }\n\n // Add tags\n $tags = preg_split('/[,]+/', $values['tags']);\n $group->tags()->addTagMaps($viewer, $tags);\n\n $search_table = Engine_Api::_()->getDbTable('search', 'core');\n $select = $search_table->select()\n ->where('type = ?', 'group')\n ->where('id = ?', $group->getIdentity());\n $row = $search_table->fetchRow($select);\n if ($row) {\n $row->keywords = $values['tags'];\n $row->save();\n } else {\n $row = $search_table->createRow();\n $row->type = 'group';\n $row->id = $group->getIdentity();\n $row->title = $group->title;\n $row->description = $group->description;\n $row->keywords = $values['tags'];\n $row->save();\n }\n\n // Add owner as member\n $group->membership()->addMember($viewer)\n ->setUserApproved($viewer)\n ->setResourceApproved($viewer);\n\n // Set photo\n if (!empty($values['photo'])) {\n $group->setPhoto($form->photo);\n }\n\n // Add Cover photo\n if (!empty($values['cover_thumb'])) {\n $group->setCoverPhoto($form->cover_thumb);\n }\n // Add fields\n $customfieldform = $form->getSubForm('fields');\n $customfieldform->setItem($group);\n $customfieldform->saveValues();\n\n // Process privacy\n $auth = Engine_Api::_()->authorization()->context;\n\n $roles = array(\n 'owner',\n 'officer',\n 'member',\n 'registered',\n 'everyone'\n );\n\n if (empty($values['auth_view'])) {\n $values['auth_view'] = 'everyone';\n }\n\n if (empty($values['auth_comment'])) {\n $values['auth_comment'] = 'registered';\n }\n\n if (empty($values['auth_poll'])) {\n $values['auth_poll'] = 'member';\n }\n\n if (empty($values['auth_event'])) {\n $values['auth_event'] = 'registered';\n }\n\n if (empty($values['auth_sub_group'])) {\n $values['auth_sub_group'] = 'member';\n }\n\n if (empty($values['auth_video'])) {\n $values['auth_video'] = 'member';\n }\n\n if (empty($values['auth_wiki'])) {\n $values['auth_wiki'] = 'member';\n }\n\n if (empty($values['auth_music'])) {\n $values['auth_music'] = 'member';\n }\n\n if (empty($values['auth_listing'])) {\n $values['auth_listing'] = 'member';\n }\n\n if (empty($values['auth_folder'])) {\n $values['auth_folder'] = 'member';\n }\n\n if (empty($values['auth_file_upload'])) {\n $values['auth_file_upload'] = 'member';\n }\n\n if (empty($values['auth_file_down'])) {\n $values['auth_file_down'] = 'member';\n }\n\n\n $viewMax = array_search($values['auth_view'], $roles);\n $commentMax = array_search($values['auth_comment'], $roles);\n $photoMax = array_search($values['auth_photo'], $roles);\n $groupMax = array_search($values['auth_event'], $roles);\n $pollMax = array_search($values['auth_poll'], $roles);\n $inviteMax = array_search($values['auth_invite'], $roles);\n $subGroupMax = array_search($values['auth_sub_group'], $roles);\n $videoMax = array_search($values['auth_video'], $roles);\n $wikiMax = array_search($values['auth_wiki'], $roles);\n $musicMax = array_search($values['auth_music'], $roles);\n $folderMax = array_search($values['auth_folder'], $roles);\n $fileuploadMax = array_search($values['auth_file_upload'], $roles);\n $filedownloadMax = array_search($values['auth_file_down'], $roles);\n $listingMax = array_search($values['auth_listing'], $roles);\n\n $officerList = $group->getOfficerList();\n\n foreach ($roles as $i => $role) {\n if ($role === 'officer') {\n $role = $officerList;\n }\n $auth->setAllowed($group, $role, 'view', ($i <= $viewMax));\n $auth->setAllowed($group, $role, 'comment', ($i <= $commentMax));\n $auth->setAllowed($group, $role, 'photo', ($i <= $photoMax));\n $auth->setAllowed($group, $role, 'event', ($i <= $groupMax));\n $auth->setAllowed($group, $role, 'poll', ($i <= $pollMax));\n $auth->setAllowed($group, $role, 'invite', ($i <= $inviteMax));\n $auth->setAllowed($group, $role, 'sub_group', ($i <= $subGroupMax));\n $auth->setAllowed($group, $role, 'video', ($i <= $videoMax));\n $auth->setAllowed($group, $role, 'wiki', ($i <= $wikiMax));\n $auth->setAllowed($group, $role, 'music', ($i <= $musicMax));\n $auth->setAllowed($group, $role, 'folder', ($i <= $folderMax));\n $auth->setAllowed($group, $role, 'file_upload', ($i <= $fileuploadMax));\n $auth->setAllowed($group, $role, 'file_down', ($i <= $filedownloadMax));\n $auth->setAllowed($group, $role, 'listing', ($i <= $listingMax));\n }\n\n // Create some auth stuff for all officers\n $auth->setAllowed($group, $officerList, 'edit', 1);\n $auth->setAllowed($group, $officerList, 'style', 1);\n $auth->setAllowed($group, $officerList, 'photo.edit', 1);\n $auth->setAllowed($group, $officerList, 'announcement', 1);\n $auth->setAllowed($group, $officerList, 'sponsor', 1);\n $auth->setAllowed($group, $officerList, 'invitation', 1);\n $auth->setAllowed($group, $officerList, 'file.edit', 1);\n $auth->setAllowed($group, $officerList, 'member.edit', 1);\n $auth->setAllowed($group, $officerList, 'topic.edit', 1);\n $auth->setAllowed($group, $officerList, 'poll.edit', 1);\n\n\n // Add auth for invited users\n $auth->setAllowed($group, 'member_requested', 'view', 1);\n\n // Add action\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n\n if ($group->is_subgroup) {\n $parent_group = $group->getParentGroup();\n $action = $activityApi->addActivity($viewer, $parent_group, 'advgroup_sub_create');\n } else {\n $action = $activityApi->addActivity($viewer, $group, 'advgroup_create');\n }\n if ($action) {\n $activityApi->attachActivity($action, $group);\n }\n // Commit\n $db->commit();\n\n // Redirect\n return $this->_helper->redirector->gotoRoute(array('id' => $group->getIdentity()), 'group_profile', true);\n } catch (Engine_Image_Exception $e) {\n $db->rollBack();\n $form->addError(Zend_Registry::get('Zend_Translate')->_('The image you selected was too large.'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "b5442bc7001f71b991e060966731d29e", "score": "0.46547312", "text": "public function groupV2GetGroupByNameRequest($group_name, $group_type)\n {\n // verify the required parameter 'group_name' is set\n if ($group_name === null || (is_array($group_name) && count($group_name) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_name when calling groupV2GetGroupByName'\n );\n }\n // verify the required parameter 'group_type' is set\n if ($group_type === null || (is_array($group_type) && count($group_type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_type when calling groupV2GetGroupByName'\n );\n }\n\n $resourcePath = '/GroupV2/Name/{groupName}/{groupType}/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($group_name !== null) {\n $resourcePath = str_replace(\n '{' . 'groupName' . '}',\n ObjectSerializer::toPathValue($group_name),\n $resourcePath\n );\n }\n // path params\n if ($group_type !== null) {\n $resourcePath = str_replace(\n '{' . 'groupType' . '}',\n ObjectSerializer::toPathValue($group_type),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "aefbea9bbea92a525acc49260e90a004", "score": "0.4647882", "text": "public function deleteGroupRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling deleteGroup'\n );\n }\n\n $resourcePath = '/group/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "70ad46c573a458de2850b4bc8d099e04", "score": "0.4631374", "text": "function edit_group($id)\n\t{\n\t\tif(!$id || empty($id))\n\t\t{\n\t\t\tredirect('paylinklogin', 'refresh');\n\t\t}\n\n\t\t$this->data['title'] = $this->lang->line('edit_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('paylinklogin', 'refresh');\n\t\t}\n\n\t\t$group = $this->ion_auth->group($id)->row();\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('edit_group_validation_name_label'), 'required|alpha_dash');\n\n\t\tif (isset($_POST) && !empty($_POST))\n\t\t{\n\t\t\tif ($this->form_validation->run() === TRUE)\n\t\t\t{\n\t\t\t\t$group_update = $this->ion_auth->update_group($id, $_POST['group_name'], $_POST['group_description']);\n\n\t\t\t\tif($group_update)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('message', $this->lang->line('edit_group_saved'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\t}\n\t\t\t\tredirect(\"paylinklogin\", 'refresh');\n\t\t\t}\n\t\t}\n\n\t\t// set the flash data error message if there is one\n\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t// pass the user to the view\n\t\t$this->data['group'] = $group;\n\n\t\t$readonly = $this->config->item('admin_group', 'ion_auth') === $group->name ? 'readonly' : '';\n\n\t\t$this->data['group_name'] = array(\n\t\t\t'name' => 'group_name',\n\t\t\t'id' => 'group_name',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('group_name', $group->name),\n\t\t\t$readonly => $readonly,\n\t\t);\n\t\t$this->data['group_description'] = array(\n\t\t\t'name' => 'group_description',\n\t\t\t'id' => 'group_description',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('group_description', $group->description),\n\t\t);\n\n\t\t$this->_render_page('paylinklogin/edit_group', $this->data);\n\t}", "title": "" }, { "docid": "2060a984b7470bc53e9e5abb75812bd0", "score": "0.4631327", "text": "private function createEditForm(MailTemplate $entity)\n {\n $form = $this->createForm(\n new MailTemplateType(),\n $entity,\n array(\n 'action' => $this->generateUrl('ojs_journal_mail_template_update', array('id' => $entity->getId(), 'journalId' => $entity->getJournal()->getId())),\n 'method' => 'PUT',\n )\n );\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "4ee9d56389bd6f256218a13ce30ae12d", "score": "0.46248686", "text": "function testModifyParentFields(){\r\n\t\t//add a field with the same name to a different part of the form\r\n\t\t$fieldset = new FieldSet(\r\n\t\t\t$vgf = $this->createGroup(),\r\n\t\t\tnew TextField('Occupation')\r\n\t\t);\r\n\r\n\t\t$fieldset->insertBefore(new TextField(\"Name\"),\"Records\"); //field with same name as one of the fields in the variable group\r\n\t\t$fieldset->removeByName('Email'); //attempting to remove field from parent fieldset //TODO: should this be allowed??\r\n\r\n\t\t$fields = $vgf->FieldSet();\r\n\t\t$this->assertEquals($fields->Count(),2); //2 groups of fields, as defined below\r\n\t\tforeach($fields as $field){\r\n\t\t\t$this->assertEquals($field->FieldSet()->Count(),4); //4 fields per group\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ad65916d6faa415475d549e3ffb93380", "score": "0.46239164", "text": "function rankext_group_editform() {\n\tglobal $mybb, $lang, $form, $form_container, $usergroup;\n\t// Create the input fields\n\tif ($form_container->_title == $lang->misc)\n\t{\n\t\t$rankext_groupsettings= array(\n\t\t\t\t$form->generate_check_box(\"rankext_hasranks\", 1, \"Group has internal rank system\", array(\"checked\" => $usergroup['rankext_hasranks'])),\n\t\t\t\t\"<b>Primary Color:</b> \".$form->generate_text_box(\"rankext_primarycolor\", $usergroup['rankext_primarycolor'], \"Primary color for group rank display\"),\n\t\t\t\t\"<b>Secondary Color:</b> \".$form->generate_text_box(\"rankext_secondarycolor\", $usergroup['rankext_secondarycolor'], \"Secondary color for group rank display\"),\n\t\t\t\t\"<b>Banner Url:</b> \".$form->generate_text_box(\"rankext_bannerurl\", $usergroup['rankext_bannerurl'], \"Url of group's banner image\"),\n\t\t\t\t\"<b>Forum Id:</b> \".$form->generate_text_box(\"rankext_groupfid\", $usergroup['rankext_groupfid'], \"Id of group's main forum\")\n\t\t);\n\t\t$form_container->output_row(\"RankExt Settings\", \"\", \"<div class=\\\"forum_settings_bit\\\">\".implode(\"</div><div class=\\\"forum_settings_bit\\\">\", $rankext_groupsettings).\"</div>\");\n\t}\n}", "title": "" }, { "docid": "768cc80f7f61af4ede0f1d2035cc04f7", "score": "0.4620902", "text": "public function edit_group($edit = -1, $type = 1) {\n\n $group = $this->content->getGroupById($edit);\n\n $parentsOption = $this->content->getGroupsOptionTree($type, 0, (isset($group->parent)) ? $group->parent : 0);\n\n AZ::layout('left-content', array(\n 'block' => 'contents/group-form',\n 'parentsOption' => $parentsOption,\n 'group' => $group,\n 'type' => $type\n ));\n }", "title": "" }, { "docid": "64e07256da273846270dc943a0a37f45", "score": "0.4619234", "text": "public function add_fields_to_object( $object, WP_REST_Request $request, $object_type = '' );", "title": "" }, { "docid": "9de3cab668dd9a85bb744faeb9ddc521", "score": "0.46170452", "text": "protected function deleteGroupRequest($group_oid)\n {\n // verify the required parameter 'group_oid' is set\n if ($group_oid === null || (is_array($group_oid) && count($group_oid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_oid when calling deleteGroup'\n );\n }\n\n $resourcePath = '/user/groups/{group_oid}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($group_oid !== null) {\n $resourcePath = str_replace(\n '{' . 'group_oid' . '}',\n ObjectSerializer::toPathValue($group_oid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7853d78e4e0a98d016a4a4a27de6928a", "score": "0.45977998", "text": "public function getFormProductGroupUpdate(ProductGroupGetUpdateRequest $request)\n {\n return $this->productgroup->getUpdateForm($request->id);\n }", "title": "" }, { "docid": "50c72eae6e71989593b70e3fff5a8426", "score": "0.45896083", "text": "protected function getGroupRequest($group_oid)\n {\n // verify the required parameter 'group_oid' is set\n if ($group_oid === null || (is_array($group_oid) && count($group_oid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $group_oid when calling getGroup'\n );\n }\n\n $resourcePath = '/user/groups/{group_oid}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($group_oid !== null) {\n $resourcePath = str_replace(\n '{' . 'group_oid' . '}',\n ObjectSerializer::toPathValue($group_oid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('x-ultracart-simple-key');\n if ($apiKey !== null) {\n $headers['x-ultracart-simple-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c9c5b41ddb6f565b622af7de2be70633", "score": "0.45713428", "text": "public function CreateGroup() {\n $content = new CMContent();\n $form = new CFormGroupCreate($this);\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n if($form->Check() === false) {\n $this->AddMessage('notice', 'You must fill in all values.');\n $this->RedirectToController('CreateGroup');\n }\n $this->views->SetTitle('Create group')\n ->AddInclude(__DIR__ . '/creategroup.tpl.php', array('form' => $form->GetHTML()), 'primary')\n ->AddInclude(__DIR__ . '/../sidebar.tpl.php', array('is_authenticated'=>$this->user['isAuthenticated'],'user'=>$this->user,'controllers'=>$controllers,'contents'=>$content->ListAll(array('type'=>'post', 'order-by'=>'title', 'order-order'=>'DESC')),), 'sidebar');\n }", "title": "" }, { "docid": "6abd645765a127df69fdc6695c45cb88", "score": "0.45643914", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => ['required', 'string', 'max:255'],\n 'contact_person' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255'],\n 'phone' => ['required', 'string', 'max:30'], \n ]);\n\n $group = Group::findOrFail($id);\n $group->name = $request->name;\n $group->contact_person = $request->contact_person;\n $group->email = $request->email;\n $group->phone = $request->phone;\n if($group->save()){\n return new GroupResource($group);\n }\n }", "title": "" }, { "docid": "ca4155380137585a13857be629ea1bc1", "score": "0.45546952", "text": "public function update(PspGroupEditRequest $request, $id)\n {\n //\n try {\n $pspGroup = PspGroup::find($id);\n //$pspGroup->numero = $request['numero'];\n $pspGroup->descripcion = $request['descripcion'];\n $pspGroup->save();\n\n return redirect()->route('pspGroup.show',$id)->with('success','El grupo se ha actualizado exitosamente');\n } catch (Exception $e) {\n return redirect()->back()->with('warning','Ocurrio un error al realizar la accion');\n }\n }", "title": "" }, { "docid": "a7c884e432c5ab1ed37acd9027e8fa17", "score": "0.4548213", "text": "function updateTemplateGroups() {\n if (!$this->isAuthenticated())\n exit;\n\n $row = $this->input->post('row');\n $this->adminmodel->updateTemplateGroups(self::getGroupArgs($row));\n echo json_encode(array(Result => 'OK'));\n }", "title": "" }, { "docid": "320d4ed43b6087bc9f2cff185fd4c64c", "score": "0.45470744", "text": "public function update(Request $request, ProductGroup $productGroup)\n {\n //\n }", "title": "" }, { "docid": "d2b37435d36ebe2c2127008eb72766a2", "score": "0.4544172", "text": "public function update(GroupRequest $request, Groups $group)\n\t{\n\t\t$request->request->add(['uuid'=>Uuid::uuid()]);\n\t\t$group->update($request->all());\n\t\treturn redirect(\"/admin/group\");\n\t}", "title": "" }, { "docid": "6997500f4149a3c710361ff85b4420b6", "score": "0.45440248", "text": "public function creategroup ($request) {\n\t\n\t\t// check for actions\n\t\tif ($request->set(\"action\") == \"create\") {\n\t\t\t$this->groupsModel->write($_REQUEST);\n\t\t\t$this->engine->setMessage($this->groupsModel->getMessage());\n\t\t}\n\t\t\n\t\t// output the page\n\t\t$this->engine->assign(\"form\", $this->groupsForm(\"create\"));\n\t\t$this->engine->display(\"members/creategroup.tpl\");\n\t\n\t}", "title": "" }, { "docid": "6c7747f8a7eb7839510fd739c8a9c5a3", "score": "0.45400825", "text": "function edit_service_group() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n if($_POST) { // If we receive a POST request it's for a new vsite\n submit($user);\n } else { // If there is no post data, draw the new vsite form\n draw($user);\n }\n}", "title": "" }, { "docid": "db58b20924ebbbcc055f3884257b78fe", "score": "0.45338324", "text": "public function createGroup();", "title": "" }, { "docid": "c02702c8e39a31b0a57f3f6da80e8871", "score": "0.45258442", "text": "function Inscription_Group_Update($group,&$item)\n {\n $item=$this->MyMod_Item_Update_CGI($item,$this->GetGroupDatas($group,TRUE),$prepost=\"\");\n \n return $item;\n }", "title": "" }, { "docid": "77cd3d5ce1ae9c5c3b102b7a256a259a", "score": "0.45220438", "text": "public function updateBPartnerGroup( ) {\n\n\n }", "title": "" }, { "docid": "fdd5156588ea88e400a4e36a0fa02bf7", "score": "0.45154446", "text": "function _NewGroup() {\n\t\t\t\n\t\t\t// Initialize a new instance of the formmaker\n\t\t\t$formMaker = new FormMaker($this->_Translation->GetTranslation('todo'), $this->_SqlConnection);\n\t\t\t$formMaker->AddForm('add_group', 'admin.php', $this->_Translation->GetTranslation('save'), $this->_Translation->GetTranslation('group'), 'post');\n\t\t\t\n\t\t\t$formMaker->AddHiddenInput('add_group', 'page', 'groups');\n\t\t\t$formMaker->AddHiddenInput('add_group', 'action', 'add_group');\n\t\t\t\n\t\t\t$formMaker->AddInput('add_group', 'group_name', 'text', $this->_Translation->GetTranslation('name'), $this->_Translation->GetTranslation('this_is_the_name_of_the_new_group'));\n\t\t\t$formMaker->AddInput('add_group', 'group_description', 'text', $this->_Translation->GetTranslation('description'), $this->_Translation->GetTranslation('this_is_a_description_of_the_new_group'));\n\t\t\t\n\t\t\t// Generate the template\n\t\t\t$template = \"\\r\\n\\t\\t\\t\\t\" . $formMaker->GenerateSingleFormTemplate($this->_ComaLate, false);\n\t\t\treturn $template;\n\t\t}", "title": "" }, { "docid": "0a2d874c121610aab77956a964973bb6", "score": "0.45142308", "text": "protected function updateSubstitutionCustomFieldsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateSubstitutionCustomFields'\n );\n }\n\n $resourcePath = '/beta/substitution/customFields';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "8f958a16372489a8f8a1bf76bfb92038", "score": "0.45122528", "text": "private function createDeleteForm(Group $group): FormInterface\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_group_delete', ['id' => $group->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e28098689b14174020d745a3771a01be", "score": "0.45104066", "text": "public function modificagroupAction()\n {\n $data = explode(\"|\",$this->_getParam('data'));\n $group = new Application_Model_DbTable_Groups();\n $group->updateGroup($data[0],$data[1]);\n\n }", "title": "" } ]
5e394faa06a976c54f4399820f2d25dc
/ Gets all categories that are assigned to a certain product
[ { "docid": "fbe79d50f4790bb8b358da37ad789593", "score": "0.0", "text": "function _current_assigned_categories($product_id){\n\t\t$data['query'] = $this->get_where_custom('product_id', $product_id);\n\t\t$num_rows = $data['query']->num_rows();\n\t\tif($num_rows>0){\n\t\t\t$this->load->view('Assigned_categories', $data);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "18093890fef1fafa6fe6651bdea29dc4", "score": "0.74774003", "text": "function getProductsWithCategory() {\r\n $query = $this->db->prepare(\"SELECT productos.*, categorias.nombre as categoria FROM productos JOIN\r\n categorias ON productos.id_categoria = categorias.id_categoria\"); //cuando dice \"as\" renombra a categorias.nombre por categoria para que no se solape con producto.nombre\r\n $query->execute();\r\n return $query->fetchAll(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "0d1d67a12eb124d094a8ecc17430c28c", "score": "0.7473107", "text": "public function products_category()\n {\n \n $value = $this->buy_product_mdl->fetch_categories();\n return $value;\n }", "title": "" }, { "docid": "883e9933752564d9646446cb72585cfd", "score": "0.72181433", "text": "function getProductByCategory(){\n $return = array(); \n $pids = array();\n \n $products = Mage::getResourceModel ( 'catalog/product_collection' );\n \n foreach ($products->getItems() as $key => $_product){\n $arr_categoryids[$key] = $_product->getCategoryIds();\n \n if($this->_config['catsid']){ \n if(stristr($this->_config['catsid'], ',') === FALSE) {\n $arr_catsid[$key] = array(0 => $this->_config['catsid']);\n }else{\n $arr_catsid[$key] = explode(\",\", $this->_config['catsid']);\n }\n \n $return[$key] = $this->inArray($arr_catsid[$key], $arr_categoryids[$key]);\n }\n }\n \n foreach ($return as $k => $v){ \n if($v==1) $pids[] = $k;\n } \n \n return $pids; \n }", "title": "" }, { "docid": "6f527ed565228d877eb2398af1b4b611", "score": "0.7133512", "text": "public function getProductCategory(){\n $sql = \"SELECT p.*, c.name AS 'categoryname' FROM products p\n INNER JOIN categories c ON c.id = p.category_id\n WHERE p.category_id = {$this->getCategoryId()}\n ORDER BY id DESC\";\n\n $products = $this->db->query($sql);\n\n return $products;\n }", "title": "" }, { "docid": "0e722a02250c1b323c8fe2ba544c9f7c", "score": "0.7128548", "text": "protected function _getProductCategories($product){\n\n $categories = array();\n\n $categoriesIds = $product->getCategoryIds();\n foreach ($categoriesIds as $categoryId) {\n if($this->_categories[$categoryId])\n array_push($categories, $this->_categories[$categoryId]);\n }\n\n if(sizeof($categories) > 0){\n $this->_logger->debug(\"Indexer: parsing \".$product->getSku().\" \".sizeof($categories).\" categories\");\n }\n\n return $categories;\n }", "title": "" }, { "docid": "81c51159ea5b9125b2b317854450b2c0", "score": "0.70991385", "text": "public function modelCategories(){\n\t\t\t$conn = Connection::getInstance();\n\t\t\t$query = $conn->query(\"select * from categories where id in (select category_id from products)\");\n\t\t\treturn $query->fetchAll();\n\t\t}", "title": "" }, { "docid": "97036b72bf842b4a3cc1a5233d242df9", "score": "0.6995755", "text": "public function getCategoriesToProduct($productId)\n {\n $sql = 'SELECT category FROM oophp_Category Category\n LEFT JOIN oophp_CategoryProduct CategoryProduct\n ON CategoryProduct.categoryId = Category.id \n WHERE CategoryProduct.productId = ?';\n\n $categories = $this->findAllSql($sql, [$productId]);\n\n return $categories;\n }", "title": "" }, { "docid": "2775ed19b7464840302404ddf1c26849", "score": "0.6949956", "text": "public function findCategoriesToProduct($productId)\n {\n $sql = 'SELECT * FROM oophp_CategoryProduct CategoryProduct \n WHERE CategoryProduct.productId = ?';\n\n $categories = $this->findAllSql($sql, [$productId]);\n\n return $categories;\n }", "title": "" }, { "docid": "5139513b4f5a24a7412e92802156ca68", "score": "0.6945695", "text": "public function activeCategories()\n\t{\n\t\treturn ProductCategory::whereStatus(1)->get();\n\t}", "title": "" }, { "docid": "b6f04acb5985143620192b71457b0d2f", "score": "0.6936393", "text": "public function productCategories()\n {\n return $this->hasMany(MonkCommerceProductCategory::class, 'category_id');\n }", "title": "" }, { "docid": "69b5b32af0a6862968862c0170f39110", "score": "0.68075305", "text": "function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}", "title": "" }, { "docid": "24ad21d73779665a9c1acec842c98074", "score": "0.678275", "text": "public function getAll():array\n {\n $productCategoryDAO = new ProductCategoryDAO();\n $productCategories = $productCategoryDAO->getAll();\n \n return $productCategories;\n }", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.6765566", "text": "public function getCategories();", "title": "" }, { "docid": "5dd88afd968417e6393951f19844f89d", "score": "0.6758395", "text": "public function getMenCategory()\n {\n $sql = \"SELECT * FROM category INNER JOIN product ON category.category_id = product.category_id WHERE category_status = 'men'\";\n $result = $this->conn->query($sql) or die(\"Conection error: \" . $this->conn->connect_error);\n $rows = array();\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "e11a07cafb5512bdaa0bcf06e64e9099", "score": "0.67411566", "text": "public function getCatSelected($product_id){\n $list = array();\n $sql = \"SELECT a.id, a.name FROM category a INNER JOIN product_category b ON a.id = b.cat_id WHERE product_id = $product_id\";\n $response = Yii::app()->db->createCommand($sql)->queryAll();\n if(count($response) > 0){\n foreach($response as $value){\n $list[$value['id']] = $value['name'];\n }\n }\n return $list;\n }", "title": "" }, { "docid": "4beeab60a70064a597e26e5a3d234031", "score": "0.6724807", "text": "public function getProductCategory()\n {\n $category = ProductsCategory::all();\n\n $data_category = $category->map(function($category){\n return [\n 'value' => $category->id,\n 'label' => $category->category,\n ];\n });\n\n return response()->json(['cat' => ['data' => $data_category]]);\n }", "title": "" }, { "docid": "7c94a8796a1bedd50847d681002af083", "score": "0.66952926", "text": "public function getAssignedProducts($categoryId);", "title": "" }, { "docid": "7c94a8796a1bedd50847d681002af083", "score": "0.66952926", "text": "public function getAssignedProducts($categoryId);", "title": "" }, { "docid": "981979735f74ab8c3b2850db39e1b2d2", "score": "0.6694872", "text": "public function all()\n {\n $sql =\"SELECT c.id, c.name_category, c.waiting, c.obs_waiting, c.cover, count(p.name_product) as total_prods FROM categories as c LEFT JOIN products as p ON(c.name_category = p.category) WHERE p.status = 0 GROUP BY c.id\";\n $sql = $this->db->query($sql);\n return $categories = $sql->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "e80c5d294de0478ce0a96ee190317dec", "score": "0.6694589", "text": "public function getProductsCat() {\n $builder = $this->table(\"product\");\n $builder->select(\"product.id as id, product.name AS productName, price, image, type, keywords, category_id, theme_id, productCategory.parentID as parentID, productCategory.name AS category, themeCategory.name as theme\");\n $builder->join(\"productCategory\", \"product.category_ID = productCategory.categoryID\", \"inner\");\n $builder->join(\"themeCategory\", \"product.theme_ID = themeCategory.id\", \"left\");\n $builder->orderby(\"category\");\n $query = $builder->get();\n\n return $query->getResultArray();\n }", "title": "" }, { "docid": "0ccdc2817a9f688c0db31a618dce58ca", "score": "0.66555464", "text": "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "title": "" }, { "docid": "4383ac0f9e52459c55d19667e1901618", "score": "0.66494787", "text": "public function getCategories()\n\t{\n\t\t$rs = Category::get();\n\n\t\tif(!empty($rs))\n\t\t{\n\t\t\treturn $rs;\n\t\t}\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3b190093c669ef2717e8843afa237da3", "score": "0.6646294", "text": "public static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "d9007960ae0ff28eff76877f4533c47f", "score": "0.6634478", "text": "public function getCategoriesList($productID)\r\n\t{\t\r\n\t\treturn $this->find('list', array(\r\n\t\t\t'fields' => array('ProductCategory.id', 'ProductCategory.category_id'),\r\n\t\t\t'conditions' => array('ProductCategory.product_id' => $productID),\r\n\t\t\t'recursive' => -1\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "ce9e3a5dd749008b101c4d8ecd616631", "score": "0.6601208", "text": "private function getAllCategories()\n {\n return Category::find()->all();\n }", "title": "" }, { "docid": "ebdcbca5c36d402059f4ebe79e7bd504", "score": "0.65792716", "text": "public function getCategory(){\n\t\t\tglobal $product;\n\t\t\t$product_cats = wp_get_post_terms(get_the_ID(), 'product_cat');\n\t\t\t$count = count($product_cats);\n\t\t\tforeach($product_cats as $key => $cat){\n\t\t\t\tif ($cat->name == \"Bulk\"){\n\t\t\t\t\treturn $cat->name;\n\t\t\t\t\tbreak;\n\t\t\t\t}elseif ($cat->name == \"Bags\"){\n\t\t\t\t\treturn $cat->name;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "81bfdfce7eec9f2f54d6ea5f09f17366", "score": "0.6576467", "text": "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "title": "" }, { "docid": "7f421d3b86aaeab2d091790f97d09904", "score": "0.6574617", "text": "public function getCategories($product, $onlyIds = false)\n {\n if ($product instanceof Product) {\n $id = $product->id;\n } else {\n $id = $product;\n }\n $sql = $this->joinSql . ' WHERE p.id = ? ORDER BY c.name;';\n if (!$onlyIds) {\n return $this->db->query('SELECT c.*' . $sql, $id, '\\LRC\\Webshop\\Category');\n } else {\n return $this->db->queryColumn('SELECT c.id' . $sql, $id);\n }\n }", "title": "" }, { "docid": "cf671791d86b067eaa44ee708632f7e1", "score": "0.6567124", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class, 'product_categories');\n }", "title": "" }, { "docid": "1426bced3d8c99c1d526b757bb0b61ca", "score": "0.65466374", "text": "public function getCategories()\n {\n $db = Database::getInstance();\n return $db->select(\"SELECT * FROM category\", Category::class);\n }", "title": "" }, { "docid": "151903b5e6bf72130a174d1bd5feabcc", "score": "0.65280586", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class, 'category_product');\n }", "title": "" }, { "docid": "ea9d8116d83d4ec7f51beeaef4a668ea", "score": "0.65033114", "text": "public function getProductCategories($id){\n\t\t\t$sql = \"SELECT * FROM product_categories WHERE id = $id\";\n\t\t\t$result = mysqli_query($this->connect(),$sql);\n\t\t\treturn $result->fetch_assoc() ;\n\t\t}", "title": "" }, { "docid": "9d91610b28acef74943986da1cbffa63", "score": "0.649039", "text": "public function getCategoryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_category');\r\n\t\t$this->db->where(\"(category_parent_id = '' OR category_parent_id = '0')\");\r\n\t\t$this->db->where('category_status', '1');\r\n\t\t$this->db->where('category_type', 'Product');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}", "title": "" }, { "docid": "8e7f8a09a04d344f5a20c23c65b5d122", "score": "0.6481383", "text": "public function getCategories() {\n $result = Categoria::all();\n\n return $result;\n }", "title": "" }, { "docid": "97e2a16feb17fd6e954fdb66fd6a528d", "score": "0.64745367", "text": "public function ListCategories()\n {\n $sql = \"SELECT * FROM pr_category\";\n\n $stmt = $this->db->prepare($sql);\n $query = $stmt->execute();\n if($query)\n {\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }\n $this->set_message('Ow! Algo inesperado aconteceu.', 'error');\n }", "title": "" }, { "docid": "a99fbc923039ee7eb70c3a42dcdd86fd", "score": "0.64604753", "text": "public function getCategories($pk = null)\r\n {\r\n $pk = (!empty($pk)) ? $pk : (int)$this->getState('product.id');\r\n\r\n $db = $this->getDbo();\r\n $query = $db->getQuery(true);\r\n $query->select('id, title, alias, language')\r\n\t ->from('#__ketshop_product_cat_map')\r\n\t ->join('INNER', '#__categories ON id=cat_id')\r\n\t ->where('product_id='.(int)$pk);\r\n $db->setQuery($query);\r\n\r\n return $db->loadObjectList();\r\n }", "title": "" }, { "docid": "d6d98fea3870d4db411a58ace5dbce64", "score": "0.6456546", "text": "public function getCategory(){\n\t\t$stmt = $this->bdd->prepare('SELECT * FROM categorie');\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t}", "title": "" }, { "docid": "1b1de2f67cf41e2e23c05cc4be07ae3b", "score": "0.6455543", "text": "public function getCategories() {\n\t\t$categories = array();\n\t\t$query = \"SELECT catid AS id, catvalue AS val, systemid AS componentId FROM category ORDER BY id ASC \";\n\t\t$this->connect();\n\t\t$result = $this->con->query($query);\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\tarray_push($categories, array('id' => $row['id'], 'val' => $row['val'], 'componentId' => $row['componentId']));\n\t\t}\n\t\t$this->con->close();\n\t\treturn $categories;\n\t}", "title": "" }, { "docid": "843795190128f34c10819994f10b836c", "score": "0.64533633", "text": "public static function getCategories() {\n return Catalog::category()->orderBy('weight')->orderBy('name')->all();\n }", "title": "" }, { "docid": "12c402d31082c5a0ca9806b44b292590", "score": "0.6451207", "text": "public function getAllProduct()\n {\n //eager loading of \"product\" with \"category\"\n return Product::with('category')\n ->orderBy('title')\n ->get();\n }", "title": "" }, { "docid": "41e1afd034c35f30edd6f7c3f576f40a", "score": "0.64416903", "text": "public function getCategories()\n {\n return $this->object()->getCategories();\n }", "title": "" }, { "docid": "62a3db0389d93e731e6bc81f5eef4b62", "score": "0.64344776", "text": "function getCategoriesForProductFromDB($pUid)\t{\n\t\t\t// get categories that are directly stored in the product dataset\n\t\t$pCategories = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_foreign', 'tx_commerce_products_categories_mm', 'uid_local=' .intval($pUid));\n\t\t$result = array();\n\t\twhile ($cUid = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($pCategories))\t{\n\t\t\t$this->getParentCategories($cUid['uid_foreign'], $result);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "91e1a93e2acd110879fd7d72869ce579", "score": "0.64293087", "text": "public function action_list()\n {\n $rew_ids = array ();\n \n if (strlen(($rew_id = $this->request->param('rew_id'))))\n $rew_ids = explode('/', $rew_id);\n \n $categories = array ();\n \n foreach ($rew_ids as $key => $rew_id) {\n $lvl = $key + 2;\n \n $category = ORM::factory('product_category')->where('rew_id', '=', $rew_id)->where('lvl', '=', $lvl)->where('cms_status', '=', 1)->find();\n \n if ( ! $category->loaded())\n throw new Kohana_HTTP_Exception_404('Your requested product category `:category` not found.', array (':category' => $this->request->param('rew_id')));\n \n if (count($categories) && $prev_category = end($categories)) {\n if ($category->parent_id != $prev_category->id) {\n throw new Kohana_HTTP_Exception_404('Your requested category :category not found.', array (':category' => $this->request->param('rew_id')));\n }\n }\n \n $categories[ ] = $category;\n }\n \n if ( ! count($categories))\n $this->_list_index();\n else \n $this->_list($categories);\n }", "title": "" }, { "docid": "042d5f9b08d3ef12f88581ec0819f09b", "score": "0.64220876", "text": "static function getCategories(){\r\n if(!self::isK2Installed()){\r\n return;\r\n }\r\n $db = JFactory::getDBO();\r\n $query = $db->getQuery(true);\r\n $query->select('id, name');\r\n $query->from('#__k2_categories');\r\n $query->where('published = 1');\r\n $query->order('name');\r\n $db->setQuery($query);\r\n $result = $db->loadAssocList();\r\n return $result;\r\n }", "title": "" }, { "docid": "b8dd8ccde07d60a4d8e35eb8692a4359", "score": "0.64095795", "text": "function google_base_get_category($products_id) {\n global $categories_array, $db;\n static $p2c;\n if(!$p2c) {\n $q = $db->Execute(\"SELECT *\n FROM \" . TABLE_PRODUCTS_TO_CATEGORIES);\n while (!$q->EOF) {\n if(!isset($p2c[$q->fields['products_id']]))\n $p2c[$q->fields['products_id']] = $q->fields['categories_id'];\n $q->MoveNext();\n }\n }\n if(isset($p2c[$products_id])) {\n $retval = $categories_array[$p2c[$products_id]]['name'];\n $cPath = $categories_array[$p2c[$products_id]]['cPath'];\n } else {\n $cPath = $retval = \"\";\n }\n return array($retval, $cPath);\n }", "title": "" }, { "docid": "86dad1efcca3c995fc80924059a45daf", "score": "0.6406413", "text": "public function getCategories(){\n $qb = $this->createQueryBuilder('p')\n ->select('p.category')\n ->groupBy('p.category')\n ->getQuery()\n ->getScalarResult();\n return $qb;\n }", "title": "" }, { "docid": "07b3ba5b32bbc2af33368887b6ac7880", "score": "0.63934416", "text": "public function get_categories () {\n\t\treturn Category::all();\n\t}", "title": "" }, { "docid": "99bd136ad8ef604ba9ab1ee2ae288bc1", "score": "0.6386129", "text": "public function getAllCategories(){\r\n\t\treturn $this->query(\"SELECT * FROM category\");\r\n\t}", "title": "" }, { "docid": "5f8c6863fa57b8dfb01a83ef660b43fc", "score": "0.6378434", "text": "function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "6c37a4aec9adb49e108bd80e2e8bec61", "score": "0.6376876", "text": "protected function getAllCategories(){\n //Pluck to get paired id and name\n return Category::orderBy('name')->get()->pluck('name','id');\n }", "title": "" }, { "docid": "bafe668cf845ae8b11842e65841fec80", "score": "0.63757485", "text": "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "title": "" }, { "docid": "72f6f103f287776820cb3cca35985f64", "score": "0.6368223", "text": "public function getProductCategories($product) {\n $categoryIds = $product->getCategoryIds();\n if (!$categoryIds) {\n return \"\";\n }\n\n // Fetch collection\n $categoryCollection = $this->objectManager->create('Magento\\Catalog\\Model\\ResourceModel\\Category\\CollectionFactory')\n ->create()\n ->addAttributeToSelect('*')\n ->addAttributeToFilter('entity_id', $categoryIds)\n ->addIsActiveFilter();\n\n // Prepare string\n $categories = array();\n foreach ($categoryCollection as $category) {\n array_push($categories, $category->getName());\n }\n\n return implode(\",\", $categories);\n }", "title": "" }, { "docid": "b4bc14cecc482da6a0b558d75d736484", "score": "0.63637745", "text": "public static function getCategories()\n {\n //get cached categories\n $catCached = Yii::$app->cache->get('catCached');\n if ($catCached) {\n return $catCached;\n } else {\n return self::find()->indexBy('category_id')->asArray()->all();\n }\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "c62c111486c0d6c96cce096dcd1a4b0b", "score": "0.6361218", "text": "public function getCategories()\n {\n return $this->categories;\n }", "title": "" }, { "docid": "d4c59333cde64de1a6a4f5384c87e66f", "score": "0.6342456", "text": "public function getAllCategories()\n\t{\n\t\t$db = new DB();\n\t\t$table = \"category\";\n\t\t$result = $db->selectAll($table);\n\t\treturn $result;\n\n\t}", "title": "" }, { "docid": "7cb34a44727dd165765c6d7e610f8ef3", "score": "0.6331902", "text": "function getCategories() {\r\n\t\t$categories = $this->find('all');\r\n\t\t$result = array();\r\n\t\tforeach ($categories as $category) {\r\n\t\t\t$result[$category['NbCategory']['id']] = array(\r\n\t\t\t\t'probability' => $category['NbCategory']['probability'],\r\n\t\t\t\t'word_count' => $category['NbCategory']['word_count']\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "83aff59ffaf81ccc1279d3089af3f3fa", "score": "0.6318311", "text": "public function categories(){\n\t\treturn $this->belongsToMany('ProductCategory', 'product_pivot_categories');\n\t}", "title": "" }, { "docid": "05b3bfc5e19f559ce598de53d6a14612", "score": "0.6315106", "text": "public function getAllcategories(){\n\t\t$cat = new Category();\n\t\treturn $cat->getAllCategories();\n\t}", "title": "" }, { "docid": "09825977ee810060b702b275c7f6aeb2", "score": "0.6308935", "text": "public function getCategories()\r\n\t{\r\n\t\treturn toEntities($this->_CI->CategoryModel->find_all());\r\n\t}", "title": "" }, { "docid": "876559e1b4cbec34799520cf699073be", "score": "0.62981164", "text": "public function getAllCategory()\n {\n $sql = \"SELECT * FROM categories\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $id = '';\n $items = $result;\n return $items;\n }", "title": "" }, { "docid": "1c5ef23851c66360d4dfcad4a57ea7e3", "score": "0.62970155", "text": "public function getProducts()\n {\n return $this->hasMany(Product::className(), ['category_id' => 'id']);\n }", "title": "" }, { "docid": "a562d918ad93bb3ebf10f1b74215d077", "score": "0.62871706", "text": "public function allCategories()\n {\n return Category::all();\n }", "title": "" }, { "docid": "1821b02fdc1174659d7110f98bb76051", "score": "0.62836754", "text": "public static function get_categories() {\n return category::get_records([], 'name', 'ASC');\n }", "title": "" }, { "docid": "61cc679c3f61bda4e26e0fddcfebbdee", "score": "0.62797785", "text": "public function get_all_product_category($conditions = array()) {\n $this->db->select(array('product_category.product_category_id', 'product_category.name', 'product_category.url_slug', 'product_category.description', 'product_category.image'));\n $this->db->from('product_category');\n\n if (!empty($conditions)) {\n $this->db->where($conditions);\n }\n\n $this->db->where(['product_category.deleted' => 0, 'product_category.status' => 1]);\n $this->db->order_by('product_category.name');\n\n return $this->db->get()->result_array();\n }", "title": "" }, { "docid": "e9a1078f2466f38186a54fd81991a5dc", "score": "0.62754965", "text": "public function get_product_category(){\n\t\t $this->db->select('*');\n\t\t\t$this->db->from('tbl_category');\n\t\t\t$this->db->where('status','1');\n\t\t\t$query = $this->db->get();\n\t\t\treturn $query->result();\n\t }", "title": "" }, { "docid": "0e4dbd06760183303bbf14a611e189db", "score": "0.62742496", "text": "public function readProductosCategoria(){\n $sql='SELECT nomCategoria, idProducto, producto.foto, nombre, producto.descripcion,precio FROM producto INNER JOIN categoria USING (idCategoria) WHERE idCategoria = ? AND producto.estado=1 AND producto.estadoEliminacion=1';\n $params=array($this->categoria);\n return Database::getRows($sql, $params);\n }", "title": "" }, { "docid": "393e7afe272ccdf54fd35ebdcb67239a", "score": "0.6273964", "text": "public function getCategories() : array;", "title": "" }, { "docid": "5e8229e6afb3eb4550f8b157ee517fce", "score": "0.62700623", "text": "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->get();\n return $this->categoryList = Categories::all();\n }", "title": "" }, { "docid": "37feb0f42ab897e05581d5af9383529d", "score": "0.6263297", "text": "function GetEmpCategoryList(){\r\n\t\t$sql = \"select * from h_component_cat order by catID Asc\" ;\r\n\t\treturn $this->query($sql, 1);\r\n\t}", "title": "" }, { "docid": "5fb6bd8bab3840e22404a8ef264bba74", "score": "0.6263199", "text": "public function categories() {\n\t\treturn $this->terms('category');\n\t}", "title": "" }, { "docid": "320a4bdc243c6ce785e90511a241b3c6", "score": "0.62614906", "text": "public function getCategories()\n {\n return $this->hasMany(Category::className(), ['id' => 'category_id'])->viaTable(self::tablePrefix().'cms_post_category', ['post_id' => 'id']);\n }", "title": "" }, { "docid": "5c7294396c3d34c7901f711f79e082d8", "score": "0.62594926", "text": "public function categories()\n {\n // Cache results\n static $categories;\n\n if ($categories) {\n return $categories;\n }\n\n $app = \\Slim\\Slim::getInstance();\n $dataMapper = $app->dataMapper;\n $CategoryMapper = $dataMapper('CategoryMapper');\n\n return $categories = $CategoryMapper->getAllCategories();\n }", "title": "" }, { "docid": "c94373d561bfbad74a867b8387490004", "score": "0.62557495", "text": "public function getProductCollection()\n {\n $category = $this->getCurrentCategory();\n if (isset($this->_productCollections[$category->getId()])) {\n $collection = $this->_productCollections[$category->getId()];\n } else {\n $collection = Mage::helper('catalogsearch')\n ->getEngine()\n ->getResultCollection()\n ->setStoreId($category->getStoreId());\n $this->prepareProductCollection($collection);\n $this->_productCollections[$category->getId()] = $collection;\n }\n\n return $collection;\n }", "title": "" }, { "docid": "17462d9e8db80b8b3e9d4f1ff507f927", "score": "0.62544566", "text": "public function getCategories() {\n return $this->categories;\n }", "title": "" }, { "docid": "bc6a5359167b02c506ac886f3b0a128b", "score": "0.62504", "text": "public function category()\n {\n return $this->belongsToMany('App\\Models\\V1\\Category', 'product_to_category', 'product_id', 'category_id')->withPivot('selected');\n }", "title": "" }, { "docid": "1fab561275eef69640c9ec08afaeb8d4", "score": "0.6247001", "text": "function getProductCat(){\n global $con;\n $getCategories = $con->prepare(\"SELECT * FROM product_categories\");\n $getCategories->execute();\n while($result = $getCategories->fetch(PDO::FETCH_ASSOC)){\n $productCatId = $result['p_cat_id'];\n $productCatName = $result['p_cat_name'];\n echo \"<li>\n <a href='../shop.php?p_cat=$productCatId'>\n $productCatName\n </a>\n </li>\";\n }\n }", "title": "" }, { "docid": "f06369ee9df4540065f31387a4f65cd9", "score": "0.6235972", "text": "protected function getCategoryIds()\n {\n return $this->getProduct()->getCategoryIds();\n }", "title": "" }, { "docid": "4d5782262ba496942c480ce519c85110", "score": "0.6221893", "text": "public function get_categories() {\n global $DB;\n $categories = array();\n $results = $DB->get_records('course_categories', array('parent' => '0', 'visible' => '1', 'depth' => '1'));\n if (!empty($results)) {\n foreach ($results as $value) {\n $categories[$value->id] = $value->name;\n }\n }\n return $categories;\n }", "title": "" }, { "docid": "623dc7896411f76e7d975157ad1ad9fc", "score": "0.62212783", "text": "function getCategories() {\n $sql = \"SELECT * FROM categories\";\n $result = mysqli_query($this->connection, $sql);\n\n if (mysqli_num_rows($result) > 0) {\n return $result;\n }\n }", "title": "" }, { "docid": "706df03a2d038615f8cc3392fe8e7c8e", "score": "0.6221241", "text": "public function getCategories()\n\t{\n\t\treturn $this->categories;\n\t}", "title": "" }, { "docid": "279c6f9bfbc8cf2a10ce63dab0245c10", "score": "0.6214485", "text": "function get_all_category_ids()\n {\n }", "title": "" }, { "docid": "39b8df2ad1662b3e709d397ccaabb773", "score": "0.6208663", "text": "public function getCategories(){\n return Category::get();\n }", "title": "" }, { "docid": "2682661b0e15e4804ee84005ce06f2e1", "score": "0.6199827", "text": "public function categories()\n {\n return $this->belongsToMany(Category::class, 'category_products');\n }", "title": "" }, { "docid": "ba4e01fea9c7ef37d6f19e09dbc9f491", "score": "0.61985135", "text": "public function products()\n {\n return $this->\n belongsToMany(Product::class, 'category_product', 'category_id', 'product_id');\n }", "title": "" }, { "docid": "ea1eaf026e7bb27dbc3e49577ea5479c", "score": "0.6198438", "text": "function getCategorias();", "title": "" }, { "docid": "0d04a04319aa9c4c66568ea4d91588f6", "score": "0.61978304", "text": "private function getCategoryList(){\n $repository = $this->getDoctrine()->getRepository(Category::class);\n $query = $repository->createQueryBuilder('c')\n ->orderBy('c.name','ASC')\n ->getQuery();\n $result = $query->getArrayResult();\n return $result;\n }", "title": "" }, { "docid": "27a0e74d4ba182d140cc8cf3707561bf", "score": "0.6193776", "text": "public function getCategories() \n {\n $travelService = new TravelService();\n return $travelService->getCategories();\n }", "title": "" }, { "docid": "1d09ffa3162185fb52677b84e7845ea6", "score": "0.6192755", "text": "public function get_all_arrest_complaint_category_list()\n\t{\n\t\t\n\t\t$sql=\"select * from arrest_complaint_category\torder by category_name asc\";\n\t\t$query=$this->db->query($sql);\n\t\t//print_r($query->result_object());die();\n\t\treturn $query->result_object();\n\t}", "title": "" }, { "docid": "6579f4072704bc5a5e0081d1dea15233", "score": "0.61919713", "text": "function getProductsOfCategory($cUid)\t{\n\t\t$result = array();\n\t\t$proRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_commerce_products_categories_mm', 'uid_foreign=' .intval($cUid));\n\t\twhile ($proRel = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($proRes))\t{\n\t\t\t$result[] = $proRel;\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "48bfb326ec488f1c0e200f0ce732b58d", "score": "0.61905235", "text": "public function get_categories() {\n\t\treturn $this->terms('category');\n\t}", "title": "" }, { "docid": "365e9f3877308e83db97212d482b57e5", "score": "0.619032", "text": "protected function _getCategoryProductRelationCollection()\n {\n return Mage::getResourceModel('fastlycdn/catalog_category_product_collection');\n }", "title": "" }, { "docid": "a715eb83980a0d1ff020ba61c325bf7a", "score": "0.61887896", "text": "public function getAvailableCategories () {\n\t$data = $this->getDefinition()->getFieldDefinition(\"availableCategories\")->preGetData($this);\n\t return $data;\n}", "title": "" }, { "docid": "91bbcb49e4e94fcbe83111893b59d65c", "score": "0.6184157", "text": "public function getCategories()\n {\n $lang = new LangMiddleware;\n\n $locale = $lang->getLocale();\n\n $category = ProductsCategory::all();\n\n $data = $category->map(function($category) use ($locale){\n return [\n 'name' => $category->category,\n 'image' => $category->img,\n 'link' => $category->link,\n ];\n });\n\n return response()->json(['data' => $data]);\n }", "title": "" }, { "docid": "478002cc5502b63dd1cf0370d1bbd08a", "score": "0.61809486", "text": "function getAllKidsGirlCategories()\n\t\t\t\t{\t\n\t\t\t\t$sql = 'SELECT product_type. * , product_type_people.people_cat_id\n\t\t\t\tFROM product_type\n\t\t\t\tJOIN product_type_people ON product_type_people.product_type_id = product_type.product_type_id\n\t\t\t\tWHERE product_type_people.people_cat_id =\"4\"';\n\n\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\tif($Q->num_rows()>0)\n\t\t\t\treturn $Q->result();\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\treturn \"empty\";\n\t\t\t\t}", "title": "" }, { "docid": "476ce2cbd9fa2ebee921eecc6ebcffa8", "score": "0.61775213", "text": "public function getCatIDSelected($product_id){\n $list = array();\n $sql = \"SELECT cat_id FROM product_category WHERE product_id=$product_id\";\n $response = Yii::app()->db->createCommand($sql)->queryAll();\n if(count($response) > 0){\n foreach($response as $value){\n $list[] = $value['cat_id'];\n }\n }\n return $list;\n }", "title": "" }, { "docid": "b5f3bfd7385858aef1efaab1581e13cc", "score": "0.61742157", "text": "public static function getActiveCategories(){}", "title": "" } ]
6f16771863bdbdce4214f184e08b2284
/ Computes astro constants for Jan 0 of given year
[ { "docid": "3d30f8812d06a4c9fa6b876952b615aa", "score": "0.75559974", "text": "function compute_astro_constants($year){\r\n //abstract;\r\n }", "title": "" } ]
[ { "docid": "3de2dbbaac7307c5dbf08fa90a489e88", "score": "0.6184653", "text": "function date_get_school_year($year, $month) {\n $years = array();\n $years['first_year'] = ($month < 8) ? ($year - 1) : $year;\n $years['second_year'] = $years['first_year'] + 1;\n return $years;\n}", "title": "" }, { "docid": "473b2d14b2020041bfdf9c974b4fdaec", "score": "0.6115296", "text": "function centuryFromYear($year)\n{\n return $year%100==0?(int)floor($year/100):(int)floor($year/100)+1;\n}", "title": "" }, { "docid": "27fddb173021bcb5dec58cd2bf4055ca", "score": "0.5998219", "text": "public function get_year_permastruct()\n {\n }", "title": "" }, { "docid": "6572408c984b98500308209ce8ac4b82", "score": "0.59873074", "text": "public function calculate( int $year ): \\DateTime\n {\n\n if ( self::HEMISPHERE_NORTH === $this->_hemisphere && $year > 1499 && $year < 2150 )\n {\n switch ( $this->_type )\n {\n case self::TYPE_SPRING:\n return new DateTime( $year . '-03-' . self::SPRING_DAYS[ $year ] . ' 00:00:00 UTC' );\n case self::TYPE_SUMMER:\n return new DateTime( $year . '-06-' . self::SUMMER_DAYS[ $year ] . ' 00:00:00 UTC' );\n case self::TYPE_AUTUMN:\n return new DateTime( $year . '-09-' . self::AUTUMN_DAYS[ $year ] . ' 00:00:00 UTC' );\n #case self::TYPE_WINTER:\n default:\n return new DateTime( $year . '-12-' . self::WINTER_DAYS[ $year ] . ' 00:00:00 UTC' );\n }\n }\n\n $foundIdx = -1;\n $idx = 0;\n\n // Search the index of the reference date that covers the defined year\n foreach ( self::REFERENCES[ $this->_type ][ $this->_hemisphere ] as $reference )\n {\n if ( 0 > $foundIdx && $reference[ 'min-year' ] <= $year && $reference[ 'max-year' ] >= $year )\n {\n $foundIdx = $idx;\n break;\n }\n $idx++;\n }\n\n if ( $foundIdx < 0 )\n {\n // There is no calculation available for defined year => use the static default date\n return new DateTime( $year . self::DEFAULTS[ $this->_type ][ $this->_hemisphere ] );\n }\n\n // The reference date was found => Init it as DateTime instance\n $refDate = new DateTime( self::REFERENCES[ $this->_type ][ $this->_hemisphere ][ $foundIdx ][ 'date' ] );\n\n // Calculate the difference in year (can be also negative!)\n $diffYears = $year - $refDate->year;\n\n if ( 0 !== $diffYears )\n {\n $refDate->addSeconds( $diffYears * self::DIFFS[ $this->_type ][ $this->_hemisphere ] );\n }\n\n return $refDate;\n\n }", "title": "" }, { "docid": "9480a4ec20de9626f6a68fe755ed1a1e", "score": "0.5980593", "text": "function days_of_year($pmonth,$pday,$pyear)\n{\n //global $day_in_jalali_month;\n $result=0;\n for($i=1;$i<$pmonth;$i++){\n $result+=$this->day_in_jalali_month[(int)$i];\n }\n return $result+$pday;\n}", "title": "" }, { "docid": "dfa158e5a2065574b4ec7a45dc99e896", "score": "0.59742475", "text": "function get_century ($year) {\n\tif ($year > 0)\n\t\treturn ((int) (($year - 1)/100)) + 1;\n\telse\n\t\t/* i'm amazed how hard its been to get this right: */\n\t\treturn - ((int) (( - $year)/100));\n}", "title": "" }, { "docid": "4175159975bd36dff1f495e2c4cdefc3", "score": "0.5881641", "text": "function centuryFromYear($year) {\n $century = ceil($year/100);\n return $century;\n}", "title": "" }, { "docid": "cfe6e4f0c8558ff821d5c73642a17129", "score": "0.582901", "text": "public function fiscalYear()\n {\n $result = array();\n $start = new DateTime();\n $start->setTime(0, 0, 0);\n $end = new DateTime();\n $end->setTime(23, 59, 59);\n $year = $this->format('Y');\n $start->setDate($year, 4, 1);\n if($start <= $this){\n $end->setDate($year +1, 3, 31);\n } else {\n $start->setDate($year - 1, 4, 1);\n $end->setDate($year, 3, 31);\n }\n //$result['start'] = $start->getTimestamp();\n //$result['end'] = $end->getTimestamp();\n\t\t$result['start'] = $start;\n\t\t$result['end'] = $end;\n\t\treturn $result;\n }", "title": "" }, { "docid": "541b556189e15b46785cba68115295ca", "score": "0.57838833", "text": "private function getYearBasicDates($year)\n {\n $dates = [];\n for ($i = 1; $i <= 12; $i++)\n {\n $mcnt = date('t', strtotime($year . '-' . $i . '-1'));\n for ($j = 1; $j <= $mcnt; $j++)\n {\n $lunar = $this->convert2lunar($year, $i, $j);\n\n $solar_date = sprintf('%02d', $i) . sprintf('%02d', $j);\n $w = intval(date('w', strtotime($year . '-' . $i . '-' . $j)));\n\n $dates[] = [\n 'date' => $year . '/' . sprintf('%02d', $i) . '/'. sprintf('%02d', $j),\n 'year' => $year,\n 'month' => $i,\n 'day' => $j,\n 'week' => $w == 0 ? 7 : $w,\n 'target' => isset($this->solar_special_days[$solar_date]) ? $this->solar_special_days[$solar_date] : '',\n 'lunar' => $lunar,\n ];\n }\n }\n return $dates;\n }", "title": "" }, { "docid": "f79a233ceaaabc975dbb43440a5b9f8b", "score": "0.5750429", "text": "public function getMinYearBuilt();", "title": "" }, { "docid": "717732b3d1a280a3a0c0e46402407d40", "score": "0.57446575", "text": "function cal_days_in_year($year){\n $days=0; \n for($month=1;$month<=12;$month++){ \n $days = $days + cal_days_in_month(CAL_GREGORIAN,$month,$year);\n }\n return $days;\n}", "title": "" }, { "docid": "7ed52029caf409519dbfa812e58bc6cb", "score": "0.5730432", "text": "function get_ay ($era,$year) {\n\tif ($era == \"AD\")\n\t\treturn $year;\n\telseif ($era == \"BC\")\n\t\treturn 1 - $year;\n}", "title": "" }, { "docid": "bc17a5f185202ba054b678e1cb4fab04", "score": "0.5591115", "text": "public function getYear() {}", "title": "" }, { "docid": "58ea422a63c5efa17d9f606432f4cbdc", "score": "0.55674964", "text": "function hebrew_year_months($yr) {\n\t\treturn ( hebrew_leap($yr) ? 13 : 12 );\n\t}", "title": "" }, { "docid": "f567245dbac1329f6a43f50ac947edee", "score": "0.554139", "text": "function fmt_year ($year) {\n\tif ($year > 0)\n\t\treturn $year;\n\telse\n\t\treturn (1 - $year) . \" BC\";\n}", "title": "" }, { "docid": "d11813286449f8a782fb7ac2c2ad3c6a", "score": "0.55251455", "text": "public function getAmountAts1OfYear($year) {\r\n\t\t$query = $this->createQueryBuilder('u')\r\n\t\t\t->select('COUNT(u)')\r\n\t\t\t->where('u.ats1 >= :firstJan')\r\n\t\t\t->andWhere('u.ats1 <= :lastDec')\r\n\t\t\t->setParameter('firstJan', new \\DateTime($year.'-01-01'))\r\n\t\t\t->setParameter('lastDec', new \\DateTime($year.'-12-31'))\r\n\t\t\t->getQuery();\r\n\t\t\r\n\t\treturn $query->getSingleScalarResult();\r\n\t}", "title": "" }, { "docid": "0cf6203743b4d092102baaa07d7e02f6", "score": "0.54818106", "text": "public function yearly(): self;", "title": "" }, { "docid": "fcb1486023b5008e15b583f305f55c51", "score": "0.54626423", "text": "function getYearPixels( &$data ) {\n\t\t$month_total_edits = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\t$month_total_edits[$year] = $tmp['all'];\n\t\t}\n\t\t\n\t\t$max_width = max( $month_total_edits );\n\t\t\n\t\t$pixels = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tif( $tmp['all'] == 0 ) $pixels[$year] = array();\n\t\t\t\n\t\t\t$processarray = array( 'all' => $tmp['all'], 'anon' => $tmp['anon'], 'minor' => $tmp['minor'] );\n\t\t\t\n\t\t\tasort( $processarray );\n\t\t\t\n\t\t\tforeach( $processarray as $type => $count ) {\n\t\t\t\t$newtmp = ceil( 500 * ( $count ) / $max_width );\n\t\t\t\t$pixels[$year][$type] = $newtmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $pixels;\n\t}", "title": "" }, { "docid": "99a4785f2e420072141b854cf4ca5e0c", "score": "0.5441952", "text": "function dayOfProgrammer($year) {\n if($year <1918 && $year%400!=0 && $year%100==0 ) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"254 days\"));\n return date_format($date,\"d.m.Y\"); \n } else if($year == 1918) {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"268 days\"));\n return date_format($date,\"d.m.Y\");\n } else {\n $date=date_create($year.'-01-01');\n date_add($date,date_interval_create_from_date_string(\"255 days\"));\n return date_format($date,\"d.m.Y\");\n }\n}", "title": "" }, { "docid": "9501fa94cd334adc79910773fe83b387", "score": "0.5412239", "text": "private function getAdobeCreativeCloudYears()\n {\n return array_keys(array_fill(2015, date('Y') + 1 - 2015, null));\n }", "title": "" }, { "docid": "04764dd6d011a2babac95696662c12cc", "score": "0.5397758", "text": "function normalizeYear($year) {\n \n $yv = intval($year); \n \n if($yv < 0) return strval(abs($yv)) . \" до н.э.\";\n if($yv < 800) return strval(abs($yv)) . \" н.э.\";\n \n return strval($yv);\n \n }", "title": "" }, { "docid": "f0ecd4af38d8d789891137224b326ff0", "score": "0.53905565", "text": "function decodeLunarYear($yy, $k) {\n\t\t$ly = array();\n\t\t$monthLengths = array(29, 30);\n\t\t$regularMonths = array(12);\n\t\t$offsetOfTet = $k >> 17;\n\t\t$leapMonth = $k & 0xf;\n\t\t$leapMonthLength = $monthLengths[$k >> 16 & 0x1];\n\t\t$solarNY = $this->jdFromDate(1, 1, $yy);\n\t\t$currentJD = $solarNY+$offsetOfTet;\n\t\t$j = $k >> 4;\n\t\tfor($i = 0; $i < 12; $i++) {\n\t\t\t$regularMonths[12 - $i - 1] = $monthLengths[$j & 0x1];\n\t\t\t$j >>= 1;\n\t\t}\n\t\tif ($leapMonth == 0) {\n\t\t\tfor($mm = 1; $mm <= 12; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t} else {\n\t\t\tfor($mm = 1; $mm <= $leapMonth; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t\t$ly[] = $this->LunarDate(1, $leapMonth, $yy, 1, $currentJD);\n\t\t\t$currentJD += $leapMonthLength;\n\t\t\tfor($mm = $leapMonth+1; $mm <= 12; $mm++) {\n\t\t\t\t$ly[] = $this->LunarDate(1, $mm, $yy, 0, $currentJD);\n\t\t\t\t$currentJD += $regularMonths[$mm-1];\n\t\t\t}\n\t\t}\n\t\treturn $ly;\n\t}", "title": "" }, { "docid": "7981cd98a5aea3074c45122f287b7d0b", "score": "0.5372126", "text": "function happyNewYear () {\n $day = (int) date('z');\n $year = date('Y');\n $yearCheck = ((int)$year ? $year % 4 == 0 ? $year % 400 == 0 && $year % 100 == 0 ? 366 : 365 : 365 : \"ERROR\");\n $daytill = $yearCheck-$day;\n echo \"До Нового Года осталось: $daytill дней\";\n}", "title": "" }, { "docid": "15e60b76ca3aa17331ffb40e25681eb6", "score": "0.53716046", "text": "function getAnio()\n{\n\tdate_default_timezone_set('America/El_Salvador');\n\treturn (int)date('Y');\n}", "title": "" }, { "docid": "64220ce1a907f8a1efad2b67692b2048", "score": "0.5365029", "text": "function getDaysInMonthByYear($year){\n\t if($year%400 == 0 || ($year % 4 == 0 && $year % 100 !== 0)){\n\t $rday = 29;\n\t }\n\t else{\n\t $rday = 28;\n\t }\n\t $daysArr = array();\n\t for ($i = 1; $i <= 12; $i++){\n\t if( $i == 2 ) {\n\t $days = $rday;\n\t }\n\t else {\n\t $days = (($i - 1) % 7 % 2) ? 30 : 31;\n\t }\n\t array_push($daysArr, $days);\n\t }\n\t return $daysArr;\n\t}", "title": "" }, { "docid": "79e46f0827b96afdd0388dd2ca580abc", "score": "0.5347639", "text": "function fcc_stow_sermon_get_the_year()\r\n{\r\n static $last_year = 0;\r\n\r\n $year = get_the_time('Y');\r\n\r\n if ( $year == $last_year ){\r\n return;\r\n }\r\n\r\n $last_year = $year;\r\n\r\n return $year;\r\n}", "title": "" }, { "docid": "b70a24fc162911a8f3203a47dbcad135", "score": "0.53469497", "text": "function toAcademicYear($inMySQLDate){\r\n \r\n // $thisDate = strtotime($inMySQLDate);\r\n \r\n $dateArray= getDateArray($inMySQLDate);\r\n $calendarYear = $dateArray['Year'];\r\n $calendarMonth = $dateArray['Month'];\r\n $calendarDay = $dateArray['Day'];\r\n $academicYearPart1 = 'notSet';\r\n $academicYearPart2 = 'alsoNotSet';\r\n \r\n $academicYearPart1 = $calendarYear;\r\n $academicYearPart2 = strval(intval($calendarYear)-1);\r\n \r\n \r\n if ( (intval($calendarMonth) >= AY_END_MONTH) && ( intval($calendarDay)>=AY_END_DAY ) )\r\n {\r\n $academicYearPart1 = $calendarYear;\r\n $academicYearPart2 = strval(intval($calendarYear)+1);\r\n }\r\n\r\n \r\n \r\n $academicYear = 'AY '.$academicYearPart1.'-'.$academicYearPart2;\r\n \r\n return $academicYear;\r\n \r\n \r\n \r\n}", "title": "" }, { "docid": "ef7dc9997a9b317b35c19062ca849b8a", "score": "0.5329078", "text": "function year_id ($year) {\n\tif ($year > 0)\n\t\treturn $year;\n\telse\n\t\treturn (1 - $year) . \"_BC\";\n}", "title": "" }, { "docid": "3c1a2ba53893ea67566f5fe27e51be2a", "score": "0.532122", "text": "function getMinYears()\n {\n return 0;\n }", "title": "" }, { "docid": "cc3269e376955a57936593b7e9ec457c", "score": "0.5297059", "text": "public function refSlaForMonthYear($agentschemeno, $month, $year)\n {\n // Labels and counts, starting at 0. Must be in reverse order\n $slaperiods = array\n (\n 72 => array('label' => '72+', 'count' => 0),\n 48 => array('label' => '48 - 72', 'count' => 0),\n 24 => array('label' => '24 - 48', 'count' => 0),\n 0 => array('label' => '0 - 24', 'count' => 0),\n );\n\n // Select data for period\n $select = $this->select();\n $select->setIntegrityCheck(false);\n\n $select->from\n (\n array('e' => $this->_name),\n array()\n );\n\n $select->joinInner\n (\n array('pg' => 'progress'),\n 'e.RefNo = pg.refno',\n array\n (\n new Zend_Db_Expr('DATE(pg.tx_time) as tx_time'),\n new Zend_Db_Expr('DATE(pg.finrep_time) as finrep_time')\n )\n );\n\n $select->where('AgentID = ?', $agentschemeno);\n\n $select->where('DATE(tx_time) != \"0000-00-00\"');\n $select->where('DATE(firstfin_time) != \"0000-00-00\"');\n\n $select->where('MONTH(tx_time) = ?', $month);\n $select->where('YEAR(tx_time) = ?', $year);\n\n $rows = $this->fetchAll($select);\n\n // For each record found, calculate processing times\n foreach ($rows as $row)\n {\n $startdate = new DateTime($row['tx_time']);\n $enddate = new DateTime($row['finrep_time']);\n\n list($startdate, $enddate) = $this->_adjustDates($startdate, $enddate); // Adjust for weekend boundaries\n $daysdiff = $this->_completionDays($startdate, $enddate); // Calculate difference\n $daysdiff -= $this->_holidayDays($startdate, $enddate); // Remove holiday days\n\n // Sort record into sla period range\n foreach (array_keys($slaperiods) as $key)\n {\n if ($daysdiff >= $key)\n {\n $slaperiods[$key]['count']++;\n break;\n }\n }\n }\n\n // Return labels and counts\n return $slaperiods;\n }", "title": "" }, { "docid": "0680daa55e938725762b9d9944defcbc", "score": "0.52921015", "text": "function date_get_current_school_year() {\n $date = getdate();\n $year = $date['year'];\n $month = $date['mon'];\n return date_get_school_year($year, $month);\n}", "title": "" }, { "docid": "8b424eb9f6902c83a70297dfac1efab3", "score": "0.52872264", "text": "function getAverageByMonth($year)\n\t{\n\t\tglobal $conf;\n\t\tglobal $user;\n\n\t\t$sql = \"SELECT date_format(f.date_valid,'%m') as dm, avg(fd.\".$this->field.\")\";\n\t\t$sql.= \" FROM \".$this->from;\n\t\tif (!$user->rights->societe->client->voir && !$this->socid) $sql .= \", \".MAIN_DB_PREFIX.\"societe_commerciaux as sc\";\n\t\t$sql.= \" WHERE date_format(f.date_valid,'%Y') = '\".$year.\"'\";\n\t\t$sql.= \" AND \".$this->where;\n\t\t$sql.= \" GROUP BY dm\";\n\t\t$sql.= $this->db->order('dm','DESC');\n\n\t\treturn $this->_getAverageByMonth($year, $sql);\n\t}", "title": "" }, { "docid": "94eece7d5cfa8692ce8fa713043d26af", "score": "0.52867645", "text": "final private function natlangElementYear($elem)\n {\n if (!$elem['hasInterval']) {\n return $elem['number1'];\n }\n\n $txt = $this->natlangApply('elemYear: every_consecutive_year'.($elem['interval'] == 1 ? '' : '_plural'), $elem['interval']);\n if (($elem['number1'] != $this->_cronMonths['rangeMin']) || ($elem['number2'] != $this->_cronMonths['rangeMax'])) {\n $txt .= ' ('.$this->natlangApply('elemYear: from_X_through_Y', $elem['number1'], $elem['number2']).')';\n }\n\n return $txt;\n }", "title": "" }, { "docid": "cac9116a0ee7286de5b7ea891735c773", "score": "0.5273295", "text": "public function start($year) {\n static $days= ['MO' => 1, 'TU' => 2, 'WE' => 3, 'TH' => 4, 'FR' => 5, 'SA' => 6, 'SU' => 0];\n\n $start= sscanf($this->dtstart, '%4d%2d%2dT%2d%2d%d');\n if (null === $this->rrule) {\n return gmmktime($start[3], $start[4], $start[5], $start[1], $start[2], $year);\n } else {\n\n // RRULE: https://tools.ietf.org/html/rfc5545#section-3.3.10\n $r= [];\n foreach (explode(';', $this->rrule) as $attributes) {\n sscanf($attributes, \"%[^=]=%[^\\r]\", $key, $value);\n $r[$key]= $value;\n }\n\n if ('YEARLY' !== $r['FREQ']) {\n throw new IllegalStateException('Unexpected frequency '.$r['FREQ']);\n }\n\n // -1SU = \"Last Sunday in month\"\n // 1SU = \"First Sunday in month\"\n // 2SU = \"Second Sunday in month\"\n if ('-' === $r['BYDAY'][0]) {\n $month= (int)$r['BYMONTH'] + 1;\n $by= $days[substr($r['BYDAY'], 2)];\n $last= idate('w', gmmktime(0, 0, 0, $month, -1, $year));\n $day= $by - $last - 1;\n } else {\n $month= (int)$r['BYMONTH'];\n $by= $days[substr($r['BYDAY'], 1)];\n $first= idate('w', gmmktime(0, 0, 0, $month, 0, $year));\n $day= $by + $first + 1 + 7 * ($r['BYDAY'][0] - 1);\n }\n\n return gmmktime($start[3], $start[4], $start[5], $month, $day, $year);\n }\n }", "title": "" }, { "docid": "f8eb4d5044691fd628d6c584aa06f80c", "score": "0.5248805", "text": "function get_corresponding_fiscal_year($date) {\n $year = $date->format('Y');\n if ($date <= DateTime::createFromFormat('Y-m-d', $year . '-6-30')) {\n return $year;\n } else {\n return $year + 1;\n }\n}", "title": "" }, { "docid": "6f863d199ff17d7a20c0d591e004f5a8", "score": "0.5211304", "text": "public function yearProvider()\n {\n return array(\n // year = 1\n array('11111111111111111', array(2001, 2031)),\n // year = K\n array('1M8GDM9AXKP042788', array(1989, 2019)),\n // year = 3\n array('5GZCZ43D13S812715', array(2003, 2033)),\n // invalid year\n array('5GZCZ43D1US812715', array())\n );\n }", "title": "" }, { "docid": "cef4678b6babeb6c0898d4bf3eaa8f61", "score": "0.5210351", "text": "function Calcularedad($nacimiento) {\n list($ano, $mes, $dia) = explode(\"-\", $nacimiento);\n $anodif = date(\"Y\") - $ano;\n $mesdif = date(\"m\") - $mes;\n $diadif = date(\"d\") - $dia;\n\n if (($diadif < 0) or ($mesdif < 0)) {\n $anodif = $anodif - 1;\n }\n\n if ($nacimiento == '') { $anodif = ''; }\n\n return $anodif;\n\n}", "title": "" }, { "docid": "fa47ed2bd366f9d3270869c307b9d411", "score": "0.520843", "text": "function getMonthsInYear($y=null)\n {\n return 12;\n }", "title": "" }, { "docid": "fa47ed2bd366f9d3270869c307b9d411", "score": "0.520843", "text": "function getMonthsInYear($y=null)\n {\n return 12;\n }", "title": "" }, { "docid": "24ccc5d3215a98c58e3b081a4aaeb42b", "score": "0.51771784", "text": "function years()\n{\n $years = array();\n for($i=date('Y');$i>(date('Y') - 100); $i--)\n $years[$i] = $i;\n return $years;\n}", "title": "" }, { "docid": "e689a3da6d01082458d7f1ee88604f40", "score": "0.5171194", "text": "public function get_year()\n {\n $round = $this->get_round();\n $roundNumber = $round['numero'];\n /*Se obtiene la fecha final para sacar el año*/\n $r = $round['fecha_final'];\n /*Se concatena el año, siempre son 4 caracteres*/\n $año = $r[0].$r[1].$r[2].$r[3];\n \n return $año;\n }", "title": "" }, { "docid": "0ed30d797a5d96b8f828ba6a202c1366", "score": "0.5153765", "text": "function set_min_year($min_year){\n $current_year = date(\"Y\");\n return $current_year;\n}", "title": "" }, { "docid": "1822ed6a6bbc21c60a837385fed5e8b3", "score": "0.5151577", "text": "function getSeason(){\n $today = getdate();\n \n $d1 = mktime(0,0,0, $today['mon'], $today['mday'], 2004);\n\n if($d1 >= 1072936800 and $d1 < 1079848800){ //jan 1 and mar 21\n $season = 1;\n }\n elseif ($d1 < 1087794000){ //june 21\n $season = 2;\n }\n elseif ($d1 < 1095829200){ // sept 22\n $season = 3;\n }\n elseif ($d1 < 1101880800){ // dec 1\n $season = 4;\n }\n else{ // xmas\n $season = 5;\n }\n\n return $season;\n}", "title": "" }, { "docid": "bb4e9ddd2b1f51f37ffd65148c317b04", "score": "0.5149646", "text": "public function getDefaultAcademicStartYear() {\n\n $userServiceUtil = $this->container->get('user_service_utility');\n $currentYear = $userServiceUtil->getDefaultAcademicStartYear('fellapp','fellappAcademicYearStart');\n\n //echo \"currentYear=\".$currentYear.\"<br>\";\n\n if( !$currentYear ) {\n $currentYear = $userServiceUtil->getDefaultAcademicStartYear();\n }\n\n if( !$currentYear ) {\n $currentYear = intval(date(\"Y\"));\n }\n\n return $currentYear;\n }", "title": "" }, { "docid": "e8581005e5f4a0805cc4f900a6eb1ef7", "score": "0.5149615", "text": "function pweek_of_year($year,$month,$day){\n list($y, $m, $d) = $this->jalali_to_gregorian($year, 1, 1);\n $timestamp = mktime(0,0,0, $m, $d, $y);\n $fwk = date('w', $timestamp);\n\n if ($fwk != 6) {\n list($y, $m, $d) = $this->jalali_to_gregorian($year, 1, 7 - $fwk);\n $timestamp = mktime(0,0,0, $m, $d, $y);\n $fwk = date('w', $timestamp);\n }\n list($yy, $mm, $dd) = $this->jalali_to_gregorian($year, $month, $day + 1);\n $timestamp2 = mktime(0,0,0, $mm, $dd, $yy);\n $fwk2 = date('w', $timestamp2);\n\n if ($fwk2 != 6) {\n list($yy, $mm, $dd) = $this->jalali_to_gregorian($year, $month, $day + (7 - $fwk2));\n $timestamp2 = mktime(0,0,0, $mm, $dd, $yy);\n $fwk2 = date('w', $timestamp2);\n }\n $diff = $timestamp2 - $timestamp;\n\n return floor($diff / (3600 * 24) / 7);\n\n}", "title": "" }, { "docid": "a1e942d7042ced3dc4150df06ea0ae0d", "score": "0.51425624", "text": "public static function getYear()\r\n {\r\n $date= CTimestamp::getDate();\r\n \r\n \r\n \r\n return $date['year'];\r\n \r\n }", "title": "" }, { "docid": "1919ca7a01fba73737a29dd8823a091d", "score": "0.5128417", "text": "public function get_year($year) {\n\t\t$start_time = 'first day of January ' . date( 'Y', strtotime($year) );\n\t\t$end_time = 'last day of December ' . date( 'Y', strtotime($year) );\n\t\n\t\treturn array(\n\t\t\t'start'\t\t\t=>\tdate('Y-m-d', strtotime($start_time)),\n\t\t\t'end'\t\t\t=>\tdate('Y-m-d', strtotime($end_time)),\n\t\t\t'start_time'\t\t=>\tstrtotime( $start_time ),\n\t\t\t'end_time'\t\t=>\tstrtotime( $end_time )\n\t\t);\n\t}", "title": "" }, { "docid": "331cfeaa445c9f51791a87a6713d6892", "score": "0.5125886", "text": "function calculateComparePreviousYear($saifi, $saidi, $saifi_previous_year, $saidi_previous_year, $system) {\n // $no_month = count($saifi);\n // print_r($saifi);\n // print($system);\n foreach ($saifi as $key => $value) { // -(minus) is better than previous year, + is worse than previous year\n // echo gettype($value);\n // settype($value, \"float\");\n // echo gettype($value); \n $saifi_comparePY[] = number_format( ($value - $saifi_previous_year[$system][$key]) / $saifi_previous_year[$system][$key] * 100, 2, '.', '');\n // echo ( ($saifi_comparePY[$key] == 'nan' || $saifi_comparePY[$key] == 'inf') ? '-' : 'a' );\n if ($saifi_comparePY[$key] == 'nan' || $saifi_comparePY[$key] == 'inf') {\n $saifi_comparePY[$key] = '-';\n }\n\n $saidi_comparePY[] = number_format( ($saidi[$key] - $saidi_previous_year[$system][$key]) / $saidi_previous_year[$system][$key] * 100, 2, '.', '');\n // echo gettype(($value - $saifi_previous_year[$system][$key]) / $saifi_previous_year[$system][$key] * 100);\n if ($saidi_comparePY[$key] == 'nan' || $saidi_comparePY[$key] == 'inf') {\n $saidi_comparePY[$key] = '-';\n }\n \n }\n\n // print_r($saifi_comparePY);\n return [$saifi_comparePY, $saidi_comparePY];\n }", "title": "" }, { "docid": "c33a5746895af1cb45a9cf605f6b158b", "score": "0.51057047", "text": "public function get_academicyear()\n\t{\n\t\t// find FIRST calendar year for current academic year: \n\t\t// if aug-dec then current year (eg Oct2013 = 2013/14)\n\t\t// if jan-jul it is the year before (eg Feb2013 = 2013/14)\n\t\t$currentyear = date(\"Y\");\n\t\t$currentmonth = date(\"m\");\n\t\tif ($currentmonth > 7) {\n\t\t\t$academicyear = $currentyear;\n\t\t}\n\t\telse {\n\t\t\t$academicyear = $currentyear - 1;\n\t\t}\n\t\treturn $academicyear;\n\t}", "title": "" }, { "docid": "b28c9803da54bc46cce5cea69fc4572a", "score": "0.50972396", "text": "function calculateDecade($year){\n\treturn (int)($year/10);\n}", "title": "" }, { "docid": "2832df3dae39cba01d29eb5f2753d54a", "score": "0.50861436", "text": "public function getAmountAts2OfYear($year) {\r\n\t\t$query = $this->createQueryBuilder('u')\r\n\t\t\t->select('COUNT(u)')\r\n\t\t\t->where('u.ats2 >= :firstJan')\r\n\t\t\t->andWhere('u.ats2 <= :lastDec')\r\n\t\t\t->setParameter('firstJan', new \\DateTime($year.'-01-01'))\r\n\t\t\t->setParameter('lastDec', new \\DateTime($year.'-12-31'))\r\n\t\t\t->getQuery();\r\n\t\t\r\n\t\treturn $query->getSingleScalarResult();\r\n\t}", "title": "" }, { "docid": "25c0c3eb0e52e680a6a63d42d8f01a74", "score": "0.5076699", "text": "public function jdToAstro($jd) {\n $wjd = floor($jd - 0.5) + 0.5;\n //$wjd = floor($jd);\n $depoch = $wjd - $this->gregorianEpoch;\n $quadricent = floor($depoch / 146097);\n $dqc = $this->mod($depoch, 146097);\n $cent = floor($dqc / 36524);\n $dcent = $this->mod($dqc, 36524);\n $quad = floor($dcent / 1461);\n $dquad = $this->mod($dcent, 1461);\n $yindex = floor($dquad / 365);\n $year = ($quadricent * 400) + ($cent * 100) + ($quad * 4) + $yindex;\n if (!(($cent == 4) || ($yindex == 4))) {\n $year++;\n }\n $yearday = $wjd - $this->astroToJd($year, 1, 1, 0, 0, 0, 0);\n $leapadj = (\n ($wjd < $this->astroToJd($year, 3, 1, 0, 0, 0, 0)) ? 0\n : ($this->leapGregorian($year) ? 1 : 2)\n );\n $month = floor(((($yearday + $leapadj) * 12) + 373) / 367);\n $day = ($wjd - $this->astroToJd($year, $month, 1, 0, 0, 0, 0)) + 1;\n\n return [$year, $month, $day];\n }", "title": "" }, { "docid": "7216bd1d4c93943fb7c916f119bfa29c", "score": "0.5075663", "text": "function leap_islamic($yr) {\n\t\treturn (((($yr*11)+14)%30)<11);\n\t}", "title": "" }, { "docid": "f5fe93de753c667431dd670e179c51c5", "score": "0.50747156", "text": "private function timezone_data($year) {\n global $DB;\n\n if (! array_key_exists($year, $this->tzdata)) {\n $timezone = \\core_date::get_user_timezone_object(LOCAL_MEDIASERVER_TIMEZONE);\n $transitions = $timezone->getTransitions(\n gmmktime(0, 0, 0, 1, 1, $year), gmmktime(0, 0, 0, 31, 12, $year));\n\n $this->tzdata[$year] = array('dst' => $transitions[1]['ts'], 'std' => $transitions[2]['ts']);\n }\n\n return $this->tzdata[$year];\n }", "title": "" }, { "docid": "9267b3afa0983aede21be4dbd25a7f4c", "score": "0.50663763", "text": "function get_year($cur_date,$type){\n $date_split=split(\"-\",$cur_date);\n if ($type=='1'){\n // Return 2003 Format\n return date(\"Y\",mktime (0,0,0,$date_split[1],$date_split[0],$date_split[2]));}\n elseif ($type=='2'){\n // Return 03 format\n return date(\"y\",mktime (0,0,0,$date_split[1],$date_split[0],$date_split[2]));}\n }", "title": "" }, { "docid": "23c145434ef472abff7d477c3abe7b10", "score": "0.50619423", "text": "public function monthOfTheYear()\r\n {\r\n $current_date = mktime(0,0,0, $this->month, $this->day, $this->year);\r\n $month_number = date('n', $current_date);\r\n\r\n $monthInDutch[1] = 'Januari';\r\n $monthInDutch[2] = 'Februari';\r\n $monthInDutch[3] = 'Maart';\r\n $monthInDutch[4] = 'April';\r\n $monthInDutch[5] = 'Mei';\r\n $monthInDutch[6] = 'Juni';\r\n $monthInDutch[7] = 'Juli';\r\n $monthInDutch[8] = 'Augustus';\r\n $monthInDutch[9] = 'September';\r\n $monthInDutch[10] = 'Oktober';\r\n $monthInDutch[11] = 'November';\r\n $monthInDutch[12] = 'December';\r\n\r\n return $monthInDutch[$month_number];\r\n }", "title": "" }, { "docid": "1eb39a45ed63853df970da6882ead497", "score": "0.50508267", "text": "function tep_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "43de231e9c75ba09f8a623780bef9f2a", "score": "0.5050231", "text": "public function getYear( $cellValue ) {\n //list($month, $day, $year) = explode(\"/\", $cellValue);\n //echo \"$cellValue: year=$year <br>\";\n //return $year;\n $datetime = strtotime($cellValue);\n $year = date(\"Y\", $datetime);\n //echo \"$cellValue: year=$year <br>\";\n return $year;\n }", "title": "" }, { "docid": "abf2778f800a49337a11c65bd769056e", "score": "0.504833", "text": "function getCurrentYear ()\n\t{\n\t\treturn date ('Y');\n\t}", "title": "" }, { "docid": "00b36291b4b6daa1cff15bd71c2fde56", "score": "0.5033192", "text": "function fnacimient($fecha)\r\n{\r\n\t$dia=date(j);\r\n\t$mes=date(n);\r\n\t$ano=date(Y);\r\n\r\n\t$dia_nac = substr($fecha, 8, 2);\r\n\t$mes_nac = substr($fecha, 5, 2);\r\n\t$anonac = substr($fecha, 0, 4);\r\n\r\n\tif ( $anonac==0000 or $mes_nac == 0 or $dia_nac == 0 ){\r\n\t\treturn $edad = 'INDEFINIDO';\r\n\t}else{\r\n\r\n\t\tif (($mes_nac == $mes) && ($dia_nac > $dia)) {\r\n\t\t\t$ano=($ano-1); }\r\n\r\n\t\t\tif ($mesnaz > $mes) {\r\n\t\t\t\t$ano=($ano-1);}\r\n\r\n\t\t\t\t$edad=($ano-$anonac);\r\n\t\t\t\treturn $edad;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "01f694eeaf8a70778565bfe37a4e4128", "score": "0.50324", "text": "public function getHolidayYearBoundaries($year)\n\t{\n\t\t$boudaries = array();\n\t\t\n\t\t$from = $year . '-' . $this->_holidayYearStart;\n\t\t\n\t\t$dateTime = $this->dateTimeFactory->create($from)->addYear()->subDay();\n\t\t\n\t\treturn array('from' => $from, 'to' => $dateTime->toString());\t\n\t}", "title": "" }, { "docid": "aa6f6cb00a071259c697e9223d14f64e", "score": "0.5028966", "text": "public function testYearOnlyDateWithParamFullYear()\n {\n $this->assertFalse(neatlinetime_convert_date('1066', 'full_year'));\n $result = neatlinetime_convert_single_date('1066', 'full_year');\n $this->assertContains('1066-01-01', $result[0]);\n $this->assertContains('1066-12-31', $result[1]);\n }", "title": "" }, { "docid": "4e549af62400acd5a4fa7ae2fffd84f3", "score": "0.5020816", "text": "function calcularEdad($nacimiento){\n $edad=2020-$nacimiento;\n echo(\"La edad de la persona es: $edad\");\n\n}", "title": "" }, { "docid": "0b92fc05a2bb27fbfc2a4d6105abbf28", "score": "0.5013158", "text": "public static function changeEmployeesYear($company_id, $rok){\n $zamestnanci = DB::table('table_employees')\n ->selectRaw('COUNT(*) as count_employees')\n ->where('employee_company', $company_id)\n ->whereYear('created_at', $rok)\n ->groupByRaw('MONTH(created_at)')\n ->get();\n $mesice_zamestnanci = DB::table('table_employees')\n ->selectRaw('MONTH(created_at) as month_employees')\n ->where('employee_company', $company_id)\n ->whereYear('created_at', $rok)\n ->groupByRaw('MONTH(created_at)')\n ->get();\n $statistikaZamestnancu = array(0,0,0,0,0,0,0,0,0,0,0,0);\n for ($i = 0; $i < sizeof($mesice_zamestnanci); $i++){\n $statistikaZamestnancu[$mesice_zamestnanci[$i]->month_employees - 1] = $zamestnanci[$i]->count_employees;\n }\n return $statistikaZamestnancu;\n }", "title": "" }, { "docid": "49f882e69e6760547a071e42ff81b6c8", "score": "0.49966073", "text": "public function getYearDates($year)\n {\n $year_singulars = [];\n $singulars = CalendarSingular::where('year', $year)->get();\n foreach ($singulars as $val)\n {\n $year_singulars[$val->date] = $val;\n }\n\n $dates = $this->getYearBasicDates($year);\n foreach ($dates as $key => $date)\n {\n if (!isset($year_singulars[$date['date']]))\n {\n continue;\n }\n\n $singular_date = $year_singulars[$date['date']];\n if (isset($singular_date['type']) && $singular_date['type'])\n {\n $dates[$key]['type'] = $singular_date['type'];\n }\n\n if (isset($singular_date['target']) && $singular_date['target'])\n {\n $dates[$key]['target'] = $singular_date['target'];\n }\n }\n return $dates;\n }", "title": "" }, { "docid": "8f2096c9f622912bd4ef6b7c31fa7793", "score": "0.4994433", "text": "public function testFirstOccurrencesByYearDay() {\n\t\t$rule = 'FREQ=YEARLY;INTERVAL=2;BYYEARDAY=1;COUNT=5';\n\t\t$start = strtotime('2009-10-27T090000');\n\t\t$freq = new SG_iCal_Freq($rule, $start);\n\t\t$this->assertEquals(strtotime('2009-10-27T09:00:00'), $freq->firstOccurrence());\n\t\t$this->assertEquals(strtotime('2011-01-01T09:00:00'), $freq->nextOccurrence($start));\n\t}", "title": "" }, { "docid": "245acfdb46bbaf82e614a831e1d0fd76", "score": "0.4980855", "text": "function get_year_dates($year = null, $start_month = 12, $end_month = 11)\n{\n if (!isset($year)) {\n $year = date('Y');\n }\n $start_date = $year - 1 . '-' . $start_month . '-01';\n $end_date = $year . '-' . $end_month . '-30';\n return [\n 'start_date' => $start_date,\n 'end_date' => $end_date\n ];\n}", "title": "" }, { "docid": "f88982777ffdffb10fb789a71a5f7583", "score": "0.49714336", "text": "public function year() {\n\t\t$chunks=explode('-',$this->internalDateString);\n\t\treturn $chunks[0];\n\t}", "title": "" }, { "docid": "adc4f0c0edadb3b9ff100c9be62267a5", "score": "0.49584866", "text": "function getYear($datePart){\n // echo \"datepart-\" . $datePart . \"<br>\";\n return substr($datePart,0,4); \n }", "title": "" }, { "docid": "4f56508f61ecbb3b7c3e15f0e975d2b5", "score": "0.49478394", "text": "function leap_gregorian($year) {\n\n\t\treturn ( (($year % 4)==0) && (!( (($year % 100)==0) && (($year % 400) != 0) )));\n\t}", "title": "" }, { "docid": "adebbc287152c059bc7247da5524cc03", "score": "0.49471247", "text": "function easter_jd ( $year, $offset=0 ) {\n\n\t\t$FirstDig = (int)($year/100);\t//first 2 digits of year\n\t\t$Remain19 = $year % 19;\t\t\t//remainder of year / 19\n\n\t\t//calculate PFM date\n\n\t\t$temp = ( (int)(($FirstDig - 15) /2) + 202 - 11 * $Remain19);\n\n\t\tswitch ($FirstDig) {\n\t\t\tcase 21:\n\t\t\tcase 24:\n\t\t\tcase 25:\n\t\t\tcase 27:\n\t\t\tcase 28:\n\t\t\tcase 29:\n\t\t\tcase 30:\n\t\t\tcase 31:\n\t\t\tcase 32:\n\t\t\tcase 34:\n\t\t\tcase 35:\n\t\t\tcase 38:\n\t\t\t\t$temp = $temp - 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 33:\n\t\t\tcase 36:\n\t\t\tcase 37:\n\t\t\tcase 39:\n\t\t\tcase 40:\n\t\t\t\t$temp = $temp - 2;\n\t\t\t\tbreak;\n\t\t}\t//end switch\n\n\t\t$temp = $temp % 30;\n\n\t\t$tA = $temp + 21;\n\t\tif ($temp == 29 ) $tA = $tA -1;\n\t\tif($temp == 28 And $Remain19 > 10) $tA = $tA - 1;\n\n\t\t//find the next Sunday\n\t\t$tB = ($tA - 19) % 7;\n\n\t\t$tC = (40 - $FirstDig) % 4;\n\t\tif ($tC == 3) $tC = $tC +1;\n\t\tif ($tC > 1) $tC = $tC +1;\n\n\t\t$temp = $year % 100;\n\t\t$tD = ($temp + ((int)($temp / 4)) ) % 7;\n\n\t\t$tE = ((20 -$tB - $tC - $tD) % 7 ) + 1;\n\t\t$da = $tA + $tE;\n\n\t\t//return the date\n\t\tif ( $da > 31 ) {\n\t\t\t$da = $da - 31;\n\t\t\t$mo = 4;\n\t\t} else {\n\t\t\t$mo = 3;\n\t\t}\n\n\t\treturn( gregorian_to_jd($mo, $da, $year) + $offset );\n\n\t}", "title": "" }, { "docid": "f9c8ca41988812062289013fab42e57f", "score": "0.49462014", "text": "function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}", "title": "" }, { "docid": "69436e013d28e233a476afb99dec933f", "score": "0.494133", "text": "private function daysInYear($year) {\n\t\treturn ($this->yearIsLeap($year))?366:365;\n\t}", "title": "" }, { "docid": "b130c1b8d12f1a24f2b5c9a1e90696a1", "score": "0.4917456", "text": "private function getYears() {\n $startyear = 2014;\n $currentyear = (new DateTime())->format('Y');\n \n for ($year = $startyear; $year < $currentyear+3; $year ++ ) {\n $years[$year] = $year;\n }\n return $years;\n }", "title": "" }, { "docid": "a996da631816118a2b3f9c1226361439", "score": "0.4912767", "text": "function valorFinalDCc($nominal, $taxa, $tempo)\n{\n $vf = $nominal / pow((1 + $taxa), $tempo);\n return $vf;\n}", "title": "" }, { "docid": "defa32b7550530215fb1a0199608fe01", "score": "0.4908251", "text": "public function FireStatisticalinYear($date){\n $month_array = array();\n $month = date('Y/m', strtotime($date));\n $month_array[0]['month'] = $month;\n $month_array[0]['count'] = $this->FireStatistical($month);\n for($i = 1; $i < 6; $i++){\n $month = date('Y/m', strtotime($date.' -'.$i.' month'));\n $month_array[$i]['month'] = $month;\n $month_array[$i]['count'] = $this->FireStatistical($month);\n }\n return $month_array;\n }", "title": "" }, { "docid": "5cdd3af0ee216e8e8e552f7b362b174d", "score": "0.49021015", "text": "public static function getNonComplianceMonths()\n\t\t{\n\t\t\t$rem = self::getDelinquency();\n \t$fCentres = $rem['fullCompliance'];\n \t$pCentres = $rem['partCompliance'];\n \t$zCentres = $rem['zeroCompliance'];\n \t$pCentreNC = $rem['noncomplianceMonths'];\n\n \t$query = new Query();\n \t$centres = $query\n ->select(['wpLocCode','_id'=>false])\n ->from('centres')\n ->where(['status'=>Centres::STATUS_ACTIVE])\n ->all();\n\n \tforeach($centres as $centre):\n $centresCode[] = (int)Arrayhelper::getValue($centre,'wpLocCode');\n endforeach;\n \t\n \t//first get the past nearest reminder date\n \t$actRem=ReminderMaster::getActiveReminder();\n \t$remDate = date_create($actRem->getLastRemDate());\n \tdate_sub($remDate,date_interval_create_from_date_string(\"1 months\"));\n \t$endDate = self::getYearEndDate();\n \t$res = CommonHelpers::dateCompare($endDate,date_format($remDate,'d-m-Y'));\n \t\n \t//if the year is ending before the reminder date, reminder last date should be only the current year end date.\n \tif(!$res)\n \t\t$remDate = date_create($endDate);\n\n \t$remMonth = date_format($remDate,\"m-Y\");\n \t$currYear = CurrentYear::getCurrentYear();\n \t$startDate = $currYear->yearStartDate;\n \t$startMonth = date_format(date_create($startDate),\"m-Y\");\n \n \t\t$statusArray = array();\n\n \t\t//for zero compliant centres all the months of the current year\n \t\t//have to be added without calculation..\n \tforeach ($centresCode as $centre):\n\t if (in_array($centre, $zCentres))\n\t {\n\t $months=$startMonth.' to '.$remMonth;\n\t $statusArray[] =['centres'=>$centre, 'months'=>$months];\n\t }\n\t endforeach; \n \t$zCentreArray = ArrayHelper::map($statusArray,'centres','months');\n\n \t// now find out months for partially compliant centres.\n \tforeach ($pCentreNC as $key=>&$value):\n\t array_walk($value, function(&$value,$key)\n\t {\n\t foreach ($value as $val):\n\t $val=\"01-\".$val;\n\t $val=date_format(date_create($val,timezone_open('Asia/Kolkata')),'M-Y');\n\t endforeach;\n\t $value = implode(', ',$value);\n\t return $value;\n\t });\n \t\tendforeach;\n\n \t\t//merge the non compliant month arrays for zero compliant and partial compliant centres for total non compliant centres & their months.\n \t$noncompliance = ArrayHelper::merge($zCentreArray, $pCentreNC);\n \treturn \n \t\t[\n \t\t\t'noncompliance'=>$noncompliance,\n \t\t\t'zerocompliance'=>$zCentreArray,\n \t\t\t'partcompliance'=>$pCentreNC,\n \t\t\t'startDate'=>$startDate,\n \t\t\t'endDate'=>$endDate,\n \t\t];\n\t\t}", "title": "" }, { "docid": "d28c4eff32f4013419f169509cbfc777", "score": "0.4897648", "text": "public static function changeShiftsYear($company_id, $rok) {\n $smeny = DB::table('table_shifts')\n ->selectRaw('COUNT(*) as count_shifts')\n ->where('company_id', $company_id)\n ->whereYear('shift_start', $rok)\n ->groupByRaw('MONTH(shift_start)')\n ->get();\n $mesice_smeny = DB::table('table_shifts')\n ->selectRaw('MONTH(shift_start) as month_shifts')\n ->where('company_id', $company_id)\n ->whereYear('shift_start', $rok)\n ->groupByRaw('MONTH(shift_start)')\n ->get();\n $statistikaSmen = array(0,0,0,0,0,0,0,0,0,0,0,0);\n for ($i = 0; $i < sizeof($mesice_smeny); $i++){\n $statistikaSmen[$mesice_smeny[$i]->month_shifts - 1] = $smeny[$i]->count_shifts;\n }\n return $statistikaSmen;\n }", "title": "" }, { "docid": "d58303fe33b0cdae3d36efe5c9992e84", "score": "0.48896363", "text": "function getYear($date,$numeric=false){\n return $numeric?intval(substr($date, 0,4)):substr($date, 0,4);\n}", "title": "" }, { "docid": "a5ffabf631e2108b5a1b346ec5d4f182", "score": "0.48858383", "text": "function bball_season() {\r\n\tif ( date(\"m\") <= 5 ) {\r\n\t\treturn ( date(\"Y\") - 1 ) . \"-\" . date(\"Y\");\r\n\t}\r\n\telse {\r\n\t\treturn date(\"Y\") . \"-\" . ( date(\"Y\") + 1 );\r\n\t}\r\n}", "title": "" }, { "docid": "1cdfb204514c163a49ca6e72a67c98bb", "score": "0.4872746", "text": "function sameyear($old, $new) {\n\t\t$date_old=explode(\"-\",trim($old));\n\t\t$date_new=explode(\"-\",trim($new));\n if ($date_old[0] == $date_new[0]) {\n\t\treturn 1;\n\t\t} else {\n\t\treturn 0;\n\t\t}\n}", "title": "" }, { "docid": "02be9dd84542d6a4f306e70eda439b22", "score": "0.48706204", "text": "function _getFocusMonthYear() {\n\n global $dtfrom;\n\n $month_name = \"\";\n $month_num = \"\";\n $year = \"\";\n\n $month_name = date('F', strtotime($dtfrom));\n $month_num = date('n', strtotime($dtfrom));\n $year = date('Y', strtotime($dtfrom));\n\n\n return array(\"MONTH_NAME\" => $month_name, \"MONTH_NUM\" => $month_num, \"YEAR\" => $year);\n}", "title": "" }, { "docid": "e3bea3d31bcc6fcf89c68cb9fb7b3b7f", "score": "0.48704988", "text": "public static function changeVacationsYear($company_id, $rok){\n date_default_timezone_set('Europe/Prague');\n $zamestnanci = Employee::getCompanyEmployees($company_id);\n $id_zamestnancu = array();\n foreach ($zamestnanci as $zamestnanec){\n array_push($id_zamestnancu,$zamestnanec->employee_id);\n }\n $dovolene = DB::table('table_vacations')\n ->selectRaw('COUNT(*) as count_vacations')\n ->join('table_employees','table_vacations.employee_id','=','table_employees.employee_id')\n ->whereIn('table_vacations.employee_id',$id_zamestnancu)\n ->whereYear('table_vacations.vacation_start', $rok)\n ->groupByRaw('MONTH(table_vacations.vacation_start)')\n ->get();\n $mesice_dovolene = DB::table('table_vacations')\n ->selectRaw('MONTH(table_vacations.vacation_start) as month_vacation')\n ->whereIn('table_vacations.employee_id',$id_zamestnancu)\n ->whereYear('table_vacations.vacation_start', $rok)\n ->groupByRaw('MONTH(table_vacations.vacation_start)')\n ->get();\n $statistikaDovolene = array(0,0,0,0,0,0,0,0,0,0,0,0);\n for ($i = 0; $i < sizeof($mesice_dovolene); $i++){\n $statistikaDovolene[$mesice_dovolene[$i]->month_vacation - 1] = $dovolene[$i]->count_vacations;\n }\n return $statistikaDovolene;\n }", "title": "" }, { "docid": "d69855ff5a6aba78c654fb4693e5c0e5", "score": "0.48666242", "text": "function schoolYear($year) {\n $school_year = \"\";\n for ($i = 0; $i < (int)$year; $i++) {\n $school_year .= \"school\";\n }\n return $school_year;\n}", "title": "" }, { "docid": "e434d84d6c3cb17257c6b9f0049952b8", "score": "0.48662218", "text": "function get_all_hazard_fiscal_years($conn) {\n $query_date = \"SELECT MIN(date), MAX(date) FROM hazard\";\n $dates = exec_query($conn, $query_date);\n $min_date = DateTime::createFromFormat('Y-m-d', $dates[0][0]);\n $max_date = DateTime::createFromFormat('Y-m-d', $dates[0][1]);\n $min_fiscal_year = get_corresponding_fiscal_year($min_date);\n $max_fiscal_year = get_corresponding_fiscal_year($max_date);\n return range($min_fiscal_year, $max_fiscal_year);\n}", "title": "" }, { "docid": "ca39b3389a141f18ebbc964ec66241ad", "score": "0.4865303", "text": "public function year()\n {\n return $this->config->numbers(date('Y', $this->dateTime));\n }", "title": "" }, { "docid": "e2226484b5f05b2161848e06d6c1f387", "score": "0.48651224", "text": "function vek($rokNarodenia)\n {\n return 2021 - $rokNarodenia;\n }", "title": "" }, { "docid": "f1be6ce7816826d1138bf8bdd61cb833", "score": "0.48624378", "text": "private function brazilianHolidays(int $year): array\n {\n $fixHolidays = [\n 1 => [1],\n 2 => [],\n 3 => [],\n 4 => [21],\n 5 => [1],\n 6 => [],\n 7 => [],\n 8 => [],\n 9 => [7],\n 10 => [12],\n 11 => [2, 15],\n 12 => [25],\n ];\n\n $brHolidays = [\n $this->carnivalDate((int) $year)->modify('-1 day'), // Carnival (monday)\n $this->carnivalDate((int) $year), // Carnival\n $this->easterDate((int) $year)->modify('-2 days'), // Passion friday\n $this->easterDate((int) $year), // Easter\n $this->corpusChristDate((int) $year), // Corpus Christi\n ];\n\n foreach ($fixHolidays as $month => $days) {\n foreach ($days as $day) {\n $brHolidays[] = new DateTime('@' . mktime(0, 0, 0, $month, $day, $year));\n }\n }\n\n asort($brHolidays);\n\n return $brHolidays;\n }", "title": "" }, { "docid": "b995d681c65e471b5f09b623f8ef9ddb", "score": "0.4859745", "text": "function test_getDates_yearly()\n {\n atkdebug(\"TEST YEARLY DATES\");\n $item = array(\"startdate\"=>array(\"day\"=>1,\"month\"=>10,\"year\"=>2006),\n \"enddate\"=>array(\"day\"=>1,\"month\"=>10,\"year\"=>2006),\n \"starttime\"=>\"10:00\",\n \"endtime\"=>\"12:00\",\n \"cyclus\"=>array(\"yearly_choice\"=>1,\n \"cyclus_enddate\"=>array(\"day\"=>10,\"month\"=>10,\"year\"=>2009),\n 'end_choice'=>2,\n \"yearly_day\"=>2,\n \"yearly_month\"=>1),\n \"recur\"=>\"yearly\");\n $valid_dates = array('2007-01-02','2008-01-02','2009-01-02');\n $dates = schedulertools::getDates($item,\"2006-09-15\",\"2010-10-20\");\n $ret = atkArrayCompare($valid_dates,$dates);\n $this->assertEqual(false, $ret, \"Yearly item, every 2 januari\");\n\n $item['cyclus']=array(\"yearly_choice\"=>2,\n \"cyclus_enddate\"=>array(\"day\"=>10,\"month\"=>10,\"year\"=>2009),\n 'end_choice'=>2,\n \"yearly_month_time\"=>3,\n \"yearly_weekday_list\"=>1,\n \"yearly_month2\"=>2);\n $valid_dates = array('2007-02-18','2008-02-17','2009-02-15');\n $dates = schedulertools::getDates($item,\"2006-09-15\",\"2009-10-20\");\n $ret = atkArrayCompare($valid_dates,$dates);\n $this->assertEqual(false, $ret, \"Yearly item, every 3th sunday of februari\");\n\n \n $item['cyclus']=array(\"yearly_choice\"=>2,\n \"cyclus_enddate\"=>array(\"day\"=>10,\"month\"=>10,\"year\"=>2009),\n 'end_choice'=>2,\n \"yearly_month_time\"=>-1,\n \"yearly_weekday_list\"=>1,\n \"yearly_month2\"=>2);\n $valid_dates = array('2007-02-25','2008-02-24','2009-02-22');\n $dates = schedulertools::getDates($item,\"2006-09-15\",\"2009-10-20\");\n $ret = atkArrayCompare($valid_dates,$dates);\n $this->assertEqual(false, $ret, \"Yearly item, every last sunday of februari\");\n\n \n \n }", "title": "" }, { "docid": "3fd4047e1282774c7dd39199a2dd282d", "score": "0.48571643", "text": "public function testGetYear()\n {\n $year = new Year(2015);\n $month = new Month($year, 5);\n\n $this->assertEquals($year, $month->getYear(), 'The year object returned is incorrect.');\n }", "title": "" }, { "docid": "d4b2c85cecd9925685a89ec2593ddaeb", "score": "0.4856315", "text": "function date2year($date)\n{\n return substr($date,0,4);\n}", "title": "" }, { "docid": "5ba80b58e9af5bfbb921231e1c6b5f9f", "score": "0.48511985", "text": "function magia_dates_holidays_belgium($year = null) {\n \n $dates = array();\n \n foreach (holidays_list() as $key => $value) {\n array_push($dates, $value['date']);\n }\n\n return $dates;\n}", "title": "" }, { "docid": "cb0fe222ed4087c86897e7d2a27173a9", "score": "0.48493838", "text": "public function getSsStartYears() {\n $years = array();\n $first = date(\"Y\");\n\n for ($index = 5; $index >= 0; $index--) {\n $year = $first - $index;\n $years[$year] = $year;\n }\n $years = array(0 => $this->__('Year')) + $years;\n return $years;\n }", "title": "" }, { "docid": "fe7038f55aa7487edbd42e0780ad3ef7", "score": "0.48491886", "text": "public function getYear($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "58856da1c013c103a8c6cedd05c24bff", "score": "0.4848742", "text": "function p2g($j_y, $j_m, $j_d){\n $g_days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);\n $j_days_in_month = array(31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 29);\n $jy = $j_y-979;\n $jm = $j_m-1;\n $jd = $j_d-1;\n $j_day_no = 365*$jy + floor($jy/33)*8 + floor(($jy%33+3)/4);\n for ($i=0; $i < $jm; ++$i){\n $j_day_no += $j_days_in_month[$i];\n }\n $j_day_no += $jd;\n $g_day_no = $j_day_no+79;\n $gy = 1600 + 400*floor($g_day_no/146097);\n $g_day_no = $g_day_no % 146097;\n $leap = true;\n if ($g_day_no >= 36525){\n $g_day_no--;\n $gy += 100*floor($g_day_no/36524);\n $g_day_no = $g_day_no % 36524;\n if ($g_day_no >= 365){\n $g_day_no++;\n }else{\n $leap = false;\n }\n }\n $gy += 4*floor($g_day_no/1461);\n $g_day_no %= 1461;\n if ($g_day_no >= 366){\n $leap = false;\n $g_day_no--;\n $gy += floor($g_day_no/365);\n $g_day_no = $g_day_no % 365;\n }\n for ($i = 0; $g_day_no >= $g_days_in_month[$i] + ($i == 1 && $leap); $i++){\n $g_day_no -= $g_days_in_month[$i] + ($i == 1 && $leap);\n }\n $gm = $i+1;\n $gd = $g_day_no+1;\n\n return array($gy, $gm, $gd);\n}", "title": "" }, { "docid": "9eba669953018d8bb6418272f3008823", "score": "0.48484573", "text": "private static function getStartDateForYear($args, $yr) {\n $day = substr($args['season_start'], 0, 2);\n $month = substr($args['season_start'], 2, 2);\n $proposedStart=mkTime(0, 0, 0, $month, $day, $yr);\n if ($args['weekday']) {\n $dateArr = getdate($proposedStart);\n if (strtolower($dateArr['weekday'])!==strtolower($args['weekday']))\n $proposedStart=strtotime('Last '.$args['weekday'], $proposedStart);\n }\n return $proposedStart;\n }", "title": "" }, { "docid": "496523df8e5eec40d9fbbd4d66f22b9e", "score": "0.48461396", "text": "function hebrew_delay_1($yr) {\n\n\t\t$mos = floor( ((235 * $yr) - 234 ) / 19);\n\t\t$parts = 12084 + 13753 * $mos;\n\t\t$day = $mos * 29 + floor($parts / 25920);\n\n\t\tif ( (3*($day+1) % 7) < 3 ) $day++;\n\n\t\treturn ($day);\n\t}", "title": "" }, { "docid": "a43480cd26af72bf243e92bb007b9fba", "score": "0.48431808", "text": "function oos_is_leap_year($year) {\n if ($year % 100 == 0) {\n if ($year % 400 == 0) return true;\n } else {\n if (($year % 4) == 0) return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "cfcef3d708e2902f7bb589fc6fde46e5", "score": "0.4841756", "text": "public function getCurrentYear()\r\n {\r\n \r\n return $this->current_calendar['year'];\r\n \r\n }", "title": "" }, { "docid": "2f1c27da4b8dfa4d6ca8954ed8431f71", "score": "0.48394886", "text": "public function years()\n {\n $YEAR=date('Y');\n //echo $year;\n $year=array($YEAR-1,$YEAR,$YEAR+1);\n //die;\n if($year)\n {\n return response()->json([\n \"code\" => 200,\n \"data\" => $year,\n ]);\n } else {\n return response()->json([\n \"code\" => 404,\n \"msg\" => \"not found\"\n ]);\n }\n\n }", "title": "" } ]
2968fcb2364d8d015fb7fa6273c32578
This is the function for getting duration of uploaded video.
[ { "docid": "7cc8bd8414c5c7cf51d1a396cdd8d1a4", "score": "0.7962818", "text": "public function getDuration() {\n\t\t$cmd = shell_exec(\"$this->ffmpeg_path -i \\\"{$this->file_path}\\\" 2>&1\");\n\t\tpreg_match('/Duration: (.*?),/', $cmd, $matches);\n\t\tif (count($matches) > 0) {\n\t\t\treturn $matches[1];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "0d9c77f1276f82b62e3d01de32f39423", "score": "0.8143418", "text": "function getOGVideoDuration();", "title": "" }, { "docid": "5a22ebe8ebbf23024845e4b95b1ac66d", "score": "0.7868718", "text": "private function get_duration(){\n\t\t$result = mysql_query(\"SELECT duration FROM videos WHERE video_id = '$this->video_id'\");\n\t\t$row = mysql_fetch_array($result);\n\t\treturn $row[0];\n\t}", "title": "" }, { "docid": "cf8620dc5adebae462b88ac1411406cf", "score": "0.77817667", "text": "public function duration(): int {\n return (int) shell_exec(\n $this->ffprobe . \" -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {$this->video}\"\n );\n\n //$duration = shell_exec(self::FFPROBE_PATH . \" -i \" . $this->videopath . \" 2>&1 | grep \\\"Duration\\\" | cut -d ' ' -f 4 | sed s/,//\");\n //$duration_array = explode(\":\", $duration);\n //$secs = $duration_array[2] + 0;\n //$mins = $duration_array[1] + 0;\n //return $secs + ($mins * 60);\n }", "title": "" }, { "docid": "6113fcaf10f57d00306360bb36f3c70a", "score": "0.77672833", "text": "public function getVideoDuration()\n {\n $this->ensureMediaGroupIsNotNull();\n if ($this->getMediaGroup()->getDuration() != null) {\n return $this->getMediaGroup()->getDuration()->getSeconds();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "95a43b9c109364903fa0e85e5e4ae2d1", "score": "0.7629345", "text": "private function getLengthInSecondsFromFile()\n {\n //the mp4info class likes to spit out random crap. hide it with an output buffer\n ob_start();\n $result = @MP4Info::getInfo($this->fullPath);\n ob_end_clean();\n if ($result !== null && $result != false && $result->hasVideo === true) {\n return intval($result->duration);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "28d54c3e4d08ef5acf67cbb3f4f1a77d", "score": "0.7263425", "text": "public function videoDuration(string $video_url )\n {\n // https://www.youtube.com/embed/hccLteUCwT0\n preg_match('/embed\\/(.*)/',$video_url,$matches); //matches==id\n $id =$matches[1];\n // dd($id);\n\n\n // appel de l'API youtube\n $response = Http::get(\"https://www.googleapis.com/youtube/v3/videos?key=\".$this->key.\"&id=\".$id.\"&part=contentDetails\");\n $decoded = json_decode($response);\n $duration = $decoded->items[0]->contentDetails->duration;\n\n\n // convertir la duree iso en HMS\n $interval = new DateInterval($duration); //i=min, s=second, h=heure \n return $interval->s = $interval->i * 60 + $interval->h * 3600;\n \n\n }", "title": "" }, { "docid": "1235d325f230b255a9d224bccc2d77fe", "score": "0.7204729", "text": "public function duration () {\n return intval(($this->end_time()->sec - $this->begin_time()->sec) / 60) ;\n }", "title": "" }, { "docid": "fba4fc2508f700f9822b6245e95de98a", "score": "0.70538837", "text": "public function duration(): float\n {\n // calculate duration\n $duration = 0;\n foreach($this->trackSegments as $segment)\n {\n $duration += $segment->duration();\n }\n // return duration\n return $duration;\n }", "title": "" }, { "docid": "d3f46828ddb267e49e73d79d7e5f8fc9", "score": "0.7050688", "text": "function getDuration($fname)\n\t{\n\t\t$duration = shell_exec(\"$this->ffprobe -i \\\"videos/$fname\\\" 2>&1 | grep Duration | awk '{print $2}' | tr -d ,\");\n\n\t\tif (!is_null($duration)) {\n\t\t\t$hours = intval(explode(':', $duration)[0]);\n\t\t\t$minutes = intval(explode(':', $duration)[1]);\n\t\t\t$seconds = intval(explode('.', explode(':', $duration)[2])[0]);\n\n\t\t\treturn (($hours * 60 * 60) + ($minutes * 60) + $seconds);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fac6774de7c6064c2a07b4ab370a1aa0", "score": "0.7024799", "text": "public function get_duration() {\n return $this->_sec2hms($this->_duration, TRUE);\n }", "title": "" }, { "docid": "c1734d3ad15ea489e654e854cc7b59fd", "score": "0.6979657", "text": "public function getDuration()\n {\n if (array_key_exists('duration', $this->_data)) { return $this->_data['duration']; }\n return NULL;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "e264bf5e084ad7a14ced3f8e760d9fb7", "score": "0.6956844", "text": "public function getDuration()\n {\n return $this->duration;\n }", "title": "" }, { "docid": "0384292c3139b1fac1c0d448a84a331a", "score": "0.6932781", "text": "public function getDuration() {\n\t\treturn $this->duration;\n\t}", "title": "" }, { "docid": "0384292c3139b1fac1c0d448a84a331a", "score": "0.6932781", "text": "public function getDuration() {\n\t\treturn $this->duration;\n\t}", "title": "" }, { "docid": "4d4f8c80728dfae1161ce22f34703dd0", "score": "0.6916495", "text": "public function getDuration() : float;", "title": "" }, { "docid": "0ecfcea6fc1d3d801ab1b8ceb3ca8ec8", "score": "0.6898901", "text": "public function getDuration() {\n\t\t\treturn $this->duration;\n\t\t}", "title": "" }, { "docid": "b00b5ec938417058cc82fc463c440268", "score": "0.68793863", "text": "public function get_duration() {\n\t\tif ( null === $this->end ) {\n\t\t\treturn 0.0;\n\t\t}\n\n\t\treturn $this->end - $this->start;\n\t}", "title": "" }, { "docid": "6e8416427d5b41a4cbebd960924e2d34", "score": "0.68612564", "text": "public function getDuration()\n {\n return $this->_duration;\n }", "title": "" }, { "docid": "bf11449fbc4ece4fe1c6465dfd2a236d", "score": "0.68226004", "text": "public function duration()\n\t{\n\t\treturn $this->end - $this->start;\n\t}", "title": "" }, { "docid": "c575cd2454ff376bb0119b01cc652135", "score": "0.6803186", "text": "public function getDuration() {\n\t\t\treturn $this->end - $this->start;\n\t\t}", "title": "" }, { "docid": "2edd8c055de929ad95377b83542c3d36", "score": "0.67944413", "text": "public function getDurationInSeconds();", "title": "" }, { "docid": "1a5241c74fb66bfba2b1a5d9d9d7b4b4", "score": "0.6794233", "text": "public function duration() { return $this->_m_duration; }", "title": "" }, { "docid": "b91774685396c964e8cb28537cf3fd11", "score": "0.6785976", "text": "function mbmGetFLVDuration($file){\r\n\t\r\n\t//$time = 00:00:00.000 helbertei bna\r\n\t$time = exec(\"ffmpeg -i \".$file.\" 2>&1 | grep \\\"Duration\\\" | cut -d ' ' -f 4 | sed s/,//\");\r\n\t\r\n\t\r\n\t$duration = explode(\":\",$time);\r\n\t\r\n\t$duration_in_seconds = $duration[0]*3600 + $duration[1]*60+ round($duration[2]);\r\n\t\r\n\treturn $duration_in_seconds;\r\n\t\r\n\t/* ene code n php iin tuslamjtai zuvhun flv file iin durationg todorhoilno\r\n\t// get contents of a file into a string\r\n\tif (file_exists($file)){\r\n\t\t$handle = fopen($file, \"r\");\r\n\t\t$contents = fread($handle, filesize($file));\r\n\t\tfclose($handle);\r\n\t\t\r\n\t\tif (strlen($contents) > 3){\r\n\t\t\tif (substr($contents,0,3) == \"FLV\"){\r\n\t\t\t\t$taglen = hexdec(bin2hex(substr($contents,strlen($contents)-3)));\r\n\t\t\t\tif (strlen($contents) > $taglen){\r\n\t\t\t\t\t$duration = hexdec(bin2hex(substr($contents,strlen($contents)-$taglen,3)));\r\n\t\t\t\t\treturn ceil($duration/1000);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n\t*/\r\n}", "title": "" }, { "docid": "cc1222211c903641ea6760732cc8c540", "score": "0.67806214", "text": "public function getDuration()\n\t{\n\t\t$startTime = strtotime($this->start_time);\n\t\t$endTime = strtotime($this->end_time);\n\t\treturn $endTime - $startTime;\n\t}", "title": "" }, { "docid": "963a83a023a9713f9cdbe2f81023126a", "score": "0.6775278", "text": "public function duration()\n {\n return $this->end->getTimestamp()-$this->start->getTimestamp();\n }", "title": "" }, { "docid": "8c1f5abefac072dd6a17cd8fc1978d42", "score": "0.677297", "text": "public function GetDuration() {\n\t\treturn round($this->endTime - $this->startTime, 2);\n\t}", "title": "" }, { "docid": "16320986d38be8bce59fefb9b45c9e62", "score": "0.6763821", "text": "public function getDuration()\n {\n return $this->end - $this->start;\n }", "title": "" }, { "docid": "b22a3a70d60dd2f0b3882da2b5283baa", "score": "0.6715129", "text": "private function calculateDuration(){\n\t\t\tif($this->end === NULL || $this->end === ''){\n\t\t\t\tif(!is_numeric($this->duration))\n\t\t\t\t\t$this->duration = 30;\n\n\t\t\t\treturn $this->duration; \n\t\t\t}\n\n\t\t\t$startObj = new \\DateTime($this->start);\n\t\t\t$endObj = new \\DateTime($this->end);\n\n\t\t\t//Use absolute difference and remove any decimals.\n\t\t\treturn floor(abs($startObj->getTimestamp() - $endObj->getTimestamp())/60);\n\t\t}", "title": "" }, { "docid": "523c9075b72e3ec05101031b66c64217", "score": "0.6674406", "text": "private function parseVideoDuration($video)\n\t{\n\t\t$time = intval($video->duration);\n $minutes = intval($time / 60);\n $seconds = $time % 60;\n \n if($minutes < 10) $minutes = '0'. $minutes;\n if($seconds < 10) $seconds = '0'. $seconds;\n\n return $minutes .':'. $seconds;\n\t}", "title": "" }, { "docid": "99994f20c6ba1e47d19feaa5026d1147", "score": "0.66535497", "text": "public function getDuration()\n {\n return $this->dur;\n }", "title": "" }, { "docid": "bb6778ff17bbd823e21b082996b6e9f6", "score": "0.65994245", "text": "public function previewDuration() { return $this->_m_previewDuration; }", "title": "" }, { "docid": "14f0a978a60a034fb60e06b4586cbc74", "score": "0.65908027", "text": "public function getDurationAttribute()\n {\n return $this->start_time->diffInSeconds($this->end_time);\n }", "title": "" }, { "docid": "ab317f3748043933b69c516d79535102", "score": "0.65904087", "text": "public function getDuration() { return $this->duration; }", "title": "" }, { "docid": "17600166eaad56930b2c380c83e887c7", "score": "0.65537", "text": "public function checkContentDuration($id) {\n// $path = \"/var/www/vhosts/e-taliano.tv/httpdocs/home/mediatv/_contenuti/$id/$id.flv\";\n// $getID3 = new getID3();\n// $file = $getID3->analyze($path);\n// return (int) $file['playtime_seconds'];\n return 0;\n }", "title": "" }, { "docid": "1c5bf48307b62a38f258b829dd62c235", "score": "0.64896977", "text": "function &getDuration() {\n\t\treturn (int) $this->duration;\n\t}", "title": "" }, { "docid": "bb7da47d4939eb072a4e10d1ecacbeaa", "score": "0.64812344", "text": "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "title": "" }, { "docid": "d9856343a763c996de975a99845dc4d0", "score": "0.64532965", "text": "public function getDuration(): float {\n if( is_null($this->stop)) {\n $this->stop = microtime(true);\n }\n return $this->stop - $this->start;\n }", "title": "" }, { "docid": "7b6661b167a325e16119f9ab416f8712", "score": "0.64454883", "text": "public function asVideoDuration($value)\n {\n $zeroDateTime = (new \\DateTime())->setTimestamp(0);\n $valueDateTime = (new \\DateTime())->setTimestamp(abs($value));\n $interval = $valueDateTime->diff($zeroDateTime);\n \n if ($interval->h > 0) {\n $time = sprintf(\"%d:%02d:%02d\", $interval->h, $interval->i, $interval->s);\n } else {\n $time = sprintf(\"%02d:%02d\", $interval->i, $interval->s);\n }\n \n return $time; \n }", "title": "" }, { "docid": "5b1b359a759547a7bb85f7c7bf22659c", "score": "0.64331645", "text": "public function getDuration(): ?string\n {\n return $this->duration;\n }", "title": "" }, { "docid": "9eb34f7b58c4302cbbb43af30c9f9f1b", "score": "0.6432643", "text": "public function veDuration() {\n $duration = '';\n $cohortarray = $this->veCohorts();\n $course_status = vu_courses_is_international_course_url();\n foreach ($cohortarray as $item) {\n if (!$course_status && $item['title'] == 'Domestic') {\n if (!empty($item['courseduration'])) {\n $duration = $item['courseduration'];\n break;\n }\n }\n if ($course_status && $item['title'] == 'International On-Shore') {\n if (!empty($item['courseduration'])) {\n $duration = $item['courseduration'];\n break;\n }\n }\n }\n\n return $duration;\n }", "title": "" }, { "docid": "f00bd5b1d6e210538e4052579fdba882", "score": "0.6412179", "text": "public function getDurationInSeconds()\n {\n return $this->durationInSeconds;\n }", "title": "" }, { "docid": "64e6dc6eddf2be87958ea9305985f81e", "score": "0.63096255", "text": "public function duration()\n {\n if (! $this->hasStarted()) return '';\n\n return ($this->finished_at ?? Carbon::now())\n ->diffAsCarbonInterval($this->started_at)\n ->forHumans(['short' => true]);\n }", "title": "" }, { "docid": "89b6e90d15be122b2afb6260905a0ba0", "score": "0.6299665", "text": "public function getDuration(string $filename) : string\n {\n $command = \"ffmpeg -i {$filename} 2>&1 | grep Duration | awk '{print $2}' | tr -d ,\";\n exec($command, $result, $status);\n\n if ($status || !count($result))\n $result = array('00:00:00.00');\n\n return $result[0];\n }", "title": "" }, { "docid": "52de2fd3626389b3fb3f3364609dea02", "score": "0.62817436", "text": "public function getDuration(): ?float\n {\n return $this->duration;\n }", "title": "" }, { "docid": "de6e77787e071411ebc3fb9e6a509ba5", "score": "0.62327677", "text": "function acf_vimeo_seconds_to_duration($seconds)\n{\n\t$length_array = acf_vimeo_seconds_to_time($seconds);\n\t\n\t$length = \"\";\n\tif($length_array['hours'] != \"\") { $length = $length_array['hours'] . \":\"; }\n\tif($length_array['minutes'] < 1) $length_array['minutes'] = \"0\";\n\t$length .= $length_array['minutes'] . \":\";\n\tif($length_array['seconds'] < 10) { $length_array['seconds'] = \"0\" . $length_array['seconds']; }\n\t$length .= $length_array['seconds'];\n\t\n\treturn $length;\n}", "title": "" }, { "docid": "8ad0bc36b0732d1abf16b6e32b10952d", "score": "0.6230885", "text": "function getDurationSeconds($duration){\n\t\t preg_match_all('/[0-9]+[HMS]/',$duration,$matches);\n\t\t $duration=0;\n\t\t foreach($matches as $match){ \n\t\t foreach($match as $portion){ \n\t\t $unite=substr($portion,strlen($portion)-1);\n\t\t switch($unite){\n\t\t case 'H':{ \n\t\t $duration += substr($portion,0,strlen($portion)-1)*60*60; \n\t\t }break; \n\t\t case 'M':{ \n\t\t $duration +=substr($portion,0,strlen($portion)-1)*60; \n\t\t }break; \n\t\t case 'S':{ \n\t\t $duration += substr($portion,0,strlen($portion)-1); \n\t\t }break;\n\t\t }\n\t\t }\n\t\t }\n\t\t return $duration;\n\t\t}", "title": "" }, { "docid": "7074ac6cf58a43661aaaa235f4e7a015", "score": "0.6202103", "text": "private function _determineDuration()\n {\n if (isset($this->parameters['duration'])) {\n $duration = (int)$this->parameters['duration'];\n if (in_array($duration, $this->duration_options)) {\n return $duration;\n }\n }\n return Kohana::config('products.duration');\n }", "title": "" }, { "docid": "4566b334df8cc7febacdb825b4608da8", "score": "0.6188426", "text": "public function getRemainingDuration(): int;", "title": "" }, { "docid": "bcbdfb6de25e77f1ce05918a51178dd5", "score": "0.6133071", "text": "public function getDurationInMilliseconds()\n {\n if (array_key_exists(\"durationInMilliseconds\", $this->_propDict)) {\n return $this->_propDict[\"durationInMilliseconds\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3373165f55989a1be269472cf23d1f7c", "score": "0.60942936", "text": "public static function getDurationByVideoInformation($videoInfo) {\n $duration['duration'] = 0;\n $duration['duration_formatted'] = '0';\n\n if (isset($videoInfo['format']['duration'])) {\n $duration['duration'] = round(time_to_seconds($videoInfo['format']['duration']));\n $duration['duration_formatted'] = format_duration($duration['duration']);\n } elseif (isset($videoInfo->format->duration)) {\n $duration['duration'] = round(time_to_seconds($videoInfo->format->duration));\n $duration['duration_formatted'] = format_duration($duration['duration']);\n }\n\n return $duration;\n }", "title": "" }, { "docid": "b6154a822ba655e9574691dce7f0b922", "score": "0.6067971", "text": "abstract protected function getUploadMtime();", "title": "" }, { "docid": "c03e15a168792909a9f55c502338b8b5", "score": "0.60556847", "text": "function getJobDuration()\n {\n return $this->__jobduration ;\n }", "title": "" }, { "docid": "2ee6a3736db36bb4cebd9a63d4790ec7", "score": "0.6049821", "text": "public function GetUserDuration(){\n $results = $this->model('Authenticate_Model')->UserAuthenticationduration();\n $result = $results['DataReturn']['Response'];\n Flasher::setFlash($result, 'Error', 'primary');\n }", "title": "" }, { "docid": "946ec06b3ce2cfa2b4afeaca13225388", "score": "0.6031669", "text": "public function getLengthInSeconds($force = false)\n {\n if ($this->lengthInSeconds == false && $force !== true) {\n //first, try to read the file, since it knows how long the video ACTUALLY is\n $this->lengthInSeconds = $this->getLengthInSecondsFromFile();\n //if the seconds value was valid, return it\n if ($this->lengthInSeconds !== false) {\n return $this->lengthInSeconds;\n }\n //seconds was not able to be determined from the file. try reading it from the metadata.\n $this->lengthInSeconds = $this->getLengthInSecondsFromMetadata();\n if ($this->lengthInSeconds > 0) {\n return $this->lengthInSeconds;\n } else {\n return -1;\n }\n } else {\n return $this->lengthInSeconds;\n }\n }", "title": "" }, { "docid": "25b24383db8a2c282430a686df3e77f1", "score": "0.6024885", "text": "function calculateDuration() { \n if ( !( is_null($this->result)) ) { \n $this->duration = strtotime( $this->finish ) - strtotime( $this->start );\n # split up duration into readable units \n $hours = 0; $minutes = 0; $seconds = 0;\n $hours = floor($this->duration / 3600);\n $newruntime = $this->duration % 3600;\n $minutes = floor($newruntime / 60);\n $seconds = $this->duration % 60;\n\n # fix formatting\n if ($hours < 10) { $hours = \"0$hours\"; }\n if ($minutes < 10) { $minutes = \"0$minutes\"; }\n if ($seconds < 10) { $seconds = \"0$seconds\"; }\n\n $this->duration = \"$hours:$minutes:$seconds\";\n } else {\n $this->duration = \"In progress\";\n }\n }", "title": "" }, { "docid": "53c63b79b196d1ab8f371f6886e5ad3d", "score": "0.60241115", "text": "function sendVideoLength($DBUtil){\r\n\tif (isset($_GET[\"videoIdlength\"]) && !empty($_GET[\"videoIdlength\"])){\r\n\t\t$length = $DBUtil -> getVideoLengthFromDB($_GET[\"videoIdlength\"]);\r\n\t\techo $length;\r\n\t}\r\n}", "title": "" }, { "docid": "8a47f5aa8b91936d1f2a2ff1cf0b60d7", "score": "0.60229343", "text": "public function getDurationWithoutFFMpeg(string $filename) : string\n {\n $handle = fopen($filename, 'r');\n $contents = fread($handle, $this->getSize($filename));\n fclose($handle);\n\n $make_hexa = hexdec(bin2hex(substr($contents, strlen($contents)-3)));\n\n if (strlen($contents) > $make_hexa)\n return '00:00:00';\n \n $pre_duration = hexdec(bin2hex(substr($contents, strlen($contents)-$make_hexa, 3)));\n $post_duration = $pre_duration/1000;\n \n $hours = $post_duration/3600;\n $hours = explode('.', $hours);\n\n $minutes =($post_duration % 3600)/60;\n $minutes = explode('.', $minutes);\n\n $seconds = ($post_duration % 3600) % 60; \n $seconds = explode('.', $seconds);\n\n $duration = $hours[0].':'.$minutes[0].':'.$seconds[0];\n\n return $duration;\n }", "title": "" }, { "docid": "685f49d1863be01a05289be7e24fb380", "score": "0.60166043", "text": "public function getQuestionDuration()\n {\n return $this->question_duration;\n }", "title": "" }, { "docid": "f0fb32e03288f81eb958e1afafb5d908", "score": "0.5981573", "text": "public function getTimeDuration()\n {\n $started = $this->getTimeStart();\n $current = $this->getTimeCurrent();\n return $started->diff($current);\n }", "title": "" }, { "docid": "1308f8900759848183389ec2621d7343", "score": "0.5976796", "text": "public function getTotalDurationAttribute()\n {\n return $this->buffer_before + $this->duration + $this->buffer_after;\n }", "title": "" }, { "docid": "eb348e29e56cbfd435aeded6d8c09396", "score": "0.59645885", "text": "public function getDurationText()\n\t{\n\t\t$startTime = new DateTime($this->start_time);\n\t\t$endTime = new DateTime($this->end_time);\n\t\t$diff = $endTime->diff($startTime);\n\t\tif ($diff->y or $diff->m or $diff->d)\n\t\t\t$ret = $diff->format('%a days, %H:%I:%S');\n\t\telse\n\t\t\t$ret = $diff->format('%H:%I:%S');\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "31a7fe4d1cc669df15d7bb36d0c4e369", "score": "0.59056336", "text": "function getLength(){\n\t\tif(isset($this->_String)){ return parent::getLength(); }\n\t\treturn filesize($this->_Filename);\n\t}", "title": "" }, { "docid": "e738147cf7c89df97fd4fa27116cf8da", "score": "0.5894538", "text": "public static function duration($start, $end = null)\n {\n if (null == $end) {\n $end = new \\Datetime();\n }\n $duration = self::transformTime(self::getInterval($start->format('Y-m-d H:i:s'), $end->format('Y-m-d H:i:s')));\n return $duration['hours'].':'.$duration['minutes'].':'.$duration['seconds'];\n }", "title": "" }, { "docid": "428082775ba87e1abfa5770e465be26b", "score": "0.58851683", "text": "public function getVideoRatio()\n\t{\n\t\treturn $this->videoRatio;\n\t}", "title": "" }, { "docid": "faf4f7c6ee42f73a4748d1fc17e96651", "score": "0.5869207", "text": "public function getTimeoutDuration()\n {\n if (array_key_exists(\"timeoutDuration\", $this->_propDict)) {\n if (is_a($this->_propDict[\"timeoutDuration\"], \"\\DateInterval\") || is_null($this->_propDict[\"timeoutDuration\"])) {\n return $this->_propDict[\"timeoutDuration\"];\n } else {\n $this->_propDict[\"timeoutDuration\"] = new \\DateInterval($this->_propDict[\"timeoutDuration\"]);\n return $this->_propDict[\"timeoutDuration\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "b6dedf1c8a1cd702ba1b919586bced7d", "score": "0.5844702", "text": "function get_duration($time1,$time2) {\n\t$time1= strtotime($time1);\n\t$time2= strtotime($time2);\n\treturn round(abs($time2-$time1)/60,2);\n}", "title": "" }, { "docid": "7371d798ec69e5fcc15d39f62b7ab98e", "score": "0.5839875", "text": "function getFileSize(){\n\t\treturn filesize($this->getTmpFileName());\n\t}", "title": "" }, { "docid": "b0a38c47e9feadfa4b8f1560326f76e4", "score": "0.5837352", "text": "public function getDurationUsed()\n {\n return $this->durationUsed;\n }", "title": "" }, { "docid": "580e9195ec172e773c9a1f38f01dddec", "score": "0.5818135", "text": "public function getVideoWidth()\n\t{\n\t\treturn $this->videoWidth;\n\t}", "title": "" }, { "docid": "981da0c6d88da3f637dbe0fe52edd078", "score": "0.5795018", "text": "public function getDurationMinutes(): int\n {\n return $this->durationMinutes;\n }", "title": "" }, { "docid": "0d5b37130d7fb8e220b8475da56f1c65", "score": "0.57888097", "text": "public function getCacheDuration()\n {\n return $this->cacheDuration;\n }", "title": "" }, { "docid": "713b03148252a5408d5b1256ebe5ec47", "score": "0.57862866", "text": "public function getDurations()\n {\n return $this->_durations;\n }", "title": "" }, { "docid": "5620222c0596a3570761b7cedacccede", "score": "0.5784402", "text": "public function getDurationAttribute()\n {\n $start = $this->started_at;\n $end = $this->finished_at;\n switch ($this->type) {\n case 'day_off':\n $duration = 1;\n break;\n case 'vacation':\n $duration = $start->diffInDaysFiltered(function (Carbon $date) {\n return !$date->isWeekend();\n }, $end->addDay());\n break;\n default:\n $days = $start->diffInDaysFiltered(function (Carbon $date) {\n return !$date->isWeekend();\n }, $end->subDay());\n $hours = $start->diffInHoursFiltered(function (Carbon $date) {\n return !$date->isWeekend();\n }, $end->addDay());\n $duration = $hours - $days * 24;\n $duration = $duration / 8 + $days;\n break;\n }\n\n return $duration;\n }", "title": "" }, { "docid": "b5300343885365e05a0c95a860f4eb54", "score": "0.5779157", "text": "public function getCapturedTime();", "title": "" }, { "docid": "f88dadc8f7a0bcc33e16e99e59cd953b", "score": "0.57775754", "text": "public function getFileSize()\n {\n return $this->source->filesize;\n }", "title": "" }, { "docid": "3b6ae86a915cc6f0d245310a7797f855", "score": "0.57726383", "text": "public function getLength() {\n $length = parent::getLength();\n if($length < 1) {\n $length = $this->getFile()->getSize();\n }\n \n return $length;\n }", "title": "" }, { "docid": "fddf3aaf60693fdf97ffcc4d84e64446", "score": "0.57645947", "text": "public function humanReadableDuration(): string\n {\n return FormatHelper::formatSeconds($this->duration());\n }", "title": "" }, { "docid": "827127bf812d4c6f3ad7b9a6a55f9744", "score": "0.57538456", "text": "public function getTotalPauseDuration()\n {\n return $this->total_pause_duration;\n }", "title": "" }, { "docid": "4978f5ed8636126372d5bf12079e4751", "score": "0.57287866", "text": "public function getJd_duration()\n {\n return $this->jd_duration;\n }", "title": "" }, { "docid": "2725beafe607046af266b497c24381a2", "score": "0.57206917", "text": "function calculateDuration()\n {\n if ($this->strAttendanceStart != \"\" && $this->strAttendanceFinish != \"\") {\n $this->intTotalDurationFull = getTotalHour($this->strAttendanceStart, $this->strAttendanceFinish);\n if ($this->strNormalStart == \"\") {\n $this->intTotalDuration = $this->intTotalDurationFull;\n } else {\n $this->intTotalDuration = getTotalHour($this->strNormalStart, $this->strAttendanceFinish);\n } // jam kerja dihitung dari normal\n }\n }", "title": "" }, { "docid": "8a4c91eaf40b8a0d0219a84c066a0b3a", "score": "0.57123107", "text": "public function getPassduration() {\n\t\treturn $this->passduration;\n\t}", "title": "" }, { "docid": "31de701891d59751e4507cb91e18d75e", "score": "0.5709617", "text": "private function set_duration($videoEntry){ // Requires a $video_entry object, duration in seconds\n\t\t$duration = $videoEntry->getVideoDuration();\n\t\t$query = mysql_query(\"UPDATE videos SET duration='$duration' WHERE video_id='$this->video_id'\");\n\t\tmysql_query($query);\n\t}", "title": "" }, { "docid": "e6491ea45eefa7645754947de7750f0e", "score": "0.568604", "text": "public function getCallDuration()\n {\n if (array_key_exists(\"callDuration\", $this->_propDict)) {\n if (is_a($this->_propDict[\"callDuration\"], \"\\DateInterval\") || is_null($this->_propDict[\"callDuration\"])) {\n return $this->_propDict[\"callDuration\"];\n } else {\n $this->_propDict[\"callDuration\"] = new \\DateInterval($this->_propDict[\"callDuration\"]);\n return $this->_propDict[\"callDuration\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "8465e9df44613850d4075654c3368015", "score": "0.5667508", "text": "public function getFormatedCookieDuration()\n {\n $settings = PasswordProtection::$plugin->getSettings();\n\n return DateTimeHelper::secondsToHumanTimeDuration($settings->getPasswordCookieDuration());\n }", "title": "" }, { "docid": "6ea854adca246622a62712b87181aa5f", "score": "0.56603193", "text": "public function getTotalDuration()\n {\n return $this->getTotal($this->getDurationId());\n }", "title": "" }, { "docid": "4653f8accea794a863370b5ee0d9582b", "score": "0.565382", "text": "public function formatDuration(int $duration = null): string {\n\n if ($duration == null) {\n $duration = $this->duration();\n }\n // 3600 seconds in an hour\n $hrs = floor($duration / 3600);\n $mins = floor(($duration - ($hrs * 3600)) / 60);\n $secs = floor($duration % 60);\n\n // If video file's duration is less than an hour, don't display anything for hour\n $hrs = ($hrs < 1) ? \"\" : $hrs . \":\";\n // If video file's duration is less than 10 minutes, prefix the minutes with a zero\n $mins = ($mins < 10) ? \"0\" . $mins . \":\" : $mins . \":\";\n // If video file's duration is less than 10 seconds, prefix the seconds with a zero\n $secs = ($secs < 10) ? \"0\" . $secs : $secs;\n // Set the formatted duration\n $duration = $hrs . $mins . $secs;\n\n return $duration;\n }", "title": "" }, { "docid": "afe1dbc95a0a3adf61f597c6a1276938", "score": "0.56327844", "text": "function duration2($datetime1, $datetime2)\r\n{ \r\n $stayduration = date_diff($datetime1,$datetime2);\r\n return $stayduration;\r\n}", "title": "" }, { "docid": "75c9e7b901ba5fdceaa5e0101de4896c", "score": "0.5587315", "text": "public function getFileSize() {\n return $this->fileSize;\n }", "title": "" }, { "docid": "578cfa45e288a15fb1307cf952abf810", "score": "0.55846506", "text": "public function getSize()\n {\n return $this->_file['size'];\n }", "title": "" }, { "docid": "4b100f2de7cae1e20fb8004a964bd5ad", "score": "0.5582374", "text": "final public function getDurationMicros(): int {}", "title": "" }, { "docid": "4b100f2de7cae1e20fb8004a964bd5ad", "score": "0.5582374", "text": "final public function getDurationMicros(): int {}", "title": "" }, { "docid": "4728031adedeb2a79ec80c67c7321016", "score": "0.55597496", "text": "public function getExecutionDuration()\n {\n if ($this->_startTime === null || $this->_endTime === null) {\n return false;\n }\n return $this->_endTime - $this->_startTime;\n }", "title": "" }, { "docid": "0129054d0cb372e9a1b0d41c3b63c085", "score": "0.5556741", "text": "function GetDuration($s, $v){\n\tif($v!=0){\n\t\treturn ($s/$v)*3600;\t\n\t}\n\treturn false;\n}", "title": "" } ]
a898f08e858a71f1b16448f8739be814
initialize all of our parent layouts etc
[ { "docid": "8fc7ad0d43389fdd29ddbe33e780ba55", "score": "0.0", "text": "function __construct() {\n\t\tparent::__construct();\n\n\t\t// models\n\t\t$models = array(\"vacancy/vacancy\");\n\n\t\t// load the models we have declared as dependencies\n\t\t// $this->load->model($models);\n\n\t}", "title": "" } ]
[ { "docid": "62d0ccf0e90c7d19defb49624badfde7", "score": "0.76936084", "text": "public function initLayout();", "title": "" }, { "docid": "93f2f1e5082ed2ddfc03cabba063429a", "score": "0.7556275", "text": "public function init()\n {\n \t$this->view->layout = array();\n }", "title": "" }, { "docid": "bdf677ca7c1fa17df5b1fefdd0b69e8e", "score": "0.7410754", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t//$i = \n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "01c2306af81a606c9ea4f2b68d898d1a", "score": "0.7286109", "text": "protected function _prepareLayout()\r\n {\r\n parent::_prepareLayout();\r\n }", "title": "" }, { "docid": "442c52966c75890ce760f29244ed99c9", "score": "0.7167358", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t// I guess this is in wrong place.\n\t\t$content['areas'] = Config::get('content.area');\n\t\t$content['parties']= Config::get('content.party');\n\t\tView::share('content', $content);\n\t}", "title": "" }, { "docid": "0d6e68e6e1a3e1cbff47855af0e9959d", "score": "0.7155266", "text": "public function init()\n {\n parent::init();\n\n if ($this->layout === null) {\n $this->layout = $this->module->defaultLayout;\n }\n }", "title": "" }, { "docid": "3619b86243edff8024b829918fb1f01e", "score": "0.7145896", "text": "public function init() {\n\t\t$this->container_style();\n\t\t$this->content_style();\n\t}", "title": "" }, { "docid": "5f59c1c64209743dcd88ce6ecfec04c9", "score": "0.713691", "text": "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $route_parts = explode( '.', Route::currentRouteName() );\n $this->layout = View::make($this->layout)\n ->with('route_name', Route::currentRouteName())\n ->with('route_parent', $route_parts[0])\n ->with('styles', $this->styles)\n ->with('scripts', $this->scripts)\n ->with('inline_js', $this->inline_js);\n }\n }", "title": "" }, { "docid": "abfcb44990673a26aa64b240c6e304cf", "score": "0.712253", "text": "public function init()\n {\n $this->_helper->layout->disableLayout(); \n }", "title": "" }, { "docid": "e8a30b3401824501c3ad4dfdff229fb3", "score": "0.71191674", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n // send variables to master layout\n if (Sentry::check()){\n View::share([\n 'groupid' => $this->getCurrentUserGroup(),\n 'currentuser' => $this->getCurrentUser()\n ]);\n }\n\t}", "title": "" }, { "docid": "f54835edc40080ae3c9d9e81ba581809", "score": "0.7115592", "text": "public function init()\n {\n /**\n * initialize parent here\n **/\n parent::init();\n }", "title": "" }, { "docid": "2b6263f8f28fa65ec62fe72decb978a0", "score": "0.70957583", "text": "public function init()\n {\n\t\t$this->_helper->layout->setLayout('admin');\n }", "title": "" }, { "docid": "51607e3bc2a17b3652cf31b7de9bebc4", "score": "0.70755154", "text": "public function init()\n {\n \t// Override the default layout \"page\" with \"frontpage\"\n \t$this->_helper->layout()->setLayout('frontpage');\n }", "title": "" }, { "docid": "69994ba351cbca08bbde064f43b9dda7", "score": "0.70497787", "text": "public function init()\n {\n if (empty($this->viewList)) {\n $this->viewList = [\n 'page' => Yii::t('core', 'Page view')\n ];\n }\n\n if (empty($this->layoutList)) {\n $this->layoutList = [\n 'main' => Yii::t('core', 'Main layout')\n ];\n }\n\n parent::init();\n }", "title": "" }, { "docid": "a71427471ad1006187de8ea009e1bdeb", "score": "0.70375144", "text": "public function init()\n\t{\n\t\t//$others_game_lists = $this->getOthersGameTable()->fetchAll() ;\t\n\t\t//$this->othersGameTable = $othersGameTable;\t\t\n\t\t//$this->imgsliderTable = $imgsliderTable;\t\t\n\t\t//$this->sponsorTable = $sponsorTable;\t\n\t\t\n\t\t$this->layout()->setVariable('others_game_lists', $this->getOthersGameTable()->fetchAll() );\t\t\t\n\t\t$this->layout()->setVariable('banners', $this->getImageSliderTable()->fetchAll() );\n\t\t$this->layout()->setVariable('site_sponsor', $this->getSponsorTable()->fetchAll() );\n\t}", "title": "" }, { "docid": "aaf95f19f541c3c198c33061e01f8857", "score": "0.7013277", "text": "public function init()\n { \n \t$this->_helper->layout->setLayout('backend');\n }", "title": "" }, { "docid": "76bc86e47e1ad51ec3205a991087a74c", "score": "0.69690394", "text": "protected function setupLayout()\n\t{\n if ( ! is_null($this->layout))\n\t\t{\n $this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "def5adf8223fc8dac5dc8c7efe83e74e", "score": "0.6967764", "text": "protected function setupLayout()\n\t{\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.6937832", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "0f20ef9a091a32fc7b9f850da5cbd7b1", "score": "0.69016194", "text": "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "7a03c73b03ef7794cbef923574394a55", "score": "0.6897543", "text": "public function init(){ \n //call the parent init\n parent::init();\n \n //set the layout to be the admin\n Zend_Layout::getMvcInstance()->assign('nestedLayout', 'admin');\n }", "title": "" }, { "docid": "925afcaa380b33f7f4c522c2fc820c5b", "score": "0.6889042", "text": "public function __construct()\n {\n $this->layout = null;\n parent::__construct();\n }", "title": "" }, { "docid": "7d659496500d4c548d26a467292d4b0d", "score": "0.68790007", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = \\View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70269e9a4027b8d1aef6d10fce40810d", "score": "0.6837402", "text": "protected function _initLayout() {\n \n $configs = array(\n 'layout' => self::LAYOUT_DEFAULT,\n 'layoutPath' => APPLICATION_PATH . '/layouts'\n );\n // inicia o componente\n Zend_Layout::startMvc($configs);\n \n }", "title": "" }, { "docid": "08996dc3c85b86327b26a59abc7c74b6", "score": "0.6824449", "text": "public function init()\n {\n $this->_helper->layout->setLayout('layout_login');\n }", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.6804701", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.6804701", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "c23c8ad14ab66a94b33a018d86c957ba", "score": "0.6801263", "text": "protected function setupLayout()\r\n\t{\r\n\t\t#i: Default layout\r\n if ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n $this->layout->page = false;\r\n\t\t}\r\n\r\n #i: Current route name\r\n $this->route_name = Route::currentRouteName();\r\n\t}", "title": "" }, { "docid": "0a20e76883c287ae7c3e1a857adf17f4", "score": "0.679355", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = view($this->layout);\n }\n\n }", "title": "" }, { "docid": "c4ff80264eeee89a3d49212489fb9bed", "score": "0.6792472", "text": "protected function setupLayout()\n\t{\n\n\t\tView::share('message', Session::get('message'));\n\t\tView::share('company', Config::get('app.company'));\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "d6c6385bc5af5aa0ae2fd46f89b2f09c", "score": "0.67919713", "text": "public function init()\n\t{\n\n\t\t//ini_set('display_errors', 'Off');\n\t\t//error_reporting(E_ALL);\n\n\t\t$layout = $this->_helper->layout();\n \t$layout->setLayout('iframe');\n\t}", "title": "" }, { "docid": "bd9ad9223e2c264b887b268f6d5af8a5", "score": "0.67844296", "text": "public function init(){\n try {\n //$this->_helper->layout()->disableLayout();\n $this->_helper->layout->setLayout('bootstrap'); \n } catch (Zend_Exception $exc) {\n echo $exc->getTraceAsString();\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.67840457", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.67840457", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.67840457", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.67840457", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.67840457", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "1f846e3398af6a4d68f12eb89b4d9844", "score": "0.67763335", "text": "protected function setupLayout() {\n if ( !is_null( $this->layout ) ) {\n $this->layout = View::make( $this->layout );\n }\n }", "title": "" }, { "docid": "97ccf5c19f225489703d96b20635c2ab", "score": "0.6769014", "text": "protected function setupLayout()\n\t{\n View::share('page_title', SITE_NAME);\n\n if (Input::get('list')) {\n Session::put('list', $_GET['list']);\n } else {\n if (! Session::has('list')) Session::put('list', 'card');\n }\n\n Session::put('sortBy', Filterby::sort(Input::get('sort', 'featured')));\n\n Session::put('sortList', Filterby::sortList());\n\n if ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "61f053d9affc426bfd5eb9b467c8c61e", "score": "0.6765327", "text": "function initialize()\n\t{\n\t\t$this->id = $this->dom->getAttribute(\"content\");\n\t\t$this->pageWrapContent = $this->getTemplate()->getPageWrapContent($this->id);\n\t\t// Get a unique identifier for the wrapper to identify this instances parent by\n\t\t$this->wrapperId = $this->pageWrapContent->registerParent($this->parent);\n\t}", "title": "" }, { "docid": "ab19b65fcb5316c2dee81b51104cdf03", "score": "0.67601806", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.67600447", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.67600447", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "1eb392a7f3bf91e54285d94c6cd0cae2", "score": "0.6759367", "text": "protected function setupLayout()\n {\n if (! is_null($this->getLayoutName())) {\n $this->layout = view($this->getLayoutName());\n }\n }", "title": "" }, { "docid": "12a4f0f3ade48b0c795e7f2e32a4977c", "score": "0.67558765", "text": "protected function _initLayout()\n {\n Avid_Layout::startMvc();\n }", "title": "" }, { "docid": "c499dc7fd1b23af2fcdba5ed0bfa9cd1", "score": "0.67522347", "text": "public function init()\n {\n $this->_layout = Zend_Layout::getMvcInstance();\n $this->_layout->setLayout('front_display');\n }", "title": "" }, { "docid": "7488e7c545a3e91553e0f072b0b0378b", "score": "0.67246306", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = view($this->layout);\n }\n }", "title": "" }, { "docid": "ffbb987d3efb4c257d6b1a8d6165925b", "score": "0.66881025", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }", "title": "" }, { "docid": "7a46a315eeabd53fe4f17be8aa1fea62", "score": "0.6655497", "text": "public function init()\n {\n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n }", "title": "" }, { "docid": "eb83ae3462f8de6a10258650d940ff5c", "score": "0.6612573", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'quotes.models.*',\n\t\t\t'quotes.components.*',\n 'application.controllers.*',\n 'application.components.*',\n\t\t));\n $trueWebRoot=explode('/',Yii::app()->params->trueWebRoot);\n unset($trueWebRoot[count($trueWebRoot)-1]);\n $trueWebRoot=implode('/',$trueWebRoot);\n $this->layout = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.column2';\n\t}", "title": "" }, { "docid": "96263280f763c07d34e6bcb72a612175", "score": "0.66047704", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->_LAYOUT_VIEW = 'layout';\r\n $this->_LAYOUT_DATA = array();\r\n $this->_TEMPLATE_VIEW = 'template';\r\n $this->_TEMPLATE_DATA = array();\r\n }", "title": "" }, { "docid": "e613a4c7392de5f60feb5df60af1d622", "score": "0.6568089", "text": "protected function _initLayout(){\n Zend_Layout::startMvc(APPLICATION_PATH . '/modules/' . CURRENT_MODULE . '/views/layouts/');\n \n $view = Zend_Layout::getMvcInstance()->getView();\n }", "title": "" }, { "docid": "c9fe87da3ddb67caaf4832f3698e5fa1", "score": "0.6566709", "text": "protected function init()\n {\n app()->layouts()\n ->setPageName($this->request->getFullControllerName());\n }", "title": "" }, { "docid": "ccef7b167e993eab8daab6342949d2b7", "score": "0.6557721", "text": "public function initialize()\n {\n // Load index Controller initialize first\n parent::initialize();\n\n // Disable main view, but layout modal exist and is loading\n $this->view->setMainView(null);\n }", "title": "" }, { "docid": "ebd3cd090f656af80f93aee96b1bc219", "score": "0.65063334", "text": "public function init() {\n\t $acl = new My_Controller_Helper_Acl();\n\t\t$this->_helper->layout()->setLayout('system_layout');\n\t}", "title": "" }, { "docid": "abd0601b271fd0a5176bd59de511a7e8", "score": "0.64782375", "text": "protected function initLayout()\n {\n Html::addCssClass($this->filterRowOptions, ['filters', 'skip-export']);\n if ($this->resizableColumns && $this->persistResize) {\n if (Lib::strlen($this->resizeStorageKey) > 0) {\n $key = $this->resizeStorageKey;\n } else {\n $key = Lib::strlen(Yii::$app->user->id) > 0 ? Yii::$app->user->id : 'guest';\n }\n $gridId = ArrayHelper::getValue($this->options, 'id', $this->getId());\n $this->containerOptions['data-resizable-columns-id'] = \"kv-{$key}-{$gridId}\";\n }\n if ($this->hideResizeMobile) {\n Html::addCssClass($this->options, 'hide-resize');\n }\n $this->replaceLayoutPart('{toolbarContainer}', [$this, 'renderToolbarContainer']);\n $this->replaceLayoutPart('{toolbar}', [$this, 'renderToolbar']);\n $this->replaceLayoutPart('{export}', [$this, 'renderExport']);\n $this->replaceLayoutPart('{toggleData}', [$this, 'renderToggleData']);\n $this->replaceLayoutPart('{items}', [$this, 'renderGridItems']);\n if (is_array($this->replaceTags) && !empty($this->replaceTags)) {\n foreach ($this->replaceTags as $key => $callback) {\n $this->replaceLayoutPart($key, $callback);\n }\n }\n }", "title": "" }, { "docid": "9b324acf494cb748564e8f57d4dbfc19", "score": "0.6475776", "text": "public function initialise(){\n /* We must initialise first! */\n parent::initialise();\n \n /* We need to limit what we auto load */\n $this->_auto_load_only_tables = array(\n 'form_page'\n );\n \n /* Switch on auto loading */\n //$this->_auto_load_children = true;\n }", "title": "" }, { "docid": "d84504ab68e62a2854aa0d6cc2014644", "score": "0.646732", "text": "public function init()\n\t{\n\t\tif(!Yii::app()->user->checkAccess('hr@HrEdit', Yii::app()->user->id))\n\t\t\t$this->layout='//layouts/column1';\n\t\telse\n\t\t\t$this->layout='//layouts/column2';\n\t}", "title": "" }, { "docid": "ecec8bebff87cb2d1c05d3f6191a1ec0", "score": "0.64630675", "text": "public function init()\r\r {\r\r parent::init();\r\r }", "title": "" }, { "docid": "b5a3e3da8be83b102cfaaf7153d737ae", "score": "0.64546174", "text": "protected function init()\n\t{\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.6451928", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.6451928", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.6451928", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "10c9ce9dcc09142dc27a2556aa51bf62", "score": "0.6451928", "text": "public function init(){\n parent::init();\n }", "title": "" }, { "docid": "07470b984ac10f0bde3ed5a6c04dde71", "score": "0.6418444", "text": "public function init() {\n\n\t\t\tparent::init();\n\n\n\n\t\t}", "title": "" }, { "docid": "4a02e5e74aaa6caa21627ec2981621ab", "score": "0.6415815", "text": "public function initialize()\n {\n parent::initialize();\n $this->loadModel('News');\n $this->loadModel('News1');\n $this->connection = ConnectionManager::get('default');\n\n $this->viewBuilder()->setLayout('Front/index');\n }", "title": "" }, { "docid": "3d5cd7c910e7b86d73e3017d8d03da12", "score": "0.6413135", "text": "public function init()\n\t{\n\t\t$this->initCss();\n\t\t$this->initAssets();\n\t\t$this->initMetaTags();\n\t\t$this->initJs();\n\t\t$this->initConfig();\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "ca8a61d994cc0ecb8dfd3b9f79c63ddb", "score": "0.63965887", "text": "public function init()\n\t{\n\t\t$this->view->title = \"LOGIN HERE\";\n\t\t\n\t\t$this->_helper->layout->setLayout('default');\n\t}", "title": "" }, { "docid": "833b47188a8145e885e0ef0cf7deddb0", "score": "0.6394484", "text": "public function init() {\n parent::init();\n }", "title": "" }, { "docid": "833b47188a8145e885e0ef0cf7deddb0", "score": "0.6394484", "text": "public function init() {\n parent::init();\n }", "title": "" }, { "docid": "833b47188a8145e885e0ef0cf7deddb0", "score": "0.6394484", "text": "public function init() {\n parent::init();\n }", "title": "" }, { "docid": "370672c4a51dea5f077cd054cbdd1301", "score": "0.63815725", "text": "public function init()\r\n {\r\n // you may place code here to customize the module or the application\r\n // import the module-level models and components\r\n \r\n $this->layout = $this->layoutPath . \".main\";\r\n\r\n $this->setImport(array(\r\n basename($this->id) . '.models.*',\r\n basename($this->id) . '.models.base.*',\r\n basename($this->id) . '.models.mybase.*',\r\n basename($this->id) . '.components.*',\r\n basename($this->id) . '.components.base.*',\r\n basename($this->id) . '.config.*',\r\n ));\r\n \r\n\r\n $this->setComponents(array(\r\n 'errorHandler' => array(\r\n 'errorAction' => basename($this->id) . '/default/error'\r\n ),\r\n\r\n 'defaultController' => 'default',\r\n ));\r\n\r\n $this->setBaseModule('rms');\r\n }", "title": "" }, { "docid": "8c3de9d182690d8270817786309ab667", "score": "0.6379589", "text": "public function init()\n {\n\n parent::init();\n\n }", "title": "" }, { "docid": "003527477eaa40262265203aed90b65d", "score": "0.6374749", "text": "public function init()\n {\n parent::init();\n $this->initElements($this->columns, Column::className());\n $this->initElements($this->sessions, Session::className(), ['owner' => $this]);\n }", "title": "" }, { "docid": "71f71d4bd2cdf3f017866bfd79aea2cb", "score": "0.6366511", "text": "function init() {\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "af97bbf2cefa22382978df5256b22bc4", "score": "0.63658047", "text": "public function init(){\n\t\t\tparent::init();\n\n\t }", "title": "" }, { "docid": "faa60ee5f41b60f0545c339d7ed72582", "score": "0.636452", "text": "public function init()\n\t{\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "faa60ee5f41b60f0545c339d7ed72582", "score": "0.636452", "text": "public function init()\n\t{\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "b46a47c0cdab80efeadfc9c94c738837", "score": "0.63622063", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "a2d8deba08a6b86b019bd8f241b8b8d1", "score": "0.63591933", "text": "public function init() {\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "2995e1755c9488c2c3558b38f0451b11", "score": "0.6350483", "text": "public function init()\n {\n \t $layout = $this->_helper->layout();\n \t $layout->setLayout('twocolumn');\n \t // action body\n //$bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\n \t \n \n \n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.63431007", "text": "public function init()\n {\n parent::init();\n }", "title": "" }, { "docid": "674315aad92e29e32efd9de2d2f4a11d", "score": "0.63431007", "text": "public function init()\n {\n parent::init();\n }", "title": "" } ]
8adfd78bcbe296bda652ec0744d652be
$GLOBALS['log']>lwrite(" SD:" . $a . '' . $b);
[ { "docid": "ce1551cbedc07cc7b8594b5b3106d715", "score": "0.0", "text": "public static function findSDistanceBetweenTwoPositions(Position $a, Position $b) {\n if (abs($b->x - $a->x) == 0) {\n $d = abs($b->y - $a->y);\n }\n else if (abs($b->y - $a->y) == 0) {\n $d = abs($b->x - $a->x);\n }\n else {\n $d = 0;\n }\n return $d;\n }", "title": "" } ]
[ { "docid": "29051b40a75ec9f2adb6da83ff090e3f", "score": "0.65174586", "text": "function slog($str) {\n\n _log($str, \"--\", 1);\n}", "title": "" }, { "docid": "3d0c14c28b803f3c1b9fd52ab12f1d64", "score": "0.6429137", "text": "function dlog($str) {\n\n _log($str, \"--\", 3);\n}", "title": "" }, { "docid": "892ab205ddcb3d2d92fa75e98b63a446", "score": "0.6229928", "text": "function wlp_writelog() {\r\n\t$numargs = func_num_args();\r\n\t$arg_list = func_get_args();\r\n\tif ($numargs >2) $linenumber=func_get_arg(2); else $linenumber=\"\";\r\n\tif ($numargs >1) $functionname=func_get_arg(1); else $functionname=\"\";\r\n\tif ($numargs >=1) $string=func_get_arg(0);\r\n\tif (!isset($string) or $string==\"\") return;\r\n\r\n\t$logFile=WLP_LOGPATH.'/ops-'.date(\"Y-m\").\".log\";\r\n\t$timeStamp = date(\"d/M/Y:H:i:s O\");\r\n\r\n\t$fileWrite = fopen($logFile, 'a');\r\n\r\n\t//flock($fileWrite, LOCK_SH);\r\n\tif (wlp_debug()) {\r\n\t\t$logline=\"[$timeStamp] \".html_entity_decode($string).\" $functionname $linenumber\\r\\n\";\t# for debug purposes\r\n\t} else {\r\n\t\t$logline=\"[$timeStamp] \".html_entity_decode($string).\"\\r\\n\";\r\n\t}\r\n\tfwrite($fileWrite, utf8_encode($logline));\r\n\t//flock($fileWrite, LOCK_UN);\r\n\tfclose($fileWrite);\r\n}", "title": "" }, { "docid": "095b1cecb6668132faa83d52b0f3e717", "score": "0.6202339", "text": "function mystdout($str){\r\nfile_put_contents(\"php://stdout\", \"\\nLog:\\n$str\\n\");\r\n}", "title": "" }, { "docid": "fa5c24faf9bef959c71c87e8b83272a2", "score": "0.61784625", "text": "function wlog ($str) {\r\n\tglobal $logfp;\r\n\techo date(\"Y-m-d H:i:s\") . \" - $str\\r\\n\";\r\n fwrite($logfp, date(\"Y-m-d H:i:s\") . \" - $str\\r\\n\");\r\n}", "title": "" }, { "docid": "f308a91fb421804b54fdc8f8c4c12561", "score": "0.61622465", "text": "function logM($message) {\n print $message.\"\\n\";\n}", "title": "" }, { "docid": "9c9e121e5ab6648f24db510fe637d1ad", "score": "0.61339474", "text": "function log_ln( ){\n\t$args = func_get_args();\n\tforeach( $args as $arg ){\n\t\techo $arg .\" \";\n\t}\n\techo \"\\n\";\n }", "title": "" }, { "docid": "bf40c4defdadc5ae203e4a3bbbc75426", "score": "0.6081711", "text": "public function lwrite($message){ \n // if file pointer doesn't exist, then open log file \n if (!$this->fp) $this->lopen(); \n // define script name \n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME); \n // define current time \n $localtime = date_default_timezone_set(\"Asia/Jakarta\"); ;\n $time = date('H:i:s');\n // write current time, script name and message to the log file \n fwrite($this->fp, \"$time ($script_name) $message\\n\"); \n }", "title": "" }, { "docid": "b268fdb4b7b9b7da5574da473fa0395f", "score": "0.5974567", "text": "function ilog($str) {\n\n _log($str, \"--\", 2);\n}", "title": "" }, { "docid": "b047c132128ff4116c4436901501d390", "score": "0.5966286", "text": "function logMsg($message) {\n\tprint ($message . \"\\n\");\n\n}", "title": "" }, { "docid": "bc8aa344651b716c1e30efe3c9151b4b", "score": "0.59202576", "text": "function logger( $str, $loglevel_offset = 0 ) {\r\n global $mbla, $mbla_options, $logfile, $loglevel;\r\n if ( $str ) {\r\n list( $usec , $sec ) = explode( \" \" , microtime() );\r\n if ( $loglevel_offset < 0 )\r\n $loglevel += $loglevel_offset;\r\n file_put_contents( $logfile , sprintf( \"%s%03s | %s %s\\n\" , date( \"Y-m-d H:i:s.\" ) , floor( $usec * 1000 ) , str_repeat( ' ' , $loglevel ) , $str ) , FILE_APPEND );\r\n if ( $loglevel_offset > 0 )\r\n $loglevel += $loglevel_offset;\r\n }\r\n }", "title": "" }, { "docid": "37bb975f5e0f3f3b25002858a913523b", "score": "0.58967173", "text": "function _log($str, $prefix = \"--\", $level = 0) {\n\n if (VERBOSITY < $level)\n return;\n echo \"[\" . ts() . \"] \" . trim($prefix . \" \" . $str) . \"\\n\";\n}", "title": "" }, { "docid": "edd3839b700c797513314c1261c53e26", "score": "0.5877658", "text": "public function lwrite($message){\n // if file pointer doesn't exist, then open log file\n if (!$this->fp) $this->lopen();\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time\n $time = date('H:i:s');\n // write current time, script name and message to the log file\n fwrite($this->fp, \"$time ($script_name) $message\\n\");\n }", "title": "" }, { "docid": "1e9a69ac39fb06fbaa1c356d0b981b9a", "score": "0.58650655", "text": "public function lwrite($message) {\n\t\tif (!is_resource($this->fp)) {\n\t\t\tself::lopen();\n\t\t}\n\t\t// define script name\n\t\t$script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n\t\t// define current time and suppress E_WARNING if using the system TZ settings\n\t\t// (don't forget to set the INI setting date.timezone)\n\t\t$time = @date('[d/M/Y:H:i:s]');\n\t\t// write current time, script name and message to the log file\n\t\tfwrite(self::$fp, \"$time ($script_name) $message\" . PHP_EOL);\n\t}", "title": "" }, { "docid": "0b3e171431e84a640c3e56406decfa43", "score": "0.58259887", "text": "function writef()\n{\n if (func_num_args() == 0)\n throw new \\InvalidArgumentException('This function needs at least one argument');\n\n writelog($message = call_user_func_array('sprintf', func_get_args()));\n \n $usec = current(explode(' ', microtime()));\n $usec *= 10000;\n \n printf('%s.%04d | %s', @date('H:i:s'), $usec, $message);\n flush();\n}", "title": "" }, { "docid": "8e4f5da58bbb08f0facaf84b9fd15fe5", "score": "0.5825278", "text": "function mylog($str){\r\necho \"\\nLog\";\r\necho $str;\r\nvar_export($str, true);\r\necho \"\\n\";\r\n\r\n}", "title": "" }, { "docid": "7f431dd6bfbb64a3fa961d5fe6bf6bc4", "score": "0.570396", "text": "function log($line) {\n\t\techo $line;\n\t}", "title": "" }, { "docid": "1a9e6f568b803d5223459df5bd1a01f8", "score": "0.5701634", "text": "function debug_log($DB,$remark){\r\n\t}", "title": "" }, { "docid": "77b1d38727bffc7129a93af51ef42cef", "score": "0.56538665", "text": "public function logString() {\n $robot = $this->robot;\n $xPos = $robot->position['X'];\n $yPos = $robot->position['Y'];\n if ($robot->stuckStage == 0) {\n// the zero step is not good for log \n $stepNumToLog = 1 + $robot->stepNum; \n $res = \"Step $stepNumToLog => $this->step done. Position: ($xPos, $yPos), Battery: $robot->battery, Facing: $robot->facing\";\n }\n else {\n $res = \" BS stage $robot->stuckStage, step $robot->stuckStep => $this->step done. Position: ($xPos, $yPos), Battery: $robot->battery, Facing: $robot->facing\";\n }\n \n return $res;\n }", "title": "" }, { "docid": "18aaad123d9bd08c6146de184dd315bd", "score": "0.5651576", "text": "function dprint($str, $level=0) {\r\n\t\tif ($this->debug) echo $str.\"<br/>\\n\" ;\r\n\t\t$this->debug_log[] = array($str, $level);\r\n\t}", "title": "" }, { "docid": "1d5dc23f55458b0761f9e474c3795c3b", "score": "0.5643231", "text": "function log ()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ac625a8c9b01876e605d5efa37695df8", "score": "0.56414914", "text": "public function lwrite($message) {\n // if file pointer doesn't exist, then open log file\n if (!is_resource($this->fp)) {\n $this->lopen();\n }\n // define script name\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n // define current time and suppress E_WARNING if using the system TZ settings\n // (don't forget to set the INI setting date.timezone)\n $time = @date('Ymd:H:i:s');\n // write current time, script name and message to the log file\n fwrite($this->fp, \"$time, $message\" . PHP_EOL);\n }", "title": "" }, { "docid": "c91a0f578ee0a524299a5a2e0a56ebfa", "score": "0.5638812", "text": "function dump($str) \n{\n\t$fp=fopen(\"dump.log\",\"a\");\n\tfwrite($fp,date(\"d-m-Y H:i:s\").\" -> \".$str);\n\tfwrite($fp,\"\\n----------------------\\n\");\n\tfclose($fp);\n}", "title": "" }, { "docid": "295e033170273fee14972bf7b80e0989", "score": "0.5617108", "text": "function appendDebug($string){\n\t\tif ($this->debugLevel > 0) {\n\t\t\t// it would be nice to use a memory stream here to use\n\t\t\t// memory more efficiently\n\t\t\t$this->debug_str .= $string;\n\t\t}\n\t}", "title": "" }, { "docid": "bae32ecbdeb061407d584f534a2e6322", "score": "0.5609139", "text": "function debug_print($string) {\n\t#built in php function to do logging...\n\terror_log('log from php ['.$string.']',0);\n}", "title": "" }, { "docid": "8bb59ee26a6bbc1e29b0c1fa5a16be04", "score": "0.55991435", "text": "function debug_msg($s)\n{\n echo $s, \"\\n\";\n}", "title": "" }, { "docid": "f4a44f0b50673d9f5177d29e8ef943d3", "score": "0.55794907", "text": "function addToLog($str) {\n $this->log .= $str . \"\\n\";\n }", "title": "" }, { "docid": "e5c94727e0371de170d7ca933eccbe72", "score": "0.55479133", "text": "function debug($s) {\n\t\techo('<br/>************<br/>\n\t\t '.$s.'<br/>\n\t\t ************<br/>');\n\t}", "title": "" }, { "docid": "36d742903f219c36f5caf596b4a7065b", "score": "0.554361", "text": "function writelf()\n{\n if (func_num_args() == 0)\n throw new \\InvalidArgumentException('This function needs at least one argument');\n \n $args = func_get_args();\n $args[0] .= PHP_EOL;\n \n call_user_func_array('writef', $args);\n}", "title": "" }, { "docid": "a1cebee0ded2d8237a282e9c83cd0889", "score": "0.5543263", "text": "function wpcron_log($str) {\n\n\tglobal $logger;\n\t$logger->info($str);\n\treturn;\n\t\n\t$log = WPCRON_DIR . \"/log.txt\";\n\t$fp = fopen($log, \"a+\");\n\tfwrite($fp, time() . \" - {$str}\\n\");\n\tfclose($fp);\n}", "title": "" }, { "docid": "d2e1687e58bca4788182cdc84d4752cd", "score": "0.5534473", "text": "function log_msg($log_text) {\n\t\t\tprint date(\"M\").\" \".date(\"d\").\" \".date(\"H\").\":\".date(\"i\").\":\".date(\"s\").\" gvsms: $log_text\\n\";\n\t\t\tsystem(\"logger -t \\\"gvsms\\\" \\\"$log_text\\\"\");\n\t}", "title": "" }, { "docid": "49126e03f574b6ac84f19cebb38126dc", "score": "0.5533525", "text": "private static function writeLog()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$errorMessage = '';\n\n\t\tforeach($arguments as $argument)\n\t\t{\n\t\t\t$errorMessage .= print_r($argument, TRUE) . \"\\n\";\n\t\t}\n\n\t\terror_log($errorMessage);\n\t}", "title": "" }, { "docid": "59b3f2d8f2ca6c0a711f983089dd4568", "score": "0.5525884", "text": "function logger( $dummy1 = '', $dummy2 = 0 ) {\r\n return false;\r\n }", "title": "" }, { "docid": "3b57427a988d6d6c3039f8e66e665bf2", "score": "0.55158556", "text": "public static function log($str,$write = false) {\n $timestamp = self::currentTimestamp();\n $content = sprintf(\"%s - %s%s\", $timestamp, $str, PHP_EOL);\n if($write){\n $month = date('Y-M');\n $fileLocation = __DIR__ . \"/../logs/{$month}.log\";\n $mode = (!file_exists($fileLocation)) ? 'w':'a';\n $file = fopen($fileLocation,$mode);\n fwrite($file,$content);\n fclose($file);\n }else{\n echo $content;\n }\n }", "title": "" }, { "docid": "fe75ed7b1f4b32a5274c8e59629ad85d", "score": "0.5510533", "text": "public static function log($msg){\n\t\t\t////echo $msg.PHP_EOL;\n\t\t}", "title": "" }, { "docid": "940205ff37a5dc3d7f181d306269056b", "score": "0.5498036", "text": "public function printLog();", "title": "" }, { "docid": "b860d47d5e62a38d4f8ac91fda2f430a", "score": "0.5485351", "text": "private function log_msg($msg) { \n \n if( $this->log ) \n echo tag(\"function: \".\n (($this->proc) ? tag($this->proc,'b') : null) \n ,\"div\").\n tag(\"array: \".\n (($this->sql) ? tag('set and is valid array','b') : null)\n ,'div').\n tag($msg,\"div\").br(1);\n \n }", "title": "" }, { "docid": "a607a01f68105ef89d284e81e3a8f6e2", "score": "0.5473341", "text": "function myDebug($name,$value)\n {\n \techo \"<br>*$name*/*$value*\"; \t\n }", "title": "" }, { "docid": "474609707060bdb0b18ad1fab436afa6", "score": "0.5470606", "text": "function debug($line,$str){\r\n}", "title": "" }, { "docid": "edbcb75824481f3e7fca38cff0c91106", "score": "0.5436694", "text": "function fprintf($handle, $format, $args = NULL, $_ = NULL)\n{\n}", "title": "" }, { "docid": "9a1ec429e955b95233c6aacd98d83f78", "score": "0.5434319", "text": "function fDbgContab($pMsj){\n error_log($pMsj . \" \\n\", 3,\"/tmp/dimm_log.err\");\n //echo $pMsj . \" <br>\";\n}", "title": "" }, { "docid": "ad67717cf1f6ef763118c398ec813a56", "score": "0.5429917", "text": "public function log($s) {\n\t\techo \"<pre>\" . print_r($s, true) . \"</pre>\";\n\t}", "title": "" }, { "docid": "bd234feb00cf4738e237ad9b81f95fc6", "score": "0.54247516", "text": "function debug_log($line){\n\t\tif(DEBUG){\n\t\t\tglobal $_debuglog;\n\t\t\tglobal $_debugstart;\n\t\t\t$now=exactTime()-$_debugstart;\n\t\t\t$_debuglog[]=\"[$now] $line\";\n\t\t}\n\t\treturn $line;\n\t}", "title": "" }, { "docid": "f5c9dd532abfa051473683a60d2749cd", "score": "0.5416904", "text": "function _log($str) {\r\n // log to the output\r\n $log_str = date('d.m.Y').\": {$str}\\r\\n\";\r\n //echo $log_str;\r\n // log to file\r\n if (($fp = fopen('upload_log.txt', 'a+')) !== false) {\r\n fputs($fp, $log_str);\r\n fclose($fp);\r\n }\r\n }", "title": "" }, { "docid": "16fabdee2b1bf4617819e924c2b09bd6", "score": "0.5416751", "text": "function debug_getLog(){\n\t\tglobal $_debuglog;\n\t\tdebug_log('Debug: Log dump');\n\t\treturn implode(PHP_EOL,$_debuglog) . PHP_EOL;\n\t}", "title": "" }, { "docid": "0174982ef48c3e94c01381a5c5e02351", "score": "0.54098666", "text": "function _log($log){\n\t\t$log = '['.date(\"H:i:s\").'] '.$log.PHP_EOL;//Nueva línea\n\t\tfile_put_contents($_SERVER[\"DOCUMENT_ROOT\"].\n\t\t\t'/zProject/logs/log_'.date(\"j.n.Y\").'.log', $log, FILE_APPEND);\n\t}", "title": "" }, { "docid": "990d717d02568857d0309aba1d4e26ef", "score": "0.54097795", "text": "function DebugOutput($msg)\r\n {\r\n // See how my version is complicated ? HAHA\r\n echo \"$msg\\r\\n\"; \r\n }", "title": "" }, { "docid": "2fb354eb36dc850ea92290543b974e9c", "score": "0.54001397", "text": "public function lwrite($message, $level = 1) {\n $script_name = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME);\n $unique_id = $GLOBALS['unique_id'];\n $message = \"[{$unique_id}] [$script_name] $message\";\n if ($this->do_log && $level <= $this->log_level) {\n if ($this->type == \"STDOUT\") {\n echo $message . \"\\n\";\n }\n else {\n openlog($this->log_name, 0, LOG_LOCAL0);\n syslog(LOG_WARNING, $message);\n closelog();\n return;\n }\n }\n }", "title": "" }, { "docid": "87d79f40db519d44ad738467c701e33e", "score": "0.53896874", "text": "function log_action($string){\n\n//if (is_writable('logs')) {\n$textfile = 'includes/logs/logfile-'.date('MY').'.log';\n//$textfile = 'logs/logfile.txt';\n$tab = \"\\t\"; $newline = \"\\r\";\n\nif (!$handle = fopen($textfile, 'a')) \n die('Cannot open file: '.$textfile);\n\nif (fwrite($handle, \"[\".date('j M Y h:i:s a').\"]\".utf8_encode($tab).\n $string.utf8_encode($newline)\n ) === false)\n die('Cannot write to file: '.$textfile);\n\nfclose($handle);\n\n}", "title": "" }, { "docid": "f45ce3335d43ca6c7a6e0f8435291ac4", "score": "0.5389449", "text": "function Log_system_error_to_file($requestor){\n\t$error_log=\"Log_system_error.txt\";\n\t$time = microtime(true);\n\t$info = convert_data_unix_ms($time).\", \";\n\t$info = $info.$requestor.\" \\n\";\n\tappendi_log($error_log, $info); \n}", "title": "" }, { "docid": "fae40d9e5be3ccccdcbee012dfd64c9d", "score": "0.53870976", "text": "function log_error ($msg) {\r\r\n \t\r\r\n \techo dumper($msg); \t\r\r\n}", "title": "" }, { "docid": "6b998ff6d671653e8d173c9e0b6d2878", "score": "0.5386017", "text": "function logMessage($logFile, $outputString){\n\tprint_r($outputString);\n\tfwrite($logFile, $outputString);\n}", "title": "" }, { "docid": "285fab8d1d0f59246ebe57eafca79339", "score": "0.53841805", "text": "function ewr_SetDebugMsg($v, $newline = TRUE) {\n\tglobal $grDebugMsg, $grTimer;\n\t$ar = preg_split('/<(hr|br)>/', trim($v));\n\t$ar = array_filter($ar, function($s) {\n\t\treturn trim($s); \n\t});\n\t$v = implode(\"; \", $ar);\n\t$grDebugMsg .= \"<p><samp>\" . (isset($grTimer) ? number_format($grTimer->GetElapsedTime(), 6) . \": \" : \"\") . $v . \"</samp></p>\";\n}", "title": "" }, { "docid": "ae01a90427f49c467cecc3f2b85870a3", "score": "0.5380298", "text": "function trace( $msg ) {\r\n\tglobal $log_file;\r\n\r\n\t$msg = \"[\" . date( 'Y-m-d H:i:s' ) . \"] \" . $msg;\r\n\r\n\tif ( $log_file ) {\r\n\t\tfwrite( $log_file, \"\\r\\n\" . $msg );\r\n\t}\r\n\r\n\tprint( $msg . \"\\n\" );\r\n}", "title": "" }, { "docid": "1a0966079f06a1e60663e131118670a4", "score": "0.5372828", "text": "function smslog($SMSCampaignID, $txt)\n\t{\n\t\t$f = fopen(\"logs/smslog.$SMSCampaignID.log\",\"a\");\n\t\tfwrite($f, date(\"m.d.y H:i:s\") . \": \" . $txt . \" \\n\");\n\t\tfclose($f);\t\t\n\t}", "title": "" }, { "docid": "73cfcbed23705d86eaf202927f549843", "score": "0.5354021", "text": "function Logger($filename, $string_data)\r\n\t{\t\r\n\t\t$timestamp = strtotime('now');\r\n\t\t$timestamp = date('mdY_giA_',$timestamp);\r\n\t\t\r\n\t\t$string_data = $this->MaskAPIResult($string_data);\r\n\r\n\t\t$string_data_indiv = '';\r\n\t\t$string_data_array = $this->NVPToArray($string_data);\r\n\t\t\r\n\t\tforeach($string_data_array as $var => $val)\r\n\t\t{\r\n\t\t\t$string_data_indiv .= $var.'='.$val.chr(13);\r\n\t\t}\r\n\t\t\r\n\t\t$file = $_SERVER['DOCUMENT_ROOT'].\"/paypal/logs/\".$timestamp.$filename.\".txt\";\r\n\t\t$fh = fopen($file, 'w');\r\n\t\tfwrite($fh, $string_data.chr(13).chr(13).$string_data_indiv);\r\n\t\tfclose($fh);\r\n\t\t\r\n\t\treturn true;\t\r\n\t}", "title": "" }, { "docid": "a14f4a97dc9bfa634d5ab30acf7eec03", "score": "0.5351551", "text": "function debug_to_log($var, $log='') {\n\tif (!defined('AC_DEVEL') || !AC_DEVEL) {\n\t\treturn;\n\t}\n\t\n\tif ($log == '') $log = AC_TEMP_DIR. 'achecker.log';\n\t$handle = fopen($log, 'a');\n\tfwrite($handle, \"\\n\\n\");\n\tfwrite($handle, date(\"F j, Y, g:i a\"));\n\tfwrite($handle, \"\\n\");\n\tfwrite($handle, var_export($var,1));\n\t\n\tfclose($handle);\n}", "title": "" }, { "docid": "2b99eee0578192cc0b02309a6331bd87", "score": "0.53191596", "text": "public function log($string) {\r\n $handle = fopen(WOOCS_PATH . 'log.txt', 'a+');\r\n $string .= PHP_EOL;\r\n fwrite($handle, $string);\r\n fclose($handle);\r\n }", "title": "" }, { "docid": "ddadba37d5f3776945148d66f2679ab3", "score": "0.53091234", "text": "function _log($msg)\r\n {\r\n \t$msg = \"<?php die(); ?>\\n\" . $msg;\r\n \t$fp = @fopen($this->gcLogFile, 'w+');\r\n \tif($fp)\r\n \t{\r\n \t\t@ftruncate($fp, 0);\r\n \t\t!@fputs($fp, $msg);\r\n \t\t@fclose($fp);\r\n \t}\r\n }", "title": "" }, { "docid": "d877433855675a31d0483e4ef6775db3", "score": "0.53088826", "text": "function debug_to_log($var, $log='') {\n\tif (!defined('FLUID_IG_DEVEL') || !FLUID_IG_DEVEL) {\n\t\treturn;\n\t}\n\t\n\tif ($log == '') $log = 'temp/debug.log';\n\t\n\t$handle = fopen($log, 'a');\n\tfwrite($handle, \"\\n\\n\");\n\tfwrite($handle, date(\"F j, Y, g:i a\"));\n\tfwrite($handle, \"\\n\");\n\tfwrite($handle, var_export($var,1));\n\t\n\tfclose($handle);\n}", "title": "" }, { "docid": "5d93ceabdc87dce28663b651ab8c7d32", "score": "0.5298825", "text": "function add($str) {\n\tprint($str . \"\\n\");\n}", "title": "" }, { "docid": "156c901ce46c190bb9fce89ab96d5cee", "score": "0.5296432", "text": "public function log2($params) \n\t{\n\t\t//... genera un log en el directorio por defecto denominado app/log/, pero con el nombre \"test1\" y la estencion \".log\"\n\t\tkcl::package(\"log\")->save(\"Esto es un ejemplo de log para la app1\", \"test1\");\n\t\treturn \"Local Logs oks\";\n\t}", "title": "" }, { "docid": "8130ffd7ee4c2358ea469aa4954d59e9", "score": "0.5280737", "text": "function print_ln($str1){\n echo $str1;\n echo'<br />';\n}", "title": "" }, { "docid": "5068f46ac72a98c1f7dc1edf8a8a4c3e", "score": "0.5273762", "text": "public static function warn() {\n\t\t\t$parms = func_get_args();\n\t\t\t$parms[1] = str_repeat(' ', self::FUNCTION_LENGTH).' : '.$parms[1];\n\t\t\tlogger::dothelogging(2, $parms);\n\t\t}", "title": "" }, { "docid": "e91a60f7984a37c4d18e8b0da8b819db", "score": "0.5269892", "text": "function putStrLn(string $str): IOMonad\n{\n return printToStdout(A\\concat('', $str, PHP_EOL));\n}", "title": "" }, { "docid": "c93a4fc67220d64e15359a4e82701021", "score": "0.52659553", "text": "function WriteLog ( $loginfo )\n{\n if ( defined(\"DEBUG\") ) \n {\n $fp = fopen ( \"yogtunnel.log\", \"a\" );\n\n if ( $fp == FALSE )\n return;\n\n fwrite ( $fp, $loginfo . chr(13) );\n fclose ( $fp );\n }\n}", "title": "" }, { "docid": "681a01e9beb45d2b4ca8d9c4acd8fe9d", "score": "0.5252896", "text": "function flickrsync_log($msg){\n\t\t\terror_log($msg.\"\\n\", 3, \"/tmp/flickrsync.err\");\t\n\t\t}", "title": "" }, { "docid": "f61dd4787acc2be9c25b9a43f3a350f4", "score": "0.5244358", "text": "function consoleOut($consoleText, $timeStamp=true) {\n\n $time_stamp = Date('Y-m-d H:i:s');\n $startStr = \"\\n\";\n\n if ($timeStamp) {\n \n $startStr .= $time_stamp.\": \";\n\n }\n $endStr = \"\";\n \n echo $startStr.$consoleText.$endStr;\n\n}", "title": "" }, { "docid": "20cb17301a61b6fff99f5d889903e89c", "score": "0.5244074", "text": "function wlogDie ($str) {\r\n\tglobal $logfp;\r\n\r\n\twlog($str);\r\n\tfclose($logfp);\r\n\tdie(-1);\r\n}", "title": "" }, { "docid": "63c9952b337a93e17994cf54cd2d2e0d", "score": "0.5230507", "text": "public function logMemory($line=__LINE__,$variable=\"\",$name=\"\")\n\t{\n\n\t\tConsole::logMemory($variable, \"$name : Line:$line\");\n\t}", "title": "" }, { "docid": "3ae3b3a01ca33e6ec7aad0aaebd7d563", "score": "0.52290493", "text": "function debug_to_log($var, $title='')\n{\n\tglobal $gCms;\n\n\t$errlines = explode(\"\\n\",debug_display($var, $title, false, false));\n\t$filename = TMP_CACHE_LOCATION . '/debug.log';\n\t//$filename = dirname(dirname(__FILE__)) . '/uploads/debug.log';\n\tforeach ($errlines as $txt)\n\t{\n\t\terror_log($txt . \"\\n\", 3, $filename);\n\t}\n}", "title": "" }, { "docid": "439ca343adcc1fbae63bf3dc59c7f886", "score": "0.5214928", "text": "private static function output($message){\n\t\treturn \"[\".date(\"Y-m-d H:i:s\") . \"] \" . $message;\n\t}", "title": "" }, { "docid": "64fe8aedac04cfaf7cb18adb454ac59b", "score": "0.5209443", "text": "function b($string) {\n $args = func_get_args();\n foreach($args as $arg) $this->buffer .= $arg;\n }", "title": "" }, { "docid": "1f7374c08556de3ae4065a0f8791a9c2", "score": "0.5208167", "text": "function debugger($file,$message,$variable){\r\n \t$handle = fopen($file, \"a\");\r\n\t\tfwrite($handle, $message.$variable.\"\\n\");\r\n \tfclose($handle);\r\n\t}", "title": "" }, { "docid": "9640d30a222d4c9350ed33cf21100eeb", "score": "0.5205783", "text": "public function log()\n\t{\n\t\t$args = func_get_args();\n\n\t\tif (!$args) {\n\t\t\treturn;\n\t\t}\n\n\t\t$level = 'DEBUG';\n\n\t\t$message = array_shift($args);\n\t\tif ($message == 'DEBUG' || $message == 'WARN') {\n\t\t\t$level = $message;\n\t\t\t$message = array_shift($args);\n\t\t}\n\n\t\tif ($args) {\n\t\t\t$message = vsprintf($message, $args);\n\t\t} else {\n\t\t\t$message = $message;\n\t\t}\n\n\t\t$now = date('Y-m-d H:i:s');\n\t\t$message = \"[$now] $level -- $message\";\n\n\t\tif ($this->debug) {\n\t\t\techo $message;\n\t\t\techo \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "309e17210a49211ca2480870177ce249", "score": "0.52025604", "text": "function writelog($logfile,$text) {\n $text .= \", All Those On <i>\".date('d.m.Y H:i:s').\"</i> By <u>$_SERVER[REMOTE_ADDR]</u> \\n\";\n $fp = fopen(\"logs/$logfile.php\",\"a\");\n fputs($fp, $text);\n fclose($fp);\n}", "title": "" }, { "docid": "8f6b3dd459722047009fec61d0584270", "score": "0.5193598", "text": "function tradeLogs($msg)\n{\n $fp = fopen(\"trader.log\", \"a\");\n $logdate = date(\"Y-m-d H:i:s => \");\n $msg = preg_replace(\"/\\s+/\", \" \", $msg);\n fwrite($fp, $logdate . $msg . \"\\n\");\n fclose($fp);\n return;\n}", "title": "" }, { "docid": "19e61e8bd0ea935f9870354e3f958cf7", "score": "0.51893765", "text": "function writeErrorLog ( $text1, $text2 = false ) {\n\n\tglobal $absPath;\n\tglobal $errorLoggingType;\n\t\n\t$log = '';\n\t$prefix = '';\n\t$postfix = '';\n\t\n\tif( $errorLoggingType == 3 ) {\n\n\t\tif( ! file_exists( $absPath . 'ccdata/store' ) ) {\n\n\t\t\t// don't log if the target folder doesn't exist\n\t\t\treturn;\t\n\n\t\t} else {\n\t\t\t\n\t\t\t// create empty log with some access protection if it doesn't exist yet \n\t\t\t$log = $absPath . 'ccdata/store/cart_error.log.php';\n\t\t\tif( ! file_exists( $log ) )\t\t@error_log( \"<?php echo 'Access denied.'; exit(); ?>\\n\", 3, $log );\n\t\t\t\n\t\t\t// in a file, we need to add a timestamp and a new line\n\t\t\t$prefix = date( 'r');\n\t\t\t$postfix = \"\\n\";\n\t\t}\n\t} else {\n\t\t\n\t\t// in the hosted environment, we should add a userid to the log\n\t\tglobal $sdrive_config;\n\t\t$prefix = 'sdrive_account=' . $sdrive_config['sdrive_account_id'];\n\t}\n\n\tif( empty( $text1 ) ) $text1 = 'Error logger was called with empty text.';\n\n\t$text = '';\n\tforeach( func_get_args() as $arg ) {\n\n\t\t$text .= ' ';\n\n\t\tif( is_array( $arg ) ) {\n\n\t\t\tforeach( $arg as $key => $value ) {\n\n\t\t\t\tif( is_array( $value ) ) $value = implode( ',', $value );\n\n\t\t\t\t$text .= '[' . $key . '] ' . $value . ' ';\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t$text .= $arg;\n\t\t}\n\t}\n\n\t// if it fails, it should fail silently\n\t@error_log( $prefix . ': ' . trim( $text ) . $postfix, $errorLoggingType, $log );\n}", "title": "" }, { "docid": "e87fb7eeae27a869e0959981759af31a", "score": "0.5185048", "text": "function debug($msg) {\n global $debug;\n global $DEBUG_FILENAME;\n if($debug == \"true\") {\n $handle = fopen ($DEBUG_FILENAME, 'a');\n fwrite($handle, date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".$_SERVER['REQUEST_TIME'].\" \".$msg.\"\\r\\n\");\n fclose($handle);\n }\n}", "title": "" }, { "docid": "cfbe17b16fed5098a10da16d0ce49740", "score": "0.51805145", "text": "function warn($string = ''){ fwrite(STDERR, $string . \"\\n\"); }", "title": "" }, { "docid": "660289127ad037dc9451f1d7b351f286", "score": "0.51701623", "text": "public function writeln()\n {\n $args = func_get_args();\n foreach ($args as $arg)\n {\n $this->_tequila->writeln($arg);\n }\n }", "title": "" }, { "docid": "c2dc547cb7abb7909704412406a07ea8", "score": "0.5165367", "text": "function errorLog($errno, $errstr, $errfile, $errline)\n {\n //echo \"<pre>\";\n //var_dump($errstr);\n //echo \"</pre>\";\n }", "title": "" }, { "docid": "69acb39e9876c569fb393673814f8ce9", "score": "0.5165086", "text": "function admin_log($msg) {\n\tglobal $login, $conf_base_path;\n\t$msg = date(\"Y-m-d H:i:s\") . \" - $login - $msg\\n\";\n\tfile_put_contents(\"$conf_base_path/log/admin.php.log\", $msg, FILE_APPEND);\n}", "title": "" }, { "docid": "69acb39e9876c569fb393673814f8ce9", "score": "0.5165086", "text": "function admin_log($msg) {\n\tglobal $login, $conf_base_path;\n\t$msg = date(\"Y-m-d H:i:s\") . \" - $login - $msg\\n\";\n\tfile_put_contents(\"$conf_base_path/log/admin.php.log\", $msg, FILE_APPEND);\n}", "title": "" }, { "docid": "4cff53e7ae7597b81cf8f05b4c3c1b7b", "score": "0.5164687", "text": "function debug ($str) {\n global $DEBUG;\n if ($DEBUG) {\n echo \"$str\\n<br><br>\\n\";\n }\n }", "title": "" }, { "docid": "d27f4c2c9d3d6945f1f06d0d4ae70d39", "score": "0.51637274", "text": "function inf($string, $name=''){\n if (DEBUG)\n {\n echo '<br/>'.$name.': '.$string.'<br/>';\n }\n}", "title": "" }, { "docid": "62a8d638cb0b95ae315860ce80331c4a", "score": "0.51636547", "text": "function output($string, $level = INFO, $label = '') {\n $string = str_replace('\\n', PHP_EOL, $string);\n\n if (!empty($label)) {\n $label = \"$label: \";\n }\n else if ($level == WARN) {\n $label = 'WARNING: ';\n }\n else if ($level == ERROR) {\n $label = 'ERROR: ';\n }\n $string = \"$label$string\";\n\n if ($level == WARN) {\n error_log($string);\n }\n elseif ($level == ERROR) {\n error_log(PHP_EOL . $string);\n }\n else {\n echo $string . PHP_EOL;\n }\n}", "title": "" }, { "docid": "f662681ae5c11e80b33a027f92d66baa", "score": "0.515902", "text": "function writelog($logfile,$text) {\n $text .= \", All Those On <i>\".date('d.m.Y H:i:s').\"</i> By <u>$_SERVER[REMOTE_ADDR]</u> \\n\";\n $fp = fopen(\"logs/$logfile.php\",\"a\");\n fputs($fp, $text);\n fclose($fp);\n}", "title": "" }, { "docid": "f1b7f7042f4d67eac1aea1f7a916a067", "score": "0.5154775", "text": "function ewr_Trace($msg) {\n\t$filename = \"debug.txt\";\n\tif (!$handle = fopen($filename, 'a')) exit;\n\tif (is_writable($filename)) fwrite($handle, $msg . \"\\n\");\n\tfclose($handle);\n}", "title": "" }, { "docid": "ae919954054f36b1c8d9b0a75bfbd573", "score": "0.5152289", "text": "function WriteMessage($message) {\n global $g_messages, $g_options;\n\n $g_messages[] = date('[Y-m-d H:i:s] ') . $message;\n if (true || $g_options['v'] || !isset($_SERVER['argv']))\n echo $message . PHP_EOL;\n}", "title": "" }, { "docid": "be82886943fee06c63396a3ccee40ce5", "score": "0.515128", "text": "function beef_log($summary, $str) {\n\t\t// below includes session info - for nat'ed browsers\n\n\t\t$time_stamp = date(\"d/m/y H:i:s\", time());\n\t\t$zombie_id = md5(session_id());\n\t\t\n\t\t// create full log\n\t\t$log_entry = \"[\" . $time_stamp . \" \" . $_SERVER['REMOTE_ADDR'] . \"] \" . $str;\n\t\tfile_put_contents(LOG_FILE, $log_entry . \"\\n\", FILE_APPEND);\n\t\t\n\t\t//create summary log\n\t\tif($summary != \"\") {\n\t\t\t$time_stamp_link = \"<a href=\\\"javascript:change_zombie('\" . md5(session_id()) . \"')\\\">\" ;\n\t\t\t$time_stamp_link .= \"[\" . $time_stamp . \" \" . $_SERVER['REMOTE_ADDR'] . \"]</a>\";\n\t\t\t$safe_summary = html_encode_all($summary);\n\t\t\t$safe_summary = convert_10_BR($safe_summary);\n\t\t\t$log_entry = $time_stamp_link . \"<br>\" . $safe_summary;\n\n\t\t\tfile_start_put_contents(SUMMARY_LOG_FILE, $log_entry . \"<br>\");\n\t\t}\n\t}", "title": "" }, { "docid": "55c845952253b003efda8fd7bef5f2ec", "score": "0.5150834", "text": "function logOk ($okMsg)\n{\n error_log($okMsg. \"\\r\\n\", 3, './ok.log');\n}", "title": "" }, { "docid": "0d48ec3c98d74dc2498e8b99372596e9", "score": "0.5150707", "text": "function logfile($msg) {\n $path = \"/home/stu15/s10/bmn1826/public_html/www/plc.log\";\n \n if ($msg != \"\")\n $msg = date(DATE_ATOM) . \": \" . $msg;\n \n file_put_contents($path, $msg . \"\\n\", FILE_APPEND);\n}", "title": "" }, { "docid": "fc1486e4a1b557adcea2ad80c7e2ad90", "score": "0.5146234", "text": "function log_var($data, $label = NULL) {\n global $log_var_file;\n ob_start();\n print_r($data);\n $string = ob_get_clean();\n if ($label) {\n $out = $label .': '. $string;\n }\n else {\n $out = $string;\n }\n $out .= \"\\n\";\n\n if (file_put_contents($log_var_file, $out, FILE_APPEND) === FALSE) {\n return FALSE;\n }\n}", "title": "" }, { "docid": "fc1486e4a1b557adcea2ad80c7e2ad90", "score": "0.5146234", "text": "function log_var($data, $label = NULL) {\n global $log_var_file;\n ob_start();\n print_r($data);\n $string = ob_get_clean();\n if ($label) {\n $out = $label .': '. $string;\n }\n else {\n $out = $string;\n }\n $out .= \"\\n\";\n\n if (file_put_contents($log_var_file, $out, FILE_APPEND) === FALSE) {\n return FALSE;\n }\n}", "title": "" }, { "docid": "8abb178bfb96d4978d0d6a567aa13a8b", "score": "0.5145254", "text": "function log($what, $where) {\n\t\twriteLog($what, $where);\n\t}", "title": "" }, { "docid": "4684b525987a019210b54481a6435fd3", "score": "0.51435024", "text": "function _log_handler_plain($level, $msg, $more = array()){\n\n\t\t# only shows notices if we asked to see them\n\t\tif ($level == 'notice' && !$GLOBALS['cfg']['admin_flags_show_notices']) return;\n\n\t\t$type = $more['type'] ? $more['type'] : $level;\n\n\t\tif ($type) echo \"[$type] \";\n\n\t\techo $msg;\n\n\t\tif ($more['time'] > -1) echo \" ($more[time] ms)\";\n\n\t\techo \"\\n\";\n\t}", "title": "" }, { "docid": "0b9fc90bd9d449ab76284790a32b059f", "score": "0.5138983", "text": "private function DEBUG($pre,$str) { syslog(LOG_DEBUG,sprintf(\"%s [%d] %s::%s\",$_SERVER['REMOTE_ADDR'],getmypid(),$pre,$str)); }", "title": "" }, { "docid": "f5bac5b3f41955b01199cf184cd35f28", "score": "0.5137209", "text": "public static function log($msg) {\n self::$debug_output .= \"\\n\\n\\n\\n$msg\";\n }", "title": "" }, { "docid": "b01f62b833759b2b75f3455fc2b53724", "score": "0.51305157", "text": "function dump_to_log($value){\n\t\tfwrite($this->log_file, $value.\"\\n\");\n\t}", "title": "" }, { "docid": "30e4b7b051e7842e67f20d60ab06fed0", "score": "0.5126255", "text": "function logger($message, $type)\n{\n global $debug;\n switch ($type) {\n case 0:\n //add\n echo $debug[\"add\"] ? \"\\033[0;32m [+] $message \\033[0m\\n\" : \"\";\n break;\n case 1:\n //reject\n echo $debug[\"reject\"] ? \"\\033[0;31m [-] $message \\033[0m\\n\" : \"\";\n break;\n case 2:\n //manipulate\n echo $debug[\"warn\"] ? \"\\033[1;33m [!] $message \\033[0m\\n\" : \"\";\n break;\n }\n}", "title": "" } ]
e2064dd49b16bc9dcb854ab4c5b5dd8a
Move this game down one spot on the shortlist
[ { "docid": "ba84bafde032a8f0f81882afd587bbc5", "score": "0.60262334", "text": "public function shortlistDown() : bool\n {\n if ($this->shortlist_order == $this->getMaxShortlistOrder() || is_null($this->shortlist_order)) {\n return true;\n }\n\n $switchId = $this->db->query_value('\n SELECT id\n FROM mygamecollection\n WHERE shortlist_order = :order\n LIMIT 1',\n [':order' => $this->shortlist_order + 1]\n );\n\n if ($switchId) {\n $this->db->query('\n UPDATE mygamecollection\n SET shortlist_order = shortlist_order - 1\n WHERE id = :id\n LIMIT 1',\n [':id' => $switchId]\n );\n } else {\n return false;\n }\n\n $this->shortlist_order++;\n\n return $this->save();\n }", "title": "" } ]
[ { "docid": "def522260964fa449ae019ab8459e69c", "score": "0.66745675", "text": "function moveDown()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->query_single( $qry, \"SELECT ID, Placement FROM eZLink_Attribute\r\n WHERE Placement>'$this->Placement' ORDER BY Placement ASC\",\r\n array( \"Limit\" => 1 ) );\r\n $listorder = $qry[ $db->fieldName( \"Placement\" ) ];\r\n $listid = $qry[ $db->fieldName( \"ID\" ) ];\r\n $db->begin();\r\n $db->lock( \"eZLink_Attribute\" );\r\n $res[] = $db->query( \"UPDATE eZLink_Attribute SET Placement='$listorder' WHERE ID='$this->ID'\" );\r\n $res[] = $db->query( \"UPDATE eZLink_Attribute SET Placement='$this->Placement' WHERE ID='$listid'\" );\r\n $db->unlock();\r\n if ( in_array( false, $res ) )\r\n $db->rollback();\r\n else\r\n $db->commit();\r\n }", "title": "" }, { "docid": "3400b0bdd2c3d5eeae388f3fbe66044f", "score": "0.63339823", "text": "function moveUp()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->query_single( $qry, \"SELECT ID, Placement FROM eZLink_Attribute\r\n WHERE Placement<'$this->Placement' ORDER BY Placement DESC\",\r\n array( \"Limit\" => 1 ) );\r\n $listorder = $qry[ $db->fieldName( \"Placement\" ) ];\r\n $listid = $qry[ $db->fieldName( \"ID\" ) ];\r\n $db->begin();\r\n $db->lock( \"eZLink_Attribute\" );\r\n $res[] = $db->query( \"UPDATE eZLink_Attribute SET Placement='$listorder' WHERE ID='$this->ID'\" );\r\n $res[] = $db->query( \"UPDATE eZLink_Attribute SET Placement='$this->Placement' WHERE ID='$listid'\" );\r\n $db->unlock();\r\n\r\n if ( in_array( false, $res ) )\r\n $db->rollback();\r\n else\r\n $db->commit();\r\n }", "title": "" }, { "docid": "1369aa8f2bb49f4a9f0472d701a69105", "score": "0.6317971", "text": "function moveBack() {\n\t\t$this->pos--;\n\t\t$this->pointer--;\n\t}", "title": "" }, { "docid": "0fa41184e154c0bcd7cc8d5056d60631", "score": "0.6266294", "text": "function moveDown()\n {\n $db =& eZDB::globalDatabase();\n $db->query_single( $qry, \"SELECT ID, ListOrder FROM eZAddress_PhoneType\n WHERE Removed=0 AND ListOrder>'$this->ListOrder' ORDER BY ListOrder ASC\", array( \"Limit\" => \"1\" ) );\n $listorder = $qry[$db->fieldName(\"ListOrder\")];\n $listid = $qry[$db->fieldName(\"ID\")];\n\n $db->begin();\n $res[] = $db->query( \"UPDATE eZAddress_PhoneType SET ListOrder='$listorder' WHERE ID='$this->ID'\" );\n $res[] = $db->query( \"UPDATE eZAddress_PhoneType SET ListOrder='$this->ListOrder' WHERE ID='$listid'\" );\n eZDB::finish( $res, $db );\n }", "title": "" }, { "docid": "5534bafbd750118f487b49e0886898ca", "score": "0.6048373", "text": "public function shortlistUp() : bool\n {\n if ($this->shortlist_order == 1 || is_null($this->shortlist_order)) {\n return true;\n }\n\n $switchId = $this->db->query_value('\n SELECT id\n FROM mygamecollection\n WHERE shortlist_order = :order\n LIMIT 1',\n [':order' => $this->shortlist_order - 1]\n );\n\n if ($switchId) {\n $this->db->query('\n UPDATE mygamecollection\n SET shortlist_order = shortlist_order + 1\n WHERE id = :id\n LIMIT 1',\n [':id' => $switchId]\n );\n } else {\n return false;\n }\n\n $this->shortlist_order--;\n\n return $this->save();\n }", "title": "" }, { "docid": "cac0d7e19b1c986bd78922f015a36ea4", "score": "0.60467345", "text": "function moveUp()\n {\n $db =& eZDB::globalDatabase();\n $db->query_single( $qry, \"SELECT ID, ListOrder FROM eZAddress_PhoneType\n WHERE Removed=0 AND ListOrder<'$this->ListOrder' ORDER BY ListOrder DESC\", array( \"Limit\" => \"1\" ) );\n $listorder = $qry[$db->fieldName(\"ListOrder\")];\n $listid = $qry[$db->fieldName(\"ID\")];\n\n $db->begin();\n $res[] = $db->query( \"UPDATE eZAddress_PhoneType SET ListOrder='$listorder' WHERE ID='$this->ID'\" );\n $res[] = $db->query( \"UPDATE eZAddress_PhoneType SET ListOrder='$this->ListOrder' WHERE ID='$listid'\" );\n eZDB::finish( $res, $db );\n }", "title": "" }, { "docid": "9945393dacfd4a173637df965ef8283a", "score": "0.60382885", "text": "function moveDown ( $id ) {\n\t\t\n\t\tif (($position = $this->getPosition($id)) < ($this->count() - 1)) {\n\t\t\t$itemAfter = $this->_items[$position + 1];\n\t\t\t$this->_items[$position + 1] = $id;\n\t\t\t$this->_items[$position] = $itemAfter;\n\t\t}\n\t}", "title": "" }, { "docid": "435de7a9c45eb167af64fd6935cd0553", "score": "0.5919225", "text": "function moveDownNewsFeed( ) {\n\torderNewsFeed( 1 );\n}", "title": "" }, { "docid": "900f2386b825b14a2508d6efcaef6eca", "score": "0.5868148", "text": "function moveUpNewsFeed( ) {\n\torderNewsFeed( -1 );\n}", "title": "" }, { "docid": "fb2d940456b3d8b47721f1e8e1a881bf", "score": "0.577483", "text": "function moveUp ( $id ) {\n\t\t\n\t\tif (($position = $this->getPosition($id)) > 0) {\n\t\t\t$itemBefore = $this->_items[$position-1];\n\t\t\t$this->_items[$position-1] = $id;\n\t\t\t$this->_items[$position] = $itemBefore;\n\t\t}\n\t}", "title": "" }, { "docid": "61bcf40b60f11e64e30510d22b292406", "score": "0.572368", "text": "public function decreasePosition()\n {\n if ($this->position > 1) {\n $this->position--;\n }\n }", "title": "" }, { "docid": "6355118bffccfb38a2f26818bbe4a476", "score": "0.5497022", "text": "function moveImageDown( $id )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $db->query_single( $qry, \"SELECT * FROM eZArticle_ArticleImageLink\r\n WHERE ArticleID='$this->ID' AND ImageID='$id'\" );\r\n\r\n if ( is_numeric( $qry[$db->fieldName(\"ID\")] ) )\r\n {\r\n $linkID = $qry[$db->fieldName(\"ID\")];\r\n\r\n $placement = $qry[$db->fieldName(\"Placement\")];\r\n\r\n $db->query_single( $qry, \"SELECT ID, Placement FROM eZArticle_ArticleImageLink\r\n WHERE Placement>'$placement' AND ArticleID='$this->ID' ORDER BY Placement ASC\" );\r\n\r\n $newPlacement = $qry[$db->fieldName(\"Placement\")];\r\n $listid = $qry[$db->fieldName(\"ID\")];\r\n\r\n if ( $newPlacement == $placement )\r\n {\r\n $newPlacement += 1;\r\n }\r\n\r\n if ( is_numeric( $listid ) )\r\n {\r\n $db->query( \"UPDATE eZArticle_ArticleImageLink SET Placement='$newPlacement' WHERE ID='$linkID'\" );\r\n $db->query( \"UPDATE eZArticle_ArticleImageLink SET Placement='$placement' WHERE ID='$listid'\" );\r\n }\r\n }\r\n }", "title": "" }, { "docid": "72f8dca4d4492795687cde8e561fcc2b", "score": "0.5318168", "text": "function putBack() {\n\t\t\t$this->index--;\t\n\t\t}", "title": "" }, { "docid": "5558546f39316baf7638336bae8f7ffd", "score": "0.53152704", "text": "public function moveNext();", "title": "" }, { "docid": "e226617df947e3e09b4c681f02fdfd18", "score": "0.53063315", "text": "public function advanceAttackers()\n {\n $this->moveUnits($this->getAttackingUnits(), $this->getDefenderLocation());\n }", "title": "" }, { "docid": "4700b93c214226615804c9da1e662836", "score": "0.53044856", "text": "function ItemMoveDown ($Menu_entry_orderid, $Menu_entry_id = 1) {\r\n \t\t\t// are these paremeters really numbers?\r\n \t\t\tif(is_numeric($Menu_entry_orderid) && is_numeric($Menu_entry_id)) {\r\n \t\t\t\t$sql = \"SELECT *\r\n\t\t\t\t\tFROM \" . DB_PREFIX . \"menu_entries\r\n\t\t\t\t\tWHERE menu_entries_orderid >= $Menu_entry_orderid AND menu_entries_menuid = $Menu_entry_id\r\n\t\t\t\t\tORDER BY menu_entries_orderid ASC\r\n\t\t\t\t\tLIMIT 0 , 2\";\r\n\t\t\t\t$menuResult = $this->_SqlConnection->SqlQuery($sql);\r\n\t\t\t\r\n\t\t\t\t$this->_SwitchOrderIDs($menuResult);\r\n \t\t\t}\r\n \t\t}", "title": "" }, { "docid": "f1d82b4ab493149f9481b4a655c25102", "score": "0.52948594", "text": "public function movemealdownAction(){\n $restaurant = $this->initRestaurant();\n if (is_null($restaurant->getId())) {\n $this->_redirect('/index');\n }\n\n $request = $this->getRequest();\n\n if ($request->getParam('id', false)) {\n $restaurant->moveMealDown($request->getParam('id', null));\n }\n\n //get path so the sorting and filtering will stay when we edit some meal\n $path = $this->session->mealspath;\n if (!is_null($path)) {\n $this->_redirect($path);\n }\n else {\n $this->_redirect('/restaurant/meals');\n }\n }", "title": "" }, { "docid": "a4c5b018baa09f1be0ebdbaa08e1cbb2", "score": "0.5277339", "text": "public function movePrevious();", "title": "" }, { "docid": "d280183754e2b4739a468b0dc6fd7404", "score": "0.5224689", "text": "public function move() {\n\t}", "title": "" }, { "docid": "a1d5b8dc52efc747548e06ad9c9b258d", "score": "0.52235687", "text": "public function makeMove(){\n \n $emptyFields = [];\n \n for($i=0;$i<9;$i++){\n if($this->board[$i] == '-'){\n $emptyFields[] = $i;\n }\n }\n \n $board = $this->board;\n\n foreach($emptyFields as $key){\n $this->board = $board; \n $this->board = substr_replace($this->board, 'O', $key, 1);\n if($this->checkEndGame() == 'O_WON'){\n return;\n }\n }\n \n $this->board = $board; \n $this->board = substr_replace($this->board, 'O', $emptyFields[array_rand($emptyFields)], 1);\n \n return;\n }", "title": "" }, { "docid": "a87d5b03604f30b3153c0e177195a184", "score": "0.520324", "text": "public function moveDown ($pos = 1)\n {\n return $this->update([\n 'order' => $this->order - $pos\n ]);\n }", "title": "" }, { "docid": "b8a312e7858656fe8b3ea9fba798676d", "score": "0.5199596", "text": "function moveDown($id){\n\t\t$nodeInfo = $this->getNodeInfo($id);\t\t\n\t\t$parentInfo = $this->getNodeInfo($nodeInfo['parents']);\n\t\t\n\t\t$sql = 'SELECT * FROM '.$this->_table.' WHERE lft > '.$nodeInfo['lft'].' AND parents = '.$nodeInfo['parents'].' ORDER BY lft ASC LIMIT 1';\n\t\t$nodeBrother = $this->_db->fetchRow($sql);\n\t\t\n\t\tif(!empty($nodeBrother)){\t\t\t\n\t\t\t$options = array('position'=>'after','brother_id'=>$nodeBrother['mcId']);\n\t\t\t$this->moveNode($id,$parentInfo['mcId'],$options);\n\t\t}\n\t}", "title": "" }, { "docid": "d253db7c972a3b056e698eea014731b2", "score": "0.51701975", "text": "function ItemMoveUp ($Menu_entry_orderid, $Menu_entry_id = 1) {\r\n \t\t\t// are these paremeters really numbers?\r\n \t\t\tif(is_numeric($Menu_entry_orderid) && is_numeric($Menu_entry_id)) {\r\n \t\t\t\t// this query should return two 'rows' \r\n \t\t\t\t$sql = \"SELECT *\r\n\t\t\t\t\tFROM \" . DB_PREFIX . \"menu_entries\r\n\t\t\t\t\tWHERE menu_entries_orderid <= $Menu_entry_orderid AND menu_entries_menuid = $Menu_entry_id\r\n\t\t\t\t\tORDER BY menu_entries_orderid DESC\r\n\t\t\t\t\tLIMIT 0 , 2\";\r\n\t\t\t\t$menuResult = $this->_SqlConnection->SqlQuery($sql);\r\n\t\t\t\t// try to switch the orderID between these 'rows'\r\n\t\t\t\t$this->_SwitchOrderIDs($menuResult);\r\n \t\t\t}\r\n \t\t}", "title": "" }, { "docid": "4520ef0d7e040c10735e501539cc15ab", "score": "0.51697844", "text": "public function move($game_deck) {\n if ($this->calcHand() < 16) {\n $this->draw($game_deck);\n }\n $this->checkBust();\n }", "title": "" }, { "docid": "d363863ffeccf9299c642dfa04e4eee9", "score": "0.5155068", "text": "function moveRowUp()\n\t{\n\t\t$this->content_obj->moveRowUp();\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\n\t}", "title": "" }, { "docid": "2c3b2ee44934f7fe8740c3c36ebcc266", "score": "0.5154183", "text": "function orderdown()\n\t{\n\t\t$this->reorder($dir = 1);\n\t}", "title": "" }, { "docid": "484e346b385824c487a7fa9ab3e4efd4", "score": "0.512841", "text": "public function moveBackwards()\n {\n switch ($this->getDirection()) {\n case 'south':\n return array($this->position->getXPosition() , $this->position->getYPosition() - 1);\n\n break;\n\n case 'north':\n return array($this->position->getXPosition() , $this->position->getYPosition() + 1);\n\n break;\n case 'east':\n return array($this->position->getXPosition() - 1, $this->position->getYPosition());\n break;\n\n default:\n return array($this->position->getXPosition() + 1, $this->position->getYPosition());\n\n break;\n }\n }", "title": "" }, { "docid": "b989fa248845d366fff8db53b1409cdd", "score": "0.50949997", "text": "function orderup()\n\t{\n\t\t$this->reorder($dir = -1);\n\t}", "title": "" }, { "docid": "4d9c7fcf99d14232f66ffac08c74e6c5", "score": "0.5089936", "text": "function doDown()\n {\n }", "title": "" }, { "docid": "4d9c7fcf99d14232f66ffac08c74e6c5", "score": "0.5089936", "text": "function doDown()\n {\n }", "title": "" }, { "docid": "fa3e3f0a48c25311ad3eb5e663b3c465", "score": "0.50858164", "text": "public function orderdown()\n {\n // Validate whether this task is allowed\n if ($this->_validate() == false) return false;\n\n // Load the model and alter ordering\n $model = $this->_loadModel();\n $model->move(1);\n\n // Redirect\n $this->_setOverviewRedirect();\n }", "title": "" }, { "docid": "8adcb76706075f2909cb27edc862a75e", "score": "0.5072036", "text": "function moveImageUp( $id )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n\t$db->query_single( $qry, \"SELECT * FROM eZArticle_ArticleImageLink\r\n\t\t\t\t WHERE ArticleID='$this->ID' AND ImageID='$id'\" );\r\n\r\n if ( is_numeric( $qry[$db->fieldName(\"ID\")] ) )\r\n {\r\n $linkID = $qry[$db->fieldName(\"ID\")];\r\n\r\n $placement = $qry[$db->fieldName(\"Placement\")];\r\n\r\n $db->query_single( $qry, \"SELECT ID, Placement FROM eZArticle_ArticleImageLink\r\n WHERE Placement<'$placement' AND ArticleID='$this->ID'\r\n ORDER BY Placement DESC\" );\r\n\r\n $newPlacement = $qry[$db->fieldName(\"Placement\")];\r\n $listid = $qry[$db->fieldName(\"ID\")];\r\n\r\n if ( $newPlacement == $placement )\r\n {\r\n $placement += 1;\r\n }\r\n\r\n if ( is_numeric( $listid ) )\r\n {\r\n $db->query( \"UPDATE eZArticle_ArticleImageLink SET Placement='$newPlacement' WHERE ID='$linkID'\" );\r\n $db->query( \"UPDATE eZArticle_ArticleImageLink SET Placement='$placement' WHERE ID='$listid'\" );\r\n }\r\n }\r\n }", "title": "" }, { "docid": "f83fd56fc38c367b6627bb3fcce7eb2d", "score": "0.5055003", "text": "public function movePlayer()\n\t{\n\t\t// Move north\n\t\tif($this->direction == 'N')\n\t\t\t$this->yPlayer++;\n\n\t\t// Move south\n\t\tif($this->direction == 'S')\n\t\t\t$this->yPlayer--;\n\n\t\t// Move east\n\t\tif($this->direction == 'E')\n\t\t\t$this->xPlayer++;\n\n\t\t// Move west\n\t\tif($this->direction == 'W')\n\t\t\t$this->xPlayer--;\n\t}", "title": "" }, { "docid": "6d6ffc95d862b28d16ddabfa6fee7065", "score": "0.50385123", "text": "function moveNext()\r\n {\r\n // TODO: Implement moveNext() method.\r\n }", "title": "" }, { "docid": "4ad949cd7b170cb652ec5b2f23d312be", "score": "0.4998908", "text": "public function move(): void\r\n {\r\n }", "title": "" }, { "docid": "6927a60a8c9aaa19413fca98d6ec22a0", "score": "0.49884725", "text": "static public function ShiftTop();", "title": "" }, { "docid": "b652fd4eba34188825efba8ef2426af3", "score": "0.49882466", "text": "function orderdown()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('banner');\n\t\t$model->move(1);\n\n\t\t$this->setRedirect('index.php?option=com_banners');\n\t}", "title": "" }, { "docid": "5442461b5ee3d52d4377545c7bedd56c", "score": "0.49830654", "text": "public function moveMealDown($id) {\n $this->getTable()->moveMealDown($id);\n }", "title": "" }, { "docid": "6b4e4dd94a4db4b4777a7e4705414de5", "score": "0.49707365", "text": "function ef_move_media () {\n\tglobal $menu; \n\n\t$menu[14] = $menu[10];\n\tunset($menu[10]);\n}", "title": "" }, { "docid": "52b6df21de8846b3cc3a9569b06d6327", "score": "0.49424738", "text": "function down($table, $level_name = NULL, $level_val = NULL) {\n $q = \"select * from `\" . $table . \"` where `move`='\" . $this->move . \"'\";\n if (!empty($level_name)) {\n if (empty($level_val) AND $level_name == 'id_cat')\n $level_val = $this->GetIdCatByMove($this->move);\n $q = $q . \" AND `\" . $level_name . \"`='\" . $level_val . \"'\";\n }\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if (!$res)\n return false;\n $rows = $this->Right->db_GetNumRows();\n $row = $this->Right->db_FetchAssoc();\n $move_up = $row['move'];\n $id_up = $row['id'];\n\n\n $q = \"select * from `\" . $table . \"` where `move`>'\" . $this->move . \"'\";\n if (!empty($level_name))\n $q = $q . \" AND `\" . $level_name . \"`='\" . $level_val . \"'\";\n $q = $q . \" order by `move` asc\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if (!$res)\n return false;\n $rows = $this->Right->db_GetNumRows();\n $row = $this->Right->db_FetchAssoc();\n $move_down = $row['move'];\n $id_down = $row['id'];\n\n if ($move_down != 0 AND $move_up != 0) {\n $q = \"update `\" . $table . \"` set\n `move`='\" . $move_down . \"' where `id`='\" . $id_up . \"'\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n\n $q = \"update `\" . $table . \"` set\n `move`='\" . $move_up . \"' where `id`='\" . $id_down . \"'\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n }\n }", "title": "" }, { "docid": "52983179bfb86b6a931e96b322a7def3", "score": "0.49326384", "text": "public function move($length);", "title": "" }, { "docid": "65c556ae11e5b07bf5fa3f195e28ccb6", "score": "0.49303585", "text": "function reverse() {\n\t\t\t\t\t\t\t\n\t\t\t$current_mileage = $this->miles;\n\t\t\tif ($current_mileage > 5) {\n\t\t\t\techo \"Reversing <br />\";\n\t\t\t\t$this->miles = ($current_mileage - 5);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo \"Not enough miles to reverse. <br />\";\n\t\t}", "title": "" }, { "docid": "74b75646a25d641990335442f6b40c36", "score": "0.49258336", "text": "function orderup() {\n\t\t\n\t\t$this->_order(-1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "title": "" }, { "docid": "c9ec0cd36efddafff6e2dca45f4faa6e", "score": "0.4922355", "text": "private function moveOnto(array $p1, array $p2)\n {\n while ($p2[1]+1 != count($this->blocks[$p2[0]])) {\n $this->reset($p2[0], $p2[1]+1);\n }\n\n while ($p1[1]+1 != count($this->blocks[$p1[0]])) {\n $this->reset($p1[0], $p1[1]+1);\n }\n\n $offset = count($this->blocks[$p1[0]]) + $p1[1];\n $removed = array_splice($this->blocks[$p1[0]], $offset-1, 1);\n array_splice($this->blocks[$p2[0]], count($this->blocks[$p2[0]]), 0, $removed);\n }", "title": "" }, { "docid": "0e3ac18999a3caa218f1441702a50087", "score": "0.49063614", "text": "function orderdown() {\n\t\t\n\t\t$this->_order(1);\n\t\t\n\t\t$this->adminLink->makeURL();\n\t\t$this->app->redirect( $this->adminLink->url );\n\t\n\t}", "title": "" }, { "docid": "8271be53ddcdd4e4a1956984b44c8b5a", "score": "0.4888936", "text": "public function travelBack()\n {\n return Wormhole::back();\n }", "title": "" }, { "docid": "79edac887415fa3ce442bafc2a17fbc3", "score": "0.48841664", "text": "public function moveUp ($pos = 1)\n {\n return $this->update([\n 'order' => $this->order + $pos\n ]);\n }", "title": "" }, { "docid": "0921229cb072124502560d86b6ab18b8", "score": "0.48661", "text": "public function moveToNextGeneration()\n {\n $this->aliveStatus = $this->nextGenerationAliveStatus;\n }", "title": "" }, { "docid": "d0d44eff23d1fb16f5be4a32374cce42", "score": "0.4860592", "text": "function orderdown()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$model = $this->getModel('categories');\n\t\t$model->move(1);\n\t\t\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$catscache = JFactory::getCache('com_flexicontent_cats');\n\t\t$catscache->clean();\n\n\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=categories');\n\t}", "title": "" }, { "docid": "d0d44eff23d1fb16f5be4a32374cce42", "score": "0.4860592", "text": "function orderdown()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$model = $this->getModel('categories');\n\t\t$model->move(1);\n\t\t\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$catscache = JFactory::getCache('com_flexicontent_cats');\n\t\t$catscache->clean();\n\n\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=categories');\n\t}", "title": "" }, { "docid": "875f2b7cd5b15ffc90b03a172a5aeb85", "score": "0.4853971", "text": "public function downvote()\n {\n $this->setPoints($this->getPoints() - 1);\n }", "title": "" }, { "docid": "70095e50455ae10f202b904a08568286", "score": "0.48477185", "text": "public function step() {\n\n $x = $this->x + 1;\n $y = $this->y;\n\n if($x >= $this->board->width) {\n $x = $this->board->width - 1;\n }\n\n $this->x = $x;\n $this->y = $y;\n\n echo $this->id .\" is stepping to \" . $this->y . \":\".$this->x.\"\\n\";\n\n\n }", "title": "" }, { "docid": "afb2f11bc684219cd1a3aef4d6c4ca58", "score": "0.48435503", "text": "function moveUp($id){\n\t\t$nodeInfo = $this->getNodeInfo($id);\t\t\n\t\t$parentInfo = $this->getNodeInfo($nodeInfo['parents']);\n\t\t\n\t\t$sql = 'SELECT * FROM '.$this->_table.' WHERE lft < '.$nodeInfo['lft'].' AND parents = '.$nodeInfo['parents'].' ORDER BY lft DESC LIMIT 1';\n\t\t\n\t\t$nodeBrother = $this->_db->fetchRow($sql);\n\t\tif(!empty($nodeBrother)){\t\t\t\n\t\t\t$options = array('position'=>'before','brother_id'=>$nodeBrother['mcId']);\n\t\t\t$this->moveNode($id, $parentInfo['mcId'], $options);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "176c75fad4a2ddc6ae9c31a6080375bc", "score": "0.48373166", "text": "public function move ( $_dst_identifier );", "title": "" }, { "docid": "4a1d767c93f0cf0ff33ddc902616c4aa", "score": "0.48365012", "text": "public function movemealupAction(){\n $restaurant = $this->initRestaurant();\n if (is_null($restaurant->getId())) {\n $this->_redirect('/index');\n }\n\n $request = $this->getRequest();\n\n if ($request->getParam('id', false)) {\n $restaurant->moveMealUp($request->getParam('id', null));\n }\n\n //get path so the sorting and filtering will stay when we edit some meal\n $path = $this->session->mealspath;\n if (!is_null($path)) {\n $this->_redirect($path);\n }\n else {\n $this->_redirect('/restaurant/meals');\n }\n }", "title": "" }, { "docid": "c55aae579c0a2b0d67679b86a1a00814", "score": "0.4822615", "text": "public static function setMenuDownPosition($id) {\n global $db, $database;\n\n\t\t$linktodown = $db->query('SELECT * FROM '.$database['tbl_prefix'].'dev_menus WHERE id = ?', DBDriver::AARRAY, array($id));\n $position1 = $linktodown['position'] + 1;\n $link = $db->query('SELECT id FROM '.$database['tbl_prefix'].'dev_menus WHERE type = ? AND position = ?', DBDriver::AARRAY, array($linktodown['type'], $position1));\n $db->query('UPDATE '.$database['tbl_prefix'].'dev_menus SET position = ? WHERE id = ?', DBDriver::QUERY, array($linktodown['position'], $link['id']));\n $db->query('UPDATE '.$database['tbl_prefix'].'dev_menus SET position = ? WHERE id = ?', DBDriver::QUERY, array($position1, $id));\n }", "title": "" }, { "docid": "5e4aa2e1fa5a1c2e3ecab9faf0be035e", "score": "0.48042", "text": "function moveToEnd ( $id ) {\n\t\t$this->moveToPosition($id, $this->count() - 1);\n\t}", "title": "" }, { "docid": "82f20ba405b31d805af16c7725d55f8e", "score": "0.4796505", "text": "public function orderup()\n {\n // Validate whether this task is allowed\n if ($this->_validate() == false) return false;\n\n // Load the model and alter ordering\n $model = $this->_loadModel();\n $model->move(-1);\n\n // Redirect\n $this->_setOverviewRedirect();\n }", "title": "" }, { "docid": "c449a3979ad7bfe433098c1789761622", "score": "0.47914192", "text": "public function moveBack() {\n\t\t$this->getPage()->goBack();\n\t\tLog::instance()->write( 'Back to ' . $web_driver->getCurrentURL(), 1 );\n\t}", "title": "" }, { "docid": "3d1c5e32a633d07aeb73c81901295651", "score": "0.4781294", "text": "public function moveTileAuto() {\n //$gridSolver = new gridSolver($this);\n //$gridSolver->auto($this);\n $myGridSolver = new myGridSolver($this);\n $myGridSolver->myAuto();\n }", "title": "" }, { "docid": "a75ff342cf528ff5cdc336502f629deb", "score": "0.47760722", "text": "function nextgoal()\n\t{\n\n\t}", "title": "" }, { "docid": "e8e6c245b59eec49172c89d6fc0217d6", "score": "0.4771301", "text": "public function takeFromBottom() \n {\n $card = $this->getCards()->last();\n if ( $card !== false )\n {\n $card->removeGroup($this);\n return $card;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "2c902a45bce3f3f5a357b670688bc7f8", "score": "0.47712255", "text": "function orderup()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('banner');\n\t\t$model->move(-1);\n\n\t\t$this->setRedirect('index.php?option=com_banners');\n\t}", "title": "" }, { "docid": "32b6e1bc7c297e4d1c1290084e09e8ad", "score": "0.47602406", "text": "public function moveMealUp($id) {\n $this->getTable()->moveMealUp($id);\n }", "title": "" }, { "docid": "c4bd5f8f79998d1914609447adf657f5", "score": "0.47600892", "text": "public function moveDown()\n {\n $index = $this->getIndex();\n if ($this->getParent() \n && $index < count($this->getParent()->getChildren())\n ) {\n $this->getParent()->swap($index, $index + 1);\n }\n return $this;\n }", "title": "" }, { "docid": "c4bd5f8f79998d1914609447adf657f5", "score": "0.47600892", "text": "public function moveDown()\n {\n $index = $this->getIndex();\n if ($this->getParent() \n && $index < count($this->getParent()->getChildren())\n ) {\n $this->getParent()->swap($index, $index + 1);\n }\n return $this;\n }", "title": "" }, { "docid": "bc4541bf77c94e9199fe855deea8de1f", "score": "0.47592157", "text": "public function takeFromTop() \n {\n $card = $this->getCards()->first();\n if ( $card !== false )\n {\n $card->removeGroup($this);\n return $card;\n } else \n {\n return false;\n }\n }", "title": "" }, { "docid": "ae12fa758fef569ae6ec3192b11e2afa", "score": "0.4743524", "text": "abstract protected function moving();", "title": "" }, { "docid": "d5232fc6ddbc4be5e498de5560aa7379", "score": "0.47284338", "text": "public static function setMenuUpPosition($id) {\n global $db, $database;\n $linktodown = $db->query('SELECT * FROM '.$database['tbl_prefix'].'dev_menus WHERE id = ?', DBDriver::AARRAY, array($id));\n $position1 = $linktodown['position'] - 1;\n $link = $db->query('SELECT id FROM '.$database['tbl_prefix'].'dev_menus WHERE type = ? AND position = ?', DBDriver::AARRAY, array($linktodown['type'], $position1));\n $db->query('UPDATE '.$database['tbl_prefix'].'dev_menus SET position = ? WHERE id = ?', DBDriver::QUERY, array($linktodown['position'], $link['id']));\n $db->query('UPDATE '.$database['tbl_prefix'].'dev_menus SET position = ? WHERE id = ?', DBDriver::QUERY, array($position1, $id));\n }", "title": "" }, { "docid": "bbde2fa1198b6c8230d82c087453cb9a", "score": "0.47112304", "text": "public function moveFinger() {\n\t}", "title": "" }, { "docid": "45371b26d893588f6e61215af08e640d", "score": "0.47096103", "text": "abstract protected function doMoveStuff($position);", "title": "" }, { "docid": "2c9d89e56640f4ba169b358d86161e2e", "score": "0.46990275", "text": "function indim_close(){\n $this->shoot_down = true;\n }", "title": "" }, { "docid": "066efd2b25c35689e55ca72024f05e39", "score": "0.4689087", "text": "public function move(){\n\t\t$this->pastBoard = $this->board;\n\t\tarray_walk(array_slice($this->board,0,-2), array($this,\"moveY\"));\t\t\n\t\treturn \"<form id=\\\"form_board\\\">\".$this->stringBoard.\"</form>\";\n\t}", "title": "" }, { "docid": "d895c249e7243707989e26488b110b8c", "score": "0.46784204", "text": "abstract public function backward();", "title": "" }, { "docid": "ddf48c0110589d8dffcb7f66323a5790", "score": "0.4676591", "text": "function orderup()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$model = $this->getModel('categories');\n\t\t$model->move(-1);\n\t\t\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$catscache = JFactory::getCache('com_flexicontent_cats');\n\t\t$catscache->clean();\n\t\t\n\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=categories');\n\t}", "title": "" }, { "docid": "ddf48c0110589d8dffcb7f66323a5790", "score": "0.4676591", "text": "function orderup()\n\t{\n\t\t// Check for request forgeries\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\t\t\n\t\t$model = $this->getModel('categories');\n\t\t$model->move(-1);\n\t\t\n\t\t$cache = JFactory::getCache('com_flexicontent');\n\t\t$cache->clean();\n\t\t$catscache = JFactory::getCache('com_flexicontent_cats');\n\t\t$catscache->clean();\n\t\t\n\t\t$this->setRedirect( 'index.php?option=com_flexicontent&view=categories');\n\t}", "title": "" }, { "docid": "3522a46a170503a7b98d66ddc2e7d088", "score": "0.46665478", "text": "public function moveBack() {\n $this->session->back();\n $this->debug($this->session->getCurrentUrl());\n }", "title": "" }, { "docid": "c116dd8a9d6dc6e40fc259fefdc3c6ab", "score": "0.46593478", "text": "public function moveDown(float $v)\n\t{\n\t\t$direction = $this->calculateUpVector();\n\n\t\t$this->position->x -= ($direction->x * $v);\n\t\t$this->position->y -= ($direction->y * $v);\n\t\t$this->position->z -= ($direction->z * $v);\n\t}", "title": "" }, { "docid": "a0408df60238738756bced6dc7ef986e", "score": "0.46536735", "text": "public function attaquer() {\n if($this->tour % 2 == 0) {\n $this->joueur1->attack($this->joueur2);\n }else {\n //Si le numero de tour est impaire.\n $this->joueur2->attack($this->joueur1);\n }\n //Incrémente le tour de 1.\n $this->tour++;\n }", "title": "" }, { "docid": "d785dc196510555d2bb24d5a8b37abb0", "score": "0.46469516", "text": "public function findNextSafeSpot() {\n\n // if queen is safe, return out of the function and store the position on the board.\n if($this->isSafe()) {\n echo $this->getId().\" is safe \\n\";\n $this->board->setCell($this->x, $this->y, $this);\n return true;\n\n }\n\n // while the queen isn't safe, do the following.\n\n $tries = 0;\n while(!$this->isSafe()) {\n\n // Safety measure for making endless loops\n if($tries > 1000) {\n die(\"STOP, way to many tries. There is something wrong in the algorithm. \");\n }\n\n // First we reset our current position on the board\n $this->board->setCell($this->x, $this->y, 0);\n\n // Let's do one step\n $this->step();\n\n // If the queen has found a safe place. We will place her on that cell.\n if($this->isSafe()) {\n $this->board->setCell($this->x, $this->y, $this);\n\n echo \"Queen \". $this->getId() .\" is safe.\\n\";\n\n return true;\n }\n\n // For the fun and debugging purpose, we show what we are moving at the moment. And it just looks good.\n render($this->board);\n\n // If the queen tried all her options in this row, we remove her from the board and ask her parent to try the next safe option.\n if ($this->x >= $this->board->width -1) {\n\n echo \"We remove \". $this->getId() .\" from board\\n\";\n\n // We remove the current queen. Reset here X position.\n $this->removeFromBoard();\n $this->x = 0;\n\n // We render her last 'remove action';\n render($this->board);\n\n\n if($this->parent) {\n // Power of recursion. Let us ask the parent to look a better spot.\n $this->parent->findNextSafeSpot();\n }\n\n }\n\n $tries ++;\n }\n\n }", "title": "" }, { "docid": "3c04f835bd4d53d3a280c48eaedd07e8", "score": "0.46204138", "text": "public function nextTurn()\n {\n // get user id string\n $turn = strval($this->turn);\n \n $players = $this->getPlayersArray();\n \n for ($i = 0; $i < count($players); $i++)\n {\n $player = $players[$i];\n if ($player[\"id\"] == $turn)\n {\n // set next player (wrap to start if at end of list)\n // to \"turn\"\n $nextPlayer = $players[($i+1) % count($players)];\n $this->turn = $nextPlayer[\"id\"];\n $this->save();\n }\n }\n \n }", "title": "" }, { "docid": "d5d94ab7db70936bfebfe20ef4bd6a29", "score": "0.46176797", "text": "public function MoveFirst() {\n reset($this->_item);\n }", "title": "" }, { "docid": "6240fe586de6e8d86b4838e7ae25901d", "score": "0.46167126", "text": "private function move($from,$to){\n\t\t\t\t\t\t\t\n\t\t$itm = $this->get($from,$this->content);\n\t\n\t\t// Delete the item from the original position\n\t\t$this->del($from,$this->content);\n\t\n\t\t// Add the item to the new position\n\t\t$this->add($itm,$to,$this->content);\n\t\n\t}", "title": "" }, { "docid": "ef373f84cd20b3f6992241f0b94af6d1", "score": "0.46133798", "text": "public function moveUp()\n {\n $index = $this->getIndex();\n if ($index > 0 && $this->getParent()) {\n $this->getParent()->swap($index, $index - 1);\n }\n return $this;\n }", "title": "" }, { "docid": "ef373f84cd20b3f6992241f0b94af6d1", "score": "0.46133798", "text": "public function moveUp()\n {\n $index = $this->getIndex();\n if ($index > 0 && $this->getParent()) {\n $this->getParent()->swap($index, $index - 1);\n }\n return $this;\n }", "title": "" }, { "docid": "707d677d7368abbb5ebad4d88f41be4b", "score": "0.46133423", "text": "public function orderDown()\n {\n $this->order += 1;\n\n $nextProduct = Products::model()->find('`order`=:order AND `category_id`=:category_id', array(\n ':order' => $this->order,\n ':category_id' => $this->category_id\n ));\n\n if ($nextProduct !== null) {\n $nextProduct->order -= 1;\n $nextProduct->save(false);\n }\n\n $this->save(false);\n }", "title": "" }, { "docid": "cdf42e30842d537352b9e9ceeba981a2", "score": "0.45893925", "text": "public function oneDown() {\r\n $this->levelWrong++;\r\n if ($this->levelWrong > 4) {\r\n $this->level = $this->level - 1;\r\n $this->status = 1;\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "f026b307a3af345d16c6aaa2158baaeb", "score": "0.45793918", "text": "function yoasttobottom() {\n return 'low';\n}", "title": "" }, { "docid": "0244ec8e0641ae8bc7287f9d76be50ed", "score": "0.4573539", "text": "public function moveDown(Model $model, $id) {\n\t\treturn $this->move($model,$id,'down');\n\t}", "title": "" }, { "docid": "71155565e6b2d1947de6daf3a2a19d9d", "score": "0.45659062", "text": "public function yoastToBottom()\n\t{\n\t\treturn 'low';\n\t}", "title": "" }, { "docid": "c7851c80b0f3e3dbd93776a7d3088afb", "score": "0.455899", "text": "public function postDown()\n {\n }", "title": "" }, { "docid": "67a43bf9d1debf3f9ca76254c6116f46", "score": "0.45571187", "text": "public function increasePosition()\n {\n $this->position++;\n }", "title": "" }, { "docid": "74a3936cccc06f916dc2f09024828b19", "score": "0.45427015", "text": "public function update_turn() {\n if($this->current_turn == $this->getPlayer1()) {\n $this->current_turn = $this->getPlayer2();\n }\n else {\n $this->current_turn = $this->getPlayer1();\n }\n }", "title": "" }, { "docid": "c24d6def02ac7f2b6c8161a4978cdd23", "score": "0.45367286", "text": "public function nextPlayer()\n {\n $curPla = $this->getCurrentPlayer();\n $curPla->addHandToList($curPla->currentHand());\n\n if ($this->currentPlayer == 0) {\n $this->currentPlayer = 1;\n } else {\n $this->currentPlayer = 0;\n }\n }", "title": "" }, { "docid": "6fe6f0363fa56362d56346252885ceee", "score": "0.45296887", "text": "public function make_move($col) {\n if (($col >= SIDE_LENGTH) || ($col < 0)) {\n $this->add_error(\"incorrect column\");\n return false;\n }\n\n \n if ($this->next_move == 1) {\n $drop_color = $this->player1_color;\n }\n else {\n $drop_color = $this->player2_color;\n }\n\n\n foreach ($this->gameboard[$col] as &$slot) {\n if ($slot === 0) {\n $slot = $drop_color;\n $this->update_player();\n return true;\n }\n }\n\n $this->add_error(\"slot full\");\n return false;\n\n }", "title": "" }, { "docid": "c055279e20c55ac7bd901c977810a56d", "score": "0.45279214", "text": "function manage_position($field, $item_id, $move) {\n if ($field->id != $item_id) {\n //move up = 1 move down = 0\n $newposition = (empty($move)) ? $field->position-1 : $field->position+1;\n } else {\n //move the field\n $newposition = (!empty($move)) ? $field->position- 1 : $field->position+1;\n }\n return $newposition;\n}", "title": "" }, { "docid": "e87a089580a333043c5946e6065d30ea", "score": "0.45258337", "text": "public function preDown()\n {\n }", "title": "" }, { "docid": "572d01c04e9e5f1d78ad858be88f9927", "score": "0.45249143", "text": "public function turnRight()\n {\n $this->direction_pointer = ($this->direction_pointer + 1) % count(self::VALID_DIRECTIONS);\n }", "title": "" }, { "docid": "a98e60edba36a8912f241f7cfdb6cfa8", "score": "0.45218107", "text": "function sendToBottom($title) {\r\n\r\n\t\tglobal $submenu;\r\n\r\n\t\t//do some sneaky re-ordering\r\n\t\t$shopp_menu = &$submenu['shopp-orders'];\r\n\t\tforeach ($shopp_menu as $index => $menu) {\r\n\t\t\tif ($title == $menu[0]) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$item = $shopp_menu[$index];\r\n\t\tunset($shopp_menu[$index]);\r\n\t\tarray_push($shopp_menu, $item);\r\n\r\n\t}", "title": "" }, { "docid": "ba9be2e122364878cb70c74578fa1ae1", "score": "0.45164534", "text": "function up($table, $level_name = NULL, $level_val = NULL) {\n $q = \"select * from `\" . $table . \"` where `move`='\" . $this->move . \"'\";\n if (!empty($level_name)) {\n if (empty($level_val) AND $level_name == 'id_cat')\n $level_val = $this->GetIdCatByMove($this->move);\n $q = $q . \" AND `\" . $level_name . \"`='\" . $level_val . \"'\";\n }\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if (!$res)\n return false;\n $rows = $this->Right->db_GetNumRows();\n $row = $this->Right->db_FetchAssoc();\n $move_down = $row['move'];\n $id_down = $row['id'];\n\n\n $q = \"select * from `\" . $table . \"` where `move`<'\" . $this->move . \"'\";\n if (!empty($level_name))\n $q = $q . \" AND `\" . $level_name . \"`='\" . $level_val . \"'\";\n $q = $q . \" order by `move` desc\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n if (!$res)\n return false;\n $rows = $this->Right->db_GetNumRows();\n $row = $this->Right->db_FetchAssoc();\n $move_up = $row['move'];\n $id_up = $row['id'];\n\n //echo '<br> $move_down='.$move_down.' $id_down ='.$id_down.' $move_up ='.$move_up.' $id_up ='.$id_up;\n if ($move_down != 0 AND $move_up != 0) {\n $q = \"update `\" . $table . \"` set\n `move`='\" . $move_down . \"' where `id`='\" . $id_up . \"'\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n\n $q = \"update `\" . $table . \"` set\n `move`='\" . $move_up . \"' where `id`='\" . $id_down . \"'\";\n $res = $this->Right->Query($q, $this->user_id, $this->module);\n //echo '<br>q='.$q.' res='.$res.' $this->Right->result='.$this->Right->result;\n }\n }", "title": "" } ]
74bb3ffc7f1f3082ebf3f02f57e3c868
Setup the test environment.
[ { "docid": "d74ef9374341a4040df048f25c94cb90", "score": "0.0", "text": "public function setUp()\n {\n parent::setUp();\n \\DB::beginTransaction();\n $this->artisan('migrate', [\n '--realpath' => realpath(__DIR__ . '/migrations'),\n ]);\n\n\n }", "title": "" } ]
[ { "docid": "dbac6fb62938533294cc4ba1aee6817e", "score": "0.8312028", "text": "public function setUp() {\n\t\tEnvironment::init();\n\t}", "title": "" }, { "docid": "938f340b292dd9f97d38edcd4613c276", "score": "0.8165835", "text": "protected function setUp(): void\n {\n $this->env = new DotEnv();\n }", "title": "" }, { "docid": "73839decd8d8c33cd172a845e495290c", "score": "0.77643687", "text": "protected function setUp()\n {\n parent::setUp();\n $this->setupApplication();\n $this->localSetUp();\n }", "title": "" }, { "docid": "d7e1b4a02e9d030d4771f667467824d8", "score": "0.77380246", "text": "public function setUp()\n {\n parent::setUp();\n\n $configData = [\n 'applications' => [],\n 'dependencies' => [\n 'Global' => [\n Environment\\ServiceInterface::class => [\n 'class' => EmptyEnvironmentManager::class,\n ],\n Renderer\\Filter\\Tags\\Url::class => [\n 'arguments' => [\n Environment\\ServiceInterface::class\n ],\n 'shared' => true,\n ],\n ]\n ]\n ];\n\n $config = new Config($configData);\n $server = [\n 'HTTP_HOST' => 'unittest.dev',\n 'SERVER_NAME' => 'unittest.dev',\n 'REQUEST_URI' => '/',\n 'QUERY_STRING' => '',\n ];\n\n $this->environmentManager = new EmptyEnvironmentManager($config, [], [], $server, [], []);\n }", "title": "" }, { "docid": "3c002ffe9faf60702734e7b65380b259", "score": "0.77326804", "text": "public function setUp() {\n $this->application = new TestApplication();\n Framework::run($this->application, 'test', true, Framework::MODE_TEST);\n }", "title": "" }, { "docid": "791c6a808c144d380a18f8f4bd4f610a", "score": "0.7691914", "text": "public static function setUpBeforeClass():void {\n\n # Setup env\n Env::set([\n # App root for composer class\n \"crazyphp_root\" => getcwd(),\n \"phpunit_test\" => true,\n \"env_value\" => \"env_result\",\n \"config_location\" => \"@crazyphp_root/resources/Yml\"\n ]);\n\n }", "title": "" }, { "docid": "4cb3a6a40a6206875c4887e3081ea9c8", "score": "0.7607454", "text": "protected function setUp(): void\n {\n parent::setUp();\n $this->setUpDatabase($this->app);\n $this->setUpTempTestFiles();\n }", "title": "" }, { "docid": "4de02a9abcb51e8b255718f0d1b1f040", "score": "0.75917137", "text": "public function setup(): void\n {\n Bootstrap::setupEnvironment();\n\n $this->setupConnection();\n }", "title": "" }, { "docid": "e950588bbdacd650a3dc34edee999fd5", "score": "0.7586872", "text": "public function setUp()\n {\n \\DMK\\Mklib\\Utility\\Tests::storeExtConf('mklib');\n \\DMK\\Mklib\\Utility\\Tests::storeExtConf('mktest');\n }", "title": "" }, { "docid": "6cab2cd0b902bf191f9001bf8c70407a", "score": "0.7584058", "text": "protected function setUp()\n\t{\n\t\t$this->tempDir = __DIR__ . '/tmp/' . getmypid();\n\t\tTester\\Helpers::purge($this->tempDir);\n\n\t\t$configurator = new Configurator;\n\t\t$configurator->setDebugMode(false);\n\t\t$configurator->setTempDirectory($this->tempDir);\n\n\t\t$configurator->addConfig(__DIR__ . '/files/config.neon');\n\n\t\t$configurator->createRobotLoader()\n\t\t\t->addDirectory(__DIR__ . '/../src')\n\t\t\t->register();\n\n\t\t$this->appDir = $this->tempDir . '/app';\n\t\tmkdir($this->appDir);\n\t\t$configurator->addParameters(['appDir' => $this->appDir]);\n\n\t\t$this->container = $configurator->createContainer();\n\t}", "title": "" }, { "docid": "e2a23eb11a4f5fff044f67e1df096412", "score": "0.757356", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->params = ['environment' => Moneris::ENV_TESTING];\n }", "title": "" }, { "docid": "e8d14dcc0e6ad89b5a32f2e0edd20344", "score": "0.7566005", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }", "title": "" }, { "docid": "e8d14dcc0e6ad89b5a32f2e0edd20344", "score": "0.7566005", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }", "title": "" }, { "docid": "68fd60b0dbf60bb7eb3466ee39121d86", "score": "0.75232726", "text": "public function setUp() {\n $this->setUpSiteAuditTestEnvironment();\n }", "title": "" }, { "docid": "66ada93bd0875bb861083aca6cec8624", "score": "0.752298", "text": "protected function setUp()\n {\n if( !defined( 'PHPUNIT_RUN' ) ) {\n define( \"PHPUNIT_RUN\", \"phpunit_run\" );\n }\n\n $this->homeDir = realpath( dirname(__FILE__) ) ;\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n }", "title": "" }, { "docid": "52c8d7a80a7dc8c649cecc4de3e1f80f", "score": "0.75035405", "text": "protected function setUp() {\n\t\t// Be sure to do call the parent setup and teardown functions.\n\t\t// This makes sure that all the various cleanup and restorations\n\t\t// happen as they should (including the restoration for setMwGlobals).\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "dfcbe4f4a35fd9785c4246b4b92285a8", "score": "0.74887836", "text": "public function setUp(): void\n {\n parent::setUp();\n\n Browser::$baseUrl = $this->baseUrl();\n Browser::$storeScreenshotsAt = __DIR__.'/../resources/screenshots';\n Browser::$storeConsoleLogAt = __DIR__.'/../resources/console';\n Browser::$storeSourceAt = __DIR__.'/../resources/source';\n\n Browser::$userResolver = function () {\n return $this->user();\n };\n\n $this->migrate();\n\n $this->setUpTraits();\n }", "title": "" }, { "docid": "4d9c508bf1d143086cdab3182b311184", "score": "0.745816", "text": "public function setUp()\n\t{\n\t\t$_SERVER['test.orchestra.started'] = null;\n\t\t$_SERVER['test.orchestra.done'] = null;\n\n\t\t// before we can manually test Orchestra\\Core::start()\n\t\t// we need to shutdown Orchestra first.\n\t\t\\Orchestra\\Core::shutdown();\n\t}", "title": "" }, { "docid": "db36423407b378ac8eb55641657286c2", "score": "0.7449439", "text": "protected function setUp()\n {\n if( !defined('PHPUNIT_RUN')) {\n define( 'PHPUNIT_RUN', 1 );\n }\n $this->homeDir = realpath( dirname(__FILE__) ) ;\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n }", "title": "" }, { "docid": "db36423407b378ac8eb55641657286c2", "score": "0.7449439", "text": "protected function setUp()\n {\n if( !defined('PHPUNIT_RUN')) {\n define( 'PHPUNIT_RUN', 1 );\n }\n $this->homeDir = realpath( dirname(__FILE__) ) ;\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n }", "title": "" }, { "docid": "db36423407b378ac8eb55641657286c2", "score": "0.7449439", "text": "protected function setUp()\n {\n if( !defined('PHPUNIT_RUN')) {\n define( 'PHPUNIT_RUN', 1 );\n }\n $this->homeDir = realpath( dirname(__FILE__) ) ;\n if( !defined('HOME_DIR')) {\n define( 'HOME_DIR', $this->homeDir );\n }\n if( !defined('API_DIR')) {\n define( 'API_DIR' , HOME_DIR . '' );\n }\n if( !defined('APP_DIR')) {\n define( 'APP_DIR' , API_DIR . '/Stub' );\n }\n }", "title": "" }, { "docid": "8a68f85b02789009ab7d97bbf1f714e7", "score": "0.74364626", "text": "protected function setUp()\n {\n $this->markTestIncomplete();\n\n $factory = array(\n 'base' => $_SERVER['HTTP_HOST'],\n 'root' => $_ENV['BASEDIR'],\n 'start' => microtime(true)\n );\n $fo = new Factory($factory);\n $this->framework = new Framework($fo);\n }", "title": "" }, { "docid": "da7e99ea899fbea713f0c06adf45f440", "score": "0.74209434", "text": "protected function setUp(): void\n {\n Robo::createContainer();\n $container = Robo::getContainer();\n Robo::finalizeContainer($container);\n $this->setContainer($container);\n }", "title": "" }, { "docid": "ef738861e1eb313b669ff22dcdc58e79", "score": "0.7409736", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $this->app['config']->set('geoip', array_merge(require __DIR__ . '/../vendor/torann/geoip/config/geoip.php'));\n $this->app['router']->middleware(CaptureReferer::class)->get('/', function () {\n return response(null, 200);\n });\n $this->session = $this->app['session.store'];\n $this->referer = $this->app['referer'];\n\n $this->runTestMigrations();\n }", "title": "" }, { "docid": "197eb1265ab1d641ef679a4dd58f63a7", "score": "0.7400069", "text": "protected function setup()\r\n\t{\r\n\t\t// Create cleanup array\r\n\t\t$this->testBookIds = array();\r\n $driver = new \\Behat\\Mink\\Driver\\GoutteDriver();\r\n $this->session = new \\Behat\\Mink\\Session($driver);\r\n $this->session->start();\r\n\t}", "title": "" }, { "docid": "255b623cccda738afd27384ef17e1a89", "score": "0.7393024", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $this->checker = $this->app->make(TransChecker::class);\n }", "title": "" }, { "docid": "e1d7bdfce94dc6e116ee24f1c2050566", "score": "0.73891467", "text": "public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n }", "title": "" }, { "docid": "712c4fa5a7b1bbab1a50618523e26d9d", "score": "0.7370311", "text": "public function setUp() {\n\t\t$this->_env = Configure::read('env');\n\t\tConfigure::delete('env');\n\n\t\t$testAppPath = dirname(dirname(dirname(__FILE__))) . DS . 'test_app' . DS;\n\n\t\t$class = $this->getMockClass('Environment', array('getConfigDir'));\n\t\t$class::staticExpects($this->any())\n\t\t\t->method('getConfigDir')\n\t\t\t->will($this->returnValue($testAppPath . 'Config' . DS));\n\t\t$this->_class = $class;\n\t}", "title": "" }, { "docid": "0dd6c1eb816b697111b0d4efa6d2c9aa", "score": "0.7362025", "text": "public static function setUp()\n\t\t{\n\t\t}", "title": "" }, { "docid": "e9ffb259c9d7422c0ab7d5c52db73c47", "score": "0.73572767", "text": "public final function setUp() {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "59edcf2ea8bbbf427e741bd56d8e1d9c", "score": "0.73539454", "text": "protected function setUp()\n {\n $this->validToken = getenv(\"VALID_TOKEN\");\n $this->invalidToken = getenv(\"INVALID_TOKEN\");\n parent::setUp();\n }", "title": "" }, { "docid": "5455f44e2624ac332eef2fa21a19e5a0", "score": "0.73532826", "text": "public function setUp()\n {\n $this->app = RenaApp::getInstance();\n }", "title": "" }, { "docid": "7abb749efd8f2510d26fe380989e3db0", "score": "0.73482066", "text": "public function setUp() : void\n {\n $this->container->bindInstance(IExceptionHandler::class, $this->getExceptionHandler());\n $this->container->bindInstance(IExceptionRenderer::class, $this->getExceptionRenderer());\n $this->router = $this->container->resolve(Router::class);\n $this->kernel = $this->container->resolve(Kernel::class);\n $this->kernel->addMiddleware($this->getGlobalMiddleware());\n $this->defaultRequest = new Request([], [], [], [], [], []);\n $this->assertResponse = new ResponseAssertions();\n $this->assertView = new ViewAssertions();\n }", "title": "" }, { "docid": "ff9a17bbec501bb773b5043a250707de", "score": "0.7338704", "text": "public function setUp()\n {\n parent::setUp();\n // Set test name in globals\n $GLOBALS['PHPUNIT_TEST'] = $this->getName();\n // Set skip magma permission\n //$GLOBALS['MAGMA_SKIP_ACCESS'] = true;\n $models = [];\n $files = File::glob(app_path() .'/models/*.php');\n foreach ($files as $file) {\n $class = basename($file, '.php');\n // Reset event listeners and re-register them\n call_user_func(array($class, 'flushEventListeners'));\n call_user_func(array($class, 'boot'));\n }\n\n // Migrate the database\n Artisan::call('migrate');\n\n // Set the mailer to pretend\n Mail::pretend(true);\n }", "title": "" }, { "docid": "bb0fdaae2a9bad29b8f1dbd039eedd9c", "score": "0.7337338", "text": "public function setUp()\n {\n $this->api = new \\RescueGroups\\API();\n $this->api\n ->setSandboxMode(true);\n }", "title": "" }, { "docid": "6f40b7cb8890b470d7ec7b59b8411ef3", "score": "0.73228073", "text": "public function setUp() {\n $this->prepareForTests();\n }", "title": "" }, { "docid": "7a44fc2e4ef85216dd7fc98487c56989", "score": "0.73221236", "text": "public function setUp()\n\t{\n\t\t// $bs = new Zend_Application(\n\t\t// 'development',\n\t\t// APPLICATION_PATH . '/configs/config.xml'\n\t\t// );\n\t\t// $this->bootstrap = $bs;\n\t\t$this->bootstrap = new Zend_Application(\n\t\t APPLICATION_ENV,\n\t\t APPLICATION_PATH . '/configs/config.xml'\n\t\t);\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "66f615adce7b98d7c36228e83972ac00", "score": "0.73185843", "text": "public function setUp()\n {\n $this->setHost(getenv('PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_HOST'));\n $this->setPort((int) getenv('PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PORT'));\n $this->setBrowser(getenv('PHPUNIT_TESTSUITE_EXTENSION_SELENIUM2_BROWSER'));\n $this->setBrowserUrl(getenv('PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_TESTS_URL'));\n\n $this->prepareSession()->currentWindow()->size(array(\n 'width' => 2000,\n 'height' => 768,\n ));\n }", "title": "" }, { "docid": "c226ec4647ad141bc8b57c4ab944a867", "score": "0.73092896", "text": "protected function setUp()\n {\n $container = include 'config/container.php';\n InsideConstruct::setContainer($container);\n }", "title": "" }, { "docid": "afd3c90edb83db27e1681486cb2dac59", "score": "0.73047084", "text": "protected function doSetUp()\n {\n }", "title": "" }, { "docid": "b7ab160fb3463ca06508bbfef5084a00", "score": "0.730106", "text": "protected function setUp()\n {\n global $di;\n // Setup di\n $this->di = new DIFactoryConfig();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n\n // View helpers uses the global $di so it needs its value\n $di = $this->di;\n\n // Use a different cache dir for unit test\n $this->di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // Setup the class\n $this->class = new CurlModel();\n }", "title": "" }, { "docid": "e658286868d4d94cf4f30a67f595e378", "score": "0.7300868", "text": "protected function setUp()\n {\n parent::setUp();\n $this->setApplicationConfig(Bootstrap::getServiceManager()->get('ApplicationConfig'));\n }", "title": "" }, { "docid": "c6e84145545682a38388c393ec41547e", "score": "0.72780854", "text": "public final function setUp(): void {\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "18ef6af1d4c0f7f1c94d777928b975c5", "score": "0.7263892", "text": "public function setUp()\n {\n // The function \"public_path\" is in \"Illuminate/Foundation\" which is no standalone dependency.\n Container::getInstance()\n ->instance('path.public', __DIR__ . DIRECTORY_SEPARATOR . 'fixtures');\n\n $this->request = new Request();\n $this->builder = new Builder($this->request, $this->builderSettings);\n }", "title": "" }, { "docid": "10627d941753e8f01e3e86b3560813c6", "score": "0.72589093", "text": "protected function setUp()\n {\n parent::setUp();\n\n unset($GLOBALS['Sjorek\\\\RuntimeCapability\\\\Detection']);\n\n require_once str_replace(\n ['/Unit/', '.php'],\n ['/Fixtures/', 'Fixture.php'],\n __FILE__\n );\n\n $this->subject = (new ShellEscapeDetector())->setConfiguration(new ConfigurationTestFixture());\n }", "title": "" }, { "docid": "c524d130df720be4067cb95148d91e9d", "score": "0.7253759", "text": "protected function setUp(): void\n {\n $this->mathr = new Mathr();\n }", "title": "" }, { "docid": "d91154b66c6fb8867af52b0ea0fe5329", "score": "0.7253684", "text": "protected function setUp() {\n $this->auth_manager = Core::get('\\Foundry\\Core\\Auth\\Auth');\n $this->access_manager = Core::get('\\Foundry\\Core\\Access\\Access');\n\n $this->addAuthTestData();\n $this->addAccessTestData();\n }", "title": "" }, { "docid": "964a6d8699a83f7a946beb84bcb774dc", "score": "0.725217", "text": "protected function setUp(): void\n {\n $this->saveMultipleOperationsInterface = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->create(\n SaveMultipleOperationsInterface::class\n );\n $this->operationFactory = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->create(\n OperationInterfaceFactory::class\n );\n $this->bulkStatusManagement = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->create(\n BulkStatus::class\n );\n $this->bulkSummaryFactory = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->create(\n BulkSummaryInterfaceFactory::class\n );\n $this->entityManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager()->create(\n EntityManager::class\n );\n }", "title": "" }, { "docid": "6de0f1217bf5c63f8b4bd95c18e93da0", "score": "0.72471374", "text": "protected function setUp(): void\n {\n $this->game = new GameTwentyOne();\n }", "title": "" }, { "docid": "4c3fd5fe3b68d3f839e2a4dc4ecb57f9", "score": "0.7246328", "text": "protected function setUp()\n {\n parent::setUp();\n $this->application = new Application();\n }", "title": "" }, { "docid": "462b41f2688f39a9a40fdafa0bac2219", "score": "0.7242635", "text": "protected function setUp(): void\n {\n global $config;\n $config['imdbApiLanguage'] = 'en';\n }", "title": "" }, { "docid": "2762d68600be65543ac71db2966542c8", "score": "0.7241558", "text": "protected function setUp()\n {\n global $di;\n // Set di as global variable\n $this->di = new DIFactoryConfig();\n $di = $this->di;\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n\n // Use different cache dir for unit test\n $di->get('cache')->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n \n $di->setShared(\"weather\", \"\\Anax\\Weather\\WeatherModelMock\");\n\n // Setup controllerclass\n $this->controller = new WeatherAPIController();\n $this->controller->setDI($this->di);\n }", "title": "" }, { "docid": "385747f3b55665376d0307e581f66c89", "score": "0.723921", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->loader = new ArrayLoader();\n $twitalLoader = new TwitalLoader($this->loader, null, false);\n $twitalLoader->addSourceAdapter(\"/.*/\", new XMLAdapter());\n\n $this->twig = new Environment($twitalLoader);\n }", "title": "" }, { "docid": "9f3efbd2e9dc6d429db6d451a191a2a6", "score": "0.7239092", "text": "private function setup(){\n if(!$this->inSuite){\n echo \"Starting test\\n\";\n }\n }", "title": "" }, { "docid": "c719fb5cce7ba5c79f599daedd17293a", "score": "0.7235431", "text": "public function setUp()\n {\n $root = __DIR__ . '/Fixture';\n\n $config = new Configuration;\n\n $this->clear($root . '/Symfony/cache');\n\n $this->clear($root . '/Symfony/logs');\n\n $config->set('symfony.kernel.secret', 'secret');\n\n $config->set('symfony.kernel.debug', true);\n\n $config->set('symfony.kernel.root_dir', $root . '/Symfony');\n\n $config->set('symfony.kernel.environment', 'dev');\n\n $config->set('symfony.kernel.project_dir', $root);\n\n $this->container = new Container;\n\n $this->container->set(BridgeProvider::CONFIG, $config);\n }", "title": "" }, { "docid": "416e28b2768c33dbf86508586fae04e6", "score": "0.72237074", "text": "public function setUp()\n {\n parent::setUp();\n $this->VAULT_ADDR = getenv('VAULT_ADDR');\n $this->VAULT_TOKEN = getenv('VAULT_TOKEN');\n $this->VAULT_ROOT_TOKEN = getenv('VAULT_ROOT_TOKEN');\n }", "title": "" }, { "docid": "72128e73a82d65915687ce9ac6752048", "score": "0.7217376", "text": "protected function setUp(): void\n {\n $this->setupTestDatabase();\n }", "title": "" }, { "docid": "e897c7589e06589c859c61a9d55f63d0", "score": "0.72115815", "text": "protected function setUp()\n {\n global $di;\n // Set di as global variable\n $this->di = new DIFactoryConfig();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n $di = $this->di;\n // Use a different cache dir for unit test\n $this->di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n // Get the model from di and set the url for the mock api.\n $this->weather = $di->get(\"weather\");\n\n // Setup controllerclass\n $this->controller = new WeatherApi();\n $this->controller->setDI($this->di);\n }", "title": "" }, { "docid": "b95d33fab931fe25bc1d59d635558d3d", "score": "0.7207784", "text": "protected function setUp()\n {\n global $di;\n\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/test/config/di\");\n\n // Use a different cache dir for unit test\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache/anax\");\n\n // Set DI\n $this->di = $di;\n }", "title": "" }, { "docid": "319f9eb2b60599b73c5a30fa346b48ae", "score": "0.7206732", "text": "protected function setUp()\n\t{\n\t\t/* currently null */\n\t}", "title": "" }, { "docid": "750b5d8f32912874e8d2c5f6adf626d5", "score": "0.72065914", "text": "protected function setUp ()\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV,\n APPLICATION_PATH . '/configs/application.ini'\n );\n\t\t//$this->bootstrap->bootstrap();\n \tparent::setUp();\n }", "title": "" }, { "docid": "35cd8e5d651c3d589960bfbfd097ad88", "score": "0.72040766", "text": "public function setup()\n\t{\n\t\tparent::setup();\n\n\t\tif (getenv(\"TRAVIS\"))\n\t\t{\n\t\t\t$appName = getenv(\"KINVEY_APP_NAME\");\n\t\t\t$appKey = getenv(\"KINVEY_APP_KEY\");\n\t\t\t$appSecret = getenv(\"KINVEY_APP_SECRET\");\n\t\t\t$masterSecret = getenv(\"KINVEY_MASTER_SECRET\");\n\t\t\t$testMail = getenv(\"TEST_MAIL\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\textract(include __DIR__.'/TestConfig.php');\n\t\t}\n\n\t\t// Kinvey client configuration.\n\t\t$this->app['config']->set('kinvey::appName', $appName);\n\t\t$this->app['config']->set('kinvey::appKey', $appKey);\n\t\t$this->app['config']->set('kinvey::appSecret', $appSecret);\n\t\t$this->app['config']->set('kinvey::masterSecret', $masterSecret);\n\n\t\t// Test mail account.\n\t\t$this->app['config']->set('kinvey::testMail', $testMail);\n\n\t\t// Eloquent user model.\n\t\t$authConfig = $this->app['config']['auth'];\n\t\t$authConfig['model'] = 'GovTribe\\LaravelKinvey\\Database\\Eloquent\\User';\n\t\t$this->app['config']->set('auth', $authConfig);\n\n\t\t// Default database\n\t\t$this->app['config']->set('database.connections.kinvey', array('driver' => 'kinvey'));\n\t\t$this->app['config']->set('database.default', 'kinvey');\n\n\t\t// Set the auth mode to admin.\n\t\tKinvey::setAuthMode('admin');\n\t}", "title": "" }, { "docid": "033cb750c69c1f41e6bf3b3a0c1848a1", "score": "0.7203199", "text": "protected function setUp(): void\n {\n $this->container = new Container();\n $this->appBuilder = new ConsoleApplicationBuilder($this->container);\n }", "title": "" }, { "docid": "9884c2e0449a62bc63dc611bb2bcb181", "score": "0.72001636", "text": "function setUp()\n {\n return;\n }", "title": "" }, { "docid": "964180e75914b13108676db077224c93", "score": "0.7200074", "text": "protected function setUp(): void {\n }", "title": "" }, { "docid": "964180e75914b13108676db077224c93", "score": "0.7200074", "text": "protected function setUp(): void {\n }", "title": "" }, { "docid": "1db3caaa49cc6b73a2180db5ccde4ed4", "score": "0.7199473", "text": "protected function setUp(): void\n {\n new AllSniffs();\n\n $GLOBALS['PHP_CODESNIFFER_RULESET'] = new Ruleset(new Config());\n $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][get_class($this)] = __DIR__ . '/../../../src/Hostnet';\n $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][get_class($this)] = __DIR__ . '/';\n $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'] = [];\n $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'] = [];\n\n parent::setUp();\n }", "title": "" }, { "docid": "6e84dd5ff2ffcaba86e5d608bd3e7dba", "score": "0.7198014", "text": "protected function setUp() {\n $this->injector = (new SpotBuilder(__DIR__))\n ->buildDev()\n ->get()\n ->createInjector(__NAMESPACE__ . '\\UnitTestModule');\n }", "title": "" }, { "docid": "dde988c3cc53e12f1ba321a98d072c72", "score": "0.7195986", "text": "public static function setUpBeforeClass()\n {\n $dotenv = new Dotenv();\n $dotenv->load(__DIR__ . '/../../.env.testing');\n\n // Create database connection\n $dsn = 'mysql:host=' . $_ENV['DB_HOST'] . ';';\n $user = $_ENV['DB_ROOT_USER'];\n $pass = $_ENV['DB_ROOT_PASS'];\n self::$pdo = new \\PDO($dsn, $user, $pass);\n self::$pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n self::$pdo->setAttribute(\\PDO::ATTR_DEFAULT_FETCH_MODE, \\PDO::FETCH_ASSOC);\n self::$pdo->exec(\n \"CREATE DATABASE IF NOT EXISTS `\".$_ENV['DB_NAME'].\"`\"\n );\n self::$pdo->exec(\n \"GRANT ALL PRIVILEGES ON \".$_ENV['DB_NAME'].\".* TO '\".$_ENV['DB_USER'].\"'@'%'\"\n );\n\n // Execute Phinx migrations and seeding\n exec('vendor/bin/phinx migrate -e testing');\n exec('vendor/bin/phinx seed:run -e testing');\n }", "title": "" }, { "docid": "e2542a65fd748a6b2ddd942869c93b40", "score": "0.7194197", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t// Create an artisan object for calling migrations\n\t\t$artisan = $this->app->make('artisan');\n\n\t\t// Call migrations specific to our tests, e.g. to seed the db\n\t\t$artisan->call('migrate', array(\n\t\t\t'--database' => 'testbench',\n\t\t\t'--path' => '../tests/database/migrations',\n\t\t));\n\n\t\t// Call migrations for the package\n\t\t$artisan->call('migrate', array(\n\t\t\t'--database' => 'testbench',\n\t\t\t'--path' => '../src/migrations',\n\t\t));\n\n\n\t}", "title": "" }, { "docid": "9ff0a65a2056e025b217369a7a594e0e", "score": "0.7185234", "text": "protected function setUp()\n {\n CliWriter::echoInfo(\"Loading \" . __FILE__);\n $this->__init();\n $this->__createMySqlPdo();\n $this->__createMySqlDatabase();\n $this->__createDatabaseInterface();\n $this->__di->setDbHandler($this->__mySqlPdo);\n }", "title": "" }, { "docid": "89e396e5929df7187f42f5a1c38221ab", "score": "0.7175672", "text": "public function setUp()\n {\n // We need packages in order to get the asset method of Twig by Symfony\n $fooPackage = new Package(new EmptyVersionStrategy());\n $packages = new Packages($fooPackage);\n\n $loader = new StubFilesystemLoader(array(\n __DIR__.'/../../Resources/views',\n ));\n\n // Create Twig Environment and add AssetExtension\n $this->twig = new \\Twig_Environment($loader, array('strict_variables' => true, 'debug' => true));\n $this->twig->addExtension(new AssetExtension($packages));\n\n $this->extension = new RrbTwigUtilsExtension();\n }", "title": "" }, { "docid": "2e7f93d6d070e561bfb58839780b41f1", "score": "0.717403", "text": "protected function setUp(): void\n {\n $this->container = new Container();\n }", "title": "" }, { "docid": "d74b08eb9c89d419c47a0c199fb4a8f3", "score": "0.71724755", "text": "protected function setUp() {\n \t}", "title": "" }, { "docid": "555e4f685bed57f6c919c3386da91f01", "score": "0.71711916", "text": "protected function setUp()\n {\n require_once('vendor/autoload.php');\n\n $dotenv = new Dotenv\\Dotenv(__DIR__);\n $dotenv->load();\n $username = getenv('DATACITE_USERNAME');\n $password = getenv('DATACITE_PASSWORD');\n\n $this->client = new MinhD\\DataCiteClient($username, $password);\n $this->client->setDataciteUrl(getenv('DATACITE_URL'));\n }", "title": "" }, { "docid": "0a4086eeb1555f4843dba2903c7bc9db", "score": "0.7170889", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this->runner = new PhpScriptRunner();\n\t}", "title": "" }, { "docid": "34c7ddeba8dd41f6828ea06049ad0cf9", "score": "0.7166419", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->app->register(JsonApiPaginateServiceProvider::class);\n $this->app->register(QueryBuilderServiceProvider::class);\n $this->app->register(JsonApiAssertServiceProvider::class);\n\n config(['app.debug' => true]);\n }", "title": "" }, { "docid": "b6edcc45659c4f246c22e2cd471c7cd2", "score": "0.7156348", "text": "protected function setUp()\n {\n $this->initVfs();\n parent::setUp();\n }", "title": "" }, { "docid": "155a80fc5e6634afded7981220cf3ec8", "score": "0.71553046", "text": "protected function setUp()\n {\n parent::setUp();\n \n $this->rendererCli = new RendererCli();\n }", "title": "" }, { "docid": "99c8b21d7c859c26fa5ece577e7d0c61", "score": "0.71542984", "text": "protected function setUp() {\n\t\tif (FALSE === defined('TYPO3_version')) {\n\t\t\tdefine('PATH_thisScript', realpath('vendor/typo3/cms/typo3/index.php'));\n\t\t\tBootstrap::getInstance()->baseSetup('typo3/')->initializeClassLoader()\n\t\t\t\t->unregisterClassLoader();\n\t\t\t$GLOBALS['EXEC_TIME'] = time();\n\t\t}\n\t\tparent::setUp();\n\t}", "title": "" }, { "docid": "870b4265eef2bd4db315018f6bd5ab11", "score": "0.7152505", "text": "public function setUp()\n {\n parent::setUp();\n $this->modelManager = $this->container->get('fitch.manager.tutor_language');\n $this->tutorManager = $this->container->get('fitch.manager.tutor');\n $this->languageManager = $this->container->get('fitch.manager.language');\n }", "title": "" }, { "docid": "3d11d1611e21b7a0a0a54a0fa3ce8373", "score": "0.71492124", "text": "protected function setUp() {\n\n \t$this->ENV_SKIP_APP_PATH = getenv('SKIP_APP_PATH');\n \tputenv('SKIP_APP_PATH');\n \t$this->SKIP_USER = getenv('SKIP_USER');\n \tputenv('SKIP_USER');\n \t$this->SKIP_ENV = getenv('SKIP_ENV');\n \tputenv('SKIP_ENV');\n }", "title": "" }, { "docid": "e1c6080ecee0a8366765accff0ada66f", "score": "0.71482503", "text": "protected function setUp()\n {\n global $backyardConf;\n error_reporting(E_ALL); // incl E_NOTICE\n Debugger::enable(Debugger::DEVELOPMENT, __DIR__ . '/../log');\n $backyard = new Backyard($backyardConf);\n if (!defined('DB_HOST')) {\n // if set-up of constants didn't happen in the first test according to alphabet\n new \\WorkOfStan\\MyCMS\\InitDatabase('testing', __DIR__ . '/../');\n }\n $mycmsOptions = [\n // constants are defined by `new InitDatabase` in the alphabetically first test\n 'dbms' => new LogMysqli(\n DB_HOST . ':' . DB_PORT,\n DB_USERNAME,\n DB_PASSWORD,\n DB_DATABASE,\n $backyard->BackyardError\n ),\n 'logger' => $backyard->BackyardError,\n 'prefixL10n' => __DIR__ . '/../conf/l10n/language-',\n 'templateAssignementParametricRules' => [],\n 'TRANSLATIONS' => [\n 'en' => 'English',\n 'zh' => '中文',\n ],\n ];\n $this->myCms = new MyCMSProject($mycmsOptions);\n\n // set language in $_SESSION and $this->get as one of the TRANSLATIONS array above\n // this settings is equivalent to going to another language homepage from the DEFAULT_LANGUAGE homepage\n $this->get = ['language' => 'en'];\n $_SESSION = ['language' => 'en']; // because $_SESSION is not defined in the PHPUnit mode\n $this->language = $_SESSION['language'] = $this->myCms->getSessionLanguage($this->get, $_SESSION, false);\n\n //according to what you test, change $this->myCms->context before invoking\n //$this->object = new Controller; within Test methods\n }", "title": "" }, { "docid": "8dc4c697e39b8cfb3ba0623c7af8d260", "score": "0.71470183", "text": "protected function setUp(): void\n {\n parent::setUp();\n static::bootKernel();\n }", "title": "" }, { "docid": "59f1d660e90b2f06ad3e7e86936ffb79", "score": "0.71419007", "text": "protected function setUp(): void\n {\n $this->container = new Container;\n }", "title": "" }, { "docid": "bf5ca76ca38cd89257d143cce630d21c", "score": "0.71409166", "text": "public function setUp()\n {\n $this->initDeapsulatedObjectReflection();\n $this->initDecapsulatedObject();\n $this->initDecapsulatorReflection();\n $this->initDecapsulator();\n $this->setUpDecapsulator();\n }", "title": "" }, { "docid": "80e4676bdac50b3b2ac2888775a78c06", "score": "0.71355325", "text": "protected function setUp()\n {\n $this->testConstruct();\n }", "title": "" }, { "docid": "d7607d79402c90fac1405c9db231622e", "score": "0.71318746", "text": "protected function setUp() {\n\n // define the SERVER var - emulating web request\n $docRoot = file_exists('/xampp/htdocs') ? '/xampp/htdocs' : (\n file_exists('/gri/xampp/htdocs') ? '/gri/xampp/htdocs' : 'c:\\\\'\n );\n $_SERVER = array(\n 'REQUEST_URI' => '/gritm',\n 'DOCUMENT_ROOT' => $docRoot,\n 'REQUEST_METHOD' => 'GET',\n );\n $this->object = new Application;\n }", "title": "" }, { "docid": "3ccd5d8dd56d7a67519ba47b684aa92c", "score": "0.71273816", "text": "public function setUp() {\n\t\t$_SERVER['argv'] = array();\n\n\t\t$this->testClassName = uniqid('testClassName');\n\t\teval('class ' . self::ClassPrefix . $this->testClassName . self::ClassSuffix . ' {}');\n\n\t\t$this->dispatch = new tx_t3deploy_dispatch();\n\t}", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.71257454", "text": "protected function setUp()\n {}", "title": "" }, { "docid": "8be291e0e87f1dc4a1160ff47dcdc9db", "score": "0.71252835", "text": "protected function setUp(): void\n {\n // Init service container $di to contain $app as a service\n\n $this->di = new DIMagic();\n $this->di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n $this->di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n // $app = $this->$di;\n // $this->$di->set(\"app\", $app);\n \n // Create and initiate the controller\n $this->controller = new PostController();\n $this->controller->setDI($this->di);\n $this->di->session->set(\"username\", \"admin\");\n $this->di->session->set(\"email\", \"[email protected]\");\n }", "title": "" }, { "docid": "aaff4b865e518423700a587b8b5053f1", "score": "0.71192604", "text": "protected function setUp() {\n $this->setUpProfileUBS();\n $this->setUpUBSEvaluate();\n }", "title": "" }, { "docid": "24e32ed10bc2000e4147df808e2eeb5d", "score": "0.7118726", "text": "public function setUp() {\n\t\tparent::setUp();\n\n\t\tif (!isset($this->helper)) {\n\t\t\t$this->helper = new TestHelper();\n\t\t}\n\t}", "title": "" }, { "docid": "1648943803ccf40347a961a7c7608d18", "score": "0.71158993", "text": "protected function setUp()\n {\n $this->calculator = new WorkdayCalculator();\n $this->calculator->setState(States::NATIONAL);\n }", "title": "" }, { "docid": "45e28b25f18fe127c89009504f741c76", "score": "0.71094483", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n // Load migrations for tests\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n // Load factories for tests\n $this->withFactories(__DIR__ . '/../database/factories');\n\n // Migrate and seed\n $this->artisan('migrate', ['--database' => 'testing', '--seed' => true]);\n }", "title": "" }, { "docid": "b37be5b29d31b9f0c50e97812d04a329", "score": "0.7105631", "text": "protected function setUp ()\r\n\t{\r\n\t\tparent::setUp();\r\n\r\n\t\t// Загруженные расширения\r\n\t\t$this->ext = get_loaded_extensions();\r\n\t}", "title": "" }, { "docid": "fa8e590770e2f6c4c94ded3a035bfe91", "score": "0.70998794", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->container = new Container();\n\n $this->start();\n }", "title": "" }, { "docid": "29d0f70e4215f21fd345759dc6cf0356", "score": "0.7095659", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n // $this->artisan('jantung:install');\n }", "title": "" }, { "docid": "3b9cada217bafdef00f49e9baf1d8b1a", "score": "0.70946586", "text": "public function setUp()\n {\n $this->path = __DIR__ . '/Application';\n\n $this->createCommand = $this->buildCommand('Rougin\\Refinery\\Commands\\CreateMigrationCommand');\n $this->migrateCommand = $this->buildCommand('Rougin\\Refinery\\Commands\\MigrateCommand');\n $this->resetCommand = $this->buildCommand('Rougin\\Refinery\\Commands\\ResetCommand');\n $this->rollbackCommand = $this->buildCommand('Rougin\\Refinery\\Commands\\RollbackCommand');\n\n \\Rougin\\Refinery\\Refinery::boot();\n }", "title": "" }, { "docid": "c57db3b037d4d57af7e1c44f6279f29c", "score": "0.7091304", "text": "protected function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->saveFactoryState();\n\n\t\tJFactory::$application = $this->getMockCmsApp();\n\n\t\t$this->backupServer = $_SERVER;\n\n\t\t$_SERVER['HTTP_HOST'] = 'example.com';\n\t\t$_SERVER['SCRIPT_NAME'] = '';\n\t}", "title": "" }, { "docid": "b9d26eda99712af4322784bda45f82da", "score": "0.70912313", "text": "protected function setUp(): void {\n $this->object = \\Ease\\Shared::instanced();\n }", "title": "" } ]
7416154652228a6cc07677d927e2b53d
/ Property Name: METHOD creates formatted output for calendar property method
[ { "docid": "9341f3e7388a8448095c449581c4b0eb", "score": "0.52717835", "text": "function createMethod() {\n if (empty($this->method))\n return FALSE;\n switch ($this->format) {\n case 'xcal':\n return $this->nl . ' method=\"' . $this->method . '\"';\n break;\n default:\n return 'METHOD:' . $this->method . $this->nl;\n break;\n }\n }", "title": "" } ]
[ { "docid": "6617bdf28dde16d49c5b2b06f9c7b74b", "score": "0.63907677", "text": "public static function _desc() { return 'Calendar generator and formatter'; }", "title": "" }, { "docid": "02e4fa55a06bcb25db91cc935c467634", "score": "0.6218139", "text": "public function formatCal ($format,$calendar) {}", "title": "" }, { "docid": "54eb77e9d0a0b5fbf518d523f3892d1a", "score": "0.5930233", "text": "public function formatPropertyValue($value, string $property);", "title": "" }, { "docid": "a58807d0a3c7bec431420cb0b2b764e3", "score": "0.5866902", "text": "public function __toString()\n\t{\n\t\treturn $this->format();\n\t}", "title": "" }, { "docid": "722c269dd52773bebf3847760064d14c", "score": "0.5848929", "text": "public function __toString()\n {\n return $this->format();\n }", "title": "" }, { "docid": "f1f1a1faa03f61b64c1bb443b981c8ed", "score": "0.584302", "text": "public function __toString()\n {\n return (string) parent::format(self::$format);\n }", "title": "" }, { "docid": "e9e3f3205513effcc451f605212d6b74", "score": "0.5803409", "text": "public function __toString()\n\t{\n\t\treturn (string) parent::format(self::$format);\n\t}", "title": "" }, { "docid": "5c905d46357a7cf5826d914a9049742b", "score": "0.5781932", "text": "public function __toString()\n {\n return sprintf('%s -> %s', $this->getTarjeta(), $this->getFecha()->format('d/m/Y H:i'));\n }", "title": "" }, { "docid": "f0a90abe87771bf0267ec645b69e9363", "score": "0.574024", "text": "function createXprop() {\n if (empty($this->xprop) || !is_array($this->xprop))\n return FALSE;\n $output = null;\n $toolbox = new CalendarComponent();\n $toolbox->setConfig($this->getConfig());\n foreach ($this->xprop as $label => $xpropPart) {\n if (!isset($xpropPart['value']) || ( empty($xpropPart['value']) && !is_numeric($xpropPart['value']))) {\n $output .= $toolbox->_createElement($label);\n continue;\n }\n $attributes = $toolbox->_createParams($xpropPart['params'], array('LANGUAGE'));\n if (is_array($xpropPart['value'])) {\n foreach ($xpropPart['value'] as $pix => $theXpart)\n $xpropPart['value'][$pix] = ICalUtilityFunctions::_strrep($theXpart, $this->format, $this->nl);\n $xpropPart['value'] = implode(',', $xpropPart['value']);\n }\n else\n $xpropPart['value'] = ICalUtilityFunctions::_strrep($xpropPart['value'], $this->format, $this->nl);\n $output .= $toolbox->_createElement($label, $attributes, $xpropPart['value']);\n if (is_array($toolbox->xcaldecl) && ( 0 < count($toolbox->xcaldecl))) {\n foreach ($toolbox->xcaldecl as $localxcaldecl)\n $this->xcaldecl[] = $localxcaldecl;\n }\n }\n return $output;\n }", "title": "" }, { "docid": "9371183e3e877614e869a2a0a64ab1ed", "score": "0.5739843", "text": "public function __toString() {\n return self::formatYear($this->year) . self::sep . str_pad($this->month, 2, '0', STR_PAD_LEFT) .\n self::sep . str_pad($this->day, 2, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "d9f84e25cd863ca855dd773a06ecd45b", "score": "0.5733182", "text": "public function __toString(): string\n {\n return [\n 1 => 'January',\n 2 => 'February',\n 3 => 'March',\n 4 => 'April',\n 5 => 'May',\n 6 => 'June',\n 7 => 'July',\n 8 => 'August',\n 9 => 'September',\n 10 => 'October',\n 11 => 'November',\n 12 => 'December',\n ][$this->month];\n }", "title": "" }, { "docid": "afa666418305f761adf8e5e67d7b48e3", "score": "0.5705191", "text": "public function __toString()\r\n {\r\n return $this->formatAsString();\r\n }", "title": "" }, { "docid": "2f869e091c66ae6b4b75b9bd3bebed9f", "score": "0.5684132", "text": "public function __toString()\n\t{\n\t\treturn $this->format('c');\n\t}", "title": "" }, { "docid": "cca6f3058a0401c338c4c85edbd82e4f", "score": "0.5680494", "text": "public function format() {\n\n\t\t$this->f_cooldown\t= $this->cooldown . ' ' . _('minutes');\n\t\t$this->f_primary\t= $this->primary ? _('Primary') : '';\n\n\t\tswitch ($this->level) {\n\t\t\tcase '5':\n\t\t\t\t$this->f_level = _('Guest');\n\t\t\tbreak;\n\t\t\tcase '25':\n\t\t\t\t$this->f_level = _('User');\n\t\t\tbreak;\n\t\t\tcase '50':\n\t\t\t\t$this->f_level = _('Content Manager');\n\t\t\tbreak;\n\t\t\tcase '75':\n\t\t\t\t$this->f_level = _('Catalog Manager');\n\t\t\tbreak;\n\t\t\tcase '100':\n\t\t\t\t$this->f_level = _('Admin');\n\t\t\tbreak;\n\t\t}\n\n\t}", "title": "" }, { "docid": "2cf8bd5db581e93ae3f2cb9fac383aed", "score": "0.5675429", "text": "public function __toString()\n\t{\n\t return $this->_format;\n\t}", "title": "" }, { "docid": "f7a50505d95ec9a9dddb85dc98d560c2", "score": "0.567189", "text": "public function __toString(): string\n {\n return \\sprintf('%s %s', $this->getDate(), $this->getTime());\n }", "title": "" }, { "docid": "60ff0310dc4ce6ada279954046371115", "score": "0.5658567", "text": "public function __toString(): string {\n\t\treturn $this->format();\n\t}", "title": "" }, { "docid": "99c783677ee7cb165d2f364c69afdc2c", "score": "0.56421465", "text": "public function getDate(){\n // echo ;\n\t \n if(is_numeric($this->getModel()->getDefaultDatePropertyId()) && $value = $this->getPropertyValueByNumericKey($this->getModel()->getDefaultDatePropertyId(), true)){\n // if($propertyid = $this->getModel()->getDefaultDatePropertyId() && $value = $this->getPropertyValueByNumericKey($this->getModel()->getDefaultDatePropertyId(), true)){\n\t $propertyid = $this->getModel()->getDefaultDatePropertyId();\n // echo $propertyid.' ';\n $value = $this->getPropertyValueByNumericKey($propertyid, true);\n // print_r($value);\n return $value;\n \n\t }elseif(isset($this->_varnames_lookup['date_published'])){\n \n $v = $this->getPropertyValueByNumericKey($this->_varnames_lookup['date_published'], $this->getDraftMode(), true);\n \n if($v instanceof SmartestDateTime){\n return $v->getUnixFormat();\n }else{\n \t if($this->getDraftMode()){\n return $this->getItem()->getCreated();\n }else{\n return $this->getItem()->getLastPublished();\n }\n }\n \n }else{\n \t if($this->getDraftMode()){\n return $this->getItem()->getCreated();\n }else{\n return $this->getItem()->getLastPublished();\n }\n }\n \n\t}", "title": "" }, { "docid": "fd1306093726086ef94cb2c413764fe6", "score": "0.56370777", "text": "function propertyFormat($p, $v) {\r\n\t\t//Util::prt($p, $v);\r\n if (array_key_exists($p, $this->propertiesConfig)){\r\n\t\t\t$formatacao \t\t= $this->propertyGetValidacao($p);\r\n\t\t\t//Util::prt($p, \"existe configuracao definida para esta propriedade\");\r\n\t\t\tif(strlen($v) && strlen($formatacao)){\r\n\t\t\t\t//Util::prt($p, \"não é vazio e possui um tipo de validacao\");\r\n//\t\t\t\tUtil::prt($p,$v);\r\n\t\t\t\teval(\"\\$v = Formatacao::format\".$formatacao.\"(\\$v);\");\r\n//\t\t\t\tUtil::prt($p,$v);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->set($p,'\"'.addslashes($v).'\"');\r\n\t\t//exit;\r\n }", "title": "" }, { "docid": "83d2ef469822db3291299a0b1e7d2c52", "score": "0.56220967", "text": "public function format() { \n\n\t\t$this->f_cooldown\t= $this->cooldown . ' ' . _('minutes'); \n\t\t$this->f_primary\t= $this->primary ? _('Primary') : ''; \n\n\t\tswitch ($this->level) { \n\t\t\tcase '5': \n\t\t\t\t$this->f_level = _('Guest'); \n\t\t\tbreak; \n\t\t\tcase '25': \n\t\t\t\t$this->f_level = _('User'); \n\t\t\tbreak; \n\t\t\tcase '50': \n\t\t\t\t$this->f_level = _('Content Manager'); \n\t\t\tbreak; \n\t\t\tcase '75': \n\t\t\t\t$this->f_level = _('Catalog Manager'); \n\t\t\tbreak; \n\t\t\tcase '100': \n\t\t\t\t$this->f_level = _('Admin'); \n\t\t\tbreak; \n\t\t} \n\n\t}", "title": "" }, { "docid": "c1a66463a8a9491271a2765759c469ac", "score": "0.56181103", "text": "function cal_info($calendar) {}", "title": "" }, { "docid": "f68b637f9e94ddac20f5d44eb7a27bbc", "score": "0.5599544", "text": "public function __toString()\n {\n return $this->delivery . $this->sheet . $this->years . $this->id;\n }", "title": "" }, { "docid": "8900126ab9720fb22a559085d964e66b", "score": "0.5562971", "text": "public function __toString(){\n return isset($this->xformatted) ? $this->xformatted : $this->formatted;\n }", "title": "" }, { "docid": "1c5b41e1a76994b36ce57739776c2b2a", "score": "0.55368227", "text": "public function format()\n {\n return parent::format();\n }", "title": "" }, { "docid": "90f1918c0ab0446db24cb9c133c157ac", "score": "0.55343944", "text": "public function __toString(): string\n {\n return $this->format();\n }", "title": "" }, { "docid": "896a768e7f37d56d1cad72018775f01e", "score": "0.54795015", "text": "function get_cal_date_format()\n {\n return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_date_format());\n }", "title": "" }, { "docid": "6f53b2a30c63a9a09ea4a0d3e65caae0", "score": "0.54766876", "text": "public function __toString()\n {\n return \"Delivery [date_\". $this->reservationDate . \"]\";\n }", "title": "" }, { "docid": "fee17edfb57d6153e3b14cfcee97ebe4", "score": "0.54736197", "text": "public function __toString()\n {\n return $this->declaredDate->format('d-m-Y');\n }", "title": "" }, { "docid": "0cc3b5e385f03d612f556ae8b10077cd", "score": "0.5472585", "text": "public function __toString(): string\n {\n return ($this->getEnded()->isEnded())\n ? $this->getBeginDate() . ' – ' . $this->getEndDate()\n : $this->getBeginDate();\n }", "title": "" }, { "docid": "0ac8bb7dfde838bfb60e4f7bb78dbb9b", "score": "0.5470211", "text": "public function __toString()\n {\n return self::getStringRepresentationOf($this, array('dateTime' => $this->format('Y-m-d H:i:sO')));\n }", "title": "" }, { "docid": "d3f97777534ae2c857cc57081b064d38", "score": "0.5445159", "text": "public function format($event)\n {\n \t$str = \"\\n<br> \";\n \t$str .= \"Called: {$event['class_name']}.{$event['method_name']} (took {$event['execution_time']}ms) \\n<br>\";\n \t$str .= \"Parameters: \";\n \t$parameterNamesAndDefault = unserialize($event['parameter_names_default_values']);\n \t$parameterValues = unserialize($event['parameter_values']);\n\n \t$i = 0;\n \tforeach($parameterNamesAndDefault as $pName => $pDefault)\n \t{\n \t\tif(isset($parameterValues[$i]))\n \t\t{\n\t \t\t$currentValue = $parameterValues[$i];\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$currentValue = $pDefault;\n \t\t}\n\n \t\t$currentValue = $this->formatValue($currentValue);\n \t\t$str .= \"$pName = $currentValue, \";\n\n \t\t$i++;\n \t}\n \t$str .= \"\\n<br> \";\n\n \t$str .= \"Returned: \".$this->formatValue($event['returned_value']);\n \t$str .= \"\\n<br> \";\n \treturn $str;\n }", "title": "" }, { "docid": "e96533c18e3adeebac5d17f462b7d0d5", "score": "0.5437401", "text": "public function __toString()\n {\n return 'Appointment(' . $this->id . ')';\n }", "title": "" }, { "docid": "cfcc97b12c5a0bbe0801839818c4cdc7", "score": "0.5432018", "text": "public function toString() \n { \n \n $attr = ($this->getAttributes());\n \n /**\n * @var AbstractPropertySymbol $property \n*/\n $property = null;\n if (isset($attr['pma:name'])) {\n $property = $this->getPropertyResolver()->getPropertyByReference($attr['pma:name']);\n }\n if ($property === null) {\n return '';\n }\n if (!($property instanceof ListProperty) ) {\n /*if ( $this->config()->throwOnError() ) {\n\t\t\t\techo '<pre>property: '.htmlentities(print_r( $property->getType(), true )).'</pre>'; flush();\n\t\t\t\techo '<pre>property: '.htmlentities(print_r( $property->get('items'), true )).'</pre>'; flush();\n \t\t\tthrow new RendererException(\"invalid property to use as list '\".$attr['pma:name'].\"'\");\n \t\t}*/\n return '';\n }\n\n $result = '';\n \n // detect elements: header, footer, ...\n $header = $this->getListHeader();\n $footer = $this->getListFooter();\n $first = $this->getListFirst();\n $last = $this->getListLast();\n \n $even = $this->getListEven();\n $odd = $this->getListOdd();\n \n $content = $this->getListContent();\n $noContent = $this->getListNoContent();\n $separator = $this->getListSeparator();\n\n // temporarily add list context to scope\n $this->getPropertyResolver()->addScope($property);\n \n // process header\n if ($header !== null) {\n $result .= $this->getRenderer()->render($header->getChildren());\n }\n \n // iterate the items\n $listItems = $property->get('items');\n $itemCount = count($listItems);\n if ($itemCount == 0) {\n // process no-content\n if ($noContent !== null) {\n $result .= $this->getRenderer()->render($noContent->getChildren());\n }\n \n } else {\n \n // process the item\n foreach ($listItems as $itemIndex => $listItem) {\n $itemScopeReference = $listItems[$itemIndex]; // $attr['pma:name'] . '['.$index.']';\n \n // temporarily add list item reference to scope\n $this->getPropertyResolver()->addScope($itemScopeReference);\n \n \n if (($itemIndex == 0) && ($first !== null) ) {\n // process first item\n $result .= $this->getRenderer()->render($first->getChildren());\n \n } else if (($itemIndex == $itemCount-1) && ($last !== null) ) {\n // process last item\n $result .= $this->getRenderer()->render($last->getChildren());\n \n } else if (( ($itemIndex+1) % 2 == 0 ) && ($even !== null) ) {\n // process even item\n $result .= $this->getRenderer()->render($even->getChildren());\n \n } else if (( ($itemIndex+1) % 2 == 1 ) && ($odd !== null) ) {\n // process odd item\n $result .= $this->getRenderer()->render($odd->getChildren());\n \n } else {\n if ($content === null) {\n // process list symbol children if there is no content item\n $result .= $this->getRenderer()->render($this->getChildren());\n \n } else {\n // process content item\n $result .= $this->getRenderer()->render($content->getChildren());\n \n }\n \n }\n \n \n if ($itemIndex < ($itemCount-1)) {\n // process separator\n if ($separator !== null) {\n $result .= $this->getRenderer()->render($separator->getChildren());\n }\n }\n \n // remove list item reference from scope\n $this->getPropertyResolver()->unsetLastScope();\n \n }\n \n }\n \n // process footer\n if ($footer !== null) {\n $result .= $this->getRenderer()->render($footer->getChildren());\n }\n \n // remove list context from scope\n $this->getPropertyResolver()->unsetLastScope();\n \n return $result;\n \n }", "title": "" }, { "docid": "de17decec649f94d2ec84e41d8fe2748", "score": "0.54014516", "text": "public function __toString(){\n\n\t\t\t$string = 'array(';\n\t\t\tforeach($this->_properties as $group => $data){\n\t\t\t\t$string .= \"\\r\\n\\r\\n\\r\\n\\t\\t###### \".strtoupper($group).\" ######\";\n\t\t\t\t$string .= \"\\r\\n\\t\\t'$group' => array(\";\n\t\t\t\tforeach($data as $key => $value){\n\t\t\t\t\t$string .= \"\\r\\n\\t\\t\\t'$key' => \".(strlen($value) > 0 ? \"'\".addslashes($value).\"'\" : 'null').\",\";\n\t\t\t\t}\n\t\t\t\t$string .= \"\\r\\n\\t\\t),\";\n\t\t\t\t$string .= \"\\r\\n\\t\\t########\";\n\t\t\t}\n\t\t\t$string .= \"\\r\\n\\t)\";\n\n\t\t\treturn $string;\n\t\t}", "title": "" }, { "docid": "89d57b11f9a56d4f67b08da93c8f4e1f", "score": "0.54007405", "text": "public function __toString()\n {\n $properties = array();\n foreach ($this->toArray() as $property => $value) {\n $properties[] = $property.': '.$value;\n }\n $properties = join(', ', $properties);\n return get_class($this).($properties ? \" [$properties]\" : '');\n }", "title": "" }, { "docid": "5f9c6ac80bf294d0b01509cb156d852f", "score": "0.5377449", "text": "public function __toString()\n {\n return \"Employee :[ Name : \" . $this->name\n . \", dept : \" . $this->dept . \", salary : \"\n . $this->salary .\" ]\";\n }", "title": "" }, { "docid": "a2c2211bbbaf618920c011f78f6db94a", "score": "0.5375122", "text": "public function __toString()\n {\n return $this->timestamp->format(static::FORMAT);\n }", "title": "" }, { "docid": "63b1794c30faefbe4c4ac0b342b244ef", "score": "0.53694826", "text": "public function __toString(): string\n {\n if (empty((string) $this->getDate())) {\n $releaseEvent = (empty((string) $this->getArea()))\n ? ''\n : $this->getArea();\n } else {\n $releaseEvent = $this->getDate();\n $releaseEvent .= (empty((string) $this->getArea()))\n ? ''\n : ' (' . $this->getArea() . ')';\n }\n\n return $releaseEvent;\n }", "title": "" }, { "docid": "bee2b8e5f47b25edf9e9e7cfcf66006f", "score": "0.53685135", "text": "public function __toString() {\n\t\treturn $this->date_time_string;\n\t}", "title": "" }, { "docid": "7c71c773363abdf5b19a71b22f42b6eb", "score": "0.53676414", "text": "public function __toString()\n {\n return $this->name . ': ' . $this->value . ';';\n }", "title": "" }, { "docid": "cbd555f86c94eefdd6d1b03821231616", "score": "0.53652966", "text": "abstract protected function format( Carbon $carbon ) : string ;", "title": "" }, { "docid": "fb853a84cdcb53a8e275b7499739df2d", "score": "0.53589296", "text": "public function __toString()\n {\n return sprintf('%02d:%02d:%02d', $this->hours, $this->minutes, $this->seconds);\n }", "title": "" }, { "docid": "0e959d4483c39aa0048da452ed55adf1", "score": "0.53547037", "text": "public function visit(){\t\t\n\t\techo $this->build_calendar();\n\t}", "title": "" }, { "docid": "f5467a14e9061edc553ffb4675bf522e", "score": "0.53343713", "text": "public function __toString()\n {\n return json_encode($this->properties);\n }", "title": "" }, { "docid": "211e9f45620827fd2e8772224bf43490", "score": "0.5320328", "text": "public function __toString(){\n\t\treturn $this->format('Y-m-d H:i:s');\n\t}", "title": "" }, { "docid": "bd79e648d768af9c226e42e50fbf2def", "score": "0.5310705", "text": "public function __toString()\n {\n return $this->format('Y/m/d H:i:s');\n }", "title": "" }, { "docid": "eeba3b4548c688c1d0d64cd1f59ddca7", "score": "0.5303365", "text": "public function render_as_text(){\n\t\t# foreach($this->calendars as $cal)\n\t\t# \t$cal->render();\n\t\t$days = array('sunday', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi');\n\t\t$start = $this->start(); # start hour;\n\t\t$end = $this->end(); # end hour\n\t\t$steps = $this->steps(); # \n\t\t$format = 'd/m/Y | H:i:s'; # date format\n\n\t\t$c1=code2utf(0x2588);\n\t\t$c2=code2utf(0x2589);\n\t\t$c = $c2;\n\n\t\t$red='style=\"color:red;\"';\n\t\t$green='style=\"color:green;\"';\n\t\t\n\t\tfor($d=1 ; $d <=5 ; $d++){\n\t\t\t\n\t\t\techo \"$days[$d]\\n\";\n\t\t\tfor($i=0 ; $i < $steps ; $i++){\n\t\t\t\tif($i%$this->granularity() == 0)\n\t\t\t\t\t\tprintf('%02d ', intval($i/$this->granularity())+$start);\n\t\t\t\telse\n\t\t\t\t\t\techo \" \";\n\t\t\t\n\t\t\t\tforeach($this->calendars as $cc=>$cal){\n\n\t\t\t\t\t$pos = $start * $this->granularity() + $i;\n\t\t\t\t\t$ev = $cal->get_data($d, $pos);\n\t\t\t\t\tif($ev !== false){\n\t\t\t\t\t\tprintf(\"<span $red title='%s : %s / %s / %s'>$c</span>\", $cal->name(), $ev->start($format), $ev->length_as_text(), htmlspecialchars($ev->summary(), ENT_QUOTES));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tprintf(\"<span title='%s' $green>$c</span>\", $cal->name());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($i%$this->granularity() == 0) echo \"</b>\";\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\techo \"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "6bf45fefe2454c712bbe06d4c79a3870", "score": "0.52992386", "text": "public function printProperty(NumericalProperty $property): string;", "title": "" }, { "docid": "3438ad3be7c7614f84e2adf0a34ba549", "score": "0.52842134", "text": "public function getAttendanceDisplayAttribute()\n {\n return $this->name . ' [' . $this->start_time . ' - ' . $this->end_time . ']';\n }", "title": "" }, { "docid": "6facdfbe9d4a1b55821ea2db562b66ac", "score": "0.5280814", "text": "public function __toString() : string\n {\n $format = new Standard();\n return $format->format($this);\n }", "title": "" }, { "docid": "6da13774aa0f999d81ab879ecb6a4024", "score": "0.52693796", "text": "public function __toString() {\r\n return \"\r\n\r\n \";\r\n }", "title": "" }, { "docid": "d9e0295e35cd520bb13c97eeb3a6a86c", "score": "0.52665424", "text": "function createCalendar() {\n $calendarInit = $calendarxCaldecl = $calendarStart = $calendar = '';\n switch ($this->format) {\n case 'xcal':\n $calendarInit = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . $this->nl .\n '<!DOCTYPE VCalendar PUBLIC \"-//IETF//DTD XCAL/iCalendar XML//EN\"' . $this->nl .\n '\"http://www.ietf.org/internet-drafts/draft-ietf-calsch-many-xcal-01.txt\"';\n $calendarStart = '>' . $this->nl . '<VCalendar';\n break;\n default:\n $calendarStart = 'BEGIN:VCALENDAR' . $this->nl;\n break;\n }\n $calendarStart .= $this->createVersion();\n $calendarStart .= $this->createProdid();\n $calendarStart .= $this->createCalscale();\n $calendarStart .= $this->createMethod();\n if ('xcal' == $this->format)\n $calendarStart .= '>' . $this->nl;\n $calendar .= $this->createXprop();\n foreach ($this->components as $component) {\n if (empty($component))\n continue;\n $component->setConfig($this->getConfig(), FALSE, TRUE);\n $calendar .= $component->CreateComponent($this->xcaldecl);\n }\n if (( 'xcal' == $this->format ) && ( 0 < count($this->xcaldecl))) { // xCal only\n $calendarInit .= ' [';\n $old_xcaldecl = array();\n foreach ($this->xcaldecl as $declix => $declPart) {\n if (( 0 < count($old_xcaldecl)) &&\n isset($declPart['uri']) && isset($declPart['external']) &&\n isset($old_xcaldecl['uri']) && isset($old_xcaldecl['external']) &&\n ( in_array($declPart['uri'], $old_xcaldecl['uri'])) &&\n ( in_array($declPart['external'], $old_xcaldecl['external'])))\n continue; // no duplicate uri and ext. references\n if (( 0 < count($old_xcaldecl)) &&\n !isset($declPart['uri']) && !isset($declPart['uri']) &&\n isset($declPart['ref']) && isset($old_xcaldecl['ref']) &&\n ( in_array($declPart['ref'], $old_xcaldecl['ref'])))\n continue; // no duplicate element declarations\n $calendarxCaldecl .= $this->nl . '<!';\n foreach ($declPart as $declKey => $declValue) {\n switch ($declKey) { // index\n case 'xmldecl': // no 1\n $calendarxCaldecl .= $declValue . ' ';\n break;\n case 'uri': // no 2\n $calendarxCaldecl .= $declValue . ' ';\n $old_xcaldecl['uri'][] = $declValue;\n break;\n case 'ref': // no 3\n $calendarxCaldecl .= $declValue . ' ';\n $old_xcaldecl['ref'][] = $declValue;\n break;\n case 'external': // no 4\n $calendarxCaldecl .= '\"' . $declValue . '\" ';\n $old_xcaldecl['external'][] = $declValue;\n break;\n case 'type': // no 5\n $calendarxCaldecl .= $declValue . ' ';\n break;\n case 'type2': // no 6\n $calendarxCaldecl .= $declValue;\n break;\n }\n }\n $calendarxCaldecl .= '>';\n }\n $calendarxCaldecl .= $this->nl . ']';\n }\n switch ($this->format) {\n case 'xcal':\n $calendar .= '</VCalendar>' . $this->nl;\n break;\n default:\n $calendar .= 'END:VCALENDAR' . $this->nl;\n break;\n }\n return $calendarInit . $calendarxCaldecl . $calendarStart . $calendar;\n }", "title": "" }, { "docid": "deab606085aec6456be06bd6e5770424", "score": "0.5264625", "text": "public function __toString()\n {\n\n return $this->format( DateTimeFormat::RFC822 );\n\n }", "title": "" }, { "docid": "5dd944b4ee3e23787173e5802bce78b8", "score": "0.5254595", "text": "public function __toString(): string\n {\n return sprintf('%s/%s', $this->start->format('c'), $this->end->format('c'));\n }", "title": "" }, { "docid": "7e8bf6dd9df2cefcb997eb3a1eb04702", "score": "0.5249115", "text": "public function get_properties()\n {\n }", "title": "" }, { "docid": "8732edc3127aa894c40887d8a4649c17", "score": "0.5243453", "text": "public function getDateAdmin()\n {\n return '<strong>' . $this->created_at->format(Config::get('settings.date_format')) . '</strong><br>' . $this->created_at->format(Config::get('settings.time_format'));\n }", "title": "" }, { "docid": "cb70ae5d554b6c7fb7f01936efbb7b9c", "score": "0.52407914", "text": "public function toString() {\r\n\t\tif($this->organizer == null)\r\n\t\t\tthrow new Exception(\"An organizer is required.\");\r\n\t\tif(count($this->attendees) == 0)\r\n\t\t\tthrow new Exception(\"At least one attendee is required.\");\r\n\r\n\t\t$output = \"BEGIN:VEVENT\\r\\n\";\r\n\t\t$output .= \"DTSTART:{$this->dtStart}\\r\\n\";\r\n\t\t$output .= \"DTEND:{$this->dtEnd}\\r\\n\";\r\n\t\t$output .= \"DTSTAMP:{$this->dtStamp}\\r\\n\";\r\n\t\t//$output .= $this->organizer . \"\\r\\n\";\r\n\t\t$output .= \"ORGANIZER;CN={$this->organizer['name']}:mailto:{$this->organizer['email']}\\r\\n\";\r\n\t\t$output .= \"UID:\" . $this->GUID() . \"\\r\\n\";\r\n\r\n\t\t$this->attendees[] = $this->organizer;\r\n\t\tforeach($this->attendees as $a) {\r\n\t\t\t$temp = \"ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT={$a['status']};RSVP=TRUE;CN={$a['name']};X-NUM-GUESTS=0:mailto:{$a['email']}\\r\\n\";\r\n\r\n\t\t\tif(strlen($temp) > 75)\r\n\t\t\t\t$temp = substr($temp, 0, 75) . \"\\r\\n \" . substr($temp, 75);\r\n\t\t\t$output .= $temp;\r\n\t\t}\r\n\r\n\t\t$output .= \"CREATED:\" . date(\"Ymd\\THis\\Z\", time() + abs(date(\"Z\", time()))) . \"\\r\\n\";\r\n\r\n\t\t$temp = $this->Description;\r\n\t\t$textSpan = strlen($this->Description);\r\n\t\t$parts = array();\r\n\r\n\t\twhile(strlen($temp) > 75) {\r\n\t\t\t$parts[] = substr($temp, 0, 75);\r\n\t\t\t$temp = substr($temp, 75);\r\n\t\t}\r\n\r\n\t\t$output .= \"DESCRIPTION:\";\r\n\t\tif(count($parts) > 0)\r\n\t\t\t$output .= implode(\"\\r\\n\", $parts);\r\n\t\telse\r\n\t\t\t$output .= $temp . \"\\r\\n\";\r\n\t\t$output .= \"LAST-MODIFIED:\" . $this->dtStamp;\r\n\t\t$output .= \"LOCATION:{$this->Location}\\r\\n\";\r\n\t\t$output .= \"SEQUENCE:0\\r\\n\";\r\n\t\t$output .= \"STATUS:CONFIRMED\\r\\n\";\r\n\t\t$output .= \"SUMMARY:{$this->Summary}\\r\\n\";\r\n\t\t$output .= \"TRANSP:OPAQUE\\r\\n\";\r\n\r\n\t\tforeach($this->alarms as $al) {\r\n\t\t\t$output .= \"BEGIN:VALARM\\r\\n\";\r\n\t\t\t$output .= \"ACTION:DISPLAY\\r\\n\";\r\n\t\t\t$output .= \"DESCRIPTION:{$al['title']}\\r\\n\";\r\n\t\t\t$output .= \"TRIGGER:-P\" . $this->toTriggerTime($al['time']) . \"\\r\\n\";\r\n\t\t\t$output .= \"END:VALARM\\r\\n\";\r\n\t\t}\r\n\r\n\t\t$output .= \"END:VEVENT\\r\\n\";\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "473cd24916c2701e4a3df59af53e7cfa", "score": "0.52366894", "text": "public function getFormattedValue() {\n return ($this->parent && $this->parent->parent ? $this->parent->parent->name. \" / \" : \"\") . \n ($this->parent ? $this->parent->name. \" / \" : \"\") . \n $this->name;\n }", "title": "" }, { "docid": "bd8f021ea8edad9bd8fe6a4a4d56dfa8", "score": "0.5235576", "text": "public function calendar()\n {\n return '<div id=\"calendar-' . $this->getId() . '\"></div>';\n }", "title": "" }, { "docid": "0e54097326a9fd34ad1714acdb4b73ee", "score": "0.5225682", "text": "public function print_calendar_settings() {\n\t\t\t$settings = ( $this->needs_date() ? $this->get_calendar_settings() : array() );\n\t\t\t?>\n\t\t\t<script id=\"wc_od_checkout_l10n\" type=\"text/javascript\">\n\t\t\t\t/* <![CDATA[ */\n\t\t\t\t\n\t\t\t\tvar wc_od_checkout_l10n = <?php echo wp_json_encode( $settings ); ?>;\n\t\t\t\t/* ]]> */\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "79071328c3f8afe1ad0411bd7cd3b258", "score": "0.52173835", "text": "public function toString() {\n return $this->getClassName().'('.$this->value.')';\n }", "title": "" }, { "docid": "9fab80f1bc125ab7c27c5be96a861c84", "score": "0.5213244", "text": "public function __toString() {\r\n\t\treturn '<td data-dane=\"dc,' . $this->numerator . ',' . $this->denominator . ',' . $this->result . '\">' . $this->result . '</td>';\r\n\t}", "title": "" }, { "docid": "58bd7a5e42e501f7e0e3e2b8233b17a5", "score": "0.5210075", "text": "public function getPrettyString()\n {\n $out = $this->getDateStart()->toString('Y');\n return $out;\n }", "title": "" }, { "docid": "fa02c0b4041fbb93d28c3c3b06f80ffc", "score": "0.5209921", "text": "function CreatedDisplayDate()\n\t{\treturn date(\"d-M-Y H:i\", strtotime($this->aa_created));\n\t}", "title": "" }, { "docid": "d77771a225c24c00fb8486efe7cff9cc", "score": "0.52069664", "text": "public function formatPropertyName($name);", "title": "" }, { "docid": "4fcfb9292c98903a42e188b5fddc8ad5", "score": "0.5200111", "text": "function descriptor($record)\n {\n $res = $record[\"name\"];\n if ($record[\"starttime\"]!=$record[\"endtime\"])\n {\n $res.=\" (\".$record[\"starttime\"][\"hours\"].\".\".$record[\"starttime\"][\"minutes\"].\" - \".$record[\"endtime\"][\"hours\"].\".\".$record[\"endtime\"][\"minutes\"].\")\";\n }\n return $res;\n }", "title": "" }, { "docid": "159c6415236a0c4f8db6b6072f1ce3b2", "score": "0.5198373", "text": "public function calendar($value=null) { }", "title": "" }, { "docid": "efc88552db65a69b6d82cd9e61735bd5", "score": "0.51965433", "text": "public function format( $event );", "title": "" }, { "docid": "201018dc617228aa85a8081413d1a468", "score": "0.5192346", "text": "public function __toString(): string\n {\n return $this->format(\\DateTime::ATOM);\n }", "title": "" }, { "docid": "bc76e8155666c1da1f9f4ab77da951b2", "score": "0.51860726", "text": "function get_cal_time_format()\n {\n return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_time_format());\n }", "title": "" }, { "docid": "ba729538b314ab5db62f39dd79a7fad4", "score": "0.5183758", "text": "public function properties();", "title": "" }, { "docid": "f428b0620413fb190655c0f9676574af", "score": "0.518129", "text": "function generatePropertyTags($store, $entryid, $action)\n\t\t{\n\t\t\t$this->properties = $GLOBALS[\"properties\"]->getAppointmentProperties($store);\n\n\t\t\t$this->sort = array();\n\t\t\t$this->sort[$this->properties[\"startdate\"]] = TABLE_SORT_ASCEND;\n\t\t}", "title": "" }, { "docid": "89cb15eac3dd46dbdcadbce09532f39d", "score": "0.51771224", "text": "public function __toString() {\n return date(\"Y-m-d H:i:s\", $this->int);\n }", "title": "" }, { "docid": "760f6a38f6eb9128951b3cdff0be5631", "score": "0.51711804", "text": "public function __toString()\n\t{\n\n\t\tif( $formatter = $this->getFormatter() )\n\t\t{\n\n\t\t\tif( is_string( $format = $this->format() ) )\n\t\t\t\treturn $format;\n\n\t\t}\n\t\t\n\t\treturn (string) $this->getValue();\n\n\t}", "title": "" }, { "docid": "de954e60bf7f80e1621d28d9223fd698", "score": "0.5171093", "text": "protected function properties()\n {\n return [\n 'inventory_no' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_INVENTORY_NO',\n C__PROPERTY__INFO__DESCRIPTION => 'Inventory number'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__inventory_no'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_INVENTORY_NO'\n ]\n ]\n ),\n 'account' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_ACCOUNT',\n C__PROPERTY__INFO__DESCRIPTION => 'Account'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_account__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_account',\n 'isys_account__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING__ACCOUNT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_account'\n ]\n ]\n ]\n ),\n 'acquirementdate' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::date(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_AQUIRE',\n C__PROPERTY__INFO__DESCRIPTION => 'Acquirement date'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__acquirementdate'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_ACQUIRE'\n ]\n ]\n ),\n 'contact' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::object_browser(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_PURCHASED_AT',\n C__PROPERTY__INFO__DESCRIPTION => 'Purchased at'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_contact__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_contact',\n 'isys_contact__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__PURCHASE_CONTACT',\n C__PROPERTY__UI__PARAMS => [\n 'multiselection' => true,\n 'catFilter' => 'C__CATS__PERSON;C__CATS__PERSON_GROUP;C__CATS__ORGANIZATION',\n 'p_strSelectedID' => new isys_callback(\n [\n 'isys_cmdb_dao_category_g_accounting',\n 'callback_property_contact'\n ]\n )\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__REPORT => true,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__SEARCH => false\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'contact'\n ]\n ]\n ]\n ),\n 'price' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::money(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_PRICE',\n C__PROPERTY__INFO__DESCRIPTION => 'Cash value / Price'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__price'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_PRICE'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true,\n C__PROPERTY__PROVIDES__REPORT => true\n ]\n ]\n ),\n 'operation_expense' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::money(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING__OPERATION_EXPENSE',\n C__PROPERTY__INFO__DESCRIPTION => 'Operational expense'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__operation_expense'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING__OPERATION_EXPENSE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n ]\n ),\n 'operation_expense_interval' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING__OPERATION_EXPENSE__UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Interval unit of expense'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_interval__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_interval',\n 'isys_interval__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING__OPERATION_EXPENSE_INTERVAL',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_interval',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'cost_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_COST_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'Cost unit'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_catg_accounting_cost_unit__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_accounting_cost_unit',\n 'isys_catg_accounting_cost_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_COST_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_catg_accounting_cost_unit'\n ]\n ]\n ]\n ),\n 'delivery_note_no' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_DELIVERY_NOTE_NO',\n C__PROPERTY__INFO__DESCRIPTION => 'Delivery note no.'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__delivery_note_no'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_DELIVERY_NOTE_NO'\n ]\n ]\n ),\n 'procurement' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog_plus(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_PROCUREMENT',\n C__PROPERTY__INFO__DESCRIPTION => 'Procurement'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_catg_accounting_procurement__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_catg_accounting_procurement',\n 'isys_catg_accounting_procurement__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_PROCUREMENT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_catg_accounting_procurement'\n ]\n ]\n ]\n ),\n 'delivery_date' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::date(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__ACCOUNTING_DELIVERY_DATE',\n C__PROPERTY__INFO__DESCRIPTION => 'Delivery date'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__delivery_date'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_DELIVERY_DATE',\n C__PROPERTY__UI__PARAMS => [\n 'p_strPopupType' => 'calendar',\n 'p_bTime' => 0\n ]\n ]\n ]\n ),\n 'invoice_no' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_INVOICE_NO',\n C__PROPERTY__INFO__DESCRIPTION => 'Invoice no.'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__invoice_no'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_INVOICE_NO'\n ]\n ]\n ),\n 'order_no' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_ORDER_NO',\n C__PROPERTY__INFO__DESCRIPTION => 'Order no.'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__order_no'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_ORDER_NO'\n ]\n ]\n ),\n 'guarantee_period' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::int(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_GUARANTEE_PERIOD',\n C__PROPERTY__INFO__DESCRIPTION => 'Period of warranty'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__guarantee_period'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_GUARANTEE_PERIOD',\n C__PROPERTY__UI__PARAMS => [\n 'p_strClass' => 'input-dual-large'\n ]\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'timeperiod',\n [null],\n ],\n C__PROPERTY__FORMAT__UNIT => 'guarantee_period_unit'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false\n ]\n ]\n ),\n 'guarantee_period_unit' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::dialog(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_GUARANTEE_PERIOD_UNIT',\n C__PROPERTY__INFO__DESCRIPTION => 'guarantee period unit field'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__isys_guarantee_period_unit__id',\n C__PROPERTY__DATA__REFERENCES => [\n 'isys_guarantee_period_unit',\n 'isys_guarantee_period_unit__id'\n ]\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CATG__ACCOUNTING_GUARANTEE_PERIOD_UNIT',\n C__PROPERTY__UI__PARAMS => [\n 'p_strTable' => 'isys_guarantee_period_unit',\n 'p_strClass' => 'input-dual-small',\n 'p_bInfoIconSpacer' => 0\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false\n ]\n ]\n ),\n 'guarantee_period_status' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::text(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__GLOBAL_GUARANTEE_STATUS',\n C__PROPERTY__INFO__DESCRIPTION => 'Order no.'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__id'\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__SEARCH => false,\n C__PROPERTY__PROVIDES__REPORT => false,\n C__PROPERTY__PROVIDES__VALIDATION => false,\n C__PROPERTY__PROVIDES__IMPORT => false,\n C__PROPERTY__PROVIDES__MULTIEDIT => false,\n C__PROPERTY__PROVIDES__LIST => false,\n C__PROPERTY__PROVIDES__EXPORT => true\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n 'isys_export_helper',\n 'get_guarantee_status'\n ]\n ]\n ]\n ),\n 'description' => array_replace_recursive(\n isys_cmdb_dao_category_pattern::commentary(),\n [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__CATG__DESCRIPTION',\n C__PROPERTY__INFO__DESCRIPTION => 'Description'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_catg_accounting_list__description'\n ],\n C__PROPERTY__UI => [\n C__PROPERTY__UI__ID => 'C__CMDB__CAT__COMMENTARY_' . C__CMDB__CATEGORY__TYPE_GLOBAL . C__CATG__ACCOUNTING\n ]\n ]\n )\n ];\n }", "title": "" }, { "docid": "e050be56b25ac37fbaf910d5a14038af", "score": "0.515339", "text": "public function __toString() { \n $message = $this->testid.' '.$this->userid.' '.$this->startdate->format('Y-m-d H:i:s').' - '.$this->enddate->format('Y-m-d H:i:s');\n return $message;\n }", "title": "" }, { "docid": "4569f542dd5438dcd61d20ed605f3f3d", "score": "0.51526487", "text": "function format_cal($format, $string)\n{\n\tglobal $conf;\n\n\t$newstring=$string;\n\n\tif ($format == 'vcal')\n\t{\n\t\t$newstring=quotedPrintEncode($newstring);\n\t}\n\tif ($format == 'ical')\n\t{\n\t\t// Replace new lines chars by '\\n'\n\t\t$newstring=preg_replace('/'.\"\\r\\n\".'/i', \"\\n\", $newstring);\n\t\t$newstring=preg_replace('/'.\"\\n\\r\".'/i', \"\\n\", $newstring);\n\t\t$newstring=preg_replace('/'.\"\\n\".'/i', '\\n', $newstring);\n\t\t// Must not exceed 75 char. Cut with \"\\r\\n\"+Space\n\t\t$newstring=calEncode($newstring);\n\t}\n\n\treturn $newstring;\n}", "title": "" }, { "docid": "1207b3b56658da4674430490006b39b3", "score": "0.51508164", "text": "public function __toString() {\n return $this->format('Y-m-d H:i');\n }", "title": "" }, { "docid": "d267de301d18a2b1d17915fb909b38ea", "score": "0.5148864", "text": "public function __toString()\n {\n return __CLASS__ . '[' . $this->value . \"] {\\n}\\n\";\n }", "title": "" }, { "docid": "4421ef4897c1b571b71de37b2b05532a", "score": "0.5147768", "text": "function ical_title() {\n return $this->title();\n }", "title": "" }, { "docid": "e47b4453625ca8485678ce36d00835e6", "score": "0.51447195", "text": "public function __toString () {\n\t\t\n\t\t\treturn $this->ToString();\n\t\t\n\t\t}", "title": "" }, { "docid": "a2dfb273d5e19e4413d04ba1b4ea964c", "score": "0.5144603", "text": "public function getPrintValues()\n {\n $string_to_output =\n $this->make.' '.$this->year.' '.$this->mileage.' '.$this->condition.' \"'.$this->coverage_name.'\" suffix1:'.$this->suffix1.' suffix2:'.$this->suffix2.' ';\n return $string_to_output;\n }", "title": "" }, { "docid": "3edd087e2190cdd99bf914aed77d9fe7", "score": "0.5138817", "text": "public function __toString()\n {\n return $this->generate();\n }", "title": "" }, { "docid": "3edd087e2190cdd99bf914aed77d9fe7", "score": "0.5138817", "text": "public function __toString()\n {\n return $this->generate();\n }", "title": "" }, { "docid": "3cac54671d7ef297d25c2aa254baa1f5", "score": "0.5138216", "text": "function description () {\r\n\t\t$desc = \"La semaine #\".$this->_week.\" de \".$this->_year.\" commence le \";\r\n\t\t$desc .= strftime( \"%A %e %B %Y\" , $this -> lundi );\r\n\t\t$desc .= \" et se termine le \";\r\n\t\t$desc .= strftime( \"%A %e %B %Y\" , $this -> lastDay() );\r\n\t\treturn $desc;\r\n\t}", "title": "" }, { "docid": "2065b64140a8e90e6007ec5117169136", "score": "0.51328695", "text": "public function __toString() {\n\t\t$ostr = '===================================================' . \"\\n\";\n\t\t$ostr .= '| netxCategoryProc Object |' . \"\\n\";\n\t\t$ostr .= '===================================================' . \"\\n\";\n\t\t$ostr .= '===================================================' . \"\\n\";\n\t\treturn $ostr;\n\t}", "title": "" }, { "docid": "20455b9f9cd0b60088a7ece6011d8b3b", "score": "0.51288265", "text": "public function toString(){\n $output = '';\n $aFields = get_object_vars($this);\n foreach($aFields as $name => $value)\n if($value != '')\n $output .= \"\\t$name: \".$value.\"\\n\";\n if(!empty($output))\n $output = \"Money Expression:\\n\".$output;\n return $output;\n }", "title": "" }, { "docid": "6b4d185ebea874e00a89b0cbf7115eb9", "score": "0.51268774", "text": "function calendar(){\n\t\treturn $this->_calendar;\n\t}", "title": "" }, { "docid": "b95bc402425657f396053d3d88678851", "score": "0.5126394", "text": "public function __toString()\n {\n $ReflectionClass = new ReflectionClass($this);\n\n $properties = [];\n\n foreach ($ReflectionClass->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {\n $properties[$property->getName()] = $property->getValue($this);\n }\n\n $properties = array_filter($properties, function ($value) {\n return !is_null($value);\n });\n\n return json_encode($properties);\n }", "title": "" }, { "docid": "48094c714756be81b0fe867ff7822984", "score": "0.5122607", "text": "public function toString(): string\n {\n return \\json_encode($this->properties);\n }", "title": "" }, { "docid": "ff1b3201c7f20b4584a0184a338faa6c", "score": "0.5118962", "text": "public function __toString() {\n\t\treturn 'max=\"' . $this->maxDate()->format('Y-m-d') . '\"';\n\t}", "title": "" }, { "docid": "26e27184926f1c80d2b064519e222693", "score": "0.51126677", "text": "public function getFormat(): string;", "title": "" }, { "docid": "26e27184926f1c80d2b064519e222693", "score": "0.51126677", "text": "public function getFormat(): string;", "title": "" }, { "docid": "26e27184926f1c80d2b064519e222693", "score": "0.51126677", "text": "public function getFormat(): string;", "title": "" }, { "docid": "b08e74860ea20ebbdffd5a367580e548", "score": "0.5111741", "text": "public function toString() {\n return nameof($this).'['.$this->description.' @ '.$this->properties->getFilename().']';\n }", "title": "" }, { "docid": "82f13b59fd32de6a346206d7769ab061", "score": "0.51062083", "text": "public function __toString()\r\n {\r\n return sprintf('%s',$this->getName());\r\n }", "title": "" }, { "docid": "e02d117a32c1915ab35c60280c6ac923", "score": "0.51026344", "text": "function get_cal_date_time_format()\n {\n return str_replace(array_keys(self::$format_to_str), array_values(self::$format_to_str), $this->get_date_time_format());\n }", "title": "" }, { "docid": "9b87cae03ecbfb67b2c4ac064b4c458a", "score": "0.5102346", "text": "public function toString() {\n $s= nameof($this).'<'.$this->name.\">@{\\n\";\n if ($this->constructor) {\n $s.= ' '.$this->constructor->toString().\"\\n\";\n }\n foreach ($this->constants as $constant) {\n $s.= ' '.$constant->toString().\"\\n\";\n }\n foreach ($this->fields as $field) {\n $s.= ' '.$field->toString().\"\\n\";\n }\n foreach ($this->properties as $property) {\n $s.= ' '.$property->toString().\"\\n\";\n }\n if ($this->indexer) {\n $s.= ' '.$this->indexer->toString().\"\\n\";\n }\n foreach ($this->methods as $method) {\n $s.= ' '.$method->toString().\"\\n\";\n }\n foreach ($this->operators as $operator) {\n $s.= ' '.$operator->toString().\"\\n\";\n }\n return $s.'}';\n }", "title": "" }, { "docid": "fae116eb0071f2672f057216edfae298", "score": "0.5100713", "text": "public function get_strings_for_calendar() {\n\t\t$calendar['days'] = array(\n\t\t\tesc_html__( 'Su', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Mo', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Tu', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'We', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Th', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Fr', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Sa', Forminator::DOMAIN ),\n\t\t);\n\t\t$calendar['months'] = array(\n\t\t\tesc_html__( 'Jan', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Feb', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Mar', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Apr', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'May', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Jun', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Jul', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Aug', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Sep', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Oct', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Nov', Forminator::DOMAIN ),\n\t\t\tesc_html__( 'Dec', Forminator::DOMAIN ),\n\t\t);\n\n\t\treturn json_encode( $calendar );\n\t}", "title": "" }, { "docid": "9286ad819d7a54d4689ad086f66fd271", "score": "0.5094272", "text": "public function getPrettyString()\n {\n $out = $this->translator->translate('General_DateRangeFromTo', array($this->getDateStart()->toString(), $this->getDateEnd()->toString()));\n return $out;\n }", "title": "" } ]
b271ee5bb3b02020f160ce3433cddd3c
function get_user_count_data returns the active user count, inactive users, male, female users
[ { "docid": "c3195b54cfaeed2350ffe4909d6de49b", "score": "0.81592506", "text": "function get_user_count_data()\n{\n\tglobal $db, $config;\n\t//get active users\n\t$cutoff_days = 30;\n\t$current_time = getdate(time());\n\t$cutoff_time = mktime(0, 0, 0, $current_time['mon'], $current_time['mday'] - $cutoff_days, $current_time['year']);\n\t$sql = 'SELECT COUNT(user_id) as user_count\n\t\t\t\tFROM ' . USERS_TABLE . '\n\t\t\t\tWHERE user_lastvisit > ' . $cutoff_time . '\n\t\t\t\t\tAND user_type IN ( ' . USER_NORMAL . ', ' . USER_FOUNDER . ' )';\n\t$result = $db->sql_query($sql);\n\t$active_user_count = (int) $db->sql_fetchfield('user_count');\n\t$db->sql_freeresult($result);\n\t\n\t//get bots count\n\t$sql = 'SELECT COUNT(bot_id) as bot_count\n\t\t\t\tFROM ' . BOTS_TABLE;\n\t$result = $db->sql_query($sql);\n\t$bot_count = (int) $db->sql_fetchfield('bot_count');\n\t$db->sql_freeresult($result);\n\t\n\t//get visited bot count\n\t$sql = 'SELECT COUNT(bot_id) as bot_count\n\t\t\t\tFROM ' . BOTS_TABLE . ' b INNER JOIN ' . USERS_TABLE . ' u ON b.user_id = u.user_id \n\t\t\t\tWHERE u.user_lastvisit > 0';\n\t$result = $db->sql_query($sql);\n\t$visited_bot_count = (int) $db->sql_fetchfield('bot_count');\n\t$db->sql_freeresult($result);\n\t\n\t$return_ary = array(\n\t\t'active'\t\t\t\t=> $active_user_count,\n\t\t'inactive' \t\t\t=> $config['num_users'] - $active_user_count,\n\t\t'registered_bots'\t=> $bot_count,\n\t\t'visited_bots'\t\t=> $visited_bot_count,\n\t);\n\treturn $return_ary;\n}", "title": "" } ]
[ { "docid": "460d50389cba8488188a8c8935dea8d2", "score": "0.7518096", "text": "public function get_user_count()\n {\n return $this->db->count_all($this->table_name);\n }", "title": "" }, { "docid": "42c33be385d9c991ac32397070be2987", "score": "0.74848497", "text": "public function actionUserCount()\n {\n $count = \\Yii::$app->getModule('chocouser')->subject->usersCount();\n \n return [\n 'count' => $count,\n ];\n }", "title": "" }, { "docid": "155c99752d3e68c333a6e8582a4f3dc5", "score": "0.7417169", "text": "function getOffice365ActivationsUserCounts(){\n return $this->addReportQuery(\"getOffice365ActivationsUserCounts\");\n }", "title": "" }, { "docid": "336f56c101fc4c3fdf13ccee083cf99d", "score": "0.7252511", "text": "public function p_user_stats() {\n $q = \"SELECT COUNT(*) FROM users_users WHERE users_users.user_id = \".$this->user->user_id;\n $numFollowing = DB::instance(DB_NAME)->select_field($q) - 1;\n\n $q = \"SELECT COUNT(*) FROM users_users WHERE users_users.user_id_followed = \".$this->user->user_id;\n $numFollowers = DB::instance(DB_NAME)->select_field($q) - 1;\n \n $q = \"SELECT COUNT(*) FROM posts WHERE posts.user_id = \".$this->user->user_id;\n $numPosts = DB::instance(DB_NAME)->select_field($q);\n\n return (array(\"followings\"=>$numFollowing, \"followers\"=>$numFollowers, \n \"posts\"=>$numPosts));\n }", "title": "" }, { "docid": "31ef54808eafb8155f629b679b466a85", "score": "0.71650666", "text": "function count_users() {\n return $this->db->count_all(\"users\");\n }", "title": "" }, { "docid": "385fadbc1c92fb63e0dc87fe8f8ce69a", "score": "0.71551776", "text": "public function countUser(){\n\t\t$query = $this->db->query(\"SELECT count(*) as total FROM users\");\n\t\treturn $query->row()->total;\n\t}", "title": "" }, { "docid": "b9b17c406d1c01da4e3ba72055d38f69", "score": "0.71324366", "text": "function user_count() {\n\treturn mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1\"), 0);\n}", "title": "" }, { "docid": "dee23a4f0c00f31c1313c6771df1eef7", "score": "0.71234524", "text": "function scisco_user_count() {\n $usercount = count_users();\n $result = $usercount['total_users']; \n return $result; \n}", "title": "" }, { "docid": "8e89fcb323e2a56c412b77a67e833faa", "score": "0.7091575", "text": "function getUserCount(){\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n $query = 'SELECT count(*) from #__customer_entity';\r\n $db->setQuery($query );\r\n\r\n //getting the results\r\n $no_users = $db->loadResult();\r\n\r\n return $no_users;\r\n }", "title": "" }, { "docid": "9948ed14008ec0f0f440e72e269f876c", "score": "0.70825636", "text": "public function getUsersCount(){\n // This request count the number of registered membersingleScalarResult() that transform the result into a unique and scalar value : an integer\n return $this->manager->createQuery('SELECT COUNT(u) FROM App\\Entity\\Users u')->getSingleScalarResult();\n }", "title": "" }, { "docid": "c9bea05ae7e9835f88594461942c5862", "score": "0.70489466", "text": "public static function getCount()\n {\n return User::count();\n }", "title": "" }, { "docid": "1b8954b91c100309ff64dd019cdf63a3", "score": "0.6940615", "text": "public function getUsersCount()\n {\n $query = \"SELECT COUNT(*)\n FROM `{$this->sessionTable}`\n WHERE `data` <> ''\";\n\n $command = $this->db->createCommand($query);\n\n return $command->queryScalar();\n }", "title": "" }, { "docid": "d1fcf80f05c84ad53611b2b677143391", "score": "0.6930396", "text": "public function countUsers() {\n\t\t$userCountStatistics = array();\n\t\tforeach ($this->backends as $backend) {\n\t\t\tif ($backend->implementsActions(\\OC_USER_BACKEND_COUNT_USERS)) {\n\t\t\t\t$backendusers = $backend->countUsers();\n\t\t\t\tif($backendusers !== false) {\n\t\t\t\t\tif(isset($userCountStatistics[get_class($backend)])) {\n\t\t\t\t\t\t$userCountStatistics[get_class($backend)] += $backendusers;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$userCountStatistics[get_class($backend)] = $backendusers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $userCountStatistics;\n\t}", "title": "" }, { "docid": "6d77259c101f20b466eab8a9e9e67708", "score": "0.6925865", "text": "function totalUsers()\n\t{\n\t $sql=\"select count(*)as cnt from users_table \";\n\t $obj = new Bin_Query();\n\t\tif($obj->executeQuery($sql))\n\t\t{\t\t\n\t\t\t\t$output=$obj->records[0]['cnt'];\n\t\t\t\treturn $output;\n\t\t}\n\t}", "title": "" }, { "docid": "de4ac47bc558ccea6c98f915bd07fa58", "score": "0.69200915", "text": "public function getTotalUsersCount(){\n\t\treturn number_format(Member::get()->count());\n\t}", "title": "" }, { "docid": "cb219b1d82dbfc6f055f7937273cf107", "score": "0.6908738", "text": "public function usersCount() {\n\t\treturn $this->db->column('SELECT COUNT(id) FROM users');\n\t}", "title": "" }, { "docid": "9c69214bdea1cc2edd3f73d1b41c7f35", "score": "0.68813694", "text": "public function getUserCount(): int {\r\n $userCount = Gdn::cache()->get('Memberlist_Usercount');\r\n if ($userCount !== Gdn_Cache::CACHEOP_FAILURE) {\r\n return $userCount;\r\n }\r\n\r\n // Get user count.\r\n $userCount = Gdn::userModel()->getCountWhere(\r\n ['Banned' => 0, 'Deleted' => 0]\r\n );\r\n\r\n // Cache for later usage.\r\n Gdn::cache()->store(\r\n 'Memberlist_Usercount',\r\n $userCount,\r\n [Gdn_Cache::FEATURE_EXPIRY => 360] // Cache for 5 minutes\r\n );\r\n\r\n return $userCount;\r\n }", "title": "" }, { "docid": "248b1a8595ce1f5fd1c32e1d4865ed29", "score": "0.6877705", "text": "public function countuser()\r\n\t{\r\n\t\t//if($department!='') $this->db->where(\"department = '\".$department.\"'\");\r\n\t\t\r\n\t\t$this->db->from('wesing_merchant');\r\n\t\treturn $this->db->count_all_results();\r\n\t}", "title": "" }, { "docid": "0b56e85a34d8787631ef9b3d69d375d8", "score": "0.6843186", "text": "public function users_count(){\n $sql = $this->pdo->prepare(\"SELECT * FROM \".$this->setTable().\" \");\n $sql->execute();\n return count($sql->fetch());\n }", "title": "" }, { "docid": "8bfa782dca04b79fcec5292b00c2ba17", "score": "0.6803468", "text": "public function count(){\n\n $this->db->from('User');\n return $this->db->count_all_results();\n\n }", "title": "" }, { "docid": "e888e99f80e4d4a65574eb4f7fed28b3", "score": "0.680338", "text": "public function users_count() {\n $this->db->from('lms_package_module');\n $count = $this->db->count_all_results();\n return $count;\n }", "title": "" }, { "docid": "a971d7d89b9e57ab09aa9c8543e1a8bc", "score": "0.67634183", "text": "public function getCountAllUsers(): array\n {\n $count = [\n 'shops' => 0,\n 'customers' => 0\n ];\n $users = UserEntity::find()\n ->select(['id', 'created_at'])\n ->asArray()\n ->all();\n\n foreach ($users as $user) {\n $userModel = UserEntity::findOne(['id' => $user['id']]);\n $assignment = Yii::$app->authManager->getAssignment('shop', $userModel->getId());\n\n if ($assignment && $assignment->roleName === 'shop') {\n $count['shops']++;\n } else {\n $assignment = Yii::$app->authManager->getAssignment('user', $userModel->getId());\n\n if ($assignment && $assignment->roleName === 'user') {\n $count['customers']++;\n }\n }\n }\n\n return $count;\n }", "title": "" }, { "docid": "1abbe77d887b8d1db0343dd1c0084166", "score": "0.674377", "text": "function totaluser() { $totaluser = DB::table('users')->count(); return $totaluser; }", "title": "" }, { "docid": "db4c5aa2e386432c6ad19028e06faf54", "score": "0.67210066", "text": "function calcNumActiveUsers(){\r\n /* Calculate number of users at site */\r\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\r\n $result = mysql_query($q, $this->connection);\r\n $this->num_active_users = mysql_numrows($result);\r\n }", "title": "" }, { "docid": "e00970cc87ade0d7fb3d65c7d12a54ed", "score": "0.6712949", "text": "public function count_fetch_data(){\n $query = $this->db->get('tbl_user'); //change niyo lang table name if user or task table\n return $query->num_rows();\n }", "title": "" }, { "docid": "a029d6f90c8928d8397ac2fd08c4e611", "score": "0.66997856", "text": "function calcNumActiveUsers(){\n /* Calculate number of users at site */\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n $result = mysql_query($q, $this->connection);\n $this->num_active_users = mysql_numrows($result);\n }", "title": "" }, { "docid": "abc1d82661d7d0963a744bf61b9e4043", "score": "0.66948146", "text": "public function getUserCount() {\n static $usercount_sql = 'SELECT COUNT(uid) FROM favorites WHERE sid=:sid;';\n $usercount_stmt = $this->db->pdo->prepare($usercount_sql);\n $usercount_stmt->bindParam(':sid', $this->sid);\n $usercount_stmt->execute();\n return $usercount_stmt->fetchColumn();\n }", "title": "" }, { "docid": "b45576e69cc899f1eef06686045e7a6c", "score": "0.6691533", "text": "public function getCountNewUsers(): array\n {\n $count = [\n 'shops' => 0,\n 'customers' => 0\n ];\n $users = UserEntity::find()\n ->select(['id', 'created_at'])\n ->asArray()\n ->all();\n\n foreach ($users as $user) {\n if ((time() - $user['created_at']) < 86400) {\n\n $userModel = UserEntity::findOne(['id' => $user['id']]);\n $assignment = Yii::$app->authManager->getAssignment('shop', $userModel->getId());\n\n if ($assignment && $assignment->roleName === 'shop') {\n $count['shops']++;\n } else {\n $assignment = Yii::$app->authManager->getAssignment('user', $userModel->getId());\n\n if ($assignment && $assignment->roleName === 'user') {\n $count['customers']++;\n }\n }\n }\n }\n\n return $count;\n }", "title": "" }, { "docid": "1d07e565a4fd21870052fa94eab3846e", "score": "0.66876394", "text": "public function countUsers()\n {\n return $this->query(\"\n SELECT COUNT(id) as allUsers\n FROM user\n \");\n }", "title": "" }, { "docid": "b096596a43993d02a6707b994402e794", "score": "0.66788125", "text": "public function record_count() {\n return $this->db->count_all(KYC_USERS);\n }", "title": "" }, { "docid": "11807b927f83099e837906d778cbfff4", "score": "0.6674867", "text": "public function getUsersCount()\n {\n $query = $this->select()\n ->from(\n array($this->_name),\n array('count' => new Zend_Db_Expr('count(id)'))\n ); \n return (int)$this->fetchRow($query)->count;\n }", "title": "" }, { "docid": "0bf7d3cdb00e3ee8edd73924d16a38f4", "score": "0.6673705", "text": "public static function countUsers() {\n $adodb = adodbGetConnection();\n $adodb->SetFetchMode(ADODB_FETCH_NUM);\n $sql = 'SELECT COUNT(*) FROM '.TABLE_USER;\n $rs = $adodb->Execute($sql);\n $result = 0;\n if ( !$rs->EOF ) {\n $result = $rs->fields[0];\n }\n $rs->Close();\n return $result;\n }", "title": "" }, { "docid": "347b66a7232bc4174e6d4f1b57562065", "score": "0.6662938", "text": "public function userNotificationCount()\n {\n $id = $this->session->id;\n $this->db->select('count(notification.user_id) AS count');\n $this->db->from('notification');\n $this->db->join('notification_status', 'notification_status.notification_id = notification.id');\n $where = array('notification_status.user_id' => $id,'notification_status.status' => 1);\n $result = $this->db->where($where)->get()->row_array();\n $a = $this->userNotification();\n foreach ($a as $key => $value) {\n $a[$key]['newnotifycount'] = $result['count'];\n }\n return $a;\n }", "title": "" }, { "docid": "90656eef83d80100550a7ee47f59e2b4", "score": "0.6649631", "text": "function count_all_users()\r\n\t{\r\n\t\t$query = $this->db->get('full_login_details');\r\n\t\treturn $query->num_rows();\r\n\t}", "title": "" }, { "docid": "049ec45e21cd6173cb4ea19759b8a573", "score": "0.6641588", "text": "public function getUsersCount()\n {\n $items_count = User::count(array('conditions' => 'account_id = ' . $this->id));\n\n if ($items_count == false)\n return 0;\n\n return $items_count;\n }", "title": "" }, { "docid": "2ebceb7b9c1dc7d6c53e0f5c77272ad5", "score": "0.6629447", "text": "public static function verifiedUserCount()\n {\n return UserCategory::where('verified', 1)->count();\n }", "title": "" }, { "docid": "05bf1101d3ee753a30e023107f2e4134", "score": "0.6617615", "text": "public function getTotalUserCount()\n {\n if (array_key_exists(\"totalUserCount\", $this->_propDict)) {\n return $this->_propDict[\"totalUserCount\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "6cd9f8ef79606257d51558a1639ade64", "score": "0.6608856", "text": "public function count() {\n\t\treturn count_users();\n\t}", "title": "" }, { "docid": "fa2e56309e56ccc5394e450ca338a79f", "score": "0.6608485", "text": "public static function getNumberOfUsers(): int;", "title": "" }, { "docid": "01e3d36ec462504b1e42a06c38172b7b", "score": "0.660735", "text": "public function getNumberOfUsers(){\n $this->db->order_by('uid', 'DESC');\n $query = $this->db->get('userdetails');\n return $query;\n\n }", "title": "" }, { "docid": "b87e639804deee4ed626e4a2b547e5c4", "score": "0.6604015", "text": "public function number_by_users( ){\n \n $this->daily_users = $this->connection->num_rows(\"SELECT id FROM responses WHERE visits LIKE '%daily%' \", true);\n $this->twice_users = $this->connection->num_rows(\"SELECT id FROM responses WHERE visits LIKE '%twice%' \", true);\n $this->once_users = $this->connection->num_rows(\"SELECT id FROM responses WHERE visits LIKE '%once%' \", true);\n \n }", "title": "" }, { "docid": "cc7fea248fe1229dfd0c602f6a5626e5", "score": "0.6590052", "text": "public static function getCount()\n {\n global $CUSTOMER;\n // Don't use Pasta_TableRow to avoid JOIN'ing with customer-specific\n // tables.\n $db = self::getPearDbByClassName(__CLASS__);\n $sql = 'SELECT COUNT(*) FROM user WHERE customerId = ' . $CUSTOMER->id;\n return $db->getOne($sql);\n }", "title": "" }, { "docid": "c9a65dfdabad35d689fe028e18cc34dd", "score": "0.65889364", "text": "function getOffice365ActiveUserCounts($period){\n return $this->addReportQuery(\"getOffice365ActiveUserCounts\",$period);\n }", "title": "" }, { "docid": "40145ac6f06bcddf838e49a05e9077a5", "score": "0.6586517", "text": "public function getActiveUsersCount()\n\t{\n\t\t$userSessionModel = $this->getModel('UserSession');\n\n\t\treturn count($userSessionModel->findAll());\n\t}", "title": "" }, { "docid": "e217a084134a683d2fff3cb842300cf7", "score": "0.65722257", "text": "protected function get_count()\n\t{\n\t\t$sql = 'SELECT COUNT(user_id) AS count FROM ' . USERS_TABLE;\n\t\t$result = $this->db->sql_query($sql);\n\t\t$count = (int) $this->db->sql_fetchfield('count');\n\t\t$this->db->sql_freeresult($result);\n\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "a37aba2de9dcdb41eaddd051f96ce3dc", "score": "0.6571541", "text": "public function count_get_all_marketing_promotion_officer_info(){\n $user_type = $this->user_type;\n\n $this->db->select(\"*\");\n $this->db->from('user');\n $this->db->where('user_type', 5);\n\n if ($user_type==4 || $user_type==5 || $user_type==6) {\n $this->db->where('div_id', $this->division_id);\n }\n\n $result = $this->db->get()->num_rows();\n\n return $result; \n }", "title": "" }, { "docid": "d2beafd874c88934dcccc01c48abd8f9", "score": "0.655826", "text": "function countUser($status = null) {\n $count['deleted'] = \\App\\User::where('deleted', '=', 1)->count();\n $count['active'] = \\App\\User::where('active', '=', 1)->count();\n $count['unActive'] = \\App\\User::where('active', '=', 0)->count();\n $count['all'] = \\App\\User::count();\n return response()->json($count);\n }", "title": "" }, { "docid": "7d9fe11d548f654f6d1eb4bf15cf0b18", "score": "0.65578693", "text": "public function getTotalUser(){\n $this->db->select('count(*) as total');\n $this->db->from('user');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" }, { "docid": "0a32c852ff8e4916ec8ef9813794c0d2", "score": "0.6546024", "text": "public function getCounts()\n\t{\n\t\tif($this->counts)\n\t\t{\n\t\t\treturn $this->counts;\n\t\t}\n\t\t\n\t\t$counts = DB::table('dx_users')\n\t\t\t->select(DB::raw('team_id, COUNT(*) AS count'))\n\t\t\t->whereNotIn('id', Config::get('dx.empl_ignore_ids', [1]))\n ->whereNull('termination_date')\n\t\t\t->groupBy('team_id')\n\t\t\t->get();\n\t\t\n\t\t$unassignedCount = 0;\n\t\t\n\t\tforeach($counts as $item)\n\t\t{\n\t\t\tif(!$item->team_id || !isset($this->getTeams()[$item->team_id]))\n\t\t\t{\n\t\t\t\t$unassignedCount = $item->count;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->counts[$item->team_id] = [\n\t\t\t\t'count' => $item->count,\n\t\t\t\t'percent' => ($item->count / $this->getTotalCount()) * 100\n\t\t\t];\n\t\t}\n\t\t\n\t\tif($unassignedCount)\n\t\t{\n\t\t\t$this->counts['unassigned'] = [\n\t\t\t\t'count' => $unassignedCount,\n\t\t\t\t'percent' => ($unassignedCount / $this->getTotalCount()) * 100\n\t\t\t];\n\t\t}\n\t\t\n\t\treturn $this->counts;\n\t}", "title": "" }, { "docid": "196837ea0bf3b6440f822170360606ac", "score": "0.65074193", "text": "public function get_total_user_logs(){\r\n\t\treturn $this->db->count_all('hores_user_logs');\r\n\t}", "title": "" }, { "docid": "943f12f9a33a46028877ee65c24cb11b", "score": "0.64974403", "text": "public function record_count() {\n return $this->db->count_all(\"users\");\n }", "title": "" }, { "docid": "ab6a13123f6b15ee6eeea7a1c4cdd359", "score": "0.64952755", "text": "public function countUsersForType() {\n\n\t\ttry {\n\t\t\t$query = (\"SELECT count(*) AS 'Admin', (SELECT count(*) FROM professional) AS 'Professional', \n\t\t\t\t(SELECT count(*) FROM registered) AS 'Registered' FROM administrator;\");\n\t\t\t$resultat = $this->getLink()->prepare($query);\n\t\t\t$resultat->execute();\n\t\t\t$result = $resultat->FetchAll();\n\t\t} catch(PDOException $ex) {\n\t\t\techo \"An Error ocurred!\";\n\t\t\tsome_loggging_function($ex->getMessage());\n\t\t} finally {\n\t\t\treturn $result;\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "70fcd09380cc0bf0c680679c856834f6", "score": "0.648862", "text": "public static function userRegisterTodayCount()\n {\n return UserCategory::where('created_at', '>=', Carbon::today())->count();\n }", "title": "" }, { "docid": "175567d1cfa67072497d0b4e8dd933b9", "score": "0.64738905", "text": "function getOffice365ServicesUserCounts($period){\n return $this->addReportQuery(\"getOffice365ServicesUserCounts\",$period);\n }", "title": "" }, { "docid": "7bace6132e99450326d35430500d31c7", "score": "0.64727545", "text": "public function get_member()\n {\n return $this->db->count_all('user');\n \n }", "title": "" }, { "docid": "50756ee6143296e51396ffe7d3b4ce7a", "score": "0.6452379", "text": "public static function getCounts() {\n\n $counts = array();\n \n if (isset($_SESSION['culturefeed_userpoints_wishlist'])) {\n foreach ($_SESSION['culturefeed_userpoints_wishlist'] as $promotionId => $data) {\n $counts['promotionCount' . $promotionId] = $data['count'];\n }\n }\n \n return $counts;\n \n }", "title": "" }, { "docid": "7b4edcc2d160347c3ab7bf4ce8082a34", "score": "0.64468986", "text": "public function getNumberOfUsers(){\n\t\t$conn = DB::getInstance();\n\t\t$result = $conn->query(\"SELECT count(*) FROM users\")->fetch(PDO::FETCH_NUM);\n\t\treturn $result[0];\n\t}", "title": "" }, { "docid": "4e48d8cff1d3057a2cd45c4a693f4f26", "score": "0.64037496", "text": "function getCount(){\n $manager = new ManageMember($this->getDataBase());\n return $manager->getAllCount();\n }", "title": "" }, { "docid": "ed7c0f6889cf9c0a2c779af2ad0d993c", "score": "0.6376205", "text": "public function vouchersPINListCount(){\n \n\t\n\t$user_info = $this->session->userdata('logged_user');\n $user_id = $user_info['user_id'];\n\t\t$referral_code = singleDbTableRow($user_id)->referral_code;\n\t\t$currentUser = singleDbTableRow($user_id)->role;\n\t\t\n \n\t\t if($currentUser == 'admin'){\n $queryCount = $this->db->where('identity', 'Voucher')->count_all_results('vouchers');\n\t\t\treturn $queryCount;\t\t\n\t\t\t\t}\n\t\telseif($currentUser == 'agent'){ \n\t\t\t$queryCount = $this->db->where('to_role' , '24')->count_all_results('vouchers');\t\t\t\n\t\t\t\n\t\t\treturn $queryCount;\n\t\t\t\t}\n\t\telseif($currentUser == 'user'){ \n\t\t\t$queryCount = $this->db->where( 'to_role' , '22' )->count_all_results('vouchers');\t\t\t\n\t\t\t\n\t\t\treturn $queryCount;\n\t\t\t\t}\n \n }", "title": "" }, { "docid": "155a88c850015acbca1829bf1d1e0724", "score": "0.63686144", "text": "function get_user_total(){\n $this->db->select('*');\n $this->db->select('count(*) as total');\n $this->db->select('(SELECT count(user.id)\n FROM user\n WHERE (user.status = 1)\n )\n AS active_user',TRUE);\n\n $this->db->select('(SELECT count(user.id)\n FROM user\n WHERE (user.status = 0)\n )\n AS inactive_user',TRUE);\n\n $this->db->select('(SELECT count(user.id)\n FROM user\n WHERE (user.role = \"admin\")\n )\n AS admin',TRUE);\n\n $this->db->from('user');\n $query = $this->db->get();\n $query = $query->row();\n return $query;\n }", "title": "" }, { "docid": "88b3b0ff29dcc9ae123c636333c29703", "score": "0.6359186", "text": "function get_number_of_users()\n{\n $user_table = Database :: get_main_table(TABLE_MAIN_USER);\n $sql = \"SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u\";\n if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {\n $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);\n $sql.= \" INNER JOIN $access_url_rel_user_table url_rel_user ON (u.user_id=url_rel_user.user_id)\";\n }\n if (isset($_GET['keyword'])) {\n $keyword = Database::escape_string(trim($_GET['keyword']));\n $sql .= \" WHERE (u.firstname LIKE '%$keyword%' OR\n u.lastname LIKE '%$keyword%' OR\n concat(u.firstname,' ',u.lastname) LIKE '%$keyword%' OR\n concat(u.lastname,' ',u.firstname) LIKE '%$keyword%' OR\n u.username LIKE '%$keyword%' OR\n u.email LIKE '%$keyword%' OR\n u.official_code LIKE '%$keyword%') \";\n }\n $res = Database::query($sql);\n $obj = Database::fetch_object($res);\n\n return $obj->total_number_of_items;\n}", "title": "" }, { "docid": "385451920d23e7aa85590ea80e9c979a", "score": "0.6353044", "text": "public function onStatisticsData()\n {\n //MAKE QUERY\n\t\t$total_rows = 0;\n $total_rows = $this->select()\n ->from($this->info('name'), array('COUNT(*) AS count'))\n\t\t\t\t\t\t\t\t\t\t->where('draft = ?', 0)\n\t\t\t\t\t\t\t\t\t\t->where('status = ?', 1)\n\t\t\t\t\t\t\t\t\t\t->where('approved = ?', 1)\n\t\t\t\t\t\t\t\t\t\t->query()\n\t\t\t\t\t\t\t\t\t ->fetchColumn();\n\n\t\t//RETURN RESULTS\n\t\treturn $total_rows;\n }", "title": "" }, { "docid": "2eee5fd85ad91554f10ab223b856c81e", "score": "0.6343737", "text": "protected function checkUserCount()\n {\n $user = User::count();\n return $user;\n }", "title": "" }, { "docid": "b00b3dcb484cb2c14610cf0978c94ac8", "score": "0.6327854", "text": "public function getUsersActives(){\n $this->db->select('COUNT(DISTINCT idUSer) as total');\n $this->db->from('init_app');\n\t\t$this->db->where('fecha >= DATE_ADD(CURDATE(), INTERVAL -7 DAY)');\n\t\t$this->db->where('fecha <= CURDATE()');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" }, { "docid": "af755a449c33b1de911a889bffa1bf63", "score": "0.6323388", "text": "public function getNewUserCount() {\n $users = User::where('created_at', '>', Carbon::now()->subDays(6))->get();\n $tomorrow = Carbon::tomorrow()->format('Y-m-d');\n $today_subs = $this->getSevenDates('Y-m-d');\n $new_users_count = [\n $users->whereBetween('created_at', [$today_subs[0], $tomorrow])->count(),\n $users->whereBetween('created_at', [$today_subs[1], $today_subs[0]])->count(),\n $users->whereBetween('created_at', [$today_subs[2], $today_subs[1]])->count(),\n $users->whereBetween('created_at', [$today_subs[3], $today_subs[2]])->count(),\n $users->whereBetween('created_at', [$today_subs[4], $today_subs[3]])->count(),\n $users->whereBetween('created_at', [$today_subs[5], $today_subs[4]])->count(),\n $users->whereBetween('created_at', [$today_subs[6], $today_subs[5]])->count()\n ];\n return $new_users_count;\n }", "title": "" }, { "docid": "78c18d5706c4bc925f1c8c4fdc83c860", "score": "0.63118666", "text": "public static function numUsers(){\n $sql = \"SELECT COUNT(*) AS NUMUSERS FROM `USERS`\";\n $result = self::execQuery ($sql);\n $row = null;\n //Due to the filter is the primary key, we only have one result. We use fetch\n if(isset($result)){\n $row = $result->fetch(PDO::FETCH_ASSOC);\n }\n return $row;\n }", "title": "" }, { "docid": "3e545f224a54888145a7b2b085ee010d", "score": "0.63108206", "text": "public function online_users_count(){\n $sql = $this->pdo->prepare(\"SELECT * FROM core_visitors WHERE activity='1' \");\n $sql->execute();\n return count($sql->fetch());\n }", "title": "" }, { "docid": "4cc283ad677e39500a7d8533cc9baa2f", "score": "0.6298581", "text": "public function GetInactiveMembers()\n {\n $count = User::where('status', '=', 'inactive')->get()->count();\n return $count;\n }", "title": "" }, { "docid": "531f7ad9cdeb83db1c8d883e5c13ad41", "score": "0.6292973", "text": "function getOffice365ActivationCounts(){\n return $this->addReportQuery(\"getOffice365ActivationCounts\");\n }", "title": "" }, { "docid": "9aa08f6d3f827f86b54b9e973b7d7f8e", "score": "0.62845296", "text": "function vku_get_active_count($account){\nglobal $user;\n\n if(!$account){\n $account = $user;\n }\n\n $dbq = db_query(\"SELECT count(*) as count FROM lk_vku WHERE uid='\". $account -> uid .\"' AND vku_status='active'\");\n $count = $dbq -> fetchObject();\n \n\nreturn $count -> count;\n}", "title": "" }, { "docid": "a3726111ebcb3a23eb5353e3c06bb28a", "score": "0.62549496", "text": "function getDataCount();", "title": "" }, { "docid": "9eb66c312657182d3230fc3fbd25d6e4", "score": "0.6250826", "text": "public function getTotalCount()\n\t{\n\t\tif($this->totalCount)\n\t\t{\n\t\t\treturn $this->totalCount;\n\t\t}\n\t\t\n\t\t$this->totalCount = User::whereNotIn('id', Config::get('dx.empl_ignore_ids', [1]))\n ->whereNull('termination_date')\n ->count();\n\t\t\n\t\treturn $this->totalCount;\n\t}", "title": "" }, { "docid": "9c28e64cf7da5d7993cd8fa7b42485d7", "score": "0.6243933", "text": "public static function countTotalReferredUsers(): int\n {\n return UserRegistrationCodeUse::count();\n }", "title": "" }, { "docid": "496f82a5185c3582e82e25fb2ceb5e2b", "score": "0.62425345", "text": "public function count($filter) \n {\n if ($filter == \"active\") return User::where('type', '!=', 'donor')->where(['active' => 1])->count();\n if ($filter == \"inactive\") return User::where('type', '!=', 'donor')->where(['active' => 0])->count();\n\n return User::where('type', '!=', 'donor')->count();\n }", "title": "" }, { "docid": "22bdeb40a8cb08fa5aff538521185234", "score": "0.62357515", "text": "function get_all_usuarios_count()\n {\n $this->db->from('usuarios');\n return $this->db->count_all_results();\n }", "title": "" }, { "docid": "2ee173bfc8d620324657b15e5ddb8878", "score": "0.6234595", "text": "public static function getActiveUserCount($user_name)\n {\n return self::where('status', '=', 'ACTIVE')\n ->where('username', '=', $user_name)\n ->count();\n }", "title": "" }, { "docid": "71c3218e884468e6c67bd9f8b088c38e", "score": "0.6208616", "text": "abstract public function getUsersCacheCounts(array $params);", "title": "" }, { "docid": "178cf21f197ed1c7334fd9f29b5df117", "score": "0.61934125", "text": "function get_online_users_count($range = 0) {\n if (!$range || !is_numeric($range)) {\n // Count the TRUE number of users online. GridUser.Online is not reliable.\n $this->db->from('Presence');\n // Don't count ghosts. Sometimes OpenSim gets confused and leaves people online when they are not, but at least sets the region they are in to the NULL key.\n $this->db->where('RegionID <>', '00000000-0000-0000-0000-000000000000');\n }\n else {\n $this->db->from('GridUser');\n $this->db->where('Login >', \"UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()) - $range))\", FALSE);\n }\n $count = $this->db->count_all_results();\n $this->response->success = TRUE;\n $this->response->data = $count;\n// return $this->db->last_query();\n return $count;\n }", "title": "" }, { "docid": "24cd5650be57658be282fe0a3cdc3ad2", "score": "0.6189657", "text": "public static function count() {\n $statement = self::getDatabase()->query(\"SELECT count(*) FROM user\");\n return $statement->fetchColumn();\n }", "title": "" }, { "docid": "51e206bec9893434cc6bcefbebc15802", "score": "0.6188039", "text": "function count(){\n\t\t$query = $this->db->count_all($this->table);\n $data['table'] = $this->table;\n $data['count'] = $query;\n return $data;\n\t}", "title": "" }, { "docid": "d9eb15815e9e6c0572a1cbd90d242b83", "score": "0.6180798", "text": "public function totalUsers(): int\n {\n return $this->user->getRepo()->count();\n }", "title": "" }, { "docid": "f7701fca05b41d3fbdc4bae5dddaf980", "score": "0.6171574", "text": "public function getCount() { return $this->data['count']; }", "title": "" }, { "docid": "f08ea53b1eebe9942ddc7a740986a438", "score": "0.6169169", "text": "function count() {\n $query = $this->db->count_all($this->table);\n $data['table'] = $this->table;\n $data['count'] = $query;\n return $data;\n }", "title": "" }, { "docid": "0de0fa3b34bdfdf3339b71ae67eb7968", "score": "0.61620146", "text": "private function common_values(){\n $interview_count = User::where('status_id', 2)->count(); \n $active_count = User::where('status_id', 3)->count();\n $expired_count = User::where('status_id', 4)->count();\n $banned_count = User::where('status_id', 5)->count();\n $new_flags = Flag::where('admin_check', 0)->count();\n return([\n 'interview_count'=>$interview_count,\n 'active_count'=>$active_count,\n 'expired_count'=>$expired_count,\n 'banned_count'=>$banned_count,\n 'new_flags'=>$new_flags,\n ]);\n }", "title": "" }, { "docid": "6f6160177d4e10ca1bb61f1771a5c1f3", "score": "0.61604005", "text": "public function getCount() {\n // Need to check authentication\n if (empty($_SERVER['HTTP_AUTH_TOKEN']) || !$userToken = UserToken::checkAuth($_SERVER['HTTP_AUTH_TOKEN'])) {\n return Response::json(array('message' => 'The authentication is failed.'), 401);\n }\n\n $types = @explode(',', Input::get('type', ''));\n $types = is_array($types) ? $types : array();\n\n $role = Input::get('role', '');\n $dateFrom = Input::get('dateFrom', '');\n $dateTo = Input::get('dateTo', '');\n\n return Response::json(Report::count($userToken->UserID, $types, $role, $dateFrom, $dateTo), 200);\n }", "title": "" }, { "docid": "8ca70ff0793e3b51e51f9ff2b089afed", "score": "0.615999", "text": "function cms_getCountUsers() {\n\n global $conn;\n $statement = \"SELECT count(*) from users\";\n\n if ($res = $conn->query($statement)) {\n if ($res->num_rows > 0) {\n $row = $res->fetch_assoc();\n\n $amount = $row['count(*)'];\n return $amount;\n }\n }\n return \"0\";\n}", "title": "" }, { "docid": "6f290690227aae3e0ca39b1b9d3c0b72", "score": "0.6158963", "text": "public function getPostCount($user);", "title": "" }, { "docid": "a2c229ddc049b8dc416b188f82db0340", "score": "0.615403", "text": "function extra_siteinfo_user_count() {\n $args = func_get_args();\n if ($args) {\n foreach ($args as $role) {\n $query = db_select('users', 'u');\n $query->join('users_roles', 'ur', 'u.uid = ur.uid');\n $query->fields('u', array('uid'));\n $query->condition('ur.rid', $role, \"=\");\n $result = $query->execute();\n drush_print(\"Number of users with role id '\" . $role . \"' are : \" . $result->rowCount() . \" users.\");\n }\n }\n else {\n $query = db_select('users', 'u');\n $query->fields('u', array('uid'));\n $result = $query->execute();\n drush_print('Total Number of Users : ' . $result->rowCount());\n }\n}", "title": "" }, { "docid": "6ef1b3e87a979a1d196384ad90385e74", "score": "0.61513704", "text": "function getUsuariosActivos() \n{\n\t$db = getDBConnection(); // Obtenemos la conexion\n \t$stmt = $db->prepare('SELECT COUNT(*) FROM users WHERE status_id=2'); // Preparamos la consulta\n \t$stmt->execute(); // Realizamos el query a la BD\n \t$r = $stmt->fetch(PDO::FETCH_ASSOC); // Obtenemos el resultado en un array asociativo.\n \tif ($r) {\n \t\treturn $r['COUNT(*)']; // Devolvemos el total\n \t}\n \tcloseDBConnection($db); // Cerramos la conexion a la BD.\n}", "title": "" }, { "docid": "b19a96d555f170e9a7e9f0ba02135057", "score": "0.61420286", "text": "public function getTotalCount();", "title": "" }, { "docid": "b19a96d555f170e9a7e9f0ba02135057", "score": "0.61420286", "text": "public function getTotalCount();", "title": "" }, { "docid": "5f19ca4668b1266247002cf6b1263fa7", "score": "0.61385256", "text": "public function countNonSystemUsers();", "title": "" }, { "docid": "00bad393c378f4459f17ec1528be9874", "score": "0.6134761", "text": "public function getCounts()\n {\n $log = AccessLog::all()->groupBy('user_id');\n\n $counts = [];\n $all = 0;\n foreach ($log as $l) {\n $first = $l[0];\n $user = $first->user ? $first->user : $this->getDeletedFakeUser();\n $size = sizeof($l);\n $counts[] = [\n 'size' => $size,\n 'id' => $first->user_id,\n 'name' => $user->username\n ];\n $all += $size;\n }\n\n return [\n 'all' => $all,\n 'counts' => $counts\n ];\n }", "title": "" }, { "docid": "7fddf5a73c99b2f0361a494b42d9a10e", "score": "0.61294603", "text": "public function getCount() {\n\t\treturn $this->getMember('count');\n\t}", "title": "" }, { "docid": "5bdb5960096d26c4f0dcbcba4d00d526", "score": "0.612752", "text": "public function getNumUsers() {\r\n\t\t$stmt = $this->db->prepare(\"SELECT COUNT(username) FROM users\");\r\n\t\t$stmt->execute();\r\n\t\t$result = $stmt->fetch(PDO::FETCH_NUM);\r\n\t\t$numUsers = $result[0];\r\n\t\treturn $numUsers;\r\n\t}", "title": "" }, { "docid": "6dd7df799b6c08549edcc69dcba3e5d0", "score": "0.6124442", "text": "public function searchCount() {\n try {\n if (!($this->userLoginHistory instanceof Base_Model_ObtorLib_App_Core_User_Entity_UserLoginHistory)) {\n throw new Base_Model_ObtorLib_App_Core_User_Exception(\" UserLoginHistory Entity not initialized\");\n } else {\n $total_number = 0;\n $arrWhere = array();\n $arrUserLoginHistory = array();\n \n \n $userLoginHistorySQL = \"SELECT count(id) As tot FROM tbl_user_login_history \";\n \n $userId = $this->userLoginHistory->getUserId();\n if ($userId) {\n array_push($arrWhere, \"tbl_user_id = '\" . $userId . \"'\");\n }\n\n if (count($arrWhere) > 0) {\n $userLoginHistorySQL.= \"WHERE \" . implode(' AND ',$arrWhere);\n }\n\n $db = Zend_Db_Table_Abstract::getDefaultAdapter();\n $result \t= $db->fetchRow($userLoginHistorySQL);\n $total_number = $result['tot']; \n return $total_number;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Asset_Exception($ex);\n }\n }", "title": "" }, { "docid": "abafdeacf86751a9fa61a6618bf6727c", "score": "0.6117569", "text": "public function getCountAllUsers()\r\n {\r\n return (int) $this->createQueryBuilder('u')\r\n ->select('COUNT(u.id)')\r\n ->getQuery()\r\n ->getSingleScalarResult();\r\n }", "title": "" }, { "docid": "b94adbe41684e930397206578527a96e", "score": "0.611291", "text": "public function getCustomerCount();", "title": "" }, { "docid": "a9d22f57b172110e52a6f1878cf1047d", "score": "0.6109865", "text": "function count_users(){\n\t\t// Se realiza la conexion a la bd\n\t\tglobal $db;\n\t\t$db = getPDO();\n\t\t// Se prepara la solicitud\n\t\t$stmt = $db->prepare(\"SELECT * FROM user\");\n\t\t// Se ejecuta\n\t\t$stmt -> execute();\n\t\t// Se cuentan los registros\n\t\t$r = $stmt->rowCount();\n\t\t// Y el resultado es lo que se regresa, el número de registros\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "9cb964c6635ad68194745bb82888d556", "score": "0.6109317", "text": "public function getAgeToSexCount($con_id=0){\r\n $user = new User();\r\n $rate = new Rate();\r\n $m = 'male';\r\n $f = 'female';\r\n \r\n $tab1 = $rate->getCountBySexAge(0, 18, $con_id, $m);\r\n $tab2 = $rate->getCountBySexAge(0, 18, $con_id, $f);\r\n \r\n $tab3 = $rate->getCountBySexAge(18, 29, $con_id, $m);\r\n $tab4 = $rate->getCountBySexAge(18, 29, $con_id, $f);\r\n \r\n $tab5 = $rate->getCountBySexAge(29, 44, $con_id, $m);\r\n $tab6 = $rate->getCountBySexAge(29, 44, $con_id, $f);\r\n \r\n $tab7 = $rate->getCountBySexAge(44, 99, $con_id, $m);\r\n $tab8 = $rate->getCountBySexAge(44, 99, $con_id, $f);\r\n \r\n $array = array($tab1,$tab2 ,$tab3,$tab4, $tab5,$tab6, $tab7,$tab8);\r\n \r\n return ($this->javascriptArray($array));\r\n \r\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "6e26adb4c5d905fb9fbb8e12c8c1acfb", "score": "0.0", "text": "public function update(Request $request, Glossary $glossary)\n {\n //\n }", "title": "" } ]
[ { "docid": "3a50a43d393625d85bd96071942ad788", "score": "0.75714874", "text": "public function updateResource(ResourceInterface $resource);", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "752f5b9bc26efe1c7c8a075d40083e96", "score": "0.6809332", "text": "public function update(Request $request, Resource $resource)\n {\n $resource->update($request->all());\n if(isset($request->document)){\n $resource->path = $request->document->store('resources');\n $resource->save();\n }\n\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "7445b5d4d91cbe19348b2df243d18aab", "score": "0.6627074", "text": "public function update(Request $request, Resource $resource)\n {\n $validatedData = $request->validate([\n 'name' => 'required',\n 'type' => 'required',\n 'link' => 'required',\n ], [\n 'name.required' => 'Name is required',\n 'type.required' => 'Resource Type is required',\n 'link.required' => 'Resource link is required',\n \n ]); \n \n $user = $resource->update($validatedData); \n $notification = array(\n 'message' => 'Resource updated successfully.', \n 'alert-type' => 'success'\n );\n activity() \n ->withProperties(['Resource updated' => 'customValue'])\n ->log('Resource updated successfully.');\n return back()->with($notification);\n }", "title": "" }, { "docid": "bcac9b66cace80123502cdd07ed21469", "score": "0.6605713", "text": "public function update(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "f85fbc241b72589b5e2a6a92891995d8", "score": "0.6560501", "text": "public function update(StoreResourceRequest $request, $id)\n {\n $user = Auth::user();\n\n $validator = $request->validated();\n\n $tag = $this->getTag($request);\n\n // add media to users\n // attach file to collection\n $resource = $user\n ->addMedia($request->file_name)\n ->withCustomProperties([\n 'description' => $request->description,\n 'name' => $request->name,\n 'category' => $request->category\n ])\n ->toMediaCollection($tag['tag']);\n\n // delete existing resource\n if ($resource) {\n // add event to resources\n event(new ResouceUploadSuccessfull($resource));\n\n Session::flash('success', 'Resource edited successfully');\n\n // delete\n $user->deleteMedia($id);\n\n return redirect()->route('resources.index');\n } else {\n return redirect()\n ->back()\n ->withErrors($validator)\n ->withInput();\n }\n }", "title": "" }, { "docid": "9901ee04c4556a77d0429d850748027c", "score": "0.6518833", "text": "public function updateFromResource(\n $resource,\n $entity\n );", "title": "" }, { "docid": "7cc5a0be3b2151f9d7920f9c2df70a9d", "score": "0.6504825", "text": "public static function update ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $list) {\n // If an object with the given id exists, update the doc. (replace it)\n if ($list['id'] == $data['id']) {\n $list[$i] = $data;\n // Save back list.\n file_put_contents('../json/' . $resource . '.json', json_encode($list, JSON_PRETTY_PRINT|JSON_NUMERIC_CHECK));\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "cc1bb24b76b18f977d0e3ddafd2da367", "score": "0.6318228", "text": "public function updateWithForm(ResourceInterface $resource, FormInterface $form);", "title": "" }, { "docid": "462cfa1506a93082bf1af8b3d4ee6ec9", "score": "0.62273467", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n\n // make sure that the id has not been changed\n $resource->orderId = $id;\n\n $orderIndex = 0;\n foreach ($this->orders->order as $order) {\n if ($order->orderId == $id ) {\n $this->orders->order[$orderIndex] = $resource;\n }\n $orderIndex = $orderIndex + 1;\n }\n $this->writeOrders();\n\n // return true to indicate that the resource\n // was successfully updated or false otherwise\n return true;\n }", "title": "" }, { "docid": "7d6afd369d487ebb6851cb2c895ec06d", "score": "0.6224019", "text": "public function update(Request $request, $id)\n {\n //\n\n $this->validate($request,[\n 'title'=> 'required|max:255',\n 'description' => 'required',\n 'category_id'=> 'required'\n ]);\n\n $resource = Resource::find($id);\n //Check if there is a new featured image\n if($request->hasFile('featured')){\n $featured = $request->featured;\n \n $featured_new_image = time().$featured->getClientOriginalName();\n\n $featured->move('uploads/resource/', $featured_new_image);\n\n $resource->featured ='uploads/resource/'.$featured_new_image;\n }\n\n if($request->hasFile('file')){\n $file = $request->file;\n \n $file_new = time().$file->getClientOriginalName();\n\n $file->move('uploads/resource/', $file_new);\n\n $resource->file ='uploads/resource/'.$file_new;\n }\n \n\n $resource->title = $request->title;\n $resource->description =$request->description;\n $resource->category->id = $request->category_id;\n \n $resource->save();\n\n\n Session::flash('success', 'resource was Succcessfully Updated');\n \n return redirect()->route('resources');\n }", "title": "" }, { "docid": "97ab59f4e7b15c75870b07fa0dd39aba", "score": "0.6154258", "text": "public function update(UpdateResourceRequest $request, Resource $resource)\n {\n $resource->fill($request->validated());\n $resource->save();\n\n flash(__('resource.update_succeeded'), 'success');\n\n return redirect(\\localized_route('resources.show', $resource));\n }", "title": "" }, { "docid": "a8f8f45d5f4601812b2ce88dd6dbe531", "score": "0.60922074", "text": "public function update(FileStoreRequest $request, File $file): FileResource\n {\n $filePathToBeDeleted = $file->path;\n\n $uploadFile = $request->file('file');\n $path = $uploadFile->store('files');\n $file->fill([\n 'name' => $uploadFile->getClientOriginalName(),\n 'size' => $uploadFile->getSize(),\n 'path' => $path,\n ])->save();\n\n // 更新前のファイルを削除する\n Storage::delete($filePathToBeDeleted);\n\n return new FileResource($file);\n }", "title": "" }, { "docid": "73fa3eea6cf8fa9ffa3163d6f041f35a", "score": "0.6090497", "text": "public static function update(){\n $idResource = $_REQUEST[\"idResource\"];\n $name = $_REQUEST[\"name\"];\n $description = $_REQUEST[\"description\"];\n $location = $_REQUEST[\"location\"];\n $image = $_REQUEST[\"image\"];\n\n $result = DB::dataManipulation(\"UPDATE resources \n SET name='$name', description='$description', location='$location', image='$image'\n WHERE idResource = '$idResource'\");\n return $result;\n }", "title": "" }, { "docid": "c7e58c377e7036109c1a48ddf3dcfefc", "score": "0.60779715", "text": "public function update($id, $resource, callable $closure = null) : string;", "title": "" }, { "docid": "0cfb002e6b713b68d223072995d11de5", "score": "0.59343815", "text": "public function update(Request $request, $id)\n {\n try{\n Log::info('Andre sent me :'. $id );\n\n// $extension = $request->header('Content-Type');\n $resourceFile = $request->file('resource');\n $resource = Resource::find($id);\n $orientation = $request->input('orientation');\n $os = $request->input('os');\n\n if (!$resource){\n return response()->json(['status'=>false, 'mess'=>'Resource not found'], 404);\n }\n\n $extension =($resource->type=='video')?'mp4':'jpg';\n\n $resourceName = $resource->type.'_'.str_random(20).'.'.$extension;\n\n Log::info('resource Name:'. $resourceName);\n// file_put_contents(public_path(\"uploads/targets/$resourceName\"),$resourceFile);\n $resourceFile->move(public_path(\"uploads/targets/\"),$resourceName);\n\n $resource->resource = asset('uploads/targets/'.$resourceName);\n $resource->orientation = $orientation;\n\n if($extension == 'jpg'){\n\n @unlink(Resource::getPublicPath($resource->thumbnail,'uploads'));\n\n $imgIntervention = Image::make(public_path(\"uploads/targets/$resourceName\"));\n $imgIntervention->resize(300, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n $imgIntervention->save(public_path(\"uploads/targets/thumb_$resourceName\"));\n\n $resource->thumbnail = asset(\"uploads/targets/thumb_$resourceName\");\n\n } elseif ($extension == 'mp4' && $os == 'ios'){\n Log::info('coding video:'.$resourceName);\n $path = \"uploads/targets/$resourceName\";\n $codecName = $this->codecVideo($path);\n $resource->resource = asset(\"uploads/targets/$codecName\");\n\n @unlink(public_path(\"uploads/targets/$resourceName\"));\n }\n $resource->save();\n\n return response()->json([\n 'status'=>true,\n 'mess'=>'Resource updated successfully',\n 'resource' => $resource->resource,\n 'orientation' => $orientation,\n 'id' => $resource->id\n ], 200);\n\n } catch (RuntimeException $e){\n Log::info(\"Run time exception :::::::{$e->getMessage()},\n {$e->getFile()},\n {$e->getLine()},\n {$e->getCode()}:::::::\n {$e->getPrevious()},\n {$e->getTraceAsString()}\");\n\n return response()->json([\n 'status'=>false,\n 'message' => 'Service not available'\n ]);\n } catch (\\Exception $e){\n Log::info(\"Error uploading resource {$e->getMessage()},{$e->getLine()}\");\n return response()->json(['status'=>false, 'mess'=>'Something bad happened','mess'=>$e->getMessage()], 500);\n }\n\n }", "title": "" }, { "docid": "224012b8fa6632fd147301ce49677476", "score": "0.5919281", "text": "public function update($path = null);", "title": "" }, { "docid": "0071066085a87af5ff4e3caa00181951", "score": "0.58929604", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'storage_name' => 'required',\n 'storage_brand' => 'required',\n 'storage_inv_level' => 'required',\n 'storage_remarks' => 'required',\n 'storage_price' => 'required',\n 'staff_id' => 'required'\n ]);\n\n $storage = Storage::find($id);\n $storage->storage_name = $request->get('storage_name');\n $storage->storage_brand = $request->get('storage_brand');\n $storage->storage_inv_level = $request->get('storage_inv_level');\n $storage->storage_remarks = $request->get('storage_remarks');\n $storage->storage_price = $request->get('storage_price');\n $storage->staff_id = $request->get('staff_id');\n $storage->save();\n return redirect()->route('storage.index')->with('success', 'Data Updated');\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d77b59532b99d1c5a851cba200aa54d0", "score": "0.5855354", "text": "public function update(EntrepriseStoreRequest $request, $id)\n {\n \n$Entreprise=Entreprise::get()->where('id',$id)->first();\n if($Entreprise->update($request->toArray())) {\n return new EntrepriseResource($Entreprise);\n }\n }", "title": "" }, { "docid": "97987f7f27fb22ee032873cda433d9bd", "score": "0.5833858", "text": "public function update($id)\n\t{\n\t\t// $validator = Resource::validate(Input::all());\n\t\t// if ($validator->fails()) {\n\t\t// \treturn Redirect::to('resources/'.$id. '/edit')\n\t\t// \t\t->withErrors($validator)\n\t\t// \t\t->withInput(Input::all());\n\t\t// } else {\n\t\t\t// store\n\t\t\t$resource = Resource::find($id);\n\t\t\t$resource->name = Input::get('name');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->url \t\t\t = Input::get('url');\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->faculty = Input::get('faculty');\n\t\t\t$tagIds = array();\n\n\t\t\t$deviceIds = Input::get('device');\n\n\t\t\t$tag_ids = Input::get('tag_ids');\n\n\t\t\tif($tag_ids !=''){\n\t\t\t\t $tagIds = explode(\",\", $tag_ids);\n\t\t\t\t $resource->tags()->sync($tagIds); \n\t\t\t}\n\t\t\tif(($deviceIds != '') || ($deviceIds === ''))\n\t\t\t{\n\t\t\t\t$resource->devices()->delete();\n\t\t\t\tforeach ($deviceIds as $device_type) {\n\t\t\t\t\t$device = new Device(array(\"device_type\" => $device_type));\n\t\t\t\t\t$resource->devices()->save($device);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$resource->save();\n\t\t\t// redirect\n\t\t\treturn Redirect::to('resources')->with('message', 'Successfully updated');\n\t\t// }\n\t}", "title": "" }, { "docid": "6459eee6e3a41ede04d36d11caa1d5eb", "score": "0.58181334", "text": "public function updateStream($path, $resource, Config $config) {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "db09cf30f818ecb3e902128794767b8d", "score": "0.5746784", "text": "public function update(Request $request, $resourceKey, $resourceId)\n {\n $resource = Admin::findResourceByKey($resourceKey);\n\n if (! $resource) {\n abort(404);\n }\n\n $model = $resource::$model::findOrFail($resourceId);\n\n $resource = $resource::forModel($model);\n\n $resource->fill($request, true);\n\n $resource->model()->save();\n\n return response()->json([\n 'resource' => $resource->model(),\n 'redirectTo' => \"/resources/{$resource::key()}\",\n ]);\n }", "title": "" }, { "docid": "c663fe1b05bf4d8d7ede798fe4662e67", "score": "0.5743986", "text": "public function update(Request $request, $id)\n {\n $update = File::find($id);\n Storage::delete('public/img/'.$update->src);\n Storage::put('public/img', $request->file(('src')));\n $update->src = $request->file('src')->hashName();\n $update->save();\n return redirect('/files');\n }", "title": "" }, { "docid": "933f18c2310d5e305818c242d32a6c28", "score": "0.57367915", "text": "public function put($resource, $params=[])\n {\n return $this->request((object)['method'=>'PUT', 'url'=>$resource, 'params'=>$params]);\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "60783debc10f87ff4cab890105f5fde2", "score": "0.57210916", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "40ffb6251c952892e7a1d8715e96cf6b", "score": "0.5709733", "text": "public function update(UpdateProductPut $request, $id)\n {\n\n // $validate = $request->validated();\n $product = Product::find($id);\n $product->name = $request->name;\n $product->sale_price = $request->sale_price;\n $product->stock = $request->stock;\n $product->description = $request->description;\n $product->status = $request->status;\n $product->id_category = $request->id_category;\n if ($request->file('url_image')) {\n $product->url_image = $this->UploadImage($request);\n }\n $product->save();\n return redirect()->route('get-product');\n }", "title": "" }, { "docid": "407b4de54d22bd98c040ebf1ed10ebd4", "score": "0.56991494", "text": "public function update(Request $request, $id)\n {\n $Image = Image::find($id);\n $product_id = $Image->product()->get()->first()->id;\n $main = $Image->main;\n\n $this->validate($request,[\n 'main'=>'required|boolean|in:' . $main,\n 'name' => 'required|max:10000|mimes:png,jpg,jpeg',\n ]);\n\n $storage = request()->file('name')->store('products','s3');\n\n $response = Image::find($id)->update([\n 'product_id'=>$product_id,\n 'main'=>$request->input('main'),\n 'name'=>$storage\n ]);\n\n $message = $response ? 'The Image was updated successfully' : 'the image could not be updated';\n\n return response(['message'=>$message],201);\n }", "title": "" }, { "docid": "1332499ac23c48464ff7796319792c7a", "score": "0.5694969", "text": "public function update(Request $request, $id)\n {\n $user = $request->user();\n $data = $request->only(['name', 'description']);\n $file = File::findOrFail($id);\n\n // not file owner\n if ($file->uploaded_by != $user->id) {\n return $this->errorUnauthorized('Unauthorized', [\"You can\\'t Update the file details.\"]);\n }\n\n $file->fill($data);\n $file->save();\n\n\n $resource = new JsonResource($file);\n\n return $resource;\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "e30c06b78f9a9b4366cad726cc1d7e0c", "score": "0.5667808", "text": "public function update($id)\n\t{\n\t\t$input = array_except(Input::all(), '_method');\n\t\t$validation = Validator::make($input, CmsResource::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$resource = $this->resource->find($id);\n\t\t\t$resource->update($input);\n\n\t\t\treturn Redirect::route('backend.resources.index');\n\t\t}\n\n\t\treturn Redirect::route('backend.resources.edit', $id)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "c4e7a9cc1238d660d6f97533a98c2cd7", "score": "0.5662976", "text": "public function update(Request $request, $id)\n {\n $this->validator($request->all())->validate();\n $asset = Asset::findOrFail($id);\n $asset->name = $request->name;\n if ($asset->quantity > (int)$request->quantity){\n $asset->available = $asset->available - ($asset->quantity - (int)$request->quantity);\n if ($asset->available < 0){\n return response('Error, Available Asset should not be negative', 406);\n }\n $asset->quantity = (int)$request->quantity;\n } else if ($asset->quantity < (int)$request->quantity){\n $asset->available = $asset->available + ((int)$request->quantity - $asset->quantity);\n $asset->quantity = (int)$request->quantity;\n } else {\n $asset->quantity = (int)$request->quantity;\n $asset->available = (int)$request->quantity;\n }\n if($request->hasFile('image')){\n /* if($asset->image != 'no-image.png'){\n unlink('assets/'.$asset->image);\n } */\n $image = $request->file('image');\n $fileName = time().\"-\".$image->getClientOriginalName();\n $image->move('image', $fileName);\n $asset->image = $fileName;\n }\n $asset->save();\n return response()->json([\n 'message' => 'Successfully update asset',\n 'asset' => $asset\n ]);\n }", "title": "" }, { "docid": "5c940a83bd77d1ab7bfbae8c9d00ddbf", "score": "0.5660953", "text": "public function update($id, $data)\n {\n try {\n $this->logger->info(\"Trying to update resource in database table\");\n $this->checkId($id);\n\n $putValues = $this->putValues($data);\n if ($putValues > 0) {\n $bulk = new BulkWrite();\n\n $bulk->update(['_id' => intval($id)], ['$set' => $putValues]);\n\n $this->conn->executeBulkWrite('test.user', $bulk);\n echo \"Resource successfully updated\";\n $this->logger->info(\"Updating resource successful in database table\");\n }\n } catch (InvalidIdException $e) {\n $this->logger->warning(\"ID doesn't exist in database table\");\n echo \"Error: \" . $e->getMessage();\n } catch (\\Exception $e) {\n $this->logger->warning(\"Error updating resource in database table\");\n echo \"Error updating resource: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "649350006c65652f1bf440a8fd23429b", "score": "0.563811", "text": "public function update(Request $request, Bundle $bundle)\n {\n $validated = $this->validate($request, [\n 'name' => 'required|string',\n 'colour' => 'required|string',\n 'description' => 'required|string',\n 'products' => 'required|array',\n 'products.*' => 'required|numeric',\n 'categories' => 'required|array',\n 'categories.*' => 'required|numeric',\n 'new_image' => 'sometimes|image',\n 'delete_image' => 'sometimes|numeric',\n 'design' => 'required|string',\n ]);\n\n $bundle->update([\n 'name' => $validated['name'],\n 'description' => $validated['description'],\n ]);\n\n $bundle->detail()->update([\n 'colour' => $validated['colour'],\n 'design' => $validated['design'],\n ]);\n\n $bundle->products()->sync($validated['products']);\n $bundle->detail->categories()->sync($validated['categories']);\n\n if ($request->has('new_image')) {\n $file = $validated['new_image'];\n\n $upload = $file->store(\"bundle_images/{$bundle->id}\", 's3');\n Storage::disk('s3')->setVisibility($upload, 'public');\n $imageModel = new Image([\n 'path' => basename($upload),\n 'url' => Storage::url($upload)\n ]);\n\n $bundle->detail()->image()->save($imageModel);\n $bundle->detail()->image()->where('id', $validated['delete_image'])->delete();\n }\n\n return new BundleResource($bundle);\n }", "title": "" }, { "docid": "2d0a673b6cf0d1b1620a19adfbcff86f", "score": "0.56370103", "text": "final public function update($parentId, $resourceId)\n {\n return $this->tryAndCatchWrapper('updateResource', [$parentId, $resourceId, Input::all()]);\n }", "title": "" }, { "docid": "44a8e8f174a93bc6c16b91f667c20342", "score": "0.5628897", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::find($id);\n $product->url = $request->input('url');\n $product->title = $request->input('title');\n $product->excerpt = $request->input('excerpt');\n $product->content = $request->input('content');\n $product->price_origin = $request->input('price_origin');\n $product->price_selling = $request->input('price_selling');\n $product->save();\n $product->files()->sync($request->input('images'));\n // dd($request);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "3c2a73c4327fed0385c084b5313336dd", "score": "0.56222475", "text": "function update_resource($r,$path,$type,$title,$ingest=false,$createPreviews=true)\n\t{\n\t# Note that the file will be used at it's present location and will not be copied.\n\tglobal $syncdir,$staticsync_prefer_embedded_title;\n\n\tupdate_resource_type($r, $type);\n\n\t# Work out extension based on path\n\t$extension=explode(\".\",$path);\n \n if(count($extension)>1)\n {\n $extension=trim(strtolower(end($extension)));\n }\n else\n {\n //No extension\n $extension=\"\";\n }\n \n\n\t# file_path should only really be set to indicate a staticsync location. Otherwise, it should just be left blank.\n\tif ($ingest){$file_path=\"\";} else {$file_path=escape_check($path);}\n\n\t# Store extension/data in the database\n\tsql_query(\"update resource set archive=0,file_path='\".$file_path.\"',file_extension='$extension',preview_extension='$extension',file_modified=now() where ref='$r'\");\n\n\t# Store original filename in field, if set\n\tif (!$ingest)\n\t\t{\n\t\t# This file remains in situ; store the full path in file_path to indicate that the file is stored remotely.\n\t\tglobal $filename_field;\n\t\tif (isset($filename_field))\n\t\t\t{\n\n\t\t\t$s=explode(\"/\",$path);\n\t\t\t$filename=end($s);\n\n\t\t\tupdate_field($r,$filename_field,$filename);\n\t\t\t}\n\t\t}\n\telse\n\t\t{\n\t\t# This file is being ingested. Store only the filename.\n\t\t$s=explode(\"/\",$path);\n\t\t$filename=end($s);\n\n\t\tglobal $filename_field;\n\t\tif (isset($filename_field))\n\t\t\t{\n\t\t\tupdate_field($r,$filename_field,$filename);\n\t\t\t}\n\n\t\t# Move the file\n\t\tglobal $syncdir;\n\t\t$destination=get_resource_path($r,true,\"\",true,$extension);\n\t\t$result=rename($syncdir . \"/\" . $path,$destination);\n\t\tif ($result===false)\n\t\t\t{\n\t\t\t# The rename failed. The file is possibly still being copied or uploaded and must be ignored on this pass.\n\t\t\t# Delete the resouce just created and return false.\n\t\t\tdelete_resource($r);\n\t\t\treturn false;\n\t\t\t}\n\t\tchmod($destination,0777);\n\t\t}\n\n\t# generate title and extract embedded metadata\n\t# order depends on which title should be the default (embedded or generated)\n\tif ($staticsync_prefer_embedded_title)\n\t\t{\n\t\tupdate_field($r,8,$title);\n\t\textract_exif_comment($r,$extension);\n\t\t}\n\telse\n\t\t{\n\t\textract_exif_comment($r,$extension);\n\t\tupdate_field($r,8,$title);\n\t\t}\n\n\t# Ensure folder is created, then create previews.\n\tget_resource_path($r,false,\"pre\",true,$extension);\n\n\tif ($createPreviews)\n\t\t{\n\t\t# Attempt autorotation\n\t\tglobal $autorotate_ingest;\n\t\tif($ingest && $autorotate_ingest){AutoRotateImage($destination);}\n\t\t# Generate previews/thumbnails (if configured i.e if not completed by offline process 'create_previews.php')\n\t\tglobal $enable_thumbnail_creation_on_upload;\n\t\tif ($enable_thumbnail_creation_on_upload) {create_previews($r,false,$extension,false,false,-1,false,$ingest);}\n\t\t}\n\n\t# Pass back the newly created resource ID.\n\treturn $r;\n\t}", "title": "" }, { "docid": "aa128686308e2019542f4e4b1718d443", "score": "0.5620492", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'price' => 'require|numeric',\n 'primary_image' => 'required',\n 'stock' => 'required|numeric',\n 'model' => 'required',\n 'descriptions' => 'required',\n ]);\n\n $celotehs = Product::findOrFail($id);\n $celotehs->name = $request->name;\n $celotehs->price = $request->price;\n $celotehs->stock = $request->stock;\n $celotehs->model = $request->model;\n $celotehs->cat_id = $request->cat_id;\n $celotehs->slug = str_slug($request->name.'-'.$request->model);\n $celotehs->descriptions = $request->descriptions;\n\n if($request->hasFIle('primary_image')){\n $file = $request->file('primary_image');\n $fileName = time().'.'.$file->getClientOriginalName();\n $ServicesPath = public_path('/product_image');\n $file->move($ServicesPath, $fileName);\n\n $oldFilename = $celotehs->primary_image;\n \\Storage::delete($oldFilename);\n $celotehs->primary_image = $fileName;\n }\n $celotehs->save();\n }", "title": "" }, { "docid": "771640493fc7ebfa6a0af52988c42fb3", "score": "0.5612911", "text": "public function update(Request $request, Product $product)\n {\n $product->title = $request->title;\n $product->description = $request->description;\n $product->category_id = $request->category_id;\n $product->manufacturer_id = $request->manufacturer_id;\n $product->price = $request->price;\n $product->quantity = $request->quantity;\n if($request->hasFile('image_url')){\n $file = $request->file('image_url');\n $file->store('public');\n $product->image_url = $file->hashName();\n }\n\n $product->update();\n\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "bf1740aaa96591f0fe97955a50a97b84", "score": "0.56054395", "text": "public function update(Request $request)\n { \n $slider = Slider::first();\n \n // @dd($request->slider_image);\n if($request->title){\n $slider->title = $request->title;\n }\n\n if($request->hasFile('slider_image')){\n if($slider->slider_image && file_exists(public_path($slider->slider_image))){\n unlink(public_path($slider->slider_image));\n }\n\n $image = $request->slider_image;\n $imageName = time() . '.' . $image->getClientOriginalExtension();\n \n Storage::putFileAs('public/slider', $image, $imageName);\n $slider->slider_image = 'storage/slider/' . $imageName;\n }\n \n\n $slider->save();\n Session::flash('success', 'Slider updated successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "ab8f98efb36600284def5deb6135e230", "score": "0.5592424", "text": "public function update(Request $request, $id)\n {\n //Get data from form\n $data = $request->all();\n\n //Validation\n $request->validate($this->ruleValidation());\n \n //Get product to update\n $product = Product::find($id);\n \n //Slug generation\n $data['slug'] = Str::slug($data['name'] , '-');\n \n //If image changed?\n if(!empty($data['path_img'])) {\n if(!empty($product->path_img)) {\n Storage::disk('public')->delete($product->path_img);\n }\n $data['path_img'] = Storage::disk('public')->put('images' , $data['path_img']);\n }\n \n //Update in database\n $updated = $product->update($data); //<---- Fillable in model!!\n \n //Stockpiles table update\n $data['product_id'] = $product->id; //Foreign Key\n $stockpile = Stockpile::where('product_id' , $product->id)->first();\n $stockpileUpdated = $stockpile->update($data); //<---- Fillable in model!!\n \n \n if($updated && $stockpileUpdated) {\n if (!empty($data['sizes'])) {\n $product->sizes()->sync($data['sizes']);\n } else {\n $product->sizes()->detach();\n }\n return redirect()->route('products.show' , $product->slug);\n } else {\n return redirect()->route('homepage');\n }\n }", "title": "" }, { "docid": "8d93fc07b96d71210cab24576cf6888b", "score": "0.5569772", "text": "public function update(Request $request, Post $PostResource)\n {\n $id = $request->id;\n\n $request->validate([\n 'name'=>'required',\n 'email'=>'required',\n 'mobile'=>'required|min:11|max:11',\n 'post'=>'required'\n ]);\n \n $post= Post::find($id);\n\n \n $post->name=$request->name;\n $post->email=$request->email;\n $post->mobile=$request->mobile;\n $post->post=$request->post;\n if($request->has('image')){\n\n $file = $request->file('image');\n \n $extenstion= $file->getClientOriginalExtension();\n $filename = time().'.'.$extenstion;\n $file->move('image/',$filename);\n \n $post->image = $filename;\n }\n \n $post->save();\n\n return back()->with('success','Updated successfully');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "a5ebf66d1c0add5886fcc1bbfb8d0b1a", "score": "0.55630946", "text": "public function updateResource($id)\n {\n try\n {\n $resource = $this->findResource($id);\n\n $resource->fill(Input::all());\n\n $resource->updated_by = Auth::id();\n\n $resource->save();\n }\n catch (Exception $e)\n {\n if($e instanceof ModelNotFoundException)\n return Response::make('Not Found', 404);\n else\n return Response::json(array('error' => $e->getMessage()), 500, array(), JSON_PRETTY_PRINT);\n }\n\n // return $resource;\n return Response::json($resource, 200, array(), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0ef46f7717fdeb10a6f38c6770cdea63", "score": "0.55593103", "text": "public function update(Request $request, $id)\n {\n $input = $request->except(['_token', 'ProductImage']);\n \n $validation = Validator::make($input, Product::$rules);\n\n if ($validation->passes())\n {\n $product = Product::find($id);\n if ($request->hasFile('ProductImage'))\n {\n $image = $request->file('ProductImage');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n $relativePath = 'storage/images/' . $fileName;\n $location = public_path($relativePath);\n Image::make($image)->resize(800, 800, function ($c) {\n $c->aspectRatio();\n $c->upsize();\n })->save($location);\n $input['ProductImage'] = $relativePath;\n File::delete($product->ProductImage);\n $input['ProductImage'] = $relativePath;\n }\n $product->update($input);\n\n return redirect()->route('admin.index');\n }\n return redirect()->back()->withInput()->withErrors($validation);\n\n }", "title": "" }, { "docid": "33267ee3ddd0a9817f3485c99b6de745", "score": "0.55510455", "text": "public function update(Request $request, $id)\n {\n $data = $this->validate(request(),$this->validation(),[],$this->aliases());\n\n if(request()->hasFile(\"icon\"))\n {\n $oldLogo = manufact::find($id);\n //if record is exist with info delete this image from storage disk\n !empty($oldLogo->icon)? Storage::delete($oldLogo->icon):\"\";\n $data['icon'] =request()->file(\"icon\")->store(\"manufact\");\n\n }\n manufact::where(\"id\",$id)->update($data);\n\n session()->flash(\"success\",trans(\"admin.record_updated\"));\n return redirect(adminUrl(\"manufacts\"));\n\n }", "title": "" }, { "docid": "47168320d9d05e709b482ca518e7f1ee", "score": "0.55488104", "text": "public function setResource(FlowResource $resource) {\n\t\t$this->lastModified = new \\DateTime();\n\t\t$this->resource = $resource;\n\t\t$this->refresh();\n\t}", "title": "" }, { "docid": "5a73deb6a0e172b702c955e120ece98b", "score": "0.5545744", "text": "public function update(Request $request, BookStorageRequestController $bookStorageReq)\n {\n $this->validate($request, [\n 'price' => 'required|double',\n ]);\n\n $bookStorageReq->update($request->all());\n return $this->createdResponse(true, 'Storage Book Request updated successful', Response::HTTP_CREATED);\n\n }", "title": "" }, { "docid": "f486c0486b6da506772c0b077febc53b", "score": "0.55438197", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->description = $request->description;\n $product->title = $request->title;\n $product->price = $request->price;\n $product->price_discounts = ($request->price_discounts == \"\"?0 : $request->price_discounts );\n $product->is_sale = ($request->is_sale==\"\"?0:$request->is_sale);\n $product->shipping_local_price = ($request->shipping_local_price==''?'0':$request->shipping_local_price);\n $product->shipping_local_duration = ($request->shipping_local_duration==\"\"?0:$request->shipping_local_duration);\n $product->shipping_int_disabled = ($request->shipping_int_disabled==\"\"?0:$request->shipping_int_disabled);\n $product->shipping_int_price = $request->shipping_int_price;\n $product->shipping_int_duration = ($request->shipping_int_duration==\"\"?0:$request->shipping_int_duration);\n $product->logistic_provider = $request->logistic_provider;\n $product->product_type_id = $request->product_type_id;\n $product->brand_id = $this->create_brand($request->brand_id);\n $product->category_id = $this->create_category($request->category_id);;\n $product->save();\n\n $sizes_array = $request->product_size;\n $product->sizes()->sync($sizes_array);\n\n return redirect('seller/product/images/'.$product->slug);\n }", "title": "" }, { "docid": "6e27acd0248f696913d7581142ab1983", "score": "0.5543788", "text": "public abstract function update($object);", "title": "" }, { "docid": "9b6a5eaf2ee3686b5156067b74bb0dfb", "score": "0.5541244", "text": "public function update(Request $request, $id)\n {\n \n $validated = $request->validate([ \n 'name' => 'required|min:3|max:255',\n 'price' => 'required|numeric|min:1',\n 'slug' => 'required|unique:products,slug,'.$id.'|min:3|max:30', \n ]);\n\n $product = Product::findOrFail($id); \n $product -> update( $request->all() ); \n $product->productRecommended()->sync($request->productRecommended);\n\n return redirect('/admin/product');\n }", "title": "" }, { "docid": "1a5b5ef3d6bb570ffa00d57829394a42", "score": "0.55390495", "text": "public function updateResource(Request $request)\n {\n $validate = request()->validate([\n \n 'resource' => \t'required|string|max:64',\n 'id' => \t'required|integer|max:999999999',\n 'status_id' => \t'required|integer|max:999999999',\n 'user_id' => \t'required|integer|max:999999999',\n \n ]);\n\n $tableName = Str::snake($request->resource);\n\n $updated = \\DB::table($tableName)\n ->where('id', $request->id)\n ->update([\n 'status_id' => $request->status_id,\n 'user_id' => $request->user_id\n ]);\n\n $resourceName = ucwords(implode(' ',preg_split('/(?=[A-Z])/', $request->resource)));\n \n if($updated) \n {\n $status = Status::select('name')->find($request->status_id);\n \n return [ 'msj' => \"$resourceName $status->name\" , 'updated' => $updated]; \n\n } else {\n\n return [ 'msj' => \"Error al Actualizar el estatus de $resourceName\" , 'updated' => $updated];\n } \n \n }", "title": "" }, { "docid": "47ec7ae1a3f0c72b0d1b28dee038bf70", "score": "0.5536234", "text": "public function set($key, \\Cache\\Resource $resource) \n\t{\n\t\t$path = $this->resolve($key);\n\t\treturn file_put_contents($path, serialize($resource->contents()));\n\t}", "title": "" }, { "docid": "6fa462c97a105fb94770bc7df36317fd", "score": "0.55360246", "text": "public function update(Request $request, Product $product){\n if ($request->image) {\n $image = $request->file('image')->store('product'); //PEGA A IMAGEM QUE VEM DO REQUEST E SALVA NA PRODUCT\n $image = \"storage/\".$image;\n if (!$product->image != \"storage/product/imagem.jpg\"){\n Storage::delete(str_replace('storage/', '', $product->image));\n }\n }else{\n $image = $product->image; //DEIXA COMO PADRÃO\n }\n $product->update([ //FAZ O INSERT\n 'name' => $request->name,\n 'description' => $request->description,\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'image' => $image\n ]);\n $product->tags()->sync($request->tags);\n session()->flash('success','Produto alterado com sucesso!');\n return redirect(route('product.index')); //RETORNA PARA A TELA DE PRODUTO\n\n }", "title": "" }, { "docid": "0b380d3324f425a60f02a42cf8926df0", "score": "0.5535138", "text": "private function updateInformation(ResourceInterface $resource, array $data)\n {\n $resource->setName($data['name']);\n return $resource;\n }", "title": "" }, { "docid": "f98f2ab5b3f691d4f3bcd3ab66059f75", "score": "0.5534422", "text": "public function update()\n {\n $product = Product::find(request('id'));\n $product->name = request('name');\n $product->description = request('description');\n $product->price = request('price');\n $product->visible = request('visible');\n $product->save();\n }", "title": "" }, { "docid": "6dfa34e48caec1acdad37292592274e5", "score": "0.5533082", "text": "abstract public function testUpdate($id);", "title": "" }, { "docid": "fb9110a6194ea1491d48e8acae8a6fca", "score": "0.55321616", "text": "public function update($object)\n {\n\n }", "title": "" }, { "docid": "6501efdb0a31814c4c7662ddb8023019", "score": "0.5528317", "text": "public static function update(Request $request, $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"listing_id\" => \"required\"\n \"title\" => \"required\"\n \"pricing_type\" => \"required\"\n \"amount\" => \"required\"\n ]);\n try {\n $store = SharedRooms::find($resource_id);\n $store->listing_id = $data['listing_id'];\n $store->title = $data['title'];\n $store->pricing_type = $data['pricing_type'];\n $store->amount = $data['amount'];\n $store->description = $data['description'] ?? null;\n $store->save();\n activity()\n ->causedBy(Auth::user()->id)\n ->performedOn($store)\n ->withProperties(['id' => $store->id])\n ->log('shared rooms created');\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'Data updated successfully']);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "0ddf9bf19010bb4376b58c65fc007dcb", "score": "0.55195576", "text": "public function update(Store $request, $id)\n {\n //set filename and directory path\n $photo = PhotoRooms::query()->find($id);\n $file = $request->file('photo');\n $roomID = 'ROOM_NO_' . $photo->room->id;\n $name = $roomID . '_' . uniqid();\n //delete photo using its public id from cloudinary\n Cloudinary::destroy($photo->public_id);\n //upload photo to cloudinary\n $cloudinary = $file->storeOnCloudinaryAs('public/rooms/' . $roomID . '/photos', $name);\n //update chosen photo with data fetched from the uploader\n $photo->update([\n 'secure_url' => $cloudinary->getSecurePath(),\n 'public_id' => $cloudinary->getPublicId()\n ]);\n\n return redirect('/admin/rooms')->with('message', 'Photo updated successfully!');\n }", "title": "" }, { "docid": "b5d2b22e695863a96f5a335c883dea91", "score": "0.55156153", "text": "public function update($item);", "title": "" }, { "docid": "04829aa320ae5bba4e589640674e688a", "score": "0.5510222", "text": "public function update(Request $request, $id)\n {\n $datosArticulo=request()->except(['_token','_method']);\n \n if ($request->hasFile('Foto')) {\n \n $articulo= Articulos::findOrFail($id);\n\n Storage::delete('public/'.$articulo->Foto);\n\n $datosArticulo['Foto']=$request->file('Foto')->store('uploads','public');\n\n }\n\n Articulos::where('id','=',$id)->update($datosArticulo);\n\n return redirect('articulos')->with('Mensaje','Empleado modificado con exito');\n\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "acea4a8a9031c5ee3ac67934fabd53a5", "score": "0.55071735", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n \n $product->update([\n 'title' => request('title'),\n 'content' => request('content'),\n 'quantity' => request('quantity'),\n 'capacity' => request('capacity'),\n 'price' => request('price'),\n 'is_active' => request('is_active'),\n 'discount' => request('discount'),\n ]);\n if ($request->hasFile('photos')) {\n foreach($request->photos as $photo){\n $filename = $photo->store('uploads', 'public');\n ProductPhoto::create([\n 'product_id' => $product->id,\n 'image' => $filename\n ]);\n }\n \n }\n return redirect('admin/product')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "b1a7388ada48f86ca183cbf9889c1513", "score": "0.5499085", "text": "public function update(Request $request, $id){\n \n $prod = Producto::findOrFail($id);\n \n $prod->nombre = $request->nombre;\n $prod->descripcion = $request->descripcion;\n $prod->codSubCategoria = $request->ComboBoxSubCategoria;\n $prod->codMarca = $request->ComboBoxMarca;\n $prod->precioActual = $request->precio;\n $prod->stock = $request->stock;\n $prod->descuento = $request->descuento;\n $prod->fechaActualizacion = Carbon::now()->subHours(5);\n $prod->estado = '1';\n //$prod->contadorVentas = '0';\n\n\n if(!is_null($request->imagen)){\n //Storage::disk('local')->delete($prod->nombreImagen);\n Storage::disk('local2')->delete($prod->nombreImagen);\n //$prod->nombreImagen='imagen'.$prod->codProducto.'.jpg';\n Storage::disk('local2')->put($prod->nombreImagen,\\File::get($request->file('imagen')));\n //$file = $request->file('imagen')->storeAs('imagenes',$prod->nombreImagen);\n error_log('\n \n \n Se está subiendo la imagen '.$prod->nombreImagen.'\n \n \n \n ');\n\n }\n\n $prod->save();\n return redirect()->route('producto.index')->with('¡Se ha actualizado el producto!');\n\n }", "title": "" }, { "docid": "090216138bba7467b7e1c0dcc77245f5", "score": "0.5496984", "text": "public function put($payload) {\n\n // You must to implement the logic of your REST Resource here.\n // Use current user after pass authentication to validate access.\n if (!$this->currentUser->hasPermission('access content')) {\n throw new AccessDeniedHttpException();\n }\n $payload = $this->update_record($payload);\n return new ModifiedResourceResponse($payload, 201);\n }", "title": "" }, { "docid": "a01bd2cb214605428bc6032929ebd2ae", "score": "0.5494982", "text": "public function update(UpdateRequest $request, $id)\n {\n $data = $request->all();\n\n $item = $request->item;\n\n if ($request->hasFile('image')) {\n Storage::disk('public')->delete($item->image);\n $image = $request->file('image');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n\n $data['image'] = $image->storeAs('item', $fileName, 'public');\n } else {\n $data['image'] = $item->image;\n }\n\n $item->update($data);\n\n return new ItemResource($item);\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5491807", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "85714b33bdb1da52c9f3c38b3fb0e4fd", "score": "0.54882276", "text": "abstract public function update($id);", "title": "" }, { "docid": "236e1dd2735a1bea5ba1c2c78bc4b202", "score": "0.5484454", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->name = $request->name;\n $product->category = $request->category;\n $product->price = $request->price;\n $product->product_image = $fileName;\n $product->save();\n\n return redirect('admin/product' . $id);\n }", "title": "" }, { "docid": "7a9bdbca1f7b3ebee194d03267cefe76", "score": "0.5481694", "text": "public function update(Request $request, $id)\n {\n\n $item = Stock::find($id);\n $oldFilename = $item -> image;\n\n // validate the data\n $validatedData = $request ->validate([\n 'itemName' => 'required|max:255',\n 'price' => 'required|max:6',\n 'description' => 'required|max:255',\n 'size' => 'max:3',\n 'quantity' => 'required',\n 'image' =>'image|mimes:jpeg,png,jpg,gif,svg|max:20000' //max file size of 8MB\n ],\n $messages = [\n 'itemName.required' => 'This field cannot be empty!',\n 'itemName.max' => 'Maximum number of characters is 255.',\n 'price.required' => 'This field is required.',\n 'price.max' => 'Maximum number of characters is 6',\n 'description.required' => 'This field cannot be empty!',\n 'description.max' => 'Maximum number of characters is 255.',\n 'size.max' => 'Please enter S, M, LG, XL, XXL or XXXL',\n 'quantity.required' => 'This field is required!',\n 'image.image' => 'This is not an image.',\n 'image.mimes' => 'File must be jpeg, jpg, png, gif or svg.',\n 'image.max' => 'This file is too big. Please select a smaller file.'\n\n ]);\n\n $item = $request->all(); // this retrieve the new input information\n\n $item -> save();\n Session::flash('success', 'This item was successfully updated and saved.');\n return redirect()->route('items.index', $item->id);\n }", "title": "" }, { "docid": "043c9a216e68456de9063d12449bcb0e", "score": "0.54759973", "text": "public function update(StoreProduct $request, $id)\n {\n //\n if(!$product = Product::find($id))\n return redirect()->back();\n $data = $request->all();\n\n \n if($request->hasFile('image') && $request->image->isValid()){\n // dd('aasas');\n // $nameFile = $request->name . '.' . $request->image->extension();\n // dd($request->file('image')->storeAs('products', $nameFile));\n\n // verificar se existe imagem antiga\n if($product->image && Storage::exists($product->image)){\n Storage::delete($product->image);\n }\n \n $imagePath = $request->image->store('products');\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n // $product->update($request->all());\n return redirect()->route('products.index');\n\n // dd(\"Editando produto...{$id}\");\n }", "title": "" }, { "docid": "bff9b1d6669620efd89835810decdc6d", "score": "0.5471439", "text": "public function updateStream($path, $resource, Config $config)\n {\n $originalContents = $this->read($path);\n $position = ftell($resource);\n $trueResults = 0;\n\n foreach ($this->fileSystems as $fileSystem) {\n $result = $fileSystem->updateStream($path, $resource);\n if ($result) {\n ++$trueResults;\n } else {\n break;\n }\n fseek($resource, $position, SEEK_SET);\n }\n\n if ($trueResults < count($this->fileSystems)) {\n foreach ($this->fileSystems as $fileSystem) {\n $fileSystem->update($path, $originalContents['contents']);\n }\n\n return false;\n } else {\n return $this->getMetadata($path);\n }\n }", "title": "" }, { "docid": "468c866fb6506e9875cc392d13c09b83", "score": "0.5470308", "text": "public function put($resource, array $options = [])\n {\n return $this->request('PUT', $resource, $options);\n }", "title": "" }, { "docid": "5ba92b1d417214df8c4d84d1fb3447a3", "score": "0.5465887", "text": "public function update(Store $request, $id){\n //\n $media = Media::find($id);\n if(is_null($media)) {\n return response()->json([\n 'message' => \"Media not found\",\n ], 404);\n }\n $media -> fill($request->validated());\n $media -> save();\n \t return response() -> json($media);\n }", "title": "" }, { "docid": "bd65d70b304aaa9a6ddb5a3bf53f3b21", "score": "0.5464224", "text": "public function update(StoreUpdateRelatedProduct $request, $id)\n {\n\n\n $requestRelated = $request->all();\n $relate = RelatedProduct::find($id);\n Helpers::uploadImage($request->file('image'), $relate);\n $offersRelated = [];\n foreach ($requestRelated['name'] as $key => $name) {\n $offersRelated[$name] = $requestRelated['value_id'][$key];\n }\n foreach ($requestRelated as $ki => $rel) {\n if($rel == $relate->{$ki}) {\n unset($requestRelated[$ki]);\n } else {\n $requestRelated[$ki] = $rel;\n }\n }\n\n $relatedProduct = RelatedProduct::edit($requestRelated, $relate);\n RelatedProduct::updateValues($offersRelated, $relatedProduct);\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "1c3c203766f18661a15d909007a99e30", "score": "0.54572994", "text": "function update($record)\n {\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n return $this->rest->put('/Material_list/item/id/' . $record->id, json_encode($record));\n }", "title": "" }, { "docid": "ea0f5d1c6cd187e999d42e0a51c94e1e", "score": "0.5455138", "text": "public function update(SliderFormRequest $request, $id)\n {\n \n //$file = $request->file('slider_img');\n //$filename = $request->file('slider_img')->getClientOriginalName();\n\n $slider = Slider::find($id);\n $slider->slider_name = $request->input('slider_name');\n $slider->slider_img = $filename;\n $slider->slider_header = $request->input('slider_header');\n $slider->description=$request->input('description');\n $slider->save();\n\n // Storage::disk('uploads')->put($filename, file_get_contents($request->file('slider_img')->getRealPath()));\n\n return redirect()->route('sliders.index');\n }", "title": "" }, { "docid": "c8533f68a36efb4f93d3bc2fbc14c4ad", "score": "0.5449132", "text": "public function update(Request $request, Product $product)\n {\n $product->price = $request->input('price');\n $product->name = $request->input('name');\n $product->discount = $request->input('discount');\n $product->description = $request->input('description');\n $product->quantity = $request->input('quantity');\n $product->type = $request->input('type');\n $product->privacy = $request->input('privacy');\n if ($request->hasFile('photo')){\n $photo = $request->file('photo');\n $filename = time() . '.' . $photo->getClientOriginalExtension();\n Image::make($photo)->resize(300,300)->save(public_path('uploads/products/'.$filename));\n $product->photo=$filename;\n }\n $product->save();\n $store_id = $product->store_id;\n return redirect(route('store.show', $store_id))->with('_success', 'Producto o servicio modificado exitosamente!');\n }", "title": "" }, { "docid": "29145b2b5a2d17132747ab887a0789c5", "score": "0.5444627", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id',$id)->firstOrfail();\n $this->validate($request,[\n 'name' => 'required|string|max:191',\n 'slug' => 'required|string|max:191|unique:products,slug,'.$product->id,\n 'model' => 'required|string|max:191',\n 'brand' => 'required|string|max:191',\n 'color' => 'required|string|max:191',\n 'price' => 'required|numeric',\n 'stock' => 'required|numeric',\n 'description' => 'required',\n 'details' => 'required'\n ]);\n \n \n \n $product->name = $request->name;\n $product->slug = $request->slug;\n $product->model = $request->model;\n $product->brand = $request->brand;\n $product->color = $request->color;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->description = $request->description;\n $product->details = $request->details;\n\n $currentImages = $product->images;\n if($request->images != $currentImages){\n\n $name = time().'.'.explode('/', explode(':',substr($request->images, 0,strpos($request->images, ';')))[1])[1];\n\n Image::make($request->images)->save(public_path('images/').$name);\n\n $product->images =$name;\n\n $userImages = public_path('images/').$currentImages;\n if(file_exists($userImages)){\n @unlink($userImages);\n }\n\n }\n\n $product->save();\n\n\n }", "title": "" }, { "docid": "9f4d7af325b24531ea1ce846d411650c", "score": "0.5444028", "text": "public function update(Request $request, $id)\n {\n $datosProducto = request()->except(['_token','_method']);\n\n // $producto = Productos::findOrFail($id);\n // return view ('productos.edit', compact('producto'));\n\n if($request->hasFile('Imagen')){\n\n $producto = Productos::findOrFail($id);\n\n Storage::delete('public/'.$producto->Imagen);\n\n $datosProducto['Imagen']=$request->file('Imagen')->store('uploads', 'public');\n }\n\n Productos::where('id','=',$id)->update($datosProducto);\n\n return redirect('productos')->with('Mensaje', 'Producto actualizado');\n\n }", "title": "" }, { "docid": "99570621f10010f3bf881aedacae8f97", "score": "0.544297", "text": "public function update(Request $request, $id)\n {\n $data = $request->validate([\n 'name' =>'required',\n 'email' =>'required',\n 'phone' =>'required',\n 'address' =>'required',\n 'image' =>'required'\n ]);\n\n $supplier =Supplier::where('id',$id)->firstOrFail();\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n\n if ($request->hasFile('image')){\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('backend/images/supplier/');\n //add new photo\n $image->move($location,$filename);\n $location = public_path('backend/images/supplier/'.$filename);\n $upload_path = 'backend/images/supplier/';\n Image::make($location)->save($location);\n if(strlen($supplier->image) > 5 && file_exists(base_path().'/public/'.$supplier->image)) {\n unlink(base_path().'/public/'.$supplier->image);\n }\n $supplier->image = $upload_path.$filename;\n }\n $supplier->save();\n if($supplier){\n $notification = array(\n 'message' => 'updated successfully',\n 'alert-type' => 'success'\n );\n return redirect()->route('product.index')->with($notification);\n }\n }", "title": "" }, { "docid": "01c5e5f24300924f385a60feccb9fe42", "score": "0.5441142", "text": "public function update(Request $request,Product $product) {\n\n $request->validate([\n 'name'=>'required',\n 'stock'=>'required',\n 'description'=>'required|min:10',\n 'price'=>'required'\n\n ]);\n\nif($request->hasFile('image')) {\n $image=$request->image->store('products',['disk'=>'public']);\n\n}else {\n $image=$product->image;\n}\n\n//now update the product\n\n$product->update([\n\n 'name'=>$request->name,\n 'stock'=>$request->stock,\n 'description'=>$request->description,\n 'price'=>$request->price,\n 'image'=>$image\n]);\n\n//seent the success message\nsession()->flash('success',\"Product updated successfully\");\nreturn redirect()->back();\n}", "title": "" }, { "docid": "8e8a27769b698338635786dac32d3581", "score": "0.54356146", "text": "public function update(Request $request, $id)\n {\n $service = Service::find($id);\n $service->title = $request->title;\n $service->description = $request->description;\n\n if ($file = $request->file('icon')){\n unLink(base_path().'/public/uploads/service/icon/'.$service->icon);\n if (IceHelper::checkIconSize($request->file('icon'))){\n $service->icon = IceHelper::uploadImage($request->file('icon'),'service/icon/');\n }else{\n return redirect()->back()->withFailedMessage('The icon size is very big please select smaller size');\n\n }\n }else{\n $service->icon = $service->icon;\n }\n\n\n if ($file = $request->file('photo')){\n unLink(base_path().'/public/uploads/service/photo/'.$service->photo);\n unLink(base_path().'/public/uploads/service/photo/thumb/'.$service->photo);\n $service->photo = IceHelper::uploadImage($request->file('photo'),'service/photo/');\n }else{\n $service->photo = $service->photo;\n }\n\n $service->save();\n\n IceHelper::uploadThumb($service->photo);\n\n return redirect('/admin/service')->withFlashMessage('Service Edited');\n\n }", "title": "" }, { "docid": "c6812053ff6f2cb382d20906d7462a7e", "score": "0.54286885", "text": "public function update()\n {\n $prodData = $this->data;\n $id = $prodData['id'];\n\n // Removing id from request\n unset($prodData['id']);\n\n return Request::make('PUT', $this->endpoint . '/' . $id, $prodData, $this->cms);\n }", "title": "" }, { "docid": "3b6767bdd8024add40b378a924412ad3", "score": "0.54253227", "text": "function update_disk_usage($resource)\n\t{\n\t$ext = sql_value(\"select file_extension value from resource where ref = '$resource'\",'jpg');\n\t$path = get_resource_path($resource,true,'',false,$ext);\n\tif (file_exists($path)){\n\t\t$rsize = filesize_unlimited($path);\n\t} else {\n\t\t$rsize = 0;\n\t}\n\n\t# Scan the appropriate filestore folder and update the disk usage fields on the resource table.\n\t$dir=dirname(get_resource_path($resource,true,\"\",false));\n\tif (!file_exists($dir)) {return false;} # Folder does not yet exist.\n\t$d = dir($dir); \n\t$total=0;\n\twhile ($f = $d->read())\n\t\t{\n\t\tif ($f!=\"..\" && $f!=\".\")\n\t\t\t{\n\t\t\t$s=filesize_unlimited($dir . \"/\" .$f);\n\t\t\t#echo \"<br/>-\". $f . \" : \" . $s;\n\t\t\t$total+=$s;\n\t\t\t}\n\t\t}\n\t#echo \"<br/>total=\" . $total;\n\tsql_query(\"update resource set disk_usage='$total',disk_usage_last_updated=now(),file_size='$rsize' where ref='$resource'\");\n\treturn true;\n\t}", "title": "" }, { "docid": "6233395f9709b8b025d0b3b864ade136", "score": "0.5424529", "text": "public function update(SliderRequest $request,$id)\n {\n $id = base64_decode($id);\n $data= Slider::find($id);\n $image =$data->image; \n if($request->file('image')){\n if(File::exists(public_path('slider/'.$data->image))){\n File::delete(public_path('slider/'.$data->image));\n }\n $logoimageName = time().'.'.$request->image->extension(); \n $request->image->move(public_path('slider'), $logoimageName);\n $image = $logoimageName;\n }\n $data->country= $request->country;\n $data->title= $request->title;\n $data->description= $request->description;\n $data->image= $image;\n $data->save();\n toastr()->success('slider updated Successfully');\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "d3a11651e3f45d3c5fe4fe7f382408ef", "score": "0.54221493", "text": "public function updateProductStock(ProductStockRequest $request)\n {\n try {\n\n $product = Product::find($request->product_id);\n\n $product->update($request->except('_token', 'product_id'));\n\n return redirect()->route('admin.products.images.edit', $request->product_id);\n\n } catch (\\Exception $ex) {\n\n return error('admin.products', __('admin/product.there is error'));\n\n }\n\n }", "title": "" }, { "docid": "a28ba9c40e06592529f38d6d19b89b16", "score": "0.54146737", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "fa90d4335b5457d60aed5f93219c9fb9", "score": "0.5414578", "text": "function update($resource_id,$options)\n\t{\n\t\t//allowed fields\n\t\t$valid_fields=array(\n\t\t\t//'resource_id',\n\t\t\t//'survey_id',\n\t\t\t'dctype',\n\t\t\t'title',\n\t\t\t'subtitle',\n\t\t\t'author',\n\t\t\t'dcdate',\n\t\t\t'country',\n\t\t\t'language',\n\t\t\t//'id_number',\n\t\t\t'contributor',\n\t\t\t'publisher',\n\t\t\t'rights',\n\t\t\t'description',\n\t\t\t'abstract',\n\t\t\t'toc',\n\t\t\t'subjects',\n\t\t\t'filename',\n\t\t\t'dcformat',\n\t\t\t'changed');\n\n\t\t//add date modified\n\t\t$options['changed']=date(\"U\");\n\t\t\t\t\t\n\t\t//remove slash before the file path otherwise can't link the path to the file\n\t\tif (isset($options['filename']))\n\t\t{\n\t\t\tif (substr($options['filename'],0,1)=='/')\n\t\t\t{\n\t\t\t\t$options['filename']=substr($options['filename'],1,255);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//pk field name\n\t\t$key_field='resource_id';\n\t\t\n\t\t$update_arr=array();\n\n\t\t//build update statement\n\t\tforeach($options as $key=>$value)\n\t\t{\n\t\t\tif (in_array($key,$valid_fields) )\n\t\t\t{\n\t\t\t\t$update_arr[$key]=$value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//update db\n\t\t$this->db->where($key_field, $resource_id);\n\t\t$result=$this->db->update('resources', $update_arr); \n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "2781ac437c29e840eabdb987b8c492f4", "score": "0.0", "text": "public function show($id)\n {\n\n }", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8233718", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ed2d107c1c9ce4912402cbef90125ac4", "score": "0.76110697", "text": "public function show(Resource $resource)\n\t{\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "e21cb6c5a585a50a5b1a659e50a3576d", "score": "0.6445771", "text": "function show()\n\t{\n\t\techo '<pre>';\n\t\tprint_r($this);\n\t\techo '</pre>';\n\n//\t\tforeach ($this->resources as $id => $resources)\n//\t\t{\n//\t\t\tforeach ($resources as $type => $resource)\n//\t\t\t{\n//\t\t\t\t$resource->show();\n//\t\t\t}\n//\t\t}\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "596a976868e24408f49b224b715ef1dd", "score": "0.62268525", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n\n $this->set_parameters(); // set the parameters array\n\n ///////////////////////////////////////////////\n\n /// Possible display modes are:\n /// File displayed embedded in a normal page\n /// File displayed in a popup window\n /// File displayed embedded in a popup window\n /// File not displayed at all, but downloaded\n\n\n /// First, find out what sort of file we are dealing with.\n require_once($CFG->libdir.'/filelib.php');\n\n $querystring = '';\n $resourcetype = '';\n $embedded = false;\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n if ($resource->options != \"forcedownload\") { // TODO nicolasconnault 14-03-07: This option should be renamed \"embed\"\n if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image\n $resourcetype = \"image\";\n $embedded = true;\n\n } else if ($mimetype == \"audio/mp3\") { // It's an MP3 audio file\n $resourcetype = \"mp3\";\n $embedded = true;\n\n } else if ($mimetype == \"video/x-flv\") { // It's a Flash video file\n $resourcetype = \"flv\";\n $embedded = true;\n\n } else if (substr($mimetype, 0, 10) == \"video/x-ms\") { // It's a Media Player file\n $resourcetype = \"mediaplayer\";\n $embedded = true;\n\n } else if ($mimetype == \"video/quicktime\") { // It's a Quicktime file\n $resourcetype = \"quicktime\";\n $embedded = true;\n\n } else if ($mimetype == \"application/x-shockwave-flash\") { // It's a Flash file\n $resourcetype = \"flash\";\n $embedded = true;\n\n } else if ($mimetype == \"video/mpeg\") { // It's a Mpeg file\n $resourcetype = \"mpeg\";\n $embedded = true;\n\n } else if ($mimetype == \"text/html\") { // It's a web page\n $resourcetype = \"html\";\n\n } else if ($mimetype == \"application/zip\") { // It's a zip archive\n $resourcetype = \"zip\";\n $embedded = true;\n\n } else if ($mimetype == 'application/pdf' || $mimetype == 'application/x-pdf') {\n $resourcetype = \"pdf\";\n $embedded = true;\n } else if ($mimetype == \"audio/x-pn-realaudio\") { // It's a realmedia file\n $resourcetype = \"rm\";\n $embedded = true;\n } \n }\n\n $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0);\n\n /// Form the parse string\n $querys = array();\n if (!empty($resource->alltext)) {\n $parray = explode(',', $resource->alltext);\n foreach ($parray as $fieldstring) {\n list($moodleparam, $urlname) = explode('=', $fieldstring);\n $value = urlencode($this->parameters[$moodleparam]['value']);\n $querys[urlencode($urlname)] = $value;\n $querysbits[] = urlencode($urlname) . '=' . $value;\n }\n if ($isteamspeak) {\n $querystring = implode('?', $querysbits);\n } else {\n $querystring = implode('&amp;', $querysbits);\n }\n }\n\n\n /// Set up some variables\n\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n\n if (resource_is_url($resource->reference)) {\n $fullurl = $resource->reference;\n if (!empty($querystring)) {\n $urlpieces = parse_url($resource->reference);\n if (empty($urlpieces['query']) or $isteamspeak) {\n $fullurl .= '?'.$querystring;\n } else {\n $fullurl .= '&amp;'.$querystring;\n }\n }\n\n } else if ($CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) { // Localpath\n $localpath = get_user_preferences('resource_localpath', 'D:');\n $relativeurl = str_replace(RESOURCE_LOCALPATH, $localpath, $resource->reference);\n\n if ($querystring) {\n $relativeurl .= '?'.$querystring;\n }\n\n $relativeurl = str_replace('\\\\', '/', $relativeurl);\n $relativeurl = str_replace(' ', '%20', $relativeurl);\n $fullurl = 'file:///'.htmlentities($relativeurl);\n $localpath = true;\n\n } else { // Normal uploaded file\n $forcedownloadsep = '?';\n if ($resource->options == 'forcedownload') {\n $querys['forcedownload'] = '1';\n }\n $fullurl = get_file_url($course->id.'/'.$resource->reference, $querys);\n }\n\n /// Print a notice and redirect if we are trying to access a file on a local file system\n /// and the config setting has been disabled\n if (!$CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) {\n if ($inpopup) {\n print_header($pagetitle, $course->fullname);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n notify(get_string('notallowedlocalfileaccess', 'resource', ''));\n if ($inpopup) {\n close_window_button();\n }\n print_footer('none');\n die;\n }\n\n\n /// Check whether this is supposed to be a popup, but was called directly\n if ($resource->popup and !$inpopup) { /// Make a page and a pop-up window\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" \"\n . \"onclick=\\\"this.target='resource{$resource->id}'; return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', \"\n . \"'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo '<div class=\"popupnotice\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo '</div>';\n print_footer($course);\n exit;\n }\n\n\n /// Now check whether we need to display a frameset\n\n $frameset = optional_param('frameset', '', PARAM_ALPHA);\n if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == \"frame\" || $resource->options == \"objectframe\") and empty($USER->screenreader)) {\n /// display the resource into a object tag\n if ($resource->options == \"objectframe\") {\n /// Yahoo javascript libaries for updating embedded object size\n require_js(array('yui_utilities'));\n require_js(array('yui_container'));\n require_js(array('yui_dom-event'));\n require_js(array('yui_dom'));\n\n\n /// Moodle Header and navigation bar\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation, \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n $options = new object();\n $options->para = false;\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n echo '</div></div>';\n\n /// embedded file into iframe if the resource is on another domain\n ///\n /// This case is not XHTML strict but there is no alternative\n /// The object tag alternative is XHTML strict, however IE6-7 displays a blank object on accross domain by default,\n /// so we decided to use iframe for accross domain MDL-10021\n if (!stristr($fullurl,$CFG->wwwroot)) {\n echo '<p><iframe id=\"embeddedhtml\" src =\"'.$fullurl.'\" width=\"100%\" height=\"600\"></iframe></p>';\n }\n else {\n /// embedded HTML file into an object tag\n echo '<p><object id=\"embeddedhtml\" data=\"' . $fullurl . '\" type=\"'.$mimetype.'\" width=\"800\" height=\"600\">\n alt : <a href=\"' . $fullurl . '\">' . $fullurl . '</a>\n </object></p>';\n }\n /// add some javascript in order to fit this object tag into the browser window\n echo '<script type=\"text/javascript\">\n //<![CDATA[\n function resizeEmbeddedHtml() {\n //calculate new embedded html height size\n ';\n if (!empty($resource->summary)) {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 230;\n ';\n }\n else {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 120;\n ';\n }\n echo ' //the object tag cannot be smaller than a human readable size\n if (objectheight < 200) {\n objectheight = 200;\n }\n //resize the embedded html object\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"height\", objectheight+\"px\");\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"width\", \"100%\");\n }\n resizeEmbeddedHtml();\n YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);\n //]]>\n </script>\n ';\n\n /// print the summary\n if (!empty($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n echo \"</body></html>\";\n exit;\n }\n /// display the resource into a frame tag\n else {\n @header('Content-Type: text/html; charset=utf-8');\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Frameset//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\\\">\\n\";\n echo \"<html dir=\\\"ltr\\\">\\n\";\n echo '<head>';\n echo '<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />';\n echo \"<title>\" . format_string($course->shortname) . \": \".strip_tags(format_string($resource->name,true)).\"</title></head>\\n\";\n echo \"<frameset rows=\\\"$CFG->resource_framesize,*\\\">\";\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;frameset=top\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n if (!empty($localpath)) { // Show it like this so we interpose some HTML\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;inpopup=true\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n } else {\n echo \"<frame src=\\\"$fullurl\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n }\n echo \"</frameset>\";\n echo \"</html>\";\n exit;\n }\n }\n\n\n /// We can only get here once per resource, so add an entry to the log\n\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n\n\n /// If we are in a frameset, just print the top of it\n\n if (!empty( $frameset ) and ($frameset == \"top\") ) {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n\n $options = new object();\n $options->para = false;\n echo '<div class=\"summary\">'.format_text($resource->summary, FORMAT_HTML, $options).'</div>';\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n print_footer('empty');\n exit;\n }\n\n\n /// Display the actual resource\n if ($embedded) { // Display resource embedded in page\n $strdirectlink = get_string(\"directlink\", \"resource\");\n\n if ($inpopup) {\n print_header($pagetitle);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header_simple($pagetitle, '', $navigation, \"\", \"\", true,\n update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"self\"));\n\n }\n\n if ($resourcetype == \"image\") {\n echo '<div class=\"resourcecontent resourceimg\">';\n echo \"<img title=\\\"\".strip_tags(format_string($resource->name,true)).\"\\\" class=\\\"resourceimage\\\" src=\\\"$fullurl\\\" alt=\\\"\\\" />\";\n echo '</div>';\n\n } else if ($resourcetype == \"mp3\") {\n if (!empty($THEME->resource_mp3player_colors)) {\n $c = $THEME->resource_mp3player_colors; // You can set this up in your theme/xxx/config.php\n } else {\n $c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.\n 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.\n 'font=Arial&fontColour=FF33FF&buffer=10&waitForPlay=no&autoPlay=yes';\n }\n $c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource');\n $c = htmlentities($c);\n $id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the MP3 player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourcemp3\">';\n\n echo '<span class=\"mediaplugin mediaplugin_mp3\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/lib/mp3player/mp3player.swf?src='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"70\", majorversion:\"6\", build:\"40\", flashvars:\"'.$c.'\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"audio/mpeg\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"70\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"flv\") {\n $id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the FLV player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourceflv\">';\n\n echo '<span class=\"mediaplugin mediaplugin_flv\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"400\", majorversion:\"6\", build:\"40\", allowscriptaccess:\"never\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"video/x-flv\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"400\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"mediaplayer\") {\n echo '<div class=\"resourcecontent resourcewmv\">';\n echo '<object type=\"video/x-ms-wmv\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"scale\" value=\"noScale\" />';\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '</object>';\n echo '</div>';\n\n } else if ($resourcetype == \"mpeg\") {\n echo '<div class=\"resourcecontent resourcempeg\">';\n echo '<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"\n codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701\"\n type=\"application/x-oleobject\">';\n echo \"<param name=\\\"fileName\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoStart\" value=\"true\" />';\n echo '<param name=\"animationatStart\" value=\"true\" />';\n echo '<param name=\"transparentatStart\" value=\"true\" />';\n echo '<param name=\"showControls\" value=\"true\" />';\n echo '<param name=\"Volume\" value=\"-450\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"video/mpeg\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"rm\") {\n\n echo '<div class=\"resourcecontent resourcerm\">'; \n echo '<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\"320\" height=\"240\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"audio/x-pn-realaudio-plugin\" data=\"' . $fullurl . '\" width=\"320\" height=\"240\">';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl .'</a>';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>'; \n\n } else if ($resourcetype == \"quicktime\") {\n echo '<div class=\"resourcecontent resourceqt\">';\n\n echo '<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"';\n echo ' codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"video/quicktime\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"flash\") {\n echo '<div class=\"resourcecontent resourceswf\">';\n echo '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">';\n echo \"<param name=\\\"movie\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"application/x-shockwave-flash\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n\n } elseif ($resourcetype == 'zip') {\n echo '<div class=\"resourcepdf\">';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</div>';\n\n } elseif ($resourcetype == 'pdf') {\n echo '<div class=\"resourcepdf\">';\n echo '<object data=\"' . $fullurl . '\" type=\"application/pdf\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</object>';\n echo '</div>';\n }\n\n if (trim($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n\n if ($inpopup) {\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$strdirectlink</a>)</div>\";\n echo \"</div>\"; // MDL-12098\n print_footer($course); // MDL-12098\n } else {\n print_spacer(20,20);\n print_footer($course);\n }\n\n } else { // Display the resource on it's own\n if (!empty($localpath)) { // Show a link to help work around browser security\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$fullurl</a>)</div>\";\n }\n redirect($fullurl);\n }\n\n }", "title": "" }, { "docid": "14ed889b850393fe8b1f3290fc49740e", "score": "0.6189695", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.61804265", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.6171014", "text": "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "title": "" }, { "docid": "428541aff5a20db0753edebab2c7fb73", "score": "0.6082806", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "8cb2cf294db063cb41e20820f36641f0", "score": "0.60389996", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "586d0347683cd6c5e16251dd1e1a0a98", "score": "0.60363364", "text": "public function show($id)\n {\n $data = Resource::findOrFail($id);\n return view('Resource/view', compact('data'));\n }", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "7fdf71b227abd04e4de9889539cd1698", "score": "0.59927016", "text": "public function displayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "6791390f58188104a1f11120602bda6c", "score": "0.59724826", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->retrieve($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content('show', $data);\n }", "title": "" }, { "docid": "dbf7cb71fa21dced48bad29b90c7f51e", "score": "0.59606946", "text": "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.5891874", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851883", "text": "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "title": "" }, { "docid": "2771b374a21e331a50c3ffd5b3e431ca", "score": "0.58124036", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.57929444", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5791527", "text": "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "dfcf7f89daddfb442f3e0ba6b417b34a", "score": "0.57804495", "text": "public function specialdisplayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "fcef539023519ca355832da7d8f035c5", "score": "0.57576865", "text": "public function displayTask($id=null)\n\t{\n\t\t// Incoming\n\t\tif (!$id)\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::abort(404, Lang::txt('CONTRIBUTE_NO_ID'));\n\t\t}\n\n\t\t// Get all contributors of this resource\n\t\t$resource = Entry::oneOrFail($id);\n\n\t\t$authors = $resource->authors()\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Get all roles for this resoruce type\n\t\t$roles = $resource->type->roles()->rows();\n\n\t\t// Output view\n\t\t$this->view\n\t\t\t->set('config', $this->config)\n\t\t\t->set('id', $id)\n\t\t\t->set('contributors', $authors)\n\t\t\t->set('roles', $roles)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.5756208", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "69113639710554fd174b3aaec6536b9c", "score": "0.57561266", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.57460064", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.57435393", "text": "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "cd5d84906dc48426110533ed06d6910f", "score": "0.5728813", "text": "public function show()\n {\n $data = $this->m->getOne('main', Validate::sanitize($_GET['id']));\n \n //sending data to the view\n $this->view->assign('id', $_GET['id']);\n $this->view->assign('data', $data);\n $this->view->assign('title', 'Page title');\n $this->view->display('main/show.tpl');\n \n }", "title": "" }, { "docid": "7684a3ad9102aa78b598eb1a828f68c5", "score": "0.57259274", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.5713412", "text": "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "b791634a3b29fe8adff71b755317e88e", "score": "0.5706405", "text": "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "title": "" }, { "docid": "5766cf8c652099e6e707b39bd867a1c0", "score": "0.5704152", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693083", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ef853768d92b1224dd8eb732814ce3fa", "score": "0.7318632", "text": "public function deleteResource(Resource $resource);", "title": "" }, { "docid": "32d3ed9a4be9d6f498e2af6e1cf76b70", "score": "0.6830789", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c3b6a958d3ad1b729bfd6e4353c3feba", "score": "0.6540415", "text": "public function deleteFile(ResourceObjectInterface $resource);", "title": "" }, { "docid": "00aa681a78c0d452ad0b13bfb8d908dd", "score": "0.64851683", "text": "public function removeResource(IResource $resource): void {\n\t\t$this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) {\n\t\t\treturn !$this->isSameResource($r, $resource);\n\t\t});\n\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->delete(Manager::TABLE_RESOURCES)\n\t\t\t->where($query->expr()->eq('collection_id', $query->createNamedParameter($this->id, IQueryBuilder::PARAM_INT)))\n\t\t\t->andWhere($query->expr()->eq('resource_type', $query->createNamedParameter($resource->getType())))\n\t\t\t->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resource->getId())));\n\t\t$query->execute();\n\n\t\tif (empty($this->resources)) {\n\t\t\t$this->removeCollection();\n\t\t} else {\n\t\t\t$this->manager->invalidateAccessCacheForCollection($this);\n\t\t}\n\t}", "title": "" }, { "docid": "e63877a9259e2bac051cf6c3de5eca30", "score": "0.6431514", "text": "public function deleteResource(Resource $resource) {\n\t\t$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n\t\ttry {\n\t\t\t$result = $this->filesystem->delete($pathAndFilename);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.6371304", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "95caa506b86f6d24869dcb0b83d598e5", "score": "0.63126063", "text": "public function unlink(IEntity $source, IEntity $target, string $relation): IStorage;", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.6301321", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "b907271045dec6299e819d6cb076ced8", "score": "0.6288393", "text": "abstract protected function doRemove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "90bf57c42b6c381768022b254ea3b8e9", "score": "0.62784326", "text": "public static function remove ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $object) {\n // If an object with the given id exists, remove it.\n if ($object['id'] == $data['id']) {\n array_splice($list, $i, 1);\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "5eda1f28deed9cc179d6350748fe7164", "score": "0.62480205", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n activity()\n ->performedOn(Auth::user())\n ->causedBy($resource)\n ->withProperties(['remove user' => 'customValue'])\n ->log('Resource Deleted successfully');\n $notification = array(\n 'message' => 'Resource Deleted successfully', \n 'alert-type' => 'success'\n );\n \n return back()->with($notification); \n }", "title": "" }, { "docid": "42a9b004cc56ed1225f545039f158828", "score": "0.6130072", "text": "function delete_resource($ref)\n\t{\n\t\n\tif ($ref<0) {return false;} # Can't delete the template\n\n\t$resource=get_resource_data($ref);\n\tif (!$resource) {return false;} # Resource not found in database\n\t\n\t$current_state=$resource['archive'];\n\t\n\tglobal $resource_deletion_state, $staticsync_allow_syncdir_deletion, $storagedir;\n\tif (isset($resource_deletion_state) && $current_state!=$resource_deletion_state) # Really delete if already in the 'deleted' state.\n\t\t{\n\t\t# $resource_deletion_state is set. Do not delete this resource, instead move it to the specified state.\n\t\tsql_query(\"update resource set archive='\" . $resource_deletion_state . \"' where ref='\" . $ref . \"'\");\n\n # log this so that administrator can tell who requested deletion\n resource_log($ref,'x','');\n\t\t\n\t\t# Remove the resource from any collections\n\t\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\t\t\t\n\t\treturn true;\n\t\t}\n\t\n\t# Get info\n\t\n\t# Is transcoding\n\tif ($resource['is_transcoding']==1) {return false;} # Can't delete when transcoding\n\n\t# Delete files first\n\t$extensions = array();\n\t$extensions[]=$resource['file_extension']?$resource['file_extension']:\"jpg\";\n\t$extensions[]=$resource['preview_extension']?$resource['preview_extension']:\"jpg\";\n\t$extensions[]=$GLOBALS['ffmpeg_preview_extension'];\n\t$extensions[]='icc'; // also remove any extracted icc profiles\n\t$extensions=array_unique($extensions);\n\t\n\tforeach ($extensions as $extension)\n\t\t{\n\t\t$sizes=get_image_sizes($ref,true,$extension);\n\t\tforeach ($sizes as $size)\n\t\t\t{\n\t\t\tif (file_exists($size['path']) && ($staticsync_allow_syncdir_deletion || false !== strpos ($size['path'],$storagedir))) // Only delete if file is in filestore\n\t\t\t\t {unlink($size['path']);}\n\t\t\t}\n\t\t}\n\t\n\t# Delete any alternative files\n\t$alternatives=get_alternative_files($ref);\n\tfor ($n=0;$n<count($alternatives);$n++)\n\t\t{\n\t\tdelete_alternative_file($ref,$alternatives[$n]['ref']);\n\t\t}\n\n\t\n\t// remove metadump file, and attempt to remove directory\n\t$dirpath = dirname(get_resource_path($ref, true, \"\", true));\n\tif (file_exists(\"$dirpath/metadump.xml\")){\n\t\tunlink(\"$dirpath/metadump.xml\");\n\t}\n\t@rmdir($dirpath); // try to delete directory, but if it has stuff in it fail silently for now\n\t\t\t // fixme - should we try to handle if there are other random files still there?\n\t\n\t# Log the deletion of this resource for any collection it was in. \n\t$in_collections=sql_query(\"select * from collection_resource where resource = '$ref'\");\n\tif (count($in_collections)>0){\n\t\tif (!function_exists(\"collection_log\")){include (\"collections_functions.php\");}\n\t\tfor($n=0;$n<count($in_collections);$n++)\n\t\t\t{\n\t\t\tcollection_log($in_collections[$n]['collection'],'d',$in_collections[$n]['resource']);\n\t\t\t}\n\t\t}\n\n\thook(\"beforedeleteresourcefromdb\",\"\",array($ref));\n\n\t# Delete all database entries\n\tsql_query(\"delete from resource where ref='$ref'\");\n\tsql_query(\"delete from resource_data where resource='$ref'\");\n\tsql_query(\"delete from resource_dimensions where resource='$ref'\");\n\tsql_query(\"delete from resource_keyword where resource='$ref'\");\n\tsql_query(\"delete from resource_related where resource='$ref' or related='$ref'\");\n\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\tsql_query(\"delete from resource_custom_access where resource='$ref'\");\n\tsql_query(\"delete from external_access_keys where resource='$ref'\");\n\tsql_query(\"delete from resource_alt_files where resource='$ref'\");\n\t\t\n\thook(\"afterdeleteresource\");\n\t\n\treturn true;\n\t}", "title": "" }, { "docid": "d9b3f9cbdf088b174df39b489f05872c", "score": "0.6087595", "text": "public function delete(UriInterface $uri, \\stdClass $resource)\n {\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n\n if(!property_exists($resource, '_links')) {\n return;\n }\n\n $links = $resource->_links;\n\n if($links) {\n foreach ($links as $link) {\n if(is_object($link) && property_exists($link, 'href')) {\n $uri = Client::getInstance()\n ->getDataStore()\n ->getUriFactory()\n ->createUri($link->href);\n }\n\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n }\n }\n\n }", "title": "" }, { "docid": "9b39cbd70aa1aa97e5e5907676b3271e", "score": "0.60398406", "text": "public function removeResource ($name)\n\t{\n\t\t\n\t\tif (isset ($this->resources[$name]))\n\t\t{\n\t\t\t\n\t\t\tunset ($this->resources[$name]);\n\t\t\t\n\t\t\tif (isset ($this->$name))\n\t\t\t{\n\t\t\t\tunset ($this->$name);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.603003", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "d0b2a4440bb64c6f1cf160d3a82d7633", "score": "0.60045654", "text": "public function destroy($id)\n {\n $student=Student::find($id);\n //delete related file from storage\n $student->delete();\n return redirect()->route('student.index');\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.5944851", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "b4847ad1cd8f89953ef38552f8cdddbe", "score": "0.5935105", "text": "public function remove($identifier)\n {\n $resource = $this->repository->findOneByIdentifier($identifier);\n $this->repository->remove($resource);\n }", "title": "" }, { "docid": "b3d5aa085167568cd1836dd269d2e8dc", "score": "0.59211266", "text": "public function delete(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b1845194ffa32f9bcc26cc1bed8ee573", "score": "0.5896058", "text": "public function destroy()\n {\n $item = Item::find(request('id'));\n if ($item) {\n if ($item->image_url != '' && file_exists(public_path().'/uploads/item/'.$item->image_url)) {\n unlink(public_path().'/uploads/item/'.$item->image_url);\n }\n $item->delete();\n return response()->json(['success'=>'Record is successfully deleted']);\n }\n}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.58634996", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "28f192e8f4063c3aaceba80a5680f10b", "score": "0.5845638", "text": "public function deleteResource(Resource $resource)\n {\n $whitelist = ['id'];\n $reflObj = new \\ReflectionClass($resource);\n\n //null out all fields not in the whitelist\n foreach ($reflObj->getProperties() as $prop) {\n if (!in_array($prop->getName(), $whitelist)) {\n $prop->setAccessible(true);\n $prop->setValue($resource, null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.58285666", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "62415c40499505a9895f5a25b8230002", "score": "0.58192986", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n $storage->delete();\n return redirect()->route('storage.index')->with('success', 'Data Deleted');\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.58119655", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "368230bb080f8f6c51f1832974a498e2", "score": "0.58056664", "text": "public function destroy($id)\n {\n $product = Product::where('id',$id)->first();\n $photo = $product->image;\n if($photo){\n unlink($photo);\n $product->delete();\n }else{\n $product->delete();\n }\n\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5797684", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "c473e5d9c679fa421932f0d830432589", "score": "0.5770938", "text": "abstract public function destroyResource(\n DrydockBlueprint $blueprint,\n DrydockResource $resource);", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "22ecee59028ed62aa46bfb196c94d320", "score": "0.5745101", "text": "function remove_from_set($setID, $resource) {\n\tglobal $wpdb;\n\t$resource_table = $wpdb->prefix . 'savedsets_resources';\n\t\n\t$wpdb->delete( $resource_table, array( 'set_id' => $setID, 'resource_id' => $resource ), array( '%d','%d' ) );\n\t\n}", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.57217026", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "45fc5fca7261f9ee05d7a7cfb701d0c1", "score": "0.5717582", "text": "public function destroy($id)\n {\n $del = File::find($id);\n\n if ($del->user_id == Auth::id()) {\n Storage::delete($del->path);\n $del->delete();\n return redirect('/file');\n } else {\n echo \"Its not your file!\";\n }\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.57099277", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5700126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "a85f5bb361425e120c2b1c92b82b2fe9", "score": "0.56977797", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n Storage::disk('public')->delete(str_replace('/storage/','',$file->path));\n $file->delete();\n return redirect('/admin/media');\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "c553ef667073b35a27db9e6a3bae3be3", "score": "0.56575704", "text": "public function unlink() {\n\t\t$return = unlink($this->fullpath);\n\t\t// destroy object ...testing :)\n\t\tunset($this);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0532947b7106b0e9285319a9eaf76b8e", "score": "0.56488144", "text": "public function destroy($id)\n\t{\n $entry = Fileentry::find($id);\n Storage::disk('local')->delete($entry->filename);\n $entry->delete();\n\n return redirect()->back();\n\t}", "title": "" }, { "docid": "c29cf340a7685b50d4992018f03a1a37", "score": "0.5645965", "text": "public function destroy() {\n return $this->resource->destroy();\n }", "title": "" }, { "docid": "0b78e5e9a8d5d2a166659b0988261da1", "score": "0.5633292", "text": "public function destroy($id)\n {\n //\n //\n $slider = Slider::findOrFail($id);\n// if(Storage::exists($slider->image_path))\n// {\n// Storage::delete($slider->image_path);\n// }\n $slider->delete();\n return redirect()->back()->with('success', 'Slider was deleted successfully!');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "f0bca51252baaca5a816eef1c2c06fc0", "score": "0.56296647", "text": "public function detach()\n {\n $oldResource=$this->resource;\n fclose($this->resource);\n $this->resource=NULL;\n return $oldResource;\n }", "title": "" }, { "docid": "41660f6084f57c1f6d52218d45380858", "score": "0.5612277", "text": "public function destroy($id)\n {\n $destroy = File::find($id);\n Storage::delete('public/img/'.$destroy->src);\n $destroy->delete();\n return redirect('/files');\n }", "title": "" }, { "docid": "b6093338d60ff2644649eac3d576e7d9", "score": "0.5606613", "text": "public function delete($resource, array $options = [])\n {\n return $this->request('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "59de27765b5cb766d8d7c06e25831e55", "score": "0.5604046", "text": "function delete() {\n\n return unlink($this->path);\n\n }", "title": "" }, { "docid": "547eb07f41c94e071fb1daf6da02654d", "score": "0.55980563", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n unlink(public_path() .'/images/'.$product->file->file);\n session(['Delete'=>$product->title]);\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2b68a0dafbed1898fb849c8102af4ac1", "score": "0.55952084", "text": "public function destroy($id){\n $book = Book::withTrashed()->where('id', $id)->firstOrFail(); \n\n if ($book->trashed()) {\n session()->flash('success', 'El libro se a eliminado exitosamente');\n Storage::delete($book->image); \n $book->forceDelete();\n }else{\n session()->flash('success', 'El libro se envio a la papelera exitosamente');\n $book->delete();\n }\n return redirect(route('books.index'));\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.55922675", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "8a2965e7fd915ac119635055a709e09f", "score": "0.5591116", "text": "public function destroy($id, Request $request)\n {\n $imagePath = DB::table('game')->select('image')->where('id', $id)->first();\n\n $filePath = $imagePath->image;\n\n if (file_exists($filePath)) {\n\n unlink($filePath);\n\n DB::table('game')->where('id',$id)->delete();\n\n }else{\n\n DB::table('game')->where('id',$id)->delete();\n }\n\n return redirect()->route('admin.game.index');\n }", "title": "" }, { "docid": "954abc5126ecf3e25d5e32fc21b567ff", "score": "0.55901456", "text": "public function remove( $resourceId )\n {\n unset( $this->resourceList[ $resourceId ] );\n \n $this->database->exec( \"\n DELETE FROM\n `{$this->tbl['library_collection']}`\n WHERE\n collection_type = \" . $this->database->quote( $this->type ) . \"\n AND\n ref_id = \" . $this->database->quote( $this->refId ) . \"\n AND\n resource_id = \" . $this->database->escape( $resourceId ) );\n \n return $this->database->affectedRows();\n }", "title": "" }, { "docid": "f7194357aa4e137cfa50acffda93fc27", "score": "0.55829436", "text": "public static function delete($path){}", "title": "" }, { "docid": "a22fc9d493bea356070527d5c377a089", "score": "0.5578515", "text": "public function remove($name) { return IO_FS::rm($this->full_path_for($name)); }", "title": "" }, { "docid": "8a6c54307038aeccb488677b49209dac", "score": "0.5574026", "text": "public function destroy($id)\n {\n //\n //\n $resource = Resource::find($id);\n $resource->delete();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "fa9a2e384d55e25ff7893069c00561f7", "score": "0.5568524", "text": "public function destroy($id)\n {\n $data = Crud::find($id);\n $image_name = $data->image;\n unlink(public_path('images'.'/'.$image_name));\n $data->delete();\n return redirect('crud')->with('success','record deleted successfully!');\n\n\n }", "title": "" }, { "docid": "9e4e139799275c6ed9f200c63b6d4a6d", "score": "0.55617994", "text": "public function delete($resource)\n {\n // Make DELETE Http request\n $status = $this->call('DELETE', $resource)['Status-Code'];\n if ($status) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2160551c2833f1a763a1634fee961123", "score": "0.5560052", "text": "public function deleteItem($path, $options = null)\n {\n $this->_rackspace->deleteObject($this->_container,$path);\n if (!$this->_rackspace->isSuccessful()) {\n throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg());\n }\n }", "title": "" }, { "docid": "684ee86436e720744df6668b707a5ac0", "score": "0.5557478", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "1bc9bf0c3a8c77c07fcaf9de0c876d86", "score": "0.5555183", "text": "public function destroy($id)\n { \n $record = Post::findOrFail($id); \n\n if($record->thumbnail !== 'default.png'){\n Storage::delete('Post/'.$record->thumbnail); \n } \n \n $done = Post::destroy($id); \n\n return back()->with('success' , 'Record Deleted');\n }", "title": "" }, { "docid": "9e9a9d9363b0ac3e68a1243a8083cd0b", "score": "0.55495435", "text": "public function destroy($id)\n {\n \n $pro=Product::find($id);\n $one=$pro->image_one;\n \n $two=$pro->image_two;\n $three=$pro->image_three;\n $four=$pro->image_four;\n $five=$pro->image_five;\n $six=$pro->image_six;\n $path=\"media/products/\";\n Storage::disk('public')->delete([$path.$one,$path.$two,$path.$three,$path.$four,$path.$five,$path.$six]);\n\n\n\n $pro->delete();\n Toastr()->success('Product Deleted successfully');\n return redirect()->back();\n \n }", "title": "" }, { "docid": "2c6776be63eac31e1729852dfa8745a9", "score": "0.5548924", "text": "public function destroy($id)\n {\n $partner = Partner::findOrFail($id);\n\n if($partner->cover && file_exists(storage_path('app/public/' . $partner->cover))){\n \\Storage::delete('public/'. $partner->cover);\n }\n \n $partner->delete();\n \n return redirect()->route('admin.partner')->with('success', 'Data deleted successfully');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "fb75e67696c980503f7ebd09ae729fe9", "score": "0.5538126", "text": "final public function delete() {}", "title": "" }, { "docid": "aa31cbc566ad4ff78241eb4b0f49fe1e", "score": "0.5536226", "text": "public function destroy($id)\n\t{\n\t\t$this->resource->find($id)->delete();\n\n\t\treturn Redirect::route('backend.resources.index');\n\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "b896244b5af3e4822537d0d1d7ab8fdf", "score": "0.5519644", "text": "public function destroy($id)\n {\n $input = $request->all();\n \t$url = parse_url($input['src']);\n \t$splitPath = explode(\"/\", $url[\"path\"]);\n \t$splitPathLength = count($splitPath);\n \tImageUploads::where('path', 'LIKE', '%' . $splitPath[$splitPathLength-1] . '%')->delete();\n }", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.55148435", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "28797da9ff018d2e75ab89e4bc5cd50d", "score": "0.5511856", "text": "public function destroy($id)\n {\n $user= Auth::user();\n\n $delete = $user->profileimage;\n $user->profileimage=\"\";\n $user->save();\n $image_small=public_path().'/Store_Erp/books/profile/'.$delete ;\n unlink($image_small);\n Session::flash('success',' Profile Image Deleted Succesfully!');\n return redirect()->route('user.profile'); \n \n }", "title": "" }, { "docid": "a92d57f4ccac431a9299e4ad1f0d1618", "score": "0.54956895", "text": "public function destroy($id)\n {\n //\n\n $personaje=Personaje::findOrFail($id);\n\n if(Storage::delete('public/'.$personaje->Foto)){\n \n Personaje::destroy($id);\n }\n\n\n\n\n\n return redirect('personaje')->with('mensaje','Personaje Borrado');\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "df0b2bf2ed8277a4cd77f933418a9cd1", "score": "0.5491558", "text": "public function deleteFile()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\t$path = $this->getFileFullPath();\n\t\t\tif($path)\n\t\t\t{\t\t\t\n\t\t\t\t@unlink($path);\n\t\t\t\t$this->setFile(null);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
85698bce1078a5761ead5fa72d150867
Get the template for a boolean field.
[ { "docid": "31fccd86108bddfb638dff2f68f818e3", "score": "0.7133895", "text": "public function booleanTemplate(Field $field) {\n return '<input type=\"checkbox\" id=\"FieldName\" v-model=\"ModelCamel.FieldName\"/>';\n }", "title": "" } ]
[ { "docid": "5a5c2c046e72d26624caf5c549042638", "score": "0.7042743", "text": "public function getBoolField()\n {\n return $this->bool_field;\n }", "title": "" }, { "docid": "848bf93cf44f1dadeb496eed89faef49", "score": "0.67496353", "text": "public function getBoolPackedField()\n {\n return $this->bool_packed_field;\n }", "title": "" }, { "docid": "04bb8f44fe7625a8d4332899317b6e8e", "score": "0.66856605", "text": "protected function getTemplate()\n {\n return 'checkbox';\n }", "title": "" }, { "docid": "abc6529d6996e5971b13dfa7c9fa29e5", "score": "0.63899463", "text": "function formatBoolean($value);", "title": "" }, { "docid": "b86de8df56f68538ed5507a1b4154d8b", "score": "0.62521946", "text": "public static function boolean()\n {\n return self::_staticType(self::BOOLEAN);\n }", "title": "" }, { "docid": "1c1246579ec6730a3980b66ce8f3f1dc", "score": "0.6192514", "text": "public function getTemplate()\n {\n if (is_null($this->_template)) {\n $this->_template = new CheckboxInput();\n }\n return $this->_template;\n\n }", "title": "" }, { "docid": "ae9c419101437a1a23d27d703c0157d3", "score": "0.609681", "text": "public function display_change_template_option( $bool ) {\n\n\t\tif ( wcf()->utils->is_step_post_type() ) {\n\t\t\t$bool = true;\n\t\t}\n\t\treturn $bool;\n\t}", "title": "" }, { "docid": "eece8ba0c356ca18241d1a67b679cb35", "score": "0.6051549", "text": "public static function boolean()\n {\n return Type::boolean();\n }", "title": "" }, { "docid": "f523a7c4b89721356b7a848cf4dd6510", "score": "0.6047453", "text": "public function getBooleanValue() : string\n {\n return boolval($this->getValue());\n }", "title": "" }, { "docid": "ae15cd20d90109d036d9b1bd9963be0f", "score": "0.60447985", "text": "function get_true_or_false($bool) {\n\n if ($bool === True) {\n return 'True';\n } else {\n return 'False';\n }\n\n }", "title": "" }, { "docid": "542097ccbdc6c4c51c40cbba830c9efe", "score": "0.58829665", "text": "protected function getFormatBoolean($value)\n\t{\n\t\treturn $value ? 'yes' : 'no';\n\t}", "title": "" }, { "docid": "d2d7b1477d527d716363e623696f2950", "score": "0.58789873", "text": "function TBooleanField(&$theform,$thename,$thetitle=\"\",$thedefaultvalue=\"\",$theattribs=\"\") {\n $this->TField($theform,$thename,$thetitle,\"boolean\",1,$thedefaultvalue,$theattribs);\n }", "title": "" }, { "docid": "465bf9b23909459a260f637e7fc0d224", "score": "0.5848509", "text": "public function show_conditional_logic_field() {\n\n\t\treturn $this->get_setting( 'create_person' ) || $this->get_setting( 'create_task' );\n\n\t}", "title": "" }, { "docid": "3653957ab43dc8a9994044f2e3b7ede2", "score": "0.5846482", "text": "public function booleanValue(){\r\n\t\treturn (bool)$this->valor;\r\n\t}", "title": "" }, { "docid": "c42c4c8b5f87f0d647f16517e6326f99", "score": "0.5829908", "text": "private function print_bool_value($bool)\n {\n return sprintf('<span style=\"color:%s; font-weight:lighter\">%s</span>', $this->boolean_value_color, $bool ? \"true\" : \"false\");\n }", "title": "" }, { "docid": "9c6bb1751f6522fe3f9e9b469c9136c1", "score": "0.5716312", "text": "function booleanValue()\n {\n return \\Hamcrest\\Type\\IsBoolean::booleanValue();\n }", "title": "" }, { "docid": "4f1488ab39c1b6df563779d8780e962d", "score": "0.5708686", "text": "function bool2text($boolval) {\n\n\tif ($boolval)\n\t\treturn 'True';\n\telse\n\t\treturn 'False';\n}", "title": "" }, { "docid": "f19db7c2596c97fa41d271d913513ec3", "score": "0.5627879", "text": "function field_required_code($boolean) {\n\n $boolean = set_boolean_value($boolean);\n return \"'#required' => $boolean,\\n\";\n}", "title": "" }, { "docid": "bea159b23d68697b91632213b108df23", "score": "0.55993927", "text": "function masvideos_bool_to_string( $bool ) {\n if ( ! is_bool( $bool ) ) {\n $bool = masvideos_string_to_bool( $bool );\n }\n return true === $bool ? 'yes' : 'no';\n}", "title": "" }, { "docid": "d61a7a3027083c011aee6ccc969642e0", "score": "0.5593366", "text": "function get_str_bool($aValue = 0)\r\n{\r\n\tglobal $gXpLang;\r\n\r\n\treturn $aValue ? $gXpLang['yes'] : $gXpLang['no'];\r\n}", "title": "" }, { "docid": "ee457212d2fff9d3829785418d797102", "score": "0.55779546", "text": "function boolValue()\n {\n return \\Hamcrest\\Type\\IsBoolean::booleanValue();\n }", "title": "" }, { "docid": "e8c5f2ed9caa56cf55626abbd238e576", "score": "0.55694884", "text": "function serendipity_get_bool($item) {\n static $translation = array('true' => true,\n 'false' => false);\n\n if (isset($translation[$item])) {\n return $translation[$item];\n } else {\n return $item;\n }\n}", "title": "" }, { "docid": "e8c5f2ed9caa56cf55626abbd238e576", "score": "0.55694884", "text": "function serendipity_get_bool($item) {\n static $translation = array('true' => true,\n 'false' => false);\n\n if (isset($translation[$item])) {\n return $translation[$item];\n } else {\n return $item;\n }\n}", "title": "" }, { "docid": "c9ef08837780413a7c761b0b66c796d1", "score": "0.55540293", "text": "function field_disabled_code($boolean) {\n\n $boolean = set_boolean_value($boolean);\n return \"'#disabled' => $boolean,\\n\";\n}", "title": "" }, { "docid": "54441c3c493e43c5bb3979a46914cec0", "score": "0.5534088", "text": "function set_boolean_value($boolean) {\n\n return $boolean == 1 ? 'TRUE' : 'FALSE';\n}", "title": "" }, { "docid": "0f3fa0e5558ee73941eb7b094d5dd4f2", "score": "0.5527675", "text": "function get_bool($value){\n switch( strtolower($value) ){\n case 'true': return true;\n case 'false': return false;\n default: return NULL;\n }\n }", "title": "" }, { "docid": "c1525daa0dfdd6123de1ac0db7553237", "score": "0.5441692", "text": "public function getTrue() {\n return TRUE;\n }", "title": "" }, { "docid": "2017379ab19b66960ae5b41e676e0f06", "score": "0.5416954", "text": "function getConfValueBoolean($fieldName, $sheet = 'sDEF') {\n\t\treturn (boolean) $this->getConfValue($fieldName, $sheet);\n\t}", "title": "" }, { "docid": "f0fe8c4d0e029bb266807359fcdf72d2", "score": "0.54102", "text": "function add_format_true_checkbox() {\r\n global $wp_properties;\r\n echo '<li>' . WPP_UD_UI::checkbox(\"name=wpp_settings[configuration][property_overview][format_true_checkbox]&label=\" . __('Convert \"Yes\" and \"True\" values to checked icons on the front-end.','wpp'), $wp_properties['configuration']['property_overview']['format_true_checkbox']) . '</li>';\r\n }", "title": "" }, { "docid": "37122f67dfc36c78a44430d8ee1cacb0", "score": "0.54077566", "text": "public function getAsBoolean($key) {\n\t\treturn parent::getAsBoolean($key);\n\t}", "title": "" }, { "docid": "9b3b76a57cf7320d9458c2c1d16371df", "score": "0.54064274", "text": "public function getBoolValue()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "2473549356fb57672995b424cae47611", "score": "0.5404914", "text": "public function filter_get__text_boolean(&$name, &$value){\n\t\t$value ? $value = 'true' : $value = 'false';\n\t}", "title": "" }, { "docid": "d1f29cecb2ce7b8501b1de3d398d1c17", "score": "0.5402023", "text": "public function getValTrue()\n {\n return $this->valTrue;\n }", "title": "" }, { "docid": "7cc2c602331a753a9160d19727dca79f", "score": "0.5399815", "text": "public function getTemplateMode(): string\n {\n return $this->_templateMode;\n }", "title": "" }, { "docid": "f159d0862029d681e60dfe0d3a22e099", "score": "0.5391935", "text": "public function templatable(){\n $this->_template = true; \n return $this;\n }", "title": "" }, { "docid": "4416fef34bb8426ab0ff8bf7b7da9243", "score": "0.5388898", "text": "public function getString()\n {\n $name = $this->getNameAttributeString();\n $this->removeAttribute( 'name' );\n $default = $this->getSetting( 'default' );\n $option = $this->getValue();\n $checkbox = new Generator();\n $field = new Generator();\n\n if ($option == '1' || ! is_null($option) && $option === $this->getAttribute('value')) {\n $this->setAttribute( 'checked', 'checked' );\n } elseif($default === true && is_null($option)) {\n $this->setAttribute( 'checked', 'checked' );\n }\n\n $checkbox->newInput( 'checkbox', $name, '1', $this->getAttributes() );\n\n $field->newElement( 'label' )\n ->appendInside( $checkbox )\n ->appendInside( 'span', array(), $this->getSetting( 'text' ) );\n\n if ($default !== false) {\n $hidden = new Generator();\n $field->prependInside( $hidden->newInput('hidden', $name, '0' ) );\n }\n\n return $field->getString();\n }", "title": "" }, { "docid": "a4f479eb0c72eb1f92825094794c6adb", "score": "0.53875625", "text": "public function getTemplateStatus()\n {\n return $this->template_status;\n }", "title": "" }, { "docid": "01539def9fe56043773149302eaac025", "score": "0.538475", "text": "function get_bool_options()\n\t{\n\t\tglobal $user, $config, $lang_defs;\n\n\t\t$default_lang_id = $lang_defs['iso'][$config['default_lang']];\n\n\t\t$profile_row = array(\n\t\t\t'var_name'\t\t\t\t=> 'field_default_value',\n\t\t\t'field_id'\t\t\t\t=> 1,\n\t\t\t'lang_name'\t\t\t\t=> $this->vars['lang_name'],\n\t\t\t'lang_explain'\t\t\t=> $this->vars['lang_explain'],\n\t\t\t'lang_id'\t\t\t\t=> $default_lang_id,\n\t\t\t'field_default_value'\t=> $this->vars['field_default_value'],\n\t\t\t'field_ident'\t\t\t=> 'field_default_value',\n\t\t\t'field_type'\t\t\t=> FIELD_BOOL,\n\t\t\t'field_length'\t\t\t=> $this->vars['field_length'],\n\t\t\t'lang_options'\t\t\t=> $this->vars['lang_options']\n\t\t);\n\n\t\t$options = array(\n\t\t\t0 => array('TITLE' => $user->lang['FIELD_TYPE'], 'EXPLAIN' => $user->lang['BOOL_TYPE_EXPLAIN'], 'FIELD' => '<label><input type=\"radio\" class=\"radio\" name=\"field_length\" value=\"1\"' . (($this->vars['field_length'] == 1) ? ' checked=\"checked\"' : '') . ' onchange=\"document.getElementById(\\'add_profile_field\\').submit();\" /> ' . $user->lang['RADIO_BUTTONS'] . '</label><label><input type=\"radio\" class=\"radio\" name=\"field_length\" value=\"2\"' . (($this->vars['field_length'] == 2) ? ' checked=\"checked\"' : '') . ' onchange=\"document.getElementById(\\'add_profile_field\\').submit();\" /> ' . $user->lang['CHECKBOX'] . '</label>'),\n\t\t\t1 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row))\n\t\t);\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "6d2e2d46c3c1abb17af844d71543898f", "score": "0.53847486", "text": "public function render()\n {\n return view('steward::components.field.toggle');\n }", "title": "" }, { "docid": "8f8cabdf066142cb349b5d139b40587a", "score": "0.53618795", "text": "public function transform($value)\n {\n if (null === $value) {\n return '';\n }\n\n if (!is_bool($value)) {\n throw new UnexpectedTypeException($value, 'boolean');\n }\n\n return true === $value ? '1' : '';\n }", "title": "" }, { "docid": "927271bf451f9412aa44fa9500490803", "score": "0.53445476", "text": "abstract public function serializeBool($boolValue);", "title": "" }, { "docid": "acc3854eeee61553a80b3c3c88d38c45", "score": "0.5335571", "text": "public function getBoolValue(): ?bool;", "title": "" }, { "docid": "0a98a60f797b29b69a9aa53294a5c1c8", "score": "0.53309083", "text": "function boolstring($bool_to_convert)\n{\n\tif($bool_to_convert)\n\t{\n\t\treturn \"true\";\n\t}\n\treturn \"false\";\n}", "title": "" }, { "docid": "62622fd2b57f2d24a6f21f5943d2e2a3", "score": "0.5321822", "text": "function getTemplate()\n\t{\n\t\treturn $this->prefsTemplate;\n\t}", "title": "" }, { "docid": "89260117d522972efcd59b45d4b61a7b", "score": "0.52723855", "text": "public function getTemplateInput()\n {\n return $this->option('template');\n }", "title": "" }, { "docid": "544fd5b7f8bfd82344fcb4a8729116a4", "score": "0.5261819", "text": "public function getFormTemplate();", "title": "" }, { "docid": "8416fdf54fabb4549e5c88ce91baf42b", "score": "0.524462", "text": "function _the_customizable_text_value( $value ) {\n return is_bool( $value ) ? $value : esc_html( $value );\n }", "title": "" }, { "docid": "48bd76762211e557409c46fd77fba6fc", "score": "0.5242815", "text": "function bpcedd_get_yes_no()\n{\n $options = array(\n '0' => __('No', 'easy-digital-downloads'),\n '1' => __('Yes', 'easy-digital-downloads'),\n );\n return apply_filters('bpcedd-get-yes-no', $options);\n}", "title": "" }, { "docid": "bb67158388fd73d4d9e10f8bcaa7e925", "score": "0.5236797", "text": "public function get_table_metadata($metadatafield){\n\t\t$template = false;\n\t\tif(isset($this->table_config[$metadatafield])){\n\t\t\t$template = $this->table_config[$metadatafield];\n\t\t}\n\t\treturn $template;\t\t\n\t}", "title": "" }, { "docid": "0a7416483ccc07a166bab3c09871cfe0", "score": "0.5223053", "text": "public static function is_enable_render() { ?>\n\t\t<label for=\"<?php echo esc_attr( self::$option_name ); ?>_is_enable\"><input type='checkbox'\n\t\t id=\"<?php echo esc_attr( self::$option_name ); ?>_is_enable\"\n\t\t name='<?php echo esc_attr( self::$option_name ); ?>[is_enable]' <?php checked( self::is_notificaion_enable() ); ?>\n\t\t value='1'>Enable</label>\n\t\t<p class=\"description\"><?php _e( 'Send out an email to the site admin(s) whenever a post is marked as ready for translation', 'babble' ); ?></p>\n\t<?php\n\t}", "title": "" }, { "docid": "a42a105b7fed757eb2e55751c9e5b9bb", "score": "0.5215581", "text": "public function get_template()\n {\n\n if (!$this->template) {\n $this->template = wpforms_setting('email-template', 'none');\n }\n\n return apply_filters('wpforms_email_template', $this->template);\n }", "title": "" }, { "docid": "2929a24720dd11e829f59c5d37745236", "score": "0.5208782", "text": "function b2yn($bool)\n{\n\tif($bool == 0 || $bool == '0')\n\t{\n\t\treturn 'No';\n\t}\n\telse if($bool == 1 || $bool == '1')\n\t{\n\t\treturn 'Yes';\n\t}\n\telse\n\t{\n\t\treturn $bool;\n\t}\n}", "title": "" }, { "docid": "8c47e290162ed3286837395bbc28bdbb", "score": "0.5195602", "text": "public static function handleBoolean($s){\n if(is_bool($s)){\n return ($s)?'true':'false';\n }else{\n if(is_array($s)){\n return 'Array';\n }else{\n return $s;\n }\n }\n }", "title": "" }, { "docid": "cb42dfe130c92528743f511b15a4d21b", "score": "0.5185761", "text": "public function render() {\n\n\t\t$field = $this->arguments['field'];\n\n\t\t// get field configuration\n\t\t$config = \\Slub\\SlubForms\\Helper\\ArrayHelper::configToArray($field->getConfiguration());\n\n\t\tif (!empty($config['prefill'])) {\n\t\t\t// values may be comma separated:\n\t\t\t// e.g. prefill = fe_users:username, fe_users:email, news:news\n\t\t\t$serialArguments = explode(\",\", $config['prefill']);\n\t\t\t$condition = FALSE;\n\n\t\t\tforeach($serialArguments as $id => $singleArgument) {\n\t\t\t\t// e.g. fe_users:username\n\t\t\t\t// or value:1\n\t\t\t\t// first value is database \"value\" or \"fe_users\"\n\t\t\t\t$settingPair = explode(\":\", $singleArgument);\n\t\t\t\tswitch (trim($settingPair[0])) {\n\t\t\t\t\tcase 'fe_users':\n\t\t\t\t\t\tif (!empty($GLOBALS['TSFE']->fe_user->user[ trim($settingPair[1]) ])) {\n\t\t\t\t\t\t\t$condition = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'news':\n\t\t\t\t\t\t// e.g. news:news\n\t\t\t\t\t\t$newsArgs = GeneralUtility::_GET('tx_news_pi1');\n\t\t\t\t\t\tif ($newsArgs) {\n\t\t\t\t\t\t\t$condition = TRUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'value':\n\t\t\t\t\t\tif (!empty($settingPair[1]))\n\t\t\t\t\t\t\t$condition = TRUE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// check for prefill by GET parameter\n\t\tif ($this->renderingContext->getControllerContext()->getRequest()->hasArgument('prefill')) {\n\n\t\t\t$prefilljson = $this->renderingContext->getControllerContext()->getRequest()->getArgument('prefill');\n\n\t\t\t$prefilljson = stripslashes($prefilljson);\n\n\t\t\t$prefill = json_decode($prefilljson, true);\n\n\t\t\tif (strlen($field->getShortname()) > 0) {\n\n\t\t\t\tif (!empty($prefill[$field->getShortname()])) {\n\n\t\t\t\t\treturn TRUE;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($condition) {\n\n\t\t\treturn 'readonly';\n\n\t\t} else {\n\n\t\t\treturn '';\n\n\t\t}\n\t}", "title": "" }, { "docid": "bef74ea946a97377e3bf87253612188e", "score": "0.51731646", "text": "public function getTemplateNeedButton()\n {\n return $this->template_need_button;\n }", "title": "" }, { "docid": "9ea9552f8cf2f89196b9b509affd1816", "score": "0.51727253", "text": "public function get_template()\n {\n return (isset($this->dbRow['template']))? (String)$this->dbRow['template']: null;\n }", "title": "" }, { "docid": "c6ef0cb8f68d1c9f5b58a98048e0e8e5", "score": "0.5171375", "text": "function getElementTemplateType(){\n if ($this->_flagFrozen){\n return 'static';\n } else {\n return 'default';\n }\n }", "title": "" }, { "docid": "78742c03037e80abac48c2b3dbba9d25", "score": "0.516896", "text": "function boolToWord($bool)\n{\n\treturn $bool ? \"Yes\" : \"No\";\n}", "title": "" }, { "docid": "8d6646cfb99f0c9df8a14e7d8c6943b1", "score": "0.5165398", "text": "public function toBoolean()\n {\n return (boolean)$this->content;\n }", "title": "" }, { "docid": "33ce56be2b685d8de12a38c3b659ddaf", "score": "0.5164468", "text": "public function boolean($name)\n {\n return $this->column('boolean', compact('name'));\n }", "title": "" }, { "docid": "d9369448cbbeb6b826d86a7bf2b2f03a", "score": "0.51396513", "text": "public function getValFalse()\n {\n return $this->valFalse;\n }", "title": "" }, { "docid": "3d1c9aa830d8df2a313c483aea035921", "score": "0.51365227", "text": "private static function bool2str($v){\r\n //convert boolean to text value.\r\n $v = $v === true ? 'true' : $v;\r\n $v = $v === false ? 'false' : $v;\r\n return $v;\r\n }", "title": "" }, { "docid": "2380d7dcc552d98e7b6690d7a4e4933f", "score": "0.5130645", "text": "public function getTemplate() : ?string ;", "title": "" }, { "docid": "c3fe06ef66c0b206edd00c6a9b92c4c3", "score": "0.5124244", "text": "public function render()\n {\n\n $property = $this->templateVariableContainer->get('property');\n $dataType = $this->templateVariableContainer->get('dataType');\n\n $fieldName = GeneralUtility::camelCaseToLowerCaseUnderscored($property);\n $fieldType = Tca::table($dataType)->field($fieldName)->getType();\n\n $inputType = 'text';\n if ($fieldType === FieldType::EMAIL) {\n $inputType = 'email';\n }\n return $inputType;\n }", "title": "" }, { "docid": "5df1beedffd411dc5542c8d88cfbf88a", "score": "0.5113479", "text": "public function getBool()\r\n {\r\n return (array)$this->bool;\r\n }", "title": "" }, { "docid": "8768c5416af872b62b64f25ec2bf8c97", "score": "0.5107516", "text": "function format_true_false($s1 = 'True', $s2 = 'False')\n{\n\t$data[0]['id'] = 1;\n\t$data[0]['value'] = __($s1);\n\t$data[1]['id'] = 0;\n\t$data[1]['value'] = __($s2);\n\t\n\treturn $data;\n}", "title": "" }, { "docid": "37b809167d51fbd2a6fa50462c9c783d", "score": "0.5105016", "text": "function ynLabel($bool)\n{\n\tif($bool == 0 || $bool == '0')\n\t{\n\t\treturn '<span class=\"badge badge-danger\">No</span>';\n\t}\n\telse if($bool == 1 || $bool == '1')\n\t{\n\t\treturn '<span class=\"badge badge-success\">Yes</span>';\n\t}\n\telse\n\t{\n\t\treturn $bool;\n\t\treturn '<span class=\"label label-warning\">'.$bool.'</span>';\n\t}\n}", "title": "" }, { "docid": "96532174920fbcaa6f8fb8a543c494d1", "score": "0.5101548", "text": "function bool2str($input,$returnBit=FALSE){\n if($returnBit){\n return str2bool($input) ? '1' : '0';\n }else{\n return str2bool($input) ? 'true' : 'false';\n }\n}", "title": "" }, { "docid": "094c8a7d6a003de729745a53123958d5", "score": "0.5101458", "text": "public static function get_template() {\n\n\t\t\tif ( AE_Helpers::is_blog_single() ) {\n\t\t\t\t$switch = 'post';\n\t\t\t} elseif ( AE_Helpers::is_blog_archive() ) {\n\t\t\t\t$switch = 'archive';\n\t\t\t} elseif ( AE_Helpers::is_woocommerce() ) {\n\t\t\t\t$switch = 'woocommerce';\n\t\t\t} elseif ( AE_Helpers::is_page() ) {\n\t\t\t\t$switch = 'page';\n\t\t\t} else {\n\t\t\t\t$switch = 'unknown';\n\t\t\t}\n\n\t\t\treturn $switch;\n\n\t\t}", "title": "" }, { "docid": "5bcc9b4eb98e2cf4b0a83d211fa0ee32", "score": "0.5096342", "text": "function bool(...$fields) {\n if (is_array($fields)) {\n $fields = reset($fields);\n }\n\n return $this->castField(\"bool\", $fields);\n }", "title": "" }, { "docid": "3c2ba383deee733b4a4ba035faf5a1b1", "score": "0.50963044", "text": "private function castBooleanToString($boolean)\n {\n return $boolean ? 'true' : 'false';\n }", "title": "" }, { "docid": "a5cf4eb7be174e0c9b4f88751457a6fc", "score": "0.50853205", "text": "function getBoolean($id, $value = false, $access = \"rw\")\n {\n include_once(\"uifc/Boolean.php\");\n $boolean = new Boolean($this->page, $id, $value);\n $boolean->setAccess($access);\n return $boolean;\n }", "title": "" }, { "docid": "9fcc83a257af3c6ca8ade092129f24f3", "score": "0.50839937", "text": "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "title": "" }, { "docid": "e3e397642e32ec642c360ceaed6b6357", "score": "0.5077601", "text": "function mwcb_display_banner_cb () {\n $setting = get_option('mwcb_settings');\n // output the field\n ?>\n <label for=\"mwcb-d-enabled\">\n <input id=\"mwcb-d-posts\" type=\"checkbox\" name=\"mwcb_settings[enabled]\" value=\"true\" \n <?php echo ( $setting[enabled] == 'true') ? 'checked' : ''; ?>>\n </label>\n <?php\n \n}", "title": "" }, { "docid": "667af7808b5bdd8a785b5a67a9072739", "score": "0.5076417", "text": "function field_access_code($boolean) {\n\n $boolean = set_boolean_value($boolean);\n return \"'#access' => $boolean,\\n\";\n}", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.5070406", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.5070406", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.5070406", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "14c6a42166cd0c4587586cd8db66b79a", "score": "0.5068165", "text": "function get_bool_callback( bool $value ) : callable {\n\treturn $value ? '__return_true' : '__return_false';\n}", "title": "" }, { "docid": "51cf22e88350da0af69325111cc86427", "score": "0.5065068", "text": "public static function valueAsBoolean($value) {\n\t\treturn ELSWAK_Boolean::valueAsBoolean($value);\n\t}", "title": "" }, { "docid": "4a4dbce94d277118ea22b156d84ece94", "score": "0.50469565", "text": "function readOnTemplate() { return $this->_ontemplate; }", "title": "" }, { "docid": "8cfcb681e26dad172a8ef6804ee22584", "score": "0.5043139", "text": "public function buildFieldMarkup()\n {\n $container = $this->getContainer();\n $viewRenderer = $container->getViewRenderer();\n\n $slug = $container->getSlug();\n $fieldMarkup = '';\n\n foreach ($this->settings as $field) {\n $fieldMarkup .= $viewRenderer->render(\n $field['template'],\n array(\n 'name' => $slug . '_' . $field['name'],\n 'label' => $field['label'],\n 'value' => $this->getPluginOption($field['name']),\n 'abspath' => ABSPATH,\n 'homeUrl' => $this->getHomeUrl(),\n )\n );\n }\n\n return $fieldMarkup;\n }", "title": "" }, { "docid": "3f6f1eb86b3fe50313988023ef5fc473", "score": "0.5042677", "text": "public function __toString()\n {\n if (is_null($this->getValue())) {\n return $this->getClass() . '(null)';\n }\n\n return $this->getClass() . '(' . ($this->getValue() ? 'true' : 'false') . ')';\n }", "title": "" }, { "docid": "773a2730de90f398ca1293f5779eac1e", "score": "0.50329834", "text": "public function getBool(string $name): bool;", "title": "" }, { "docid": "56ad43dacad2025009e668ac4cee4660", "score": "0.50234693", "text": "public function template_fields()\n {\n return $this->entity_metas()\n ->where('group', static::templateGroupName());\n }", "title": "" }, { "docid": "676dbb3329f4349547cf335fbc188c0a", "score": "0.5017731", "text": "public function getBool($key, $options = null);", "title": "" }, { "docid": "88ce59d7eec6658f49ccd8357a21094c", "score": "0.5017028", "text": "function catalyst_sanitize_bool( $input ) {\n return ( $input );\n}", "title": "" }, { "docid": "064ce2b229d3131b6fa7129116be3638", "score": "0.5015189", "text": "function field_resizable_code($boolean) {\n\n $boolean = set_boolean_value($boolean);\n return \"'#resizable' => $boolean,\\n\";\n}", "title": "" }, { "docid": "3a7a5f60147838dc5852e2c04f704911", "score": "0.50146747", "text": "public function isBoolean();", "title": "" }, { "docid": "1f649bc1b7e83414ffede01b706cf014", "score": "0.50076824", "text": "public function render()\n {\n return view('components.input.checkbox');\n }", "title": "" }, { "docid": "143ae094315895c0c475edaabb387844", "score": "0.5005381", "text": "function wpb_disable_visual_editor_checkbox_render()\n{\n ?>\n <table class=\"wpb-module-settings\">\n <tr>\n <td>\n <p class=\"wpb-module-description\">\n Disables the in-built visual editor, forcing users to use the HTML editor.\n </p>\n </td>\n <td class=\"wpb-module-fields-container\">\n <?php\n $checked_status = (get_option('wpb-disable-visual-editor-enable-field') === \"on\" ? \"checked=\\\"checked\\\"\" : \"\");\n ?>\n <input type=\"checkbox\" name=\"wpb-disable-visual-editor-enable-field\" <?php echo $checked_status ?>>\n </td>\n </tr>\n </table>\n <hr>\n <?php\n}", "title": "" }, { "docid": "a06cdadee8fd56b124ebd0eca5f6e707", "score": "0.5004967", "text": "public function bool()\n {\n return $this->addRule(new Rule\\Boolean());\n }", "title": "" }, { "docid": "e5d8965177a6fdf12c5cfe2aec3bfbb4", "score": "0.50029963", "text": "public function export_value() {\n $value = $this->get_value();\n return $value ? get_string('yes') : get_string('no');\n }", "title": "" }, { "docid": "24cadfa77da993fb8c380793ae54d305", "score": "0.50023735", "text": "public function getTemplate(){\n return $this->template;\n }", "title": "" }, { "docid": "ce3a427d54d8aa54e172c44c96b8cc1b", "score": "0.5000602", "text": "public static function bool($var)\n {\n return boTypeFilters::number($var, false, 'bool');\n }", "title": "" }, { "docid": "84c550086f0185159a4b7401674a6f8e", "score": "0.49903083", "text": "public static function bool() {\n\t\t$f = new GlueDB_Fragment_Builder_Bool();\n\t\tif (func_num_args() > 0) {\n\t\t\t$args = func_get_args();\n\t\t\tcall_user_func_array(array($f, 'init'), $args);\n\t\t}\n\t\treturn $f;\n\t}", "title": "" }, { "docid": "49cc75295e580920cea21fdaabc80ea0", "score": "0.49895978", "text": "function getCheckedAttribute($bool) {\n\tif ($bool) {\n\t\treturn ' checked=\"checked\"';\n\t}\n\treturn \"\";\n}", "title": "" }, { "docid": "3ef4e24552f93226edc745d50e5bafe0", "score": "0.4981277", "text": "public function hasTemplate() : bool;", "title": "" }, { "docid": "e2d9348652ad1e8c808deb6cdef985cf", "score": "0.49761426", "text": "public function getSparql() {\n return $this->value ? 'true' : 'false';\n }", "title": "" }, { "docid": "c3848f622aeacf445375f17463e1f0a4", "score": "0.49724162", "text": "public function __get( $objProp ) {\n \n if( 'include_header' === $objProp ) {\n return (bool)$this->_include_header;\n }\n\n if( 'include_footer' === $objProp ) {\n return (bool)$this->_include_footer;\n }\n\n if( '_file_template_year' === $objProp ) {\n return $this->_file_template_year;\n }\n\n if( '_additional_css_urls' === $objProp ) {\n return $this->_additional_css_urls;\n }\n\n if( '_additional_js_urls' === $objProp ) {\n return $this->_additional_js_urls;\n }\n \n if( '_content_to_render' === $objProp ) {\n return $this->_content_to_render;\n }\n\n return ( false === array_key_exists( strtolower( \"$objProp\" ), $this->_content_to_render ) )\n ? false : $this->_content_to_render[ strtolower( \"$objProp\" ) ];\n }", "title": "" } ]
6038716472d41196e09938705f7fdfe9
Test case for gETPackageIdParcels Retrieve the parcels associated to the package.
[ { "docid": "9156d36cb17604f856d89d0dfbd9ae8c", "score": "0.70655316", "text": "public function testGETPackageIdParcels()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" } ]
[ { "docid": "1b081031d3c8be03354c4f4154a42087", "score": "0.6403433", "text": "public function getParcels() {\n return $this->_parcels;\n }", "title": "" }, { "docid": "84d20fe809bd01cf19289ba6851771a3", "score": "0.6087089", "text": "private function build_parcels( array $package, ParcelInfo $default ) {\n\t\t$parcels = array();\n\t\t$contents = isset( $package['contents'] ) ? $package['contents'] : array();\n\t\tforeach ( $contents as $item ) {\n\t\t\t/**\n\t\t\t * WooCommerce product.\n\t\t\t *\n\t\t\t * @var WC_Product $product\n\t\t\t */\n\t\t\t$product = $item['data'];\n\t\t\tfor ( $i = 0; $i < $item['quantity']; $i ++ ) {\n\t\t\t\t$parcel = new Package();\n\n\t\t\t\t$parcel->weight = is_numeric( $product->get_weight() )\n\t\t\t\t\t? wc_get_weight( (float) $product->get_weight(), 'kg' )\n\t\t\t\t\t: $default->weight;\n\t\t\t\t$parcel->height = is_numeric( $product->get_height() )\n\t\t\t\t\t? wc_get_dimension( (float) $product->get_height(), 'cm' )\n\t\t\t\t\t: $default->height;\n\t\t\t\t$parcel->width = is_numeric( $product->get_width() )\n\t\t\t\t\t? wc_get_dimension( (float) $product->get_width(), 'cm' )\n\t\t\t\t\t: $default->width;\n\t\t\t\t$parcel->length = is_numeric( $product->get_length() )\n\t\t\t\t\t? wc_get_dimension( (float) $product->get_length(), 'cm' )\n\t\t\t\t\t: $default->length;\n\n\t\t\t\t$parcels[] = $parcel;\n\t\t\t}\n\t\t}\n\n\t\treturn $parcels;\n\t}", "title": "" }, { "docid": "ebcb2a3aeb35bee6c579442c8f33f0b3", "score": "0.60376316", "text": "public function testGETShipmentIdParcels()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "e78b19bc1129fa9f17546488aba9ad8b", "score": "0.5766595", "text": "public function getAllParcours() {\n $listeParcours = array();\n\n $requete = $this->db->prepare('SELECT par_num, vil_num1,vil_num2,par_km FROM parcours ORDER BY 1');\n $requete->execute();\n\n while ($parcours = $requete->fetch(PDO::FETCH_OBJ))\n $listeParcours[] = new Parcours($parcours);\n\n $requete->closeCursor();\n return $listeParcours;\n }", "title": "" }, { "docid": "51a8bafecb6732aadef485d9a87a69c4", "score": "0.5704012", "text": "public function getPulses($id) {\n }", "title": "" }, { "docid": "1e41b00cfb43d2108c6f7ed60caba257", "score": "0.5699814", "text": "public function get_parceiro($id) {\n $url = 'https://cartaomasterclin.com.br/api/v1/parceiro/' . $id;\n return $this->sendGet($url);\n }", "title": "" }, { "docid": "7603479bf3638ce339e8d17894b052c0", "score": "0.55846804", "text": "public function list_parceiro() {\n $url = 'https://cartaomasterclin.com.br/api/v1/parceiro/';\n return $this->sendGet($url);\n }", "title": "" }, { "docid": "7556a2b60a11ffd8785cd7363292e95c", "score": "0.5176235", "text": "public function actionParroquia($id)\n {\n $lugar = Lugarresidencia::find()->where(['CODLUGARRESIDE' => $id])->one();\n $localidad = Localidad::find()->where(['CODLOCREC' =>$lugar->CODLOCREC])->one();\n $parroquia = Parroquia::find()->where(['CODPARROQUIA' => $localidad->CODPARROQUIA])->one();\n echo Json::encode($parroquia->PARROQUIA);\n }", "title": "" }, { "docid": "1ad9c0959b8acebb52989cd4950fae1c", "score": "0.51627624", "text": "function get_parks_list()\n{ \n\tglobal $db;\n\treturn $db;\n}", "title": "" }, { "docid": "342e3fab3175f9b2933d03800ec202c9", "score": "0.51586515", "text": "public function listProcedures();", "title": "" }, { "docid": "ef07402eb9e565ab4904956852595ad8", "score": "0.5143334", "text": "public function getPropositionsItem($id, $lpx=\"\")\n\t\t{\n\t\t\t$lpx = ($lpx ? $lpx.\"_\" : \"\");\n\t\t\t$query = \"SELECT M.*, M.\".$lpx.\"name as name, M.\".$lpx.\"details as details, M.\".$lpx.\"image as image \n\t\t\tFROM [pre]propositions as M \n\t\t\tWHERE `id`='$id' \n\t\t\tLIMIT 1;\n\t\t\t\";\n\t\t\t$resultMassive = $this->rs($query);\n\t\t\t\n\t\t\t$result = ($resultMassive ? $resultMassive[0] : array());\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "bcfdba8ef9f138c49a2c058dc29f0254", "score": "0.5132498", "text": "public function getQuantidadeParcelas()\n {\n return $this->quantidadeParcelas;\n }", "title": "" }, { "docid": "f6cc9686d0f5efed1f5bc3440bc3bd1d", "score": "0.5115393", "text": "public function getEventosParientes($id) {\n $consulta = $this->_db->get_results(\"SELECT c.*,p.nombres, p.apellidos,i.id as inscripcion FROM ok_cursos_eventos as c, ok_inscritos_cursos_eventos as i, ok_parientes as p Where p.fk_afiliado=$id and i.fk_persona=p.id and i.fk_curso=c.id and tipo_persona = 2;\");\n //Se retorna la consulta y se recorren los registros\n return $consulta;\n\t}", "title": "" }, { "docid": "cdd157d36ea52b762d3964687c6de99b", "score": "0.50922775", "text": "public function getPariente($id) {\n $consulta = $this->_db->get_row(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\t\t\t\ttipo_documento,\n\t\t\t\t\t\t\t\t\t\t\t\tnro_documento as num_docu,\n\t\t\t\t\t\t\t\t\t\t\t\tnombres,\n\t\t\t\t\t\t\t\t\t\t\t\tapellidos,\n\t\t\t\t\t\t\t\t\t\t\t\tfecha_nacimiento,\n\t\t\t\t\t\t\t\t\t\t\t\tgenero,\n\t\t\t\t\t\t\t\t\t\t\t\tfk_parentesco as parentesco \n\t\t\t\t\t\t\t\t\t\t\tFROM ok_parientes\n\t\t\t\t\t\t\t\t\t\t\tWHERE id =$id;\");\n //Se retorna la consulta y se recorren los registros\n return $consulta;\n\t}", "title": "" }, { "docid": "c6f2ff81670c8518927f82613b530666", "score": "0.50816715", "text": "public function getProcedureList()\n {\n $returnValue = null;\n\n // section -64--88-56-1--7ac797d2:1350469f2e6:-8000:0000000000000961 begin\n // section -64--88-56-1--7ac797d2:1350469f2e6:-8000:0000000000000961 end\n\n return $returnValue;\n }", "title": "" }, { "docid": "f78f752ca1202a0aefcf370f2fb77a47", "score": "0.5069912", "text": "public function getPackagePricePolicy($package_id){\n\t\t$this->db->select(\"*\");\n\t\t$this->db->from(\"package_pricing_policy\");\n\t\t$this->db->where('package_id',$package_id);\n\t\t$query=$this->db->get();\n\t\tif($query->num_rows()){\n\t\t\treturn $query->row();\n\t\t}else{\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "a8ad57a880f871d6da07d0d52c739e65", "score": "0.505499", "text": "public function getParcels(array $queryParams = []): array\n {\n $endpoint = sprintf('%s', TerminalAfricaConstant::PARCEL_ENDPOINT);\n\n return $this->makeRequest(\n method: 'GET',\n endpoint: $endpoint,\n queryParams: $queryParams\n );\n }", "title": "" }, { "docid": "2810f76005d0ea7c92f9526bd90aa773", "score": "0.50463253", "text": "public function actionGetParidad()\n {\n\n $wsdl =\n \\Yii::$app->keyStorage->get('config.phc.webservice.endpoint', 'http://localhost:8088/servidor.php?wsdl');\n\n $cliente =\n \\Yii::$app->keyStorage->get('config.phc.webservice.cliente', '50527');\n\n $llave =\n \\Yii::$app->keyStorage->get('config.phc.webservice.llave', '487478');\n\n $params = \"<cliente>$cliente</cliente><llave>$llave</llave>\";\n\n $client = new \\SoapClient($wsdl);\n //$valores = $client->ObtenerListaArticulos(['cliente'=>'50527', 'llave'=>'487478' ])->datos;\n\n return json_encode( $client->ObtenerParidad(new \\SoapVar($params, XSD_ANYXML))->datos );\n\n }", "title": "" }, { "docid": "fca46c232a77ef86c9bf19723e6ca87a", "score": "0.5045068", "text": "private function lppros()\n {\n if(!empty($this->lp))\n {\n return Producto::join('lppros', 'lppros.producto', '=', 'productos.id')\n ->where('lppros.lp', $this->lp)\n ->where('lppros.estado', 1)\n ->select('productos.descripcion','productos.tipo','lppros.id',\n 'lppros.alias', 'lppros.valor')\n ->orderBy('lppros.alias', 'ASC')\n ->get();\n }\n }", "title": "" }, { "docid": "3fcf6e2c5028442a62e0cca81e1edd4f", "score": "0.50397813", "text": "public function Parkinglots ()\n {\n\t$id = $this->Listcmd_CommonConstructor('parkinglot', 'parkinglotscomplete', 'Parkinglots');\n\tif ($id === FALSE)\n\t{\n\t return FALSE;\n\t}\n\tarray_walk($this->TMP[$id], function (&$a1){unset($a1['Event']);unset($a1['ActionID']);});\n\t$retval = $this->TMP[$id];\n\tunset($this->TMP[$id]);\n\treturn $retval;\t\n }", "title": "" }, { "docid": "9193e55700b751d185fca3b63fbacd3c", "score": "0.501128", "text": "public function getParcel(string $parcelId): array\n {\n $endpoint = sprintf('%s/%s', TerminalAfricaConstant::PARCEL_ENDPOINT, $parcelId);\n\n return $this->makeRequest(\n method: 'GET',\n endpoint: $endpoint\n );\n }", "title": "" }, { "docid": "8772cfd5382543189f0b6fa9077a0a64", "score": "0.5009084", "text": "function get_ppl_ids() {\r\n\t\tglobal $wpdb;\r\n\t\t// IF wpml is active and pplcpt is translated get correct ids for language\r\n\t\tif( function_exists('icl_object_id') ) {\r\n\t\t\t$ppl_ids = $this->get_wpml_ids();\r\n\t\t\tif(!empty($ppl_ids)) {\r\n\t\t\t\treturn $ppl_ids;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $wpdb->get_results( \"SELECT ID, post_content FROM $wpdb->posts WHERE post_type='pplcpt' AND post_status='publish'\");\r\n\t}", "title": "" }, { "docid": "ed2fcf450defba602c4a2e83a0c9b34a", "score": "0.4986946", "text": "public function getParcellesAction()\n {\n $em = $this->getDoctrine()->getManager();\n $parcelles = $em->getRepository('EsigBundle:Parcelle')->findAll();\n \n if($parcelles){\n return $parcelles;\n } else{ \n return null;\n }\n }", "title": "" }, { "docid": "68d528533e696bf42035b76a277e4b71", "score": "0.49856773", "text": "public function getParliamentarians();", "title": "" }, { "docid": "4b80feba8a387165a89935d10b515cc1", "score": "0.49831015", "text": "public function findById($id)\n {\n $parcours = Parcours::where('id', $id)->first();\n\n return $parcours;\n }", "title": "" }, { "docid": "af23892e8bc696096ff6e790037b6060", "score": "0.49524945", "text": "public function getAllParallaxes()\n\t\t{\n\t\t\t$query = \"SELECT id,name FROM [pre]service_parallaxes WHERE 1 ORDER BY id LIMIT 1000\";\n\t\t\treturn $this->rs($query);\n\t\t}", "title": "" }, { "docid": "290f4745f856fcfb086bad24d0480b2d", "score": "0.49367967", "text": "public static function all() {\n\n\t\tself::dbConnect();\n\n\t\t$parkQuery = \"SELECT * FROM np_details\";\n\n\t\t$stmt = self::$dbc->query($parkQuery);\n\n\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$parks = [];\n\n\t\tforeach($results as $result) {\n\t\t\t$park = new Park();\n\t\t\t$park->id = $result['id'];\n\t\t\t$park->name = $result['name'];\n\t\t\t$park->location = $result['location'];\n\t\t\t$park->dateEstablished = $result['date_established'];\n\t\t\t$park->areaInAcres = $result['area']; \n\t\t\t$park->tagline = $result['tagline'];\n\t\t\t$park->description = $result['description'];\n\t\t\t$park->type = $result['type'];\n\n\n\t\t\t$parks[]=$park; \n\n\t\t}\n\n\t\treturn $parks;\n\n\n\n\t}", "title": "" }, { "docid": "5c544d150a243387c48a38273e78a918", "score": "0.49329832", "text": "public function getParallaxesItem($id)\n\t\t{\n\t\t\t$query = \"SELECT M.* FROM [pre]service_parallaxes as M WHERE `id`='$id' LIMIT 1\";\n\t\t\t$resultMassive = $this->rs($query);\n\t\t\t\n\t\t\t$result = ($resultMassive ? $resultMassive[0] : array());\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "da3f03404603d8d01ab547800226c0d3", "score": "0.49163246", "text": "public static function getItems($pallet_id){\n \n return PalletItem::select('pallets.barcode as plt_barcode', 'labels.barcode as label_barcode',\n 'pallet_items.product_code', 'pallet_items.prim_qty',\n 'pallet_items.prim_uom_code', 'pallet_items.id')\n ->join('pallets','pallets.id','pallet_items.pallet_id')\n ->leftJoin('labels','labels.id','pallet_items.label_id')\n ->where('pallet_items.company_id', Auth::user()->company_id)\n ->where('pallet_items.pallet_id', $pallet_id)\n ->where('pallet_items.pallet_status_id', '<>', '9')\n ->get()\n ->toArray();\n }", "title": "" }, { "docid": "811c2494862d47c62191962d84e58847", "score": "0.4909446", "text": "public function testGETParcelIdParcelLineItems()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "b7fab508badf70289fa3593665e6aae9", "score": "0.49085057", "text": "public function getAllProcedure()\n {\n $procedures = $this->getEntityManager()->getRepository('AppBundle:ProcedureIntranet')\n ->createQueryBuilder('p')\n ->orderBy('p.numero', 'ASC')\n ->getQuery()\n ->getResult();\n\n return $procedures;\n }", "title": "" }, { "docid": "2d1b51ca961369f8cf518409d470c21e", "score": "0.48974973", "text": "public function getPoids()\n {\n return $this->poids;\n }", "title": "" }, { "docid": "333ed8bbe56eeca117a1a372761f5ed1", "score": "0.48961276", "text": "function get_pids($rd,$company_id,$link) {\n $query=sprintf(\"select id from vacancies_razd where site='%d' and pid='%d'\",$this->sitenumber,$rd);\n $this->link->query($query);\n while ($res=$this->link->next_record()) {\n $pids[]=$res['id'];\n }\n return $pids;\n }", "title": "" }, { "docid": "93b17ed041a8c06a5c76ec4341f2ec9d", "score": "0.48644468", "text": "public function ajax_get_prime_pollsite($prime, $pollsite_id) {\n $title = 'All Prime Voters';\n $description = 'List of voters by Poll site with more primes voters.';\n $this->selected_columns = array('photo', 'voter_id', 'fullname', 'prime1', 'prime2', 'prime3', 'phone_number', 'electiondistrict_id', 'assemblydistrict_id', 'pollsite_id');\n if($prime == 1) {\n $title = 'Prime Voters';\n } else if($prime == 2) {\n $title = 'Double Prime Voters';\n } else if($prime == 3) {\n $title = 'Triple Prime Voters';\n }\n\n $pollsite = Pollsite::find($pollsite_id);\n if( ! is_null($pollsite) ) {\n $title .= ' in \"'.$pollsite->name.'\"';\n } \n\n\n if($prime>=0 && $prime<=3) {\n $this->selected_columns = array('photo', 'voter_id', 'fullname', 'prime'.$prime,'phone_number', 'electiondistrict_id', 'assemblydistrict_id', 'pollsite_id');\n } \n\n Input::merge(array('do_search' => 1,\n 'prime' => $prime,\n 'pollsite_id' => $pollsite_id,\n 'perPage' => 10,\n 'dialog-title' => $title,\n 'dialog-description' => $description,\n 'dialog-url' => URL::to_action('voter@prime_pollsite', array($prime, $pollsite_id)),\n )\n );\n \n return $this->get_list(); \n }", "title": "" }, { "docid": "962c141416b31b5b36a6945e186cff4a", "score": "0.4853357", "text": "public function getPackageSelected(){\n $id = $this->input->get('id');\n $job = $this->jobs_m->get(config('job'),array('id'=>$id));\n $package = $job['package'];\n $packages = array('0'=> 'newspaper_price','1'=> 'basic_price','2'=> 'extended_price', '3'=>'professional_price');\n $package = $packages[$package];\n echo $price = config($package);\n exit;\n }", "title": "" }, { "docid": "48a2e40de8d84f5d795e9f3d0b5c906e", "score": "0.48507702", "text": "public function ajax_get_prime($id=0) {\n $title = 'All Prime Voters';\n $description = 'List of voters by prime-voters.';\n $this->selected_columns = array('photo', 'voter_id', 'fullname', 'prime1', 'prime2', 'prime3', 'phone_number', 'electiondistrict_id', 'assemblydistrict_id', 'pollsite_id');\n if($id == 1) {\n $title = 'Prime Voters';\n } else if($id == 2) {\n $title = 'Double Prime Voters';\n } else if($id == 3) {\n $title = 'Triple Prime Voters';\n }\n\n if($id>=0 && $id<=3) {\n $this->selected_columns = array('photo', 'voter_id', 'fullname', 'prime'.$id,'phone_number', 'electiondistrict_id', 'assemblydistrict_id', 'pollsite_id');\n } \n\n Input::merge(array('do_search' => 1,\n 'prime' => $id,\n 'perPage' => 10,\n 'dialog-title' => $title,\n 'dialog-description' => $description,\n 'dialog-url' => URL::to_action('voter@prime', array($id)),\n )\n );\n \n return $this->get_list(); \n }", "title": "" }, { "docid": "9f5d3c6be18d1793730b610e9ee6b970", "score": "0.48136452", "text": "public function numberParcours() {\n $requete = $this->db->prepare('SELECT COUNT(par_num) FROM parcours');\n $requete->execute();\n\n $number = $requete->fetch();\n $numberParcours = $number[0];\n $requete->closeCursor();\n return $numberParcours;\n }", "title": "" }, { "docid": "101e8477b9162c8ec8c05ea2ab844c2b", "score": "0.48077708", "text": "function get_PIDs() {\n\tglobal $connection;\n\n\t$query = \"SELECT * FROM PROMOIDS;\";\n\t$find_PIDs = mysqli_query($connection, $query);\n\n\tconfirm_query($find_PIDs);\n\n\t$pidsArray = array();\n\t while ($row = mysqli_fetch_assoc($find_PIDs)) {\n\t\t // echo $row[\"NAME\"];\n\t\t // $albumsArray[$row[\"ID\"]] = $row[\"NAME\"];\n\t\t $pidsArray[$row[\"PID\"]] = $row[\"NAME\"];\n\t };\n\treturn $pidsArray;\n}", "title": "" }, { "docid": "90bf430b95b0ff1ae7bcb519860b5d7f", "score": "0.47954586", "text": "public function index()\n {\n $parceiros = Parceiro::all();\n\n return $parceiros;\n }", "title": "" }, { "docid": "2b759c31f78144eb5a0c2ef1bbbdee55", "score": "0.4776526", "text": "public function GetTvaParID($id) {\n\t\t$sql = 'CALL get_tva_parID(:tID)';\n\t\t$param = array(':tID' => $id);\n\t\t$row = array();\n\t\t$row = DatabaseHandler::GetRow($sql, $param);\n\t\tif (!empty($row)) {\n\t\t\t$this -> _mTvaID = $id;\n\t\t\t$this -> _mTvaNom = $row['tvaNom'];\n\t\t\t$this -> _mTvaTaux = $row['tvaTaux'];\n\t\t\t$this -> _mIsUsed = $row['IsUsed'];\n\t\t}\n\t}", "title": "" }, { "docid": "6e328749f8c5a736d7c387d76f2b6228", "score": "0.4751674", "text": "public function getCarParksById($stop_point_id)\n {\n try {\n $return = $this->stopPointApi->stopPointGetCarParksById($stop_point_id);\n } catch(ApiException $e) {\n $this->apiService->logApiException($e);\n throw WrapperException::wrapException($e);\n }\n\n return $return;\n }", "title": "" }, { "docid": "3185669e9c3c3e9b462b886e8985ec25", "score": "0.47364348", "text": "function get_list_perkiraan($id_departemen){\r\n $query = sprintf(\"select gl_perk_dept.id_dp,gl_perkiraan.* from gl_perk_dept,gl_perkiraan\r\n where gl_perk_dept.prk_id = gl_perkiraan.id_prk\r\n and gl_perk_dept.dept_id = '%s' order by gl_perkiraan.id_prk\",\r\n $id_departemen);\r\n $this->result = $this->conn->Execute($query) or die($this->conn->ErrorMsg());\r\n return $this->result;\r\n }", "title": "" }, { "docid": "13326c4c97ecd021dadb35a7cefe25b7", "score": "0.47093388", "text": "public function getParkingById($id){\n return $this->parkingRepository->findOneBy(array('id' => $id));\n }", "title": "" }, { "docid": "0b930619e99aa53600c42a344bb68809", "score": "0.46922722", "text": "public static function getPackaging() {\n $query = Materialp::query();\n $query->select('koi_materialp.id as id', 'materialp_nombre as empaque_nombre');\n $query->where('materialp_empaque', true);\n $query->orderBy('empaque_nombre', 'asc');\n\n return $query->lists('empaque_nombre', 'id');\n }", "title": "" }, { "docid": "2ea6416c260eb5aa7305b575e3ed54fd", "score": "0.4685282", "text": "function checkComplementoryProds($pName,$idval, $orderItemType){\n\t\t$ids['0'] = getComplementoryproddefids($pName);\n\n\t\t$prodstatus = getProdViaStatus($ids, $orderItemType);\n\t\t\tif(count($prodstatus[$orderItemType])){\n\t\t\t\t foreach($prodstatus[$orderItemType] as $key=>$val){\n\t\t\t\t \tif(in_array($key,$ids )){\n\t\t\t\t\t\treturn $key;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $id;\n\t}", "title": "" }, { "docid": "fa9ebeb891560a6a4c34ee2301acd429", "score": "0.46706828", "text": "public function listProjectsParents($params)\n {\n // Debe leer todos los proyectos que se encuentren en estaus 40 - Cotización\n $qry = \"SELECT pjt_id, pjt_name, pjt_number \n FROM ctt_projects \n WHERE pjt_status = '40' ORDER BY pjt_name ASC;\n \";\n return $this->db->query($qry);\n }", "title": "" }, { "docid": "02e806cf9a71574c1c357302c437e89d", "score": "0.46671072", "text": "function getPackages($labId,$sampletypeId)\n {\n if($labId > 0 && $sampletypeId > 0){\n $apiUrl=$this->source.'/listpackage?lab_id='.$labId.'&sampletype_id='.$sampletypeId;\n $curl = new curl\\Curl();\n $token= 'Authorization: Bearer '.$_SESSION['usertoken'];\n $curl->setOption(CURLOPT_HTTPHEADER, ['Content-Type: application/json' , $token]);\n $curl->setOption(CURLOPT_CONNECTTIMEOUT, 180);\n $curl->setOption(CURLOPT_TIMEOUT, 180);\n $curl->setOption(CURLOPT_SSL_VERIFYPEER, false);\n $list = $curl->get($apiUrl);\n return $list;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "c47c3b5d9358e5d458f8edb93d0be4d4", "score": "0.46430135", "text": "function get_pessoa($id)\n {\n return $this->db->get_where('pessoa',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "3888a94702a23fac4c3b0b4855554a42", "score": "0.46354875", "text": "public function getPiCompanyList($studyId, $companyId) {\n\t$studyPiObj = new PhvStudyPi();\n\t$companyObj = new PhvCompany();\n\t$companyPiObj = new PhvCompanyPis();\n\t$query = new \\Doctrine\\ORM\\QueryBuilder($this->getEntityManager());\n\t$query = $query->select('cp.id as compPid','sp.id', 'c.company_name')\n\t\t\t->from($studyPiObj->getTableName(), 'sp')\n\t\t\t->Join($companyPiObj->getTableName(), 'cp', \"ON\", 'cp.id=sp.company_pis_id')\n\t\t\t->leftJoin($companyObj->getTableName(), 'c', \"ON\", 'c.id=cp.pi_id')\n\t\t\t->where($query->expr()->eq('sp.study_id', $studyId))\n\t\t\t->andWhere($query->expr()->eq('cp.company_id', $companyId));\n\t\n\t$result = $this->getEntityManager()->getConnection()->executeQuery($query)->fetchAll();\n $tempArr = array();\n\tif(count($result) > 0) {\n\t foreach ($result as $val) {\n\t\t$tempArr[] = $val['company_name'];\n\t }\n\t}\n return $tempArr;\n }", "title": "" }, { "docid": "177ab1b1cee26ec18e137b9fdd302002", "score": "0.46198863", "text": "public function getParagon() {\n return $this->paragon;\n }", "title": "" }, { "docid": "ed623c0fa380a566251f5cc4d954d1a1", "score": "0.46153584", "text": "function getByIdMco_proveedores($PVE_ID) {\n $sql=\"SELECT * FROM mco_proveedores WHERE PVE_ID=$PVE_ID\";\n return $this->connection->GetAll($sql);\n }", "title": "" }, { "docid": "05a1c82506d6ab654af255269d503e03", "score": "0.46071538", "text": "function geraListaParoquias()\r\n{\r\n $links = getLinksParoquias();\r\n $listaDados = [];\r\n for ($i = 0; $i < count($links); $i++) {\r\n Percentual(' Conteudo Paroquias', count($links), $i);\r\n // var_dump(getParoquiaContents($links[$i]));\r\n array_push($listaDados, getParoquiaContents($links[$i]['nome'], $links[$i]['link']));\r\n }\r\n return $listaDados;\r\n}", "title": "" }, { "docid": "27e95c2ab08554b6ec9e569c553433d2", "score": "0.4606794", "text": "public function getParametrs()\n {\n return $this->hasMany(Parametrs::className(), ['id' => 'parametrs_id'])->viaTable('products_parametrs', ['products_id' => 'id']);\n }", "title": "" }, { "docid": "242809bb83c8525c60375b539adcec7b", "score": "0.46066013", "text": "public function Dot_GetProPackageItemFromID($uid, $editPackageID) {\n\t\t$uid = mysqli_real_escape_string($this->db, $uid);\n\t\t$editPackageID = mysqli_real_escape_string($this->db, $editPackageID);\n\t\t$CheckUserIsAdmin = mysqli_query($this->db, \"SELECT user_id FROM dot_users WHERE user_id= '$uid'\") or die(mysqli_error($this->db));\n\t\t$checkPriceIDExist = mysqli_query($this->db, \"SELECT price_id FROM dot_pro_price_table WHERE price_id= '$editPackageID'\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($CheckUserIsAdmin) == 1 && mysqli_num_rows($checkPriceIDExist) == 1) {\n\t\t\t$query = mysqli_query($this->db, \"SELECT price_type,price_amounth,price_info,price_key_number,price_icon,pro_price_time,pro_price_year_day_month_week FROM dot_pro_price_table WHERE price_id = '$editPackageID'\") or die(mysqli_error($this->db));\n\t\t\t$data = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\t\treturn $data;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "790a728e3c0d30b2864852579ecaaf32", "score": "0.45998758", "text": "public function all(): array\n {\n return $this->pems;\n }", "title": "" }, { "docid": "36331d30641f780a15236c70e9954d85", "score": "0.4572499", "text": "public function verificarPyP()\n {\n $resultado = $this->dbContext->query('SELECT id FROM partida WHERE estado = 1 ');\n if ($resultado->num_rows > 0) {\n $partido = true;\n } else {\n $partido = false;\n }\n $resultado->close();\n\n $resultado = $this->dbContext->query('SELECT id FROM puesto WHERE estado = 1');\n if ($resultado->num_rows > 0) {\n $puesto = true;\n } else {\n $puesto = false;\n }\n $resultado->close();\n\n if ($partido == true && $puesto == true) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f40a9c7e6c1c7f0530b6d0b008f4f065", "score": "0.456957", "text": "public function getParkinglot()\n {\n return $this->getKey('Parkinglot');\n }", "title": "" }, { "docid": "5e34bfaa97c3efcb430757757f37de0b", "score": "0.4539464", "text": "public function getPendingParcelsDescription() {\n return $this->_pendingParcelsDescription;\n }", "title": "" }, { "docid": "9db293f09ed96fb5174c1bccae084633", "score": "0.4539451", "text": "public function getSimplePropositions()\n\t\t{\n\t\t\t$query = \"SELECT id,name FROM [pre]propositions WHERE 1 ORDER BY id LIMIT 1000\";\n\t\t\treturn $this->rs($query);\n\t\t}", "title": "" }, { "docid": "8b5c43e44e68e633a7265d68f2615250", "score": "0.45392987", "text": "private function get_composite_product_data( $package ){\n $package_composite_products_data = array();\n $shipping_package = array();\n\n foreach ($package['contents'] as $item_id => $values) {\n if(!empty($values['data']->get_weight()) && !empty($values['data']->get_length()) && !empty($values['data']->get_width())&& !empty($values['data']->get_height())){\n return $package;\n }else{\n $components_id_array = array();\n if(isset($values['composite_data'])){\n $composite_data = $values['composite_data'];\n if(elex_dhl_get_product_length( $values['data'] ) && elex_dhl_get_product_height( $values['data'] ) && elex_dhl_get_product_width( $values['data'] ) && elex_dhl_get_product_weight( $values['data'] )){\n foreach($composite_data as $composite_datum){\n if(!empty($components_id_array) && array_key_exists($composite_datum['product_id'], $components_id_array)){\n $components_id_array[$composite_datum['product_id']] += 1; \n }else{\n $components_id_array[$composite_datum['product_id']] = $composite_datum['quantity'];\n }\n }\n $composite_product_data = $values['data'];\n $composite_product_id = $composite_product_data->get_id();\n $components_id_array['parent_product_id'] = $composite_product_id;\n\n $package_composite_products_data[$item_id] = $components_id_array;\n }else{\n $package_composite_products_data[$item_id] = $values['composite_data'];\n }\n }else{\n $shipping_package['contents'][$item_id]['data'] = $values['data'];\n $shipping_package['contents'][$item_id]['quantity'] = $values['quantity'];\n }\n }\n }\n\n if(!empty($package_composite_products_data)){\n $package_composite_products_data = $this->composite_data_unique(array_shift($package_composite_products_data));\n foreach($package_composite_products_data as $package_composite_products_datum){\n $composite_product_id = isset($package_composite_products_datum['variation_id'])? $package_composite_products_datum['variation_id']: $package_composite_products_datum['product_id'];\n $composite_product = wc_get_product($composite_product_id);\n $shipping_package['contents'][$composite_product_id]['data'] = $composite_product;\n $shipping_package['contents'][$composite_product_id]['quantity'] = $package_composite_products_datum['quantity'];\n }\n }\n $package['contents'] = $shipping_package['contents'];\n\n return $package;\n }", "title": "" }, { "docid": "f657d84adc02b2c2d4d6d7ef36f7024a", "score": "0.45365843", "text": "public function testGetPirepPilotPay()\n {\n $acars_pay_rate = 100;\n\n $subfleet = $this->createSubfleetWithAircraft(2);\n $rank = $this->createRank(10, [$subfleet['subfleet']->id]);\n $this->fleetSvc->addSubfleetToRank($subfleet['subfleet'], $rank, [\n 'acars_pay' => $acars_pay_rate,\n ]);\n\n $this->user = factory(App\\Models\\User::class)->create([\n 'rank_id' => $rank->id,\n ]);\n\n $pirep_acars = factory(App\\Models\\Pirep::class)->create([\n 'user_id' => $this->user->id,\n 'aircraft_id' => $subfleet['aircraft']->random(),\n 'source' => PirepSource::ACARS,\n 'flight_time' => 60,\n ]);\n\n $payment = $this->financeSvc->getPilotPay($pirep_acars);\n $this->assertEquals(100, $payment->getValue());\n\n $pirep_acars = factory(App\\Models\\Pirep::class)->create([\n 'user_id' => $this->user->id,\n 'aircraft_id' => $subfleet['aircraft']->random(),\n 'source' => PirepSource::ACARS,\n 'flight_time' => 90,\n ]);\n\n $payment = $this->financeSvc->getPilotPay($pirep_acars);\n $this->assertEquals($payment->getValue(), 150);\n }", "title": "" }, { "docid": "254d17d4b946c874d174e7c8e5034cd4", "score": "0.45352843", "text": "function listarParamPlanilla(){\n\t\t$this->procedimiento='plani.ft_param_planilla_sel';\n\t\t$this->transaccion='PLA_PARAMPLA_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_param_planilla','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_tipo_planilla','int4');\n\t\t$this->captura('porcentaje_calculo','numeric');\n\t\t$this->captura('valor_promedio','numeric');\n\t\t$this->captura('porcentaje_menor_promedio','numeric');\n\t\t$this->captura('porcentaje_mayor_promedio','numeric');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('fecha_incremento','date');\n\t\t$this->captura('porcentaje_antiguedad','numeric');\n $this->captura('haber_basico_inc','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "efd845d6c6a3a8cd5c63317259c11347", "score": "0.4532596", "text": "public static function getModuleParamsFromId($id) {\n\t\t\n\t\t// define database\n\t\t$dbo = JFactory::getDbo();\n\t\t\n\t\t// execute the query\n\t\t$query = $dbo->getQuery(true);\n\t\t$query->select('m.*');\n\t\t$query->from('#__modules AS m');\n\t\t$query->where('id = '.$id);\n\t\t$dbo->setQuery($query);\n\t\t\n\t\t$module = $dbo->loadObject();\n\t\t\n\t\tif ($module) {\n\t\t\t\n\t\t\t// get params\n\t\t\t$params = new JRegistry($module->params); \n\t\t}\n\t\t\n\t\treturn $params;\n\t}", "title": "" }, { "docid": "d1b23cae191546801e5cfd467f135070", "score": "0.45258623", "text": "public static function getMembresEquipe($id){\r\n\t\t\t\r\n\t\tglobal $bdd;\r\n\t\t$membres = $bdd -> prepare('SELECT PARTICIPANT.ID_PARTICIPANT, PARTICIPANT.NOM, PARTICIPANT.PRENOM, PARTICIPANT.MAIL\r\n\t\t\t\t\t\t\t\t\tFROM PARTICIPANT, APPARTENIR_A, EQUIPE \r\n\t\t\t\t\t\t\t\t\tWHERE PARTICIPANT.ID_PARTICIPANT=APPARTENIR_A.ID_PARTICIPANT\r\n\t\t\t\t\t\t\t\t\tAND EQUIPE.ID_EQUIPE=APPARTENIR_A.ID_EQUIPE\r\n\t\t\t\t\t\t\t\t\tAND EQUIPE.ID_EQUIPE = ?');\r\n\t\t$membres -> execute(array($id));\r\n\t\t$tuple = $membres -> fetchAll();/*tableau*/\r\n\t\t\r\n\t\treturn $tuple;\r\n\t}", "title": "" }, { "docid": "dfe269e77973b6810c4239b0551fccbb", "score": "0.4503725", "text": "public function get_list_children($parlistid)\r\n\t{\r\n\t\t$dbobj=new ta_dboperations();\r\n\t\t$res=$dbobj->dbquery(\"SELECT * FROM \".tbl_listinfo::tblname.\" WHERE \".tbl_listinfo::col_parlistid.\"='$parlistid'\",tbl_listinfo::dbname);\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "aa83cccbcb280ed3e2f6501a259c98a7", "score": "0.4495217", "text": "function getPVE_CELULAR($PVE_ID) {\n $sql=\"SELECT PVE_CELULAR FROM mco_proveedores WHERE PVE_ID=$PVE_ID\";\n return $this->connection->GetAll($sql);\n }", "title": "" }, { "docid": "840f962afb0b9119de535c5ccef51394", "score": "0.449261", "text": "function getPriceById() {\n\t\tif ( !$this->aranax_auth->is_logged_in() || !$this->aranax_auth->has_access() ) {\n\t\t\tredirect(\"unauthorised\");\n\t\t}\n\t\telse {\n\t\t\t$price_val = $this->testmodel->getPriceValueById($this->uri->segment(3));\n\t\t\tforeach($price_val as $prc_val) {\n\t\t\t\techo $prc_val->test_id.','.$prc_val->net_price.','.$prc_val->gross_price;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3532e435b3c1c3a7b3f78d9c5d811e18", "score": "0.44913828", "text": "function getPalettes() {\n $sql = \"SELECT * FROM palettes ORDER BY id desc;\";\n $request = pg_query(getDb(), $sql);\n return pg_fetch_all($request);\n }", "title": "" }, { "docid": "dbf7f346f0f4b721c151d9aa6780ef80", "score": "0.4485772", "text": "public function getPlaylistVideos(){\n\t\t// init Video class\n\t\t$playlist = new Playlist($this->db);\n\t\t$playlist->playlist_id = $this->get_params['id'];\n\t\t$stmt = $playlist->getOne();\n\t\t// data will be fetched, store into a result and send with a HTTP response\n\t\t$this->return_data($stmt);\n\t}", "title": "" }, { "docid": "5876933a29989791a5725cba0048a0fd", "score": "0.4470968", "text": "function getPollQuestions($params) {\n\t\t$db = $params['db'];\n\t\t$stmt = $db->prepare('SELECT * FROM questions WHERE poll_id = :poll_id');\n\t\t$stmt->bindParam(':poll_id', $params['id'], PDO::PARAM_STR);\n\n\t\t$stmt->execute();\n\n\t\t$result = $stmt->fetchAll();\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "32102817251710bfe901bede8e31d8cb", "score": "0.44615203", "text": "public function getAllProductsById($id,$par=0,$limit=5) {\n if($par==0){\n $Products = Products::where('category', '=', $id)->where('status', '=', 1)->orderBy('updated', 'desc')->skip(0)->take($limit)->get();\n }\n else{\n $Products = Products::where('category', '=', $id)->where('status', '=', 1)->orderBy('updated', 'desc')->skip(($par-1)*$limit)->take($limit)->get();\n }\n\n if ($Products) return $Products;\n return false;\n }", "title": "" }, { "docid": "65b9387d657d6e5a6ba429e087fb4b15", "score": "0.4460796", "text": "public function getPuestos() {\n $sql = $this->_db->select()\n// ->from(array('p' => 'puesto'), array('p.id', 'LOWER(p.nombre)'))\n ->from(array(\n 'p' => 'puesto'\n ), array(\n 'p.id', 'nombre' => new Zend_Db_Expr('CONCAT(UCASE(LEFT(p.nombre,1)),LCASE(SUBSTRING(p.nombre,2)))')\n ))\n ->joinInner(array('ep' => 'empresa_puesto'), 'p.id = ep.id_puesto', array())\n ->group('p.id')\n ->order('p.nombre');\n if ($this->_empresaId === TRUE) {\n $result = $this->_db->fetchPairs($sql);\n return $result;\n }\n $sql->where('ep.id_empresa = ?', $this->_empresaId);\n $result = $this->_db->fetchPairs($sql);\n if (count($result) <= 0) {\n $sql->orWhere('ep.id_empresa = 1');\n \n }\n $result = $this->_db->fetchPairs($sql);\n // echo $sql;\n return $result;\n }", "title": "" }, { "docid": "92192cf7c5980a0c6782736f5f9b1eb1", "score": "0.44589278", "text": "public function getPlanets()\n {\n $planets = array();\n $stmt = $this->mysql_con->prepare($this->getPlanetsSQL);\n\n if ($stmt !== false) {\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($planetID, $name, $size, $typeID);\n\n while ($stmt->fetch()) {\n $type = $this->getPlanetType($typeID);\n\n if (!is_null($type)) {\n $planets[] = new Planet($name, $size, $type, $this, $planetID);\n }\n }\n\n $stmt->close();\n }\n\n return $planets;\n }", "title": "" }, { "docid": "84fbdc5711961c56541146a5737a7910", "score": "0.4453404", "text": "public function getmisparientes() {\n $id = (int) $id; /* Parse de la variable */\n //Se crea y ejecuta la consulta\n $consulta = $this->_db->get_results(\"SELECT \n\t\t\t\t\t\t\t\t\t\t\t\tpa.id,\n\t\t\t\t\t\t\t\t\t\t\t\tpa.tipo_documento,\n\t\t\t\t\t\t\t\t\t\t\t\tpa.nro_documento,\n\t\t\t\t\t\t\t\t\t\t\t\tCONCAT(pa.nombres,' ',.pa.apellidos) AS nombres,\n\t\t\t\t\t\t\t\t\t\t\t\tpr.parentesco ,\n\t\t\t\t\t\t\t\t\t\t\t\ttd.tipo_documento\n\t\t\t\t\t\t\t\t\t\t\tFROM ok_parientes as pa,ok_parentescos as pr,ok_tipo_documento td\n\t\t\t\t\t\t\t\t\t\t\tWHERE pr.id = pa.fk_parentesco \n\t\t\t\t\t\t\t\t\t\t\tAND td.id = pa.tipo_documento\n\t\t\t\t\t\t\t\t\t\t\tAND pa.fk_afiliado = '\".Session::Get('id_afiliado').\"'\n\t\t\t\t\t\t\t\t\t\t\tORDER BY pa.id desc\");\n //Se retornona la consulta y se recorre el registro devuelto\n return $consulta;\n }", "title": "" }, { "docid": "99dee239f90456d4805ed684ffa21b8d", "score": "0.445305", "text": "public function package_list(){\n $NewEggApi = new NewEggApi();\n $response = $NewEggApi->get_package_list($requestId,$orderId);\n if($response[\"NeweggAPIResponse\"]){\n return $response;\n }\n else{\n return $response[0][\"Message\"];\n }\n }", "title": "" }, { "docid": "1bb71e7cd661acbec85a4abd83efbdd1", "score": "0.44522703", "text": "function getTravelPackages($pkgid=NULL)\n {\n $link = agencyConnect();\n $sql = \"SELECT `PackageId`, `PkgName`, `PkgStartDate`, `PkgEndDate`, `PkgDesc`, `PkgBasePrice`, `PkgImageUrl` FROM `packages`\";\n $i = 0;\n\t if ($pkgid != NULL){\n\t\t $sql .= \"WHERE `PackageId` = $pkgid\";\n\t }\n $result = $link->query($sql);\n $pkgArray = array();\n for($i=0;$i<$result->num_rows;$i++){\n while($row = mysqli_fetch_assoc($result)) {\n $pkgArray[] = $row;\n }\n }\n $link->close();\n return $pkgArray;\n }", "title": "" }, { "docid": "4b1146be09622b4b02c03ae16679437e", "score": "0.44497573", "text": "public function getList()\n {\n\n $sql = \"SELECT * FROM PAQUETE\";\n\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n\n $paquetes = array();\n\n \n while ($row = pg_fetch_array($resultado)) {\n $paquete = new Paquete();\n $paquete->setCod_paquete($row[0]);\n $paquete->setNom_paquete($row[1]);\n $paquete->setDescripcion_paquete($row[2]);\n $paquete->setValor_paquete($row[3]);\n\n array_push($paquetes, $paquete);\n }\n return $paquetes;\n }", "title": "" }, { "docid": "5d1a2aa5fe317c4a3e034782b45124f0", "score": "0.44472227", "text": "public function getPays()\n {\n\n $values = [\n 'type' => AppelDepuisEtrangerConstante::PASS_PAR_PAYS,\n ];\n $nodes = \\Drupal::entityTypeManager()->getListBuilder('node')->getStorage()->loadByProperties($values);\n\n $pays = [];\n\n if ($nodes) {\n foreach ($nodes as $node) {\n $pays['id'][] = $node->get(\"nid\")->value;\n $pays['pays'][] = $node->get(AppelDepuisEtrangerConstante::TITLE)->value;\n }\n }\n\n return $pays;\n }", "title": "" }, { "docid": "c3b406f04f55aa2b53cd3f89c946d569", "score": "0.44465294", "text": "public function getProcedures() {\n\n\t \t\t return $this->procedures;\n\t }", "title": "" }, { "docid": "f701785d30d88cd87be349acd2de5cf2", "score": "0.44455945", "text": "function getPackages($labId,$sampletypeId)\n {\n if($labId > 0 && $sampletypeId > 0){\n $apiUrl=$this->source.'/api/web/referral/packages/listpackage?lab_id='.$labId.'&sampletype_id='.$sampletypeId;\n $curl = new curl\\Curl();\n $curl->setOption(CURLOPT_CONNECTTIMEOUT, 180);\n $curl->setOption(CURLOPT_TIMEOUT, 180);\n $list = $curl->get($apiUrl);\n return $list;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "98d6f62646ccc951764e117eebf7e65f", "score": "0.44448116", "text": "public function getParsecById($id)\n\t{\n\t\tif (empty($id)) {\n\t\t\tthrow new Universe\\Exception\\DomainException(\n\t\t\t\t__METHOD__ . ' - Id should be set!'\n\t\t\t);\n\t\t}\n\t\treturn $this->parsecs->get($id);\n\t}", "title": "" }, { "docid": "bb59fb658fd3336232f724282cbc37ae", "score": "0.44323888", "text": "public function getProgramPositions()\n {\n \t// database connection and sql query\n \t$core = Core::dbOpen();\n \t$sql = \"SELECT c.position, c.positionID FROM court_position c WHERE c.programID = :id ORDER BY c.position\";\n \t$stmt = $core->dbh->prepare($sql);\n \t$stmt->bindParam(':id', $this->programID );\n \tCore::dbClose();\n \t\n \ttry\n \t{\n \t\tif( $stmt->execute() )\n \t\t{\n \t\t\t//returns position as key and ID as value\n \t\t\t$positions = $stmt->fetchAll(PDO::FETCH_KEY_PAIR);\n \t\t\treturn $positions;\n \t\t}\n \t}\n \tcatch ( PDOException $e )\n \t{\n \t\techo \"Get court positions failed\";\n \t}\n \t\n \treturn false;\n }", "title": "" }, { "docid": "008a36f471350db3ece8a1b9383df275", "score": "0.44252643", "text": "protected function getPaids()\n {\n $amountPayments = array();\n foreach($this->payments as $payment){\n if ($this->paid($payment)) {\n $amountPayments[] = $payment;\n }\n }\n return $amountPayments;\n }", "title": "" }, { "docid": "2326b14b8df39089bb0f0b5832c04cf7", "score": "0.44168925", "text": "public static function reserveParking() {\r\n $type = 'parking';\r\n $name = ' parking';\r\n $results = ModelAeroport::readAllAcr();\r\n require (CHEMIN_VUE . 'viewReserveParking.php');\r\n }", "title": "" }, { "docid": "78f884d036bd900b4f67cce76c471752", "score": "0.44158825", "text": "function getPredictiveModules() {\n\t$query = \"SELECT id, \"\n\t . \"name, \"\n\t . \"prettyname, \"\n\t . \"description, \"\n\t . \"perlpackage \"\n\t . \"FROM module \"\n\t . \"WHERE perlpackage LIKE 'VCL::Module::Predictive::%'\";\n\t$qh = doQuery($query, 101);\n\t$modules = array();\n\twhile($row = mysqli_fetch_assoc($qh))\n\t\t$modules[$row['id']] = $row;\n\treturn $modules;\n}", "title": "" }, { "docid": "8e44e0f29ad95ab18a71c51369a29e6a", "score": "0.44115233", "text": "function getPidlist() {\n\t\treturn $this->pid_list;\n\t}", "title": "" }, { "docid": "8da1620d0389f6d936d3a96639ccb746", "score": "0.44064453", "text": "public function apartmentPrices($id, $perPage = 30){\n\n $photos = DB::table('apartament_prices')\n ->select('price_value', 'date_of_price')\n ->where('apartament_id', $id)\n ->where('date_of_price', '>', date('now'))\n ->paginate($perPage);\n\n return $photos;\n }", "title": "" }, { "docid": "e7d8dc09f6307df1901018fa093eb35a", "score": "0.44026497", "text": "static function get_ids() {\n\n\t\treturn get_option( 'wppp_polls_list', array() );\n\t}", "title": "" }, { "docid": "b794e9f4b60fae071d6c0d28ca2174a2", "score": "0.44022083", "text": "function get_plt_array_all () {\n\t\tforeach ($this->plantillas as $clave => $valor) {\n\t\t\tif (!is_int ($clave))\n\t\t\t\t$aRetVal[] =\n\t\t\t\t\tarray ($clave, $valor, $this->code[$this->get_plt_num ($clave)][0], $this->code[$this->get_plt_num ($clave)][1]);\n\t\t}\n\t\treturn $aRetVal;\n\n\t}", "title": "" }, { "docid": "bc71cf3b71ed7f4bd164ef36d1f04376", "score": "0.43980175", "text": "function get_list_data_slot_by_id($params) {\n $sql = \"SELECT a.* FROM izin_slot_time a\n INNER JOIN izin_registrasi b ON a.registrasi_id = b.registrasi_id\n WHERE a.registrasi_id = ?\";\n $query = $this->db->query($sql, $params);\n // echo $this->db->last_query();\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "51f37dd78e278d7317a22cbcfde5bf6c", "score": "0.4397127", "text": "public function getIdParameters()\n {\n return $this->_data->getIdParameters();\n }", "title": "" }, { "docid": "889e3ac2008a838f92bf3a89352d4a6c", "score": "0.43903562", "text": "private function loadComponentParagraphs(Row $row) {\n $components = $row->getDestinationProperty('field_agency_component_inf');\n if (!is_array($components)) {\n return [];\n }\n\n $revision_ids = array_map(function ($component) {\n return $component['target_revision_id'];\n }, $components);\n $revision_ids = array_filter($revision_ids);\n\n return $this->entityTypeManager->getStorage('paragraph')\n ->loadMultipleRevisions($revision_ids);\n }", "title": "" }, { "docid": "052b4d9d91e1505cb42d7924ecc21471", "score": "0.4387961", "text": "public static function getProducciones() {\r\n //Instanciamos un objeto de tipp daoArea\r\n $Dao = new daoProduccion();\r\n //Invocamos al metodo listar \r\n //retornando la informacion de las areas\r\n return $Dao->listar();\r\n }", "title": "" }, { "docid": "1183282b8d27a0e33e4df8f5ae4df89c", "score": "0.43875006", "text": "public function getAllModulosProjeto($id)\n {\n \n $this->db->select('modulo_evento.id as id_modulo_evento, modulos.descricao as descricao')\n ->join('modulos', 'modulo_evento.modulo = modulos.id', 'left');\n // ->join('setores', 'users.setor_id = setores.id', 'left') \n // ->join('superintendencia', 'setores.superintendencia = superintendencia.id', 'left') \n // ->join('atas', 'planos.idatas = atas.id', 'left')\n // ->order_by($campo, $ordem);\n \n $q = $this->db->get_where('modulo_evento', array('modulo_evento.evento' => $id));\n \n if ($q->num_rows() > 0) {\n foreach (($q->result()) as $row) {\n $data[] = $row;\n }\n return $data;\n }\n return FALSE;\n }", "title": "" }, { "docid": "cec4ee9b2d1d1e19f43727e7d02aabd1", "score": "0.438492", "text": "public static function all() // returns all the records\n {\n // TODO: use the $dbc static property to query the database for all the\n // records in the parks table\n // TODO: iterate over the results array and transform each associative\n // array into a Park object\n // TODO: return an array of Park objects\n self::dbConnect();\n $query = \"SELECT * FROM national_parks\";\n $stmt = self::$connection->query($query);\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $parks = [];\n foreach($results as $result){\n $park = new Park();\n $park->id = $result['id'];\n $park->name = $result['name'];\n $park->location = $result['location'];\n $park->date_established = $result['date_established'];\n $park->area_in_acres = $result['area_in_acres'];\n $park->description = $result['description'];\n $parks[] = $park;\n }\n return $parks;\n }", "title": "" }, { "docid": "c8f943a965c74ed8c59842c0cb38c188", "score": "0.43839067", "text": "public function getPlanItems() { }", "title": "" }, { "docid": "add7d0c1f6d0299ba18698a356c21150", "score": "0.43806472", "text": "function checkCKProds($pName,$idval, $orderItemType){\n\t\t$ids['0'] = getCKDefIds($pName);\n\t\t$prodstatus = getProdViaStatus($ids, $orderItemType);\n\t\t\tif(count($prodstatus)){\n\t\t\t\t foreach($prodstatus as $key=>$val){\n\t\t\t\t \tif(in_array($key,$ids )){\n\t\t\t\t\t\treturn $key;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $id;\n\t}", "title": "" }, { "docid": "21b42ed15802c524a8184561c124cb4a", "score": "0.43733242", "text": "function get_package($id){ \n if(empty($id)){\n $package_name= array();\n $query = $this->db->get('package');\n if($query->num_rows()>0){\n foreach($query->result() as $rows){\n $currency_data = $this->get_currency($rows->currency_id);\n $package_name[$rows->id]=\"Package: \".$rows->package_name.\", For \".$rows->duration.\"year(s)\".\", Amount: \".$rows->amount.\", sms_cost: \".$rows->sms_cost.\" , letter_cost: \".$rows->letter_cost.\" , currency:\".$currency_data[0]->currency_name;\n }\n }\n return $package_name;\n }\n \n else{ $query = $this->db->get_where('package', array('id' => $id));}\n return $query->result();\n}", "title": "" }, { "docid": "c81a87fe551fbe70b2d3e53bf437a06f", "score": "0.43707186", "text": "public function action_pprime($prime=0, $pollsite_id) \t{\n Input::merge(array('do_search' => 1,\n 'prime' => $prime,\n 'pollsite_id' => $pollsite_id,\n )\n );\n return $this->action_index(); \n }", "title": "" }, { "docid": "d88fbf36c692878cde608a2a07a66ab0", "score": "0.43687603", "text": "public function getParking()\n {\n return $this->afficheur->getParking();\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "2258aee65ba455bc0aef378f3fccd130", "score": "0.7855282", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fbe173c20e77f5f30c5dd910059f57ef", "score": "0.75431615", "text": "public function editAction()\n {\n \t$requestId = $this->getRequest()->getParam('id');\n \t$this->view->form =\t$this->_service->getPopulatedForm($requestId);\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/form', null, true);\n }", "title": "" }, { "docid": "434e73275f428cceb2f4f7b76ebd89db", "score": "0.72648", "text": "public function edit($id) {\n $this->setObject($id);\n $record = $this->object;\n $page_title = \"Edit {$this->singular_name}: <em>{$this->object[$this->model_label]}</em>\";\n $route = $this->route;\n $form_fields = $this->setLabelClass($this->fields_config['form_fields'], 'update'); \n return view($this->view . '.edit', compact('record', 'page_title', 'route', 'form_fields'));\n }", "title": "" }, { "docid": "9751439aadd9a0e6380d33f5b685f7ed", "score": "0.7219294", "text": "protected function showEditForm()\n\t{\n\t\t$override = [\n\t\t\t$this->table . '.id' => $this->id,\n\t\t];\n\n\t\t/*\t\tif ($this->desc['submit']) {\n\t\t\t\t\t$this->desc['submit']['value'] = $this->updateButton;\n\t\t\t\t}\n\t\t*/\n\t\t$f = $this->getForm('update');\n\t\t$f->prefix('');\n\t\tforeach ($override as $key => $val) {\n\t\t\t$f->hidden($key, $val);\n\t\t}\n\t\t$f->button('<span class=\"glyphicon glyphicon-floppy-disk\"></span> ' . $this->updateButton, [\n\t\t\t'type' => 'submit',\n\t\t\t'class' => 'btn btn-primary',\n\t\t]);\n\t\treturn $f;\n\t}", "title": "" }, { "docid": "ecbdcecae7d17f5fd47a1b3471865b07", "score": "0.71140355", "text": "public function edit($resourceId)\n {\n $resource = $this->resource->find($resourceId);\n\n return view('laramanager::resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "c1333e15861ffed0d228237f46dc6774", "score": "0.69906336", "text": "function edit()\n\t{\n\t\t$this->get($this->id(),2);\n\t\t$this->editing(true);\n\t}", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975506", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6944128", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "7817a7364d3ff4b831d398fcf6f84435", "score": "0.6938602", "text": "public function edit($id)\n {\n return view('Fuel.form')->with(array('id'=>$id) );\n }", "title": "" }, { "docid": "941bad772b336ba35882423148dc9ae7", "score": "0.6884535", "text": "public function edit(ActionFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "18c35c21b49acf5e1dca01a3e7ad74e0", "score": "0.6879886", "text": "public function edit($id)\n {\n // get the employee\n $employees = Employee::find($id);\n\n // show the edit form and pass the resource\n return view('employees.edit', compact('employees'));\n }", "title": "" }, { "docid": "443cb3530a1e048d8622c78f896ccca6", "score": "0.6866063", "text": "public function edit(project_resource $project_resource)\n {\n //\n }", "title": "" }, { "docid": "e4f65961aad6cb731f21f42696f48f5b", "score": "0.68637073", "text": "public function edit($id)\n {\n return view('user-pages.show-edit-form',[\n 'product' => Product::findOrFail($id)\n ]);\n }", "title": "" }, { "docid": "431c9ba758d338421590df8e95c94b3a", "score": "0.68630636", "text": "public function edit($id)\n {\n //\n $sponsor = Sponsor::find($id);\n return view('Sponsors/Admin/editForm' , compact('sponsor' , 'id'));\n }", "title": "" }, { "docid": "6afd9e33c5c9a120b02d5e668d91b697", "score": "0.68461007", "text": "public function edit($id)\n {\n $data= [];\n $data['resource'] = $this->resource->findById($id);\n return view(parent::commonData($this->view_path.'.edit'),compact('data'));\n }", "title": "" }, { "docid": "a7d20c1a6ac54a75a40feed2d0eefec6", "score": "0.68316305", "text": "public function edit($id)\n {\n\n $data = array_merge([\n 'tabs' => TabManager::get($this->getModel()->getTable()),\n $this->getResourceName() => $this->getEntity($id),\n ], $this->getFormData('edit', $id));\n // echo \"<pre>\";\n // print_r($data);\n // die();\n return view(\"{$this->viewPath}.edit\", $data);\n }", "title": "" }, { "docid": "ada4cec3ac4f1797cdc4f844d8d3a6f5", "score": "0.68202806", "text": "public function edit(Form $form)\n {\n $this->authorize('update', $form);\n\n return view('forms.edit', [\n 'form' => $form\n ]);\n }", "title": "" }, { "docid": "1c89e59dba887f48f26fa946163ea1a3", "score": "0.6809247", "text": "public function edit()\n {\n return view('bedashboard::edit');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "926dd112a4ef916660ebcc2f8108ad0c", "score": "0.6804118", "text": "public function edit($id)\n {\n $page = Page::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('pages.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('page', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "c8720b6c37342844e1e35c8a84906484", "score": "0.6803468", "text": "public function edit($id)\n\t{\n\t\t$form_data = ['route' => [self::$prefixRoute . 'update', $this->tool->id], 'method' => 'PUT'];\n\n\t\treturn view(self::$prefixView . 'form', compact('form_data'))->with('tool', $this->tool);\n\t}", "title": "" }, { "docid": "f71fe7a4053601b7192cad0efbb36c4d", "score": "0.6794677", "text": "public function edit($id)\n\t{\n\t\t// get the question\n\t\t$question = Question::find($id);\n\n\t\t// show the edit form and pass the question\n\t\t$this->layout->content = View::make('questions.edit')\n\t\t\t->with('question', $question);\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "51ecb67aacee0acff54f4c6c9818570e", "score": "0.67894006", "text": "public function edit($id)\n {\n $select = AASource::find($id);\n return view(\"aasource.editform\")->with(\"select\",$select);\n\n\n }", "title": "" }, { "docid": "b30ecc77bcbb2fbd82d5b393fb6ac804", "score": "0.67846066", "text": "function edit()\n {\n JRequest::setVar('layout', 'form');\n parent::display();\n }", "title": "" }, { "docid": "555b258c80bf0ded49aa5726031a337b", "score": "0.6769525", "text": "public function edit()\n {\n return view('mymodul::edit');\n }", "title": "" }, { "docid": "12bdbc0881bdb0537af82ab982da6faa", "score": "0.6768301", "text": "public function edit()\n {\n return view('commonmodule::edit');\n }", "title": "" }, { "docid": "e9483e388971e315bd76a4a04160bffc", "score": "0.67572397", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$programa = Programa_Formacion::find($id);\n\t\treturn \\View::make('update_programa',compact('programa'));\n\t}", "title": "" }, { "docid": "dadc4c58c5fcdd0edec95263420da792", "score": "0.67568153", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiteNedraBundle:Programme')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programme entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiteNedraBundle:Programme:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1c2a145885cc53fe0f501d19a56a5bc0", "score": "0.67547786", "text": "public function edit($id) {\n\t\t$this->authorize('update', $this->repo->model());\n\t\tif ($this->request->ajax()) {\n\t\t\t$model = $this->repo->findOrFail($id);\n\t\t\treturn view($this->view . 'form', compact('model'));\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}", "title": "" }, { "docid": "ad6654814fe4ab6cce15b64bb1a9ca4c", "score": "0.6753152", "text": "public function edit(Form $form)\n {\n return view('form.edit', ['form' => $form]);\n \n }", "title": "" }, { "docid": "0c6e1e3e906bb0f9cc0c1b5a6e255ab8", "score": "0.67506236", "text": "public function edit()\n {\n return view('site::edit');\n }", "title": "" }, { "docid": "70a3382ff49dd83abd3cf7d4bf1f74f3", "score": "0.6747675", "text": "public function edit($id)\n {\n $object = $this->repository->find($id);\n return view('cp.'.$this->formView, ['object'=>$object, 'fields'=>$this->fields, 'page'=>$this->page ]);\n }", "title": "" }, { "docid": "f39aeabf7f8a7c9febc78bde32f5cdc9", "score": "0.67452914", "text": "public function edit()\n {\n return view('tensi::edit');\n }", "title": "" }, { "docid": "54fdd7aa62f997c2dc567098ea937c52", "score": "0.67439735", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"item\"] = Item::find($id);\n $viewData[\"mode\"] = \"EDIT\";\n\n return view('pages.items.form', $viewData);\n }", "title": "" }, { "docid": "6063ebf3e1acae2dc07314fb9e3fc5c1", "score": "0.67435265", "text": "protected function form($resource = null)\n {\n // Define the form URL and method based on the existence of the resource.\n if (is_null($resource)) {\n $url = route($this->routeName('index'));\n $method = 'POST';\n } else {\n $key = $this->key;\n $url = route($this->routeName('show'), $resource->$key);\n $method = 'PATCH';\n }\n\n // If we found elegan configuration for the current resource then\n // the form will use files.\n $files = !is_null($this->config());\n\n // This is the view which will be included within the form layout.\n $formView = $this->routeName('form');\n\n // Options to use on the Form::model(...) call within the view.\n $formOptions = compact('url', 'method', 'files');\n\n return view('elegan::form-layout', [\n 'resource' => $resource,\n 'formOptions' => $formOptions,\n 'formView' => $formView,\n // Bind the resource to a variable defined by the user.\n $this->resourceName() => $resource,\n ]);\n }", "title": "" }, { "docid": "7b3612906348ca3f894c79fc240ed196", "score": "0.67394954", "text": "public function editAction($id)\n {\n \t$user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('IsssrCoreBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createForm(new QuestionType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('IsssrCoreBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n \t'user' => $user,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "40ee3657c283898786c300edc1f67519", "score": "0.6725392", "text": "public function editAction() { \t \n \t$book = $this->_booksTable->find($this->_getParam('edit'))->current(); \n \t$this->_form->populate($book->toArray());\t\n \t$this->view->form = $this->_form;\n \t$this->view->book = $book;\n }", "title": "" }, { "docid": "ac001ad554e1dd9544ff91edfa0bce37", "score": "0.67239034", "text": "public function edit($id)\n {\n $view = 'edit';\n\n $active = $this->active;\n $word = $this->edit_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = $this->edit_item;\n\n return view('admin.crud.form', compact($this->compact, 'item'));\n }", "title": "" }, { "docid": "7f315daab56e237eae40f6b39d9cd597", "score": "0.67229146", "text": "public function edit($id)\n\t{\n\t\t$catalogue = Catalogue::find($id);\n\n\t\treturn View::make('catalogue.form', array(\n\t\t\t'item'\t=> $catalogue,\t\t\t\t\t\t// bind object to form...\n\t\t\t'formData' => array(\n\t\t\t\t'url' \t\t\t=> '/catalogue/' . $id,\n\t\t\t\t)\n\t\t\t) \n\t\t);\t\t\n\t}", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.67169327", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "0fc0037b84f0842fc3905f1133671852", "score": "0.67079103", "text": "public function edit()\n {\n return view('webservice::edit');\n }", "title": "" }, { "docid": "ac02c1a11a5d911cce12900c5baa6088", "score": "0.6707521", "text": "public function edit($id) {\n\t\t$id = Crypt::decryptString($id);\n\t\tview()->share('module_action', array(\n\t\t\t\"back\" => array(\"title\" => '<b><i class=\"icon-arrow-left52\"></i></b> ' . trans(\"comman.back\"), \"url\" => request()->get(\"_url\", route('resource_library.index')),\n\t\t\t\t\"attributes\" => array(\"class\" => \"btn bg-blue btn-labeled heading-btn\", 'title' => 'Back')),\n\t\t));\n\t\t$program = ResourceLibrary::find($id);\n\t\tif (is_null($program)) {\n\t\t\treturn redirect(request()->get(\"_url\", route('resource_library.index')));\n\t\t}\n\n\t\tview()->share('program_status', $this->program_status());\n\t\treturn view('resource_library.edit', compact('program'));\n\t}", "title": "" }, { "docid": "1c388e44c2b35a9c26498cc167d6b501", "score": "0.66988975", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Cms Page';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "6f2cf37b22520d075aa46d6ea55d140b", "score": "0.6682668", "text": "public function edit(){\n\t\t$id = $this->input->get('id');\n\t\t$data['title']\t\t= 'Edit '.$this->title;\n\t\t$data['state']\t\t= 'edit';\n\t\t$data['content']\t= $this->content_folder.'form';\n\t\t$data['url']\t\t= base_url_admin().'sspd/update';\n\n\t\t$data['datas'] \t\t= $this->sspd->get($id);\n\t\t$data['id'] \t\t= $id;\n\n\t\t$this->template($data);\n\t}", "title": "" }, { "docid": "2e96703e3ded22777d115212adcbfa8e", "score": "0.66781634", "text": "public function edit($id)\n {\n return view('manage::edit');\n }", "title": "" }, { "docid": "cbf068dcf001d30958187dba4e095caa", "score": "0.66679794", "text": "public function edit()\n {\n return view('appointment::edit');\n }", "title": "" }, { "docid": "7d778f003160376156b262c138442363", "score": "0.6667864", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('PlanillasEntidadesBundle:EFamilia')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find EFamilia entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('PlanillasEntidadesBundle:EFamilia:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'eEmpleado' => $entity->getEmpleado()\n ));\n }", "title": "" }, { "docid": "96d0d174aed0ec7acd3c94893af3397a", "score": "0.66675013", "text": "public function edit($id)\n\t{\n\t\t$subResourceDetail = $this->subResourceDetailRepository->find($id);\n\n\t\tif(empty($subResourceDetail))\n\t\t{\n\t\t\tFlash::error('SubResourceDetail not found');\n\n\t\t\treturn redirect(route('subResourceDetails.index'));\n\t\t}\n\n\t\treturn view('subResourceDetails.edit')->with('subResourceDetail', $subResourceDetail);\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "6650f004e271c71caedc0edaffd3ee1b", "score": "0.665556", "text": "public function edit()\n {\n $data['individual'] = $this->getIndividual();\n $data['family'] = $this->getFamily();\n $data['department'] = $this->getDepartment();\n $this->load->view('Dashboard/header');\n $this->load->view('Committee/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "title": "" }, { "docid": "7fc64d7adaff4c5696f9313516372fbc", "score": "0.66486734", "text": "public function edit($id)\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "0290291969fd36d9401cccad14294e10", "score": "0.66406196", "text": "public function edit($id)\n {\n $resource = $this->repository->findByOrFail($this->key, $id);\n\n return $this->form($resource);\n }", "title": "" }, { "docid": "506ab528f32074cc0d5031e5e49bb7ff", "score": "0.6637765", "text": "public function edit(Formulario $formulario) {\n //\n }", "title": "" }, { "docid": "bbf7985121fe9f3f66a95b6e5b96c454", "score": "0.6633427", "text": "public function edit($id)\n\t{\n return View::make('ordencompra.edit');\n\t}", "title": "" }, { "docid": "49ef67150f0938e1be659a0af76871a5", "score": "0.6633225", "text": "public function edit($id) {\n\t\tif (!auth()->user()->can('client.update')) {\n abort(403, 'Unauthorized action.');\n \t}\n\t\tif ($this->request->ajax()) {\n\t\t\t$model = $this->repo->findOrFail($id);\n\t\t\treturn view($this->view . 'form', $this->repo->preRequisite($id), compact('model'));\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}", "title": "" }, { "docid": "db90c7748a6609d08953d528e67339d9", "score": "0.6630778", "text": "public function edit($id)\n {\n //GET madres/id/edit\n return \"muestra el formulario para modificar una maadre\"; \n }", "title": "" }, { "docid": "e4104fcf37cf54947a5df16d31871eb3", "score": "0.66304225", "text": "public function edit($id)\n { \n $model = Admin::findOrFail($id);\n return view('admin.form', compact('model'));\n }", "title": "" }, { "docid": "8590c55c1c70061cc325176390a29404", "score": "0.66302156", "text": "public function edit(\n $resource,\n $userId\n );", "title": "" }, { "docid": "82e4fa3788d0ca782bb97a778ab9551e", "score": "0.6629722", "text": "public function edit($id) //This is to display the edit page\n {\n $question = Question::findOrFail($id);\n return view('questions.edit', ['question' => $question]);\n }", "title": "" }, { "docid": "89a0d2bcd14c0c3474d9d8956054de7e", "score": "0.66281104", "text": "public function edit($id) {\n\t\treturn view('admin::edit');\n\t}", "title": "" }, { "docid": "5d7c3553a3acedb174115addb33da886", "score": "0.66250294", "text": "public function edit($id)\n {\n return view('admin.employee.update', compact('id'));\n }", "title": "" }, { "docid": "8583e412e95f9e0160255a3d7ff729ad", "score": "0.66208386", "text": "public function edit($id)\n {\n return view('procrm::edit');\n }", "title": "" }, { "docid": "896d6e138b7eaf5810dbb10919b29b86", "score": "0.66207594", "text": "public function edit()\n {\n return view('drivemanagement::edit');\n }", "title": "" }, { "docid": "0190cc8a945fd906226d3c52ed9e5105", "score": "0.661868", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:BaseForms')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find BaseForms entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:BaseForms:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "96ce00e214d9cea50df7e2363df090f0", "score": "0.66134614", "text": "public function edit($id)\n\t{\n return View::make('tools.edit');\n\t}", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "6d0843240a7bd8e56b12c6a46cbe9a7e", "score": "0.6605698", "text": "public function edit($id)\n {\n $article = Article::find($id);\n return view('forms.edit', compact('article'));\n }", "title": "" }, { "docid": "7cf01fc77969404a95eb3ebd614bc48b", "score": "0.66031617", "text": "public function edit()\n {\n return view('label::edit');\n }", "title": "" }, { "docid": "1a5477602729614a0830dad7e42a3edc", "score": "0.6596264", "text": "public function edit($id)\n\t{ \n\t return $this->show($id);\t\n\t}", "title": "" }, { "docid": "1eb12ff6e9946f5134a97bbd773062c9", "score": "0.65935695", "text": "public function editAction()\n {\n View::render('User/edit.php', [\n 'user' => Authentication::getUser()\n ]);\n }", "title": "" }, { "docid": "e77652fdd2dc0ec5bbbe9772eb145f08", "score": "0.6587359", "text": "public function edit($id)\n\t{\n return View::make('intercambios.edit');\n\t}", "title": "" }, { "docid": "b7769df22f104baaf96b55b71cc1bda5", "score": "0.6584196", "text": "public function edit(Role_resource $role_resource)\n {\n //\n }", "title": "" }, { "docid": "798e7ce112998a5a858e1e6b9bbca60f", "score": "0.65841514", "text": "public function edit($id) {\n $data['breadcrumbs'] = ['Merk' => route('merk.index'), 'Edit Merk' => '#'];\n $data['data'] = [\n 'view_title' => 'Edit Merk',\n 'view_icon' => 'fa fa-tag',\n 'view_module' => 'merk.partials.form',\n 'show_action' => true,\n 'actions' => $this->getActions(),\n 'is_form' => true,\n 'form_action' => ['merk.update', $id],\n 'form_method' => 'PATCH',\n 'data' => Merk::findOrFail($id)\n ];\n return view('merk._index', $data);\n }", "title": "" }, { "docid": "414043ecc83a43ab8c4b56dc98696f1b", "score": "0.6581188", "text": "public function edit()\n {\n return view('bookings::edit');\n }", "title": "" }, { "docid": "407e26b92a35b4541461b2fa55c91c72", "score": "0.6575514", "text": "public function edit($id)\n {\n return view('product.add_edit')\n ->with('title', 'Edit')\n ->with('record', Product::findOrFail($id))\n ->with('update', true)\n ->with('link', route('product.update', $id));\n\n }", "title": "" }, { "docid": "f640b5d3f6b8bc2d8040335c0ff33c4a", "score": "0.6572462", "text": "public function edit($id)\n {\n $country = Country::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('countries.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('country', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "b4bc0b9839e8ee92f74a269f37fe338b", "score": "0.6571956", "text": "public function edit($id)\n\t{\n\t\t$form_data = ['route' => ['system.users.update', $this->user->id], 'method' => 'PUT'];\n\n\t\treturn view('dashboard.pages.system.users.form', compact('form_data'))\n\t\t\t->with('user', $this->user);\n\t}", "title": "" }, { "docid": "7c5d3e7075b91497c822d64ff1f58a39", "score": "0.6570866", "text": "public function edit(Form $form)\n {\n if ($form->published) {\n return redirect()->route('access_denied');\n }\n $programs = Program::all();\n return view('forms.create', ['form' => $form, 'form_method' => 'PUT', 'programs' => $programs]);\n }", "title": "" }, { "docid": "ce8838daca364c19746373e3d442ca46", "score": "0.65663105", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "a207108ea50a28c0e44708ce3cae6f62", "score": "0.65579593", "text": "public function edit($id)\n {\n $record = Record::where('id', $id)->first();\n\n return view('record.edit', compact('record'));\n \n }", "title": "" }, { "docid": "7faee5c8518c8b35320d5c32a49a7f91", "score": "0.6557197", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n $categories = ResourceCategory::all();\n return view('resources/edit', [\n 'resource' => $resource,\n 'categories' => $categories\n ]);\n }", "title": "" }, { "docid": "09f454d3b70201ba1e7ead7e37d4a41c", "score": "0.6555276", "text": "public function edit($id)\n {\n $title = 'Areas';\n $formAction = url('areas/update/'.$id);\n $record = Area::where( 'id' , $id )->first();\n return view('record-edit-form' , compact( 'title', 'formAction' , 'record' ));\n }", "title": "" }, { "docid": "d3689d0b1f8040580dccfc780c1e02a6", "score": "0.6554811", "text": "public function getEdit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "6871c17e749545eb008a4aa19b4b1d5d", "score": "0.6553566", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n $role = Role::pluck('title', 'id')->all();\n return view(\"{$this->view}.form\", compact('model', 'role'));\n }", "title": "" }, { "docid": "e4953000e754c12f98e52f6bcc40ca08", "score": "0.6551531", "text": "public function edit() {\n $data['individual'] = $this->getIndividual();\n $this->load->view('Dashboard/header');\n $this->load->view('Family/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "title": "" }, { "docid": "b03c11a7ad8a0df7107687161d7c4907", "score": "0.65503186", "text": "public function edit(int $id)\n {\n \t$model = AlterEgo::find($id);\n \treturn view('alterego.edit', ['model'=>$model]);\n \t\n }", "title": "" }, { "docid": "d31e63af7758bf392af384ea35e3e617", "score": "0.6547915", "text": "public function edit($id)\n {\n $escuela = Escuela::findOrFail($id);\n $title = 'Editar escuela';\n $form_data = ['route' =>['admin.escuela.update',$escuela->id],'method' => 'PUT'];\n\n return view('admin.escuela.form')->with(compact('escuela','title','form_data'));\n }", "title": "" }, { "docid": "da5b873ba0362057adf574bcdf9be5c9", "score": "0.6547029", "text": "public function edit($id) {\n \n }", "title": "" }, { "docid": "5dbfb9d1a9b92f710a9c21d5e8a8c003", "score": "0.65444356", "text": "public function edit($id)\n {\n $company = new Prefecture();\n $company->form_action = $this->getRoute().'.update';\n $company->page_title = 'Company Edit Page';\n $company->page_type = 'edit';\n $company->data = Company::find($id);\n \n $prefecture = Prefecture::all();\n\n return view('backend.companies.form', [\n 'company' => $company,\n 'prefecture' => $prefecture\n ]);\n }", "title": "" }, { "docid": "7878b090cad48e60980b4f122cb1cdfd", "score": "0.65440536", "text": "public function editAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\t\t$usuario = $this->getUser();\n\n $entity = $em->getRepository('UsuarioBundle:Usuario')->find($usuario->getId());\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Usuario entity.');\n }\n\n $editForm = $this->createForm(new PerfilType(), $entity);\n\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "54ec0124abada83be38ddb55d58307da", "score": "0.0", "text": "public function destroy(Aula $aula)\n {\n DB::table('aula_aluno')->where('aula_id', $aula->id)->delete();\n $aula->delete();\n \n return $this->sendResponse([], 'Aula deleted successfully.');\n }", "title": "" } ]
[ { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4c5eebff0d9ed2cb7fdb134bb4660b64", "score": "0.6635911", "text": "public function removeResource($resourceID)\n\t\t{\n\t\t}", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "08c524d5ed1004452df540e76fe51936", "score": "0.65416265", "text": "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "title": "" }, { "docid": "e615a714c70c0f1f81aa89e434fd9645", "score": "0.64648265", "text": "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "9699357cc7043ddf9be8cb5c6e2c5e9c", "score": "0.62882507", "text": "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "title": "" }, { "docid": "c14943151fb5ef8810fedb80b835112e", "score": "0.6175931", "text": "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "title": "" }, { "docid": "507601379884bfdf95ac02c4b7d340a0", "score": "0.6129922", "text": "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "title": "" }, { "docid": "b96521ac0a45d4af2abd98a169f470e6", "score": "0.60428125", "text": "public function delete(): void\n {\n unlink($this->getPath());\n }", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "67c2e1a96c6af4251ec2fe2211864e9b", "score": "0.5919811", "text": "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "title": "" }, { "docid": "e37d38c43b6eab9f0b20965c7e9b2769", "score": "0.5904504", "text": "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "text": "public function remove() {}", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.58962846", "text": "public function remove() {}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "3053bc6cd29bad167b4fd69fe4e79d55", "score": "0.57735413", "text": "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "text": "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "title": "" }, { "docid": "7e6820819c67c0462053b11f5a065b9f", "score": "0.5741712", "text": "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "title": "" }, { "docid": "aa404011d4a23ac3716d0c9c1360bd20", "score": "0.57334286", "text": "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "2d462647e81e7beec7f81e7f8d6c6d44", "score": "0.57096", "text": "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "title": "" }, { "docid": "a165b9f8668bef9b0f1825244b82905e", "score": "0.5707689", "text": "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "title": "" }, { "docid": "4a66b1c57cede253966e4300db4bab11", "score": "0.5705895", "text": "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "2709149ed9daaf760627fbe4d2405e47", "score": "0.5705634", "text": "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "title": "" }, { "docid": "67396329aa493149cb669199ea7c214f", "score": "0.5703902", "text": "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "b2dc8d50c7715951df467e962657a927", "score": "0.56780374", "text": "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "2a4e3a8a8005ff16e99e418fc0fb7070", "score": "0.5657287", "text": "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "title": "" }, { "docid": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "6d5e88f00765b5e87a96f6b729e85e80", "score": "0.5640759", "text": "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "title": "" }, { "docid": "8d2b25e8c52af6b6f9ca5eaf78a8f1f3", "score": "0.5637738", "text": "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "title": "" }, { "docid": "55778fabf13f94f1768b4b22168b7424", "score": "0.5619264", "text": "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "9ab5356a10775bffcb2687c49ca9608f", "score": "0.56167465", "text": "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "title": "" }, { "docid": "899b20990ab10c8aa392aa33a563602b", "score": "0.5606877", "text": "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "4a4701a0636ba48a45c66b76683ed3b3", "score": "0.5601949", "text": "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "735f27199050122f4622faba767b3c80", "score": "0.55897516", "text": "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "title": "" }, { "docid": "0bf714a7cb850337696ea9631fca5494", "score": "0.5581397", "text": "function delete($path);", "title": "" }, { "docid": "975326d3c6d5786788886f6742b11b44", "score": "0.5566926", "text": "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "a108cd06e3f66bf982b8aa3cd146a4e9", "score": "0.5556583", "text": "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "fa18511086fe5d1183bd074bfc10c6a2", "score": "0.5550097", "text": "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "title": "" }, { "docid": "69bff5e9e4c411daf3e7807a7dd11559", "score": "0.5543172", "text": "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "986e2f38969cc302a2f6f8374b767ca1", "score": "0.55365825", "text": "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "title": "" }, { "docid": "56658901e8b708769aa07c96dfbe3f61", "score": "0.55300397", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "2d63e538f10f999d0646bf28c44a70bf", "score": "0.552969", "text": "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "title": "" }, { "docid": "49dd28666d254d67648df959a9c54f52", "score": "0.55272335", "text": "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "16f630321e1871473166276f54219ee3", "score": "0.5525997", "text": "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "title": "" }, { "docid": "f79bb84fccbc8510950d481223fa2893", "score": "0.5525624", "text": "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "title": "" }, { "docid": "dc750acc8639c8e37ae9a3994fa36c91", "score": "0.5523911", "text": "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "title": "" }, { "docid": "a298a1d973f91be0033ae123818041d0", "score": "0.5521122", "text": "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "title": "" }, { "docid": "909ecc5c540b861c88233aaecf4bde3b", "score": "0.5517412", "text": "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }", "title": "" } ]
19164afab8f8f29ce38190eec4f943ca
Give the offered courses eligible for current student
[ { "docid": "7978f63be8e6f403bf8930e99c1ee180", "score": "0.66108596", "text": "public function getOfferedCourses($studentId)\n\t{\n\t\t$dalCourseRegistration = new DALCourseRegistration;\n\t\t$result = $dalCourseRegistration->getOfferedCourses($studentId);\n\n\t\t$post = \"\";\n\t\tif($result)\n\t\t{\n\t\t\twhile ($res = mysqli_fetch_assoc($result))\n\t\t\t {\n\t\t\t $post.= '<option value='.$res['offeredCourseId'].'>';\n\t $post.= $res[\"prefix\"].' '.$res['courseNo'];\n\t $post.= ' -> '.$res[\"courseTitle\"];\n\t $post.= ' -> '.$res[\"credit\"];\n\t $post.= '</option>';\n\t\t\t\t\n\t\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$post.=\"<option disable='disable'>No Course is available to register.</option>\";\n\t\t}\t\t\n\t\t\n\t\t return $post;\n\t}", "title": "" } ]
[ { "docid": "ecd921d138966026e3ea3564dfc91164", "score": "0.6722879", "text": "public function getAllAvailableCourses(){\r\n return $this->db->query(\"\r\n\t\tSELECT course.courseid, course.coursenum, course.title, course.description, course.credits, course.prereqs, scheduled_courses.course_id\r\n\t\tFROM course\r\n\t\tLEFT JOIN scheduled_courses ON scheduled_courses.course_id = course.courseid\r\n\t\tWHERE scheduled_courses.course_id IS NULL\r\n\t\t\");\r\n }", "title": "" }, { "docid": "0c3461e198ef616bf4e84fe50516bdb3", "score": "0.6381147", "text": "public function courses()\n\t{\n\t\t$criteria=new CDbCriteria; \n\t\tif (!isset($this->term_code)) {\n\t\t\t$this->term_code = DrcRequest::latestTermCodeforUser($this->emplid);\n\t\t}\n\t\t$criteria->compare('t.term_code',$this->term_code);\n\t\tif ($this->emplid && strlen($this->emplid)>0) {\n\t\t\t$criteria->with = array( 'drcRequests', 'courseInstructors' );\n\t\t\t$criteria->together = true;\n\t\t\t$criteria->addCondition(\"drcRequests.emplid={$this->emplid} AND drcRequests.term_code={$this->term_code}\");\n\t\t\t$criteria->addCondition(\"courseInstructors.emplid={$this->emplid} AND courseInstructors.term_code={$this->term_code}\", 'OR');\n\t\t}\n\t\treturn new CActiveDataProvider('Course', array(\n\t\t\t'criteria'=>$criteria,\n\t\t \t'pagination' => false,\n\t\t));\n\t}", "title": "" }, { "docid": "4b411797e5cb28cae8c2745a89c1137a", "score": "0.63059795", "text": "public function courseList()\n\t{\n\t\t//$names = '';\n\t\t$courses = array();\n\t\tforeach($this->drcRequests as $request)\n\t\t{\n\t\t\tif ($request->course){\n\t\t\t\t$courses[] = $request->course;\n\t\t\t}\n\t\t}\n\t\tforeach($this->coursesAsInstructor as $instructedCourse)\n\t\t{\n\t\t\tif ($instructedCourse->course){\n\t\t\t\t$courses[] = $instructedCourse->course;\n\t\t\t}\n\t\t}\n\t\treturn $courses;\n\t}", "title": "" }, { "docid": "3114693f4c46ed034f7d929c6ddf60ee", "score": "0.62671477", "text": "public function showCourse() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid) {\n $course = $c;\n }\n }\n }\n if ($course != null) {\n $this->dData = $course;\n return $this->display(\"course\");\n }\n die($this->showError(\"You do not have permission to view this course\"));\n }", "title": "" }, { "docid": "785d46ef5f74a6130748d021aed7a5c3", "score": "0.62530357", "text": "public function frontpage_available_courses() {\r\n /* available courses */\r\n global $CFG, $OUTPUT;\r\n // require_once($CFG->libdir. '/coursecatlib.php');.\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')\r\n ));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n\r\n $rcourseids = array_keys($courses);\r\n $newcourse = get_string('availablecourses');\r\n\r\n $header = '<div id=\"frontpage-course-list\"><h2>'.$newcourse.'</h2><div class=\"courses frontpage-course-list-all\">';\r\n $footer = '</div></div>';\r\n $content = '';\r\n if (count($rcourseids) > 0) {\r\n $content .= '<div class=\"row\">';\r\n foreach ($rcourseids as $courseid) {\r\n\r\n $rowcontent = '';\r\n\r\n $course = get_course($courseid);\r\n\r\n $no = get_config('theme_eguru', 'patternselect');\r\n $nimgp = (empty($no)||$no == \"default\") ? 'default/no-image' : 'cs0'.$no.'/no-image';\r\n $noimgurl = $OUTPUT->image_url($nimgp, 'theme');\r\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\r\n\r\n if ($course instanceof stdClass) {\r\n // require_once($CFG->libdir. '/coursecatlib.php');.\r\n $course = new core_course_list_element($course);\r\n }\r\n\r\n $imgurl = '';\r\n $context = context_course::instance($course->id);\r\n\r\n foreach ($course->get_course_overviewfiles() as $file) {\r\n $isimage = $file->is_valid_image();\r\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\r\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\r\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\r\n if (!$isimage) {\r\n $imgurl = $noimgurl;\r\n }\r\n }\r\n\r\n if (empty($imgurl)) {\r\n $imgurl = $noimgurl;\r\n }\r\n\r\n $rowcontent .= '<div class=\"col-md-3 col-sm-6\"><div class=\"fp-coursebox\"><div class=\"fp-coursethumb\"><a href=\"'.$courseurl.'\"><img src=\"'.$imgurl.'\" width=\"243\" height=\"165\" alt=\"\"></a></div><div class=\"fp-courseinfo\"><h5><a href=\"'.$courseurl.'\">'.$course->get_formatted_name().'</a></h5></div></div></div>';\r\n $content .= $rowcontent;\r\n }\r\n $content .= '</div>';\r\n }\r\n\r\n $coursehtml = $header.$content.$footer;\r\n echo $coursehtml;\r\n\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n echo $this->add_new_course_button();\r\n }\r\n }", "title": "" }, { "docid": "6979694d75a1f872e4e8c11a4fafeb00", "score": "0.6223663", "text": "public function get_course();", "title": "" }, { "docid": "cf4aced5607a16390d5dc97a1d1b693c", "score": "0.62233096", "text": "public function frontpage_available_courses() {\n /* available courses */\n global $CFG;\n $output = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n\n $rcourseids = array_keys($courses);\n $newcourse = get_string('availablecourses');\n\n $header = '<div id=\"frontpage-course-list\"><h2>'.$newcourse.'</h2><div class=\"courses frontpage-course-list-all\">';\n $footer = '</div></div>';\n $content = '';\n if (count($rcourseids) > 0) {\n $content .= '<div class=\"row\">';\n foreach ($rcourseids as $courseid) {\n\n $rowcontent = '';\n\n $course = get_course($courseid);\n\n $no = get_config('theme_university', 'patternselect');\n $nimgp = (empty($no)||$no == \"default\") ? 'default/no-image' : 'cs0'.$no.'/no-image';\n $noimgurl = $this->output->image_url($nimgp, 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $rowcontent .= '<div class=\"col-md-3 col-sm-6\"><div class=\"fp-coursebox\"><div class=\"fp-coursethumb\">\n <a href=\"'.$courseurl.'\"><img src=\"'.$imgurl.'\" width=\"243\" height=\"165\" alt=\"\"></a></div>\n <div class=\"fp-courseinfo\"><h5><a href=\"'.$courseurl.'\">'.$course->get_formatted_name().'</a></h5>\n </div></div></div>';\n $content .= $rowcontent;\n }\n $content .= '</div>';\n }\n\n $coursehtml = $header.$content.$footer;\n $output .= $coursehtml;\n\n // $output .= $this->output->render_from_template('theme_university/search', (object)[]);\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n $output .= $this->add_new_course_button();\n }\n return $output;\n }", "title": "" }, { "docid": "243a4f26c5e655661b5b4869f24caeff", "score": "0.6216513", "text": "public function getCourseList()\n {\n try {\n return $this->model::doesnthave('lesson')->get();\n } catch (\\Exception $e) {\n return $this->errroResult($e->getMessage());\n }\n }", "title": "" }, { "docid": "470d573d0f6dbd3fc72537fe8afe5a2f", "score": "0.6188993", "text": "private function set_coursestudents() {\n $this->coursestudents = get_enrolled_users($this->context, 'mod/assign:submit');\n }", "title": "" }, { "docid": "74096e45f19278361aebe93dfe1f8311", "score": "0.61777884", "text": "public function showAddAccommodation() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid && $c[\"role\"] == \"Instructor\") {\n $allowed = true;\n $course = $c;\n }\n }\n }\n if ($allowed) {\n $this->dData = $course;\n return $this->display(\"accommodation\");\n }\n die($this->showError(\"Not Authorized\"));\n }", "title": "" }, { "docid": "baacbcc6f02481140223dbcd5d7dbd81", "score": "0.6124164", "text": "public function getStudentCourses() {\n\t\trequire_once(SITE_ROOT . '\\PHP\\Course.php');\n\t\t$courses = array();\n\t\tif( $this->isStudent && $this->inDB ) {\n\t\t\t$db = DB::getInstance();\n\t\t\t$result = $db->prep_execute('SELECT subj, crse FROM students_courses WHERE email = :email', array(\n\t\t\t\t':email' => $this->email\n\t\t\t));\n\t\t\t\n\t\t\tforeach($result as $row) {\n\t\t\t\t$courses[] = COURSE::fromDatabase( $row['subj'], intval($row['crse']) );\n\t\t\t}\n\t\t}\n\t\treturn $courses;\n\t}", "title": "" }, { "docid": "7af98122bd8e2348766a547ca3433fa1", "score": "0.61209035", "text": "public function getCourse();", "title": "" }, { "docid": "e0ffb5a90be52fe131971ca763f1c0d1", "score": "0.6117346", "text": "private function getAllCourses() {\n $this->courses = Model::getInstance()->getCoursesOfStudent($this->Id);\n }", "title": "" }, { "docid": "dedcaf72c65786cdfbb7d584c119402f", "score": "0.60318846", "text": "public function conveningCourses(Request $request=null){\n if(Auth::user()->approved != 1){\n Auth::logout();\n return view('auth.login')->with('accountNotApproved', \"Your account has not been approved yet. Please send an email on [email protected]\");\n }\n $roleID = Auth::user()->role_id;\n switch ($roleID){\n case 1:\n case 2:\n return view('student.access_denied');\n case 3:\n return view('lecturer.access_denied');\n case 4:\n return view('lecturer.convening_courses')->with('courses', app('App\\Http\\Controllers\\LecturerController')->getConveningCourses($request));\n case 5:\n return view('departmentadmin.access_denied');\n case 6:\n return view('systemadmin.access_denied');\n }\n }", "title": "" }, { "docid": "84aceddd1d613c6f6242fdf4ae8106c4", "score": "0.60269916", "text": "public function actionMyCourses() {\n $searchModel = new CoursesAssignedSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $query = CoursesAssigned::find()->where(['user_id' => Yii::$app->user->id, 'blocked_status' => 1]);\n $pagination = new Pagination(['totalCount' => $query->count(), 'pageSize' => 4]);\n $array = [];\n // limit the query using the pagination and retrieve the articles\n $articles = $query->offset($pagination->offset)\n ->limit($pagination->limit)\n ->all();\n $dataQuery = $query->all();\n\n \n foreach ($dataQuery as $dataQuery) {\n $array [] = Courses::find()->where(['id' => $dataQuery->courses_assigned])->one();\n }\n return $this->render('my-courses', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'query' => $query,\n 'array' => $array,\n 'pagination' => $pagination\n ]);\n \n }", "title": "" }, { "docid": "0d8115d01c65badcb084f34e9cb969eb", "score": "0.6020455", "text": "public static function get_courses()\n {\n global $DB;\n $cursos = $DB->get_records('course');\n $result = [];\n $result[\"\"] = get_string(\"choose\");\n foreach ($cursos as $curso) {\n $result[$curso->id] = $curso->fullname;\n }\n return $result;\n }", "title": "" }, { "docid": "d2ad61adbdd2342164c2392cad8922d5", "score": "0.60042745", "text": "protected function get_request_courses( $request ) {\n\t\t\t$user_course_ids = array();\n\n\t\t\tif ( ( $this->current_user_id !== $this->user_id ) && ( ! learndash_is_admin_user( $this->current_user_id ) ) ) {\n\n\t\t\t\tif ( learndash_is_group_leader_user( $this->current_user_id ) ) {\n\t\t\t\t\tif ( ! learndash_is_group_leader_of_user( $this->current_user_id, $this->user_id ) ) {\n\t\t\t\t\t\treturn new WP_Error( 'rest_user_invalid_id', esc_html__( 'Not allowed to view other user content.', 'learndash' ), array( 'status' => 401 ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t$group_leader_group_ids = learndash_get_administrators_group_ids( $this->current_user_id );\n\t\t\t\t\tif ( empty( $group_leader_group_ids ) ) {\n\t\t\t\t\t\treturn new WP_Error( 'rest_user_invalid_id', esc_html__( 'Not allowed to view other user content.', 'learndash' ), array( 'status' => 401 ) );\n\t\t\t\t\t}\n\t\t\t\t\t$user_group_ids = learndash_get_users_group_ids( $this->user_id );\n\t\t\t\t\tif ( empty( $user_group_ids ) ) {\n\t\t\t\t\t\treturn new WP_Error( 'rest_user_invalid_id', esc_html__( 'Not allowed to view other user content.', 'learndash' ), array( 'status' => 401 ) );\n\t\t\t\t\t}\n\n\t\t\t\t\t$group_ids = array_intersect( $group_leader_group_ids, $user_group_ids );\n\n\t\t\t\t\tif ( ! empty( $group_ids ) ) {\n\t\t\t\t\t\tforeach ( $group_ids as $group_id ) {\n\t\t\t\t\t\t\t$course_ids = learndash_group_enrolled_courses( $group_id );\n\t\t\t\t\t\t\tif ( ! empty( $course_ids ) ) {\n\t\t\t\t\t\t\t\t$user_course_ids = array_merge( $user_course_ids, $course_ids );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\treturn new WP_Error( 'rest_user_invalid_id', esc_html__( 'Not allowed to view other user content.', 'learndash' ), array( 'status' => 401 ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$user_course_progress = get_user_meta( $this->user_id, '_sfwd-course_progress', true );\n\t\t\t\t$user_course_progress = ! empty( $user_course_progress ) ? $user_course_progress : array();\n\n\t\t\t\t$courses_registered = ld_get_mycourses( $this->user_id );\n\t\t\t\t$courses_registered = ! empty( $courses_registered ) ? $courses_registered : array();\n\n\t\t\t\t$user_course_ids = array_keys( $user_course_progress );\n\t\t\t\t$user_course_ids = array_merge( $user_course_ids, $courses_registered );\n\t\t\t\t$user_course_ids = array_unique( $user_course_ids );\n\t\t\t}\n\n\t\t\treturn $user_course_ids;\n\t\t}", "title": "" }, { "docid": "d5de8c91876d16e84194c1386cbb1cef", "score": "0.588259", "text": "public function index()\n {\n $student = Auth::user()->student_id;\n $course = DB::select(\"SELECT course_id from registrations where student_id = ?\",[$student]);\n $data = DB::select(\"SELECT * FROM courses\");\n $tempData = [];\n foreach($course as $item){\n array_push($tempData,$item->course_id);\n }\n $realData = [];\n foreach($data as $item){\n if(!in_array($item->course_id,$tempData)){\n $subject = DB::select(\"SELECT * from courses where course_id = ?\",[$item->course_id]);\n array_push($realData,$subject);\n }\n }\n return view('enroll',compact(['realData']));\n }", "title": "" }, { "docid": "20433b44ae581aed139bb336ed2ebc97", "score": "0.5875342", "text": "function digitalization_course_list() {\r\n\r\n $course_list = array();\r\n\r\n //get all courses of logged in user\r\n $courses = enrol_get_my_courses();\r\n\r\n //check for each course if user can it edit. If so, take the current course into\r\n //the list of courses to which the user can add the new digitalization\r\n foreach($courses as $c)\r\n {\r\n $context = get_context_instance(CONTEXT_COURSE,$c->id);\r\n\r\n if (has_capability('moodle/course:update', $context)) {\r\n $course_list[] = $c;\r\n }\r\n\r\n }\r\n\r\n return $course_list;\r\n}", "title": "" }, { "docid": "471781f1726a37e33dfb7efa59bb5197", "score": "0.58601004", "text": "function getCourses() {\n return $this->courses;\n }", "title": "" }, { "docid": "be7a1ada6bf8fe11042262a2e91b54f1", "score": "0.58586967", "text": "public function newExam() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid && $c[\"role\"] == \"Instructor\") {\n $allowed = true;\n $course = $c;\n }\n }\n }\n if ($allowed) {\n $this->dData = $course;\n if (isset($this->input[\"exam\"])) {\n $this->dData[\"examdata\"] = $this->loadResults($this->input[\"exam\"], null);\n }\n return $this->display(\"newexam\");\n }\n die($this->showError(\"Not Authorized\"));\n }", "title": "" }, { "docid": "89d7b0ecebcaa5609c76a3df8d18d17a", "score": "0.5851451", "text": "function getCourses(){\n\t\t\treturn $this->courses;\n\t\t}", "title": "" }, { "docid": "8c7fa55ac6bc7da5242660e37680c7de", "score": "0.5837267", "text": "public static function testable_get_courses($now) {\n return parent::get_courses($now);\n }", "title": "" }, { "docid": "33fb76fe627dc8c00b2039af9647bb53", "score": "0.5832235", "text": "public function coursesList()\r\n {\r\n if(isset($_SESSION['user_type']) && $_SESSION['user_type'] == 'admin') {\r\n $data=[];\r\n $this->callPage('Courses','admin_courses','success','Courses @ Angel',$data);\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "bd2cb5ed0fd3b91f85c18e49d21397d3", "score": "0.58135074", "text": "public function getCourses()\n {\n return $this->courses;\n }", "title": "" }, { "docid": "98548112aa5c806260d5ddddd79917fe", "score": "0.5799654", "text": "public function getCourses()\n {\n // TODO\n return array();\n }", "title": "" }, { "docid": "d472d15036f5a0240214ff65a0e352cc", "score": "0.57957673", "text": "public function listCourse()\n {\n $notify = News::getNotify();\n $admin = $this->currentUser()->admin;\n $type = 'admin';\n\n /*\n * get current year\n */\n $currentYear = (int)date('Y');\n\n /*\n * get all course\n */\n $course = InternShipCourse::allCourse();\n return view('manage-internship-course.list-course')->with([\n 'course' => $course,\n 'currentYear' => $currentYear,\n 'notify' => $notify,\n 'user' => $admin,\n 'type' => $type,\n ]);\n }", "title": "" }, { "docid": "62b7c2e1145c1798a641b36b0cd20b14", "score": "0.5785244", "text": "public function isSelected($userId,$courseId){\n $conn=$this->getEntityManager()->getConnection();\n $sql='\n select * from \n student_course as sc\n where sc.user_id =:userId and sc.courses_id=:courseId\n \n ';\n $stmt= $conn->prepare($sql);\n $stmt->execute(['courseId'=>$courseId,'userId'=>$userId]);\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "97e677b5ffe59fa814f2eefde14b9b25", "score": "0.573846", "text": "function upcomingcourse(){\n\n\n\n\t\t$start = date('d-m-Y',strtotime(\"now\"));\n\n\n\n\t\tif(($_SERVER[ 'REQUEST_URI' ])==\"/TechnoCTA/Construction/Code/courses/railway_safety\" ){\n\n\n\n $conditions = array('Course.start_date >' =>$start,'Course.sector_id'=> 1);\n\n\n\n $course = $this->Course->find('all', array('conditions' => $conditions));\n\n\n\n\t\t}else if(($_SERVER[ 'REQUEST_URI' ])==\"/TechnoCTA/Construction/Code/courses/construction\"){\n\n\n\n\t\t$conditions = array('Course.start_date >' =>$start,'Course.sector_id'=> 2);\n\n\n\n $course = $this->Course->find('all', array('conditions' => $conditions));\n\n\n\n\t\t}else if(($_SERVER[ 'REQUEST_URI' ])==\"/TechnoCTA/Construction/Code/courses/plant_operation\"){\n\n\n\n\t\t$conditions = array('Course.start_date >' =>$start,'Course.sector_id'=> 3);\n\n\n\n $course = $this->Course->find('all', array('conditions' => $conditions));\n\n\n\n\t\t}else if(($_SERVER[ 'REQUEST_URI' ])==\"/TechnoCTA/Construction/Code/courses/small_tools\"){\n\n\n\n\t\t$conditions = array('Course.start_date >' =>$start,'Course.sector_id'=> 4);\n\n\n\n $course = $this->Course->find('all', array('conditions' => $conditions));\n\n\n\n\t\t}else if(($_SERVER[ 'REQUEST_URI' ])==\"/TechnoCTA/Construction/Code/courses/health_safety\"){\n\n\n\n\t\t$conditions = array('Course.start_date >' =>$start,'Course.sector_id'=> 5);\n\n\n\n $course = $this->Course->find('all', array('conditions' => $conditions));\n\n\n\n\t\t}\n\n\n\n\t\treturn $course;\n\n\n\n\t}", "title": "" }, { "docid": "53d20e74fedc8402606ae49e7452c88a", "score": "0.5738297", "text": "function getAcceptedCommittee($student_id) {\n return DB::query(\"SELECT f.id \\\"fac_id\\\", u.username, u.first_name, u.last_name, c.id \\\"cap_id\\\", c.title\n FROM committee JOIN capstone c ON committee.cap_id = c.id\n JOIN faculty f ON committee.fac_id = f.id\n JOIN user u ON f.uid = u.uid\n JOIN student s ON c.student_id = s.id\n WHERE student_id = %i AND has_accepted = 1;\", $student_id);\n }", "title": "" }, { "docid": "f045d3eff0fd2c52d814b11375f49398", "score": "0.5719309", "text": "function GetStudentCourses($stud_id)\n {\n if(!$this->DBLogin())\n {\n $this->HandleError(\"Database login failed!\");\n return false;\n }\n \n $select_query = \"select course_id,course_name from course where course_id IN (select course_id from student_course where student_id=$stud_id AND approval_status=1 AND payment_flag=1)\"; \n \n $res = mysql_query( $select_query ,$this->connection);\n $all = array();\n $column_name=\"course_name\";\n while(($row = mysql_fetch_assoc($res))) {\n $all[] = $row;\n }\n \n return $all;\n }", "title": "" }, { "docid": "0efa4ebcb08a45c8086fe9dadd06ffb2", "score": "0.5704537", "text": "public function getAssignedStudents()\n\t{\n\t\t$query = \"SELECT student_id FROM tbl_preregister_course WHERE (preset_course_id=\".$this->id.\")\";\n\t\t$query .= \" AND (deleted_flag=0) AND (status=\".PreregisterCourse::STATUS_APPROVED.\")\";\n\t\t$studentIds = Yii::app()->db->createCommand($query)->queryColumn();\n\t\treturn array_unique($studentIds);\n\t}", "title": "" }, { "docid": "ded7c9888b8eb8e612be94b662a9b760", "score": "0.57023424", "text": "function listCourses() {\n return $this->fetchAll($this->select('*')->where(\"category_id !=?\", \"0\"))->toArray();\n }", "title": "" }, { "docid": "abf4e2692322bad5ae57e1f245c6a8b6", "score": "0.5680959", "text": "function getstucourselist(){\n\t\t\t$res=$this->auth_chk();\n\t\t\tif(isset($res[\"trust\"])){\n\t\t\t\t$data =$this->model->get_stu_course_list($this->post());\n\t\t\t\techo json_encode($data);\n\t\t\t}else{\n\t\t\t\techo json_encode(array(\"status\" => array(\"code\" => 1,'success'=>false,'msg'=>'User have no permission')));\t\n\t\t\t}\t\t\n\t\t}", "title": "" }, { "docid": "43b69dd991fbd93fd753a3bb4b66d4aa", "score": "0.56782985", "text": "public function index()\n { //this function for test only can elte when only frontend \n /*** $Student = Auth::User() ; //this function used to get informtion about current authentication\n \n $course= array(); //this array is used to store all courses that student register can evluateand the ttendence greter or equal 60\n \n \n foreach ($Student->ActivatedCourses as $s) {\n \n // to get all activated course that current student regester in this is course\n \n $activated_courses_id = $s->pivot->activated_courses_id;\n \n if ( $s->pivot->attendence >= 60 && $s->pivot->done_theoritical == 0) {// to check in attendence and check if not done evluate\n \n $course[] = $activated_courses_id;//and store the course that can evluate\n \n }\n }\n \n $all_information_curse =[];// this is array to get all information about the course\n foreach ($course as $k) {\n $currentcourse = ActivatedCourses::find($k);\n $all_information_curse[] = $currentcourse;\n }\n\n return view('student',compact('all_information_curse')); */\n }", "title": "" }, { "docid": "2642aa365f49ef6ad99a373c92506078", "score": "0.5670954", "text": "function getStudentsTakenCourses($id){\n return $this->getStudent($id)->getTaken();\n }", "title": "" }, { "docid": "806b4ad640d06f6ef8d25e3888517e6b", "score": "0.5663101", "text": "public function courses()\n\t{\n\t\t$title = 'All Courses';\n \t$courseNative = CoursesNative::with('courses')->where([['lang', $this->langCode], ['status', 'active']])->get();\n\t\treturn view('frontend.courses', compact('title', 'courseNative'));\n\t}", "title": "" }, { "docid": "60ee28dd7310daafbcae90016186a15f", "score": "0.56608033", "text": "public function checkCourse(){\r\n $this->departement_model->deleteStdCrs($this->input->post('student_id'), '23');\r\n\r\n //divide the information to get the course id and its credit\r\n if ($this->input->post('cours') != null){\r\n $cours['cours'] = $this->input->post('cours');\r\n $test = explode(':', $cours['cours'], -1);\r\n // $cours['cours'] = getCours($cours['cours']);\r\n\r\n $count = count($test);\r\n\r\n\r\n for ($x = 0; $x < $count; $x++) {\r\n $final = explode(',', $test[$x]);\r\n\r\n $sub_data = array(\r\n 'id_cours' => $final[0],\r\n 'student_id' => $this->input->post('student_id'),\r\n 'session' =>'23',\r\n 'credit' => $final[1],\r\n 'lab' => '0',\r\n 'grade' => 0\r\n );\r\n\r\n //print_r($sub_data);\r\n //insert all information about the subjects taken\r\n $this->student_model->insertStdSub('std_subscription', $sub_data);\r\n\r\n }\r\n }\r\n }", "title": "" }, { "docid": "86e803cac19ff4283fdddeb2520cbcaa", "score": "0.56337327", "text": "public function show_private_courses()\n {\n if ($this->check_authenticated()) {\n\n $private_courses = Course::where('visible', 2)->get();\n $all_centers = $this->get_total_centers();\n $all_courses = $this->get_total_courses();\n $all_students = $this->get_total_students();\n $all_trainers = $this->get_total_trainers();\n\n return view('administrator.confirm-private-courses', compact('private_courses', 'all_centers', 'all_courses', 'all_students', 'all_trainers'));\n\n } else {\n return $this->error_page();\n }\n }", "title": "" }, { "docid": "39601c720b35c3320b83cb9b8d860f58", "score": "0.5632362", "text": "public function lecturerCourses(Request $request=null){\n if(Auth::user()->approved != 1){\n Auth::logout();\n return view('auth.login')->with('accountNotApproved', \"Your account has not been approved yet. Please send an email on [email protected]\");\n }\n $roleID = Auth::user()->role_id;\n switch ($roleID){\n case 1:\n case 2:\n return view('student.access_denied');\n case 3:\n case 4:\n return view('lecturer.lecturing_courses')->with('courses', app('App\\Http\\Controllers\\LecturerController')->getLecturerCourses($request));\n case 5:\n return view('departmentadmin.access_denied');\n case 6:\n return view('systemadmin.access_denied');\n }\n }", "title": "" }, { "docid": "aeedeb0d358abe7637764e5c7cc190d4", "score": "0.5627936", "text": "public function getAllCourses()\n {\n try {\n return $this->model->countInfo()->paginate(config('const.pagination.course'));\n } catch (\\Exception $e) {\n return $this->errroResult($e->getMessage());\n }\n }", "title": "" }, { "docid": "b152390456a5acfc7e04e9c27a71d771", "score": "0.56157273", "text": "public function otherCourses(Request $request=null){\n if(Auth::user()->approved != 1){\n Auth::logout();\n return view('auth.login')->with('accountNotApproved', \"Your account has not been approved yet. Please send an email on [email protected]\");\n }\n $roleID = Auth::user()->role_id;\n switch ($roleID){\n case 1:\n case 2:\n return view('student.access_denied');\n case 3:\n case 4:\n return view('lecturer.other_courses')->with('courses', app('App\\Http\\Controllers\\LecturerController')->getOtherCourses($request));\n case 5:\n return app('App\\Http\\Controllers\\DeptAdminController')->getCourses($request);\n case 6:\n return app('App\\Http\\Controllers\\SysAdminController')->getCourses($request);\n }\n }", "title": "" }, { "docid": "d76947cad4ca0e203ce9c0a9b358eb86", "score": "0.56130815", "text": "private function CourseAvailablity($course_id){\n\t\t$course = Courses::where('id',$course_id)->with('CourseRegistrations')->first();\n\t\t$course_available = false;\n\t\tif(count($course->CourseRegistrations)){\n\t\t\tif(count($course->CourseRegistrations) < $course->capacity){\n\t\t\t\t$course_available = true;\n\t\t\t} else{\n\t\t\t\t$course_available = false;\n\t\t\t}\n\t\t} else {\n\t\t\t$course_available = true;\n\t\t}\n\t\treturn $course_available;\n\t}", "title": "" }, { "docid": "30b25ea79efca3d77048b191a7cd350d", "score": "0.5612853", "text": "public function check_course_form()\n\t{\n\t\t$stmt = $this->db->prepare(\"SELECT * FROM courses WHERE course_id = :course_id;\");\n\t\t$stmt->execute(array(':course_id' => $_POST['course_id']));\n\t\treturn print !!$stmt->fetch(PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "88abba2e98bad3e084c38e7ac63e9298", "score": "0.5602679", "text": "public function showStudentAllCourseAction() {\n\n\t\tif(!isset($_POST['Course_year_term'])) {\n\t\t\tthrow new Exception('Argument not set');\n\t\t}\n\t\t$sc = new studentcourseItem();\n\t\t$req = array();\n\t\t$req[0] = array('key' => 'Stu_ID', 'Stu_ID' => $_POST['Account'], 'table' => 'studentcourseItem');\n\t\t$arg = array('Course_ID', 'Course', 'Property', 'Course_year_term', 'Credit');\n\t\t$lk = array('Course_ID');\n\t\t$res = $sc->studentcourseLinkCourse($req, $lk, $arg);\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "c2af50f1b63ef373df61bf0ff996cdf9", "score": "0.56010497", "text": "public function students()\n\t{\n\t\t$criteria=new CDbCriteria;\n\t\t//$criteria->with = array( 'drcRequests');\n\t\t$criteria->with = array( 'drcRequests', 'drcRequests.course', 'coursesAsInstructor.course'=>array('alias'=>'course1'), 'drcRequests.assignments', );\n\t\t$criteria->compare('drcRequests.term_code', $this->term_code);\n\t\t//$criteria->addCondition(\"AuthAssignment.userid=t.username\");\n\t\t//$criteria->join = 'JOIN drcRequests USING (emplid)';\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t \t'pagination' => false,\n\t\t));\n\t}", "title": "" }, { "docid": "1a0e391c22463d283f34a7c4702105eb", "score": "0.5597239", "text": "public function courses(){\n // return \n $courses = Auth::user()->course()->get();\n /*render course list page*/\n return view('mentor.courses')->with('courses',$courses);\n }", "title": "" }, { "docid": "94ec0e1029b37037bac0e5aa28bbe1ed", "score": "0.5595855", "text": "function get_student_courses(&$user) {\n global $CFG;\n\n parent::get_student_courses($user); /// Start with the list of known enrolments\n /// If the database fails we can at least use this\n\n // This is a hack to workaround what seems to be a bug in ADOdb with accessing\n // two databases of the same kind ... it seems to get confused when trying to access\n // the first database again, after having accessed the second.\n // The following hack will make the database explicit which keeps it happy\n\n if (strpos($CFG->prefix, $CFG->dbname) === false) {\n $CFG->prefix = \"$CFG->dbname.$CFG->prefix\";\n }\n\n // Try to connect to the external database\n\n $enroldb = &ADONewConnection($CFG->enrol_dbtype);\n\n if ($enroldb->PConnect($CFG->enrol_dbhost,$CFG->enrol_dbuser,$CFG->enrol_dbpass,$CFG->enrol_dbname)) {\n\n $courselist = array(); /// Initialise new array\n $newstudent = array();\n\n /// Get the authoritative list of enrolments from the database\n\n $useridnumber = $user->{$CFG->enrol_localuserfield};\n\n\n if ($rs = $enroldb->Execute(\"SELECT $CFG->enrol_remotecoursefield\n FROM $CFG->enrol_dbtable\n WHERE $CFG->enrol_remoteuserfield = '$useridnumber' \")) {\n\n if ($rs->RecordCount() > 0) {\n while (!$rs->EOF) {\n $courselist[] = $rs->fields[0];\n $rs->MoveNext();\n }\n\n foreach ($courselist as $coursefield) {\n if ($course = get_record('course', $CFG->enrol_localcoursefield, $coursefield)) {\n $newstudent[$course->id] = true; /// Add it to new list\n if (isset($user->student[$course->id])) { /// We have it already\n unset($user->student[$course->id]); /// Remove from old list\n } else {\n enrol_student($user->id, $course->id); /// Enrol the student\n }\n }\n }\n }\n\n if (!empty($user->student)) { /// We have some courses left that we need to unenrol from\n foreach ($user->student as $courseid => $value) {\n unenrol_student($user->id, $courseid); /// Unenrol the student\n unset($user->student[$course->id]); /// Remove from old list\n }\n }\n\n $user->student = $newstudent; /// Overwrite the array with the new one\n }\n\n $enroldb->Close();\n }\n}", "title": "" }, { "docid": "1e671b2b164ab68d8a5597f0fadcf9ac", "score": "0.5587054", "text": "function coursesEnrolledIn($userID, $session, $db) {\n $query = \"SELECT courses.courseName, courses.courseCode FROM courses,studentCoursesEnrolled \n WHERE studentCoursesEnrolled.enrollmentID='$userID' AND studentCoursesEnrolled.session='$session' \n AND studentCoursesEnrolled.courseCode = courses.courseCode\";\n\n $result = mysqli_query($db, $query);\n return $result;\n }", "title": "" }, { "docid": "f17409401223f99ddf769cb78142b848", "score": "0.5586706", "text": "function getMyCourses($institution, $major, $id){\n\t\t\n\t\t$this->connection->query(\"SELECT * FROM merger WHERE merg_inst='$institution' AND merg_maj='$major'\",true);\n\t\t$outline = $_SESSION['query'];\n\t\t\n\t\t$courses = array();\n\t\twhile($data = mysqli_fetch_array($outline)){\n\t\t\t$courses[] = $data['merg_course'];\n\t\t}\n\t\t\n\t\t$new_courses_arr = array();\n\t\t$old_courses_arr = array();\n\t\t$grades = array();\n\t\t$sub_grade = array();\n\t\tforeach($courses as $course){\n\t\t\t\n\t\t\t$this->connection->query(\"SELECT id, cour_name, cour_code,cour_weight FROM courses WHERE id='$course' LIMIT 1\",true);\n\t\t\t$course_info = $_SESSION['query'];\n\t\t\t\n\t\t\twhile($dat = mysqli_fetch_array($course_info)){\n\t\t\t\t$cData['id'] \t\t= $dat['id'];\n\t\t\t\t$cData['name'] \t\t= $dat['cour_name'];\n\t\t\t\t$cData['code'] \t\t= $dat['cour_code'];\n\t\t\t\t$cData['weight'] \t= $dat['cour_weight'];\n\t\t\t}\n\t\t\t\n\t\t\t//$course_arr[] = $cData;\n\t\t\t//DANGER ZONE!\n\t\t\t$this->connection->num_rows(\"SELECT * FROM progress WHERE prog_course='$cData[id]' AND prog_student='$id' AND prog_grade<>'' \", true);\n\t\t\t$is_excempt = $_SESSION['num_rows'];\n\t\t\t\n\t\t\t/*\n\t\t\t//GET A LIST OF THE DEPRICATED YET SUBSCRIBED COURSES\n\t\t\t$this->connection->returnQueryResults(\"SELECT * FROM progress WHERE prog_course='$cData[id]' AND prog_student='$id' \",false);\n\t\t\t$query = $_SESSION['query'];\n\t\t\t\n\t\t\t$deprecated = array();\n\t\t\t\n\t\t\twhile($course = mysqli_fetch_array($query)){\n\t\t\t\t\n\t\t\t}\n\t\t\t$deprecated[] = $course;\n\t\t\t*/\n\t\t\t\n\t\t\tif($is_excempt == 1){\n\t\t\t\t$old_courses_arr[] = $cData;\n\t\t\t}else{\n\t\t\t\t$new_courses_arr[] = $cData;\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tforeach($old_courses_arr as $done_course){\n\t\t\t\n\t\t\t$pr = $done_course['id'];\n\t\t\t\n\t\t\t$this->connection->query(\"SELECT * FROM progress WHERE prog_course='\".$pr.\"' AND prog_student='$id' \", true); \n\t\t\t$cour_dat = $_SESSION['query'];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twhile($da = mysqli_fetch_array($cour_dat)){\n\t\t\t\t$sub_grade['id'] = $da[\"prog_course\"];\n\t\t\t\t$sub_grade['grade'] = $da[\"prog_grade\"];\n\t\t\t\t$sub_grade['aim'] = $da[\"prog_aim\"];\n\t\t\t\t$sub_grade['dat'] = $da[\"prog_date\"];\n\t\t\t}\n\t\t\t\n\t\t\t$grades[] = $sub_grade;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t$course_arr = array(\"done\" => $old_courses_arr, \"undone\" => $new_courses_arr);\n\t\t\n\t\t$respArray = $this->makeResponse(\"SUCCESS\", $grades , $course_arr);\n\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\texit;\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "ccddf71e8ef21cf76ba6484e3712f6f3", "score": "0.5585569", "text": "private function checkValidExam() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid && $c[\"role\"] == \"Instructor\") {\n $allowed = true;\n $course = $c;\n }\n }\n }\n if (!$allowed) {\n die($this->showError(\"Not Authorized\"));\n }\n\n if (!isset($this->input[\"e\"]) || !is_numeric($this->input[\"e\"])) {\n die($this->showError(\"No Exam Given\"));\n }\n\n $eid = $this->input[\"e\"];\n\n $res = $this->db->query(\"select \n e.id, e.date, e.open, e.close, e.closed, e.title, e.instructions from course c, exam e, person_course pc \n where e.course_id = c.id and pc.course_id = c.id and pc.person_id = $1 and\n pc.role in ('Instructor')\n and e.id = $2\", \n [$this->user[\"id\"], $eid]);\n $all = $this->db->fetchAll($res);\n $allowed = false;\n foreach ($all as $row) {\n if ($row[\"id\"] == $eid) {\n $allowed = true;\n $examInfo = $row;\n break;\n }\n }\n \n if (!$allowed)\n die($this->showError(\"You do not have permissions to modify this exam (Instructors only!)\"));\n\n return $eid;\n }", "title": "" }, { "docid": "7bf0afd660143a587908324274dc4e9f", "score": "0.5581768", "text": "function bp_get_course_check_course_complete($args=NULL){\n\tglobal $post;\n\t$defaults = array(\n\t\t'id'=>$post->ID,\n\t\t'user_id'=>get_current_user_id()\n\t\t);\n\n\t$r = wp_parse_args( $args, $defaults );\n\t\textract( $r, EXTR_SKIP );\n\n\t$return ='<div class=\"course_finish\">';\n\n\t$course_curriculum=bp_course_get_curriculum_units($id);\n\tif(isset($course_curriculum) && count($course_curriculum)){\n\t\t$flag =0;\n\t\tforeach($course_curriculum as $unit_id){\n\t\t\t//if(is_numeric($unit_id)){\n\t\t\t\t$unittaken = bp_course_check_unit_complete($unit_id,$user_id,$id);\n\t\t\t\tif(empty($unittaken) && bp_course_get_post_type($unit_id) == 'quiz'){\n\t\t\t\t\t$unittaken=get_user_meta($user_id,$unit_id,true);\n\t\t\t\t}\n\t\t\t\tif(!isset($unittaken) || !$unittaken){\n\t\t\t\t\t$flag=$unit_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t//}\n\t\t}\n\t\t$flag = apply_filters('wplms_finish_course_check',$flag,$course_curriculum);\n\t\tif(!$flag){\n\n\t\t\t$course_id = $id;\n\t\t\t$auto_eval = get_post_meta($id,'vibe_course_auto_eval',true);\n\t\t\t\n\n\t\t\tif(vibe_validate($auto_eval)){\n\n\t\t\t\t// AUTO EVALUATION\n\t\t\t\t$curriculum=bp_course_get_curriculum_units($id);\n\t\t\t\t$total_marks=$student_marks=0;\n\n\t\t\t\tforeach($curriculum as $c){\n\t\t\t\t\tif(bp_course_get_post_type($c) == 'quiz'){\n\t \t\t\t$k=get_post_meta($c,$user_id,true);\n\t\t\t\t\t\t$student_marks += apply_filters('wplms_course_quiz_weightage',$k,$c,$course_id);\n\t\t\t\t\t\t$questions = bp_course_get_quiz_questions($c,$user_id); \n\t\t\t\t\t\t$quiz_total_marks = array_sum($questions['marks']);\n\t\t\t \t\t$total_marks += apply_filters('wplms_course_quiz_weightage',$quiz_total_marks,$c,$course_id);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdo_action('wplms_submit_course',$post->ID,$user_id);\n\t\t\t\t// Apply Filters on Auto Evaluation\n\t\t\t\t$student_marks=apply_filters('wplms_course_student_marks',$student_marks,$id,$user_id);\n\t\t\t\t$total_marks=apply_filters('wplms_course_maximum_marks',$total_marks,$id,$user_id);\n\n\t\t\t\tif(!$total_marks){$total_marks=$student_marks=1; }// Avoid the Division by Zero Error\n\n\t\t\t\t$marks = round(($student_marks*100)/$total_marks);\n\n\t\t\t\t$return .='<div class=\"message\" class=\"updated\"><p>'.__('COURSE EVALUATED ','vibe').'</p></div>';\n\n\t\t\t\t$badge_per = get_post_meta($id,'vibe_course_badge_percentage',true);\n\n\t\t\t\t$passing_cert = get_post_meta($id,'vibe_course_certificate',true); // Certificate Enable\n\t\t\t\t$passing_per = get_post_meta($id,'vibe_course_passing_percentage',true); // Certificate Passing Percentage\n\n\t\t\t\t//finish bit for student 1.8.4\n\t\t\t\tupdate_user_meta($user_id,'course_status'.$id,3);\n\t\t\t\t//end finish bit\n\t\t\t\t\n \t\t\tdo_action('wplms_evaluate_course',$id,$marks,$user_id,1);\n \t\t\t\n \t\t\t$badge_filter = 0;\n\t\t\t\tif(isset($badge_per) && $badge_per && $marks >= $badge_per)\n \t\t\t\t\t$badge_filter = 1;\n \n \t\t\t\t$badge_filter = apply_filters('wplms_course_student_badge_check',$badge_filter,$course_id,$user_id,$marks,$badge_per);\n\t\t\t if($badge_filter){ \n\t\t\t $badges = array();\n\t\t\t $badges= vibe_sanitize(get_user_meta($user_id,'badges',false));\n\n\t\t\t if(isset($badges) && is_array($badges)){\n\t\t\t \tif(!in_array($id,$badges)){\n\t\t\t \t\t$badges[]=$id;\n\t\t\t \t}\n\t\t\t }else{\n\t\t\t \t$badges=array($id);\n\t\t\t }\n\n\t\t\t update_user_meta($user_id,'badges',$badges);\n\n\t\t\t $b=bp_get_course_badge($id);\n \t\t$badge=wp_get_attachment_info($b); \n \t\t$badge_url=wp_get_attachment_image_src($b);\n \t\tif(isset($badge) && is_numeric($b))\n\t\t\t \t$return .='<div class=\"congrats_badge\">'.__('Congratulations ! You\\'ve earned the ','vibe').' <strong>'.get_post_meta($id,'vibe_course_badge_title',true).'</strong> '.__('Badge','vibe').'<a class=\"tip ajax-badge\" data-course=\"'.get_the_title($id).'\" title=\"'.get_post_meta($id,'vibe_course_badge_title',true).'\"><img src=\"'.$badge_url[0].'\" title=\"'.$badge['title'].'\"/></a></div>';\n\t\t\t \n\n\t\t\t do_action('wplms_badge_earned',$id,$badges,$user_id,$badge_filter);\n\t\t\t }\n\t\t\t $passing_filter =0;\n\t\t\t if(vibe_validate($passing_cert) && isset($passing_per) && $passing_per && $marks >= $passing_per)\n\t\t\t \t$passing_filter = 1;\n\n\t\t\t $passing_filter = apply_filters('wplms_course_student_certificate_check',$passing_filter,$course_id,$user_id,$marks,$passing_per);\n\t\t\t \n\t\t\t if($passing_filter){\n\t\t\t $pass = array();\n\t\t\t $pass=vibe_sanitize(get_user_meta($user_id,'certificates',false));\n\t\t\t \n\t\t\t if(isset($pass) && is_array($pass)){\n\t\t\t \tif(!in_array($id,$pass)){\n\t\t\t \t\t$pass[]=$id;\n\t\t\t \t}\n\t\t\t }else{\n\t\t\t \t$pass=array($id);\n\t\t\t }\n\n\t\t\t update_user_meta($user_id,'certificates',$pass);\n\t\t\t $return .='<div class=\"congrats_certificate\">'.__('Congratulations ! You\\'ve successfully passed the course and earned the Course Completion Certificate !','vibe').'<a href=\"'.bp_get_course_certificate(array('user_id'=>$user_id,'course_id'=>$id)).'\" class=\"ajax-certificate right '.apply_filters('bp_course_certificate_class','',array('course_id'=>$id,'user_id'=>$user_id)).'\" data-user=\"'.$user_id.'\" data-course=\"'.$id.'\"><span>'.__('View Certificate','vibe').'</span></a></div>';\n\t\t\t do_action('wplms_certificate_earned',$id,$pass,$user_id,$passing_filter);\n\t\t\t }\n\n\t\t\t update_post_meta( $id,$user_id,$marks);\n\n\t\t\t $course_end_status = apply_filters('wplms_course_status',4); \n\t\t\t\tupdate_user_meta( $user_id,'course_status'.$id,$course_end_status);//EXCEPTION\t\n\n\t\t\t $message = sprintf(__('You\\'ve obtained %s in course %s ','vibe'),apply_filters('wplms_course_marks',$marks.'/100',$course_id),' <a href=\"'.get_permalink($id).'\">'.get_the_title($id).'</a>'); \n\t\t\t $return .='<div class=\"congrats_message\">'.$message.'</div>';\n\n\t\t\t \n\n\t\t\t}else{\n\t\t\t\t$return .='<div class=\"message\" class=\"updated\"><p>'.__('COURSE SUBMITTED FOR EVALUATION','vibe').'</p></div>';\n\t\t\t\tbp_course_update_user_course_status($user_id,$id,2);// 2 determines Course is Complete\n\t\t\t\tdo_action('wplms_submit_course',$post->ID,$user_id);\n\t\t\t}\n\t\t\t\n\t\t\t// Show the Generic Course Submission\n\t\t\t$content=get_post_meta($id,'vibe_course_message',true);\n\t\t\t$return .=apply_filters('the_content',$content);\n\t\t\t$return = apply_filters('wplms_course_finished',$return);\n\t\t}else{\n\t\t\t$type=bp_course_get_post_type($flag);\n\t\t\tswitch($type){\n\t\t\t\tcase 'unit':\n\t\t\t\t$type= __('UNIT','vibe');\n\t\t\t\tbreak;\n\t\t\t\tcase 'assignment':\n\t\t\t\t$type= __('ASSIGNMENT','vibe');\n\t\t\t\tbreak;\n\t\t\t\tcase 'quiz':\n\t\t\t\t$type= __('QUIZ','vibe');\n\t\t\t\tbreak;\n\t\t\t}//Default for other customized options\n\t\t\t$message = __('PLEASE COMPLETE THE ','vibe').$type.' : '.get_the_title($flag);\n\t\t\t$return .='<div class=\"message\"><p>'.apply_filters('wplms_unfinished_unit_quiz_message',$message,$flag).'</p></div>';\n\t\t}\n\t}else{\n\t\t$retun .=__('COURSE CURRICULUM NOT SET','vibe');\n\t}\t\n\t$return .='</div>';\n\treturn $return;\n}", "title": "" }, { "docid": "12c6319dd41a30a6c76de5f21c1b7695", "score": "0.5576902", "text": "public function getCourses()\n\t{\n\t\treturn $this->db\n\t\t\t->get('courses')\n\t\t\t->result();\n\t}", "title": "" }, { "docid": "56c7699597b3de95a0f46a946b3a7051", "score": "0.5576891", "text": "public function confirm_courses(Request $request)\n {\n\n if ($this->check_authenticated()) {\n\n $request->validate([\n 'courses' => 'required|array|size:' . $this->get_total_courses(),\n 'courses.*' => 'required|string|distinct|exists:courses,identifier',\n 'validations' => 'required|array|size:' . $this->get_total_courses(),\n 'validations.*' => 'required|integer|max:1|min:0',\n ]);\n\n $counter = 0;\n for ($i = 0; $i < $this->get_total_courses(); $i++) {\n $course = Course::where('identifier', $request->courses[$i])->first();\n if (empty($course)) {\n\n } else {\n if ($course->validation != $request->validations[$i]) {\n $course->validation = $request->validations[$i];\n $counter++;\n $course->save();\n }\n }\n }\n\n if ($counter == 0) {\n if ($request->type == \"public\") {\n return redirect()->route('administrator.courses.public.show')->withErrors(['قم بتحديث حالة بعض الدورات لكي يتم حفظها']);\n } elseif ($request->type == \"private\") {\n return redirect()->route('administrator.courses.private.show')->withErrors(['قم بتحديث حالة بعض الدورات لكي يتم حفظها']);\n } else {\n return redirect()->route('administrator.index', Auth::user()->username)->withErrors(['قم بتحديث حالة بعض الدورات لكي يتم حفظها']);\n }\n } else {\n if ($request->type == \"public\") {\n return redirect()->route('administrator.courses.public.show')->with('success', 'تم تحديث البيانات بنجاح');\n } elseif ($request->type == \"private\") {\n return redirect()->route('administrator.courses.private.show')->with('success', 'تم تحديث البيانات بنجاح');\n } else {\n return redirect()->route('administrator.index', Auth::user()->username)->with('success', 'تم تحديث البيانات بنجاح');\n }\n }\n\n } else {\n return $this->error_page();\n }\n\n }", "title": "" }, { "docid": "99605f48209442e150b6de304bcbb051", "score": "0.55715036", "text": "public function courses()\n {\n return Course::all();\n }", "title": "" }, { "docid": "f371b926e9391b4414d253ac2048a381", "score": "0.55641115", "text": "public function coursewisesearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->condition = 'course_unit_master_id = :course_id';\n\t $criteria->params = array(':course_id' => $_REQUEST['id']);\n\n\n\t\t$criteria->compare('course_unit_id',$this->course_unit_id);\n\t\t$criteria->compare('course_unit_master_id',$this->course_unit_master_id);\n\t\t$criteria->compare('course_unit_ref_code',$this->course_unit_ref_code,true);\n\t\t$criteria->compare('course_unit_name',$this->course_unit_name,true);\n\t\t$criteria->compare('course_unit_level',$this->course_unit_level);\n\t\t$criteria->compare('course_unit_credit',$this->course_unit_credit);\n\t\t$criteria->compare('course_unit_hours',$this->course_unit_hours);\n\t\t$criteria->compare('course_unit_created_by',$this->course_unit_created_by);\n\t\t$criteria->compare('course_unit_creation_date',$this->course_unit_creation_date,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "190b49f44388fae992cc8d5ca480bfe3", "score": "0.55491567", "text": "function getCourses() {\n\t\treturn $this->wpdb->get_results('SELECT * FROM '.$this->courses_table);\n\t}", "title": "" }, { "docid": "0e441e94b7564558a750f73120e81cf8", "score": "0.55475307", "text": "public function showAddParticipant() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid && $c[\"role\"] == \"Instructor\") {\n $allowed = true;\n $course = $c;\n }\n }\n }\n if ($allowed) {\n $this->dData = $course;\n return $this->display(\"addparticipant\");\n }\n die($this->showError(\"Not Authorized\"));\n }", "title": "" }, { "docid": "c293860fc64bf3dc82a21e5f237b5d93", "score": "0.5539726", "text": "public function getCourses(){\n return Course::all();\n }", "title": "" }, { "docid": "3b9345aaafdf72801f58805520ab33fb", "score": "0.5531068", "text": "public function getCourses()\n {\n $connet = ConnectionManager::get('default');\n $result = $connet->execute(\"select c.code, c.name from courses c where c.code in (Select course_id from classes where state = 1)\");\n $result = $result->fetchAll('assoc');\n return $result;\n }", "title": "" }, { "docid": "0e40b412d36785820a8df3f86ff3bbef", "score": "0.55195785", "text": "private function selectCatModCourses() {\n # reset the array catModCourses\n $this->catModCourses = [];\n\n # read all courses from current category with module relation\n $sql = \"SELECT DISTINCT(course) FROM \" .\n $this->dbTable .\n \" WHERE course IN \" .\n \" (\" . $this->course->getIDsString() . \")\";\n $q = $this->db->query($sql);\n\n # save the sum of courses with minimum one module\n $this->sumOfCatModCourses = $q->num_rows;\n\n if ($q->num_rows > 0) {\n while ($c = $q->fetch_object()) {\n $this->catModCourses[$c->course] = $c;\n }\n }\n }", "title": "" }, { "docid": "f5f3f114f3372b4c285479e4b941aca9", "score": "0.55165243", "text": "public function showCourses()\n {\n $data = DB::table('teacher_courses')\n ->where('teacher_id','=',session('teacherId'))->get();\n return view('teacher.course-list')->with('courses',$data);\n }", "title": "" }, { "docid": "70d0154b87955d4d2cd0559412cf8c9c", "score": "0.55036813", "text": "public function ListCourses_action()\n {\n $request = Request::getInstance();\n $semObject = new SemesterData;\n\n $sem = $semObject->getCurrentSemesterData();\n\n $current_semester = $sem['semester_id'];\n\n $this->displayHeader();\n\n $template = $this->template_factory->open('course_index');\n $template->set_layout( $GLOBALS['template_factory']->open('layouts/base_without_infobox.php') );\n\n //semester ausgewählt\n if ($request['action'] == 'selectsemester')\n {\n $current_semester = $request['semester'];\n $lehreinheiten = PersoStudiumGeneraleRtfDB::getLehreinheiten($this->user->userid, $this->user->getPermission()->hasRootPermission(), true);\n\n foreach ($lehreinheiten as $key=>$lehreinheit)\n {\n $verzeichnisse[$key]['name'] = $lehreinheit;\n $verzeichnisse[$key]['faecher'] = PersoStudiumGeneraleRtfDB::getFaecher('18ca85409be550468d39fc2c0c8313c6');\n }\n\n $anzahl = $veranstaltungen = PersoStudiumGeneraleRtfDB::getCountVeranstaltungInfos('18ca85409be550468d39fc2c0c8313c6', $request['semester'], $request['va_typ']);\n\n }\n\n\n //Ausgabe\n $template->set_attribute('semester', $semObject->getAllSemesterData());\n $template->set_attribute('current_semester', $current_semester);\n $template->set_attribute('plugin_url', $this->getPluginURL());\n $template->set_attribute('link1', PluginEngine::getLink($this, $this->parameters, 'listCourses'));\n $template->set_attribute('link2', PluginEngine::getLink($this, array('hiddencourses' => $request['hiddencourses'], 'vdetails' => $request['vdetails'], 'type' => 'rtf', 'file' => 'verzeichnis'), 'generateExport'));\n $template->set_attribute('link3', PluginEngine::getLink($this, array('hiddencourses' => $request['hiddencourses'], 'vdetails' => $request['vdetails'], 'type' => 'xml', 'file' => 'verzeichnis'), 'generateExport'));\n $template->set_attribute('link4', PluginEngine::getLink($this, array(), 'inconsistentData'));\n $template->set_attribute('select_hiddencourses', $request['hiddencourses']);\n $template->set_attribute('select_vdetails', $request['vdetails']);\n $template->set_attribute('verzeichnisse', $verzeichnisse);\n $template->set_attribute('va_typ', $request['va_typ']);\n $template->set_attribute('anzahl', $anzahl);\n #$template->set_attribute('infobox', $this->getInfobox());\n echo $template->render();\n }", "title": "" }, { "docid": "b49c69a5db5a06930cd066bf6b391501", "score": "0.5494849", "text": "public function getManageCourse()\n {\n $programs = Program::all();\n $shift =Shift::all();\n $time=Time::all();\n $batch=Batch::all();\n $group=Group::all();\n $academics = Academic::orderBy('academic_id','DESC')->get();\n return view('courses.manageCourse',compact('programs','academics','shift','time','batch','group'));\n }", "title": "" }, { "docid": "53920809775229a826a36bfc302877ae", "score": "0.5490294", "text": "public function get_courses_taking($user_id){\r\n\t\t$enrolled_courses = array();\r\n\r\n\t\t//get all enrolled courses for this user\r\n\t\t$enrolled_courses_result = $this->db->query(\"SELECT course_id FROM folat_enrollment WHERE user_id = \".$user_id);\r\n\t\tif($enrolled_courses_result->num_rows() > 0)\r\n\t\t{\r\n\t\t foreach ($enrolled_courses_result->result() as $row)\r\n\t\t { \r\n\t\t\t $course_result = $this->db->query(\"SELECT * FROM folat_courses WHERE id = \".$row->course_id);\r\n\t\t\t $course = $course_result->row_array();\r\n\r\n\t\t\t //only add to enrolled courses if the course still exists(has not been deleted)\r\n\t\t\t if($course)\r\n\t\t\t {\r\n\t\t\t \t//ADD TEACHER INFO\r\n\t\t\t \t$query = $this->db->get_where('folat_users', array('user_id' => $course['course_teacher_id']));\r\n\t\t\t\t\t$teacher = $query->row_array();\r\n\t\t\t\t\t$course['course_teacher_info'] = array(\r\n\t\t\t\t\t\t'user_id' => $teacher['user_id'],\r\n\t\t\t\t\t\t'user_name' => $teacher['user_name'],\r\n\t\t\t\t\t\t'user_lastname' => $teacher['user_lastname'],\r\n\t\t\t\t\t\t'user_username' => $teacher['user_username'],\r\n\t\t\t\t\t\t'user_email' => $teacher['user_email'],\r\n\t\t\t\t\t\t'user_about' => $teacher['user_about'],\r\n\t\t\t\t\t\t'user_image' => $teacher['user_image']\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\t//ADD CATEGORY INFO\r\n\t\t\t\t\t$query = $this->db->get_where('folat_categories', array('id' => $course['course_category_id']));\r\n\t\t\t\t\t$category = $query->row_array();\r\n\t\t\t\t\t$course['course_category_info'] = $category;\r\n\r\n\t\t\t\t\t//ADD SUBCATEGORY INFO\r\n\t\t\t\t\t$query = $this->db->get_where('folat_subcategories', array('id' => $course['course_subcat_id']));\r\n\t\t\t\t\t$subcategory = $query->row_array();\r\n\t\t\t\t\t$course['course_subcat_info'] = $subcategory;\r\n\r\n\t\t\t\t\t//Add course rating info \r\n\t\t\t\t\t$query = $this->db->get_where('folat_course_ratings', array('course_id' => $course['id']));\r\n\t\t\t\t\t$ratings = $query->result_array();\r\n\t\t\t\t\t$course['course_rating_info'] = $ratings;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Add course rating average\r\n\t\t\t\t\t$avg = '';\r\n\t\t\t\t\t$sum = 0;\r\n\t\t\t\t\t//calculate average rating\r\n\t\t\t\t\tif( !empty($ratings) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$total_ratings = count($ratings);\r\n\t\t\t\t\t\tforeach($ratings as $r ){\r\n\t\t\t\t\t\t\t$int = (int)$r['rating'];\r\n\t\t\t\t\t\t\t$sum += $int;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$avg = round($sum/$total_ratings);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$course['course_rating_avg'] = $avg;\r\n\r\n\t\t\t\t\t//get all course modules\r\n\t\t\t\t\t$mods = $this->getCourseModules($course['id']);\r\n\t\t\t\t\t$course['course_modules'] = $mods;\r\n\t\t\t\t\t//get total length of course\r\n\t\t\t\t\t$total_length = $this->getCourseLength($mods);\r\n\t\t\t\t\t$course['course_time'] = convertToTime($total_length);\r\n\t\t\t \t\r\n\t\t\t \t//push the generated course data into the enrolled_courses array\r\n\t\t\t \tarray_push($enrolled_courses, $course);\r\n\t\t\t }\r\n\t\t }\r\n\t\t} \r\n\t\treturn($enrolled_courses);\r\n\t}", "title": "" }, { "docid": "ba10ea2bad0d482273613ab0ecc8c57d", "score": "0.54889715", "text": "protected function update_courses($user, $selected) {\n $current_courses = $user->courses->find_all()->as_array(null, 'id'); \n $added = array_values(array_diff($selected, $current_courses));\n $removed = array_values(array_diff($current_courses, $selected));\n // removing to be done before adding\n if ($removed) {\n //removing the previous courses assigned\n $user->remove('courses'); \n foreach ($removed as $course_id) {\n $feed = new Feed_Course();\n $feed->set_action('student_remove');\n $feed->set_course_id('0');\n $feed->set_respective_id($course_id);\n $feed->set_actor_id(Auth::instance()->get_user()->id); \n $feed->streams(array('user_id' => $user->id));\n $feed->save(); \n }\n }\n if ($added) {\n foreach ($added as $course_id) {\n $course = ORM::factory('course', $course_id);\n $user->add('courses', $course);\n $feed = new Feed_Course();\n $feed->set_action('student_add');\n $feed->set_course_id('0');\n $feed->set_respective_id($course_id);\n $feed->set_actor_id(Auth::instance()->get_user()->id); \n $feed->streams(array('user_id' => $user->id));\n $feed->save(); \n }\n }\n }", "title": "" }, { "docid": "3867db63b731cf2d9373131c44c77463", "score": "0.5484771", "text": "function courseConducting($userID, $session, $db) {\n \n $query = \"SELECT courses.courseName,courses.courseCode FROM courses,facultyCoursesConducting \n WHERE facultyCoursesConducting.employeeID='$userID' AND facultyCoursesConducting.session='$session' \n AND facultyCoursesConducting.courseCode = courses.courseCode\";\n $result = mysqli_query($db, $query);\n return $result;\n }", "title": "" }, { "docid": "44c5598eb6a5958392a6633ca0e27cc4", "score": "0.5483338", "text": "public function CourseIndex(Request $request)\n {\n $request->user()->authorizeRoles(['admin']);\n $classrooms=Classroom::all();\n return view('admin.courses.index', compact('classrooms')); \n }", "title": "" }, { "docid": "a36850f94565cd9cb1313c60c7eb75b8", "score": "0.54653126", "text": "function poll_user_eligible() {\r\n\t\treturn ($this->poll->eligible == 'all') ||\r\n\t\t\t(($this->poll->eligible == 'students') && isstudent($this->instance->pageid)) ||\r\n\t\t\t(($this->poll->eligible == 'teachers') && isteacher($this->instance->pageid));\r\n\t}", "title": "" }, { "docid": "b4bd600f5153c29ed7eea26bd4a76f9b", "score": "0.545571", "text": "public function selectCourseAction() {\n\t\t\n\t\tif(!isset($_POST['Course_ID'])) {\n\t\t\tthrow new Exception('Argument not set');\n\t\t}\n\t\t$sc = new studentcourseItem();\n\t\t$sc->Course_ID = $_POST['Course_ID'];\n\t\t$sc->Stu_ID = $_POST['Account'];\n\t\t$sc->Score = '-1';\n\t\t$sc->Is_Fail = 0;\n\n\t\t$sc->save();\n\t}", "title": "" }, { "docid": "1d62ce89a471846993190c935f24ec40", "score": "0.54497504", "text": "public function getPopularCourses()\n {\n try {\n return $this->model->countInfo()\n ->orderBy('users_count', 'desc')\n ->take(config('const.pagination.course'))\n ->get();\n } catch (\\Exception $e) {\n return $this->errroResult($e->getMessage());\n }\n }", "title": "" }, { "docid": "afb48301f55774d560d6e8fac0eb10e2", "score": "0.54451966", "text": "public function getDegreeCourses()\n\t{\n\t\t$select = \"SELECT *\";\n\t\t$from = \"FROM `degreeCourse`\";\n\t\t$where = \"WHERE 1\";\n\t\t\n\t\t$queryString = $select.\" \".$from.\" \".$where;\n\t\t$result = $this->associativeArrayQuery($queryString);\n\t\t\n\t\tif (count($result)!=0) // we need this because the foreach statement doesn't accept empty array as parameter.\r\n\t\t{\r\n\t\t\tforeach($result as $res)\r\n\t\t\t{\r\n\t\t\t\t$degreeCourses[] = new \\Entity\\DegreeCourse($res[\"name\"], $res[\"department\"]);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\t$degreeCourses = array(); // an empty array\r\n\t\t\r\n\t\treturn $degreeCourses;\t\t\n\t}", "title": "" }, { "docid": "b15f2b8abd941c9feda361ddcb73f3dc", "score": "0.54359806", "text": "public function courseDetailsAction() {\n $request = $this->getRequest();\n $course_id = $request->get('course_id');\n if (!is_numeric($course_id)) {\n $this->get('session')->setFlash('error', 'Wrong course id.');\n return $this->redirect($request->headers->get('referer'));\n }\n $em = $this->getDoctrine()->getEntityManager();\n $course_details = $em->getRepository('FrontFrontBundle:AvailableCourses')->getCourseById($course_id);\n if (empty($course_details)) {\n $this->get('session')->setFlash('error', 'The course doesn\\'t exist.');\n return $this->redirect($request->headers->get('referer'));\n }\n\n $course_schedule = $em->getRepository('FrontFrontBundle:CourseSchedule')->getCourseSchedule($course_details['id']);\n $teacher_details = $em->getRepository('FrontFrontBundle:Teachers')->getTeachersWithObjects(true, $course_details['teacher_id']);\n\n $is_student_enrolled_on_course = false;\n if (Auth::isAuth() && Auth::getAuthParam('account_type') == 'student') {\n $is_student_enrolled_on_course = $em->getRepository('FrontFrontBundle:Students')->isEnrolledOnCourse(Auth::getAuthParam('id'), $course_details['id']);\n $enroll_url = $this->generateUrl('enroll') . '?course_id=' . $course_id;\n } else {\n $enroll_url = $this->generateUrl('register') . '?next_url=' . urlencode($this->generateUrl('enroll') . '?course_id=' . $course_id);\n }\n\n// \\Front\\FrontBundle\\Additional\\Debug::d1($teacher_details);\n return $this->render('FrontFrontBundle:Default:course_details.html.twig', array(\n 'course_details' => $course_details,\n 'teacher_details' => $teacher_details[0],\n 'course_schedule' => $course_schedule,\n 'is_student_enrolled_on_course' => !empty($is_student_enrolled_on_course),\n 'enroll_url' => $enroll_url,\n ));\n }", "title": "" }, { "docid": "de7a2dea2717a2ee802df52c4c8456a6", "score": "0.5434491", "text": "public function getInstituteCourses( $instituteId, $autoSuggest = false, array $attributes = [] );", "title": "" }, { "docid": "3ef5894b295edac445847c9a75b9f150", "score": "0.54222256", "text": "public function getRegisteringCourses()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->addCondition('status='.self::STATUS_REGISTERING);\n\t\t$criteria->order = 'status ASC, start_date ASC';\n\t\t$criteria->compare('deleted_flag', 0);\n\t\treturn $this->findAll($criteria);//Find all\n\t}", "title": "" }, { "docid": "31a94a4971fa82a48e4ec8acb81ce563", "score": "0.5414722", "text": "function aquireStudents()\n\t{\n\t\t$adviserYearLevel = $this->Main_model->getYearLevelOfAdviser();\n\t\t$aquisitionYearLevel = $adviserYearLevel - 1;\n\n\t\t//get the section and yearLevelId advisee\n\t\t$sectionId = $this->Main_model->getAdviserSectionJhs();\n\t\t$yearLevelId = $adviserYearLevel;\n\t\t\n\t\t//get all of the students that are in the ssr table that has a year level same as the $aquisitionYearLevel\n\t\t$ssrTable = $this->Main_model->get_where('student_section_reassignment', 'year_level_id', $aquisitionYearLevel);\n\t\t\n\t\t//send the data\n\t\t$data['ssrTable'] = $ssrTable;\n\n\t\t//provide sections for drop down\n\t\t$sectionArray = array();\n\t\tforeach ($ssrTable->result() as $row) {\n\t\t\tif (in_array($row->section_id, $sectionArray) == false) {\n\t\t\t\tarray_push($sectionArray, $row->section_id);\n\t\t\t}\n\t\t}\n\n\t\t//send data\n\t\t$data['sectionArray'] = $sectionArray;\n\t\t$data['yearLevelId'] = $yearLevelId - 1;\n\n\t\t$this->load->view('includes/main_page/admin_cms/header');\n\t\t$this->load->view('manage_accounts/aquireStudents', $data);\n\t\t$this->load->view('includes/main_page/admin_cms/footer');\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t\n\t\t\t$aquiredStudents = $this->input->post(\"aquiredStudents\");\n\n\t\t\t//TRAPPINGS: kapag walang student na chineck throw error\n\t\t\t$this->Main_model->noCheckedStudents($aquiredStudents, 'manage_user_accounts/aquireStudents');\n\t\t\t\n\t\t\t//INSERTION: CLASS_SECTION\n\t\t\tforeach ($aquiredStudents as $row) {\n\t\t\t\t\n\t\t\t\t$insert['student_profile_id'] = $row;\n\t\t\t\t$insert['section_id'] = $sectionId;\n\t\t\t\t$insert['school_year'] = $yearLevelId;\n\n\t\t\t\t$this->Main_model->_insert('class_section', $insert);\n\n\t\t\t\t//UPDATE the student_profile\n\t\t\t\t$update['school_grade_id'] = $yearLevelId;\n\t\t\t\t$update['section_id'] = $sectionId;\n\t\t\t\t$this->Main_model->_update('student_profile', 'account_id', $row, $update);\n\n\t\t\t\t//DELETE: their records at the ssr table\n\t\t\t\t$this->Main_model->_delete(\"student_section_reassignment\", 'student_profile_id', $row);\n\t\t\t}\n\n\t\t\t$this->session->set_userdata('aquiredStudents', 1);\n\t\t\tredirect(\"manage_user_accounts/dashboard\");\t\n\t\t}\n\t}", "title": "" }, { "docid": "0cf645278832c9ced3c93480c102afa2", "score": "0.54138184", "text": "public function test_get_courses() {\n $this->resetAfterTest();\n\n list($course1, $course2, $course3, $course4) = $this->course_setup();\n\n $now = 1559215025;\n\n // Get the courses in order.\n $courseset = testable_backup_cron_automated_helper::testable_get_courses($now);\n\n $coursearray = array();\n foreach ($courseset as $course) {\n if ($course->id != SITEID) { // Skip system course for test.\n $coursearray[] = $course->id;\n }\n\n }\n $courseset->close();\n\n // First should be course 1, it is the more recently modified without a backup.\n $this->assertEquals($course1->id, $coursearray[0]);\n\n // Second should be course 2, it is the next more recently modified without a backup.\n $this->assertEquals($course2->id, $coursearray[1]);\n\n // Third should be course 3, it is the course with the oldest backup.\n $this->assertEquals($course3->id, $coursearray[2]);\n\n // Fourth should be course 4, it is the course with the newest backup.\n $this->assertEquals($course4->id, $coursearray[3]);\n }", "title": "" }, { "docid": "5320c1d1ff81e8cd48d9bec449c94978", "score": "0.5408989", "text": "public function getCourses(){\n\t\t$this->db->order_by('course', 'asc');\n\t\t$list = $this->db->get('tbl_course');\n\n\t\treturn $list->result_array();\n\t}", "title": "" }, { "docid": "7ab9341340e272f48f2af62d174a2e30", "score": "0.5407207", "text": "public static function get_course_grades()\n {\n global $DB;\n\n /**Campos personalizados */\n // $where1 = \"visible > 0\";\n // $fieldstofill = $DB->get_records_select('user_info_field', $where1, null, '', 'id');\n\n // $emptyfieldclause = \"data IS NOT NULL\";\n // if (count($fieldstofill) > 0) {\n // // Get desired fields IDs.\n // $ftfids = array();\n // foreach ($fieldstofill as $ftf) {\n // $ftfids[] = $ftf->id;\n // }\n // // Check if those fields are filled in the current user's profile.\n // $where2 = \"userid = 2 AND $emptyfieldclause AND fieldid IN(\" . implode(',', $ftfids) . \")\";\n // $nbfilledfields = $DB->count_records_select('user_info_data', $where2, null, 'COUNT(*)');\n // // Compare results\n // if ($nbfilledfields < count($ftfids)) {\n // $profileiscomplete = false;\n // }\n // }\n\n $sql = \"SELECT \n (SELECT ud.data\n FROM prefix_user_info_data AS ud \n WHERE ud.fieldid=3\n AND ud.userid=u.id\n ) AS Sede,\n (SELECT ud.data\n FROM prefix_user_info_data AS ud \n WHERE ud.fieldid=1\n AND ud.userid=u.id\n ) AS Carrera,\n #co.id,\n co.fullname AS Curso,\n g.name AS grupo,\n u.username AS Usuario,\n u.lastname AS Apellido,\n u.firstname AS Nombre,\n \n CASE \n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 1 THEN 'Ausente - Nunca Cursó'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 2 THEN 'Dejó la Cursada'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 3 THEN '2 - Reprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 4 THEN '3 - Reprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 5 THEN '4 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 6 THEN '5 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 7 THEN '6 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 8 THEN '7 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 9 THEN '8 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 10 THEN '9 - Aprobado'\n WHEN (SELECT ag.grade\n FROM prefix_assign AS assign\n RIGHT JOIN prefix_assign_grades AS ag ON ag.assignment=assign.id\n LEFT JOIN prefix_grade_items AS gi ON gi.iteminstance=assign.id\n WHERE gi.scaleid=19\n AND assign.course=co.id AND ag.userid=u.id) = 11 THEN '10 - Aprobado'\n ELSE ''\n END as Nota_Final\n \n FROM\n prefix_role_assignments ra\n JOIN prefix_context con ON con.id=ra.contextid\n JOIN prefix_course AS co ON co.id=con.instanceid\n JOIN prefix_user AS u ON u.id=ra.userid\n JOIN prefix_groups_members AS gm ON gm.userid=u.id\n JOIN prefix_groups AS g ON g.id=gm.groupid AND g.courseid=co.id\n JOIN prefix_grade_items AS gi ON gi.courseid=co.id\n \n WHERE con.contextlevel=50\n AND ra.roleid=5\n AND gi.scaleid=19\n #AND co.id=200\n #%%FILTER_COURSES:co.id%%\n ORDER BY sede,carrera,curso,grupo,usuario,apellido,nombre,nota_final\";\n\n //$users_db = $DB->get_records_sql($sql, ['']);\n\n // $gradeitemparamscourse = [\n // 'itemtype' => 'course',\n // 'courseid' => 2 //$courseid,\n // ];\n // $grade_course = \\grade_item::fetch($gradeitemparamscourse);\n\n // $grades_user = \\grade_grade::fetch_users_grades($grade_course, array(3), false);\n\n\n\n $users_db = $DB->get_records('user');\n // echo '<pre>' . print_r($users_db, 1) . '</pre>';\n // exit();\n\n //error_log(print_r($users_db, 1));\n $grades = [];\n // foreach ($users_db as $row) {\n // $grade = new stdClass();\n // $grade->name = $row->firstname;\n // $grade->username = $row->username;\n // $grades[] = $grade;\n // }\n\n return $users_db;\n }", "title": "" }, { "docid": "a9e2d986802f558c60450704889774ad", "score": "0.54000217", "text": "function bp_course_get_user_courses($user_id,$status = NULL){\n \t\n \tif(!is_numeric($user_id))\n \treturn;\n\n \tglobal $wpdb,$bp;\n\n \tif(function_exists('bp_is_active') && bp_is_active('activity')){\n \t\tif(!empty($status) && in_array($status,array('active','expired'))){\n\t\t\t$query = $wpdb->get_results($wpdb->prepare(\"\n\t \t\tSELECT posts.ID as id, IF(meta.meta_value > %d,'active','expired') as status\n\t \tFROM {$wpdb->posts} AS posts\n\t \tLEFT JOIN {$wpdb->usermeta} AS meta ON posts.ID = meta.meta_key\n\t \tWHERE posts.post_type = %s\n\t \tAND posts.post_status = %s\n\t \tAND meta.user_id = %d\n\t \t\",time(),'course','publish',$user_id));\n\t \t\n \t\t}else{\n\t \t\t$query = $wpdb->get_results($wpdb->prepare(\"\n\t \t\tSELECT item_id as id,type as status\n\t \t\tFROM {$bp->activity->table_name}\n\t \t\tWHERE user_id = %d\n\t \t\tAND type IN ('start_course','submit_course','course_evaluated')\n\t \t\tORDER BY date_recorded DESC\n\t \t\t\",$user_id));\n\t \t}\n\t}else{\n\t\t// If any Third party plugin author is integrating !!\n\t\t$query = $wpdb->get_results($wpdb->prepare(\"\n\t \tSELECT posts.ID as id\n\t FROM {$wpdb->posts} AS posts\n\t LEFT JOIN {$wpdb->usermeta} AS meta ON posts.ID = meta.meta_key\n\t WHERE posts.post_type = %s\n\t AND posts.post_status = %s\n\t AND meta.user_id = %d\n\t \",'course','publish',$user_id));\n\t}\n\n \t$courses =array();\n \tif(isset($query) && is_array($query)){\n \tforeach($query as $q){\n \t\tif(!empty($status)){\n \t\t\tif(isset($q->status) && $q->status == $status){\n \t\t\t\t$courses[]=$q->id;\t\t\t\n \t\t\t}\n \t\t}else{\n \t\t\t$courses[]=$q->id;\n \t\t}\n \t} \n \t}\n \treturn $courses;\n}", "title": "" }, { "docid": "f3e083e481c46876657abd1751526a44", "score": "0.53824073", "text": "function __enrolUsersToCourse($id) {\n //debug($this->request->data['Course']['user_id']);\n $this->__filteroutexisting();\n //debug($this->request->data['Course']['user_id']);\n //exit;\n //check if enddate is empty then set deafult enddate.\n if(!isset($this->request->data['Course']['enddate']) || trim($this->request->data['Course']['enddate'])==\"\") \n $this->request->data['Course']['enddate'] = date('Y-m-d', strtotime(date('Y-m-d') . ' +' . $this->request->data['Course']['leaddays'] . ' days'));\n\n /* $minEndDate = date('Y-m-d', strtotime($this->Course->field('startdate') . ' +' . $this->request->data['Course']['leaddays'] . ' days'));\n if($this->request->data['Course']['enddate'] < $minEndDate){\n $this->Session->setFlash(__('Enrollment can't start before course start date. Try extending Complete By date'));\n $this->redirect($this->referer());\n } */\n\n if(USESTARTDATE) $this->Course->makeEnddate( $this->request->data['Course'] );\n if(!USESTARTDATE) $this->Course->makeStartdate($this->request->data['Course']);\t\n \n //debug($this->request->data['Course']); exit;\n if($this->request->data['Course']['user_id'])\t{\n $data = array('id' => $id); $tos = [];\n\t\t\t$creator_id = $this->Auth->user('id');\n foreach($this->request->data['Course']['user_id'] as $user_id) {\n $dept_id = $this->Course->User->field('department_id', array('id'=>$user_id));\n $data['CoursesEnrollment'][] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'user_id'=>$user_id, \n\t\t\t\t\t\t\t\t\t\t\t\t'department_id'=>$dept_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'creator_id'=>$creator_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'course_id'=>$id,\n\t\t\t\t\t\t\t\t\t\t\t\t'course_module_id' => $this->Course->getCurrentModule( $id ),\n\t\t\t\t\t\t\t\t\t\t\t\t'startdate'=>$this->request->data['Course']['startdate'], \n\t\t\t\t\t\t\t\t\t\t\t\t'enddate'=>$this->request->data['Course']['enddate'], \n\t\t\t\t\t\t\t\t\t\t\t\t//'duration'=>@$this->request->data['Course']['duration'], \n\t\t\t\t\t\t\t\t\t\t\t\t'leaddays'=>$this->request->data['Course']['leaddays'],\n\t\t\t\t\t\t\t\t\t\t\t\t'set_reminder' => $this->request->data['Course']['set_reminder'],\n\t\t\t\t\t\t\t\t\t\t\t\t'reminder_date' => $this->request->data['Course']['reminder_date'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_pre_month' => $this->request->data['Course']['rem_pre_month'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_pre_week' => $this->request->data['Course']['rem_pre_week'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_pre_day' => $this->request->data['Course']['rem_pre_day'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_today' => $this->request->data['Course']['rem_today'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_post_daily' => $this->request->data['Course']['rem_post_daily'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_post_weekly' => $this->request->data['Course']['rem_post_weekly'],\n\t\t\t\t\t\t\t\t\t\t\t\t'set_post_specific_date' => $this->request->data['Course']['set_post_specific_date'],\n\t\t\t\t\t\t\t\t\t\t\t\t'rem_post_date' => $this->request->data['Course']['rem_post_date'],\n\t\t\t\t\t\t\t\t\t\t\t\t);\n }\n //debug( $tos );\n //debug($data);\n //exit;\n if($this->Course->saveAll( $data ))\t{\n $this->Course->resetEnrollmentCount( $id );\n $course = $this->Course->read(); \n foreach($data['CoursesEnrollment'] as $enrolment ) {\n\t\t\t\t\t\t\t\t\t\t\t\tif($enrolment['startdate'] > date('Y-m-d')) continue; //if enrollment is not started yet, don't send email\n $enrol['CoursesEnrollment'] = $enrolment;\n $enrol['Course'] = $course['Course'];\n $enrol['User'] = $this->Course->User->find('first', array('conditions'=>array('User.id'=>$enrolment['user_id']), 'fields'=>array('id', 'username', 'first_name', 'last_name', 'email_address', 'full_name')))['User'] ;\n $to = $enrol['User']['email_address'];\n if($to)\n\t\t\t\t\t\t\t$this->__Email($to, 'You are enrolled to a training!', 'Training.user-enrolled-tocourse', array('data' => $enrol));\n }\n\t\t\t\t$this->log(sprintf(\"##authuser## enrolled %s users to course ##Course:{$id}##\", sizeof($data['CoursesEnrollment'])), \"system\");\n $this->_flash(sprintf(__('%s users were enrolled to training %s.'), sizeof($data['CoursesEnrollment']), $course['Course']['name']));\n }\telse\t{\n $this->_flash(__('Users couldnt be enrolled to training course(s). Try Again'));\n }\n }\n }", "title": "" }, { "docid": "f439934630eec09d1d4cbe4c761826aa", "score": "0.53812015", "text": "function getApproved() {\n\t\treturn $this->wpdb->get_results('SELECT * FROM '.$this->courses_table.' WHERE status = 1 AND archived = 0');\n\t}", "title": "" }, { "docid": "1a20f4e84f185fc2730a89fcabc47630", "score": "0.5380859", "text": "function carryOverCourses($regno, $sessionId, $semester){\n DB::connection('mysql2')->setFetchMode(PDO::FETCH_ASSOC);\n\n $processCoursesScore = [];\n $results = [];\n\n $courses = DB::connection('mysql2')->table('course_registration')\n ->select(DB::raw('*,(ca + exam) AS total_score'))\n ->where('approval_status','Senate')\n// ->where('sessions_session_id',$sessionId)\n ->where('students_student_id',$regno)\n ->where('semester',$semester);\n// if(!is_null($semester)) {\n// is_array($semester) ? $courses->whereIn('semester', $semester) : $courses->where('semester',$semester);\n// }\n\n if($courses = $courses->get()){\n// dd($courses);\n // Rebuild Result Array\n foreach($courses as $course) {\n $skippedSession = studentSkippedSessions($course['students_student_id'], $course['sessions_session_id']);\n if(! $skippedSession){\n $courseId = $course['courses_course_id'];\n if (!isset($processCoursesScore[$courseId])) {\n $processCoursesScore[$courseId] = $course;\n $processCoursesScore[$courseId]['total_score'] = [];\n }\n $processCoursesScore[$courseId]['total_score'][] = $course['total_score'];\n }\n\n }\n\n // Check if a course has not been passed by Student\n // 45 Passmark for BHU/12 and above\n // Few Exceptions for Spill-Over students\n // A case of a student (BHU/11/02/02/0039) which have passed during 2013/2014 using Old standard\n\n foreach ($processCoursesScore as $score) {\n // 40 Passmark for BHU/11 and below\n if(isOldGradable($score['students_student_id'])){\n if(max($score['total_score']) < 40 && in_array($score['courses_course_id'],$results) == false){\n $results[$score['courses_course_id']] = $score;\n }\n } else {\n if(max($score['total_score']) < 45 && in_array($score['courses_course_id'],$results) == false){\n $results[$score['courses_course_id']] = $score;\n }\n }\n\n }\n\n }\n\n // Reset fetch type to Object\n DB::connection('mysql2')->setFetchMode(PDO::FETCH_OBJ);\n\n return $results;\n}", "title": "" }, { "docid": "cc3bf026e87933d20c62b155ba86b4c5", "score": "0.53785163", "text": "function getCourses() {\r\n\ttry {\r\n\t\t$DBH = openDBConnection();\r\n\t\t$DBH->beginTransaction();\r\n\r\n\t\t$courseSelect = \"\r\n\t\t\tSELECT * FROM Courses\r\n\t\t\";\r\n\t\t$courseSelectStmt = $DBH->prepare($courseSelect);\r\n\t\t$courseSelectStmt->execute();\r\n\t\t$courses = array();\r\n\t\twhile($row = $courseSelectStmt->fetch()) {\r\n\t\t\t$course = new Course($row);\r\n\t\t\t$courses[] = $course;\r\n\t\t}\r\n\t\t$DBH = null;\r\n\r\n\t\treturn $courses;\r\n\t}\r\n\tcatch (PDOException $e) {\r\n\t\tif ($e->getCode() == 23000) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treportDBError($e);\r\n\t}\r\n}", "title": "" }, { "docid": "b876dfb7ef5b2ab1e1847fb04f56f58d", "score": "0.53765595", "text": "public function addAccommodation() {\n $data = $this->loadCourses();\n $cid = $this->input[\"course\"];\n $course = null;\n $allowed = false;\n foreach ($data as $y) {\n foreach ($y as $c) {\n if ($c[\"id\"] == $cid && $c[\"role\"] == \"Instructor\") {\n $allowed = true;\n $course = $c;\n }\n }\n }\n if ($allowed) {\n $this->dData = $course;\n\n // input check\n if (!isset($this->input[\"userid\"]) || empty($this->input[\"userid\"]) || !isset($this->input[\"time\"]) || empty($this->input[\"time\"])) {\n $this->setError(\"No Participants Given\");\n die($this->showAddAccommodation());\n }\n if (!is_numeric($this->input[\"time\"])) {\n $this->setError(\"Timescale must be numeric\");\n die($this->showAddAccommodation());\n }\n\n $studentid = $this->input[\"userid\"];\n $time = $this->input[\"time\"];\n \n // See if the person already exists from another class\n $resP = $this->db->query(\"select p.id from person p, person_course pc where p.uva_id = $1 and p.id = pc.person_id and pc.course_id = $2\", [\n $studentid, $course[\"id\"]\n ]);\n $allP = $this->db->fetchAll($resP);\n\n // If person doesn't exist in the course, return error\n if (!(isset($allP[0]) && isset($allP[0][\"id\"]))) {\n $this->setError(\"Student was not found\");\n die($this->showAddAccommodation());\n }\n \n $pid = $allP[0][\"id\"];\n $resPC = $this->db->query(\"update person_course set time_scale = $3 where course_id = $1 and person_id = $2;\", [\n $course[\"id\"],\n $pid,\n $time\n ]);\n\n $this->setMessage(\"Accommodation updated to $time for $studentid\");\n\n return $this->showAddAccommodation();\n\n }\n die($this->showError(\"Not Authorized\"));\n }", "title": "" }, { "docid": "51b7de388e472bf729a40d5428076a80", "score": "0.5370187", "text": "public function showStudentAllCourseScoreAction() {\n\n\t\t$sc = new studentcourseItem();\n\t\t$req = array();\n\t\t$req[0] = array('key' => 'Stu_ID', 'Stu_ID' => $_POST['Account'], 'table' => 'studentcoursrItem');\n\t\t$arg = array('Course_ID', 'Course', 'Property', 'Course_year_term', 'Credit', 'Score', 'Is_Fail');\n\t\t$lk = array('Course_ID');\n\t\t$res = $sc->studnetcourseLinkCourse($req, $lk, $arg);\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "0d27e793fd142e6e4f0be5666ce03d76", "score": "0.53693336", "text": "public function listcourses(){\n $courses = $this->Courses->find()->where(['status'=>'live'])->order(['postdate'=>'DESC']);\n $categories = $this->listcategories();\n\n $this->set(compact('courses','categories'));\n \n $this->set('title', 'Africa\\'s leading Code Academy');\n // $this->viewBuilder()->setLayout('otherpages');\n }", "title": "" }, { "docid": "ac0df9f8e0e99dbaa3256dc7b32115f3", "score": "0.5356694", "text": "public function assignments($course_id = null) {\n $this->setSEO(array(\"title\" => \"Assignments | Student\"));\n $view = $this->getActionView();\n $session = Registry::get(\"session\");\n\n $classroom = StudentService::$_classroom;\n $courses = StudentService::$_courses;\n\n $course_id = RequestMethods::post(\"course\", $course_id);\n if ($course_id) {\n $assignments = \\Assignment::all(array(\"course_id = ?\" => $course_id, \"live = ?\" => true));\n } else {\n $assignments = \\Assignment::all(array(\"classroom_id = ?\" => $classroom->id, \"live = ?\" => true));\n }\n\n $service = new Shared\\Services\\Assignment();\n $result = $service->all($assignments, $courses);\n $view->set(\"assignments\", $result)\n ->set(\"courses\", $courses);\n }", "title": "" }, { "docid": "4306ec2ccee3d06bf306517031d597b7", "score": "0.5356017", "text": "public static function the_course_enrolment_actions(){\n\n\t global $post;\n\n\t if ( 'course' != $post->post_type ) {\n\t\t\treturn;\n\t }\n\n ?>\n <section class=\"course-meta course-enrolment\">\n <?php\n global $post, $current_user;\n $is_user_taking_course = Sensei_Utils::user_started_course( $post->ID, $current_user->ID );\n\n\t if ( is_user_logged_in() && ! $is_user_taking_course ) {\n\n\t // Check for woocommerce\n\t if ( Sensei_WC::is_woocommerce_active() && Sensei_WC::is_course_purchasable( $post->ID ) ) {\n\n\t\t // Get the product ID\n Sensei_WC::the_add_to_cart_button_html($post->ID );\n\n } else {\n\n sensei_start_course_form($post->ID);\n\n } // End If Statement\n\n } elseif ( is_user_logged_in() ) {\n\n // Check if course is completed\n $user_course_status = Sensei_Utils::user_course_status( $post->ID, $current_user->ID );\n $completed_course = Sensei_Utils::user_completed_course( $user_course_status );\n // Success message\n if ( $completed_course ) { ?>\n <div class=\"status completed\"><?php _e( 'Completed', 'woothemes-sensei' ); ?></div>\n <?php\n $has_quizzes = Sensei()->course->course_quizzes( $post->ID, true );\n if( has_filter( 'sensei_results_links' ) || $has_quizzes ) { ?>\n <p class=\"sensei-results-links\">\n <?php\n $results_link = '';\n if( $has_quizzes ) {\n $results_link = '<a class=\"view-results\" href=\"' . Sensei()->course_results->get_permalink( $post->ID ) . '\">' . __( 'View results', 'woothemes-sensei' ) . '</a>';\n }\n /**\n * Filter documented in Sensei_Course::the_course_action_buttons\n */\n $results_link = apply_filters( 'sensei_results_links', $results_link, $post->ID );\n echo $results_link;\n ?></p>\n <?php } ?>\n <?php } else { ?>\n <div class=\"status in-progress\"><?php echo __( 'In Progress', 'woothemes-sensei' ); ?></div>\n <?php }\n\n } else {\n\n // Check for woocommerce\n\t\t if ( Sensei_WC::is_woocommerce_active() && Sensei_WC::is_course_purchasable( $post->ID ) ) {\n\n\t $login_link = '<a href=\"' . sensei_user_login_url() . '\">' . __( 'log in', 'woothemes-sensei' ) . '</a>';\n\t $message = sprintf( __( 'Or %1$s to access your purchased courses', 'woothemes-sensei' ), $login_link );\n\t Sensei()->notices->add_notice( $message, 'info' ) ;\n\t Sensei_WC::the_add_to_cart_button_html( $post->ID );\n\n } else {\n\n if( get_option( 'users_can_register') ) {\n\n\t // set the permissions message\n\t $anchor_before = '<a href=\"' . esc_url( sensei_user_login_url() ) . '\" >';\n\t $anchor_after = '</a>';\n\t $notice = sprintf(\n\t\t __('or %slog in%s to view this course.', 'woothemes-sensei'),\n\t\t $anchor_before,\n\t\t $anchor_after\n\t );\n\n\t // register the notice to display\n\t if( Sensei()->settings->get( 'access_permission' ) ){\n\t\t Sensei()->notices->add_notice( $notice, 'info' ) ;\n\t }\n\n\n $my_courses_page_id = '';\n\n /**\n * Filter to force Sensei to output the default WordPress user\n * registration link.\n *\n * @since 1.9.0\n * @param bool $wp_register_link default false\n */\n\n $wp_register_link = apply_filters('sensei_use_wp_register_link', false);\n\n $settings = Sensei()->settings->get_settings();\n if( isset( $settings[ 'my_course_page' ] )\n && 0 < intval( $settings[ 'my_course_page' ] ) ){\n\n $my_courses_page_id = $settings[ 'my_course_page' ];\n\n }\n\n // If a My Courses page was set in Settings, and 'sensei_use_wp_register_link'\n // is false, link to My Courses. If not, link to default WordPress registration page.\n if( !empty( $my_courses_page_id ) && $my_courses_page_id && !$wp_register_link){\n\n $my_courses_url = get_permalink( $my_courses_page_id );\n $register_link = '<a href=\"'.$my_courses_url. '\">' . __('Register', 'woothemes-sensei') .'</a>';\n echo '<div class=\"status register\">' . $register_link . '</div>' ;\n\n } else{\n\n wp_register( '<div class=\"status register\">', '</div>' );\n\n }\n\n } // end if user can register\n\n } // End If Statement\n\n } // End If Statement ?>\n\n </section><?php\n\n }", "title": "" }, { "docid": "ee82b85b1188ff6e575f09b3caa985ee", "score": "0.53554976", "text": "public function get_eligible_school_list($component = null, $judge_id = null) {\r\n\t\t$schools = array();\r\n\t\t$this->db->where(\"schools.\" . $component . \" != \", '\"\"', false);\r\n\t\t$this->db->where(\"id NOT IN (select school_id from \" . $component . \"_rubric where judge_id = \" . $judge_id . \")\");\r\n\r\n\t\tforeach ($this->db->get('schools')->result() as $row) {\r\n\t\t\t$schools[$row->id] = $row->name;\r\n\t\t}\r\n\r\n\t\treturn $schools;\r\n\t}", "title": "" }, { "docid": "bf1decb479e936185319aee8f03bd948", "score": "0.53537035", "text": "public function showListCourse()\n {\n $courses = Course::paginate(config('variable.paginate'));\n return view('admin.lesson.list', compact('courses'));\n }", "title": "" }, { "docid": "0c2f254978031429c104b5b6190e7201", "score": "0.53388005", "text": "function has_courses( $group_id = null ) {\r\n global $bp;\r\n $course_ids = null;\r\n $courses = array();\r\n \r\n if( empty( $group_id ) )\r\n $group_id = $bp->groups->current_group->id;\r\n \r\n $term_id = get_term_by( 'slug', $group_id, 'group_id' );\r\n if( !empty( $term_id ) )\r\n $course_ids = get_objects_in_term( $term_id->term_id, 'group_id' );\r\n \r\n if( !empty( $course_ids ) )\r\n arsort( $course_ids ); // Get latest entries first\r\n else\r\n return null;\r\n \r\n foreach ( $course_ids as $cid )\r\n $courses[] = self::is_course( $cid );\r\n \r\n return array_filter( $courses );\r\n }", "title": "" }, { "docid": "93967846cd23f085ee9ea45da9a6336a", "score": "0.53362453", "text": "public function uses_course_index() {\n return true;\n }", "title": "" }, { "docid": "32bc1df0c456e04f5ae04a6313394816", "score": "0.5334386", "text": "public function getScheduledCourses(){\r\n return $this->db->query(\"\r\n SELECT scheduled_courses.course_id, course.coursenum, scheduled_courses.current_column, course.description, course.title, course.courseid, course.prereqs, course.credits\r\n\t\tFROM scheduled_courses\r\n\t\tJOIN course ON course.courseid = scheduled_courses.course_id\");\r\n\t\t//WHERE scheduled_courses.current_column = '\" . $column . \"'\");\r\n }", "title": "" }, { "docid": "da8ac00990c6a6eaf747d5e2f383cad8", "score": "0.5333721", "text": "public function getUserEnrolledCourses( $userId, array $role = [\n\t\tself::USER_COURSE_ROLE_LEARNER,\n\t\tself::USER_COURSE_ROLE_TEACHER,\n\t\tself::USER_COURSE_ROLE_CREATOR\n\t] );", "title": "" }, { "docid": "38b94caaa6cb2a8a9002bef789c4fc69", "score": "0.53326446", "text": "public function courseNames()\n\t{\n\t\t//$names = '';\n\t\t$names = array();\n\t\tforeach($this->drcRequests as $request)\n\t\t{\n\t\t\tif ($request->course){\n\t\t\t\t$names[] = $request->course->title;\n\t\t\t}\n\t\t}\n\t\tforeach($this->coursesAsInstructor as $instructedCourse)\n\t\t{\n\t\t\tif ($instructedCourse->course){\n\t\t\t\t$names[] = $instructedCourse->course->title;\n\t\t\t}\n\t\t}\n\t\treturn $names;\n\t}", "title": "" }, { "docid": "85e88eeccb76f504166b00d3852f6d97", "score": "0.5326931", "text": "function getSuggestedCourses($student, $coursesTaken){\n $start = microtime(true);\n\n //echo \"<h3>SUGGESTED COURSES!!</h3>\";\n $scores = array();\n foreach($this->StudentList as $otherStudent){\n\n $otherStudentTaken = $otherStudent->getTaken();\n //if((abs(Count($coursesTaken) - Count($otherStudentTaken)) < 6)){\n $score = $this->jaccardIndex($coursesTaken,$otherStudentTaken);\n $scores[$otherStudent->getId()] = array($otherStudent,$score,$otherStudentTaken);\n //echo \" (\".$otherStudent->getId().\",\".$score.\") \";\n //}\n \n }\n\n //arsort($scores);\n\n $likelyClasses = array();\n $MAX_CLASSES = 40;\n $source_major = $student->getMajor();\n foreach($scores as $first => $second){\n $otherStudent = $second[0];\n $score = $second[1];\n $classes = $second[2];\n $otherStudent_major = $otherStudent->getMajor();\n\n //echo $otherStudent_major.'<br>';\n //echo $score.'<br>';\n $sum = 0;\n if($score >= 0 /*and $otherStudent_major !=0*/){\n foreach($classes as $class){\n if(!in_array($class,$coursesTaken)){//If this is a hashtable, don't think this matters\n $target_major = $this->getClassMajorById($class);\n //echo $score;\n if(isset($likelyClasses[$class])){\n //Weird function need to analyse this.\n\n $likelyClasses[$class][1] += $score;\n $likelyClasses[$class][2] += $this->majorSimilarity($source_major,$target_major);\n $likelyClasses[$class][3] += $this->majorSimilarity($source_major,$otherStudent_major);//How to shrink amount of queries.\n $likelyClasses[$class][0] += 1.0;\n $sum++;\n //$likelyClasses[$class] += $score*(1/log($this->courseFrequency($class)+5));//Multiply by classification modifier\n //The more common a class is, the less it matters.\n }else{\n $newArray = array();\n\n $newArray[1] = $score;\n $newArray[2] = $this->majorSimilarity($source_major,$target_major);\n $newArray[3] = $this->majorSimilarity($source_major,$otherStudent_major);//How to shrink amount of queries.\n $newArray[0] = 1.0;\n $likelyClasses[$class] = $newArray;\n $sum++;\n //$likelyClasses[$class] = $score*(1/log($this->courseFrequency($class)+5));\n \n }\n }\n }\n }\n }\n $likelyClasses_weighted = array();\n\n foreach($likelyClasses as $id => $data){\n //echo \"(\".$this->getClassNameById($id).\"[\".$data[0].\",\".$data[1]/$data[0].\",\".$data[2]/$data[0].\",\".$data[3]/$data[0].\"])\";\n\n //Balancing out the huge courses with the small ones.\n //$likelyClasses_weighted[$id] = $data[1] * (1/log($data[0]+1,2));\n $likelyClasses_weighted[$id] = $data[0];\n\n //if($data[0] > 1)\n $net = array();\n\n //BASIC NEURAL NET HERE.\n $net[0] = 1;\n $net[1] = 1;\n $net[2] = 1;\n $net[3] = 1;\n\n\n if(count($coursesTaken) < 4){\n $net[0] = 5;\n $net[1] =.01;\n $net[2] = 20;\n $net[3] = 20;\n \n \n }else if(count($coursesTaken) >=4 and count($coursesTaken)<=8){\n $net[0] = 1;\n $net[1] = 15;\n $net[2] = 2;\n $net[3] = 10;\n }\n //echo ($data[0]).\" \";\n $likelyClasses_weighted[$id] = (($net[1]*$data[1]+$net[2]*$data[2]+$net[3]*$data[3]+$net[0]*$data[0])/($net[1]+$net[2]+$net[3]+$net[0]))/(1+log($data[0],10));\n //echo $likelyClasses_weighted[$id].\"<br>\";\n }\n\n arsort($likelyClasses_weighted);\n\n $end = microtime(true);\n //echo '<br><br><br><br><br><br><br><br><br><h3>END :'.$end-$start.'</h3>';\n return $likelyClasses_weighted;\n\n\n }", "title": "" }, { "docid": "08bd5b11ac9e7e2f5b85ec3ad08d5813", "score": "0.5318684", "text": "public function AsingCourseIndex(Request $request)\n {\n $request->user()->authorizeRoles(['admin']);\n $school=School::find($request->user()->school->id);\n $classrooms=$school->classrooms()->orderBy('grade_id')->get();\n return view('admin.asingcourse.index', compact('classrooms')); \n }", "title": "" }, { "docid": "3af83c9c2202e07e8b7e8da009d5fc4f", "score": "0.53186136", "text": "private function get_total_courses()\n {\n return Course::all()->count();\n }", "title": "" }, { "docid": "c4babdb64cce332c5543e18bb6d8a34a", "score": "0.5317849", "text": "public function courses()\n {\n return $this->belongsToMany('Modules\\Course\\Entities\\Course', 'user_course', 'user_id', 'course_id');\n }", "title": "" } ]
9709573f179c3bbe859eb265387f77fd
Test instantiation with a missing password parameter.
[ { "docid": "d73ec75c8232d4ae2ae85c899ef9bbff", "score": "0.67032546", "text": "public function testMissingPassword() {\n new ZendeskApi('username', null, 'api_key');\n }", "title": "" } ]
[ { "docid": "bfeaef4fef7f382e349ef6f696cc1810", "score": "0.6970381", "text": "public function __construct($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "bfeaef4fef7f382e349ef6f696cc1810", "score": "0.6970381", "text": "public function __construct($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "bfeaef4fef7f382e349ef6f696cc1810", "score": "0.6970381", "text": "public function __construct($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "bfeaef4fef7f382e349ef6f696cc1810", "score": "0.6970381", "text": "public function __construct($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "a0cda4b9ad43774e811d8fcaa4efa79f", "score": "0.68497664", "text": "public function testSetPassword()\n {\n }", "title": "" }, { "docid": "6e06df1c0b6f8fc15d3abf3fd1fa8f6d", "score": "0.6819732", "text": "public function __construct(string $user, string $pass);", "title": "" }, { "docid": "bb9a60b72db6c1ada0eff8439ed0e406", "score": "0.6719153", "text": "public function create($password);", "title": "" }, { "docid": "2b46b4500e89122ab0670fec6f20a7b9", "score": "0.6574546", "text": "function __construct($password, $userName) {\n $this->password = $password;\n $this->userName = $userName;\n }", "title": "" }, { "docid": "ca7ff3c4d4b1b37e1f905077cbeb380c", "score": "0.6474755", "text": "public function testPasswordEmptyMatches() {\n global $testUserId1;\n $object = new User($testUserId1);\n $this->assertTrue($object->save());\n $this->assertTrue($object->checkPassword(\"\"));\n $this->assertFalse($object->checkPassword(\"abcABC123!@#\"));\n }", "title": "" }, { "docid": "c6e0bc59d884c0c135f1d4f9eaa8eed6", "score": "0.6472744", "text": "public function testCreateCredential()\n {\n }", "title": "" }, { "docid": "ed1b7d8ddbcaa9c9fbcaba5a8cb1d7df", "score": "0.6444204", "text": "public function __construct($username,$password, $test=false)\r\n {\r\n $this->username = $username;\r\n $this->password = $password;\r\n $this->test = $test;\r\n\r\n }", "title": "" }, { "docid": "0e598f28f7dd9d7316b0fd04ec45b493", "score": "0.6413966", "text": "public function testDefaultPassword()\n {\n $native = new Native();\n $this->assertSame(PASSWORD_DEFAULT, TestReflection::getProtectedValue($native, 'algo'));\n $this->assertEquals(PASSWORD_BCRYPT, PASSWORD_DEFAULT);\n }", "title": "" }, { "docid": "7499d4ea1abe1cb9857c31b9ae3f2e25", "score": "0.64039075", "text": "public function __construct()\n {\n // then set your own properties. That wouldn't work in this case\n // because configure() needs the properties set in this constructor\n // $this->requirePassword = $requirePassword;\n\n parent::__construct();\n }", "title": "" }, { "docid": "40f797102522b2a1a5da38235c750bff", "score": "0.6379188", "text": "function __construct($userName, $password){\r\n\t\t$this->username = $userName;\r\n\t\t$this->password = $password;\r\n\t\tif($this->authenticate($userName, $password)){\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "231cc5ef2bbbdf2a9707513ad38f7b2a", "score": "0.63651544", "text": "public function testGetPassword()\n {\n $cr = $this->assertSimpleCredentials(self::CR_USER, self::CR_PASS);\n $pass = $cr->getPassword();\n $this->assertSame('bar', $pass);\n }", "title": "" }, { "docid": "27f814e43d60320c0659905f649661b7", "score": "0.6361845", "text": "public function __construct($newPass)\n {\n $this->tempPassword = $newPass;\n }", "title": "" }, { "docid": "548089bba57831238abf549e83d73053", "score": "0.633514", "text": "public function testCanPassword()\n {\n $test = Security::password(10);\n $this->assertIsString($test);\n\n $test = Security::password(15, true);\n $this->assertIsString($test);\n\n $test = Security::password('coucou', true);\n $this->assertIsBool($test);\n $this->assertFalse($test);\n\n $test = Security::password(4, true);\n $this->assertIsBool($test);\n $this->assertFalse($test);\n }", "title": "" }, { "docid": "a96cec6eb6db4f5c0e5e0646e672def4", "score": "0.6303883", "text": "public function testPassword() {\n $password = 'Rosinenbrötchen';\n $hash = '203e5acdbd3bb71813e8abee44a5572313a227b75088133d47';\n $this->assertTrue(Mlf2Authenticate::checkPassword($password, $hash));\n\n // test own hash\n $password = 'Rosinenbrötchen';\n $hash = Mlf2Authenticate::hash($password);\n $this->assertTrue(Mlf2Authenticate::checkPassword($password, $hash));\n\n $this->assertFalse(Mlf2Authenticate::checkPassword(mt_rand(1, 99999), $hash));\n }", "title": "" }, { "docid": "5ce51eae805b0f340d09cf7d9c88491e", "score": "0.6297608", "text": "public static function setUpBeforeClass(): void\n {\n self::$password = new Password();\n }", "title": "" }, { "docid": "77ee859f7ab4cfb99a54dfe92991469d", "score": "0.62879384", "text": "public function test_it_can_verify_password_does_not_match_null_hash()\n {\n $subject = $this->newSubject();\n $this->assertFalse($subject->isCorrect('anything', NULL));\n }", "title": "" }, { "docid": "964afdffb073a8cb884e58e5cdb19e12", "score": "0.6282831", "text": "public static function senhaNotProvided()\n {\n return new static('Zenvia password not provided');\n }", "title": "" }, { "docid": "1ff26d92ff34740725d62f23b86abca4", "score": "0.62548566", "text": "public function __construct($user=NULL, $pass=NULL) {\n Sandbox::__construct($user, $pass);\n }", "title": "" }, { "docid": "84b9bf3c06ef7d73c3829acc51ece17c", "score": "0.62454814", "text": "public function __construct()\n {\n // DB::connection()->enableQueryLog();\n $configPasscode = config('billing.ippay.passcode');\n $this->testMode = (Hash::check($configPasscode, $this->passcode)) ? false : true;\n }", "title": "" }, { "docid": "7daad27e77f6f592bd3fd95188abbacc", "score": "0.6234332", "text": "public function __construct($username, $password, $passwordagain = null) {\n $this->username = $username;\n $this->password = $password;\n if ($passwordagain != null) {\n $this->passwordagain = $passwordagain;\n }\n }", "title": "" }, { "docid": "a15101da458427218020a10ac0786143", "score": "0.6227441", "text": "public function __construct( $identifier = '', $password = '' )\n {\n $this->identifier = $identifier;\n $this->password = $password;\n }", "title": "" }, { "docid": "282dc5763d6a2c77592a973df10518b5", "score": "0.62010956", "text": "public function setPassword($password=null);", "title": "" }, { "docid": "d20de3933cf18eafe329b8fdb5335166", "score": "0.61959535", "text": "function __construct($username, $pass) {\r\n $this->username = $username;\r\n $this->pass = sha1($pass);\r\n $this->dbOperator = new DBOperatorB();\r\n }", "title": "" }, { "docid": "cf97f600e7282f3a73340f9d36ca3b1b", "score": "0.61877763", "text": "function __construct($username,$password)\n {\n $this->username = $username;\n $this->password= $password;\n }", "title": "" }, { "docid": "d82acd2d2d8dc0e32411bc688ece15d6", "score": "0.61625373", "text": "public function __construct($username = \"\", $password =\"\") {\r\n\t\t$this->username= $username;\r\n\t\t$this->password= $password;\r\n\r\n\t}", "title": "" }, { "docid": "70cf50f153c46b09c6eb9b59398c99aa", "score": "0.6152853", "text": "public function testGetCredential()\n {\n }", "title": "" }, { "docid": "5a4ae43c5baab7de73f46648208ab899", "score": "0.61463827", "text": "public function testDecryptMissingPassword()\n {\n $library = new Library($this->getMockedClient(new Response));\n $this->expectException('Exception');\n $library->decrypt('some id', ['query' => []]);\n }", "title": "" }, { "docid": "1c7955b735b169a656092b2ce15c2649", "score": "0.61398107", "text": "public function usePassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.6125965", "text": "public function setPassword($password);", "title": "" }, { "docid": "9a2e59d28d2c105e3cef0a53bc4a07b7", "score": "0.6100521", "text": "public function __construct()\n {\n $this->email = '[email protected]';\n $this->password = '$2y$10$PKbL3XcGzZQlPKUp4sC3e.R56wHLVMZxe.jmd3N/aR3OVysoHBZoi'; // Str::random(16);\n }", "title": "" }, { "docid": "fa487f21645497167cc74061a96cdb50", "score": "0.61003065", "text": "public function __construct($password, $encrypted) {\n $this->password = $password;\n $this->encrypted = $encrypted;\n }", "title": "" }, { "docid": "ca96d85172a6358d6a3c1356c0373bc0", "score": "0.6063324", "text": "public function __construct($user, $password)\n\t{\n\t\t$this->user = $user;\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "46c276a5e23ba754b46c1731efb13bab", "score": "0.6060978", "text": "public function checkPassword($password)\r\n {\r\n\r\n }", "title": "" }, { "docid": "7e6983692d106387cbe1614e2884e0d8", "score": "0.60567117", "text": "public function __construct($user, $password)\n {\n parent::__construct($user, $password);\n }", "title": "" }, { "docid": "1a7ac1a646976126ecb4267785b68576", "score": "0.60541683", "text": "public function testSetPassword() {\n\t\t$manager = new DatabaseManager;\n\t\t$manager->setDoctorPassword(2, \"password2\");\n\t\t$newhash = $manager->getDoctorPasswordHash(2);\n\n\t\t$result = password_verify(\"password2\", $newhash);\n\t\t$this->assertTrue($result);\n\t}", "title": "" }, { "docid": "c9bf100f9af4d1c053581e6145d9712f", "score": "0.6036933", "text": "function __construct($_username,$_password)\n\t{\n\t\t$this->username=$_username;\n\t\t$this->password=$_password;\n\t}", "title": "" }, { "docid": "b2100e265f41308f5a01e410ce188479", "score": "0.60329473", "text": "function __construct($username, $password)\r\n {\r\n global $CFG;\r\n \r\n // Use the base64 encoded version of wwwroot as the appId\r\n $appId = base64_encode($CFG->wwwroot);\r\n\r\n $this->username = $username;\r\n $this->password = $password;\r\n\r\n if( strlen($username) < 1 || strlen($password) < 1 )\r\n {\r\n throw new Exception(\"username and password is requred\");\r\n }\r\n }", "title": "" }, { "docid": "3f2c324724dc8fbf78aa47a4286098c8", "score": "0.60272694", "text": "public function testGetCredentials()\n {\n }", "title": "" }, { "docid": "eedb7a7b63e46c20820af96296f631b9", "score": "0.60004836", "text": "public function test_create_new_useraccount_password_missing()\n {\n $response = $this->post('/api/v1/register',\n [\n \"first_name\" => \"First name\",\n \"last_name\" => \"Last name\",\n \"email\" => \"[email protected]\",\n \"password_confirmation\" => \"uncommon-password\"\n ],\n [\n \"Accept\" => \"application/json\"\n ]\n );\n\n $response->assertStatus(422);\n $response->assertJson(\n [\n 'errors' => [\n 'password' => [\n 'The password field is required.'\n ]\n ]\n ]\n );\n }", "title": "" }, { "docid": "401943679acb86f8eadc7a8a15819c3d", "score": "0.59989095", "text": "public function __construct($user, $password)\n {\n $this->user = $user;\n $this->password = $password;\n }", "title": "" }, { "docid": "580016726cf43de098ec4186eeb2c21d", "score": "0.5985197", "text": "public function testBadPassword()\n {\n $user = $this->writedown->getService('api')->user()->create([\n 'email' => $this->faker->email,\n 'password' => $this->faker->word,\n ]);\n\n // Attempt to login with the correct details and check that it passes\n $this->assertFalse($this->auth->verify($user['data']->email, $this->faker->word));\n }", "title": "" }, { "docid": "a2c0fe8570c9fce7617f9548e3a898fc", "score": "0.59830093", "text": "function setPassword($password);", "title": "" }, { "docid": "1c1c4ff3d5827214781d2febb92cab8a", "score": "0.59795785", "text": "function test_password_logged_off()\n {\n $set = new ctrl_settings();\n\n try\n {\n $set->password();\n $this->fail();\n }\n catch(exception $e)\n {\n $this->assertEquals(preg_match(\"/users/\", $e->getMessage()), 1);\n }\n }", "title": "" }, { "docid": "5cb751b233eea4288d0d450537fd733e", "score": "0.5978986", "text": "function set_password($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "d0c72f9c46449c20033d00ebd0534010", "score": "0.5976579", "text": "function test_validate_password_valid()\n {\n validate_password('/-\\pa$$\\/\\/0r3');\n }", "title": "" }, { "docid": "cabcae4bc4c1e8b261fbbe9a845214f1", "score": "0.5976058", "text": "public function __construct($password, $frequency = 10)\n {\n $this->password = $password;\n $this->frequency = $frequency;\n }", "title": "" }, { "docid": "6bbd267f546e31ae668590bfc3696fab", "score": "0.59704345", "text": "public function __construct()\n {\n $this->middleware('guest');\n\n $this->broker()->validator(function (array $credentials) {\n [$password, $confirm] = [\n $credentials['password'],\n $credentials['password_confirmation'],\n ];\n\n return $password === $confirm && mb_strlen($password) >= $this->passwordLength;\n });\n }", "title": "" }, { "docid": "5f4fae1a6ee2380409af1b69767f7e86", "score": "0.5966354", "text": "function testPassword()\n\t\t{\n\t\tforeach(Person::newest() as $x)\n\t\t\t{\n\t\t\tlist($pass) = explode('@', $x->email());\n\t\t\t$p = Person::get_by_email_pass($x->email(), $pass);\n\t\t\t$this->assertType('Person', $p);\n\t\t\t$this->assertEquals($x->id, $p->id);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b31d6e7518a5e710c3884e86184db52a", "score": "0.5961768", "text": "public function check(Password $password);", "title": "" }, { "docid": "debee8649993d7b2677d3edfd88dc7fb", "score": "0.595509", "text": "public function testCreateSuperAdminCommandPasswordRequirement() {\n $this->expectException(RuntimeException::class);\n $this->artisan('super-admin:create [email protected]');\n $this->assertDatabaseMissing('users', ['role_id' => UserRole::SUPER_ADMINISTRATOR]);\n }", "title": "" }, { "docid": "bf53c976480f895b4fda803f5947108b", "score": "0.5946175", "text": "public function testFalsePassword()\n {\n $user = User::inRandomOrder()->first();\n\n $this->post('/api/auth/login', [\n 'email' => $user->email,\n 'password' => 'SomeInvalidPassword!9'\n ]);\n\n $this->assertResponseStatus(401);\n }", "title": "" }, { "docid": "920767e7d375cfc9f0c4d3c41db094af", "score": "0.5932873", "text": "public function test_register_no_password()\n {\n $this->order->password_hash = null;\n\n $this->service->register($this->order);\n\n $this->assertNull($this->order->member_id);\n }", "title": "" }, { "docid": "fdc6015ec66def415a106eaba5274186", "score": "0.59016234", "text": "public function testGetCredentialsWhitoutPasswordInRequest() {\n\t\t$encoderFactory = new EncoderFactory([]);\n\n\t\t$request = new Request();\n\t\t$request->headers->add(['X-USERNAME' , 'ME']);\n\n\t\t$authenticator = new ApiUserPasswordAuthenticator($encoderFactory);\n\t\t$result = $authenticator->getCredentials($request);\n\n\t\t$this->assertNull($result);\n\t}", "title": "" }, { "docid": "5b4b75471089eff6126958d9c2805d69", "score": "0.5899919", "text": "public function __construct($email,$password)\n {\n $this->email=$email;\n $this->password=$password;\n }", "title": "" }, { "docid": "9153aefeda1ffd3cd8727a035a50461a", "score": "0.5899518", "text": "public function __construct( $username, $password ) {\n\t\t$this->username = $username;\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "ec38420ff8db30545300beee6189c14f", "score": "0.5898297", "text": "public function testGetAuthenticatedCredential()\n {\n }", "title": "" }, { "docid": "567d165a388b09aef18215963e93e6a9", "score": "0.58980376", "text": "public function testPasswordMatches() {\n global $testUserId1;\n $object = new User($testUserId1);\n $object->setPassword(\"abcABC123!@#\");\n $this->assertTrue($object->save());\n $this->assertTrue($object->checkPassword(\"abcABC123!@#\"));\n $this->assertFalse($object->checkPassword(\"secret\"));\n $this->assertFalse($object->checkPassword(\"\"));\n }", "title": "" }, { "docid": "f9ea4022b246d07f1d584307a1e2bac7", "score": "0.5897844", "text": "public function testLogin() {\n // create credentials\n $credentials = new stdClass();\n $credentials->username = 'alice';\n $credentials->password = '123';\n // test user\n $expected = true;\n $actual = $this->auth->isValidCredential($credentials);\n $this->assertEquals($expected, $actual);\n // test user\n $expected = false;\n $credentials->password = '234';\n $actual = $this->auth->isValidCredential($credentials);\n $this->assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "d7bf856508ea763328eb7f0a30c45005", "score": "0.5894199", "text": "function __construct($login, $password) {\n\t\t$this->credentials = base64_encode(\"{$login}:{$password}\");\n\t}", "title": "" }, { "docid": "2c6b1a59fc6c2be19bdf010f55b30e81", "score": "0.5893058", "text": "public function __construct($username, $password)\n {\n $this->username = $username;\n $this->password = $password;\n }", "title": "" }, { "docid": "343b60d5af5ecce324c4619e12bde8cc", "score": "0.589298", "text": "public function testEqualUsernamesDifferentPasswordShouldNotAuthenticateWhenFlagIsNotSet(): void\n {\n $sqlInsert = \"INSERT INTO $this->tableName (id, username, password, real_name) \"\n . \"VALUES (2, 'my_username', 'my_otherpass', 'Test user 2')\";\n $this->db->query($sqlInsert, DbAdapter::QUERY_MODE_EXECUTE);\n\n // test if user 1 can authenticate\n $this->authAdapter->setIdentity('my_username')->setCredential('my_password');\n $result = $this->authAdapter->authenticate();\n $this->assertContains('More than one record matches the supplied identity.', $result->getMessages());\n $this->assertFalse($result->isValid());\n }", "title": "" }, { "docid": "d855b7c6eb63273e278af825d3614b17", "score": "0.5890889", "text": "public function testCreateAccountFail() {\n $acct = Account::create(array(\"username\" => \"test\", \n \"password\" => \"testpass\",\n \"password_confirmation\" => \"wrong\"));\n $this->assertNull($acct);\n }", "title": "" }, { "docid": "f2a4410768934cbf7e9988a40bcbcc3c", "score": "0.5887694", "text": "public function testPasswordHashAndFailVerify(): void\n {\n $this->assertFalse(self::$password->verify('otherpassword', self::$password->hash('password')));\n }", "title": "" }, { "docid": "f1c509e93d2609caa08914692a658f90", "score": "0.5876282", "text": "public function setPassword($value);", "title": "" }, { "docid": "6b81589438bb34c7b2fe86cfe93799a5", "score": "0.5875367", "text": "abstract protected function passwordField();", "title": "" }, { "docid": "4d83f2c561327ebdf6d1183c543790f6", "score": "0.5856982", "text": "public function setPlainPassword($password);", "title": "" }, { "docid": "4d83f2c561327ebdf6d1183c543790f6", "score": "0.5856982", "text": "public function setPlainPassword($password);", "title": "" }, { "docid": "f723e452fce0cc8d1024622ce09e2a0b", "score": "0.5833935", "text": "public function __construct(\n string $username = null,\n string $password = null\n ) {\n $this->username = $username;\n $this->password = $password;\n }", "title": "" }, { "docid": "72d3e60f183726812f2bbf792aabee42", "score": "0.5824299", "text": "public function __construct($email, $password)\t{\n\t\t$this->_email = $email;\n\t\t$this->_password = $password;\n\t}", "title": "" }, { "docid": "6bf001069e7ae0a72aaca50512285d0e", "score": "0.58047503", "text": "public function __construct( $old_password)\n {\n $this->old_password = $old_password;\n }", "title": "" }, { "docid": "4fb5bdab82e2b05f3606d41458b38136", "score": "0.57985824", "text": "public function __construct($username, $password) {\n if ($username && $password) {\n $this->username = $username;\n $this->password = $password;\n } else {\n throw new Exception('Invalid username and/or password');\n }\n }", "title": "" }, { "docid": "6d3d4f8b6df6f57ca19a3c3ea6db6d11", "score": "0.57979286", "text": "public function testCreateAccountNoPassword(AcceptanceTester $I)\n {\n $I->amOnPage('/user/newuser.html');\n\n // fill in user credentials\n $I->fillField('#email', '[email protected]');\n $I->fillField('#username', 'test-suername');\n $I->fillField('#password', '');\n $I->fillField('#password2', '');\n $I->fillField('#first_name', 'test');\n $I->fillField('#last_name', 'test');\n\n // submit form\n $I->click('#submit-form');\n\n // asserts\n $this->testUpperBar($I);\n $this->testLogo($I);\n $I->see('EN');\n $this->testLinksForGuest($I);\n $this->testNavBar($I);\n\n $I->seeElement('div.msg-error');\n $I->see('Please fill all the required fields', '.msg-error');\n $I->see('Password is not strong enough', '#password-error');\n\n $this->testFooter($I);\n }", "title": "" }, { "docid": "76f27231ec19b662a1951581ba5c5446", "score": "0.5780854", "text": "public function testLoginWithWrongCredentials()\n {\n $user = factory(User::class)->create(['password' => bcrypt('secret')]);\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/login')\n ->assertSee('E-Mail Address')\n ->assertSee('Password')\n ->type('email', $user->email)\n ->type('password', 'wrong password')\n ->press('Login')\n ->assertSee('These credentials do not match our records.');\n });\n }", "title": "" }, { "docid": "f576bb94d5f726442cce11377d698936", "score": "0.5780819", "text": "public function testNullPassword()\n {\n $testPostData = [\n 'user' => [\n 'first_name' => 'John',\n 'last_name' => 'Smith',\n 'email' => '[email protected]',\n 'password' => ''\n ]\n ];\n\n $userController = new \\JosJobs\\Controllers\\User(\n $this->authentication,\n $this->jobsTable,\n $this->usersTable,\n [],\n $testPostData\n );\n\n $this->assertEquals(\n $userController->saveUpdate()['template'],\n '/admin/users/update.html.php'\n );\n }", "title": "" }, { "docid": "858ba87eb20e75cf5f90635efc4a4e70", "score": "0.5779127", "text": "public function testConstructorArguments()\n {\n global $databaseConfig;\n $newProxy = new DebugBarDatabaseNewProxy($databaseConfig);\n $this->assertInstanceOf('DBConnector', $newProxy->getConnector());\n }", "title": "" }, { "docid": "81f7fe550b305e9700a9d6fa4cdeee76", "score": "0.5777287", "text": "public function __construct($name, $password)\n {\n $this->parameters = ['name' => $name, 'password' => $password];\n\n $this->rules([\n 'name' => ['required', 'string'],\n 'password' => ['required', 'string']\n ]);\n }", "title": "" }, { "docid": "7cc023af18d485be200814c0307f5fe5", "score": "0.5770496", "text": "public function should_return_422_response_code_when_password_not_provided()\n {\n $response = $this->call('POST', '/v1/users', [\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => '[email protected]',\n 'password_confirmation' => 'secret123'\n ]);\n\n $this->assertEquals(HttpStatus::UNPROCESSABLE_ENTITY, $response->status());\n $this->seeJsonContains([\n 'password' => ['The password field is required.']\n ]);\n }", "title": "" }, { "docid": "90079db974b2e01f1266fde3b059f915", "score": "0.57688826", "text": "public function __construct($userName, $password, $database) {\n\t\t$this->userName = $userName;\n\t\t$this->password = $password;\n\t\t$this->database = $database;\n\t}", "title": "" }, { "docid": "285bf920b6dae34dd0df42b194598105", "score": "0.5761046", "text": "public function testLoginWithWrongPasswordFails()\n\t{\n\t\t$user = new User;\n\t\t$user->firstname = \"John\";\n\t\t$user->lastname = \"Doe\";\n\t\t$user->email = \"[email protected]\";\n\t\t$user->licence = \"Blabla\";\n\t\t$user->birthday = \"2012-12-12\";\n\t\t$user->password = Hash::make(\"Password1\"); // crypt password\n\t\t$user->country = \"CH\";\n\n\t\t// User should save\n\t\t$this->assertTrue($user->save());\n\n\t\t// should login\n\t\t$credentials = array(\n\t\t\t'email' => '[email protected]',\n\t\t\t'password' => 'Password2',\n\t\t);\n\n\t\t$this->assertFalse(Auth::user()->attempt($credentials));\n\t}", "title": "" }, { "docid": "7f686cb4598f0df971d193a9a55b57db", "score": "0.5752682", "text": "public function setValidPassword() {\n //check if we have a password\n if ($this->getUserPassword()) {\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n } else {\n //check if the object is new\n if ($this->getId() === NULL) {\n //new object set a random password\n $this->setRandomPassword();\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n }\n }\n }", "title": "" }, { "docid": "634901388cad05ca1db67ef0e027299a", "score": "0.5742627", "text": "function __construct($api_usercode, $api_password, $dropship_password=FALSE) {\n $this->api_usercode = $api_usercode;\n $this->api_password = $api_password;\n if($dropship_password) {\n $this->dropship_password = $dropship_password;\n $this->dropship_enabled = TRUE;\n }\n }", "title": "" }, { "docid": "ee3b77a5ef132fb856203d7306ff4863", "score": "0.5741963", "text": "public function testRegisterUserWithoutPassword()\n {\n $fakeUser = new User();\n $fakeUser\n ->setFirstName('FakeFirstName')\n ->setLastName('FakeLastName')\n ->setPassword('')\n ->setEmail('[email protected]');\n\n // Check if error occured\n $this->errorNavigation(\n $fakeUser,\n $this->translator->trans('password should not be blank', [], 'validators')\n );\n }", "title": "" }, { "docid": "805dabafcf5431570a76efe074f2897c", "score": "0.57368463", "text": "public function testGenerateThrowsExceptionForEmptyLengthParameter()\n {\n $this->setExpectedException('InvalidArgumentException');\n\n $generator = new PasswordGenerator();\n $generator->generate('');\n }", "title": "" }, { "docid": "9486776d80c381a033b2695bc0f02354", "score": "0.5733063", "text": "public function password($password = null){\n\t\tif(0 === func_num_args())\n\t\t\treturn $this->password;\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "c5876ed577fc5502323b2593cf9b19d9", "score": "0.5729962", "text": "public function __construct(string $user, string $passwd)\n {\n $this->user = $user;\n $this->passwd = $passwd;\n }", "title": "" }, { "docid": "617c6a27a1c42195564bc0eefc05a5d6", "score": "0.5725648", "text": "public function test_get_lesson_user_student_with_missing_password() {\n global $DB;\n\n // Test user with full capabilities.\n $this->setUser($this->student);\n $DB->set_field('lesson', 'usepassword', 1, array('id' => $this->lesson->id));\n $DB->set_field('lesson', 'password', 'abc', array('id' => $this->lesson->id));\n\n // Lesson not using password.\n $result = mod_lesson_external::get_lesson($this->lesson->id);\n $result = external_api::clean_returnvalue(mod_lesson_external::get_lesson_returns(), $result);\n $this->assertCount(6, $result['lesson']); // Expect just this few fields.\n $this->assertFalse(isset($result['intro']));\n }", "title": "" }, { "docid": "349879ca6a6fdd04071035b949f2a6e8", "score": "0.5724877", "text": "public function testLoginWithValidCredentials()\n {\n $user = factory(User::class)->create(['password' => bcrypt('secret')]);\n\n $this->browse(function (Browser $browser) use ($user) {\n $browser->visit('/login')\n ->assertSee('E-Mail Address')\n ->assertSee('Password')\n ->type('email', $user->email)\n ->type('password', 'secret')\n ->press('Login')\n ->assertSee($user->name);\n });\n }", "title": "" }, { "docid": "06c67f55a1251c3b61c5f1455ce5efa6", "score": "0.5721393", "text": "public function __construct(string $email, string $password)\n {\n $this->email = $email;\n $this->password = $password;\n }", "title": "" }, { "docid": "8f8be514420bc4d37fcf1a6f44d66a2d", "score": "0.5711696", "text": "public function testValidateEmptyPassword() {\n\t\t$user = Sprig::factory('user');\n\t\t$values = array(\n\t\t\t'username' => 'test_user',\n\t\t\t'password' => '',\n\t\t\t'password_confirm' => '',\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t$user->check($values);\n\t\t\t$errors = array();\n\t\t}\n\t\tcatch (Validate_Exception $e)\n\t\t{\n\t\t\t$errors = $e->array->errors();\n\t\t}\n\n\t\t$this->assertArrayNotHasKey('username', $errors);\n\t\t$this->assertArrayHasKey('password', $errors);\n\t\t$this->assertContains('not_empty', $errors['password']);\n\t\t$this->assertArrayNotHasKey('password_confirm', $errors);\n\t}", "title": "" }, { "docid": "dc7877a3416f39e30c979b728062165a", "score": "0.57058144", "text": "function __construct($nombre = '', $pass = ''){\n $this->_nombre = $nombre;\n $this->_pass = $pass;\n }", "title": "" }, { "docid": "a673b47d34b84e40e85b335937c35009", "score": "0.5700283", "text": "public function testConnectionIncompleteArguments()\n {\n $this->expectException(InvalidArgumentException::class);\n $db = new Db(\n array(\n \"driver\" => \"mysql\",\n \"hostName\" => \"localhost\",\n \"databaseName\" => \"rsphp_test\",\n \"password\" => \"Sp1n4l01\"\n )\n );\n }", "title": "" }, { "docid": "1f5edc156dd857a3b4a7a17fcefbfb1d", "score": "0.5692627", "text": "public function testAuthenticateFailureInvalidCredential(): void\n {\n $this->authAdapter->setIdentity('my_username');\n $this->authAdapter->setCredential('my_password_bad');\n $result = $this->authAdapter->authenticate();\n $this->assertFalse($result->isValid());\n }", "title": "" }, { "docid": "ddd3aec6022651c95c7df339413fbe12", "score": "0.5692296", "text": "public function testLoginNoPassword()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Username')\n ->assertSee('Password')\n ->type('username', 'testuser1')\n ->type('password', '')\n ->click('button[type=\"submit\"]')\n\n // we're still on the login page\n ->assertSee('Login');\n });\n }", "title": "" }, { "docid": "48c162aea800a88e079035b014246df7", "score": "0.56877476", "text": "public function __construct($host, $user, $pass);", "title": "" }, { "docid": "1d39b9638bf03fe529f2e81bbcc0a094", "score": "0.56865036", "text": "function setPassword($password = false)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "2a9f1ed6d612680fb0b710ede362201a", "score": "0.56839633", "text": "public function testLoginAuthenticationWithPasswordNull()\n {\n $user = User::factory()->create();\n\n $this->assertDatabaseHas($user->getTable(), $user->toArray());\n \n $response = $this->post(route('login'), [\n 'email' => $user->email,\n 'password' => null,\n 'recaptcha_token' => true,\n ]);\n\n $response->assertSessionHasErrors(['password']);\n }", "title": "" } ]
27168a6668555d2d06bc7b4e58b0710e
Indicates whether the configuration attribute exists.
[ { "docid": "d26f19c78480fdaffd2f645c6d4f3431", "score": "0.0", "text": "public function has(string $key): bool\n {\n return \\array_key_exists($key, $this->items);\n }", "title": "" } ]
[ { "docid": "93bdcce215e5534bd9ab80946f19373d", "score": "0.7562506", "text": "private function has_attribute($attribute) {\n // Will return true or false\n return array_key_exists($attribute, $this->attributes());\n }", "title": "" }, { "docid": "98c3364a8819d966019f6d3fde5c4b2b", "score": "0.7537872", "text": "private function has_attribute($attribute) {\n // Retorna true o false\n return array_key_exists($attribute, $this->attributes());\n }", "title": "" }, { "docid": "d24d4f45962011cc60ebd2574398b4a1", "score": "0.7482374", "text": "function has($attribute) {\n return array_key_exists($attribute, $this->__attributes);\n }", "title": "" }, { "docid": "319976ed7d49a8eac8d0c969946008a4", "score": "0.7479496", "text": "private function has_attribute($attribute) {\n\t // Will return true or false\n\t return array_key_exists($attribute, $this->attributes());\n\t}", "title": "" }, { "docid": "319976ed7d49a8eac8d0c969946008a4", "score": "0.7479496", "text": "private function has_attribute($attribute) {\n\t // Will return true or false\n\t return array_key_exists($attribute, $this->attributes());\n\t}", "title": "" }, { "docid": "319976ed7d49a8eac8d0c969946008a4", "score": "0.7479496", "text": "private function has_attribute($attribute) {\n\t // Will return true or false\n\t return array_key_exists($attribute, $this->attributes());\n\t}", "title": "" }, { "docid": "7c8fa3598ac798bb94de6f1ebbfc50f0", "score": "0.74552226", "text": "private function has_attribute($attribute) {\n\t return array_key_exists($attribute, $this->attributes());\n\t}", "title": "" }, { "docid": "083bb521c5522b35213082f3ec1bbb30", "score": "0.7442919", "text": "public function hasAttribute()\n\t{\n\t\treturn isset($this->attribute);\n\t}", "title": "" }, { "docid": "359f8f7b065bd484048843253edec8a7", "score": "0.74035764", "text": "private function has_attribute($attribute){\n // Will return true or false\n return array_key_exists($attribute, $this->attributes());\n }", "title": "" }, { "docid": "43b13d087e593486f18e04fea3090623", "score": "0.73960173", "text": "public function attrExists(string $attrName): bool;", "title": "" }, { "docid": "5027cf2b97f9f032d5bee8fa005ace82", "score": "0.738214", "text": "private function has_attribute($attribute) {\n // Will return true or false\n return array_key_exists($attribute, $this->get_attributes());\n }", "title": "" }, { "docid": "cf7866ff10152c3ba1d51b94512346e9", "score": "0.7329305", "text": "public function hasAttribute($attribute)\n {\n return array_key_exists($attribute, $this->attributes);\n }", "title": "" }, { "docid": "5f7b7fc95235f85d876c57e75a77fe48", "score": "0.7301284", "text": "public function hasAttr($attr) {\n\t\treturn isset($this->_attributes[$attr]);\n\t}", "title": "" }, { "docid": "7a0bc03d41826bdd8d35e649ec9d70cb", "score": "0.7259699", "text": "protected function has_attribute($attribute) {\n // Will return true or false\n return array_key_exists($attribute, $this->get_attributes());\n }", "title": "" }, { "docid": "941400fa13f1abbb1dc0ab689da980c3", "score": "0.72186565", "text": "private function has_attribute($attribute){\n $object_vars = $this->attributes();\n return array_key_exists($attribute, $object_vars);\n }", "title": "" }, { "docid": "dfeac9d46a78998f9e5b0e800ac5a9db", "score": "0.7179542", "text": "private function has_attribute($attribute){\n $object_vars = get_object_vars($this);\n //we don't care about the value, we just want to know if the array_key_exists()\n //will return 'true' or 'false'\n return array_key_exists($attribute, $object_vars);\n }", "title": "" }, { "docid": "ce639e9eb7771c83b2e5714e0733042f", "score": "0.7179437", "text": "public function hasAttribute($name) {\n return (bool)array_key_exists($name, $this->attributes);\n }", "title": "" }, { "docid": "d6aed342a7fbb14ccec778a780db1e8c", "score": "0.71561223", "text": "private function has_attribute($attribute){\n\t\t\t$object_vars = $this->attributes();\n\t\t\treturn array_key_exists($attribute, $object_vars);\n\t\t}", "title": "" }, { "docid": "7d47de0c45641b49a3d9581f60589df8", "score": "0.7144427", "text": "public function isAttributeExist($name)\n {\n return array_key_exists($name, $this->attribbutes);\n }", "title": "" }, { "docid": "2df471f8608415c9a8666bf0647ffd12", "score": "0.714432", "text": "public function hasAttribute(string $key): bool\n {\n return isset($this->attributes[$key]);\n }", "title": "" }, { "docid": "0b5faaa4cec4add296f30f76fa2f0540", "score": "0.7143392", "text": "public function hasAttribute($name)\n {\n return array_key_exists($name, $this->attributes);\n }", "title": "" }, { "docid": "373d2db3330a040df26bc1c27f7f006a", "score": "0.7097373", "text": "public function hasAttribute($name)\n {\n return $this->attributes->offsetExists($name);\n }", "title": "" }, { "docid": "7fcdc99e7050ccc339dcaa752815ef88", "score": "0.7096621", "text": "protected function hasAttribute($attribute) {\n\t\t$objectVars = $this->attributes();\n\t\treturn array_key_exists($attribute, $objectVars);\n\t}", "title": "" }, { "docid": "af4574c096a044eb867838926ea28a2f", "score": "0.70945513", "text": "public function hasAttribute($name) {\n return $this->offsetExists($name);\n }", "title": "" }, { "docid": "41b323bf12a80ee7e83266b8ae69df67", "score": "0.70851195", "text": "public function isFieldConfigurationAttribute($attributeKey)\n {\n return array_key_exists($attributeKey, $this->fieldConfiguration);\n }", "title": "" }, { "docid": "3d80136a6a43bbd21af729d919fac7fa", "score": "0.7037134", "text": "function hasConfiguration() {\r\n\t\treturn file_exists($this->_configurationFile);\r\n\t}", "title": "" }, { "docid": "3f815fb1b9ce99f29375351ba07c598a", "score": "0.7035695", "text": "public function __isset($attribute) {\n return isset($this->attributes[$attribute]);\n }", "title": "" }, { "docid": "526f036b3be2f811d84afdc08b5e2c3d", "score": "0.70278805", "text": "function hasAttribute( $attr )\n {\n return in_array( $attr, $this->attributes() );\n }", "title": "" }, { "docid": "e58d82eb1b5ac96a05bf1bc309eeb50e", "score": "0.7011221", "text": "private function has_attribute($attribute)\n\t{\n\t\t$object_vars=get_object_vars($this);\n\t\t//return true or false\n\t\treturn array_key_exists($attribute,$object_vars);\n\t}", "title": "" }, { "docid": "447b4b74732ab65ad44ab0c94405b7f0", "score": "0.7003807", "text": "private function has_attribute($attribute) {\r\n\t\t$object_vars = get_object_vars($this);\r\n\t\treturn array_key_exists($attribute, $object_vars);\r\n\t}", "title": "" }, { "docid": "14dc418b1cef0fa8855d95645ab99aca", "score": "0.7002187", "text": "private function hasAttribute($attribute)\r\n {\r\n //(Including Private ones) as the Key and their Current Values as the Value.\r\n $companyObjectProperties = get_object_vars($this);\r\n\r\n //We don't Care About the Value, We Just Want to Know if the Key Exists\r\n //Will Return True or False\r\n return array_key_exists($attribute, $companyObjectProperties);\r\n }", "title": "" }, { "docid": "5513ee69887e66bf49eb20ce90526e37", "score": "0.7001324", "text": "public function hasAttr($name)\n {\n return array_key_exists($name, $this->attrList);\n }", "title": "" }, { "docid": "627f4db7095190da490ff773b1aa5702", "score": "0.7001023", "text": "private function has_attribute($attribute) {\r\n // (incl. private ones!) as the keys and their current values as the value\r\n $object_vars = get_object_vars($this);\r\n // We don't care about the value, we just want to know if the key exists\r\n // Will return true or false\r\n return array_key_exists($attribute, $object_vars);\r\n }", "title": "" }, { "docid": "7db47a71558ea518ec76b5f750236cf2", "score": "0.69996846", "text": "public function __isset($attribute)\n {\n return $this->has($attribute);\n }", "title": "" }, { "docid": "c66b21c7f3d2c66302228e5c3e6ff256", "score": "0.69908476", "text": "public function issetAttribute(string $key): bool\n {\n return isset($this->attributes[$key]) || parent::issetAttribute($key);\n }", "title": "" }, { "docid": "591c23b958959b6ffb88889471e7e74c", "score": "0.6986519", "text": "public function hasConfigid(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "12fa94225fa0b02a7cc94ec54cca561b", "score": "0.69733274", "text": "public function hasConfigid(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "8ec51bacd32a7100be7ccb3d5c1305a3", "score": "0.69630605", "text": "public function has($attribute) {\n $isset = isset($this->attributes->$attribute);\n return $isset;\n }", "title": "" }, { "docid": "00f83fd5b6a03df390cab12a909409cf", "score": "0.6962212", "text": "public function hasConfiguration()\n\t{\n\t\treturn method_exists( $this, 'configuration' );\n\t}", "title": "" }, { "docid": "e263e2de6701be5c7d7028d582212522", "score": "0.69380456", "text": "private function has_attribute($attribute) {\r\n\t // (incl. private ones!) as the keys and their current values as the value\r\n\t $object_vars = get_object_vars($this);\r\n\t // We don't care about the value, we just want to know if the key exists\r\n\t // Will return true or false\r\n\t return array_key_exists($attribute, $object_vars);\r\n }", "title": "" }, { "docid": "19df53aa54bc395b6d3e2fcb6e70de8f", "score": "0.69347286", "text": "public function hasAttribute($name): bool\n {\n return \\array_key_exists($name, $this->attributes);\n }", "title": "" }, { "docid": "5c9bf575ad2bc0d6df061bd6db5b1872", "score": "0.69287705", "text": "public function hasAttr($attr) {\n return $this->$attr;\n }", "title": "" }, { "docid": "bce30b5e5102a72e492025ec74f97bdd", "score": "0.69281137", "text": "function propertyExists($attribute, $property) {\n return array_key_exists($attribute, $this->__attributes)\n && array_key_exists($property, $this->__attributes[$attribute]);\n }", "title": "" }, { "docid": "8716c3e8167fd0e2afe09f2416bb15b7", "score": "0.6925832", "text": "public function has($attribute)\n {\n return isset($this->attributes[$attribute]);\n }", "title": "" }, { "docid": "b3c2afaa2aac917941f10fc727fd8b9e", "score": "0.6923638", "text": "public function has_config() {\n return true;\n }", "title": "" }, { "docid": "b3c2afaa2aac917941f10fc727fd8b9e", "score": "0.6923638", "text": "public function has_config() {\n return true;\n }", "title": "" }, { "docid": "b45806d37574c66acff5d10e5e3309d5", "score": "0.6921492", "text": "public function __isset($attr)\n {\n return isset($this->info[$attr]);\n }", "title": "" }, { "docid": "4ff0cd5e5384d5d8108fb4fd1ef881c1", "score": "0.692006", "text": "public function __isset($attribute)\n {\n if (isset($this->attributes[$attribute])) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5265714be432776a66fb4fe6a1aa0560", "score": "0.69196165", "text": "public function has(string $attributeKey) : bool\n {\n return (bool) $this->getAttribute($attributeKey);\n }", "title": "" }, { "docid": "29a31b1fc29782b02709baf5b655625c", "score": "0.69119024", "text": "public function hasAttribute($name)\n\t{\n\t\treturn ( $name != '' ) and isset( $this->attributes[ $name ] );\n\t}", "title": "" }, { "docid": "ae47add5e5862e2f20d02fc276a2b928", "score": "0.68952954", "text": "public function hasAttribute($name)\n {\n return $this->attributes->has($name);\n }", "title": "" }, { "docid": "d373436cf92b0dec86bb91600a32d937", "score": "0.6880835", "text": "public function exists($attr)\n {\n $attr = $this->getAttrName($attr);\n return array_key_exists($attr, $this->_attributes);\n }", "title": "" }, { "docid": "0691f343ca4ca87ccf59b2c5d92a5448", "score": "0.6880411", "text": "public function hasAttributes(): bool\n {\n return isset($this->_attributes);\n }", "title": "" }, { "docid": "aa814cebf27bf12ab2f48f0634cb6a2e", "score": "0.6830131", "text": "public function hasConfigid(){\n return $this->_has(5);\n }", "title": "" }, { "docid": "c70bc12fced89f15af36494153b0bffb", "score": "0.68246084", "text": "public function hasAttribute($name)\n {\n return isset($this->attributes[$name]) || in_array($name, $this->attributes(), true);\n }", "title": "" }, { "docid": "9e06cdba2b40565b7f6c1977b8078d8c", "score": "0.68183684", "text": "public function __isset($name) {\n $attribute = $this->$name;\n\n if (empty($attribute)) {\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "30895dfa9f5907552d4ceba1d456d058", "score": "0.68087864", "text": "public function has( string $key ) : bool\n {\n return array_key_exists($key, $this->attributes);\n }", "title": "" }, { "docid": "a805b53c9dcc257ad14e41c338fefaa4", "score": "0.6799263", "text": "public function hasAttribute(string $name): bool {\n return array_key_exists($name, $this->properties);\n }", "title": "" }, { "docid": "b3837a36c259798b375bc8ee4966875a", "score": "0.6798113", "text": "public function has_config() {\n return false;\n }", "title": "" }, { "docid": "b3837a36c259798b375bc8ee4966875a", "score": "0.6798113", "text": "public function has_config() {\n return false;\n }", "title": "" }, { "docid": "b3837a36c259798b375bc8ee4966875a", "score": "0.6798113", "text": "public function has_config() {\n return false;\n }", "title": "" }, { "docid": "70a4c54884a68087607d8c97057cdd1a", "score": "0.67745113", "text": "function has_attribute($name)\n {\n return $this->node->hasAttribute($name);\n }", "title": "" }, { "docid": "0a3fbb0fcf88a0e1c49e6bfd33fc48c7", "score": "0.6742528", "text": "protected function _configExists(){\r\n return file_exists($this->_getConfigFile());\r\n }", "title": "" }, { "docid": "678fb0e2eae7523ce8608b4227ce60aa", "score": "0.6730552", "text": "public function has($key)\n {\n return array_key_exists($key, $this->_config);\n }", "title": "" }, { "docid": "0ec7d0a6bbd30c36fe3e2c8a06210375", "score": "0.6728514", "text": "public function isAttribute($key)\n {\n return $this->getMetadata()->hasAttribute($key);\n }", "title": "" }, { "docid": "74b87d2bb420bf6720af8d78345e67a3", "score": "0.6713811", "text": "public function __isset($attr)\n {\n return isset($this->_data[$attr]);\n }", "title": "" }, { "docid": "420e0a04a5f0586b38dd405db98738fd", "score": "0.6711313", "text": "public function hasAttribute($key)\n {\n if (phpCAS::isAuthenticated()) {\n return phpCAS::hasAttribute($key);\n }\n\n return false;\n }", "title": "" }, { "docid": "94e4a2b2779e4b70a81ca548f7604947", "score": "0.67082924", "text": "public function IsHasAttributes(): bool\n {\n return $this->isHasAttributes;\n }", "title": "" }, { "docid": "df4cedfc4465265091587ec1c175e264", "score": "0.670145", "text": "public function __isset($name)\n\t{\n\t\treturn array_key_exists($name,$this->attributes);\n\t}", "title": "" }, { "docid": "71be925288ab18dd5f38faf09865864a", "score": "0.66784704", "text": "public function has(string $key): bool\n {\n return Arr::has($this->config, $key);\n }", "title": "" }, { "docid": "5b5f0e4ab58e435f0f5064b5cb8185ab", "score": "0.667471", "text": "public function has($name)\n {\n return array_key_exists($name, $this->config);\n }", "title": "" }, { "docid": "56d2feb7c185c186607c0b9ce8563e17", "score": "0.66569924", "text": "public function hasAttribute($name)\n {\n return $this->schema()->attributes()->has($name);\n }", "title": "" }, { "docid": "2b20ee980d874bcbf21e3e57ac0f9667", "score": "0.6644668", "text": "public function has_attribute($attribute) {\n //$object_vars = array('profile_id', 'profile_name', 'Jan', 'Mar', 'Feb', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Sum');\n //echo \"HAS ATTR\\n\";\n //var_dump($object_vars);\n //echo \"\\n////HAS ATTR\\n\\n\";\n\t return true; //array_key_exists($attribute, $object_vars);\n\t}", "title": "" }, { "docid": "c057dce5705bf2a71bd0e1aeeb7ea08e", "score": "0.6637982", "text": "public static function has_config() {\n if (self::is_active()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a7cc728a47106a24869eb8f49d9affe1", "score": "0.66257185", "text": "private function has_the_attribute($attribute)\n {\n $object_properties = get_object_vars($this);\n return array_key_exists($attribute, $object_properties);\n }", "title": "" }, { "docid": "9df0459f76b64e73107a71af0b0758b3", "score": "0.6625672", "text": "public function has($key)\n {\n return array_get($this->config, $key, false) !== false;\n }", "title": "" }, { "docid": "492b575244fac3d65ca191f9a09d38a4", "score": "0.6623394", "text": "public function hasConfig(){\n return file_exists(realpath($this->basePath.$this->sshPath.'/config'));\n }", "title": "" }, { "docid": "1213a960c299c1cb8fbce608deb9a306", "score": "0.6621064", "text": "public function __isset($key)\n\t{\n\t\treturn isset($this->attributes[$key]);\n\t}", "title": "" }, { "docid": "503d7d21ed43370c16f7632c0d9bbbcf", "score": "0.66082996", "text": "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "title": "" }, { "docid": "503d7d21ed43370c16f7632c0d9bbbcf", "score": "0.66082996", "text": "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "title": "" }, { "docid": "503d7d21ed43370c16f7632c0d9bbbcf", "score": "0.66082996", "text": "public function __isset($key)\n {\n return isset($this->attributes[$key]);\n }", "title": "" }, { "docid": "041b222098bdf11c8a405c41501da994", "score": "0.66042763", "text": "public static function exists(string $key)\n {\n return self::$attributesCacheInstance->exists($key);\n }", "title": "" }, { "docid": "268c1baa939748faae2b5420682f8443", "score": "0.65970993", "text": "public function has(string $attributeName): bool\n {\n return null !== $this->attributes && $this->attributes->has($attributeName);\n }", "title": "" }, { "docid": "a41320d8b9d88d651e07e48255f6d949", "score": "0.6590709", "text": "function __isset($attribute) {\n return $this->propertyExists($attribute, 'value')\n && $this->getPropertyFor($attribute, 'value') !== null;\n }", "title": "" }, { "docid": "3e2f7ba98b86b90179c78790260e341c", "score": "0.65781355", "text": "public function hasAttr($uid,$attr){\r\n return $this->ssdb->hexists($this->prefix.$uid,$attr);\r\n }", "title": "" }, { "docid": "797cff3d51576274f474b8dfc120f07e", "score": "0.65690595", "text": "public function __isset(string $key): bool\n {\n return $this->hasAttribute($key);\n }", "title": "" }, { "docid": "f39a37e440074ed4785a9de760038d04", "score": "0.6548842", "text": "public function __isset($key)\n {\n return isset($this->_config->$key);\n }", "title": "" }, { "docid": "5635afd4eb1b0fc82b39153812f01e11", "score": "0.6541563", "text": "public function offsetExists($key)\n {\n return array_key_exists($key, $this->attributes);\n }", "title": "" }, { "docid": "8b2cb1022bf525ef53d2a738d765661b", "score": "0.6512449", "text": "protected function _hasStoredConfigRecord()\n {\n return array_key_exists($this->getName(), $this->_getConfigRecords());\n }", "title": "" }, { "docid": "4c064b5a0cbae695db1ea33caa3cdf8a", "score": "0.6511256", "text": "protected function doesConfigurationExist() {\n\t\t$result = false;\n\n\t\tif (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'])) {\n\t\t\t$hookList = array(\n\t\t\t\t'ConfigurationReader_postProc',\n\t\t\t\t'decodeSpURL_preProc',\n\t\t\t\t'encodeSpURL_earlyHook',\n\t\t\t\t'encodeSpURL_postProc',\n\t\t\t\t'getHost',\n\t\t\t\t'storeInUrlCache',\n\t\t\t);\n\t\t\t$configurationCopy = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'];\n\t\t\tforeach ($hookList as $hook) {\n\t\t\t\tunset($configurationCopy[$hook]);\n\t\t\t}\n\n\t\t\t$result = count($configurationCopy) > 0;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9d58132a1fbd5ffe8a4628974b2133b6", "score": "0.65082276", "text": "public function exists($name)\n {\n return array_key_exists($name, $this->config);\n }", "title": "" }, { "docid": "51a774dde37a45d9d6661cf8d8d74223", "score": "0.65080184", "text": "public function exists() {\n\t\treturn static::existsInTree($this->config, static::unnestArray(func_get_args()));\n\t}", "title": "" }, { "docid": "01893422fdbb5d8509e9b8d8b1ac7fa5", "score": "0.65057987", "text": "public function hasAttribute($name)\n\t{\n\t\treturn isset($this->getMetaData()->columns[$name]);\n\t}", "title": "" }, { "docid": "e263eb2816cd8761469f7301a96714a7", "score": "0.650527", "text": "public function hasAttr($name) {\n\t\t\treturn $this->m_node->hasAttribute($name);\n\t\t}", "title": "" }, { "docid": "aa1cab64feebe92086247b90a414bcee", "score": "0.6503396", "text": "function has_config() {\n return true;\n }", "title": "" }, { "docid": "af82b380e43a6d1c6390a5af6abe35b1", "score": "0.6486058", "text": "public function attrIsSet($attrName)\n {\n if (!$this->isAttrRegistered($attrName)) {\n throw new AttributeNotRegisteredException($attrName);\n }\n return $this->isAttrAccessed($attrName) &&\n isset($this->attrsCollection[$attrName]);\n }", "title": "" }, { "docid": "5b23e549a613cb056a4aa208d6e15d2f", "score": "0.64688134", "text": "public function hasConfig()\n {\n return forward_static_call_array([Configuration::class, 'has'], func_get_args());\n }", "title": "" }, { "docid": "ac66d55f97cf6e71fe852d443c5f520c", "score": "0.6461553", "text": "public function __isset($key)\n\t{\n\t\treturn $this->hasAttribute($key);\n\t}", "title": "" }, { "docid": "372fef2f9875fe84168f6533e2da6ab4", "score": "0.645019", "text": "public function hasAttribute( $name )\n {\n return isset( $this->FieldList[$name] );\n }", "title": "" }, { "docid": "8f90b92e881cad1d10680d9c44970244", "score": "0.64393926", "text": "public function hasAttribute($attr)\n {\n return in_array($attr, $this->getFillable());\n }", "title": "" }, { "docid": "8f90b92e881cad1d10680d9c44970244", "score": "0.64393926", "text": "public function hasAttribute($attr)\n {\n return in_array($attr, $this->getFillable());\n }", "title": "" } ]
914a4d5258bcc6d338484598f5b9eff4
Bind queue to exchnage
[ { "docid": "a2ff570a216ff1adc4a74cb354814c25", "score": "0.550917", "text": "public function bindQueueToExchange($routingKey = '')\n {\n $this->routingKey = $routingKey;\n\n $this->channel->queue_bind($this->queueName, $this->exchangeName, $routingKey);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "64ef306f6916825dfea0a0496d599579", "score": "0.7877677", "text": "public function bindQueue($queue): Queue;", "title": "" }, { "docid": "6993c916728c20521a1503a04db9e981", "score": "0.7403355", "text": "public function bindQueue(QueueBind $to): void;", "title": "" }, { "docid": "0cc34999f5776b759fbc0c96e21f6f0d", "score": "0.70187175", "text": "function __construct($queue = 'taken from default_binding directive') {}", "title": "" }, { "docid": "5db13e7f681d61c19471e4655edda1b5", "score": "0.69751614", "text": "public function queue_bind($queue, $exchange, $routing_key=\"\",\r\n $nowait=false, $arguments=null, $ticket=null)\r\n {\r\n $arguments = $this->getArguments($arguments);\r\n $ticket = $this->getTicket($ticket);\r\n\r\n $args = $this->frameBuilder->queueBind($queue, $exchange, $routing_key, $nowait, $arguments, $ticket);\r\n\r\n $this->send_method_frame(array(50, 20), $args);\r\n\r\n if (!$nowait) {\r\n return $this->wait(array(\r\n \"50,21\" // Channel.queue_bind_ok\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "0fc4e07e7dab42a3006362f7dad42ec3", "score": "0.686367", "text": "public function bindQueue(string $queue, string $exchange, string $routing_key = ''):void\n {\n $this->channel->queue_bind($queue, $exchange, $routing_key);\n }", "title": "" }, { "docid": "707b9acf92c4404b3100c0f5f6320872", "score": "0.6762908", "text": "public function queue_bind($queue, $exchange, $routing_key=\"\",\n $nowait=false, $arguments=NULL, $ticket=NULL)\n {\n if($arguments == NULL)\n $arguments = array();\n\n $args = new AMQPWriter();\n if($ticket != NULL)\n $args->write_short($ticket);\n else\n $args->write_short($this->default_ticket);\n $args->write_shortstr($queue);\n $args->write_shortstr($exchange);\n $args->write_shortstr($routing_key);\n $args->write_bit($nowait);\n $args->write_table($arguments);\n $this->send_method_frame(array(50, 20), $args);\n\n if(!$nowait)\n return $this->wait(array(\n \"50,21\" // Channel.queue_bind_ok\n ));\n }", "title": "" }, { "docid": "e1a3fa0fce91434978bee79759f732f9", "score": "0.64939755", "text": "protected function registerQueuing()\n {\n $this->app->bindShared('queuing', function ($app) {\n $queue = $app['queue'];\n $jobprovider = $app['jobprovider'];\n $driver = $app['config']['queue.default'];\n\n return new Classes\\Queuing($queue, $jobprovider, $driver);\n });\n }", "title": "" }, { "docid": "34950c293b25b2ec1cc1f0baebe45811", "score": "0.6488754", "text": "public function setQueue($queue);", "title": "" }, { "docid": "ffb86487a3e001288e93cfd639cd9219", "score": "0.6447635", "text": "protected function registerQueueIronCommand()\n {\n $this->app->bindShared('command.queueiron', function ($app) {\n return new Commands\\QueueIron();\n });\n }", "title": "" }, { "docid": "31571152077b1cc6e264196c20ecc0c8", "score": "0.6286296", "text": "function queue()\n{\n return container('queue');\n}", "title": "" }, { "docid": "8bfe7a64fe1244035ddb9a81241406c5", "score": "0.62667847", "text": "public function __construct()\n {\n $this->_queue = array();\n }", "title": "" }, { "docid": "7f8c198fa8ef9039868c48c7997201d7", "score": "0.61277276", "text": "public function listen($queue)\n {\n while (true) {\n $job = $this->client->pop($queue, $queue . '-processing', \\App::config('queueing.wait'));\n if ($job != null) {\n $data = $this->client->parseJob($job);\n $delay = $data->delay - time();\n if ($delay > 0) {\n $this->client->push($queue, json_encode($data));\n \\Dispatcher::now('queue-push', ['queue' => $queue, 'job' => $job]);\n } else {\n $attempts = 0;\n do { \n $status = $this->process($data); \n if ($status) {\n $this->client->success($queue, json_encode($data));\n \\Dispatcher::now('queue-job-status', ['queue' => $queue, 'job' => $job, 'status' => 1]);\n break;\n } else {\n $attempts++;\n \\Dispatcher::now('queue-job-status', ['queue' => $queue, 'job' => $job, 'status' => 2]);\n } \n } while($attempts < $data->tries);\n if ($attempts == $data->tries) {\n \\Dispatcher::now('queue-job-status', ['queue' => $queue, 'job' => $job, 'status' => 3]);\n $this->client->failed($queue . '-failed', json_encode($data));\n }\n }\n }\t\t\t\n }\n }", "title": "" }, { "docid": "5343c676c8452fb919f0d4c5550ff1d6", "score": "0.6123984", "text": "public function bind($exchange_name, $routing_key) {}", "title": "" }, { "docid": "bb483ae37350a28ff5e08f6622778cd6", "score": "0.60514003", "text": "function setQueue($val)\n\t { $this->queue=$val;}", "title": "" }, { "docid": "988badfb6599e72574ebccb0e211db17", "score": "0.60222995", "text": "public function publishToQueue()\n {\n $dispatcher->dispatch(\"some-exchange\", new Amqp\\PublishEvent());\n $dispatcher->dispatch(\"some-queue\", new Amqp\\PublishEvent());\n }", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.59908885", "text": "public function getQueue();", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.59908885", "text": "public function getQueue();", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.59908885", "text": "public function getQueue();", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.59908885", "text": "public function getQueue();", "title": "" }, { "docid": "55a9701eefa21674a5b12342a67ac90b", "score": "0.59908885", "text": "public function getQueue();", "title": "" }, { "docid": "19e9955fe68ccc66061a90f79edf0560", "score": "0.59663177", "text": "final public function fireQueue(SplPriorityQueue $queue, \\Psr\\Http\\Message\\RequestInterface $event): AliasedManagerInterface\n {\n }", "title": "" }, { "docid": "276dd698de43afed34f38afcfcab1c76", "score": "0.5930366", "text": "public function queue($name = '');", "title": "" }, { "docid": "85515add742664390cc1fc6a1c8aa7db", "score": "0.58937943", "text": "public function setName($queue_name) {}", "title": "" }, { "docid": "57bb345845e5b28612ae61704b4a8e0e", "score": "0.5878522", "text": "public function setQueue(QueueInterface $queue);", "title": "" }, { "docid": "57bb345845e5b28612ae61704b4a8e0e", "score": "0.5878522", "text": "public function setQueue(QueueInterface $queue);", "title": "" }, { "docid": "57bb345845e5b28612ae61704b4a8e0e", "score": "0.5878522", "text": "public function setQueue(QueueInterface $queue);", "title": "" }, { "docid": "3421a5f293143dabd4344e5fae0a06c7", "score": "0.58588487", "text": "protected function registerQueueClearCommand()\n {\n $this->app->bindShared('command.queueclear', function ($app) {\n return new Commands\\QueueClear();\n });\n }", "title": "" }, { "docid": "79ae5767335b58619d5a22c35a5f7205", "score": "0.577455", "text": "public function __construct(Queue $queue)\n {\n $this->queue = $queue;\n }", "title": "" }, { "docid": "79ae5767335b58619d5a22c35a5f7205", "score": "0.577455", "text": "public function __construct(Queue $queue)\n {\n $this->queue = $queue;\n }", "title": "" }, { "docid": "7b97e6d286263e8cfc550b334169312d", "score": "0.57639444", "text": "public function dequeue () {}", "title": "" }, { "docid": "4985e298048f900ea85e127cc06947dc", "score": "0.5723372", "text": "public function toQueue()\n {\n self::add($this);\n }", "title": "" }, { "docid": "9f45f76def84b02c9899c66640d33e73", "score": "0.57012403", "text": "public function consume(Queue $queue, array $options = []);", "title": "" }, { "docid": "d0e4bc01329d9dc9cfd78643f61b85e7", "score": "0.5695052", "text": "public function getQueue(): QueueInterface;", "title": "" }, { "docid": "c0e19a09e24933389f90ed5c551dbd02", "score": "0.5662932", "text": "public function newQueue($queue){\n $this->addArgument(new YsArgument($queue, false));\n return $this;\n }", "title": "" }, { "docid": "3ef5b9b30c5d0643caf45d92466212cf", "score": "0.56487644", "text": "public function __construct()\n {\n $this->_queue = new _HttpPostRequestQueue();\n }", "title": "" }, { "docid": "462fce0504a0452c5625df86683d122b", "score": "0.5631168", "text": "public function __construct($options, Zend_Queue $queue = null) {\n if (!extension_loaded('amqp')) {\n require_once 'Zend/Queue/Exception.php';\n throw new Zend_Queue_Exception('amqp extension does not appear to be loaded');\n }\n\n parent::__construct($options, $queue);\n\n $driverOptions = $this->_options['driverOptions'];\n $host = $driverOptions['host'];\n\n $this->_connection = new AMQPConnection($driverOptions);\n $result = $this->_connection->connect();\n if ($result === false) {\n throw new Zend_Queue_Exception(\"Could not connect to amqp({$host})\");\n }\n \n $this->_channel = new AMQPChannel($this->_connection);\n \n // 创建交换机\n $exchange = new AMQPExchange($this->_channel);\n $exchange->setName($this->_options['exchangeName']);\n $exchange->setType(AMQP_EX_TYPE_DIRECT);\n $exchange->setFlags(AMQP_DURABLE | AMQP_AUTODELETE); // 交换器进行持久化,即 RabbitMQ 重启后会自动重建\n\n if (method_exists($exchange, 'declareExchange')) {\n $exchange->declareExchange();\n } else {\n $exchange->declare();\n }\n\n $this->_exchange = $exchange;\n }", "title": "" }, { "docid": "34cd17b1c798d41cbc285ff0434ab0b2", "score": "0.5607081", "text": "public function register(): void\n {\n // connection, as that is enough for our purposes.\n $this->container->singleton(Factory::class, function (Container $container) {\n return new QueueFactory(function () use ($container) {\n return $container->make('flarum.queue.connection');\n });\n });\n\n // Extensions can override this binding if they want to make Flarum use\n // a different queuing backend.\n $this->container->singleton('flarum.queue.connection', function (ContainerImplementation $container) {\n $queue = new SyncQueue;\n $queue->setContainer($container);\n\n return $queue;\n });\n\n $this->container->singleton(ExceptionHandling::class, function (Container $container) {\n return new ExceptionHandler($container['log']);\n });\n\n $this->container->singleton(Worker::class, function (Container $container) {\n /** @var Config $config */\n $config = $container->make(Config::class);\n\n $worker = new Worker(\n $container[Factory::class],\n $container['events'],\n $container[ExceptionHandling::class],\n function () use ($config) {\n return $config->inMaintenanceMode();\n }\n );\n\n $worker->setCache($container->make('cache.store'));\n\n return $worker;\n });\n\n // Override the Laravel native Listener, so that we can ignore the environment\n // option and force the binary to flarum.\n $this->container->singleton(QueueListener::class, function (Container $container) {\n return new Listener($container->make(Paths::class)->base);\n });\n\n // Bind a simple cache manager that returns the cache store.\n $this->container->singleton('cache', function (Container $container) {\n return new class($container) implements CacheFactory {\n public function __construct(\n private readonly Container $container\n ) {\n }\n\n public function driver(): Repository\n {\n return $this->container['cache.store'];\n }\n\n // We have to define this explicitly\n // so that we implement the interface.\n public function store($name = null): mixed\n {\n return $this->__call($name, null);\n }\n\n public function __call(string $name, ?array $arguments): mixed\n {\n return call_user_func_array([$this->driver(), $name], $arguments);\n }\n };\n });\n\n $this->container->singleton('queue.failer', function () {\n return new NullFailedJobProvider();\n });\n\n $this->container->alias('flarum.queue.connection', Queue::class);\n\n $this->container->alias(ConnectorInterface::class, 'queue.connection');\n $this->container->alias(Factory::class, 'queue');\n $this->container->alias(Worker::class, 'queue.worker');\n $this->container->alias(Listener::class, 'queue.listener');\n\n $this->registerCommands();\n }", "title": "" }, { "docid": "58699f75d591017daa91b58cb3864044", "score": "0.55986595", "text": "public function bind(string $exchangeName, string $routingKey = '', array $arguments = []): void;", "title": "" }, { "docid": "3be4bd91740aa170385c803993b64a0d", "score": "0.5597579", "text": "public function __construct()\n {\n $this->queue = 'slack';\n }", "title": "" }, { "docid": "9e08af8b8db8eb3d5d611c7c8c139ba9", "score": "0.5596932", "text": "public function __construct()\n {\n parent::__construct();\n // $this->queue_name = $queue_name;\n }", "title": "" }, { "docid": "19c20204349c482619d58c20ce2c16aa", "score": "0.55837464", "text": "public function __construct()\n {\n $this->queue = 'notifications';\n }", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "7f9a9e93babd9120d8b8e012a881ee2b", "score": "0.5583335", "text": "public function enqueue() {}", "title": "" }, { "docid": "21dbcca85af084d8b252364c49ef0595", "score": "0.55761474", "text": "public function queue(Queue $queue, $command)\n {\n $queue->pushOn('fixhub-high', $command);\n }", "title": "" }, { "docid": "0503c9530bc06b8e19acaf8eb1904c24", "score": "0.5565116", "text": "public function refreshQueue()\n\t{\n\t\t$this->queue = $this->getQueue();\n\t}", "title": "" }, { "docid": "5644a8c77db21b45f7d43ea107ac8827", "score": "0.5556019", "text": "public function listen()\n {\n $this->open();\n $callback = function (AMQPMessage $payload) {\n list($ttr, $message) = explode(';', $payload->body, 2);\n if ($this->handleMessage(null, $message, $ttr, 1)) {\n $payload->delivery_info['channel']->basic_ack($payload->delivery_info['delivery_tag']);\n }\n };\n $this->channel->basic_qos(null, 1, null);\n $this->channel->basic_consume($this->queueRightNow, '', false, false, false, false, $callback);\n while (count($this->channel->callbacks)) {\n $this->channel->wait();\n }\n }", "title": "" }, { "docid": "e133684f9a6c4793336c86094b596056", "score": "0.55443513", "text": "public function queueEvent($event);", "title": "" }, { "docid": "2c819b5a9fc6b0917bb4720656226171", "score": "0.5489539", "text": "public function getQueueName() {\n return $this->queueName;\n}", "title": "" }, { "docid": "ed34e51598035a00a769d87f50dddbde", "score": "0.5477389", "text": "public function getQueue()\n {\n return $this->queue;\n }", "title": "" }, { "docid": "ed34e51598035a00a769d87f50dddbde", "score": "0.5477389", "text": "public function getQueue()\n {\n return $this->queue;\n }", "title": "" }, { "docid": "ed34e51598035a00a769d87f50dddbde", "score": "0.5477389", "text": "public function getQueue()\n {\n return $this->queue;\n }", "title": "" }, { "docid": "6aaadfabe59e76660c98ba6d487bb922", "score": "0.54761887", "text": "public function handle(InterestQueue $queue)\n {\n $this->info('Interest queue listener :: Started');\n $scope = $this;\n\n $callback = function(AMQPMessage $msg) use ($scope, $queue) {\n $scope->info('Message received from queue: ' . $msg->body);\n $inputArr = json_decode($msg->body, true);\n\n try {\n $scope->dispatch(new CalculateInterest($inputArr['sum'], $inputArr['days']));\n } catch (\\Exception $e) {\n $this->error(\n sprintf(\n 'Dispatching calculate interest job failed for message: %s, error => %s',\n $msg->body, $e->getMessage()\n )\n );\n\n //Send no acknowledgments back to the message queue\n return;\n }\n\n //Tell message queue server that message was received\n $queue->getChannel()->basic_ack($msg->delivery_info['delivery_tag']);\n };\n\n try {\n $queue->listenQueue($callback);\n } catch (\\Exception $e) {\n $this->error('Error during queue message fetch -> error : ' . $e->getMessage());\n }\n\n $this->info('Interest queue listener :: Shutdown');\n }", "title": "" }, { "docid": "1f8c4dd0f4ee72615e53463dfdb2ec2d", "score": "0.5467274", "text": "public function getQueue()\n {\n return Mage::registry('current_queue');\n }", "title": "" }, { "docid": "8ed5dc38b79640ed1b926611afe36b4f", "score": "0.5463291", "text": "public function bind($response) {\n\t\t$this->_response = $response;\n\t\t$this->_response->headers += $this->_headers;\n\n\t\tforeach ($this->_queue as $message) {\n\t\t\t$this->_write($message);\n\t\t}\n\t}", "title": "" }, { "docid": "6bada01d612be090bdbe3a0455075e71", "score": "0.54600775", "text": "public function define()\n {\n $this->addQueue('events_queue', 'consumeDomainEvent');\n }", "title": "" }, { "docid": "3b70830224af4be12d98ab41f851fc74", "score": "0.5459647", "text": "public function basicPublish() {\n if($this->message == null) return null;\n $this->setConnection();\n\n try {\n $this->channel = $this->connection->channel();\n\n $this->channel->queue_declare(\n $this->channelProperties['queue.name'], #queue - Queue names may be up to 255 bytes of UTF-8 characters\n $this->channelProperties['passive'], #passive - can use this to check whether an exchange exists without modifying the server state\n $this->channelProperties['durable'], #durable, make sure that RabbitMQ will never lose our queue if a crash occurs - the queue will survive a broker restart\n $this->channelProperties['exclusive'], #exclusive - used by only one connection and the queue will be deleted when that connection closes\n //$this->channelProperties['auto_delete'] #auto delete - queue is deleted when last consumer unsubscribes\n false\n );\n\n $this->channel->basic_publish(\n $this->message, #message \n '', #exchange\n $this->channelProperties['queue.name'] #routing key (queue)\n );\n $this->channel->close();\n $this->connection->close(); \n } catch (Exception $ex) {\n\n }\n\n}", "title": "" }, { "docid": "562b0e65a428601a0b0b535844518839", "score": "0.54461944", "text": "public function disableQueue() : void\n {\n $this->useQueue = false;\n }", "title": "" }, { "docid": "ba1e8c81087e4784423c1fc8d860bd63", "score": "0.54447955", "text": "public function tick(Queue $queue, array $options = []);", "title": "" }, { "docid": "7da4c2bbc2e8d6b2bf4b37ad31a1b746", "score": "0.5442782", "text": "public function listQueues()\n {\n }", "title": "" }, { "docid": "a8d465ce9dddad4e39cf9ab7b972baa4", "score": "0.54393715", "text": "public function RobotFindCompanyWebsiteQueue() \n {\n \n $conn = new AMQPConnection(config(\"app.cloudampq_host\"), config(\"app.cloudampq_port\"), config(\"app.cloudampq_user\"), config(\"app.cloudampq_pw\"), config(\"app.cloudampq_user\")); \n $ch = $conn->channel();\n \n $ch->queue_declare('robotqueue', false, true, false, false);\n \n $msg_body = '{ \"source_id\":1, \"company_name\":\"'.$this->argument(\"company_name\").'\" }';\n $msg = new AMQPMessage($msg_body, array('content_type' => 'text/plain', 'delivery_mode' => 2));\n // print $msg_body;\n $ch->basic_publish($msg,'','robotqueue');\n //print \"Sent\";\n }", "title": "" }, { "docid": "03a656528da8370c6a5d8a87fea99816", "score": "0.5436369", "text": "abstract public function send($data, string $queue = '');", "title": "" }, { "docid": "1e98ea8d235251a41523e91b238fb5af", "score": "0.5436164", "text": "function suspendQueue() {}", "title": "" }, { "docid": "815434e02fe67e380fd0c97fbaa7a3f2", "score": "0.5435709", "text": "public static function subscribe($exchange, $queue)\n {\n if (!$queue) {\n throw new \\InvalidArgumentException(\"queue param must be supplied\");\n }\n\n /** @var \\Redis $redis */\n $redis = self::redis();\n $redis->sadd(\"exchanges:$exchange\", $queue);\n $redis->sadd('exchanges', $exchange);\n }", "title": "" }, { "docid": "93b705b29f117addc0d96c41e01164d8", "score": "0.54325294", "text": "protected function registerQueueLengthCommand()\n {\n $this->app->bindShared('command.queuelength', function ($app) {\n return new Commands\\QueueLength();\n });\n }", "title": "" }, { "docid": "70c044eceb29ccc889a844e28a17b78c", "score": "0.5427475", "text": "public function __construct()\n {\n $this->onQueue('scheduled');\n }", "title": "" }, { "docid": "ff06d87b992e0e875956fa6e861a84b1", "score": "0.5427391", "text": "public function __construct(QueueTask $queue)\n {\n $this->queuetask = $queue;\n }", "title": "" }, { "docid": "1a232f2939e4ebb543d761e9eb3c9772", "score": "0.54271084", "text": "public function broadcastOn()\n {\n return new Channel('queue-list');\n }", "title": "" }, { "docid": "e0992586e5fae7a93f3d14a0af7a809a", "score": "0.54256815", "text": "public function setQueueName($queueName = null) {\n $this->queueName = $queueName;\n}", "title": "" }, { "docid": "9afd153021fc7433eae78925c31aa47b", "score": "0.54226536", "text": "private function queueChecks()\n {\n if ($this->queueStack)\n {\n list($method, $payload, $callback) = array_shift($this->queueStack);\n if (is_callable($callback))\n {\n $this->$method($payload, $callback);\n }\n }\n }", "title": "" }, { "docid": "9d1cdb965652bb1e4118092137716700", "score": "0.54208815", "text": "public function handle()\n {\n $this->getConnectToMq();\n //回调单一队列中\n $queue = new \\AMQPQueue($this->channel);\n $queue->setName('sms.Utalk');\n $queue->setFlags(AMQP_DURABLE);\n $queue->declareQueue();\n $queue->bind($this->exChangeName,'*.*');\n\n\t\twhile (true){\n $queue->consume(function ($envelope,$queue){\n go(function ()use($envelope,$queue){\n $message = $envelope->getBody();\n\t\t\t\t\t$queue->ack($envelope->getDeliveryTag());\n\t\t\t\t\techo $message;\n\t\t\t\t\techo date('H:i:s',time());\n\t\t\t\t\techo PHP_EOL;\n\t\t\t\t\t\n });\n });\n }\n\t\t\t\t\n\t\t\t\t\n \n }", "title": "" }, { "docid": "4a37ae2c3debde90b2f0a9d5a908515f", "score": "0.5412728", "text": "public function pop($queue = null) {}", "title": "" }, { "docid": "4e9d5f86bb5c961db6026f87b1cd2a13", "score": "0.5407161", "text": "public function queue(){\n try{\n $data = [ 'id' => self::guidv4(), 'text' =>'lumen prueba'];\n Amqp::publish('routing-key', json_encode($data) , ['queue' => 'hello']); \n return response()->json($data);\n }catch(\\Exception $e){\n return response()->json(['message' => $e->getMessage()],500);\n }\n }", "title": "" }, { "docid": "db918eb596173de0739c35471d0939f2", "score": "0.5405679", "text": "public function handle() {\n\n $connection = new AMQPConnection(config(\"app.cloudampq_host\"), config(\"app.cloudampq_port\"), config(\"app.cloudampq_user\"), config(\"app.cloudampq_pw\"), config(\"app.cloudampq_user\")); \n \n\t\t$channel = $connection->channel();\n\t\t$channel->basic_qos(null, 1, null);\n\t\t$channel->queue_declare('robot_queue_needs_career_page', false, true, false, false);\n\t\t$channel->basic_consume('robot_queue_needs_career_page', '', false, false, false, false, array($this,'mqCallback'));\n\n\t\twhile(count($channel->callbacks)) {\n\t\t\t$channel->wait();\n\t\t}\n }", "title": "" }, { "docid": "2e521a9efe9c3b9769a7cda494d520d5", "score": "0.5374717", "text": "protected function _touchQueue() {\n\t\t$errno = $errstr = '';\n\t\t$params = array();\n\t\t$paramString = http_build_query($params);\n\t\tif ( !$fp = fsockopen($_SERVER['HTTP_HOST'], 80, $errno, $errstr, 30) ) {\n\t\t\tthrow new Exception(\"Socket error: {$errstr}\");\n\t\t}\n\t\t$dir = array_pop(explode('/', realpath(ROOTDIR)));\n\t\t$content = array(\n\t\t\t\t\"POST /{$dir}/visit/handlequeue HTTP:/1.1\",\n\t\t\t\t\"Host: {$_SERVER['HTTP_HOST']}\",\n\t\t\t\t\"Content-Type: application/x-www-form-urlencoded\",\n\t\t\t\t\"Content-Length: \" . strlen($paramString),\n\t\t\t\t\"Connection: Close\",\n\t\t\t\t\"\",\n\t\t\t\t$paramString\n\t\t);\n\t\t$content = implode(\"\\r\\n\", $content);\n\t\tfwrite($fp, $content);\n\t\tfclose($fp);\n\t}", "title": "" }, { "docid": "80aa24067f6b6ceda8c844517a074be9", "score": "0.5374264", "text": "public function bind();", "title": "" }, { "docid": "74ee3480dd6210cee6ef796736781d95", "score": "0.5364313", "text": "public function listen() : void { \n $connection = new AMQPStreamConnection\n ( \n getenv('RMQHOST'),\n getenv('RMQPORT'),\n getenv('RMQUSER'),\n getenv('RMQPASSWORD')\n );\n \n $channel = $connection->channel();\n \n $channel->queue_declare(\n self::RMQQUEUE, #queue\n false, #passive\n true, #durable, make sure that RabbitMQ will never lose our queue if a crash occurs\n false, #exclusive - queues may only be accessed by the current connection\n false #auto delete - the queue is deleted when all consumers have finished using it\n );\n \n $channel->basic_qos(\n null, #prefetch size - prefetch window size in octets, null meaning \"no specific limit\"\n 1, #prefetch count - prefetch window in terms of whole messages\n null #global - global=null to mean that the QoS settings should apply per-consumer, global=true to mean that the QoS settings should apply per-channel\n );\n \n $channel->basic_consume(\n self::RMQQUEUE, #queue\n '', #consumer tag - Identifier for the consumer, valid within the current channel. just string\n false, #no local - TRUE: the server will not send messages to the connection that published them\n false, #no ack, false - acks turned on, true - off. send a proper acknowledgment from the worker, once we're done with a task\n false, #exclusive - queues may only be accessed by the current connection\n false, #no wait - TRUE: the server will not respond to the method. The client should not wait for a reply method\n array($this, 'processPayment') #callback\n );\n \n \n while (count($channel->callbacks)) {\n $channel->wait();\n }\n \n $channel->close();\n $connection->close();\n }", "title": "" }, { "docid": "3bca3e213a8fcab3b471a013f2de4aba", "score": "0.5351529", "text": "public function onQueue($queue)\n {\n $this->job->onQueue($queue);\n\n return $this;\n }", "title": "" }, { "docid": "08a4f1d7b25a0941b40e9057b1903a78", "score": "0.53346306", "text": "public function queueName($queueName){\n $this->addArgument(new YsArgument($queueName));\n return $this;\n }", "title": "" }, { "docid": "1cfe13fceda7cddff29d3a292767496f", "score": "0.5328874", "text": "function m_transinqueue($conn)\n{\n}", "title": "" }, { "docid": "d00200188527aa66dc48899a5983b3e6", "score": "0.5316664", "text": "public function getQueueName(): string;", "title": "" }, { "docid": "57dd49a659a3f7d8023edf4550ae7527", "score": "0.53119284", "text": "public function received(Mage_Newsletter_Model_Queue $queue)\n {\n $this->getResource()->received($this,$queue);\n return $this;\n }", "title": "" }, { "docid": "c0b65f5d692241fb09e09f8c0d49bacb", "score": "0.53012973", "text": "public function pop($queue = null)\n {\n }", "title": "" }, { "docid": "c0b65f5d692241fb09e09f8c0d49bacb", "score": "0.53012973", "text": "public function pop($queue = null)\n {\n }", "title": "" }, { "docid": "9ff604e70c37a936ea28d42e46bd4f89", "score": "0.5289776", "text": "public function on($connections, $queue)\n\t{\n\t\t$this->app['rocketeer.rocketeer']->setConnections($connections);\n\n\t\t$queue = (array) $queue;\n\t\t$queue = $this->buildQueue($queue);\n\n\t\treturn $this->run($queue);\n\t}", "title": "" }, { "docid": "b23c6da03114e4db56df02a1eeafc6cb", "score": "0.5286803", "text": "public function boot()\n\t{\n\n\n\n\t\t\t\n\n\t\tQueue::failing(function (JobFailed $event) {\n\t\t\t// $event->connectionName\n\t\t\t// $event->job\n\t\t\t// $event->exception\n\t\t\t\n\t\t\tLog::error('Job Failed : '.json_encode($event->job).' with exception : '.json_encode($event->exception));\n\n\t\t}); \n\n\n\t\t// Queue::before(function (JobProcessing $event) {\n\t\t// \n\t\t//\t // $event->connectionName\n\t\t// // $event->job\n\t\t// // $event->job->payload()\n\t\t// });\n\n\t\tQueue::after(function (JobProcessed $event) {\n\n\t\t\t// $event->connectionName\n\t\t\t// $event->job\n\t\t\t// $event->job->payload()\n\t\t\t// Log::info('Job Completed : job : resolviName '.var_dump( $event->job->resolveNmae()));\n\t\t\t// Log::info('Job Completed : job : getName '.var_dump( $event->job->getName()));\n\t\t\t$job_queue = $event->job->getQueue();\n\t\t\tLog::info('Job Completed : job : getQueue '.var_dump($job_queue));\n\t\t\t// $job_payload = $event->job->payload();\n\t\t\t// Log::info('Job Completed : job : payload '.var_dump($job_payload));\n\t\t\t// Log::info('Job Completed : job : payload : data '.var_dump($job_payload['data']));\n\t\t\t// Log::info('Job Completed : job : payload : data : commandName '.var_dump($job_payload['data']['commandName']));\n\t\t\t// $command = $job_payload['data']['command'];\n\t\t\t// Log::info('Job Completed : job : payload : data : command '.var_dump($command));\n\t\t\t// Log::info('Job Completed : job : payload : data : command : postition 150'.var_dump(substr($command, 153, -89)));\n\t\t\t// $command_unserialized = unserialize($job_payload['data']['command']);\n\t\t\t// Log::info('Job Completed : job : payload : data : command : model '.var_dump($command_unserialized));\n\t\t\t// Log::info('Job Completed : job : payload : data : command : model '.var_dump($command_unserialized->opruut));\n\t\t\t\n\t\t\tif ($job_queue === 'opruut_processing') {\n\t\t\t\t$job_payload = $event->job->payload();\n\t\t\t\t$command = $job_payload['data']['command'];\n\t\t\t\t$opruut_id = substr($command, 153, -89);\n\t\t\t\tLog::info('Job Completed : job : payload : data : command : postition 150'.$opruut_id);\n\n\t\t\t\t// find the opruut results asscosiated with the opruut\n\t\t\t\t$opruut = OpruutRequest::with(['user' => function($q1) { \n\t\t\t\t\n\t\t\t\t\t$q1->select('id', 'name', 'username', 'avatar'); \n\t\t\t\t\n\t\t\t\t}, 'opruut_results'=> function($q2) { \n\t\t\t\t\n\t\t\t\t\t$q2->orderBy('rank')->select('opruut_request_id', 'stations', 'routes', 'rank', 'station_count', 'interchanges', 'travel_distance', 'travel_time', 'time_factor', 'comfort_factor'); \n\n\t\t\t\t}])\n\t\t\t\t->select('id', 'user_id', 'source', 'source_id', 'destination', 'destination_id', 'preference', 'city', 'cityImg', 'ride_time', 'created_at')\n\t\t\t\t->find(intval($opruut_id));\n\t\t\t\t\n\t\t\t\t// broadcast request calculated to the requested user\n\t\t\t\tbroadcast(new OpruutCalculated($opruut));\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "title": "" }, { "docid": "eb0386cc00ed6c953a295f981293fa56", "score": "0.5282491", "text": "public function getQueueByName($queue);", "title": "" }, { "docid": "673da4c5c1131c1b888566303e2e4e3b", "score": "0.526952", "text": "public static function dispatchToQueue($command){\n return \\Illuminate\\Bus\\Dispatcher::dispatchToQueue($command);\n }", "title": "" }, { "docid": "24b5eba36cf9d5a45c28eae69e37cf9a", "score": "0.5263268", "text": "public function queue($ts = null);", "title": "" }, { "docid": "8d15ebd0c8548c57990ff9d5df682ed1", "score": "0.5261662", "text": "public function __construct() {\n # Get the queue\n $this->queue = Queue::getQueue();\n # Now process\n $this->process();\n }", "title": "" }, { "docid": "9a7a78a34746a15732cd6dd1af295740", "score": "0.52613765", "text": "protected function registerBinding()\n {\n $ioc = $this->getContainer();\n\n // React Event loop\n $ioc->singleton(LoopInterface::class, function($ioc){\n return EventLoopFactory::create();\n });\n }", "title": "" }, { "docid": "807945c3e06015d357af3acc8ec3a3e8", "score": "0.5255978", "text": "public function handle()\n {\n// $RMQHOST = '118.69.80.100';\n// $RMQPORT = 5672;\n// $RMQUSER = 'ftpuser';\n// $RMQPASS = 'FtpFdrive@#123$';\n//\n// $connection = new AMQPStreamConnection($RMQHOST, $RMQPORT, $RMQUSER, $RMQPASS);\n// $channel = $connection->channel();\n//\n// $channel->queue_declare('hello', false, false, false, false);\n\n $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');\n $channel = $connection->channel();\n\n $channel->queue_declare('hello', false, false, false, false);\n\n $argv = [\n 'mac_address' => \"dc4f228aba7b\",\n 'home_away' => 0,\n 'alarm_doorbell' => 0,\n 'battery' => 3,\n 'arming_disarming' => 0,\n 'door_status' => 1\n ];\n\n $argv = json_encode($argv);\n// dd($argv);\n\n\n $msg = new AMQPMessage($argv);\n\n $channel->basic_publish($msg, '', 'hello');\n\n echo ' [x] Sent ', \"\\n\";\n }", "title": "" }, { "docid": "86a9e83c27a748b5290ec431dc0eac67", "score": "0.52541417", "text": "function createMQChannel($queue)\n{\n global $conn, $VHOST, $EXCHANGE;\n \n $ch = $conn->channel();\n $ch->access_request($VHOST, false, false, true, true);\n $ch->exchange_declare($EXCHANGE.\"_\".$queue, 'direct', false, false, false);\n $ch->queue_declare($queue);\n $ch->queue_bind($queue, $EXCHANGE.\"_\".$queue);\n\n return $ch;\n}", "title": "" }, { "docid": "3d06227fe36723e0b946395d48121506", "score": "0.5244676", "text": "protected function setupQueue(): void\n {\n $queueExists = $this->checkQueueExistsInCache();\n if (!$queueExists) { //queue doesn't exist - so store new empty queue first then fetch\n $this->storeQueueInCache();\n }\n $this->fetchQueuefromCache();\n }", "title": "" }, { "docid": "1eb14d7d9bad2e5aa398cf2b35708e00", "score": "0.52391994", "text": "public static function readQueue($queue_name = '') {\n $channel = $this->connection->channel();\n //$channel->queue_declare($queue_name, false, true, false, false);\n // echo \" [*] Waiting for messages. To exit press CTRL+C\\n\";\n// $callback = function ($msg) {\n// echo ' [x] Received ', $msg->body, \"\\n\";\n// };\n $channel->basic_consume($queue_name, '', false, true, false, false, $callback = '');\n while (count($channel->callbacks)) {\n $channel->wait();\n }\n $channel->close(); //closing the channel\n }", "title": "" }, { "docid": "51a89bfee93b92c1c871debe2ba78483", "score": "0.5225571", "text": "public static function queue ($config = array())\r\n\t{\r\n\t\tif (!self::$queue) {\r\n\t\t\t$className = 'Pms_Adaptor_' . ucfirst(self::$adaptor) . '_Queue';\r\n\t\t\t@require_once 'Pms/Adaptor/' . ucfirst(self::$adaptor) . '/Queue.php';\r\n\t\t\tif (!class_exists($className)) {\r\n\t\t\t\tthrow new Pms_Adaptor_Exception('Class ' . $className . 'does not exists');\r\n\t\t\t}\r\n\t\t\t$name = isset($config['name']) ? $config['name'] : '';\r\n\t\t\treturn new $className($name);\r\n\t\t}\r\n\t\treturn self::$queue;\r\n\t}", "title": "" }, { "docid": "895298d9ce5e502750efd727ba721e5c", "score": "0.522503", "text": "public function pushOn($queue, $job, $data='') \n {\n throw new Exception(\"Not implemented\");\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "e8db49ad2fd84b4289910d40f2108573", "score": "0.0", "text": "public function index()\n {\n return view('food-advice.index');\n }", "title": "" } ]
[ { "docid": "a5f21f14f06e50e6c899fc50c1823371", "score": "0.74879456", "text": "public function index()\n {\n return $this->listing();\n }", "title": "" }, { "docid": "496d5d54d7c7a7947e57216e38436eaa", "score": "0.7468056", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "5aa4c5557a26f8808de23dbd0200fb1e", "score": "0.74466366", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "eca6104bc4f03f55970223ec5e260d62", "score": "0.7404894", "text": "public function index()\n {\n $per_page = !request()->filled('per_page') ? 10 : (int) request('per_page');\n $direction = request()->query('direction');\n $sortBy = request()->query('sortBy');\n\n $query = LaporanHarian::query();\n\n $lists = $query->orderBy($sortBy, $direction)->paginate($per_page);\n\n return new ListResources($lists);\n }", "title": "" }, { "docid": "3ec6f8ee193fb6eb0e96d6d5c89ac849", "score": "0.73471534", "text": "public function index()\n {\n $resources = $this->_resourceRepo->fetchResources();\n return view('travellers-inn.admin.resource.index', compact('resources'));\n }", "title": "" }, { "docid": "7573e843d1b7cfeddf14f70707821b32", "score": "0.7309141", "text": "public function actionList()\n\t{\n\t\t$this->renderPartial('list', array(), false, true);\n\t}", "title": "" }, { "docid": "cd35602f7c25a9b8e631ce80beb8ea4d", "score": "0.72950023", "text": "public function index()\n {\n $query = $this->resourceModel::query();\n\n $this->beforeIndex($query);\n\n $query->fieldsForMasterList();\n\n $this->viewData['resourceList'] = $this->afterIndex($query->get());\n\n return view(\n \"{$this->viewBaseDir}.{$this->viewFiles['index']}\",\n $this->viewData\n );\n }", "title": "" }, { "docid": "93cf9bf71a1973929a2edbc182c4df80", "score": "0.72821164", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n // $this->crud->getListView() returns 'list' by default, or 'list_ajax' if ajax was enabled\n return view('vendor.backpack.crud.list', $this->data);\n }", "title": "" }, { "docid": "813d60bea2fa858e658620b3d43f028b", "score": "0.7278321", "text": "public function index()\n {\n $fields = $this->parseFields();\n $filter = $this->parseFilters();\n $sort = $this->parseOrders();\n $paging = $this->parsePaging();\n $data = $this->listResources($fields, $filter, $sort, $paging);\n return self::getResponse()->setHeader(DefaultController::$defaultApiHeaders)->setResType('json')->setData($data)->send();\n }", "title": "" }, { "docid": "df01f7ff8d6a105850fbefd31e546f03", "score": "0.71898794", "text": "function list() {\n\n\t\t\tif($this->listJWT) $this->requireJWT();\n\n\t\t\t//Items to show, we can define the number of items via the show query param\n\t\t\t$show = $this->request->get('show', 100);\n\t\t\t$show = $show ?: 100;\n\n\t\t\t//Pages to show, we can define the page number via the page query param\n\t\t\t$page = $this->request->get('page', 1);\n\t\t\t$page = $page ?: 1;\n\n\t\t\t//Sorting defined via the sort query param\n\t\t\t$sort = $this->request->get('sort', 'asc');\n\t\t\t$sort = $sort ?: 'asc';\n\n\t\t\t//Sort by parameter defined via the by query param\n\t\t\t$by = $this->request->get('by', 'id');\n\t\t\t$by = $by ?: 'id';\n\n\t\t\t$args = [ 'show' => $show, 'page' => $page, 'sort' => $sort, 'by' => $by, 'args' => [] ];\n\n\t\t\t//Defines if we want to fetch metas or not\n\t\t\t$fetch_metas = $this->request->get('fetch_metas');\n\t\t\tif($fetch_metas) {\n\n\t\t\t\tif($fetch_metas != 1) $fetch_metas = explode(',', $fetch_metas);\n\t\t\t\t$args['args']['fetch_metas'] = $fetch_metas;\n\t\t\t}\n\n\t\t\t//Automagically add conditions based on get params\n\t\t\tforeach($_GET as $key => $value) {\n\n\t\t\t\tif(in_array($key, $this->plural::getTableFields())) {\n\t\t\t\t\t$args['conditions'][] = \"`{$key}` = '{$value}'\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Query Fields\n\t\t\t$query_fields = $this->request->get('query_fields');\n\t\t\tif($query_fields && is_string($query_fields)) $query_fields = explode(',', $query_fields);\n\t\t\tif($query_fields) $args['query_fields'] = $query_fields;\n\n\t\t\t//Fetch\n\t\t\tforeach($_GET as $key => $value) {\n\t\t\t\tif(preg_match('/fetch_(?<entity>.*)/', $key)) {\n\t\t\t\t\t$args['args'][$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Passing args via URL\n\t\t\tif($url_args = $this->request->get('args')) {\n\n\t\t\t\t$args = array_merge($args, $url_args);\n\t\t\t}\n\n\t\t\t// Specifically passing PDO Args\n\t\t\tif($pdo = $this->request->get('pdo')) {\n\n\t\t\t\t$args['args'] = array_merge($args['args'], $pdo);\n\t\t\t}\n\n\t\t\t//$args['debug'] = 1;\n\n\t\t\t// Conditions Filter\n\t\t\t$args['conditions'] = $this->filterListConditions(get_item($args, 'conditions', []));\n\n\t\t\tif(is_array($args['conditions'])) {\n\t\t\t\t$args['conditions'] = array_filter($args['conditions']);\n\t\t\t}\n\n\t\t\t$items = $this->plural::all($args);\n\t\t\t$this->data = $items;\n\n\t\t\t$count = $this->plural::count($args['conditions'] ?? []);\n\t\t\t$pages = ceil($count / $show);\n\n\t\t\t$this->properties['current_page'] = (int) $page;\n\t\t\t$this->properties['per_page'] = (int) $show;\n\t\t\t$this->properties['last_page'] = (int) $pages;\n\t\t\t$this->properties['count'] = (int) $count;\n\t\t\t$this->properties['sort'] = $sort;\n\t\t\t$this->properties['by'] = $by;\n\t\t\t$this->properties['total'] = (int) $pages;\n\n\t\t\tif(count($items)) {\n\n\t\t\t\t$this->result = 'success';\n\t\t\t}\n\n\t\t\t$this->respond();\n\t\t}", "title": "" }, { "docid": "6dbec524e0edfa12a7b39fd3954be29e", "score": "0.7158158", "text": "public function index()\n {\n $resources = Resource::paginate(15);\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "3a75e00cbfe822ce4067afcff2f6a3d8", "score": "0.713085", "text": "public function index()\n {\n return $this->listResponse($this->model->all());\n }", "title": "" }, { "docid": "f7a87ae6c993ad3c3f6ec9da2248552a", "score": "0.7118169", "text": "public function listAction()\n {\n if (Config::get('error')) {\n return false;\n }\n $this->_template = 'ItemsList';\n Route::factory()->setAction('list');\n // Filter parameters to array if need\n Filter::setFilterParameters();\n // Set filter elements sortable\n Filter::setSortElements();\n // Check for existance\n $group = Model::getRow(Route::param('alias'), 'alias', 1);\n if (!$group) {\n return Config::error();\n }\n // Seo\n $this->setSeoForGroup($group);\n // Add plus one to views\n Model::addView($group);\n // Get items list\n $result = Filter::getFilteredItemsList($this->limit, $this->offset, $this->sort, $this->type);\n // Generate pagination\n $pager = Pager::factory($this->page, $result['total'], $this->limit)->create();\n // Render page\n $this->_content = View::tpl(['result' => $result['items'], 'pager' => $pager], 'Catalog/ItemsList');\n }", "title": "" }, { "docid": "bf1bc30233a225c042addf1175ede637", "score": "0.7110997", "text": "public function list()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "4b74341b17d61539d4d1fc0aa8693955", "score": "0.70727164", "text": "public function index()\n {\n $resources = Resource::orderBy('description')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "7e6f0d9f30924279b300346ae37d90a7", "score": "0.70637673", "text": "public function index()\n {\n $resources = Table_resources::all();\n return view(\"admin.resource.list\",['resources'=>$resources]);\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.70451564", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "d755a2c0bd42a2f83eb1df7236545733", "score": "0.7039828", "text": "public function index()\n {\n $request = app(Request::class);\n $listbuilder = app(ListBuilder::class);\n $args = $request->route()->parameters();\n\n $slug = (empty($this->slug)) ? substr($request->getPathInfo(), 1) : $this->slug;\n $list_slug = (empty($this->list_slug)) ? $slug : $this->list_slug;\n\n $collection = $this->getListQuery($request, $args);\n $total = $collection->total();\n $list_data = $this->getListData($request, $args);\n $list_class = $this->getListClass();\n\n $list = $listbuilder->build($list_class, $collection, [\n 'show_action' => false,\n 'slug' => $list_slug,\n 'data' => $list_data,\n ]);\n $filter = $this->list_filter;\n $show_add = $this->show_add;\n\n $heading = $this->getIndexBreadcrumb($request, $args, $total);\n $object_name = $this->object_name;\n\n if($request->ajax()) {\n return view($this->list_view, compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'total', 'request', 'list_data'));\n } else {\n $layout = $this->layout;\n $section = $this->section;\n $view = $this->list_view;\n return view('cms-package::default-resources.layout-extender', compact('list', 'heading', 'filter', 'show_add', 'args', 'object_name', 'layout', 'section', 'view', 'total', 'request', 'list_data'));\n }\n }", "title": "" }, { "docid": "fb3f72e030e93427b7b0611e0dd87596", "score": "0.703302", "text": "public function actionRestList()\n {\n $this->doRestList();\n }", "title": "" }, { "docid": "0efbc638dffdcac13f3ee9915260ba01", "score": "0.70070475", "text": "public function actionIndex() {\n $items = $this->getItems();\n self::ret($items);\n }", "title": "" }, { "docid": "349599c7292a71cd03fc4c4ffdd1f19b", "score": "0.70021254", "text": "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_personModel->getPersons();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "5caa574ebf95b5ac2455613f57b23c8e", "score": "0.70000875", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Aluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "ca1a292f025cf9b2b20d1b3eacf7ae21", "score": "0.6937041", "text": "public function index()\n {\n $this->pageTitle = 'Resources';\n $this->pageIcon = 'ti-folder';\n $this->icons = $this->icons();\n $this->resources = Resource::paginate(15);\n $this->trashCount = Resource::onlyTrashed()->count();\n\n return view('resource::member.index', $this->data);\n }", "title": "" }, { "docid": "b68550d3783cf092706159aad39af9a4", "score": "0.6919307", "text": "public function indexAction()\n {\n $request = $this->getRequest();\n $recordType = $request->getParam('api_record_type');\n $resource = $request->getParam('api_resource');\n $page = $request->getQuery('page', 1);\n\n $this->_validateRecordType($recordType);\n\n // Determine the results per page.\n $perPageMax = (int) get_option('api_per_page');\n $perPageUser = (int) $request->getQuery('per_page');\n $perPage = ($perPageUser < $perPageMax && $perPageUser > 0) ? $perPageUser : $perPageMax;\n\n // Get the records and the result count.\n $recordsTable = $this->_helper->db->getTable($recordType);\n $totalResults = $recordsTable->count($_GET);\n $records = $recordsTable->findBy($_GET, $perPage, $page);\n\n // Set the non-standard Omeka-Total-Results header.\n $this->getResponse()->setHeader('Omeka-Total-Results', $totalResults);\n\n // Set the Link header for pagination.\n $this->_setLinkHeader($perPage, $page, $totalResults, $resource);\n\n // Build the data array.\n $data = array();\n $recordAdapter = $this->_getRecordAdapter($recordType);\n foreach ($records as $record) {\n $data[] = $this->_getRepresentation($recordAdapter, $record, $resource);\n }\n\n $this->_helper->jsonApi($data);\n }", "title": "" }, { "docid": "1c09e7c92f1c21d273b8b885cd8bfa5f", "score": "0.6917114", "text": "public function listing()\n\t{\n\t\t/* Get request variables */\n\t\t$category = Request::getString('category', null);\n\t\t$sort = Request::getString('sort', BluApplication::getSetting('listingSort', 'date'));\n\t\t$page = Request::getInt('page', 1);\n\n\t\t/* Get parameters. */\n\t\t$total = true;\n\t\t$limit = BluApplication::getSetting('listingLength', 9);\n\t\tswitch($sort){\n\t\t\tcase 'owner':\n\t\t\t\t$function = 'Owned';\n\t\t\t\tbreak;\n\n\t\t\tcase 'title':\n\t\t\t\t$function = 'Alphabetical';\n\t\t\t\tbreak;\n\n\t\t\tcase 'comments':\n\t\t\t\t$function = 'MostCommented';\n\t\t\t\tbreak;\n\n\t\t\tcase 'votes':\n\t\t\t\t$function = 'MostVoted';\n\t\t\t\tbreak;\n\n\t\t\tcase 'views':\n\t\t\t\t$function = 'MostViewed';\n\t\t\t\tbreak;\n\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$sort = 'date';\n\t\t\t\t$function = 'Latest';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t/* Get data. */\n\t\t$itemsModel = $this->getModel('items')->set('category', $category);\n\t\t$items = $itemsModel->{'get'.$function}($this->_itemtype, ($page - 1) * $limit, $limit, $total);\n\n\t\t/* Prepare pagination */\n\t\t$pagination = Pagination::simple(array(\n\t\t\t'limit' => $limit,\n\t\t\t'total' => $total,\n\t\t\t'current' => $page,\n\t\t\t'url' => '?sort=' . urlencode($sort) . '&amp;category=' . urlencode($category) . '&amp;page='\n\t\t));\n\n\t\t/* Load template */\n\t\tinclude($this->listing_template());\n\t}", "title": "" }, { "docid": "a39f80fe6fb15777c044c4596b95aefd", "score": "0.68877596", "text": "public function index()\n {\n\t\t\t\t$Items = Resource::whereStatus(\"ACTIVE\")->get()->toArray();\n\t\t\t\t$Actions = Action::all()->toArray();\n return view('resource.index',compact(\"Items\",\"Actions\"));\n }", "title": "" }, { "docid": "4342e58d9a88e2330015685845c6b214", "score": "0.6886776", "text": "public function index()\n {\n //get all resource categories, order by name\n $categories = ResourceCategoryFacade::with('resources')->orderBy('name');\n\n PageFacade::mimic([\n 'title' => 'Resources'\n ]);\n\n return view('pilot::frontend.resources.index', compact('categories'));\n }", "title": "" }, { "docid": "e62c3e28d314d6ca7e07a98c0154e01f", "score": "0.68837804", "text": "public function index()\n {\n // get articles\n $articles= Api::paginate(10);\n\n //return collection of articles of a resource\n return ApiResource::collection($articles);\n }", "title": "" }, { "docid": "f1d6678e9ee6cd0e2aba29cc6d3a57e6", "score": "0.68760395", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('View_Rrubrique_Listing')->order('r_rub_id asc');\r\n\r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n $oMySearchEngine->findWordOn(array('r_rub_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_rub_id' => array('operator' => 'eql'),\r\n 'actif' => array('operator' => 'eql'),\r\n 'r_rub_libelle' => array('operator' => 'like'),\r\n 'r_tva_type_id' => array('operator' => 'eql'),\r\n 'r_rub_type_id' => array('operator' => 'eql')\r\n ));\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {//context csv\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Declaration of the Paginator Adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n // Pagination management\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "c04f0a07b4332dc7490328fd75b7859d", "score": "0.6873707", "text": "public function index()\n {\n // Set Pagination options\n $options = array(\n 'total_items' => {module}::count(),\n 'items_per_page' => 10,\n );\n\n $pagination = Pagination::create($options);\n\n // Get from Model\n $lists = {module}::orderBy('created_at', 'desc')\n ->take(Pagination::limit())\n ->skip(Pagination::offset())\n ->get();\n\n $this->template->title('{module} Index')\n ->set('lists', $lists)\n ->set('pagination', $pagination)\n ->view('index');\n }", "title": "" }, { "docid": "934002dc44d9e88dec4d87456bacf202", "score": "0.68607724", "text": "public function index()\n {\n //Get Cars\n $cars = Car::paginate(15);\n\n // Return Collection of cars\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "9ba180ed65da59bf2b9a95f1c09cb0ef", "score": "0.68453026", "text": "public function listAction() {\n\t\t$flexSliders = $this->flexSliderRepository->findAll();\n\n\t\t$tplObj = array(\n\t\t\t'configuration' => EmConfiguration::getConfiguration(),\n\t\t\t'data' => $this->contentObject->data,\n\t\t\t'altUid' => uniqid('alt'),\n\t\t\t'flexSliders' => $flexSliders\n\t\t);\n\t\t$this->view->assignMultiple($tplObj);\n\t}", "title": "" }, { "docid": "4b10c5eaaff873799c32bd4500119f37", "score": "0.6838356", "text": "public function index()\n {\n $inventories = Inventory::paginate();\n\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "3a4c68e643acd61065e40f913519f57a", "score": "0.6831036", "text": "public function index()\n {\n $request = $this->app->request();\n $filter = Filter::fromRequest($request);\n\n $result = $this->profiles->getAll($filter);\n\n $paging = array(\n 'total_pages' => $result['totalPages'],\n 'page' => $result['page'],\n 'sort' => 'asc',\n 'direction' => $result['direction']\n );\n\n $this->_template = 'waterfall/list.twig';\n $this->set(array(\n 'runs' => $result['results'],\n 'search' => $filter->toArray(),\n 'paging' => $paging,\n 'base_url' => 'waterfall.list',\n 'show_handler_select' => true,\n ));\n }", "title": "" }, { "docid": "874f996d6d98ea380f469ff6759de504", "score": "0.68295634", "text": "public function actionList(){\r\n\t\t$contacts = Contacts::find();\t\t\r\n\t\t\r\n\t\trender('list',array(\r\n\t\t\t'title'\t\t\t=> 'Showing all Contacts on database',\r\n\t\t\t'contacts'\t=> $contacts\t\t\r\n\t\t));\t\t\r\n\t}", "title": "" }, { "docid": "e0e7982de8f7a8c918aef7f3a34c9a7d", "score": "0.68233293", "text": "public function index()\n {\n return TierlistResource::collection(Tierlist::newly()->paginate());\n }", "title": "" }, { "docid": "e662e21bf83b7498445e86cb8e8d5a50", "score": "0.6818351", "text": "public function index()\n {\n // To make sure that we only show records of current user\n $query = $this->getModel();\n\n // Allow to filter results in query string\n $query = $this->applyQueryStringFilter($query);\n\n // If this controller is sortable\n if ($this->getOlutOptions('sortable') === true) {\n $query = $query->orderBy('order');\n }\n\n // Eager loading\n if ($prefetch = $this->getOlutOptions('prefetch')) {\n $query = $query->with($prefetch);\n }\n\n $query = $this->oulutCustomIndexQuery($query);\n\n // Pagination please\n $perPage = (int) Input::get('perPage', Config::get('view.perPage'));\n $perPage = $perPage < 0 ? 0 : $perPage;\n $items = $query->paginate($perPage);\n\n return $this->renderList($items);\n }", "title": "" }, { "docid": "26f44273688d9b90c69abab35c8e4854", "score": "0.68014055", "text": "public function index()\n {\n // $this->authorize('isAdmin');\n return ItemResource::collection(Item::latest()->get());\n }", "title": "" }, { "docid": "24c960a369d6f3101a5432770f2cc5c4", "score": "0.679412", "text": "public function listAction(){\n $this->view->role = Auth_Info::getUser()->user_type;\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';Start action');\n \n if($this->getRequest()->isGet()&&!isset($this->_input->page)){\n $this->session->removeData(self::SESSION_KEY_SEARCH);\n }\n $this->session->removeData(self::SESSION_KEY_PAGE);\n $this->session->removeData(self::SESSION_KEY_RETURN_DETAIL);\n $page = null;\n if ($this->getRequest()->isPost()) {\n $where = $this->_input->getEscaped();\n\n } else {\n $where = $this->session->getData(self::SESSION_KEY_SEARCH);\n if (is_null($where)) {\n $where = array();\n }\n $page = isset($this->_input->page) ? $this->_input->page : $this->session->getData(self::SESSION_KEY_PAGE);\n }\n $this->getRequest()->setParams($where);\n $this->session->setModuleScope(self::SESSION_KEY_SEARCH, $where);\n $this->session->setModuleScope(self::SESSION_KEY_PAGE, $page);\n\n $select = MFaqs::getInstance()->getListSelectEU($where);\n $this->view->max_display_char = Zynas_Registry::getConfig()->constants->max_display_char;\n $this->view->paginator = Zynas_Paginator::factoryWithOptions($select, $page, $this->view);\n Log::infoLog('method='.__FUNCTION__.';user_id='.Auth_Info::getUser()->user_id.';control_number'.';End action');\n }", "title": "" }, { "docid": "2bf2ec527100629f6d7d50c50d603001", "score": "0.6782772", "text": "function list() {\n /* fetches all entries in table student for listing.\n * ---------------------------------------------- */\n Debug::echo(\"GET /api/student/list\");\n \n $listAll = new ListAll();\n $listAll->main(); \n }", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6777383", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "40e0ec86808c42433eec790a68931477", "score": "0.6769896", "text": "public function indexAction() {\n\t\t$this->view->assign('resources', $this->modelReflectionService->getResources());\n\t\t$this->view->assign('routes', $this->getRoutes());\n\t}", "title": "" }, { "docid": "c972e2ad36aea9593c2ac76cbc11b8bf", "score": "0.676865", "text": "public function index()\n {\n return Restful::collection($this->getRepository()->all());\n }", "title": "" }, { "docid": "a611acae3e681926a6968198c5dab110", "score": "0.6764408", "text": "public function index()\n {\n $list = view('site.client.listing')->render();\n return $list;\n }", "title": "" }, { "docid": "602ed8dee2e015ea55511aa59ba3ed40", "score": "0.6760041", "text": "public function showList()\n {\n return view();\n }", "title": "" }, { "docid": "902d092c31e6544c2b9cf0edfb02ea3a", "score": "0.6749564", "text": "public function index()\n {\n return view('admin.listing.index')->withListings(Listing::all());\n }", "title": "" }, { "docid": "8eef2b9b847b9c58a5cfb5d664f2e780", "score": "0.67475015", "text": "public function listAction() {\n\t\tif ($this->request->hasArgument('selectedCategories')) {\n\t\t\t$selectedCategories = $this->request->getArgument('selectedCategories');\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findByCategories($selectedCategories));\n\t\t\t$this->view->assign('selectedCategories', $this->categoriesRepository->findSelectedCategories($selectedCategories));\n\t\t} else {\n\t\t\t$this->view->assign('objects', $this->exampleRepository->findAll());\n\t\t}\n\t\t$this->view->assign('arguments', $this->request->getArguments());\n\t}", "title": "" }, { "docid": "21b5c64ea30098dcc23c030c81b33431", "score": "0.67470896", "text": "public function index()\n {\n //\n\n if (Auth::user()->hasRole('Admin')) {\n $resources = MyResource::latest()->paginate(5);\n } else {\n $resources = MyResource::where('user_id', Auth::user()->id)->latest()->paginate(5);\n }\n\n return view('resources.index', compact('resources'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.674076", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "b6c185d0aed440370b1e22ff2d401da5", "score": "0.6723371", "text": "public function index()\n {\n $this->load->library('pagination');\n\n $count = $this->model->listingCount($this->listing_config);\n\n $returns = $this->paginationCompress( $this->config['page'].\"/\", $count, 15 );\n\n $data['objects'] = $this->model->listing($returns[\"per_page\"], $returns[\"segment\"],$this->listing_config);\n $data['pageVar'] = $this->config;\n $data['columns'] = $this->listing;\n $data['config'] = $this->listing_config;\n\n $this->global['pageTitle'] = $this->config['pageName'] ;\n\n $this->loadViews(\"admin/CRUD_R\", $this->global, $data, NULL);\n }", "title": "" }, { "docid": "ce95675bc5d2c976a855abe40a22da29", "score": "0.6716486", "text": "public function index()\n {\n // Get Books\n $books = Books::orderBy('created_at', 'desc') ->paginate(5);\n\n // Return collection of books as a resource\n return BooksResource::collection($books);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6708806", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "afcbd1f71b8bf87347a3fa60719ba0be", "score": "0.670403", "text": "public function index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "c2e0dc884bf03158662e5bf33ae92498", "score": "0.67032474", "text": "public function actionList()\n {\n if (!Parameters::hasParam('type'))\n throw new APIException('Invalid resource TYPE (parameter name: \\'type\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n// if (!Parameters::hasParam('devkey'))\n// throw new APIException('Invalid application DEVELOPER KEY (parameter name: \\'devkey\\')', APIResponseCode::API_INVALID_METHOD_PARAMS);\n \n $resource_type = Parameters::get('type');\n// $devkey = Parameters::get('devkey');\n \n $finder = new YiiResourceFinder($resource_type);\n// $finder->setDevKey($devkey);\n $result = $finder->findAll();\n \n $dataSet = array();\n foreach ($result as $object) {\n $dataSet[] = $object->getAttributes();\n }\n \n $format = Parameters::hasParam('format') ? Parameters::get('format') : 'json';\n $coder = ObjectCodingFactory::factory()->createObject($format);\n if ($coder === null)\n throw new APIException('Invalid Coder for format', APIResponseCode::API_INVALID_CODER);\n \n $response = $coder->encode($dataSet);\n \n echo $response;\n }", "title": "" }, { "docid": "4bc4ef9abd1fba68e2b86b542b49eca2", "score": "0.67011654", "text": "public function listAction() {\n\t\t// Preload info\n\t\t$this->view->viewer = $viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$this->view->owner = $owner = Engine_Api::_ ()->getItem ( 'user', $this->_getParam ( 'user_id' ) );\n\t\tEngine_Api::_ ()->core ()->setSubject ( $owner );\n\n\t\tif (! $this->_helper->requireSubject ()->isValid ()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Search Params\n\t\t$form = new Ynblog_Form_Search ();\n\t\t$form->isValid ( $this->_getAllParams () );\n\t\t$params = $form->getValues ();\n\t\t$params ['date'] = $this->_getParam ( 'date' );\n\t\t$this->view->formValues = $params;\n\n\t\t$params ['user_id'] = $owner->getIdentity ();\n\t\t$params ['draft'] = 0;\n\t\t$params ['is_approved'] = 1;\n\t\t$params ['visible'] = 1;\n\n\t\t// Get paginator\n\t\t$this->view->paginator = $paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$this->view->paginator = $paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "81277fc0f68d7bdc3634177cde0439a7", "score": "0.6695284", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by', 'image_id',\n ]);\n }", "title": "" }, { "docid": "7c934a7b8506c7db64d5ad367d48f525", "score": "0.6691555", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Servers list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the servers.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/servers/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Servers::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "59dfb79d5d5452f4f70e9cf4eec1e070", "score": "0.66808844", "text": "public function index()\n {\n //Get Articles\n\n $articles = Articles::paginate(15);\n\n // Return collection of articles as a resource\n return ArticlesResource::collection($articles);\n \n }", "title": "" }, { "docid": "88425de2823c6c6b170f46c36cff4af3", "score": "0.66767347", "text": "public function index()\n {\n $this->callHook('beforeIndex');\n $this->crud->hasAccessOrFail('list');\n\n $this->data[ 'crud' ] = $this->crud;\n $this->data[ 'title' ] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if ( !$this->data[ 'crud' ]->ajaxTable() ) {\n $this->data[ 'entries' ] = $this->data[ 'crud' ]->getEntries();\n }\n\n $this->callHook('afterIndex');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "345876c650e46751471c85aa681fe81d", "score": "0.66740745", "text": "public function index()\n {\n //Get employees\n $employees = Employee::Paginate(15);\n //Return Employees as collection\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "637eadb6ce19bd72fb45f6d4655ad277", "score": "0.66662973", "text": "public function listAction(){\r\n $userRepository = new \\Itb\\Model\\UserRepository();\r\n $users = $userRepository->getAll();\r\n\r\n $argsArray = ['users' => $users];\r\n $templateName = 'list';\r\n return $this->app['twig']->render($templateName . '.html.twig', $argsArray);\r\n }", "title": "" }, { "docid": "f3eff99c83c1adfe50ea93c0e478d078", "score": "0.66662085", "text": "public function index()\n {\n $students = Student::all();\n return (new StudentResourceCollection($students))->response();\n }", "title": "" }, { "docid": "4cfaa693b1306205053c160e2512565f", "score": "0.66656697", "text": "public function index()\n {\n $employees = Employee::all();\n return EmployeeForListResource::collection($employees);\n }", "title": "" }, { "docid": "f7578349cae5019055b4943e15786163", "score": "0.66614455", "text": "public function index()\n {\n //Get product\n $product = Products::paginate(15);\n \n //Return collection of product as a resource\n return ProductsResource::collection($product);\n }", "title": "" }, { "docid": "5048b1d929efd7b88543fcf092cf843a", "score": "0.6656181", "text": "public function index()\n {\n return response(\n RecipeList::all()\n );\n }", "title": "" }, { "docid": "6f716fb0d645620791c39e3c2af2b242", "score": "0.6655077", "text": "function index() {\n Event::run('system.404');\n if ( ! A2::instance()->allowed('recruit', 'manage'))\n Event::run('system.403');\n \n $this->title = 'Manage Recruitment Lists';\n $this->lists = ORM::factory('recruit_list')->get();\n }", "title": "" }, { "docid": "78496e0d8128f2673df1944c04d854e7", "score": "0.6653014", "text": "public function index()\n {\n $results = $this->Paginator->paginate($this->Results->find()->order(['created' => 'DESC']));\n $this->set(compact('results'));\n }", "title": "" }, { "docid": "a2a6ac8b209515c5bee6b4f54354fdf5", "score": "0.66505027", "text": "public function index()\n {\n return LivreResource::collection(Livre::paginate(25));\n }", "title": "" }, { "docid": "2947b2c8c3c02fb9550821c40f31fc67", "score": "0.6649302", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Roles\", \"Roles\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "726c696b08b65fb98a73b42e4ea85b29", "score": "0.66302574", "text": "public function index()\n {\n $products = Product::paginate(10);\n\n return ProductResource::collection($products);\n\n }", "title": "" }, { "docid": "c790cdb69ca9826f2d216ed3504b7bf4", "score": "0.6620371", "text": "public function list_( $args = array(), $assoc_args = array() ) {\n\n\t\t$assoc_args['all'] = 1;\n\n\t\t$this->get( $args, $assoc_args );\n\t}", "title": "" }, { "docid": "1d411fb7a37e8af4ad44010eef0ae6f9", "score": "0.66182506", "text": "public function index()\n {\n // Get the paginator using the parent API\n $paginator = $this->api()->index();\n\n // Show collection as a paginated table\n $collection = $paginator->getCollection();\n return $this->content('index', compact('paginator', 'collection'));\n }", "title": "" }, { "docid": "7d5ab4818059473cc9dd3d9aa19144cc", "score": "0.66124076", "text": "public function index()\n {\n $layanan = Layanan::paginate('15');\n return LayananResource::collection($layanan);\n }", "title": "" }, { "docid": "5284e0e8a629d94b2c297dec365035f8", "score": "0.6609162", "text": "function index(){\n\n\t\t$this->post_listing($start=0);\n\n\t}", "title": "" }, { "docid": "0b23f3dc133820a3f769ef803e71d588", "score": "0.66087896", "text": "public function listAction()\n\t{\n\t\t$module = $this->_useModules ? $this->_moduleName.'/' : '';\n\t\t\n\t\tZend_Paginator::setDefaultScrollingStyle('Sliding');\n\n\t\tZend_View_Helper_PaginationControl::setDefaultViewPartial('list.phtml');\n\n\t\t$this->_currentPage = $this->_getParam('page',1);\n\t\t$this->_currentPage = $this->_currentPage < 1 ? 1 : $this->_currentPage;\n\n\t\t$where = isset($this->_post->key) ? ($this->_post->key.\" like '%\".$this->_post->value.\"%'\") : null;\n\n\t\tif ($where == null)\n\t\t{\n\t\t\t$select = $this->_model->select()->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$select = $this->_model->select()->\t\t\n\t\t\twhere($where)->\n\t\t\torder($this->_model->getOrderField())->\n\t\t\tlimit($this->_itemsPerPage,($this->_currentPage-1)*$this->_itemsPerPage);\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$rows = $this->_model->fetchAll($select);\t\t\n\n\t\t$profile = $this->_profiler->getLastQueryProfile();\n\n\t\t$paginator = Zend_Paginator::factory($rows);\n\n\t\t$paginator->setCurrentPageNumber($thi->_currentPage)\n\t\t\t\t\t->setItemCountPerPage($this->_itemsPerPage);\n\t\t\n\t\t/** TODO get total of records for $totalOfItems \n\t\t * @var unknown_type\n\t\t */\n\t\t$totalOfItems = $this->_itemsPerPage;\n\n\t\t$this->_lastPage = (int)(($totalOfItems/$this->_itemsPerPage));\n\n\t\t$html = new Fgsl_Html();\n\n\t\t$html->addDecorator(Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\n\n\t\t$records = array();\n\n\t\t$fieldKey = $this->_model->getFieldKey();\n\n\t\t$currentItems = $paginator->getCurrentItems();\n\t\tforeach ($currentItems as $row)\n\t\t{\n\t\t\t$records[] = array();\n\t\t\t\t\n\t\t\t$id = $row->$fieldKey;\n\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldKey)] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/edit/'.$fieldKey.'/'.$id.'\">'.$id.'</a>';\n\t\t\t\t\n\t\t\tforeach ($this->_fieldNames as $fieldName)\n\t\t\t{\n\t\t\t\tif ($fieldName == $fieldKey) continue;\n\t\t\t\t$records[count($records)-1][$this->_model->getFieldLabel($fieldName)] = $row->$fieldName;\n\t\t\t}\n\t\t\t\t\n\t\t\t$records[count($records)-1]['remove'] = '<a href=\"'.BASE_URL.$module.$this->_controllerAction.'/remove/'.$fieldKey.'/'.$id.'\">X</a>';\n\t\t}\n\t\t$this->_model->setRelationships($records);\t\t\n\t\t\n\t\t$this->_table = $html->create($records,Fgsl_Html_Constants::HTML_DECORATOR_TABLE);\t\t\n\n\t\t$this->configureViewAssign();\n\t\t$this->_view->render('list.phtml');\n\t}", "title": "" }, { "docid": "25424750ec44aa26547175ff6ccff0e1", "score": "0.6605086", "text": "public function index()\n {\n $posts = Post::listAllPublished();\n\n return PostResourceListing::collection($posts)->additional(['message' => 'ok', 'success' => true]);\n }", "title": "" }, { "docid": "7848eedd65d74e3882f897e7b74ca571", "score": "0.6599999", "text": "public function apiListsAction() {\n\t\t$api = $this->_param( 'api' );\n\n\t\tif ( ! $api || ! array_key_exists( $api, Thrive_Dash_List_Manager::available() ) ) {\n\t\t\texit();\n\t\t}\n\t\t$connection = Thrive_Dash_List_Manager::connectionInstance( $api );\n\n\t\techo $this->_view( 'partials/api-lists', array(\n\t\t\t'selected_api' => $connection,\n\t\t\t'connection' => $connection,\n\t\t\t'lists' => $connection->getLists( $this->_param( 'force_fetch' ) ? false : true )\n\t\t) );\n\n\t\texit();\n\t}", "title": "" }, { "docid": "71c5dbf8452cd67d212ff39d40f0c37d", "score": "0.6597657", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "15871bf4ada7393bc878944a01d437da", "score": "0.6593232", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_role->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->load('template', 'contents', 'role/list', $data);\n\t}", "title": "" }, { "docid": "41f78864c980c5b1e66654bd42f82083", "score": "0.6593136", "text": "public function listAction ()\n {\n $lans = new Application_Model_Mapper_LansMapper();\n $currentLans = $lans->fetchCurrent();\n $comingLans = $lans->fetchComing();\n $passedLans = $lans->fetchPassed();\n $this->view->currentLans = $currentLans;\n $this->view->comingLans = $comingLans;\n $this->view->passedLans = $passedLans;\n return;\n }", "title": "" }, { "docid": "af4f1232545bca0bcf287f1972d50981", "score": "0.65861154", "text": "public function listingAction() {\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$params = $this -> _getAllParams();\n\t\t$ids = array ();\n\t\t// Do the show thingy\n\t\tif (isset($params ['by_authors'] ) && in_array('networks', $params['by_authors'])) \n\t\t{\n\t\t\t// Get an array of user ids\n\t\t\t\n\t\t\t$network_table = Engine_Api::_()->getDbtable('membership', 'network');\n \t\t$network_select = $network_table->select()->where('user_id = ?', $viewer -> getIdentity());\n \t\t$networks = $network_table->fetchAll($network_select);\n\t\t\tforeach($networks as $network)\n\t\t\t{\n\t\t\t\t$network_select = $network_table->select()->where('resource_id = ?', $network -> resource_id) -> where(\"active = 1\");\n \t\t\t$users = $network_table->fetchAll($network_select);\n\t\t\t\tforeach ( $users as $user ) {\n\t\t\t\t\t$ids [] = $user->user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (isset($params ['by_authors'] ) && in_array('professional', $params['by_authors'])) \n\t\t{\n\t\t\t$userIds = Engine_Api::_() -> user() -> getProfessionalUsers();\n\t\t\tforeach ($userIds as $id) {\n\t\t\t\t$ids [] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$params ['users'] = $ids;\n\t\t\n\t\t// Get blog paginator\n\t\t$paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $params );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\n\t\tif (isset ( $params ['page'] )) {\n\t\t\t$paginator->setCurrentPageNumber ( $params ['page'] );\n\t\t}\n\t\t$this->view->paginator = $paginator;\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\t}", "title": "" }, { "docid": "ca351a6c1fb5996a24802e4695371409", "score": "0.6585186", "text": "public function index()\n {\n $students = Student::all();\n \n return $this->sendResponse(StudentResource::collection($students), 'Students retrieved.');\n }", "title": "" }, { "docid": "ee0f12e894ffa19b553c5842d61bc92f", "score": "0.65832645", "text": "public function list()\n {\n return view('Demo::list');\n }", "title": "" }, { "docid": "ee362204073e5cbb647d776b2ab10940", "score": "0.658143", "text": "public function indexAction()\n {\n $this->display();\n }", "title": "" }, { "docid": "7e85268d6b01a017717a7d038d6b5c73", "score": "0.65808976", "text": "public function index()\n {\n $book = Book::paginate(2);\n return BookResource::collection($book);\n }", "title": "" }, { "docid": "8fd0dba76f9273c1033b432a513959af", "score": "0.6574691", "text": "public function doRestList()\n {\n $this->renderJson(array('success'=>true, 'message'=>'Records Retrieved Successfully', 'data'=>$this->getModel()->findAll()));\n }", "title": "" }, { "docid": "939f04db957f01973a6f0fa7f41c4007", "score": "0.6571416", "text": "public function index()\n {\n $cond = Resource::where('id', '>', -1);\n $resources = $cond->get();\n\n $deviceList = [];\n foreach ($resources as $resource) {\n $data = [];\n $data['id'] = $resource->id;\n $data['name'] = $resource->name;\n $data['size'] = $resource->size;\n $data['created_at'] = $resource->created_at;\n\n array_push($deviceList, $data);\n }\n\n return view('resources', array('resources' => $deviceList));\n }", "title": "" }, { "docid": "d3d661b18964ba7ea7a108ea11a1a8a3", "score": "0.6568205", "text": "public function list ()\n {\n // Récupération de TOUS les articles avec le REPOSITORY\n // 1. Récupération du repository Article\n $articleRepository = $this->getDoctrine()\n ->getRepository(Article::class);\n\n // 2. Appel à la fonction findAll\n $liste = $articleRepository->findAll();\n\n // Renvoi de la liste à la vue\n return $this->render('article/list.html.twig', [\n 'listeArticles' => $liste\n ]);\n }", "title": "" }, { "docid": "7b5e2b301434be8bca6abbff68773c36", "score": "0.6567969", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(10));\n }", "title": "" }, { "docid": "81cae78d81b024602d92e06f78dd089e", "score": "0.65645725", "text": "public function list() {\n $article = new article();\n echo \"<h2 class='text-center m-5 border-bottom border-dark pb-5'>la page qui affiche la liste des articles</h2>\";\n $articleManager = $this->getDoctrine()->getRepository(article::class);\n $articles = $articleManager->findById();\n return $this->render('listeView.html.twig', ['articles' => $articles]);\n }", "title": "" }, { "docid": "b06d85985f7ef908e89d4534e8f29c97", "score": "0.65520674", "text": "public function index()\n {\n\t\t\treturn $this->respond($this->model\n ->orderBy('created_at', 'asc')\n ->findAll());\n }", "title": "" }, { "docid": "4d53d7254450e0c10db064ccddb74ae9", "score": "0.654941", "text": "public function showAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n $renderedCaptions = $this->rendererChain->renderCaptions($list->getListHeader());\n $columnSelector = $this->columnSelectorFactory->getInstance($this->configurationBuilder);\n\n $this->view->assign('columnSelector', $columnSelector);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $renderedCaptions);\n }", "title": "" }, { "docid": "e6be331bf6ee794db504703782e4abe5", "score": "0.65450126", "text": "public function index()\n {\n $items = Item::all();\n return view('list',compact('items'));\n }", "title": "" }, { "docid": "e8f09968b69af986e66d5cd3f404f3ad", "score": "0.6535693", "text": "public static function list() {\n $data = [\n 'pages' => PageService::get()\n ];\n\n Twig::render('pillar/layouts/pillar-pages', $data);\n }", "title": "" }, { "docid": "497bb71da959ab5e52433887d4acf412", "score": "0.65246505", "text": "public function listAction()\r\n {\r\n $form_data = $this->request->getArguments();\r\n \r\n $settings = GeneralUtility::makeInstance(ConfigurationObject::class);\r\n $itemsPerPage = (int)$settings->getPaginateItemsPerPage();\r\n\r\n if($form_data) {\r\n $objects = $this->objectimmoRepository->getAllObjectsBySearch($form_data);\r\n } else {\r\n $objects = $this->objectimmoRepository->getAllObjects();\r\n }\r\n \r\n $GLOBALS['TSFE']->fe_user->setKey('ses', 'search', $form_data);\r\n \r\n $count_objects = count($objects);\r\n\r\n $this->view->assign('objects', $objects);\r\n $this->view->assign('count_objects', $count_objects);\r\n $this->view->assign('itemsPerPage', $itemsPerPage);\r\n }", "title": "" }, { "docid": "365ef354e23f522e48d950c7ede25035", "score": "0.6523006", "text": "public function listAction()\n {\n return $this->render('task/list.html.twig',\n ['tasks' => $this->getDoctrine()->getRepository('AppBundle:Task')->findAllTask()]\n );\n }", "title": "" }, { "docid": "50b4e9cfb2f2db278dc000419368b6b9", "score": "0.6520663", "text": "public function index()\n {\n //Using Eloquent to get all the news in latest order. This is wil expose all the data\n //return Questions::latest()->get();\n\n //Use pagination\n //return Questions::latest()->paginate(1);\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data without pagination\n //return QuestionResource::collection(Questions::latest());\n\n //Using the \"QuestionResource\" API Resource wrapper to expose only the specified data with pagination - set to return 5 items per page\n return QuestionResource::collection(Questions::latest()->paginate(5));\n\n }", "title": "" }, { "docid": "889d04be26f484433ced3afeb258119e", "score": "0.65190333", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::paginate(10));\n }", "title": "" }, { "docid": "4ba8a9b727755a6ba7f5d1c4a619aff0", "score": "0.65160906", "text": "public function index()\n {\n return ReadingListBookResource::collection(ReadingListBook::all());\n }", "title": "" } ]
426871030124d056d94e7c255be80828
Clean email addresses Validates and cleans email addresses for proper format.
[ { "docid": "28c142077b10d3c3118f25aa263769e3", "score": "0.666842", "text": "public function clean_email($email)\r\n\t{\r\n\t\t$email = urldecode($email);\r\n\t\t$email = trim($email);\r\n\r\n\t\tif(strpos($email, \"@\") != strrpos($email, \"@\") || strpos($email, \"@\") == -1)\r\n\t\t{\r\n\t\t\ttrigger_error(\"Invalid email address\", E_USER_NOTICE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$at_pos = strpos($email, \"@\");\r\n\t\t$dot_pos = strrpos($email, \".\");\r\n\r\n\t\tif(preg_match(\"/0x0D|0x0A|[^a-zA-Z0-9_\\-\\.@]/\", $email))\r\n\t\t{\r\n\t\t\ttrigger_error(\"Invalid email address\", E_USER_NOTICE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif($at_pos+2 > $dot_pos || $at_pos < 2 || $dot_pos > strlen($email)-2)\r\n\t\t{\r\n\t\t\ttrigger_error(\"Invalid email address\", E_USER_NOTICE);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn $email;\r\n\t}", "title": "" } ]
[ { "docid": "39a14f576a572859723069908d488ff0", "score": "0.6890162", "text": "function clean_email($email = \"\") {\n\n\t\t$email = trim($email);\n\t\t\n\t\t$email = str_replace( \" \", \"\", $email );\n\t\t\n \t$email = preg_replace( \"#[\\;\\#\\n\\r\\*\\'\\\"<>&\\%\\!\\(\\)\\{\\}\\[\\]\\?\\\\/\\s]#\", \"\", $email );\n \t\n \tif ( preg_match( \"/^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$/\", $email) )\n \t{\n \t\treturn $email;\n \t}\n \telse\n \t{\n \t\treturn FALSE;\n \t}\n\t}", "title": "" }, { "docid": "a0ea27b99320a3b3235072b46ed59c75", "score": "0.6652544", "text": "function cleanEmail( string $email ) : string {\n\treturn \n\t\\filter_var( $email, \\FILTER_VALIDATE_EMAIL ) ? $email : '';\n}", "title": "" }, { "docid": "68a9f549cfb9ce8f3fb15ba1959731ed", "score": "0.6612324", "text": "public function sanitizeEmail($data){\n $data = filter_var($data, FILTER_SANITIZE_EMAIL);\n return $data;\n }", "title": "" }, { "docid": "3fef2b46c7774bffc550b4deac7f7033", "score": "0.65867645", "text": "function sanitizeEmail($input) {\n $_input = self::utf8_decode($input);\n return filter_var($_input, FILTER_SANITIZE_EMAIL);\n }", "title": "" }, { "docid": "f7e818c0b0f70a55fa60a355edb57177", "score": "0.6447637", "text": "static public function filterEmail(&$email){\r\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL);\r\n\t}", "title": "" }, { "docid": "b313506297c510d2873cf6c9136e2f1f", "score": "0.6428309", "text": "function check_email_address($strEmailAddress) {\n \n // If magic quotes is \"on\", email addresses with quote marks will\n // fail validation because of added escape characters. Uncommenting\n // the next three lines will allow for this issue.\n //if (get_magic_quotes_gpc()) { \n // $strEmailAddress = stripslashes($strEmailAddress); \n //}\n\n // Control characters are not allowed\n if (preg_match('/[\\x00-\\x1F\\x7F-\\xFF]/', $strEmailAddress)) {\n return false;\n }\n\n // Split it into sections using last instance of \"@\"\n $intAtSymbol = strrpos($strEmailAddress, '@');\n if ($intAtSymbol === false) {\n // No \"@\" symbol in email.\n return false;\n }\n $arrEmailAddress[0] = substr($strEmailAddress, 0, $intAtSymbol);\n $arrEmailAddress[1] = substr($strEmailAddress, $intAtSymbol + 1);\n\n // Count the \"@\" symbols. Only one is allowed, except where \n // contained in quote marks in the local part. Quickest way to\n // check this is to remove anything in quotes.\n $arrTempAddress[0] = preg_replace('/\"[^\"]+\"/'\n ,''\n ,$arrEmailAddress[0]);\n $arrTempAddress[1] = $arrEmailAddress[1];\n $strTempAddress = $arrTempAddress[0] . $arrTempAddress[1];\n // Then check - should be no \"@\" symbols.\n if (strrpos($strTempAddress, '@') !== false) {\n // \"@\" symbol found\n return false;\n }\n\n // Check local portion\n if (!$this->check_local_portion($arrEmailAddress[0])) {\n return false;\n }\n\n // Check domain portion\n if (!$this->check_domain_portion($arrEmailAddress[1])) {\n return false;\n }\n\n // If we're still here, all checks above passed. Email is valid.\n return true;\n\n }", "title": "" }, { "docid": "f2c53db1f0c8d44e879ab4baab7cef66", "score": "0.64214355", "text": "function strip_emails($string){\n\t\treturn preg_replace(\"/[^@\\s]*@[^@\\s]*\\.[^@\\s]*/\", '', $string);\n\t}", "title": "" }, { "docid": "ddf5a858fb2d789a5197defb2753f187", "score": "0.6407693", "text": "function validate_input_email($emailValue){\n // remove white spaces before and after text \n if(!empty($emailValue)){\n $trim_text = trim($emailValue);\n // remove illegal characters from text\n $sanitize_str = filter_var($trim_text, FILTER_SANITIZE_EMAIL);\n return $sanitize_str;\n }\n // if empty return empty string\n return '';\n}", "title": "" }, { "docid": "2310a9cdaa37484e05a9027998b23f45", "score": "0.6385688", "text": "public function parseTopixEmailAddresses(){\n // If there aren't any emails set, throw a fit.\n if(is_null($this->topixEmailAddresses)){\n throw new \\ErrorException('No emails have been set.');\n }\n\n // Convert to an array if necessary.\n if(is_string($this->topixEmailAddresses)){\n $this->topixEmailAddresses = explode(',', trim($topixEmailAddresses));\n }\n // Validate email addresses.\n foreach($this->topixEmailAddresses as $topixEmailAddress){\n if(!filter_var($topixEmailAddress, FILTER_VALIDATE_EMAIL)){\n throw new \\ErrorException('Not a valid email address.');\n }\n }\n }", "title": "" }, { "docid": "803339f570fec58865ffa5010bd6e5a7", "score": "0.63730025", "text": "private static function _clean_address(string $address) {\n return strtolower(filter_var($address, FILTER_SANITIZE_EMAIL));\n }", "title": "" }, { "docid": "b630c43549e9e5c1ba7b3aceaed17ca2", "score": "0.6284107", "text": "function ct_critic_sanitize_email( $input ) {\n\treturn sanitize_email( $input );\n}", "title": "" }, { "docid": "35dd2a0088ee413cf727bd1a95994f71", "score": "0.6275672", "text": "protected static function bootSanitizeEmail()\n {\n\n static::saving(function (Model $model) {\n\n if(isset($model->emailColumns) && gettype($model->emailColumns) == 'array') {\n foreach($model->emailColumns as $emailColumn){\n if(isset($model[$emailColumn]) && !is_null($model[$emailColumn])) {\n $model[$emailColumn] = ModelUtilities::sanitizeEmail($model[$emailColumn]);\n }\n }\n }\n\n });\n\n }", "title": "" }, { "docid": "8407bca4ec2f71e8f766be1f952c62f2", "score": "0.62103134", "text": "protected function doClean($values)\n {\n if (isset($values[$this->getOption('email')]))\n {\n $email = $values[$this->getOption('email')];\n if ($email != '' && $user = sfGuardUserPeer::retrieveByUsername($email))\n {\n throw new sfValidatorError($this, 'invalid');\n return $values;\n }\n }\n return $values;\n }", "title": "" }, { "docid": "df658a70e210985458458c892b54336b", "score": "0.6199039", "text": "function format_email($address) {\n\t$address = strtolower(trim($address));\n\t$address = str_replace(\"'\", \"\", $address);\n\t$address = str_replace('\"', \"\", $address);\n\t$address = preg_replace(\"/\\r/\", \"\", $address);\n\t$address = preg_replace(\"/\\n/\", \"\", $address);\n\t\n\tif (!stristr($address, \"@\")) return false;\n\tif (!stristr($address, \".\")) return false;\t\n\treturn $address;\n}", "title": "" }, { "docid": "ad400f451d02cba1ff47b7abe7e49e95", "score": "0.6151693", "text": "function _check_email_address($email) {\n $isValid = true;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex)\n {\n $isValid = false;\n }\n else\n {\n $domain = substr($email, $atIndex+1);\n $this->EE->localizeal = substr($email, 0, $atIndex);\n $this->EE->localizealLen = strlen($this->EE->localizeal);\n $domainLen = strlen($domain);\n if ($this->EE->localizealLen < 1 || $this->EE->localizealLen > 64)\n {\n // local part length exceeded\n $isValid = false;\n }\n else if ($domainLen < 1 || $domainLen > 255)\n {\n // domain part length exceeded\n $isValid = false;\n }\n else if ($this->EE->localizeal[0] == '.' || $this->EE->localizeal[$this->EE->localizealLen-1] == '.')\n {\n // local part starts or ends with '.'\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $this->EE->localizeal))\n {\n // local part has two consecutive dots\n $isValid = false;\n }\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n {\n // character not valid in domain part\n $isValid = false;\n }\n else if (preg_match('/\\\\.\\\\./', $domain))\n {\n // domain part has two consecutive dots\n $isValid = false;\n }\n else if\n (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',\n str_replace(\"\\\\\\\\\",\"\",$this->EE->localizeal)))\n {\n // character not valid in local part unless \n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$this->EE->localizeal)))\n {\n $isValid = false;\n }\n }\n /*if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")))\n {\n // domain not found in DNS\n $isValid = false;\n }*/\n }\n return $isValid;\n }", "title": "" }, { "docid": "52a2c3faaca4ce6afc19071627485900", "score": "0.60862875", "text": "private function getInvalidEmailAddress()\n {\n return [\n \"plainaddress\", \"#@%^%#$@#$@#.com\", \"@example.com\", \"Joe Smith <[email protected]>\",\n \"email.example.com\", \"email@[email protected]\", \"[email protected]\", \"[email protected]\",\n \"[email protected]\", \"あいうえお@example.com\", \"[email protected] (Joe Smith)\", \"email@example\",\n \"[email protected]\", \"[email protected]\", \"[email protected]\",\n \"[email protected]\"\n ];\n }", "title": "" }, { "docid": "b0760999866ded20dd88ab98c9b2f217", "score": "0.60711056", "text": "public function removeEmailMustMatch() {\n\t\t$this->validator()->remove('email', 'emailMustMatch');\n\t}", "title": "" }, { "docid": "5c45997ab3466f313eef17968e0b61d2", "score": "0.6042014", "text": "function smcf_validate_email($email)\n{\n $at = strrpos($email, \"@\");\n\n // Make sure the at (@) sybmol exists and \n // it is not the first or last character\n if ($at && ($at < 1 || ($at + 1) == strlen($email))) {\n return false;\n }\n\n // Make sure there aren't multiple periods together\n if (preg_match(\"/(\\.{2,})/\", $email)) {\n return false;\n }\n\n // Break up the local and domain portions\n $local = substr($email, 0, $at);\n $domain = substr($email, $at + 1);\n\n\n // Check lengths\n $locLen = strlen($local);\n $domLen = strlen($domain);\n if ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255) {\n return false;\n }\n\n // Make sure local and domain don't start with or end with a period\n if (preg_match(\"/(^\\.|\\.$)/\", $local) || preg_match(\"/(^\\.|\\.$)/\", $domain)) {\n return false;\n }\n\n // Check for quoted-string addresses\n // Since almost anything is allowed in a quoted-string address,\n // we're just going to let them go through\n if (!preg_match('/^\"(.+)\"$/', $local)) {\n // It's a dot-string address...check for valid characters\n if (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local)) {\n return false;\n }\n }\n\n // Make sure domain contains only valid characters and at least one period\n if (!preg_match(\"/^[-a-zA-Z0-9\\.]*$/\", $domain) || !strpos($domain, \".\")) {\n return false;\n } \n\n return true;\n}", "title": "" }, { "docid": "1279b27df0be3d9ce02bcc273dc59091", "score": "0.60328245", "text": "function validateEmail($email) {\r\n\t$at = strrpos($email, \"@\");\r\n\r\n\t// Make sure the at (@) sybmol exists and \r\n\t// it is not the first or last character\r\n\tif ($at && ($at < 1 || ($at + 1) == strlen($email)))\r\n\t\treturn false;\r\n\r\n\t// Make sure there aren't multiple periods together\r\n\tif (preg_match(\"/(\\.{2,})/\", $email))\r\n\t\treturn false;\r\n\r\n\t// Break up the local and domain portions\r\n\t$local = substr($email, 0, $at);\r\n\t$domain = substr($email, $at + 1);\r\n\r\n\r\n\t// Check lengths\r\n\t$locLen = strlen($local);\r\n\t$domLen = strlen($domain);\r\n\tif ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255)\r\n\t\treturn false;\r\n\r\n\t// Make sure local and domain don't start with or end with a period\r\n\tif (preg_match(\"/(^\\.|\\.$)/\", $local) || preg_match(\"/(^\\.|\\.$)/\", $domain))\r\n\t\treturn false;\r\n\r\n\t// Check for quoted-string addresses\r\n\t// Since almost anything is allowed in a quoted-string address,\r\n\t// we're just going to let them go through\r\n\tif (!preg_match('/^\"(.+)\"$/', $local)) {\r\n\t\t// It's a dot-string address...check for valid characters\r\n\t\tif (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local))\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t// Make sure domain contains only valid characters and at least one period\r\n\tif (!preg_match('/^[-a-zA-Z0-9\\.]*$/', $domain) || !strpos($domain, \".\"))\r\n\t\treturn false;\t\r\n\r\n\treturn true;\r\n}", "title": "" }, { "docid": "dc4e290a69cc8182a3ae4656f7f60d32", "score": "0.6028501", "text": "function validate_email($email, $email_errado){\n\tif(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n\t\t$email_errado = $email;\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL);\n\t}\n\t$email = preg_replace(\"/[\\/\\$&#*\\$]/\", \"\", $email);\n\t$email = str_replace('.@', '@', $email);\n\treturn $email;\n}", "title": "" }, { "docid": "d63ee557e8e8fcc2d2d930d966499e72", "score": "0.60212415", "text": "function sanitizeEmail($email){\n if (isset($email)){\n if (!filter_var($email, FILTER_VALIDATE_EMAIL)){\n return false;\n }\n else {\n return $email;\n }\n }\n else{\n return NULL;\n }\n }", "title": "" }, { "docid": "b1447a4fb825b95fb72c5a40372abc53", "score": "0.6016737", "text": "function prepare_field_email($field)\n{\n return trim(preg_replace(\"/[;,<>&=%:'“ ]/i\", \"\", $field));\n}", "title": "" }, { "docid": "efcdaf99f513e8b29e085192010920d1", "score": "0.59893465", "text": "private function checkowneremail() {\r\n\t\tif (!filter_var($this->owneremail, FILTER_VALIDATE_EMAIL) or strlen($this->owneremail) > 30) {\r\n\t\t\t$this->setAddResultRecord(\"Invalid email format.<br>\");\r\n\t\t\t$this->validated = 0;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "700fc94797a6a3b489966ec341e25a4d", "score": "0.5986483", "text": "function comprobar_email($email){\r\n $mail_correcto = 0;\r\n //compruebo unas cosas primeras\r\n if ((strlen($email) >= 6) && (substr_count($email,\"@\") == 1) && (substr($email,0,1) != \"@\") && (substr($email,strlen($email)-1,1) != \"@\")){\r\n if ((!strstr($email,\"'\")) && (!strstr($email,\"\\\"\")) && (!strstr($email,\"\\\\\")) && (!strstr($email,\"\\$\")) && (!strstr($email,\" \"))) {\r\n //miro si tiene caracter .\r\n if (substr_count($email,\".\")>= 1){\r\n //obtengo la terminacion del dominio\r\n $term_dom = substr(strrchr ($email, '.'),1);\r\n //compruebo que la terminación del dominio sea correcta\r\n if (strlen($term_dom)>1 && strlen($term_dom)<5 && (!strstr($term_dom,\"@\")) ){\r\n //compruebo que lo de antes del dominio sea correcto\r\n $antes_dom = substr($email,0,strlen($email) - strlen($term_dom) - 1);\r\n $caracter_ult = substr($antes_dom,strlen($antes_dom)-1,1);\r\n if ($caracter_ult != \"@\" && $caracter_ult != \".\"){\r\n $mail_correcto = 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if ($mail_correcto)\r\n return 1;\r\n else\r\n return 0;\r\n }", "title": "" }, { "docid": "e7c6ac43720e26d4474a68dfeefca827", "score": "0.59739286", "text": "private function sanitize($emails)\n {\n if ($emails) {\n return collect($emails)\n ->map(function ($email) {\n return [\"email\" => $email];\n })->toArray();\n }\n }", "title": "" }, { "docid": "731beedbae6e1c86748cc8619d736f35", "score": "0.5971481", "text": "private function clean_and_validate_ips( string $ips ) {\n\n\t\t$user_ips = preg_split( '/[\\ \\n\\,]+/', $ips );\n\n\t\tforeach ( $user_ips as $ip ) {\n\n\t\t\t// Remove subnet from ip if present.\n\t\t\tif ( preg_match( '~^(.+?)/([^/]+)$~', $ip, $m ) ) {\n\t\t\t\t$ip = $m[1];\n\t\t\t}\n\n\t\t\tif ( ! filter_var( $ip, FILTER_VALIDATE_IP ) ) {\n\t\t\t\tEE::error( 'Please check your list do not have any empty or wrong IP addresses.' );\n\t\t\t}\n\t\t}\n\n\t\treturn $user_ips;\n\t}", "title": "" }, { "docid": "24d5216a8837b15348e1f7ae64f29bfa", "score": "0.59391373", "text": "function correctEmailFormat($email) {\r\n $res = isset($email) && $email !== \"\";\r\n if ($res === TRUE) {\r\n $res = $res && filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }\r\n return $res;\r\n}", "title": "" }, { "docid": "2c98cf6351f6ba589de0b7f35b13921c", "score": "0.58996874", "text": "function check_email_address($email) {\r\n // First, we check that there's one @ symbol,\r\n // and that the lengths are right.\r\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\r\n // Email invalid because wrong number of characters\r\n // in one section or wrong number of @ symbols.\r\n return false;\r\n }\r\n // Split it into sections to make life easier\r\n $email_array = explode(\"@\", $email);\r\n $local_array = explode(\".\", $email_array[0]);\r\n for ($i = 0; $i < sizeof($local_array); $i++) {\r\n if\r\n (!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&\r\n ?'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\r\n $local_array[$i])) {\r\n return false;\r\n }\r\n }\r\n // Check if domain is IP. If not,\r\n // it should be valid domain name\r\n if (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\r\n $domain_array = explode(\".\", $email_array[1]);\r\n if (sizeof($domain_array) < 2) {\r\n return false; // Not enough parts to domain\r\n }\r\n for ($i = 0; $i < sizeof($domain_array); $i++) {\r\n if\r\n (!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|\r\n ?([A-Za-z0-9]+))$\",\r\n $domain_array[$i])) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "3e4a39bf191df24f81d74f2b5eab5f15", "score": "0.5898304", "text": "function parse_email($emails)\n{\n $result = array();\n $regex = '/^\\s*[\\\"\\']?\\s*([^\\\"\\']+)?\\s*[\\\"\\']?\\s*<([^@]+@[^>]+)>\\s*$/';\n if (is_string($emails))\n {\n $emails = preg_split('/[,;]\\s{0,}/', $emails);\n foreach ($emails as $email)\n {\n $email = trim($email);\n if (preg_match($regex, $email, $out))\n {\n $email = trim($out[2]);\n $name = trim($out[1]);\n $result[$email] = (!empty($name) ? $name : NULL);\n }\n else if (strpos($email, \"@\") && !preg_match('/\\s/', $email))\n {\n $result[$email] = NULL;\n } else {\n return FALSE;\n }\n }\n } else {\n // Return FALSE if input not string\n return FALSE;\n }\n return $result;\n}", "title": "" }, { "docid": "4b2071c0a1b05f7d192d880d2fc1c24d", "score": "0.58767986", "text": "public static function stripEmail( $text ) {\n return self::stripUrl((string) preg_replace (\"/\\S+@\\S+[\\ \\t\\n\\r]{1}/\" , \"\", $text));\n }", "title": "" }, { "docid": "50ef82ea9a9046d2507baa3117867301", "score": "0.58602715", "text": "function is_valid_email($email)\n{\n if(strstr($email, \"mailinator\")==true) return false;\n else if(strstr($email, \"guerrillamail\")==true) return false;\n else if(strstr($email, 'dispostable')==true)return false;\n else if(strstr($email, 'disposemail')==true)return false;\n else if(strstr($email, 'yopmail')==true)return false;\n else if(strstr($email, 'getairmail')==true)return false;\n else if(strstr($email, 'fakeinbox')==true)return false;\n else if(strstr($email, '10minutemail')==true)return false;\n else if(strstr($email, '20minutemail')==true)return false;\n else if(strstr($email, 'deadaddress')==true)return false;\n else if(strstr($email, 'emailsensei')==true)return false;\n else if(strstr($email, 'emailthe')==true)return false;\n else if(strstr($email, 'incognitomail')==true)return false;\n else if(strstr($email, 'koszmail')==true)return false;\n else if(strstr($email, 'mailcatch')==true)return false;\n else if(strstr($email, 'mailnesia')==true)return false;\n else if(strstr($email, 'mytrashmail')==true)return false;\n else if(strstr($email, 'noclickemail')==true)return false;\n else if(strstr($email, 'spamspot')==true)return false;\n else if(strstr($email, 'spamavert')==true)return false;\n else if(strstr($email, 'spamfree24')==true)return false;\n else if(strstr($email, 'tempemail')==true)return false;\n else if(strstr($email, 'trashmail')==true)return false;\n else if(strstr($email, 'easytrashmail')==true)return false;\n else if(strstr($email, 'easytrashemail')==true)return false;\n else if(strstr($email, 'jetable')==true)return false;\n else if(strstr($email, 'mailexpire')==true)return false;\n else if(strstr($email, 'emailexpire')==true)return false;\n else if(strstr($email, 'meltmail')==true)return false;\n else if(strstr($email, 'spambox')==true)return false;\n else if(strstr($email, 'tempomail')==true)return false;\n else if(strstr($email, 'tempoemail')==true)return false;\n else if(strstr($email, '33mail')==true)return false;\n else if(strstr($email, 'e4ward')==true)return false;\n else if(strstr($email, 'gishpuppy')==true)return false;\n else if(strstr($email, 'inboxalias')==true)return false;\n else if(strstr($email, 'mailnull')==true)return false;\n else if(strstr($email, 'spamex')==true)return false;\n else if(strstr($email, 'spamgourmet')==true)return false;\n else if(strstr($email, 'dudmail')==true)return false;\n else if(strstr($email, 'mintemail')==true)return false;\n else if(strstr($email, 'spambog')==true)return false;\n else if(strstr($email, 'flitzmail')==true)return false;\n else if(strstr($email, 'eyepaste')==true)return false;\n else if(strstr($email, '12minutemail')==true)return false;\n else if(strstr($email, 'onewaymail')==true)return false;\n else if(strstr($email, 'disposableinbox')==true)return false;\n else if(strstr($email, 'freemail')==true)return false;\n else if(strstr($email, 'koszmail')==true)return false;\n else if(strstr($email, '0wnd')==true)return false;\n else if(strstr($email, '2prong')==true)return false;\n else if(strstr($email, 'binkmail')==true)return false;\n else if(strstr($email, 'amilegit')==true)return false;\n else if(strstr($email, 'bobmail')==true)return false;\n else if(strstr($email, 'brefmail')==true)return false;\n else if(strstr($email, 'bumpymail')==true)return false;\n else if(strstr($email, 'dandikmail')==true)return false;\n else if(strstr($email, 'despam')==true)return false;\n else if(strstr($email, 'dodgeit')==true)return false;\n else if(strstr($email, 'dump-email')==true)return false;\n else if(strstr($email, 'email60')==true)return false;\n else if(strstr($email, 'emailias')==true)return false;\n else if(strstr($email, 'emailinfive')==true)return false;\n else if(strstr($email, 'emailmiser')==true)return false;\n else if(strstr($email, 'emailtemporario')==true)return false;\n else if(strstr($email, 'emailwarden')==true)return false;\n else if(strstr($email, 'ephemail')==true)return false;\n else if(strstr($email, 'explodemail')==true)return false;\n else if(strstr($email, 'fakeinbox')==true)return false;\n else if(strstr($email, 'fakeinformation')==true)return false;\n else if(strstr($email, 'filzmail')==true)return false;\n else if(strstr($email, 'fixmail')==true)return false;\n else if(strstr($email, 'get1mail')==true)return false;\n else if(strstr($email, 'getonemail')==true)return false;\n else if(strstr($email, 'haltospam')==true)return false;\n else if(strstr($email, 'ieatspam')==true)return false;\n else if(strstr($email, 'ihateyoualot')==true)return false;\n else if(strstr($email, 'imails')==true)return false;\n else if(strstr($email, 'inboxclean')==true)return false;\n else if(strstr($email, 'ipoo')==true)return false;\n else if(strstr($email, 'mail4trash')==true)return false;\n else if(strstr($email, 'mailbidon')==true)return false;\n else if(strstr($email, 'maileater')==true)return false;\n else if(strstr($email, 'mailexpire')==true)return false;\n else if(strstr($email, 'mailin8r')==true)return false;\n else if(strstr($email, 'mailinator2')==true)return false;\n else if(strstr($email, 'mailincubator')==true)return false;\n else if(strstr($email, 'mailme')==true)return false;\n else if(strstr($email, 'mailnull')==true)return false;\n else if(strstr($email, 'mailzilla')==true)return false;\n else if(strstr($email, 'meltmail')==true)return false;\n else if(strstr($email, 'nobulk')==true)return false;\n else if(strstr($email, 'nowaymail')==true)return false;\n else if(strstr($email, 'pookmail')==true)return false;\n else if(strstr($email, 'proxymail')==true)return false;\n else if(strstr($email, 'putthisinyourspamdatabase')==true)return false;\n else if(strstr($email, 'quickinbox')==true)return false;\n else if(strstr($email, 'safetymail')==true)return false;\n else if(strstr($email, 'snakemail')==true)return false;\n else if(strstr($email, 'sharklasers')==true)return false;\n else \n return true;\n}", "title": "" }, { "docid": "99c42c8064945e6eca878467e01d2654", "score": "0.58412963", "text": "public function clean_email($full_email = null)\n {\n if (strpos($full_email, '<') && strpos($full_email, '>')) {\n return substr($full_email, strpos($full_email, '<') + 1, (strpos($full_email, '>') - strpos($full_email, '<')) - 1);\n } else {\n return $full_email;\n }\n }", "title": "" }, { "docid": "e03aa9418faed0d3f685a37cc0566f8b", "score": "0.5812595", "text": "function validateEmail($email) {\n\t$at = strrpos($email, \"@\");\n\n\t// Make sure the at (@) sybmol exists and \n\t// it is not the first or last character\n\tif ($at && ($at < 1 || ($at + 1) == strlen($email)))\n\t\treturn false;\n\n\t// Make sure there aren't multiple periods together\n\tif (preg_match('/(\\.{2,})/', $email))\n\t\treturn false;\n\n\t// Break up the local and domain portions\n\t$local = substr($email, 0, $at);\n\t$domain = substr($email, $at + 1);\n\n\n\t// Check lengths\n\t$locLen = strlen($local);\n\t$domLen = strlen($domain);\n\tif ($locLen < 1 || $locLen > 64 || $domLen < 4 || $domLen > 255)\n\t\treturn false;\n\n\t// Make sure local and domain don't start with or end with a period\n\tif (preg_match('/(^\\.|\\.$)/', $local) || preg_match('/(^\\.|\\.$)/', $domain))\n\t\treturn false;\n\n\t// Check for quoted-string addresses\n\t// Since almost anything is allowed in a quoted-string address,\n\t// we're just going to let them go through\n\tif (!preg_match('/^\"(.+)\"$/', $local)) {\n\t\t// It's a dot-string address...check for valid characters\n\t\tif (!preg_match('/^[-a-zA-Z0-9!#$%*\\/?|^{}`~&\\'+=_\\.]*$/', $local))\n\t\t\treturn false;\n\t}\n\n\t// Make sure domain contains only valid characters and at least one period\n\tif (!preg_match('/^[-a-zA-Z0-9\\.]*$/', $domain) || !strpos($domain, \".\"))\n\t\treturn false;\t\n\n\treturn true;\n}", "title": "" }, { "docid": "03ff69e1759f66b3e265bb07a6832215", "score": "0.5802603", "text": "function check_email_address($email) {\n\t// First, we check that there's one @ symbol,\n\t// and that the lengths are right.\n\tif (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n\t\t// Email invalid because wrong number of characters\n\t\t// in one section or wrong number of @ symbols.\n\t\treturn false;\n\t}\n\t// Split it into sections to make life easier\n\t$email_array = explode(\"@\", $email);\n\t$local_array = explode(\".\", $email_array[0]);\n\tfor ($i = 0; $i < sizeof($local_array); $i++) {\n\t\tif\n\t\t\t(!ereg(\"^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$\",\n\t\t\t$local_array[$i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\t// Check if domain is IP. If not,\n\t// it should be valid domain name\n\tif (!ereg(\"^\\[?[0-9\\.]+\\]?$\", $email_array[1])) {\n\t\t$domain_array = explode(\".\", $email_array[1]);\n\t\tif (sizeof($domain_array) < 2) {\n\t\t\treturn false; // Not enough parts to domain\n\t\t}\n\t\tfor ($i = 0; $i < sizeof($domain_array); $i++) {\n\t\t\tif\n\t\t\t\t(!ereg(\"^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$\",\n\t\t\t\t$domain_array[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "731e94d6d616a6e45f92364cf884f5c5", "score": "0.5799273", "text": "function ValidateEmail($email)\n{\n\n$regex = '/([a-z0-9_.-]+)'. # name\n\n'@'. # at\n\n// There are domains containing only one character\n\n'([a-z0-9.-]+){1,255}'. # domain & possibly subdomains\n\n'.'. # period\n\n'([a-z]+){2,10}/i'; # domain extension \n\nif($email == '') { \n\treturn false;\n}\nelse {\n$eregi = preg_replace($regex, '', $email);\n}\n\nreturn empty($eregi) ? true : false;\n}", "title": "" }, { "docid": "a97fb99a14dad48ec49d569035759e50", "score": "0.57982206", "text": "function valid_email($address) {\nif (filter_var($address, FILTER_VALIDATE_EMAIL)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "7077ef37a79c622b169b89e10f0388ba", "score": "0.57927907", "text": "function validate_email ($email) {\n // @todo Remove whitespace from the user submission\n\n if( strlen($email) == 0 ) {\n return 1; // Null case\n }\n\n// Original regex\n// if ( eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $email )) {\n// return 1;\n// }\n// return 0; // e-mail address is not valid\n\n $isValid = 1;\n $atIndex = strrpos($email, \"@\");\n if (is_bool($atIndex) && !$atIndex) {\n $isValid = 0;\n }\n else {\n $domain = substr($email, $atIndex+1);\n $local = substr($email, 0, $atIndex);\n $localLen = strlen($local);\n $domainLen = strlen($domain);\n if ($localLen < 1 || $localLen > 64) {\n // local part length exceeded\n $isValid = 0;\n }\n else if ($domainLen < 1 || $domainLen > 255) {\n // domain part length exceeded\n $isValid = 0;\n }\n else if ($local[0] == '.' || $local[$localLen-1] == '.') {\n // local part starts or ends with '.'\n $isValid = 0;\n }\n else if (preg_match('/\\\\.\\\\./', $local)) {\n // local part has two consecutive dots\n $isValid = 0;\n }\n else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n // character not valid in domain part\n $isValid = 0;\n }\n else if (preg_match('/\\\\.\\\\./', $domain)) {\n // domain part has two consecutive dots\n $isValid = 0;\n }\n else if (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n // character not valid in local part unless\n // local part is quoted\n if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',\n str_replace(\"\\\\\\\\\",\"\",$local))) {\n $isValid = 0;\n }\n }\n if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\"))) {\n // domain not found in DNS\n $isValid = 0;\n }\n }\n return $isValid;\n}", "title": "" }, { "docid": "1dfe9e9139b259803b20d64021768924", "score": "0.578883", "text": "function isValidEmail($data)\n{\n return !filter_var($data, FILTER_VALIDATE_EMAIL);\n}", "title": "" }, { "docid": "96ac29d8b75cbe602c6ece74533de213", "score": "0.57784426", "text": "function valemail($raw_email){\r\n \r\n return filter_var($raw_email, FILTER_VALIDATE_EMAIL);\r\n // Validate email checks to make sure that the user entered a valid email address.\r\n}", "title": "" }, { "docid": "69bcd95551ebc491f97b430be4c74aa6", "score": "0.5774926", "text": "public function validateEmails()\n {\n $respondents = $this->Respondents->find('all')\n ->select(['id', 'email']);\n $invalidEmails = [];\n foreach ($respondents as $respondent) {\n if (! Validation::email($respondent->email)) {\n $invalidEmails[] = $respondent->email;\n }\n }\n\n $this->set(compact('invalidEmails'));\n }", "title": "" }, { "docid": "68e2cb02520f7e0a25ccf6cf622dbaab", "score": "0.5756222", "text": "function email($email, $options = null)\n {\n $check_domain = false;\n $use_rfc822 = false;\n if (is_bool($options)) {\n $check_domain = $options;\n } elseif (is_array($options)) {\n extract($options);\n }\n\n /**\n * @todo Fix bug here.. even if it passes this, it won't be passing\n * The regular expression below\n */\n if (isset($fullTLDValidation)) {\n $valid = Validate::_fullTLDValidation($email, $fullTLDValidation);\n\n if (!$valid) {\n return false;\n }\n }\n\n // the base regexp for address\n $regex = '&^(?: # recipient:\n (\"\\s*(?:[^\"\\f\\n\\r\\t\\v\\b\\s]+\\s*)+\")| #1 quoted name\n ([-\\w!\\#\\$%\\&\\'*+~/^`|{}]+(?:\\.[-\\w!\\#\\$%\\&\\'*+~/^`|{}]+)*)) #2 OR dot-atom\n @(((\\[)? #3 domain, 4 as IPv4, 5 optionally bracketed\n (?:(?:(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))\\.){3}\n (?:(?:25[0-5])|(?:2[0-4][0-9])|(?:[0-1]?[0-9]?[0-9]))))(?(5)\\])|\n ((?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?\\.)*[a-z0-9](?:[-a-z0-9]*[a-z0-9])?) #6 domain as hostname\n \\.((?:([^- ])[-a-z]*[-a-z]))) #7 TLD \n $&xi';\n \n if ($use_rfc822? Validate::__emailRFC822($email, $options) :\n preg_match($regex, $email)) {\n if ($check_domain && function_exists('checkdnsrr')) {\n list (, $domain) = explode('@', $email);\n if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {\n return true;\n }\n return false;\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7f2d20d91ef4d4eacceaf62df45ed8ef", "score": "0.5750316", "text": "public function parseEmail(): void\n {\n $this->type = self::TYPE_STRING;\n $this->example = $this->faker->safeEmail;\n }", "title": "" }, { "docid": "cfa129f30ec315126238d4cdb6085e96", "score": "0.57476175", "text": "function sanitize( $input ) {\n\t\tforeach ( $input as $k => $value ) {\n\t\t\tif ( strpos( $value, '@' !== false ) ) {\n\t\t\t\t$input[$k] == sanitize_email( $value );\n\t\t\t} else {\n\t\t\t\t$input[$k] == esc_url_raw( $value );\n\t\t\t}\n\t\t}\n\t\t$input = array_filter( $input );\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "1cfdb91bc361a9b52fe881430a4368bf", "score": "0.57445234", "text": "private function filtrarEmail($original_email)\n{\n\t$clean_email = filter_var($original_email,FILTER_SANITIZE_EMAIL);\n\tif ($original_email == $clean_email && filter_var($original_email,FILTER_VALIDATE_EMAIL))\n\t{\n\treturn $original_email;\n\t}\n\n}", "title": "" }, { "docid": "7bb413089fc827034a2a884c8d0b3e5d", "score": "0.5743473", "text": "Function validEmail($emailaddress)\n { \n // Validates the email address. I guess it works. *shrug*\n if (eregi(\"^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\\\.[a-z]{2,4}$\", $emailaddress, $check))\n {\n //if ( getmxrr(substr(strstr($check[0], '@'), 1), $validate_email_temp) ) \n if ( checkdnsrr(substr(strstr($check[0], '@'), 1), \"ANY\") ) \n { return \"valid\"; }\n else\n { return \"invalid-mx\"; } \n }\n else\n {\n return \"invalid-form\"; \n }\n }", "title": "" }, { "docid": "7790570b222a3611953bf9e954716976", "score": "0.5738255", "text": "public function isEmail ($errMsg = \"Is no email\") {\n\t\tif ($this->str == \"\") return $this;\n\n\t\t$email = $this->str;\n\t\t$isValid = true;\n\t\t$atIndex = strrpos($email, \"@\");\n\t\tif (is_bool($atIndex) && !$atIndex)\n\t\t{\n\t\t\t$isValid = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t $domain = substr($email, $atIndex+1);\n\t\t $local = substr($email, 0, $atIndex);\n\t\t $localLen = strlen($local);\n\t\t $domainLen = strlen($domain);\n\t\t if ($localLen < 1 || $localLen > 64)\n\t\t {\n\t\t // local part length exceeded\n\t\t $isValid = false;\n\t\t }\n\t\t else if ($domainLen < 1 || $domainLen > 255)\n\t\t {\n\t\t // domain part length exceeded\n\t\t $isValid = false;\n\t\t }\n\t\t else if ($local[0] == '.' || $local[$localLen-1] == '.')\n\t\t {\n\t\t // local part starts or ends with '.'\n\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $local))\n\t\t {\n\t\t // local part has two consecutive dots\n\t\t $isValid = false;\n\t\t }\n\t\t else if (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n\t\t {\n\t\t // character not valid in domain part\n\t\t $isValid = false;\n\t\t }\n\t\t else if (preg_match('/\\\\.\\\\./', $domain))\n\t\t {\n\t\t // domain part has two consecutive dots\n\t\t $isValid = false;\n\t\t }\n\t\t else if(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/',str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t {\n\t\t // character not valid in local part unless \n\t\t // local part is quoted\n\t\t if (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/',str_replace(\"\\\\\\\\\",\"\",$local)))\n\t\t {\n\t\t $isValid = false;\n\t\t }\n\t\t }\n\t\t if ($isValid && !(checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")))\n\t\t {\n\t\t // domain not found in DNS\n\t\t $isValid = false;\n\t\t }\n\t\t}\n\n\t\tif (!$isValid) $this->pushErr($errMsg);\n\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "881e0aea81fd4b80585afb8778c04237", "score": "0.5737941", "text": "function ValidateEmail($field) //w3schools\n\t\t{\n\t\t\t//address using FILTER_SANITIZE_EMAIL\n\t\t\t$field = filter_var($field, FILTER_SANITIZE_EMAIL);\n\n\t\t\t//filter_var() validates the e-mail\n\t\t\t//address using FILTER_VALIDATE_EMAIL\n\t\t\treturn filter_var($field, FILTER_VALIDATE_EMAIL);\n\t\t}", "title": "" }, { "docid": "55ae0b834d022b7bc1043dc032e01e2f", "score": "0.5722244", "text": "private function isValidEmailAddress($value) {\r\n $regex = '/^((\\\"[^\\\"\\f\\n\\r\\t\\v\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/';\r\n if ( preg_match($regex, $value) ) {\r\n if (function_exists('checkdnsrr')) {\r\n $tokens = explode('@', $value);\r\n if (!(checkdnsrr($tokens[1], 'MX') || checkdnsrr($tokens[1], 'A'))) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "7bf6fec1b1e26e38ed0b10280901891a", "score": "0.5721982", "text": "function parse_email($email) {\r\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) return false;\r\n $a = strrpos($email, '@');\r\n return array('local' => substr($email, 0, $a), 'domain' => substr($email, $a));\r\n}", "title": "" }, { "docid": "292297380ba77ca7cef3bf7a389a4dcf", "score": "0.5718034", "text": "function parse_email( $email, $delimiters = array() ){\n if( ! validate_email( $email ) ){\n return false;\n }\n \n // Create an output array\n $output = array();\n \n $parts = explode('@', $email ); // Splits the email at the @ symbol\n $username = $parts[0]; // Can be used as a username if you'd like, but we'll use it to find names anyway\n \n // Add the items to the array\n $output['username'] = $username;\n $output['domain'] = $parts[1];\n\n $delimiters = array_merge( $delimiters, array('.', '-', '_') ); // List of common email name delimiters, feel free to add to it\n\n foreach( $delimiters as $delimiter ){ // Checks all the delimiters\n if( strpos( $username, $delimiter ) ){ // If the delimiter is found in the string\n $parts_name = preg_replace(\"/\\d+$/\",\"\", $username ); // Remove numbers from string\n $parts_name = explode( $delimiter, $parts_name ); // Split the username at the delimiter\n break; // If we've found a delimiter we can move on\n }\n }\n\n if( isset( $parts_name ) ){ // If we've found a delimiter we can use it\n $output['first_name'] = ucfirst( strtolower( $parts_name[0] ) ); // Lets tidy up the names so the first letter is a capital and rest lower case\n $output['last_name'] = ucfirst( strtolower( $parts_name[1] ) );\n }\n \n return $output;\n \n}", "title": "" }, { "docid": "640933002f32e2766b0b935378283596", "score": "0.5717782", "text": "function check_email_address($email) \n{\n\t// First, we check that there's one @ symbol, and that the lengths are right\n\tif(!empty($email))\n\t{\n\t\tif(!preg_match(\"/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/i\", $email))\n\t\t{\n\t\t\t$errors['email'] = 'Email ID is not valid.';\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$valid = true;\n\t\t}\n\t}\n\t// Split it into sections to make life easier\n\t$email_array = explode(\"@\", $email);\n\t$local_array = explode(\".\", $email_array[0]);\n\tfor ($i = 0; $i < sizeof($local_array); $i++) \n\t{\n\t\tif(($email))\n\t\t{\n\t\t\tif(!preg_match(\"/^[_\\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\\.)+[a-zA-Z]{2,6}$/i\", $email)) \n\t\t\t{\n\t\t\t\t$errors['username'] = 'Email ID is not valid.';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$valid = true;\n\t\t\t}\n\t\t}\n\t}\t \n\treturn true;\n}", "title": "" }, { "docid": "42688d582f7c697b2b93ce3d53d5e314", "score": "0.57135254", "text": "function josh_format_email($address) {\n\t$address = preg_replace(\"/\\r/\", \"\", $address);\n\t$address = preg_replace(\"/\\n/\", \"\", $address);\n\treturn $address;\n}", "title": "" }, { "docid": "2e4c5282c8a8c2850d30ac7ab118ef1d", "score": "0.5703558", "text": "public function email($data)\r\n {\r\n $data = strtolower($data);\r\n $data = preg_replace(\"/[^a-zA-Z0-9@!?#=:$\\-_@. ]/\", \"\", $data);\r\n return $data;\r\n }", "title": "" }, { "docid": "05dde6b6578efac2ae1971044f4354dd", "score": "0.57012653", "text": "function validate($email, &$element, $c)\r\n\t{\r\n\t\t//could be a dropdown with multivalues\r\n\t\tif (is_array($email)) {\r\n\t\t\t$email = implode('', $email);\r\n\t\t}\r\n\t\t//decode as it can be posted via ajax\r\n\t\t$email = urldecode($email);\r\n\r\n \t\t$params = $this->getParams();\r\n\t\t$allow_empty = $params->get('isemail-allow_empty');\r\n\t\t$allow_empty = $allow_empty[$c];\r\n\t\tif ($allow_empty == '1' and empty($email)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t/* First, we check that there's one symbol, and that the lengths are right*/\r\n\t\tif (!preg_match(\"/[^@]{1,64}@[^@]{1,255}/\", $email)) {\r\n\t\t\t/* Email invalid because wrong number of characters in one section, or wrong number of symbols.*/\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t/* Split it into sections to make life easier*/\r\n\t\t$email_array = explode(\"@\", $email);\r\n\t\t$local_array = explode(\".\", $email_array[0]);\r\n\t\tfor ($i = 0; $i < sizeof($local_array); $i++) {\r\n\t\t\tif (!preg_match(\"/^(([A-Za-z0-9!#$%&'*+\\/=?^_`{|}~-][A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$/\", $local_array[0])) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Check if domain is IP. If not, it should be valid domain name */\r\n\t\tif (!preg_match(\"/^\\[?[0-9\\.]+\\]?$/\", $email_array[1])) {\r\n\t\t\t$domain_array = explode(\".\", $email_array[1]);\r\n\t\t\tif (sizeof( $domain_array ) < 2) {\r\n\t\t\t\t /* Not enough parts to domain */\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfor ($i = 0; $i < sizeof( $domain_array); $i++) {\r\n\t\t\t\tif (!preg_match(\"/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/\", $domain_array[$i])) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "04e0f7f04cc1d9ccc68ac0a715e11c78", "score": "0.56974596", "text": "function is_valid_email($field) {\n\t//address using FILTER_SANITIZE_EMAIL\n\t$field = filter_var($field, FILTER_SANITIZE_EMAIL);\n\t//filter_var() validates the e-mail\n\t//address using FILTER_VALIDATE_EMAIL\n\treturn filter_var($field, FILTER_VALIDATE_EMAIL);\n}", "title": "" }, { "docid": "92ccda87a0822e0d14441896dff3cf1b", "score": "0.56766504", "text": "public static function validateEmailAddress($value) {\r\n $regex = '/^((\\\"[^\\\"\\f\\n\\r\\t\\v\\b]+\\\")|([\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+(\\.[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]+)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\\-])+\\.)+[A-Za-z\\-]+))$/';\r\n if ( preg_match($regex, $value) ) {\r\n if (function_exists('checkdnsrr')) {\r\n $tokens = explode('@', $value);\r\n if (!(checkdnsrr($tokens[1], 'MX') || checkdnsrr($tokens[1], 'A'))) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "de6ea932b1598d137c07c37a4e88b8ea", "score": "0.56423926", "text": "function is_email($string)\n{\n return filter_var($string, FILTER_VALIDATE_EMAIL);\n}", "title": "" }, { "docid": "24c32bd8333e26ea073270802a92c728", "score": "0.5635862", "text": "function isEmailValid($email)\n{\n // First, we check that there's one @ symbol,\n // and that the lengths are right.\n if (!preg_match(\"/^[^@]{1,64}@[^@]{1,255}$/\", $email)) {\n // Email invalid because wrong number of characters\n // in one section or wrong number of @ symbols.\n return false;\n }\n\n // Split it into sections to make life easier\n $email_array = explode(\"@\", $email);\n $local_array = explode(\".\", $email_array[0]);\n for ($i = 0; $i < sizeof($local_array); $i++) {\n if (!preg_match(\"/^(([A-Za-z0-9!#$%&'*+\\/=?^_`{|}~-][A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\.-]{0,63})|(\\\"[^(\\\\|\\\")]{0,62}\\\"))$/\",\n $local_array[$i])) {\n return false;\n }\n }\n // Check if domain is IP. If not,\n // it should be valid domain name\n if (!preg_match(\"/^\\[?[0-9\\.]+\\]?$/\", $email_array[1])) {\n $domain_array = explode(\".\", $email_array[1]);\n if (sizeof($domain_array) < 2) {\n return false; // Not enough parts to domain\n }\n for ($i = 0; $i < sizeof($domain_array); $i++) {\n if (!preg_match(\"/^(([A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9])|([A-Za-z0-9]+))$/\",\n $domain_array[$i])) {\n return false;\n }\n }\n }\n return true;\n}", "title": "" }, { "docid": "d3603ddf25e9b72cb179acce3ddcc990", "score": "0.56202286", "text": "function isEmail($email) {\n return(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n }", "title": "" }, { "docid": "9006b8b05c697bce2b14b962fe106dfa", "score": "0.5619367", "text": "function Validate_Email($Email)\n\t\t{\n\t\t\tif(!$Email) return \"please enter an email\";\n\t\t\tif(strrpos($Email, \"@\") === false) return \"no @ symbol found\";\n\t\t\tlist($User, $URL) = explode(\"@\", $Email);\n\t\t\tif(!$User) return \"before @ is missing\";\n\t\t\tif(!$URL) return \"after @ is missing\";\n\t\t\tif(strlen($User) > 64) return \"before @ is too long\"; // The username part of an email can't be over 64 chars.\n\t\t\tif(strlen($URL) > 253) return \"after @ is too long\"; // The combined length of an email can't be over 255 chars.\n\t\t\tif($User[0] == '.' || $User[strlen($User)-1] == '.') return \"before @ can't end with a period\";\n\t\t\tif(strpos($User, \"..\")) return \"before @ has consecutive periods\";\n\t\t\tif(!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $URL)) return \"after @ has invalid characters\";\n\t\t\tif(preg_match('/\\\\.\\\\./', $URL)) return \"after @ has consecutive periods\";\n\t\t\tif(!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$User)) && !preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$User)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t return \"before @ has invalid characters\";\n\t\t\tif(!(checkdnsrr($URL,\"MX\") || checkdnsrr($URL,\"A\"))) return \"after @ isn't a real website\";\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "b9fc8fb2a94bf480877480996a8e829c", "score": "0.5596964", "text": "public static function filterEmail($email)\n {\n return filter_var($email, FILTER_VALIDATE_EMAIL);\n }", "title": "" }, { "docid": "3ad98032dc5e71f8144b5f02122db710", "score": "0.5593368", "text": "function checkEmail($email)\n{\n //validation methods to check the email format\n $e = checkString($email);\n $e = filter_var($e, FILTER_VALIDATE_EMAIL);\n return $e;\n}", "title": "" }, { "docid": "53988686cf82d7d1868bc078af2800ef", "score": "0.5590829", "text": "function validate_email($email) {\r\n\t$regex = '/([a-z0-9_.-]+)'. # (Name) Letters, Numbers, Dots, Hyphens and Underscores\r\n\r\n\t'@'. # (@ -at- sign)\r\n\r\n\t'([a-z0-9.-]+){2,255}'. # Domain) (with possible subdomain(s) ).\r\n\r\n\t'.'. # (. -period- sign)\r\n\r\n\t'([a-z]+){2,10}/i'; # (Extension) Letters only (up to 10 (can be increased in the future) characters)\r\n\r\n\tif($email == '') { \r\n\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\t$eregi = preg_replace($regex, '', $email);\r\n\t}\r\n\r\n\treturn empty($eregi) ? true : false;\r\n}", "title": "" }, { "docid": "4c79f7d8f83a049d74ee3b78307dcf75", "score": "0.55901223", "text": "function validEmail($email)\r\n{\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n}", "title": "" }, { "docid": "9b1b2488847365d3318882ede85fa9ac", "score": "0.5586208", "text": "public function validate_email($email)\n{\nreturn filter_var($email, FILTER_VALIDATE_EMAIL);\n}", "title": "" }, { "docid": "4e0c7d6e38fbf7e6183fe8b3eac9e788", "score": "0.5581865", "text": "function c_comdef_vet_email_address($in_address)\n{\n $ret = false;\n if (isset($in_address) && is_string($in_address) && trim($in_address) && preg_match('#^(?:[a-zA-Z0-9_\\'^&amp;/+-])+(?:\\.(?:[a-zA-Z0-9_\\'^&amp;/+-])+)*@(?:(?:\\[?(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\\.){3}(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\]?)|(?:[a-zA-Z0-9-]+\\.)+(?:[a-zA-Z]){2,}\\.?)$#', $in_address)) {\n $ret = true;\n }\n\n return $ret;\n}", "title": "" }, { "docid": "df56882c937294a3504d6b7069bfff05", "score": "0.5576789", "text": "private function validEmail($email) {\n\t //address using FILTER_SANITIZE_EMAIL\n\t $email = filter_var($email , FILTER_SANITIZE_EMAIL);\n\n\t //filter_var() validates the e-mail\n\t //address using FILTER_VALIDATE_EMAIL\n\t if(filter_var($email , FILTER_VALIDATE_EMAIL)) { return true; }\n\t else { return false; }\n\t}", "title": "" }, { "docid": "b7773b3c9124094b6d06c8b22cc0c920", "score": "0.55724514", "text": "function format_email($email) {\r\n global $errors;\r\n $pattern = \"/\" .\r\n \"^[a-z0-9_-]+\" . // valid chars (at least once)\r\n \"(\\.[a-z0-9_-]+)*\" . // dot valid chars (0-n times)\r\n \"@\" .\r\n \"[a-z0-9][a-z0-9-]*\" . // valid chars (at least once)\r\n \"(\\.[a-z0-9-]+)*\" . // dot valid chars (0-n times)\r\n \"\\.([a-z]{2,6})$\" . // dot valid chars\r\n \"/i\"; // case insensitive\r\n if (!preg_match($pattern, $email)) {\r\n $errors['email'] = '<p class=\"errors\">Invalid format for email address.</p>' . \"\\n\";\r\n return $errors;\r\n }\r\n return false;\r\n}", "title": "" }, { "docid": "48a6852430f1be0f6e8696eac0c6adb4", "score": "0.5561378", "text": "public static function cleanMail($inDirtyString, $keepCase = false) {\n $clean = filter_var(utf8_decode($inDirtyString), FILTER_SANITIZE_EMAIL);\n if ($keepCase) {\n $clean = trim($clean);\n } else {\n $clean = trim(strtolower($clean));\n }\n if (filter_var($clean, FILTER_VALIDATE_EMAIL)) {\n return utf8_encode($clean);\n }\n return null;\n }", "title": "" }, { "docid": "a3a240ddb232310da474d0e2d6f431d0", "score": "0.55587256", "text": "public function validEmail($emails = [])\n {\n $emails_valid = [];\n if (!is_array($emails)) {\n $emails = explode(', ', $emails);\n }\n foreach ($emails as $key => $email) {\n if (!!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $emails_valid[$key] = $email;\n }\n }\n return $emails_valid = implode(', ', $emails_valid);\n }", "title": "" }, { "docid": "77402b58ca837acca1eef448590fd95f", "score": "0.55560696", "text": "public static function parse\n\t(\n\t\t$email\t\t// <str> The email to parse.\n\t)\t\t\t\t// RETURNS <str:str> data about the email, or array() on failure.\n\t\n\t// $parsedEmail = Email::parse($email)\n\t{\n\t\t// Make sure the email doesn't contain illegal characters\n\t\t$email = Sanitize::variable($email, \"@.-+\", false);\n\t\t\n\t\tif(Sanitize::$illegalChars != array())\n\t\t{\n\t\t\tAlert::error(\"Email\", \"The email does not allow: \" . FormValidate::announceIllegalChars(Sanitize::$illegalChars), 3);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Make sure the email has an \"@\"\n\t\tif(strpos($email, \"@\") === false)\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email improperly formatted: doesn't include an @ character.\", 3);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Prepare Values\n\t\t$emailData = array();\n\t\t$exp = explode(\"@\", $email);\n\t\t\n\t\t$emailData['full'] = $email;\n\t\t$emailData['username'] = $exp[0];\n\t\t$emailData['domain'] = $exp[1];\n\t\t\n\t\t$lenEmail = strlen($email);\n\t\t$lenUser = strlen($emailData['username']);\n\t\t$lenDomain = strlen($emailData['domain']);\n\t\t\n\t\t// Check if the email is too long\n\t\tif($lenEmail > 72)\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email is over 72 characters long.\", 1);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Check if the username is too long\n\t\tif($lenUser < 1 or $lenUser > 50)\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email username must be between 1 and 50 characters.\", 2);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Check if the domain is too long\n\t\tif($lenDomain < 1 or $lenDomain > 50)\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email domain must be between 1 and 50 characters.\", 2);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Check for valid emails with the username\n\t\tif($emailData['username'][0] == '.' or $emailData['username'][($lenUser - 1)] == '.')\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email username cannot start or end with a period.\", 5);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Username cannot have two consecutive dots\n\t\tif(strpos($emailData['username'], \"..\") !== false)\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email username cannot contain two consecutive periods.\", 5);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Check the domain for valid characters\n\t\tif(!isSanitized::variable($emailData['domain'], \"-.\"))\n\t\t{\n\t\t\tAlert::error(\"Email\", \"Email domain was not properly sanitized.\", 3);\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Return the email data\n\t\treturn $emailData;\n\t}", "title": "" }, { "docid": "af365c804fd2bc5a2f4eff5fb79b4620", "score": "0.5552382", "text": "function isEmail($email) { \r\n\r\n\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\r\n\t\t\r\n}", "title": "" }, { "docid": "359ce92fe01d39ffc4d2daf01204f9d0", "score": "0.55421764", "text": "function validateMailAddress($string){\n if( preg_match(\"/^.+@.+\\..+$/i\", $string) ) {\n return true;\n }\n else return false;\n}", "title": "" }, { "docid": "f27a0476f1f008ffdc79c729af3ac69e", "score": "0.55398774", "text": "function filterformaddress($string)\n{\n\t\t\t$firststring=$string;\n\t\t\t$fpos=strpos($string,\"@\");\n\t\t\t$string=substr($string,$fpos);\n\t\t\t$pos=strpos($string,\".\");\n\t\t\t$spos=$pos+3;\n\t\t\t$lastchar=substr($string,$spos,1);\n\n\t\t\tif(($lastchar>='a' && $lastchar<='z')|| ($lastchar>='A' && $lastchar<='Z'))\n\t\t\t $pos=$pos+4;\n\t\t\telse\n\t\t\t $pos=$pos+3;\n\n\t\t\t$pos=$pos+$fpos;\n\t\t\t//echo \"last char \".substr($firststring,$pos,1);\n\t\t\tif(substr($firststring,$pos,1)==\".\")\n\t\t\t{\n\t\t\t if(substr($firststring,$pos+3,1)>='a' && substr($firststring,$pos+3,1)>='z ' || substr($firststring,$pos+3,1)>='A' && substr($firststring,$pos+3,1)>='Z ')\n\t\t\t $pos=$pos+4;\n\t\t\t else\n\t\t\t $pos=$pos+3;\n\t\t\t}\n\n\t\t\t//echo \"<br />Email is ----- > \".substr($firststring,0,$pos);die();\n\t\t\treturn substr($firststring,0,$pos);\n}", "title": "" }, { "docid": "2950612369425fe063230c21c276beff", "score": "0.5535723", "text": "function isEmail($email) {\n\t\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n\t}", "title": "" }, { "docid": "e7adcfe623cc14cdcf09c9bac11f018a", "score": "0.55319667", "text": "function spamcheck($field){\n //address using FILTER_SANITIZE_EMAIL\n $field=filter_var($field, FILTER_SANITIZE_EMAIL);\n\n //filter_var() validates the e-mail\n //address using FILTER_VALIDATE_EMAIL\n if(filter_var($field, FILTER_VALIDATE_EMAIL)){\n return TRUE;\n }else{\n return FALSE;\n }\n}", "title": "" }, { "docid": "e4640bc5249f76fed81c60262b612faa", "score": "0.5527088", "text": "function validate_email($email)\n{\n\n $emailIsValid = FALSE;\n\n // MAKE SURE AN EMPTY STRING WASN'T PASSED\n\n if (!empty($email))\n {\n // GET EMAIL PARTS\n\n $domain = ltrim(stristr($email, '@'), '@');\n $user = stristr($email, '@', TRUE);\n\n // VALIDATE EMAIL ADDRESS\n\n if\n (\n !empty($user) &&\n !empty($domain) &&\n checkdnsrr($domain)\n )\n {$emailIsValid = TRUE;}\n }\n\n // RETURN RESULT\n\n return $emailIsValid;\n}", "title": "" }, { "docid": "09683cffd49fe082155ba0a19554e3dd", "score": "0.552353", "text": "function mailparse_rfc822_parse_addresses($addresses)\n{\n}", "title": "" }, { "docid": "14e761aa7d141d5c3af7307eeafe04ad", "score": "0.55203223", "text": "function test_get_email_valid_email_address(){\n\n\t\t$valid_email = filter_var($this->user->get_email(), FILTER_VALIDATE_EMAIL);\n\n\t\t$this->assertNotEquals(false, $valid_email);\n\n\t}", "title": "" }, { "docid": "df353e1858ebb3e5747654961f0dfcf3", "score": "0.5516508", "text": "public function validaemail($e){\n\t$exp = \"/^[a-z\\'0-9]+([._-][a-z\\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$/\";\n\n if(preg_match($exp,$e)){\n $a=explode(\"@\",$e);\n $b=array_pop($a);\n if(checkdnsrr($b,\"MX\")){\n return true;\n }else{\n return false;\n }\n\n }else{\n\n return false;\n\n } \n}", "title": "" }, { "docid": "5045aaddc28c4b30cd04800f9037c4f9", "score": "0.55012155", "text": "function is_email_address($email)\n\t{\n\t\t// If the email is empty it can't be valid\n\t\tif (empty($email)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the email doesnt have exactle 1 @ it isnt valid\n\t\tif (isc_substr_count($email, '@') != 1) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$matches = array();\n\t\t$local_matches = array();\n\t\tpreg_match(':^([^@]+)@([a-zA-Z0-9\\-][a-zA-Z0-9\\-\\.]{0,254})$:', $email, $matches);\n\n\t\tif (count($matches) != 3) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$local = $matches[1];\n\t\t$domain = $matches[2];\n\n\t\t// If the local part has a space but isnt inside quotes its invalid\n\t\tif (isc_strpos($local, ' ') && (isc_substr($local, 0, 1) != '\"' || isc_substr($local, -1, 1) != '\"')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If there are not exactly 0 and 2 quotes\n\t\tif (isc_substr_count($local, '\"') != 0 && isc_substr_count($local, '\"') != 2) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if the local part starts or ends with a dot (.)\n\t\tif (isc_substr($local, 0, 1) == '.' || isc_substr($local, -1, 1) == '.') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the local string doesnt start and end with quotes\n\t\tif ((isc_strpos($local, '\"') || isc_strpos($local, ' ')) && (isc_substr($local, 0, 1) != '\"' || isc_substr($local, -1, 1) != '\"')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tpreg_match(':^([\\ \\\"\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~\\.]{1,64})$:', $local, $local_matches);\n\n\t\t// Check the domain has at least 1 dot in it\n\t\tif (isc_strpos($domain, '.') === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!empty($local_matches) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b9c4c5bd9ebca3fdf316b63b7d575e53", "score": "0.5477893", "text": "function is_email(string $mail):bool\n {\n return filter_var($mail. FILTER_VALIDATE_EMAIL);\n }", "title": "" }, { "docid": "b70a23215d1dfa7f457c8c94320801ff", "score": "0.54772127", "text": "private function _validateEmail() {\n\n // Check email to don't be empty\n if (empty($this->_emailInput)) {\n $this->_returnResponse('fail', 'Please enter your new email');\n }\n\n // Check email to be in valid format\n if (!filter_var($this->_emailInput, FILTER_VALIDATE_EMAIL)) {\n $this->_returnResponse('fail', 'Please enter a valid email');\n }\n\n // Check if email is already used\n if ($this->_usersModel->checkEmail('Email', $this->_emailInput)) {\n $this->_returnResponse('fail', 'This email is already used by another user');\n }\n }", "title": "" }, { "docid": "cb87c487a4723a3d8ddf0f6adc00670a", "score": "0.5470231", "text": "function tommus_email_validate($email) { return filter_var($email, FILTER_VALIDATE_EMAIL) && preg_match('/@.+\\./', $email); }", "title": "" }, { "docid": "86366680c18a3c449102fbbd92c90d82", "score": "0.5456309", "text": "public function validateEmail()\n {\n ///If we want to use external email validation service this will connect to enternal api and validate it is actually a real email address.\n $this->emailservice = new EmailValidationService;\n $data = $this->emailservice->verify($this->customer->email);\n $this->emailvalid = $data;\n if (!$this->emailvalid) {\n $this->addError('customer.email', 'The email is not a real email address');\n }\n\n\n }", "title": "" }, { "docid": "01424e1675c788585e93120621d1b2f2", "score": "0.5446561", "text": "function validateEmailFormat($eMail) {\r\n\t\r\n\t$valid = true;\r\n\t$sFunction = \"validateEmailFormat\";\r\n\t\r\n\tif ($eMail == '') {\r\n\t\t$valid = false;\r\n\t}\r\n\t// check if contains valid domain\r\n\tif (!(isValidDomain($eMail))) {\r\n\t\t$valid = false;\r\n\t}\r\n\t\r\n\t// check if contains banned domain\r\n\tif (isBannedDomain($eMail, $domainName)) {\r\n\t\t$valid = false;\r\n\t}\r\n\t\r\n\t// check starts with bannedEmailStart\r\n\tif (isBannedEmailStart($eMail)) {\r\n\t\t$valid = false;\r\n\t}\r\n\t\r\n\t// check if not a bannedEmail\r\n\tif (isBannedEmail($eMail)) {\r\n\t\t$valid = false;\r\n\t}\r\n\t\r\n\tlist ( $userName, $domain ) = split (\"@\",$eMail);\r\n\t\r\n\t// check if contains banned ip.\r\n\t$ipArray = gethostbynamel($domain);\r\n\t\r\n\tfor ($i = 0; $i < count($ipArray); $i++) {\r\n\t\tif (isBannedIp($ipArray[$i])) {\r\n\t\t\t$valid = false;\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ( !eregi( \"^[A-Za-z0-9\\._-]+[@]{1,1}[A-Za-z0-9-]+[\\.]{1}[A-Za-z0-9\\.-]+[A-Za-z]$\", $eMail) ) {\t\r\n\t\t//bad Email\r\n\t\t$valid = false;\r\n\r\n\t} \r\n\t\r\n\t\t\r\n\tif (!($valid)) {\r\n\t\t$sErrorLogQuery = \"INSERT INTO errorLog(errorDateTime, valueInvalidated, function, ipAddress, sourceCode)\r\n\t\t\t\t\t\t VALUES(now(), '$eMail', '$sFunction', '\".$_SESSION[\"sSesRemoteIp\"].\"',\\\"\".$_SESSION[\"sSesSourceCode\"].\"\\\")\";\r\n\t\t$rErrorLogResult = dbQuery($sErrorLogQuery);\r\n\t\techo dbError();\r\n\t\r\n\t}\r\n\t\r\n\treturn $valid;\r\n}", "title": "" }, { "docid": "324be3e8a2a68c0d29b8ae7bdb4295cc", "score": "0.5442486", "text": "function validEmail($email_address) {\n\t$isValid = true;\n\t$atIndex = strrpos($email_address, '@');\n\tif (is_bool($atIndex) && !$atIndex) {\n\t\t$isValid = false;\n\t} else {\n\t\t$domain = substr($email_address, $atIndex+1);\n\t\t$local = substr($email_address, 0, $atIndex);\n\t\t$localLen = strlen($local);\n\t\t$domainLen = strlen($domain);\n\t\tif ($localLen < 1 || $localLen > 64) {\n\t\t\t// local part length exceeded\n\t\t\t$isValid = false;\n\t\t} elseif ($domainLen < 1 || $domainLen > 255) {\n\t\t\t// domain part length exceeded\n\t\t\t$isValid = false;\n\t\t} elseif ($local[0] == '.' || $local[$localLen-1] == '.') {\n\t\t\t// local part starts or ends with '.'\n\t\t\t$isValid = false;\n\t\t} elseif (preg_match('/\\.\\./', $local)) {\n\t\t\t// local part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t} elseif (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)) {\n\t\t\t// character not valid in domain part\n\t\t\t$isValid = false;\n\t\t} elseif (preg_match('/\\.\\./', $domain)) {\n\t\t\t// domain part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t} elseif (!preg_match('/^(\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', stripslashes($local))) {\n\t\t\t// character not valid in local part unless\n\t\t\t// local part is quoted\n\t\t\tif (!preg_match('/^\"(\\\"|[^\"])+\"$/', stripslashes($local))) {\n\t\t\t\t$isValid = false;\n\t\t\t}\n\t\t}\n\t\tif ($isValid && (!checkdnsrr($domain,'MX') || !checkdnsrr($domain,'A'))) {\n\t\t\t// domain not found in DNS\n\t\t\t$isValid = false;\n\t\t}\n\t}\n\treturn $isValid;\n}", "title": "" }, { "docid": "c2e78a05920fa877c4ba8a31142c9bf4", "score": "0.5435327", "text": "public function validate() {\n // email address\n if (filter_var($this->email, FILTER_VALIDATE_EMAIL) === false) {\n $this->errors[] = 'Invalid email';\n }\n }", "title": "" }, { "docid": "0ebffb22ec7bcbb56ffe7a9f4f3eaffb", "score": "0.5433068", "text": "private function _validateInput() {\n\t\tbfLoad ( 'bfVerify' );\n\t\tif ($this->ipaddress) {\n\t\t\tif (! bfVerify::isipaddress ( $this->ipaddress ))\n\t\t\t\t$this->ipaddress = '';\n\t\t}\n\t\t\n\t\t$class = 'Zend_Filter_StripTags';\n\t\tif (! class_exists ( $class ))\n\t\t\trequire_once 'Zend/Filter/StripTags.php';\n\t\t\n\t\t$filter = new Zend_Filter_StripTags ( );\n\t\t\n\t\t$this->ipaddress = $filter->filter ( $this->ipaddress );\n\t\t$this->useragent = $filter->filter ( $this->useragent );\n\t\t$this->joomla_user_id = intval ( $this->joomla_user_id );\n\t\t$this->form_id = intval ( $this->form_id );\n\t\n\t}", "title": "" }, { "docid": "f89c5e5f99b3954da4d78e08d1c86dec", "score": "0.5430041", "text": "public function testValidateEmail(){\n $var = new aldorg\\validater\\Validater;\n $this->assertTrue($var->validateEmail(\"[email protected]\") == 'true');\n $this->assertTrue($var->validateEmail(\"name@example,.com\") == 'false');\n $this->assertTrue($var->validateEmail(\"nameexample.com\") == 'false');\n unset($var);\n }", "title": "" }, { "docid": "796ffcb34b0b8268df468d0f7e37fa76", "score": "0.54258585", "text": "function VerifierAdresseMail($adresse)\n{\n if(strlen($adresse)>254)\n {\n return '<p>Votre adresse est trop longue.</p>';\n }\n\n\n //Caractères non-ASCII autorisés dans un nom de domaine .eu :\n\n $nonASCII='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőoeŕŗřśŝsťŧ';\n $nonASCII.='ũūŭůűųŵŷźżztșțΐάέήίΰαβγδεζηθικλμνξοπρςστυφ';\n $nonASCII.='χψωϊϋόύώабвгдежзийклмнопрстуфхцчшщъыьэюяt';\n $nonASCII.='ἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔ';\n $nonASCII.='ὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗ';\n $nonASCII.='ᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷ';\n // note : 1 caractète non-ASCII vaut 2 octets en UTF-8\n\n\n $syntaxe=\"#^[\\w-.]{1,64}@[[:alnum:]-.$nonASCII]{2,253}\\.[[:alpha:].]{2,6}$#\";\n\n if(preg_match($syntaxe,$adresse))\n {\n return 'Success';\n }\n else\n {\n return 'Failed';\n }\n}", "title": "" }, { "docid": "c0db585d70edeaf7087962593c6d233c", "score": "0.5425569", "text": "function check_email($email) {\n #characters allowed on name: 0-9a-Z-._ on host: 0-9a-Z-. on between: @\n if (!preg_match('/^[0-9a-zA-Z\\.\\-\\_]+\\@[0-9a-zA-Z\\.\\-]+$/', $email))\n return false;\n #must start or end with alpha or num\n if ( preg_match('/^[^0-9a-zA-Z]|[^0-9a-zA-Z]$/', $email))\n return false;\n #name must end with alpha or num\n if (!preg_match('/([0-9a-zA-Z_]{1})\\@./',$email) )\n return false;\n #host must start with alpha or num\n if (!preg_match('/.\\@([0-9a-zA-Z_]{1})/',$email) )\n return false;\n #pair .- or -. or -- or .. not allowed\n if ( preg_match('/.\\.\\-.|.\\-\\..|.\\.\\..|.\\-\\-./',$email) )\n return false;\n #pair ._ or -_ or _. or _- not allowed\n// if ( preg_match('/.\\._.|.-_.|._\\..|._-./',$email) )\n// return false;\n #host must end with '.' plus 2-6 alpha for TopLevelDomain\n if (!preg_match('/\\.([a-zA-Z]{2,6})$/',$email) )\n return false;\n\n return true;\n}", "title": "" }, { "docid": "8f809bfed39ff18f16bc0d20b7805150", "score": "0.54242796", "text": "function strip_all($string){\n\t\treturn str_replace('\\r\\n', '', strip_urls(strip_emails($string)));\n\t}", "title": "" }, { "docid": "ead4c77d50073d81562e4ffcc8dbb4ec", "score": "0.54220194", "text": "function is_email($email){\n return(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\", $email));\n}", "title": "" }, { "docid": "bf4f3fe3abf1912575256b707a572f5f", "score": "0.54172015", "text": "function validate_email_address($email) {\n\tif (! is_string($email)) {\n\t\tthrow new InvalidArgumentException('email must be string');\n\t}\n\t$isValid = true;\n\t$atIndex = strrpos($email, \"@\");\n\tif (is_bool($atIndex) && !$atIndex) {\n\t\treturn false;\n\t}\n\t$local = substr($email, 0, $atIndex);\n\t$localLen = strlen($local);\n\tif ($localLen < 1 || $localLen > 64) {\n\t\treturn false;\n\t}\n\t$domain = substr($email, $atIndex+1);\n\t$domainLen = strlen($domain);\n\tif ($domainLen < 1 || $domainLen > 255) {\n\t\treturn false;\n\t}\n\tif ($local[0] == '.' || $local[$localLen-1] == '.') {\n\t\t// local part starts or ends with '.'\n\t\treturn false;\n\t}\n\tif (preg_match('/\\\\.\\\\./', $local)) {\n\t\t// local part has two consecutive dots\n\t\treturn false;\n\t}\n\tif (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain)) {\n\t\t// character not valid in domain part\n\t\treturn false;\n\t}\n\tif (preg_match('/\\\\.\\\\./', $domain)) {\n\t\t// domain part has two consecutive dots\n\t\treturn false;\n\t}\n\tif (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t// character not valid in local part unless \n\t\t// local part is quoted\n\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\",\"\",$local))) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "9ca4bb496faac2fdf7140016a32cda38", "score": "0.54109246", "text": "function is_email($email, $checkDNS = false)\n {\n // (http://tools.ietf.org/html/rfc3696)\n // (http://tools.ietf.org/html/rfc2822)\n // (http://tools.ietf.org/html/rfc5322#section-3.4.1)\n // (http://tools.ietf.org/html/rfc5321#section-4.1.3)\n // (http://tools.ietf.org/html/rfc4291#section-2.2)\n // (http://tools.ietf.org/html/rfc1123#section-2.1)\n // the upper limit on address lengths should normally be considered to be 256\n // (http://www.rfc-editor.org/errata_search.php?rfc=3696)\n\n if (strlen($email) > 256) return false; // Too long\n\n // Contemporary email addresses consist of a \"local part\" separated from\n // a \"domain part\" (a fully-qualified domain name) by an at-sign (\"@\").\n // (http://tools.ietf.org/html/rfc3696#section-3)\n\n $index = strrpos($email, '@');\n if ($index === false) return false; // No at-sign\n if ($index === 0) return false; // No local part\n if ($index > 64) return false; // Local part too long\n $localPart = substr($email, 0, $index);\n $domain = substr($email, $index + 1);\n $domainLength = strlen($domain);\n if ($domainLength === 0) return false; // No domain part\n if ($domainLength > 255) return false; // Domain part too long\n\n // Let's check the local part for RFC compliance...\n //\n // Any ASCII graphic (printing) character other than the\n // at-sign (\"@\"), backslash, double quote, comma, or square brackets may\n // appear without quoting. If any of that list of excluded characters\n // are to appear, they must be quoted\n // (http://tools.ietf.org/html/rfc3696#section-3)\n\n if (preg_match('/^\"(?:.)*\"$/', $localPart) > 0) {\n\n // Quoted-string tests:\n //\n // Note that since quoted-pair\n // is allowed in a quoted-string, the quote and backslash characters may\n // appear in a quoted-string so long as they appear as a quoted-pair.\n // (http://tools.ietf.org/html/rfc2822#section-3.2.5)\n\n $groupCount = preg_match_all('/(?:^\"|\"$|\\\\\\\\\\\\\\\\|\\\\\\\\\")|(\\\\\\\\|\")/', $localPart, $matches);\n array_multisort($matches[1], SORT_DESC);\n if ($matches[1][0] !== '') return false; // Unescaped quote or backslash character inside quoted string\n if (preg_match('/^\"\\\\\\\\*\"$/', $localPart) > 0) return false; // \"\" and \"\\\" are slipping through - must tidy this up\n }\n else {\n\n // Unquoted string tests:\n //\n // Period (\".\") may...appear, but may not be used to start or end the\n // local part, nor may two or more consecutive periods appear.\n // (http://tools.ietf.org/html/rfc3696#section-3)\n\n if (preg_match('/^\\\\.|\\\\.\\\\.|\\\\.$/', $localPart) > 0) return false; // Dots in wrong place\n\n // Any excluded characters? i.e. <space>, @, [, ], \\, \", <comma>\n\n if (preg_match('/[ @\\\\[\\\\]\\\\\\\\\",]/', $localPart) > 0)\n\n // Check all excluded characters are escaped\n\n $stripped = preg_replace('/\\\\\\\\[ @\\\\[\\\\]\\\\\\\\\",]/', '', $localPart);\n if (preg_match('/[ @\\\\[\\\\]\\\\\\\\\",]/', $stripped) > 0) return false; // Unquoted excluded characters\n }\n\n // Now let's check the domain part...\n // The domain name can also be replaced by an IP address in square brackets\n // (http://tools.ietf.org/html/rfc3696#section-3)\n // (http://tools.ietf.org/html/rfc5321#section-4.1.3)\n // (http://tools.ietf.org/html/rfc4291#section-2.2)\n\n if (preg_match('/^\\\\[(.)+]$/', $domain) === 1) {\n\n // It's an address-literal\n\n $addressLiteral = substr($domain, 1, $domainLength - 2);\n $matchesIP = array();\n\n // Extract IPv4 part from the end of the address-literal (if there is one)\n\n if (preg_match('/\\\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/', $addressLiteral, $matchesIP) > 0) {\n $index = strrpos($addressLiteral, $matchesIP[0]);\n if ($index === 0) {\n\n // Nothing there except a valid IPv4 address, so...\n\n return true;\n }\n else {\n\n // Assume it's an attempt at a mixed address (IPv6 + IPv4)\n\n if ($addressLiteral[$index - 1] !== ':') return false; // Character preceding IPv4 address must be ':'\n if (substr($addressLiteral, 0, 5) !== 'IPv6:') return false; // RFC5321 section 4.1.3\n $IPv6 = substr($addressLiteral, 5, ($index === 7) ? 2 : $index - 6);\n $groupMax = 6;\n }\n }\n else {\n\n // It must be an attempt at pure IPv6\n\n if (substr($addressLiteral, 0, 5) !== 'IPv6:') return false; // RFC5321 section 4.1.3\n $IPv6 = substr($addressLiteral, 5);\n $groupMax = 8;\n }\n\n $groupCount = preg_match_all('/^[0-9a-fA-F]{0,4}|\\\\:[0-9a-fA-F]{0,4}|(.)/', $IPv6, $matchesIP);\n $index = strpos($IPv6, '::');\n if ($index === false) {\n\n // We need exactly the right number of groups\n\n if ($groupCount !== $groupMax) return false; // RFC5321 section 4.1.3\n }\n else {\n if ($index !== strrpos($IPv6, '::')) return false; // More than one '::'\n $groupMax = ($index === 0 || $index === (strlen($IPv6) - 2)) ? $groupMax : $groupMax - 1;\n if ($groupCount > $groupMax) return false; // Too many IPv6 groups in address\n }\n\n // Check for unmatched characters\n\n array_multisort($matchesIP[1], SORT_DESC);\n if ($matchesIP[1][0] !== '') return false; // Illegal characters in address\n\n // It's a valid IPv6 address, so...\n\n return true;\n }\n else {\n\n // It's a domain name...\n // The syntax of a legal Internet host name was specified in RFC-952\n // One aspect of host name syntax is hereby changed: the\n // restriction on the first character is relaxed to allow either a\n // letter or a digit.\n // (http://tools.ietf.org/html/rfc1123#section-2.1)\n //\n // NB RFC 1123 updates RFC 1035, but this is not currently apparent from reading RFC 1035.\n //\n // Most common applications, including email and the Web, will generally not permit...escaped strings\n // (http://tools.ietf.org/html/rfc3696#section-2)\n //\n // Characters outside the set of alphabetic characters, digits, and hyphen MUST NOT appear in domain name\n // labels for SMTP clients or servers\n // (http://tools.ietf.org/html/rfc5321#section-4.1.2)\n //\n // RFC5321 precludes the use of a trailing dot in a domain name for SMTP purposes\n // (http://tools.ietf.org/html/rfc5321#section-4.1.2)\n\n $matches = array();\n $groupCount = preg_match_all('/(?:[0-9a-zA-Z][0-9a-zA-Z-]{0,61}[0-9a-zA-Z]|[a-zA-Z])(?:\\\\.|$)|(.)/', $domain, $matches);\n $level = count($matches[0]);\n if ($level == 1) return false; // Mail host can't be a TLD\n $TLD = $matches[0][$level - 1];\n if (substr($TLD, strlen($TLD) - 1, 1) === '.') return false; // TLD can't end in a dot\n if (preg_match('/^[0-9]+$/', $TLD) > 0) return false; // TLD can't be all-numeric\n\n // Check for unmatched characters\n\n array_multisort($matches[1], SORT_DESC);\n if ($matches[1][0] !== '') return false; // Illegal characters in domain, or label longer than 63 characters\n\n // Check DNS?\n\n if ($checkDNS && function_exists('checkdnsrr')) {\n if (!(checkdnsrr($domain, 'A') || checkdnsrr($domain, 'MX'))) {\n return false; // Domain doesn't actually exist\n }\n }\n\n // Eliminate all other factors, and the one which remains must be the truth.\n // (Sherlock Holmes, The Sign of Four)\n\n return true;\n }\n }", "title": "" }, { "docid": "09a35a3d82dcbe8ed198fe6eae883721", "score": "0.5409101", "text": "function checkEmail($ClientEmail){\n $valEmail = filter_var($ClientEmail, FILTER_VALIDATE_EMAIL);\n return $valEmail;\n}", "title": "" }, { "docid": "c73b72771b29289e8d88eba2d97d2a70", "score": "0.5399998", "text": "function spam_scrubber($value) {\n\t\t$very_bad = array('to:', 'cc:', 'bcc:', 'content-type:', 'mime-version:', 'multipart-mixed:', 'content-transfer-encoding:');\n\t\t\n\t\t// If any of the very bad strings are in the submitted value, return an empty string:\n\t\tforeach ($very_bad as $v) {\n\t\t\tif (stripos($value, $v) !== false) return '';\n\t\t}\n\t\t\n\t\t// Replace any newline characters with spaces:\n\t\t$value = str_replace(array( \"\\r\", \"\\n\", \"%0a\", \"%0d\"), ' ', $value);\n\t\t\n\t\t// Return the value:\n\t\treturn trim($value);\n\t\n\t}", "title": "" }, { "docid": "1f92623761b92d750de4c9df433de08b", "score": "0.5395119", "text": "function validEmail($email)\n{\n\t$isValid = true;\n\t$atIndex = strrpos($email, \"@\");\n\tif (is_bool($atIndex) && !$atIndex)\n\t{\n\t\t$isValid = false;\n\t} else\n\t{\n\t\t$domain = substr($email, $atIndex +1);\n\t\t$local = substr($email, 0, $atIndex);\n\t\t$localLen = strlen($local);\n\t\t$domainLen = strlen($domain);\n\n\t\tif ($localLen < 1 || $localLen > 64)\n\t\t{\n\t\t\t// local part length exceeded\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif ($domainLen < 1 || $domainLen > 255)\n\t\t{\n\t\t\t// domain part length exceeded\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif ($local[0] == '.' || $local[$localLen -1] == '.')\n\t\t{\n\t\t\t// local part starts or ends with '.'\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif (preg_match('/\\\\.\\\\./', $local))\n\t\t{\n\t\t\t// local part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif (!preg_match('/^[A-Za-z0-9\\\\-\\\\.]+$/', $domain))\n\t\t{\n\t\t\t// character not valid in domain part\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif (preg_match('/\\\\.\\\\./', $domain))\n\t\t{\n\t\t\t// domain part has two consecutive dots\n\t\t\t$isValid = false;\n\t\t} else\n\t\tif (!preg_match('/^(\\\\\\\\.|[A-Za-z0-9!#%&`_=\\\\/$\\'*+?^{}|~.-])+$/', str_replace(\"\\\\\\\\\", \"\", $local)))\n\t\t{\n\t\t\t// character not valid in local part unless\n\t\t\t// local part is quoted\n\t\t\tif (!preg_match('/^\"(\\\\\\\\\"|[^\"])+\"$/', str_replace(\"\\\\\\\\\", \"\", $local)))\n\t\t\t{\n\t\t\t\t$isValid = false;\n\t\t\t}\n\t\t}\n\t\tif ($isValid && !(checkdnsrr($domain, \"MX\") || checkdnsrr($domain, \"A\")))\n\t\t{\n\t\t\t// domain not found in DNS\n\t\t\t$isValid = false;\n\t\t}\n\t}\n\treturn $isValid;\n}", "title": "" }, { "docid": "74e0247add89dac9fd2bd468047adbd4", "score": "0.53935426", "text": "function theme_slug_sanitize_email( $email, $setting ) {\n \t$email = sanitize_email( $email );\n\n \t// If $email is a valid email, return it; otherwise, return the default.\n \treturn ( ! is_null( $email ) ? $email : $setting->default );\n }", "title": "" } ]
dd3f93a3f94d9436f9f7753bfc9d0a2b
Updating wallet balance $opt = option to perform
[ { "docid": "b369abcb59b3a5459b5eff14c8668d23", "score": "0.7192098", "text": "public function update_balance($id,$amt,$opt){ \n if($opt==0){\n $this->db->trans_start();\n $balance = $this->db->where('mobileno',$id)->get('user_wallet')->row_array();\n $total = intval($balance['recharge_wallet']) - intval($amt);\n $mothly_limit=intval($balance['month_limit'])+intval($amt);\n $table_data_update=array('recharge_wallet' => $total,'month_limit'=>$mothly_limit);\n $this->db->where('mobileno',$id)->update('user_wallet',$table_data_update);\n $this->db->trans_complete();\n if($this->db->trans_status()){\n return true;\n }else{\n return false;\n }\n }\n else if($opt==1){\n $this->db->trans_start();\n $balance = $this->db->where('mobileno',$id)->get('user_wallet')->row_array();\n $refer = intval($balance['refferal_wallet']) - intval($amt);\n $rech = intval($balance['recharge_wallet']) + intval($amt);\n $this->db->where('mobileno',$id)->update('user_wallet',array('recharge_wallet' => $rech,'refferal_wallet'=>$refer));\n $this->db->trans_complete();\n if($this->db->trans_status()){\n return true;\n }else{\n return false;\n }\n }\n \n }", "title": "" } ]
[ { "docid": "fe9cb56275249e62c040c39462ec69a7", "score": "0.5888375", "text": "function update() {\n\t\t\t\tupdate_option($this->name, Params::get($this->name, ''));\n\t\t\t}", "title": "" }, { "docid": "ecf32cd68b0c0a34f8af9bfa6e23f4c8", "score": "0.58208287", "text": "public function edit(Wallet $wallet)\n {\n echo \"edit\";die;\n }", "title": "" }, { "docid": "75445285247e28d4dd744de1afce70c2", "score": "0.56709594", "text": "public function update($budget);", "title": "" }, { "docid": "e9b4cf57943e36eccfa9fae1bcbf8bc5", "score": "0.5649046", "text": "public function edit(Wallet $wallet)\n {\n //\n }", "title": "" }, { "docid": "7f05e5a7c37397d8c6ed0aa1ff3d105c", "score": "0.56466913", "text": "function updateEmployeeBalance($id, $amt, $increse = true) {\r\n\r\n // Getting connection object.\r\n $connect = $GLOBALS['connect'];\r\n // Getting employee balance\r\n $balance = getEmployeeBalance($id);\r\n\r\n // increase or decrease\r\n if($increse) {\r\n $totalBalance = $balance + $amt;\r\n }\r\n else {\r\n $totalBalance = $balance - $amt;\r\n }\r\n // Query for update balance\r\n $query = \"UPDATE employee_balance SET balance=$totalBalance WHERE emp_id=$id\";\r\n // Executing the query\r\n $result = mysqli_query($connect, $query) or die(mysqli_error($connect));\r\n}", "title": "" }, { "docid": "bda9874965247fd2cc182abf837dca3a", "score": "0.5641692", "text": "public function testUpdateAdditionalCost()\n {\n }", "title": "" }, { "docid": "cab364dfaf5f656c8682cb7bae57f719", "score": "0.56360894", "text": "public function update(Request $request, Wallet $wallet)\n {\n //\n }", "title": "" }, { "docid": "cab364dfaf5f656c8682cb7bae57f719", "score": "0.56360894", "text": "public function update(Request $request, Wallet $wallet)\n {\n //\n }", "title": "" }, { "docid": "4064c42324cba074d6b02a24edf57207", "score": "0.5567966", "text": "public function adjustBalance(Request $request){\n //validate input\n // transaction type 1:Topup 2:topdown\n $validator = Validator::make($request->all(), [\n 'msisdn' => 'required|string|min:12|max:12',\n 'transactiontype' => 'required|int',\n 'amount' => 'required|int'\n\n ]);\n\n if ($validator->fails()){\n return response()->json(['error'=>$validator->errors()], 401);\n }\n\n // Begin transaction\n DB::beginTransaction();\n\n //find subscriber\n try{\n\n $msisdn = msisdn::where('msisdn', '=', $request['msisdn'])->lockForUpdate()->firstOrFail();\n\n }\n catch ( ModelNotFoundException $e) {\n return response()->json(['status'=>'0', 'data'=>'Subscriber not found']);\n }\n\n //check transaction type\n if($request['transactiontype'] == 1){\n\n try{\n $new_balance = $msisdn->balance + $request['amount'];\n $msisdn->update(['balance' => $new_balance]);\n\n DB::commit();\n }\n catch (Exceptions $e) {\n DB::rollBack();\n return response()->json(['error'=>'An error occured, please try again']);\n }\n\n\n }\n elseif($request['transactiontype'] == 0){\n if($msisdn->balance >= $request['amount']){\n\n\n try{\n $new_balance = $msisdn->balance - $request['amount'];\n $msisdn->update(['balance'=>$new_balance]);\n DB::commit();\n }\n catch (Exceptions $e) {\n DB::rollBack();\n return response()->json(['error'=>'An error occured, please try again']);\n }\n\n return response()->json(['status'=>'1', 'data'=>'Transaction successful']);\n }\n else{\n return response()->json(['status'=>'0', 'data'=>'Transaction not possible']);\n }\n }\n else{\n return response()->json(['status'=>'0', 'data'=>'Your transaction type is incorrect. Option is 1 for top up and 0 for debit']);\n }\n\n\n return response()->json(['status'=>'1', 'data'=>'Transaction successful']);\n }", "title": "" }, { "docid": "a067881e46e549614279ad7a661cf343", "score": "0.55508626", "text": "public function updateWallet($identifier, $data);", "title": "" }, { "docid": "abd4a0b3674459b3361662f1c43005c8", "score": "0.5515877", "text": "function updateDepositCash($amount, $username, $is_credit){\n if($is_credit){\n $update_user = \"UPDATE users SET deposit_cash = deposit_cash + $amount WHERE username = '$username' \";\n $this->con->query($update_user); \n }\n else{\n $update_user = \"UPDATE users SET deposit_cash = deposit_cash - $amount WHERE username = '$username' \";\n $this->con->query($update_user);\n }\n }", "title": "" }, { "docid": "1d8158c5b81e03b393f72b099d8bf361", "score": "0.5511377", "text": "function pay_using_wallet($user_master_id, $service_order_id)\n {\n $query = \"SELECT * FROM user_wallet WHERE user_master_id='$user_master_id'\";\n $result = $this\n ->db\n ->query($query);\n if ($result->num_rows() == 0)\n {\n $wallet_amount = '0';\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"No balance\",\n \"msg_en\" => \"No balance\",\n \"msg_ta\" => \"No balance\"\n );\n }\n else\n {\n foreach ($result->result() as $rows)\n {\n }\n $wallet_amount = $rows->amt_in_wallet;\n if ($wallet_amount == '0.00')\n {\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"No balance\",\n \"msg_en\" => \"No balance\",\n \"msg_ta\" => \"No balance\"\n );\n }\n else\n {\n $get_payment = \"SELECT * FROM service_payments WHERE service_order_id='$service_order_id'\";\n $res_payment = $this\n ->db\n ->query($get_payment);\n foreach ($res_payment->result() as $rows)\n {\n }\n $payable_amt = $rows->payable_amount;\n\n if ($payable_amt >= $wallet_amount)\n {\n $detected_amt = $wallet_amount;\n $finalamount = $payable_amt - $wallet_amount;\n $payable_balance = $finalamount;\n $update_wallet = \"UPDATE user_wallet SET amt_in_wallet='0',total_amt_used=total_amt_used+'$wallet_amount',updated_at=NOW() where user_master_id='$user_master_id'\";\n\n }\n else\n {\n\n $finalamount = $wallet_amount - $payable_amt;\n $wallet_balance = $finalamount;\n $detected_amt = $payable_amt;\n $update_wallet = \"UPDATE user_wallet SET amt_in_wallet='$wallet_balance',total_amt_used=total_amt_used+'$detected_amt',updated_at=NOW() where user_master_id='$user_master_id'\";\n }\n\n $res_update = $this\n ->db\n ->query($update_wallet);\n $ins_history = \"INSERT INTO wallet_history (user_master_id,transaction_amt,status,notes,created_at) VALUES ('$user_master_id','$detected_amt','Debited','Debited for Service',NOW())\";\n $res = $this\n ->db\n ->query($ins_history);\n $update_service_payment = \"UPDATE service_payments SET wallet_amount='$detected_amt' where service_order_id='$service_order_id'\";\n $res_payment = $this\n ->db\n ->query($update_service_payment);\n if ($res_payment)\n {\n $response = array(\n \"status\" => \"success\",\n \"msg\" => \"Paid from wallet\",\n \"msg_en\" => \"Paid from wallet\",\n \"msg_ta\" => \"Paid from wallet\"\n );\n }\n else\n {\n $response = array(\n \"status\" => \"error\",\n \"msg\" => \"Something went wrong\",\n \"msg_en\" => \"Something went wrong\",\n \"msg_ta\" => \"Something went wrong\"\n );\n }\n\n }\n }\n return $response;\n\n }", "title": "" }, { "docid": "b947ad617ce63d72ab1366dc5255d673", "score": "0.54938996", "text": "function updateBonusCash($amount, $username, $is_credit){\n if($is_credit){\n $update_user = \"UPDATE users SET bonus_cash = bonus_cash + $amount WHERE username = '$username' \";\n $this->con->query($update_user); \n }\n else{\n $update_user = \"UPDATE users SET bonus_cash = bonus_cash - $amount WHERE username = '$username' \";\n $this->con->query($update_user);\n }\n }", "title": "" }, { "docid": "2b225e856c238bbd704828f8d879d31d", "score": "0.5482036", "text": "public function generateUpdateAccountRequest() {\n //print \"8\";exit;//\n try {\n $profile = $this->getUpopPaymentProfile();\n if ($profile) {\n $hasEncryption = $this->_hasEncryption();\n\n $key = $this->_getConfig('key', 'upop_general');\n $encryption = $hasEncryption ? '1' : '0';\n $request = $this->_getRootNode();\n $transaction = $request->addChild('TRANSACTION');\n $fields = $transaction->addChild('FIELDS');\n $fields->addChild('SERVICE', 'WALLET');\n $fields->addChild('SERVICE_TYPE', 'ACCOUNT');\n $fields->addChild('SERVICE_SUBTYPE', 'MODIFY');\n $fields->addChild('SERVICE_FORMAT', '1010');\n $fields->addChild('TERMINAL_ID', $this->_getConfig('terminal_id', 'upop_general'));\n $fields->addChild('PIN', $this->_getConfig('pin', 'upop_general'));\n $fields->addChild('ACCOUNT_ID', $profile->getAccountId());\n $fields->addChild('ACCOUNT_NUMBER', $profile->getCardNumber());\n $fields->addChild('TRANSACTION_INDICATOR', '7');\n $fields->addChild('EXPIRATION', $this->_getCcExpiration($profile->getExpirationMonth(), $profile->getExpirationYear()));\n $fields->addChild('CVV', $profile->getCardCode());\n //$fields->addChild('FESP_IND', '9');\n //Sending Few Additional data to Gateway\n $this->addAdditionalData($fields, true);\n\n $this->setTransactionForLog($request);\n\n\n if ($hasEncryption) {\n $this->_encryptRequest($request);\n } else {\n $fields->addChild('PIN', $this->_getConfig('terminal_id', 'pin'));\n }\n\n $this->setTransaction($request);\n } else {\n Mage::log(\"failed to update payment profile\", null, PlanetPayment_Upop_Model_Upop::LOG_FILE);\n Mage::throwException(\"failed to update payment profile\");\n }\n } catch (Exception $e) {\n Mage::log($e->getmessage(), null, PlanetPayment_Upop_Model_Upop::LOG_FILE);\n Mage::throwException($e->getmessage());\n }\n\n return $this;\n }", "title": "" }, { "docid": "1f623d111237869c6958cd12263228bd", "score": "0.544301", "text": "public function update_account($acct_no,$avail_bal,$previous_bal)\n\t{\n\t\t$change_by = $this->session->userdata('usrname');\n\t\t$data = array(\n\t\t\t\t\t\t'LEDGER_BAL'\t\t\t\t=> $avail_bal,\n\t\t\t\t\t\t'ACTUAL_BAL'\t\t\t\t=> $avail_bal,\n\t\t\t\t\t\t'CALC_BAL'\t\t\t\t\t=> $avail_bal,\n\t\t\t\t\t\t'PREV_DAY_LEDGER_BAL'\t\t=> $previous_bal,\n\t\t\t\t\t\t'PREV_DAY_ACTUAL_BAL'\t\t=> $previous_bal,\n\t\t\t\t\t\t'PREV_DAY_CALC_BAL'\t\t\t=> $previous_bal,\n\t\t\t\t\t\t'LAST_CHANGE_OFFICER'\t\t=> $change_by ,\n\t\t\t\t\t\t'LAST_CHANGE_DATE'\t\t\t=> date('Y-m-d'),\n\t\t\t\t\t\t'LAST_BAL_UPDATE'\t\t\t=> date('Y-m-d')\n\t\t\t\t\t);\n\t\treturn $this->db->update($this->table, $data,array( 'ACCT_NO' => $acct_no));\n\t}", "title": "" }, { "docid": "e94735237597ee5042f41086a6865017", "score": "0.5442263", "text": "public function updateWallet($userId, $amount) {\n\t\t$this->id = $userId;\n\t\t$user = $this->findById($userId);\n\n\t\t$this->saveField('wallet', $user['User']['wallet']+$amount);\n\n\t}", "title": "" }, { "docid": "e76b5b992ce1ddba97666879848b9644", "score": "0.5431405", "text": "public function testUpdateShopAccountRequest()\n {\n }", "title": "" }, { "docid": "bab82e9bc7f86a0473889c0425fa2367", "score": "0.54075396", "text": "public function update(WalletUpdateRequest $request, Wallet $wallet)\n {\n $wallet->balance += $request->get('balance');\n $wallet->save();\n // Save transaction to database\n transaction(Transaction::FILLED, Auth::id(), Auth::id(), $wallet->id, $request->balance);\n\n return redirect()->route('wallets.index')->withStatus('Amount added to balance');\n }", "title": "" }, { "docid": "229572919d663eb4c21cfdd089eaf7c8", "score": "0.5393514", "text": "public function withdraw($coinName, $amount, $address);", "title": "" }, { "docid": "669c18afd0db9d6a851b2f5d288ab166", "score": "0.53871566", "text": "protected function changeBalance()\n\t{\n\t\t$amount = $this->getAmount();\n\n\t\t$balance = AccountantFactory::balance()->getBalance();\n\n\t\t$balance = ($this->status == '+')\n\t\t\t? $balance + $amount\n\t\t\t: $balance - $amount;\n\n\t\tAccountantFactory::balance()->setBalance($balance);\n\n\t\treturn $balance;\n\t}", "title": "" }, { "docid": "dfd12da28338a18732e26c6ef198328b", "score": "0.5386061", "text": "public function update_special_offer(){\n\t\t$query = \"update `\" . $this->table_name . \"` set `option_value`='\" . $this->option_value . \"' where `option_name`='\" . $this->option_name . \"'\";\n\t\t$result = mysqli_query($this->conn, $query);\n\t\treturn $result;\n }", "title": "" }, { "docid": "387cb78ac8efec32368628b11414b84c", "score": "0.5370433", "text": "private function updateUserWallet($amount){\n //lets make sure its the same user and they are still logged in\n $userManager = $this->container->get('fos_user.user_manager');\n $auth_checker = $this->get('security.authorization_checker');\n $token = $this->get('security.token_storage')->getToken();\n $user = $token->getUser();\n \n // $user = $userManager->findUserBy(array('id'=>$user));\n $hasCred = $user->getCredit();\n $newCredit = $hasCred - $amount;\n $user->setCredit($newCredit);\n $thedata = $userManager->updateUser($user, true);\n \n return true;\n \n }", "title": "" }, { "docid": "9af1fbd6e09e64e488d5d6e3d15ae8c2", "score": "0.5348151", "text": "public function update($powerAccount);", "title": "" }, { "docid": "90a99caaca78120cbb0ac60535006f71", "score": "0.53354234", "text": "public function sAccountUpdate(Request $request, $id){\n $mainIdSoa = DnoFoundationIncStatementOfAccount::find($request->mainId);\n\n $compute = $mainIdSoa->total_remaining_balance - $request->paidAmount;\n \n $mainIdSoa->total_remaining_balance = $compute; \n $mainIdSoa->save();\n \n $statementAccountPaid = DnoFoundationIncStatementOfAccount::find($request->id);\n $statementAccountPaid->paid_amount = $request->paidAmount;\n $statementAccountPaid->status = $request->status;\n $statementAccountPaid->collection_date = $request->collectionDate;\n $statementAccountPaid->check_number = $request->checkNumber;\n $statementAccountPaid->check_amount = $request->checkAmount;\n $statementAccountPaid->or_number = $request->orNumber;\n $statementAccountPaid->payment_method = $request->payment;\n \n $statementAccountPaid->save();\n \n return response()->json('Success: paid successfully');\n }", "title": "" }, { "docid": "fb4f333844c52c1804dcee43d2de6a30", "score": "0.5323674", "text": "public function consoleUpdateAction()\n\t\t{\n\t\t\t// hopefully doesn't make it less secure!\n\t\t\t$p = $this->getRequest()->getParams();\n\n\t\t\t// required input\n\t\t\t$secretInner = array_key_exists('secretinner', $p) ? $p['secretinner'] : '';\n\t\t\t$secret = array_key_exists('secret', $p) ? $p['secret'] : '';\n\n\t\t\t$actualSecret = Mage::getStoreConfig('fanplayrsocialcoupons/config/secret');\n\t\t\t$actualSecretInner = Mage::getStoreConfig('fanplayrsocialcoupons/config/secret_inner');\n\n\t\t\tif (empty($secret) || empty($secretInner)) {\n\t\t\t\techo $this->jsonMessage(true, \"Error. Needs 'secret' and 'super secret'!\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($actualSecret != $secret || $secretInner != $actualSecretInner) {\n\t\t\t\techo $this->jsonMessage(true, \"Error. Either your 'secret' or 'super secret' are incorrect.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// -----------------------------\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/secret', array_key_exists('secretnew', $p) ? $p['secretnew'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/acc_key', array_key_exists('acckeynew', $p) ? $p['acckeynew'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/shop_id', array_key_exists('shopid', $p) ? $p['shopid'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/widget_keys', array_key_exists('gamafied', $p) ? $p['gamafied'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/widget_keys_genius', array_key_exists('genius', $p) ? $p['genius'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/custom_url', array_key_exists('url', $p) ? $p['url'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/disable_on_urls', array_key_exists('disableonurls', $p) ? $p['disableonurls'] : '', false);\n\n\t\t\t// a bit of a hack, used to be \"waitforonload\" but is now used for \"embedtype\"\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/wait_for_onload', (array_key_exists('embedtype', $p) ? $p['embedtype'] : '0'), false);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/layout_hook', (array_key_exists('layouthook', $p) ? $p['layouthook'] : 'content'), false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/layout_hook_home', (array_key_exists('layouthookhome', $p) ? $p['layouthookhome'] : 'content'), false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/layout_hook_order', (array_key_exists('layouthookorder', $p) ? $p['layouthookorder'] : 'content'), false);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/dep_prefix', array_key_exists('depprefix', $p) ? $p['depprefix'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/dep_extra_rewrite_routes', array_key_exists('deproutes', $p) ? $p['deproutes'] : '', false);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/gtm_container_id', array_key_exists('gtmcontainerid', $p) ? $p['gtmcontainerid'] : '', false);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/custom_embed_url', array_key_exists('customembedurl', $p) ? $p['customembedurl'] : '', false);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/custom_embed_url_post', array_key_exists('customembedurlpost', $p) ? $p['customembedurlpost'] : '', false);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/use_tbuy', array_key_exists('usetbuy', $p) ? $p['usetbuy'] : '', true);\n\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking', array_key_exists('disableuseridentitytracking', $p) ? $p['disableuseridentitytracking'] : '', true);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/coupon_apply_utm', array_key_exists('couponapplyutm', $p) ? $p['couponapplyutm'] : '', true);\n\t\t\t$this->updateConfig('fanplayrsocialcoupons/config/disable_atc_empty', array_key_exists('disableatcempty', $p) ? $p['disableatcempty'] : '', true);\n\n\t\t\t//$this->addNotice('Fanplayr details updated.');\n\t\t\techo $this->jsonMessage(false, 'Fanplayr details updated\".');\n\t\t}", "title": "" }, { "docid": "eecd90ab398522cb0cbb6dc5f6212173", "score": "0.53125465", "text": "function editBankInfo()\n {\n global $CFG, $objSmarty;\n\n $res_bank_name = $this->filterInput($_POST['res_bank_name']);\n $res_ac_no = $this->filterInput($_POST['res_ac_no']);\n $res_routine_no = $this->filterInput($_POST['res_routine_no']);\n $res_swift_code = $this->filterInput($_POST['res_swift_code']);\n\n $upd_rest = \"UPDATE \" . $CFG['table']['restaurant'] . \" SET\n\t\t\t\t\t\t\t res_bank_name\t\t= '\" . $this->filterInput($res_bank_name) . \"',\n\t\t\t\t\t\t\t res_ac_no \t\t\t= '\" . $this->filterInput($res_ac_no) . \"',\n\t\t\t\t\t\t \tres_routine_no\t\t= '\" . $this->filterInput($res_routine_no) . \"',\n\t\t\t\t\t\t \tres_swift_code\t\t= '\" . $this->filterInput($res_swift_code) . \"'\n\t\t\t\t\t\t\tWHERE restaurant_id = '\" . $this->filterInput($_SESSION['restaurantownerid']) . \"' \";\n $upd_res_rest = $this->ExecuteQuery($upd_rest, 'update');\n echo 'success';\n\n }", "title": "" }, { "docid": "6d402ffd946c626b53dc3ad97084b9d0", "score": "0.5306825", "text": "public function updateBalance(TopUpPostRequest $request)\n {\n\t\t$amount = $request->validated()['amount'];\n\t\t$wallet = Auth::user()->wallet;\n\t\t\n\t\ttry{\n\t\t\t$this->walletService->updateBalance($wallet, $amount);\n\t\t} catch (Exception $ex) {\n\t\t\t\\Session::flash('flash_error', 'updating balance error');\n\t\t}\n\t\treturn redirect()->route('showBalance');\n }", "title": "" }, { "docid": "c48a2dee09219e1a71ec7abd8daf46f3", "score": "0.5293622", "text": "function add_to_admin_pending_balance($adminid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM admin WHERE uniqueid='$adminid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $pending_balance = $row['pendingbalance'];\n\n $pending_balance = $pending_balance + $amount;\n\n $sql1 = \"UPDATE admin SET pendingbalance=$pending_balance WHERE uniqueid='$adminid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "400bcca3cb924432526efb3158b3ac53", "score": "0.52829057", "text": "public static function updateWallet($dbobj, $wid){\n $sql = \"update wallets set current_balance = (\n select sum(current_balance) from wallet_activities\n where wallet_id = $wid and status != 127\n ) where id = $wid\";\n $dbobj->query($sql, $dbobj);\n\n $sql = \"update wallets set available_balance = (\n select sum(available_balance) from wallet_activities\n where wallet_id = $wid and status != 127\n ) where id = $wid\";\n $dbobj->query($sql, $dbobj);\n }", "title": "" }, { "docid": "45c004b70641f3f9efd699d38c3c8d7f", "score": "0.5282659", "text": "public function payFee()\n {\n $account = $this->getAccount();\n $account -= ($account * 0.0140);\n $this->setAccount($account);\n }", "title": "" }, { "docid": "fe35a0acdbada6c573d765dc5995f99b", "score": "0.5276764", "text": "public function update(Request $request, Option $option)\n {\n //\n }", "title": "" }, { "docid": "aea608b2bd760f19d9f249567e66c406", "score": "0.52686447", "text": "function alt_update_option($opt_key,$opt_val,$opt_group){ \n // get options-data as it exists before update\n $options = get_option($opt_group);\n // update it\n $options[$opt_key] = $opt_val;\n // store updated data\n update_option($opt_group,$options);\n}", "title": "" }, { "docid": "489798ce919dd46e21881e6f4b98aaea", "score": "0.5263187", "text": "public function update_gateway_information($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\n\t\treturn $this->authenticate('UpdateGatewayInformation', $opt);\n\t}", "title": "" }, { "docid": "9b049aca826c3003365a5db65bf746f9", "score": "0.5262382", "text": "public function testUpdateLoyaltyCard()\n {\n }", "title": "" }, { "docid": "0bb46cc51f05e809233f6f8ba2dcee08", "score": "0.52509665", "text": "private function updatePayable() {\n $order_off = abs(config('productcart.round_off'));\n if ($order_off <= 1) {\n switch ($order_off) {\n case .05:\n $this->payable = round($this->total + .05, 1);\n break;\n case .1 :\n $this->payable = round($this->total, 1);\n break;\n case .5 :\n $this->payable = round($this->total + .5, 1);\n break;\n case 1:\n $this->payable = round($this->total);\n break;\n default :\n $this->payable = $this->total;\n }\n } else {\n $this->payable = $this->total;\n }\n $this->round_off = round($this->payable - $this->total, 2);\n }", "title": "" }, { "docid": "131f77c1449389f8a4876a12f598e8ad", "score": "0.52258015", "text": "public function update_account()\n {\n $v_id = trim(get_post_var('hdn_item_id'));\n $v_status = trim(get_post_var('sel_status',''));\n $v_reason = trim(get_post_var('txt_reason',''));\n $this->model->update_account($v_id,$v_status,$v_reason);\n \n }", "title": "" }, { "docid": "4a14f2a5979fcef53fdf755023597ec8", "score": "0.5220117", "text": "function add_to_admin_active_balance($adminid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM admin WHERE uniqueid='$adminid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $active_balance = $row['activebalance'];\n\n $active_balance = $active_balance + $amount;\n\n $sql1 = \"UPDATE admin SET activebalance=$active_balance WHERE uniqueid='$adminid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "80d77e1e23565b87efd9110361257fe8", "score": "0.520647", "text": "public function updateBalance(IAccount $account): void\n {\n $sql = 'UPDATE user_account SET `balance` = :balance WHERE id = :id AND `user_id` = :user_id LIMIT 1';\n\n $stmt = $this->connection->prepare($sql);\n \n $stmt->execute([\n ':balance' => $account->getBalance(),\n ':id' => $account->getId(),\n ':user_id' => $account->getUserId(),\n ]);\n }", "title": "" }, { "docid": "076813fa77ff72707a5d18a0c03f30ad", "score": "0.5196537", "text": "public function updateBalance(request $request, $id)\n { \n \n abort_if(Gate::denies('people_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $data=array();\n $data['balance']=$request->balance;\n DB::table('people')->where('id',$id)->update($data);\n return redirect()->route('person.index'); \n }", "title": "" }, { "docid": "d1e426ff3b6fd894c73fae256ed6496e", "score": "0.5191501", "text": "function update_option( $optionName, $optionValue ) {\n \n return update_option( $optionName, $optionValue );\n \n }", "title": "" }, { "docid": "a9ffaa30b679b4f3b3e203b08e388e3e", "score": "0.5187652", "text": "function userpro_vk_set_option($option, $newvalue){\n\t\t$settings = get_option('userpro_vk');\n\t\t$settings[$option] = $newvalue;\n\t\tupdate_option('userpro_vk', $settings);\n\t}", "title": "" }, { "docid": "0a176230269c66359baa4dd62c033e5f", "score": "0.5178029", "text": "public function save_balance($value){\n\t\tparent::save_balance($value);\n\t}", "title": "" }, { "docid": "5a7bd7949d5f93ad3b5cdabcb6930001", "score": "0.5174623", "text": "function updateAccount() {\n\t\t$merchantInfo = merchantCore::getMerchantInfo();\n\t\t$member = new member($merchantInfo['id']);\n\t\t$member->makeRequired('first');\n\t\t$member->makeRequired('last');\n\t\t$member->makeRequired('address1');\n\t\t$member->makeRequired('city');\n\t\t$member->makeRequired('state');\n\t\t$member->makeRequired('country');\n\t\t$member->makeRequired('postal');\n\t\t$member->set('first', getPost('first'));\n\t\t$member->set('last', getPost('last'));\n\t\t$member->set('phone', getPost('phone'));\n\t\t$member->set('address1', getPost('address1'));\n\t\t$member->set('address2', getPost('address2'));\n\t\t$member->set('city', getPost('city'));\n\t\t$member->set('postal', getPost('postal'));\n\t\t$member->set('country', getPost('country'));\n\t\t$state = getPost('state', 'alphanum');\n\t\tif ($state) {\n\t\t\t$member->set('state', getPost('state'));\n\t\t} else {\n\t\t\t$member->set('state', getPost('province'));\n\t\t}\n\t\t$currentPassword = getPost('currentPassword');\n\t\t$newPassword = getPost('newPassword');\n\t\t$confirmPassword = getPost('confirmPassword');\n\t\tif ($currentPassword || $newPassword || $confirmPassword) {\n\t\t\t$currentPassword = clean($currentPassword, 'password');\n\t\t\t$newPassword = clean($newPassword, 'password');\n\t\t\t$confirmPassword = clean($confirmPassword, 'password');\n\t\t\tif ($newPassword && $newPassword == $confirmPassword) {\n\t\t\t\tif ($member->verifyExistingPassword($currentPassword)) {\n\t\t\t\t\t$member->set('password', \"PASSWORD('\".$newPassword.\"')\", false);\n\t\t\t\t\t$member->enclose('password', false);\n\t\t\t\t} else {\n\t\t\t\t\t$member->set('password', '');\n\t\t\t\t\taddError('Current password does not match');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$member->set('password', '');\n\t\t\t\taddError('New password does not match confirmation');\n\t\t\t}\n\t\t}\n\t\t$memberBusinessInfo = membersController::getMemberBusinessInfo($member->get('memberID'));\n\t\t$memberBusinessInfo->set('company', getPost('company'));\n\t\t$memberBusinessInfo->set('fax', getPost('fax'));\n\t\t$memberBusinessInfo->set('website', getPost('website'));\n\t\t$memberBusinessInfo->set('taxID', getPost('taxID'));\n\t\t$memberBusinessInfo->set('industry', getPost('industry'));\n\t\t$memberBusinessInfo->set('description', getPost('description'));\n\t\t$memberBusinessInfo->set('payTo', getPost('payTo'));\n\t\t$memberBusinessInfo->set('im', getPost('im'));\n\t\t$existingEmail = $member->get('email');\n\t\t$email = getPost('email');\n\t\tif (validEmail($email)) {\n\t\t\t$member->set('email', getPost('email'));\n\t\t} else {\n\t\t\t$member->set('email', '');\n\t\t}\n\t\tif ($email == $existingEmail || ($email != $existingEmail && !membersController::memberExists($email))) {\n\t\t\tif ($member->update()) {\n\t\t\t\taddSuccess('Contact information updated successfully');\n\t\t\t\tif ($memberBusinessInfo->exists()) {\n\t\t\t\t\tif (!$memberBusinessInfoSaved = $memberBusinessInfo->update()) {\n\t\t\t\t\t\taddError('There was an error while updating your business information');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$memberBusinessInfo->set('memberID', $member->get('memberID'));\n\t\t\t\t\tif (!$memberBusinessInfoSaved = $memberBusinessInfo->save()) {\n\t\t\t\t\t\taddError('There was an error while saving your business information');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($memberBusinessInfoSaved) {\n\t\t\t\t\teditAccount();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\taddError('There is an existing account registered under the email address');\n\t\t}\n\t\t$memberBusinessInfo->assertRequired();\n\t\taddError('There was an error while updating your information');\n\t\t$member->set('email', getPost('email'));\n\t\t$controller = new membersController;\n\t\t$template = new template;\n\t\t$template->assignClean('merchantInfo', $merchantInfo);\n\t\t$template->assignClean('member', $member->fetchArray());\n\t\t$template->assignClean('memberBusinessInfo', $memberBusinessInfo->fetchArray());\n\t\t$template->assignClean('stateOptions', formObject::stateOptions());\n\t\t$template->assignClean('countryOptions', formObject::countryOptions());\n\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t$template->assignClean('payToOptions', memberBusinessInfo::payToOptions());\n\t\t$template->getMessages();\n\t\t$template->display('merchant/accountEdit.htm');\n\t}", "title": "" }, { "docid": "8ff5a75a7e42bccfb40de1b5860fbc93", "score": "0.5166806", "text": "public abstract function update(array $options=array());", "title": "" }, { "docid": "98e8b461872b7c95a900f01cc9da2a1a", "score": "0.51636094", "text": "function add_to_seller_pending_balance($sellerid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM sellers WHERE uniqueid='$sellerid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $pending_balance = $row['pendingbalance'];\n\n $pending_balance = $pending_balance + $amount;\n\n $sql1 = \"UPDATE sellers SET pendingbalance=$pending_balance WHERE uniqueid='$sellerid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "1d13050fe9c269f353d82015472ce175", "score": "0.51625323", "text": "public function update(Request $request)\n {\n $id = $this->validate($request, [\n 'id' => 'required|numeric',\n ])['id'];\n\n $data = $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'buy' => 'required|numeric',\n 'sell' => 'required|numeric',\n 'minimum' => 'required|numeric',\n 'reserve' => 'required|numeric',\n 'cost' => 'required|numeric',\n 'original_cost' => 'required|numeric',\n 'original_reserve' => 'required|numeric',\n 'wallet_img' => 'nullable|string',\n 'is_bd' => 'nullable'\n ]);\n $data['is_bd'] = (empty($data['is_bd']) ? false : true);\n $wallet = Wallet::find($id);\n $data['reserve'] = floatval($data['reserve']) + $wallet->reserve; // For avoid summation\n $data['original_reserve'] = floatval($data['original_reserve']) + $wallet->original_reserve; // For avoid summation\n if ($wallet->update($data)) {\n return back()->with(notification('success', 'Successfully Wallet Updated'));\n } else {\n return back()->with(notification('error', 'Something Went Wrong!'));\n }\n }", "title": "" }, { "docid": "d281aa0a2b1bdb3af730708546f53d09", "score": "0.5162334", "text": "private function update_option( $option_name, $option_value ) {\n\t\t\treturn update_option( $option_name, $option_value, false );\n\t\t}", "title": "" }, { "docid": "15ca2335b1cc4d1248585a2002ce3474", "score": "0.51509815", "text": "public function update(Request $request, Billing $billing)\n {\n $data = $request->validate([\n// 'user_id' => ['required', 'exists:users,id'],\n// 'amount' => 'required|integer|max:200000|min:1',\n 'transfer_to_user_id' => ['required', 'exists:users,id'],\n 'transfer_amount' => 'required|integer|max:200000|min:1',\n ]);\n\n $transfer_from_id = $billing->user_id;\n $current_user_id = Auth::user()->id ?? 0;\n $get_user = User::find($transfer_from_id);\n $current_user_balance = $get_user->billing->amount ?? 0;\n\n if ($data['transfer_amount'] > $current_user_balance) {\n// dd($transfer_from_id);\n return redirect()->route('billing.edit', $transfer_from_id)\n ->withErrors([\"amount\" => \"You can't transfer more than your balance Rs {$current_user_balance}\"])\n ->withInput();\n }\n\n\n $bil = Billing::where('user_id', $data['transfer_to_user_id'])->first();\n if (!empty($bil)) {\n $total_balance = $bil->amount + $data['transfer_amount'];\n $bil->amount = $total_balance;\n $bil->save();\n } else {\n $create_data = [\n 'user_id' => $data['transfer_to_user_id'],\n 'amount' => $data['transfer_amount']\n ];\n Billing::create($create_data);\n }\n\n $remaining_updated_amount = $current_user_balance - $data['transfer_amount'];\n Billing::where('user_id', $transfer_from_id)\n ->update(['amount' => $remaining_updated_amount]);\n\n\n $data = [\n 'transfer_to_id' => $data['transfer_to_user_id'],\n 'transfer_from_id' => $transfer_from_id,\n 'transfer_by_id' => $current_user_id,\n 'transfer_amount' => $data['transfer_amount'],\n 'remain_after_transfer' => $remaining_updated_amount,\n ];\n\n TransactionHistory::create($data);\n\n return redirect()->route('billing.index')\n ->with('success', 'Amount updated successfully.');\n }", "title": "" }, { "docid": "95bd24de4461de40ae4dc63a4720ccc8", "score": "0.51490396", "text": "public function action_reset_balance() {\n\n\t\t\t// Type\n\t\t\tif ( ! isset( $_POST['type'] ) )\n\t\t\t\twp_send_json_error( 'Missing point type' );\n\n\t\t\t$type = sanitize_key( $_POST['type'] );\n\t\t\tif ( $type != $this->mycred_type ) return;\n\n\t\t\t// Security\n\t\t\tcheck_ajax_referer( 'mycred-management-actions', 'token' );\n\n\t\t\t// Access\n\t\t\tif ( ! is_user_logged_in() || ! $this->core->user_is_point_admin() )\n\t\t\t\twp_send_json_error( 'Access denied' );\n\n\t\t\tglobal $wpdb;\n\n\t\t\t$wpdb->delete(\n\t\t\t\t$wpdb->usermeta,\n\t\t\t\tarray( 'meta_key' => mycred_get_meta_key( $type, '' ) ),\n\t\t\t\tarray( '%s' )\n\t\t\t);\n\n\t\t\t$wpdb->delete(\n\t\t\t\t$wpdb->usermeta,\n\t\t\t\tarray( 'meta_key' => mycred_get_meta_key( $type, '_total' ) ),\n\t\t\t\tarray( '%s' )\n\t\t\t);\n\n\t\t\tdo_action( 'mycred_zero_balances', $type );\n\n\t\t\t// Response\n\t\t\twp_send_json_success( __( 'Accounts successfully reset', 'twodayssss' ) );\n\n\t\t}", "title": "" }, { "docid": "d528930b314b2bcf5bee2677ed4c7dac", "score": "0.51438", "text": "public function update( $data ) {\n\n\t\treturn update_option( $this->option_name, $data );\n\n\t}", "title": "" }, { "docid": "0dd942a0e4f28a7dcf782a563f6c4373", "score": "0.51299226", "text": "public function it_update_payment_paidat_with_options()\n {\n $this->creater->shouldReceive('getStore->getId')->andReturn(static::BSO_STORE_ID);\n $this->payment->shouldReceive('getAuction->getBsoStore->getId')->andReturn(static::BSO_STORE_ID);\n $this->payment->shouldReceive('setPaidAt')->passthru();\n $this->payment->shouldReceive('getPaidAt')->andReturn(new \\DateTime('2002-02-02 00:00:00'), new \\DateTime('2020-12-12 00:00:00'));\n $this->payment->shouldReceive('getMemo')->passthru();\n\n $options = [\n 'paidAt' => new \\DateTime('2020-12-12 00:00:00'),\n 'updater' => $this->creater\n ];\n\n $payment = $this->update($this->payment, $options);\n\n $payment->shouldHaveType('Woojin\\StoreBundle\\Entity\\AuctionPayment');\n $payment->getPaidAt()->shouldHaveType('DateTime');\n $payment->getPaidAt()->format('Y-m-d H:i:s')->shouldEqual('2020-12-12 00:00:00');\n $payment->getMemo()->shouldBeString();\n $payment->getMemo()->shouldStartWith('原付款時間2002-02-02');\n $payment->getMemo()->shouldEndWith('更新為2020-12-12<br>');\n }", "title": "" }, { "docid": "b0013603c1367fe8e2962be93411000b", "score": "0.5122203", "text": "public function adjust_decimal_places() {\n\n\t\t\t// Main point type = allow db adjustment\n\t\t\tif ( $this->is_main_type ) {\n\n?>\n<div><input type=\"number\" min=\"0\" max=\"20\" id=\"mycred-adjust-decimal-places\" class=\"form-control\" value=\"<?php echo esc_attr( $this->core->format['decimals'] ); ?>\" data-org=\"<?php echo $this->core->format['decimals']; ?>\" size=\"8\" /> <input type=\"button\" style=\"display:none;\" id=\"mycred-update-log-decimals\" class=\"button button-primary button-large\" value=\"<?php _e( 'Update Database', 'twodayssss' ); ?>\" /></div>\n<?php\n\n\t\t\t}\n\t\t\t// Other point type.\n\t\t\telse {\n\n\t\t\t\t$default = mycred();\n\t\t\t\tif ( $default->format['decimals'] == 0 ) {\n\n?>\n<div><?php _e( 'No decimals', 'twodayssss' ); ?></div>\n<?php\n\n\t\t\t\t}\n\t\t\t\telse {\n\n?>\n<select name=\"<?php echo $this->field_name( array( 'format' => 'decimals' ) ); ?>\" id=\"<?php echo $this->field_id( array( 'format' => 'decimals' ) ); ?>\" class=\"form-control\">\n<?php\n\n\t\t\t\t\techo '<option value=\"0\"';\n\t\t\t\t\tif ( $this->core->format['decimals'] == 0 ) echo ' selected=\"selected\"';\n\t\t\t\t\techo '>' . __( 'No decimals', 'twodayssss' ) . '</option>';\n\n\t\t\t\t\tfor ( $i = 1 ; $i <= $default->format['decimals'] ; $i ++ ) {\n\t\t\t\t\t\techo '<option value=\"' . $i . '\"';\n\t\t\t\t\t\tif ( $this->core->format['decimals'] == $i ) echo ' selected=\"selected\"';\n\t\t\t\t\t\techo '>' . $i . ' - 0.' . str_pad( '0', $i, '0' ) . '</option>';\n\t\t\t\t\t}\n\n\t\t\t\t\t$url = add_query_arg( array( 'page' => MYCRED_SLUG . '-settings', 'open-tab' => 0 ), admin_url( 'admin.php' ) );\n\n?>\n</select>\n<p><span class=\"description\"><?php printf( __( '<a href=\"%s\">Click here</a> to change your default point types setup.', 'twodayssss' ), esc_url( $url ) ); ?></span></p>\n<?php\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "3ed930aa43ccc790e769c1a7de5c22d8", "score": "0.5114387", "text": "public function testUpdatePrice();", "title": "" }, { "docid": "f5f9c3d9fb4f4b1688577cb2a568cf34", "score": "0.5093466", "text": "function _updateTransaction($dealUser)\r\n\t{\r\n\t\t//add amount to wallet\r\n\t\t$data['Transaction']['user_id'] = $dealUser['user_id'];\r\n\t\t$data['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n\t\t$data['Transaction']['class'] = 'SecondUser';\r\n\t\t$data['Transaction']['amount'] = $dealUser['discount_amount'];\r\n\t\t$data['Transaction']['transaction_type_id'] = ConstTransactionTypes::AddedToWallet;\r\n\t\t$data['Transaction']['payment_gateway_id'] = $dealUser['payment_gateway_id'];\t\t\r\n\t\t$transaction_id = $this->User->Transaction->log($data);\r\n\t\tif (!empty($transaction_id)) {\r\n\t\t\t$this->User->updateAll(array(\r\n\t\t\t\t'User.available_balance_amount' => 'User.available_balance_amount +' . $dealUser['discount_amount']\r\n\t\t\t) , array(\r\n\t\t\t\t'User.id' => $dealUser['user_id']\r\n\t\t\t));\r\n\t\t}\r\n\t\t//Buy deal transaction\r\n\t\t$transaction['Transaction']['user_id'] = $dealUser['user_id'];\r\n\t\t$transaction['Transaction']['foreign_id'] = $dealUser['id'];\r\n\t\t$transaction['Transaction']['class'] = 'DealUser';\r\n\t\t$transaction['Transaction']['amount'] = $dealUser['discount_amount'];\r\n\t\t$transaction['Transaction']['transaction_type_id'] = (!empty($dealUser['is_gift'])) ? ConstTransactionTypes::DealGift : ConstTransactionTypes::BuyDeal;\r\n\t\t$transaction['Transaction']['payment_gateway_id'] = $dealUser['payment_gateway_id'];\r\n\t\tif(!empty($dealUser['rate'])){\r\n\t\t\t$transaction['Transaction']['currency_id'] = $dealUser['currency_id'];\r\n\t\t\t$transaction['Transaction']['converted_currency_id'] = $dealUser['converted_currency_id'];\r\n\t\t\t$transaction['Transaction']['converted_amount'] = $dealUser['authorize_amt'];\r\n\t\t\t$transaction['Transaction']['rate'] = $dealUser['rate'];\r\n\t\t}\r\n\t\t$this->User->Transaction->log($transaction);\r\n\t\t//user update\r\n\t\t$this->User->updateAll(array(\r\n\t\t\t'User.available_balance_amount' => 'User.available_balance_amount -' . $dealUser['discount_amount']\r\n\t\t) , array(\r\n\t\t\t'User.id' => $dealUser['user_id']\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "fcdbbff43c62b5c407d13465b71c4c5d", "score": "0.5072589", "text": "function remove_from_admin_pending_balance($adminid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM admin WHERE uniqueid='$adminid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $pending_balance = $row['pendingbalance'];\n\n $pending_balance = $pending_balance - $amount;\n\n $sql1 = \"UPDATE admin SET pendingbalance=$pending_balance WHERE uniqueid='$adminid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "5f622492b973bfa1e3dbffd9997e7f43", "score": "0.5071565", "text": "function accountBalance($accountBalance,$newPayment){\n\t\t\t\treturn $accountBalance + $newPayment;\n\t\t\t}", "title": "" }, { "docid": "87a568de7076b0c40e9321d33a3cd7cf", "score": "0.50637823", "text": "public function update_payment() {\n \n }", "title": "" }, { "docid": "b5720c7c642ae4f85cceced05d9b33e0", "score": "0.50602156", "text": "public function update_bandwidth_rate_limit($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\n\t\treturn $this->authenticate('UpdateBandwidthRateLimit', $opt);\n\t}", "title": "" }, { "docid": "d712c8b0b732e4b739cf254b677977b6", "score": "0.5054975", "text": "public function chargeFromReserve($op) {\n\t\t\n\t\tif(!($op instanceof ChargeWalletOperation))\n\t\t\tthrow new TypeMismatchException(\"Invalid operation class\");\n\t\t\t\n\t\t$db =& $this->db;\n\t\t\n\t\t$db->query(\"start transaction\");\n\t\t$db->query(sprintf(\"select reserve as 'funds' from wallet_accounts where acc_id = %d\", $this->account_number));\n\t\tif(false === ($row = $db->fetch(ROW_ASSOC))) {\n\t\t\t$db->query(\"commit\");\n\t\t\tthrow new OutOfRangeException(\"Invalid account number: $account_number\");\n\t\t}\n\t\t\n\t\t$amount = $op->getAmountUnits();\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t$now = time();\n\t\t\t\n\t\t\t$transaction_id = $this->__get_seq_id();\n\t\t\t\n\t\t\t$op->perform($transaction_id, $this->account_number, $now);\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t$db->query(\"rollback\");\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\tif($amount <= $row['funds']) {\n\t\t\t$db->query(sprintf(\"update wallet_accounts set balance = balance - %.2f, reserve = reserve - %.2f, \n\t\t\t\t\tchange_tm = %d, last_trans_id = %d where acc_id = %d\", \n\t\t\t\t\t$amount, $amount, $now, $transaction_id, $this->account_number));\n\t\t\t$ret_code = OK;\n\t\t} else {\n\t\t\t$db->query(\"rollback\");\n\t\t\t$ret_code = ERROR;\n\t\t}\n\t\t$db->query(\"commit\");\n\t\t\n\t\treturn $ret_code;\t\t\n\t\t\n\t}", "title": "" }, { "docid": "974089635c5cf8ae6844e572f5c2577b", "score": "0.50531024", "text": "private function _update_credit( $credit )\n\t{\n\t\t$summary = get_option( self::DB_IMG_OPTM_SUMMARY, array() ) ;\n\n\t\tif ( empty( $summary[ 'credit' ] ) ) {\n\t\t\t$summary[ 'credit' ] = 0 ;\n\t\t}\n\n\t\tif ( $credit === '++' ) {\n\t\t\t$credit = $summary[ 'credit' ] + 1 ;\n\t\t}\n\n\t\t$old = $summary[ 'credit' ] ?: '-' ;\n\t\tLiteSpeed_Cache_Log::debug( \"[Img_Optm] Credit updated \\t\\t[Old] $old \\t\\t[New] $credit\" ) ;\n\n\t\t// Mark credit recovered\n\t\tif ( $credit > $summary[ 'credit' ] ) {\n\t\t\tif ( empty( $summary[ 'credit_recovered' ] ) ) {\n\t\t\t\t$summary[ 'credit_recovered' ] = 0 ;\n\t\t\t}\n\t\t\t$summary[ 'credit_recovered' ] += $credit - $summary[ 'credit' ] ;\n\t\t}\n\n\t\t$summary[ 'credit' ] = $credit ;\n\n\t\tupdate_option( self::DB_IMG_OPTM_SUMMARY, $summary ) ;\n\t}", "title": "" }, { "docid": "a7641fa0cbda89f850ac954f5bea5789", "score": "0.5052672", "text": "function add_to_seller_active_balance($sellerid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM sellers WHERE uniqueid='$sellerid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $active_balance = $row['activebalance'];\n\n $active_balance = $active_balance + $amount;\n\n $sql1 = \"UPDATE sellers SET activebalance=$active_balance WHERE uniqueid='$sellerid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "b5b984a9849f8aa8c4607652104bca31", "score": "0.505264", "text": "function togglePay() {\n\tglobal $MySelf;\n\t// Check the runID for validity.\n\tif (!numericCheck($_POST[runid])) {\n\t\tmakeNotice(\"That run ID is invalid.\", \"error\", \"Invalid RUN\");\n\t} else {\n\t\t$ID = $_POST[runid];\n\t\t$ID=sanitize($ID);\n\t}\n\tif ($Myself[isAccountant]) {\n\t\tmakeNotice(\"Only the supervisor of a run can lock and unlock his/her run.\", \"warning\", \"Unable to comply\", \"index.php?module=MiningMax&action=show&id=$_POST[runid]\", \"[Cancel]\");\n\t}\n\tconfirm(\"M&ouml;chtest Du die OP #$ID auszahlen?\",$_POST);\n\t$bool = \"1\";\n\t// Update the database!\n\tglobal $DB;\n #echo \"UPDATE runs SET isLocked='$bool' WHERE id='$ID' LIMIT 1\";\n\t$DB->query(\"UPDATE runs SET isLocked='$bool' WHERE id='$ID' LIMIT 1\");\n\t$good = $DB->affected_rows;\n\t// Success?\n\tif ($good == 1) {\n\t\theader(\"Location: \".URL_INDEX .'?module='.ACTIVE_MODULE);\n\t} else {\n\t\tmakeNotice(\"Unable to set the new locked status in the database. Be sure to run the correct sql schema!\", \"warning\", \"Cannot write to database.\");\n\t}\n\n}", "title": "" }, { "docid": "4263ba974ed7fc43e15c182ef5d616b5", "score": "0.50475764", "text": "public function paymentupdateAction(){\r\n\t\t//$sql = \"UPDATE web_admin SET IsActive='2' WHERE id = '\".$_REQUEST['id'].\"'\";\r\n\t\t//$qry = mysqli_query($this->con, $sql);\r\n\t\t//header('location: '.site_url.'/admin/user');\r\n\t\t//exit();\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "57403376e26c2a34aa79eac51b76da8c", "score": "0.5047055", "text": "public function update() {\r\n\t\tif (isset($_POST)) {\r\n\t\t\tforeach($_POST as $key => $val) {\r\n\t\t\t\tif (strpos($key, 'opt_') !== 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$option_key = str_replace('opt_', '', $key);\r\n\t\t\t\tif ($option_key == 'excludes') {\r\n\t\t\t\t\t$this->options[$option_key] = $val;\r\n\t\t\t\t\tif (!file_put_contents($this->exclude_from, $val)) {\r\n\t\t\t\t\t\t$this->error = 'Cannot write ' . $this->exclude_from;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$this->options[$option_key] = escapeshellcmd(str_replace(\"\\0\", '', $val));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tupdate_option('wpsync_options', $this->options);\r\n\t\t\t$this->message = 'Update Setting Successfully';\r\n\t\t}\r\n\t\t$this->index();\r\n\t}", "title": "" }, { "docid": "447f43f4698ad12cdaf95874ad6b72c6", "score": "0.50397", "text": "public function initWallet($options);", "title": "" }, { "docid": "b9b6a1903078a29254709c4e194cdb6c", "score": "0.5039527", "text": "public function update_987(){\n $this->setApplicationVersion('Billing', '1.988');\n\t}", "title": "" }, { "docid": "7de9cf55736c6b39e586a12b1e18cc88", "score": "0.50367016", "text": "function remove_from_admin_active_balance($adminid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM admin WHERE uniqueid='$adminid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $active_balance = $row['activebalance'];\n\n $active_balance = $active_balance - $amount;\n\n $sql1 = \"UPDATE admin SET activebalance=$active_balance WHERE uniqueid='$adminid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "844f16effdea0137da59b8bcc2050102", "score": "0.50357985", "text": "function ozh_yourls_gsb_update_option() {\n\t$in = $_POST['ozh_yourls_gsb'];\n\t\n\tif( $in ) {\n\t\t// Validate ozh_yourls_gsb: alpha & digits\n\t\t$in = preg_replace( '/[^a-zA-Z0-9-_]/', '', $in );\n\t\t\n\t\t// Update value in database\n\t\tyourls_update_option( 'ozh_yourls_gsb', $in );\n \n yourls_redirect( yourls_admin_url( 'plugins.php?page=ozh_yourls_gsb' ) );\n\t}\n}", "title": "" }, { "docid": "294157e225dbe4b80a3f4b3e8df1d9f4", "score": "0.50215846", "text": "public function update($argv)\r\n\t{\t\t\r\n\t\t$customer = Mage::getModel('rewardpoints/customer')->load($argv->getModel()->getId());\r\n\t\t$transactions = Mage::getModel('rewardpoints/rewardpointshistory')->getCollection()\r\n\t\t\t\t\t->addFieldToFilter('customer_id',$customer->getId())\r\n\t\t\t\t\t->addFieldToFilter('status',Apptha_Rewardpoints_Model_Status::PENDING)\r\n\t\t\t\t\t->addOrder('transaction_time','ASC')\r\n\t\t\t\t\t->addOrder('history_id','ASC')\r\n\t\t;\r\n\t\t\r\n\t\t//expires date\t\t\t\r\n\t\t/*if(Mage::helper('rewardpoints')->isExpDaysEnabled()){\t\t\t\r\n\t\t$arrTrans = Mage::getModel('rewardpoints/rewardpointshistory')->getCollection()\r\n\t\t\t\t\t->addFieldToFilter('customer_id',$customer->getId())\t\t\t\t\t\r\n\t\t\t\t\t->addOrder('transaction_time','DESC')\r\n\t\t\t\t\t->addOrder('history_id','DESC')\r\n\t\t;\t\t\r\n\t\tif(sizeof($arrTrans))foreach ($arrTrans as $arrTransVal){\t\t\t\r\n\t\t\t$strTransPoints = $arrTransVal->getAmount();\r\n\t\t\t$strTransDate = $arrTransVal->getTransactionTime();\r\n\t\t\t$strExpDate = Mage::helper('rewardpoints')->getExpDate($strTransDate);\r\n\t\t\t$strStartDate = date('Y-m-d',strtotime(now()));\r\n\t\t\t$strEndDate = date('Y-m-d',strtotime($strExpDate));\r\n\t\t\t$strRes = (int)Mage::helper('rewardpoints')->getDateDiff($strStartDate,$strEndDate);\t\t\t\r\n\t\t\tif($strRes == '0'){\t\t\t\t\r\n\t\t\t$_customer = Mage::getModel('rewardpoints/customer')->load($customer->getId());\r\n\t\t\t$_customer->addRewardPoint(-$strTransPoints);\t\t\t\t\t\t\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t}*/\r\n\t\t//because select by current customer so have no record\r\n\t\tforeach($transactions as $transaction)\r\n\t\t{\r\n\t\t\tswitch($transaction->getTypeOfTransaction())\r\n\t\t\t{\r\n\t\t\t\t//updation for review product\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::SUBMIT_PRODUCT_REVIEW:\r\n\t\t\t\t\t$reviewId = $transaction->getTransactionDetail();\r\n\t\t\t\t\t$review = Mage::getModel('review/review')->load($reviewId);\r\n\t\t\t\t\t$status = $transaction->getStatus();\r\n\t\t\t\t\tif($review->getId())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($review->getStatusId() == Mage_Review_Model_Review::STATUS_APPROVED)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//echo 'complete';die;\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t}else if($review->getStatusId() == Mage_Review_Model_Review::STATUS_NOT_APPROVED)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//echo 'status';die;\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t//updation for tag product\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::SUBMIT_PRODUCT_TAG:\r\n\t\t\t\t\t$tagId = $transaction->getTransactionDetail();\t\t\t\t\t\r\n\t\t\t\t\t$tag = Mage::getModel('tag/tag')->load($tagId);\t\t\t\t\t\r\n\t\t\t\t\t$status = $transaction->getStatus();\t\t\t\t\t\r\n\t\t\t\t\tif($tag->getFirstCustomerId())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($tag->getStatus() == Mage_Tag_Model_Tag::STATUS_APPROVED)\r\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t}else if($tag->getStatus() == Mage_Review_Model_Review::STATUS_NOT_APPROVED)\r\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\t\t\t\t\t\t\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t//updation for purchase product\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::PURCHASE_PRODUCT:\r\n\t\t\t\t\t$detail = explode(\"|\",$transaction->getTransactionDetail());\r\n\t\t\t\t\t$order = Mage::getModel('sales/order')->load($detail[1]);\r\n\t\t\t\t\t$status = $transaction->getStatus();\r\n\t\t\t\t\tif($order && $order->getStatus() != Mage_Sales_Model_Order::STATE_CANCELED)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($order->hasInvoices())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$transaction->setTransactionTime(now())->setBalance($customer->getRewardPoint());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::FRIEND_FIRST_PURCHASE:\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::FRIEND_NEXT_PURCHASE:\r\n\t\t\t\t\t$detail = explode(\"|\",$transaction->getTransactionDetail());\r\n\t\t\t\t\t$order = Mage::getModel('sales/order')->load($detail[1]);\r\n\t\t\t\t\t$status = $transaction->getStatus();\r\n\t\t\t\t\tif($order && $order->getStatus() != Mage_Sales_Model_Order::STATE_CANCELED)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($order->hasInvoices())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t/*case Apptha_Rewardpoints_Model_Type::SEND_TO_FRIEND:\r\n\t\t\t\t\t//if the time is expired add reward points back to customer\r\n\t\t\t\t\t$oldtime =strtotime($transaction->getTransactionTime());\r\n\t\t\t\t\t$currentTime = strtotime(now());\r\n\t\t\t\t\t$hour = ($currentTime - $oldtime)/(60*60);\r\n\t\t\t\t\t$hourConfig = Mage::getStoreConfig('rewardpoints/send_reward_points/time_life');\r\n\t\t\t\t\tif($hourConfig && ($hour > $hourConfig))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t$transaction->setStatus(Apptha_Rewardpoints_Model_Status::UNCOMPLETE);\r\n\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t\t$transaction->save();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;*/\r\n\t\t\t\t\t\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::USE_TO_CHECKOUT:\r\n\t\t\t\t\t$order = Mage::getModel(\"sales/order\")->loadByIncrementId($transaction->getTransactionDetail());\r\n\t\t\t\t\t$status = $transaction->getStatus();\r\n\t\t\t\t\tif($order && $order->getStatus() != Mage_Sales_Model_Order::STATE_CANCELED)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($order->hasInvoices())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setTransactionTime(now());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\tcase Apptha_Rewardpoints_Model_Type::CHECKOUT_ORDER:\r\n\t\t\t\t\t$order = Mage::getModel(\"sales/order\")->loadByIncrementId($transaction->getTransactionDetail());\r\n\t\t\t\t\t$status = $transaction->getStatus();\r\n\t\t\t\t\tif($order && $order->getStatus() != Mage_Sales_Model_Order::STATE_CANCELED)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($order->hasInvoices())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n\t\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t\t\t$customer->addRewardPoint($transaction->getAmount());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t$status = Apptha_Rewardpoints_Model_Status::UNCOMPLETE;\r\n\t\t\t\t\t\t$transaction->setBalance($customer->getRewardPoint())->setTransactionTime(now());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$transaction->setStatus($status)->save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t$_transactions = Mage::getModel('rewardpoints/rewardpointshistory')->getCollection()\r\n\t\t\t\t\t->addFieldToFilter('transaction_detail',$customer->getCustomerModel()->getEmail())\r\n\t\t\t\t\t->addFieldToFilter('type_of_transaction',Apptha_Rewardpoints_Model_Type::SEND_TO_FRIEND)\r\n\t\t\t\t\t->addFieldToFilter('status',Apptha_Rewardpoints_Model_Status::PENDING)\r\n\t\t;\r\n\r\n\t\tif(sizeof($_transactions)) foreach($_transactions as $_transaction)\r\n\t\t{\t\t\t\r\n\t\t\t$customer->addRewardPoint($_transaction->getAmount());\r\n\t\t\t$historyData = array('type_of_transaction'=>Apptha_Rewardpoints_Model_Type::RECIVE_FROM_FRIEND, 'amount'=>$_transaction->getAmount(), 'transaction_detail'=>$_transaction->getCustomerId(), 'transaction_time'=>now(), 'status'=>Apptha_Rewardpoints_Model_Status::COMPLETE);\r\n\t\t $customer->saveTransactionHistory($historyData);\r\n\t\t $_transaction->setStatus(Apptha_Rewardpoints_Model_Status::COMPLETE)->setTransactionDetail($customer->getCustomerId())->save();\r\n\t\t}\t\r\n\t\t//for referral link\r\n\t\t/*if(Mage::helper('rewardpoints')->isRefLinkEnabled())\r\n\t\t{\r\n\t\t\t$strRefKey = Mage::helper('rewardpoints')->getRandomKey();\r\n\t\t\t$transactions = Mage::getModel('rewardpoints/invitations')->getCollection()\r\n\t\t\t->addFieldToFilter('referral_key',$strRefKey)\r\n\t\t\t->addFieldToFilter('customer_id',$customer->getId())\r\n\t\t\t->addFieldToFilter('status',Apptha_Rewardpoints_Model_Status::PENDING);\t\t\t\r\n\t\t\tif(!sizeof($transactions)){\r\n\t\t\t$_customer = Mage::getModel('rewardpoints/invitations')->getCollection();\r\n $point = Mage::getStoreConfig('rewardpoints/earning_points/registration');\r\n $write = Mage::getSingleton('core/resource')->getConnection('core_write');\r\n $strStatus = Apptha_Rewardpoints_Model_Status::COMPLETE;\r\n $strLimit = 0;\r\n $sql = 'INSERT INTO '.$_customer->getTable('invitations').'(`customer_id`,`referral_key`,`limit`,`date`,`status`) VALUES('.$customer->getId().',\"'.$strRefKey.'\",'.$strLimit.',\"'.now().'\",'.$strStatus.')'; \r\n $write->query($sql);\r\n\t\t\t}\r\n\t\t}*/\t\r\n\t}", "title": "" }, { "docid": "d54a42c585959d7da4085e723c6e4f1b", "score": "0.5017212", "text": "function update_bank( $id )\n {\n $body = json_decode(file_get_contents('php://input'));\n\n $body = json_decode(json_encode($body) , true);\n\n if ( $this->check_iban( $body['account'] ) )\n {\n if ( ! $this->db->set($body)->where( 'id' , $id )->update( TABLE ) )\n {\n $this->err500($this->db->error());\n } \n else \n {\n $this->ok();\n }\n }\n else \n {\n $this->err500('IBAN code does not match');\n }\n }", "title": "" }, { "docid": "89fba83b557b3ea676de69946f5d6122", "score": "0.5001869", "text": "function yourls_update_option( $option_name, $newvalue ) {\n\tglobal $ydb;\n\t$table = YOURLS_DB_TABLE_OPTIONS;\n\n\t$safe_option_name = yourls_escape( $option_name );\n\n\t$oldvalue = yourls_get_option( $safe_option_name );\n\n\t// If the new and old values are the same, no need to update.\n\tif ( $newvalue === $oldvalue )\n\t\treturn false;\n\n\tif ( false === $oldvalue ) {\n\t\tyourls_add_option( $option_name, $newvalue );\n\t\treturn true;\n\t}\n\n\t$_newvalue = yourls_escape( yourls_maybe_serialize( $newvalue ) );\n\n\t$ydb->query( \"UPDATE `$table` SET `option_value` = '$_newvalue' WHERE `option_name` = '$option_name'\");\n\n\tif ( $ydb->rows_affected == 1 ) {\n\t\t$ydb->option[$option_name] = $newvalue;\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "05c70341ea1eec8d8fc94995ecabd1a3", "score": "0.49999923", "text": "public function update_payment_info() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "dae4f6a6944775a1c19a017f8e185f11", "score": "0.49967766", "text": "public function transferAmount($amount, $userAccount, $targetAccount)\n {\n // amount is not higher than requesting user's account balance \n $authentication = $this->checkBalance($amount, $userAccount);\n // If checkBalance returns true, run transaction\n if ($authentication)\n { \n try \n {\n $sql = \"SELECT * FROM account WHERE userAccountNumber = $userAccount;\";\n $userAcc = $this->_db->query($sql);\n $newUserBalance;\n\n foreach ($userAcc as $balance) \n {\n $newUserBalance = $balance[\"balance\"] -= $amount;\n }\n // If user account can be found in DB, update user account balance\n if ($this->_db->query($sql))\n {\n $sql = \"SELECT * FROM account WHERE userAccountNumber = $targetAccount;\";\n $targetAcc = $this->_db->query($sql);\n $newTargetBalance;\n \n foreach ($targetAcc as $balance) \n {\n $newTargetBalance = $balance[\"balance\"] += $amount;\n }\n\n // Prepare to execute UPDATE of user balance\n $sqlUser = \"UPDATE account SET balance = :newUserBalance WHERE userAccountNumber = :userAccount;\";\n $statementUser = $this->_db->prepare($sqlUser);\n $statementUser->bindValue(':userAccount', $userAccount, PDO::PARAM_INT);\n $statementUser->bindValue(':newUserBalance', $newUserBalance, PDO::PARAM_INT);\n \n // Prepare to execute UPDATE of target balance\n $sqlTarget = \"UPDATE account SET balance = :newTargetBalance WHERE userAccountNumber = :targetAccount;\";\n $statementTarget = $this->_db->prepare($sqlTarget);\n $statementTarget->bindValue(':newTargetBalance', $newTargetBalance, PDO::PARAM_INT);\n $statementTarget->bindValue(':targetAccount', $targetAccount, PDO::PARAM_INT);\n \n // If user UPDATE executes, execute target UPDATE \n if ($statementUser->execute())\n {\n if ($statementTarget->execute())\n { \n $query = \"INSERT INTO transactions (`from_amount`, `from_account`, `to_amount`, `to_account`, `date`) VALUES (:from_amount, :from_account, :to_amount, :to_account, :date)\";\n $statementTrans = $this->_db->prepare($query);\n $statementTrans->bindValue(':from_amount', $amount, PDO::PARAM_INT);\n $statementTrans->bindValue(':from_account', $userAccount, PDO::PARAM_INT); \n $statementTrans->bindValue(':to_amount', $amount, PDO::PARAM_INT); \n $statementTrans->bindValue(':to_account', $targetAccount, PDO::PARAM_INT); \n $statementTrans->bindValue(':date', date('Y-m-d H:i:s', time()), PDO::PARAM_STR); \n if ($statementTrans->execute())\n {\n header(\"location: /successPage.php\");\n }\n }\n } \n } \n }\n catch (PDOException $e)\n {\n echo \"Error: \" . $e->getMessage() . '<br>\n <div id=\"options\">\n <div class=\"opt\">\n <a href=\"/index.php\">Back to home</a>\n </div>\n </div>';\n die();\n }\n } \n else \n {\n echo \"Balance not high enough for transaction\";\n }\n }", "title": "" }, { "docid": "6409086da0fa00f7175d77ed6bde1261", "score": "0.49965292", "text": "public function Withdraw($amount){\n\t\t\t\t//Kontrollojm nese mund te terheqim para:\n\t\t\tif (($this->balance)<$amount) {\n\t\t\t\techo \"Nuk keni te holla per shumen qe deshironi te terheqni.<br/>\";\n\t\t\t}else{\n\t\t\t\t\t//balance = balance - $amount;\n\t\t\t\t\t//$this e perdorim pasi qe po punojm mbrenda nje klase\n\t\t\t\t$this->balance = $this->balance - $amount;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7824e13227a1ffefd9e6ab22b6cc799d", "score": "0.49960467", "text": "public abstract function update(array $options = []): int;", "title": "" }, { "docid": "1d881678183ab4248a3c055cecff779f", "score": "0.49953678", "text": "public function callUpdateBillingAgreement()\n {\n $request = $this->_exportToRequest($this->_updateBillingAgreementRequest);\n try {\n $response = $this->call('BillAgreementUpdate', $request);\n } catch (Mage_Core_Exception $e) {\n if (in_array(10201, $this->_callErrors)) {\n $this->setIsBillingAgreementAlreadyCancelled(true);\n }\n throw $e;\n }\n $this->_importFromResponse($this->_updateBillingAgreementResponse, $response);\n }", "title": "" }, { "docid": "d4e13c502ba231b79d9ebca2128d15cd", "score": "0.49938443", "text": "function remove_from_seller_pending_balance($sellerid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM sellers WHERE uniqueid='$sellerid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $pending_balance = $row['pendingbalance'];\n\n $pending_balance = $pending_balance - $amount;\n\n $sql1 = \"UPDATE sellers SET pendingbalance=$pending_balance WHERE uniqueid='$sellerid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "68da926e2d2be6707783435a455f6b16", "score": "0.4989211", "text": "public function edit(Balance $balance)\n {\n //\n }", "title": "" }, { "docid": "62cd58f6cd009e97f31e41d05f764a05", "score": "0.4983291", "text": "function jsps_update_option( $options ) {\n\n\tif ( ! is_array( $options ) ) {\n\t\tdie( '$options has to be an array' );\n\t}\n\n\t// When we want to update options in a network activated website.\n\tif ( true === JUIZ_SPS_NETWORK_ACTIVATED ) {\n\t\t$options = update_blog_option( get_current_blog_id(), JUIZ_SPS_SETTING_NAME, $options );\n\t\treturn $options;\n\t}\n\n\t// When we want to update options in a simple website.\n\telse {\n\t\t$options = update_option( JUIZ_SPS_SETTING_NAME, $options );\n\t}\n}", "title": "" }, { "docid": "38f5f0fe65fc9909ae4de134f284496d", "score": "0.49681154", "text": "public function actionUpdate($id){\n if (!Yii::$app->user->identity->amParent($id)){\n return ['output'=>'', 'message'=>'Нет доступа к этому пользователю'];\n }\n $model = $this->findModel($id);\n $balance= Balance::find()->where(['user_id'=>$id])->one();\n if (!$balance){\n $balance=new Balance(['user_id'=>$id]);\n $balance->user_id=$model->id;\n }\n if ($model->load(Yii::$app->request->post())){\n $transaction = Yii::$app->db->beginTransaction();\n try {\n if ($model->save()) {\n\n if ($balance->load(Yii::$app->request->post())){\n if ( $balance->save()) {\n $transaction->commit();\n\n return $this->redirect(['index']);\n }\n }\n }\n } catch(\\Exception $e){\n $transaction->rollBack();\n return $e->getMessage();\n\n }\n $transaction->rollBack();\n }\n return $this->render('update', [\n 'balance'=>$balance,\n 'model' => $model, 'dealers'=>Yii::$app->user->identity->getMyDealers()\n ]);\n }", "title": "" }, { "docid": "3d9c9c67912efc9364f65345a3efe8cc", "score": "0.4962", "text": "public function update_local_option($option, $value)\n\t{\n\t\t$option = $this->fix_option_name($option);\n\t\tupdate_option($option, $value);\n\t}", "title": "" }, { "docid": "7a411b6bc514cb591f394cac15a98d93", "score": "0.4955132", "text": "public function faucetWithdrawl($address, $amount = 10000);", "title": "" }, { "docid": "d597412a95054464c72fca03ea359d2e", "score": "0.49529222", "text": "function opalmembership_update_option( $key = '', $value = false ) {\n\n\t// If no key, exit\n\tif ( empty( $key ) ) {\n\t\treturn false;\n\t}\n\n\tif ( empty( $value ) ) {\n\t\t$remove_option = opalmembership_delete_option( $key );\n\n\t\treturn $remove_option;\n\t}\n\n\t// First let's grab the current settings\n\t$options = get_option( 'opalmembership_settings' );\n\n\t// Let's let devs alter that value coming in\n\t$value = apply_filters( 'opalmembership_update_option', $value, $key );\n\n\t// Next let's try to update the value\n\t$options[ $key ] = $value;\n\t$did_update = update_option( 'opalmembership_settings', $options );\n\n\t// If it updated, let's update the global variable\n\tif ( $did_update ) {\n\t\tglobal $opalmembership_options;\n\t\t$opalmembership_options[ $key ] = $value;\n\t}\n\n\treturn $did_update;\n}", "title": "" }, { "docid": "56b72d6c0ea3c94ce10fc1d10ef46498", "score": "0.49513313", "text": "function update_currency($curr_abrev, $symbol, $currency, $country, \n\t$hundreds_name, $auto_update)\n{\n\t$sql = \"UPDATE \".TB_PREF.\"currencies SET currency=\".db_escape($currency)\n\t\t.\", curr_symbol=\".db_escape($symbol).\",\tcountry=\".db_escape($country)\n\t\t.\", hundreds_name=\".db_escape($hundreds_name)\n\t\t.\",auto_update = \".db_escape($auto_update)\n\t\t\t.\" WHERE curr_abrev = \".db_escape($curr_abrev);\n\n\tdb_query($sql, \"could not update currency for $curr_abrev\");\n}", "title": "" }, { "docid": "2929d8ee8a971d67c78fa045e849fce7", "score": "0.49467108", "text": "public function testUpdating()\n {\n $connector = \\Mockery::mock(new Curl());\n $connector->shouldReceive('call')\n ->with(BASE_API_URL . '/' . API_VERSION . '/wallets/1', 'PUT', array(\n 'name' => 'Beepsend new wallet'\n ))\n ->once()\n ->andReturn(array(\n 'info' => array(\n 'http_code' => 200,\n 'Content-Type' => 'application/json'\n ),\n 'response' => json_encode(array(\n 'id' => 1,\n 'balance' => 47.60858,\n 'name' => 'Beepsend new wallet'\n ))\n ));\n \n $client = new Client('abc123', $connector);\n $wallet = $client->wallet->update(1, 'Beepsend new wallet');\n \n $this->assertInternalType('array', $wallet);\n $this->assertEquals(1, $wallet['id']);\n $this->assertEquals(47.60858, $wallet['balance']);\n $this->assertEquals('Beepsend new wallet', $wallet['name']);\n }", "title": "" }, { "docid": "9556ae8fbcaf2d081c36f8b51f2f9519", "score": "0.49448082", "text": "public function edit(PaymentOption $paymentOption)\n {\n //\n }", "title": "" }, { "docid": "911206888a6e1bf65bf1628bedc064d2", "score": "0.49369583", "text": "private function _updateOptions()\n {\n update_option($this->_option_name, $this->_options);\n }", "title": "" }, { "docid": "d358814d1356a4499eb78d1e63278ed6", "score": "0.49314618", "text": "public function updateItemOptions($observer) {\n $session = $this->_getSession();\n $quote = $this->_getQuote();\n //get data from sesstion\n $oldItemQty = $session->getData('update_item_old_item_qty');\n $updatedItem = $observer->getQuoteItem();\n //declare other variables\n $maxQtyPerBox = Mage::getStoreConfig('giftwrap/calculation/maximum_items_wrapall');\n $qtyUpdate = Mage::app()->getRequest()->getParam('qty');\n $productId = Mage::app()->getRequest()->getParam('product');\n //true qty of current product in cart array\n $current_item_true_qty = array();\n //get selection item and giftbox\n $selectionItem = Mage::getModel('giftwrap/selectionitem')->getCollection()\n ->addFieldToFilter('item_id', Mage::app()->getRequest()->getParam('id'))\n ->getFirstItem();\n if ($qtyUpdate <= 0) {\n $selectionItem->delete();\n return;\n }\n $selection = Mage::getModel('giftwrap/selection')->load($selectionItem->getSelectionId());\n //total product in cart\n //declare product options\n $productOptions = $updatedItem->getProduct()->getTypeInstance(true)->getOrderOptions($updatedItem->getProduct());\n $requestInfo = $productOptions['info_buyRequest'];\n// Zend_Debug::Dump($productOptions);\n// die();\n if ($selectionItem->getId()) {\n //check if updated item have gift box\n $updatedSelectionItemCollection = Mage::getModel('giftwrap/selectionitem')->getCollection()\n ->addFieldToFilter('item_id', $updatedItem->getId());\n if (!$updatedSelectionItemCollection->getSize()) {\n $selectionItem->setItemId($updatedItem->getId())->save();\n }\n $totalQtyInbox = 0;\n $itemsInBox = Mage::getModel('giftwrap/selectionitem')->getCollection()\n ->addFieldToFilter('selection_id', $selection->getId());\n foreach ($itemsInBox as $iteminbox) {\n $totalQtyInbox += $iteminbox->getQty();\n }\n $itemid = $updatedItem->getId();\n $remainingSlot = (int) $maxQtyPerBox - $totalQtyInbox + (int) $selectionItem->getQty();\n if ((int) $updatedItem->getQty() > (int) $remainingSlot) {\n $itemNeedToAddQty = (int) $updatedItem->getQty() - (int) $remainingSlot;\n $current_item_true_qty[$itemid] = $remainingSlot;\n try {\n $selectionItem->setQty($remainingSlot)->save();\n } catch (Exception $e) {\n \n }\n } else {\n try {\n $selectionItem->setQty($updatedItem->getQty())->save();\n } catch (Exception $e) {\n \n }\n }\n\n if ((int) $itemNeedToAddQty > 0) {\n $itemUpdateQty1 = $itemNeedToAddQty;\n //prepare options for product\n $requestInfo = $productOptions['info_buyRequest'];\n $requestInfo['giftwrap_add'] = 'update_item';\n $requestInfo['giftbox_paper'] = $selection->getStyleId();\n $requestInfo['giftwrap_giftcard'] = $selection->getGiftcardId();\n $requestInfo['giftbox_message'] = $selection->getMessage();\n $requestInfo['item_product_id'] = $productId;\n for ($i = 0; (float) $i < ceil($itemUpdateQty1 / $maxQtyPerBox); $i++) {\n $product = Mage::getModel('catalog/product')->load($productId);\n $session->setData('giftbox_update_box', 1);\n $session->setData('giftbox_update_product', $productId);\n if ($itemNeedToAddQty > $maxQtyPerBox) {\n $requestInfo['qty'] = (int) $maxQtyPerBox;\n $itemNeedToAddQty -= $maxQtyPerBox;\n } else {\n $requestInfo['qty'] = $itemNeedToAddQty;\n }\n $cart = Mage::getModel('checkout/cart');\n try {\n $cart->addProduct($product, $requestInfo)->save();\n } catch (Exception $e) {\n \n }\n }\n }\n }\n $session->setData('current_item_true_qty', $current_item_true_qty);\n $session->setData('update_item_old_item', null);\n $session->setData('update_item_options_buyrequest', null);\n }", "title": "" }, { "docid": "0406f12d4f80f62842adef8ab0c1e02a", "score": "0.49257722", "text": "public function update_option($option, $value)\n\t{\n\t\t$option = $this->fix_option_name($option);\n\t\tif ($this->is_network)\n\t\t\tupdate_site_option($option, $value);\n\t\telse\n\t\t\tupdate_option($option, $value);\n\t}", "title": "" }, { "docid": "e91259a8f848eba9c1909493578e1059", "score": "0.49106684", "text": "function remove_from_seller_active_balance($sellerid, $amount)\n{\n global $conn;\n\n $sql = \"SELECT * FROM sellers WHERE uniqueid='$sellerid';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $active_balance = $row['activebalance'];\n\n $active_balance = $active_balance - $amount;\n\n $sql1 = \"UPDATE sellers SET activebalance=$active_balance WHERE uniqueid='$sellerid';\";\n mysqli_query($conn, $sql1);\n\n return true;\n}", "title": "" }, { "docid": "8f94e827d7c322b3f6295cfb6428ec32", "score": "0.49013245", "text": "public function updateShippingCost($accountID)\n {\n\n $ShippedOrderData = $this->getShippedOrderData();\n if (is_array($ShippedOrderData) && count($ShippedOrderData) > 0) {\n foreach ($ShippedOrderData as $key => $value) {\n $shippingDetails = maybe_unserialize($value->items);\n\n try {\n $shippingDetails = $shippingDetails[0];\n } catch (Exception $e) {\n $shippingDetails = array();\n }\n\n if ($accountID != $value->account_id) {\n continue;\n } else {\n $WooOrder = wc_get_order($value->post_id);\n if (is_object($WooOrder)) {\n if (count($WooOrder->get_items('shipping')) <= 0) {\n if (class_exists('WC_Order_Item_Shipping')) {\n if ($shippingDetails->ShippingPrice->Amount) {\n $vat = get_option('amwscp_custom_vat_amount') ? get_option('amwscp_custom_vat_amount') : 20;\n $shipping = new WC_Order_Item_Shipping();\n $shipping->set_method_title(\"Amazon shipping rate\");\n $shipping->set_method_id(\"amazon_flat_rate:77\"); // set an existing Shipping method rate ID\n $shipping->set_total($this->getShippingValueWithoutVat($shippingDetails->ShippingPrice->Amount, $vat));\n $WooOrder->add_item($shipping);\n $WooOrder->calculate_totals();\n $WooOrder->save();\n }\n }\n }\n }\n\n }\n }\n\n }\n }", "title": "" }, { "docid": "d777af46b9520e8cc183290ee37ac123", "score": "0.48985156", "text": "function acceptTransferRequest($db, $uid, $bankerid, $approveid, $approverequester, $approvetarget, $approveamount, $approvetitle, $approvedescription) \n{\n $setapprovequery = \"UPDATE mybb_banktransferrequests SET bankerapproverid=$bankerid, approvaldate=now() WHERE mybb_banktransferrequests.id=$approveid\";\n $db->write_query($setapprovequery);\n\n // Gets Target User\n $targetUser = getUser($db, $approvetarget, \"username\");\n $targetname = $targetUser['username'];\n\n // Gets Approving Banker\n $requestUser = getUser($db, $approvetarget, \"username\");\n $requestname = $requestUser['username'];\n\n // Adds transactions and updates the balances\n $targetbalance = doTransaction($db, $approveamount, $approvetitle, $approvedescription, $approvetarget, $approverequester, $targetname, \"Banker Approved Transfer - Target\");\n $requestbalance = doTransaction($db, -$approveamount, $approvetitle, $approvedescription, $approverequester, $approverequester, $requestname, \"Banker Approved Transfer - Requester\");\n\n if ($uid == $approverequester) { return $requestbalance; }\n else if ($uid == $approvetarget) { return $targetbalance; }\n return 0;\n}", "title": "" }, { "docid": "6939b5a4ff4ba6ce3f8007062a730a0a", "score": "0.4894988", "text": "public function update(Request $request, Deposit $deposit)\n {\n $request->validate([\n 'status'=> 'required|numeric'\n ]);\n newNoti(1, \"Deposit Status Update\", \"Deposit request status has been changed.\" , route('deposits.index'), $deposit->user_id);\n $deposit->status = $request->status;\n\n if ($request->status == 2) {\n $profile = User::where('id', $deposit->user_id)->first();\n\n User::where('id', $deposit->user_id)->update([\n 'balance'=> $profile->balance + $deposit->amount\n ]);\n }\n\n $deposit->save();\n return statusTo(\"Deposit status updated successfully\", route('deposits.index'));\n }", "title": "" }, { "docid": "7060c63391017cd577337866e9f16728", "score": "0.48875606", "text": "function edit_option($connection, $username, $option, $typeofchange){\r\n if (strcmp($typeofchange, \"on\") == 0){\r\n $query = \"Update User_tbl \";\r\n $query .= \"SET {$option} = 1 \";\r\n $query .= \"WHERE MUser_ID = '$username';\";\r\n }\r\n else if (strcmp($typeofchange, \"off\") == 0){\r\n $query = \"Update User_tbl \";\r\n $query .= \"SET {$option} = 0 \";\r\n $query .= \"WHERE MUser_ID = '$username';\";\r\n }\r\n $result = mysqli_query($connection, $query);\r\n}", "title": "" }, { "docid": "d97edf1b02d28f2c62811db52e5ec8c8", "score": "0.48867968", "text": "public function testBillsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "426bb4b2de49f99c7e7c919783a93982", "score": "0.4874018", "text": "function changeDebitStatus($username, $op, $accountNumber) {\n if ($op === 'delete') {\n $conn = connectDB();\n $sql = \"delete from employerpad where EmployerUserName = '$username' and AccountNumber = '$accountNumber'\";\n if (mysqli_query($conn, $sql)) {\n $conn2 = connectDB();\n $sql2 = \"delete from padinfo where AccountNumber = '$accountNumber'\";\n if (mysqli_query($conn2, $sql2)) return true;\n }\n }\n else if ($op === 'setDefault') {\n setUndefault();\n $conn = connectDB();\n $sql = \"update padinfo set IsDefault = 1 where AccountNumber = '$accountNumber'\";\n if (mysqli_query($conn, $sql)) return true;\n }\n return false;\n}", "title": "" }, { "docid": "4d8b93362eafbadd2aa824a25666a9bc", "score": "0.48738757", "text": "public function setOption($option, $value){}", "title": "" }, { "docid": "a4835151ac5a5ded158b6cf777f22f70", "score": "0.48714027", "text": "function bvn_satellite_update_options() {\n\tupdate_option('bvn_satellite_api_club', bvn_satellite_get_option('api_club'));\n\tupdate_option('bvn_satellite_options_club', bvn_satellite_get_option('options_club'));\n\tupdate_option('bvn_satellite_options_liga', bvn_satellite_get_option('options_liga'));\n\tupdate_option('bvn_satellite_options_team', bvn_satellite_get_option('options_team'));\n}", "title": "" }, { "docid": "89da87b0ed356cf09f789c334cbe5666", "score": "0.4866775", "text": "function itg_loyalty_reward_update_point($uid, $points, $op = NULL) { \n $unique_exp_key = itg_loyalty_reward_unique_expiration($uid);\n $itg_query = db_update('itg_loyalty_reward_point_history')\n ->fields(array('cart_point' => $points, 'remaining_point' => $points))\n ->condition('pointer_key', $unique_exp_key);\n if ($op == NULL || $op == 'inc') { \n $itg_query->expression('cart_point', 'cart_point + :point', array(':point' => $points))\n ->expression('remaining_point', 'remaining_point - :point', array(':point' => $points)); \n }\n elseif ($op == 'dec') {\n $itg_query->expression('cart_point', 'cart_point - :point', array(':point' => $points))\n ->expression('remaining_point', 'remaining_point + :point', array(':point' => $points)); \n } \n $itg_query->execute(); \n}", "title": "" }, { "docid": "fd6f28844f5e4858e147fda6cc90a53e", "score": "0.4861617", "text": "function updatePayment() {\n\t\tif (!empty($_POST['update'])) {\n\t\t\t$sql = \"UPDATE cart SET sum = ? WHERE cart_id = ? AND session = ?\";\n\t\t\t$query = $this->db->prepare($sql);\n\t\t\t$query->execute(array($_POST['update_sum'], $_POST['cart_id'], $_POST['session']));\t\n\t\t\theader(\"location:index.php\");\n\t\t} \n\t\t\n\t\t\n\t}", "title": "" } ]
00968630088adfc078f829fe44fe19f7
Replace URLs from cache
[ { "docid": "f2077d01df969695a5a83f3d74b9ba7f", "score": "0.0", "text": "protected function _afterCacheUrl($html)\n {\n if ($this->_getApp()->useCache(self::CACHE_GROUP)) {\n $this->_getApp()->setUseSessionVar(false);\n Varien_Profiler::start('CACHE_URL');\n $html = Mage::getSingleton($this->_getUrlModelClass())->sessionUrlVar($html);\n Varien_Profiler::stop('CACHE_URL');\n }\n return $html;\n }", "title": "" } ]
[ { "docid": "c1c9ac85b0eeee92c763e1984ccac56a", "score": "0.65637326", "text": "function recache(){\n\t\tfile_put_contents( $this->options['cache'] , serialize( $this->remap( json_decode( file_get_contents( $this->buildQuery() ) )->results ) ) );\n\t}", "title": "" }, { "docid": "d292b8243f4830cef0128b79bd049b6f", "score": "0.6269017", "text": "function update_cache()\n{\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_URL, FIREBASE_URL);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $server_output = curl_exec($curl);\n\n curl_close($curl);\n\n return file_put_contents(CACHE_FILE, $server_output);\n}", "title": "" }, { "docid": "48ef374171a21813c174b76e75b99149", "score": "0.62588537", "text": "public function cache();", "title": "" }, { "docid": "52f7b32f5849d6026e02801b177ef27d", "score": "0.61905986", "text": "public function recompileCache()\n\t{\n\t}", "title": "" }, { "docid": "1d8e2463a5ab0c78004afdf2e7c069ff", "score": "0.6178826", "text": "private function load_replacements_from_cache() {\n\t\t$replacements = wp_cache_get( 'say_what_strings', 'swp' );\n\t\tif ( is_array( $replacements ) ) {\n\t\t\t$this->replacements = $replacements;\n\t\t}\n\t}", "title": "" }, { "docid": "dfa490e6d4d39b396d920c72cbc9eeb0", "score": "0.61718285", "text": "public function cache() {\r\n\t\t$this->html->cache();\r\n\t}", "title": "" }, { "docid": "dfa490e6d4d39b396d920c72cbc9eeb0", "score": "0.61718285", "text": "public function cache() {\r\n\t\t$this->html->cache();\r\n\t}", "title": "" }, { "docid": "43721677262f28d511d1cc1276b5907a", "score": "0.61643517", "text": "abstract public function cache($content);", "title": "" }, { "docid": "585b3fd068da93f1a8a6e09c3bc1ad12", "score": "0.6058575", "text": "public function useCache(): void {\n\t\thttp_response_code( self::NOT_MODIFIED_CODE );\n\t}", "title": "" }, { "docid": "a216b328e5dcc592d684e2e5a5f9ca90", "score": "0.5953734", "text": "public function resetCache();", "title": "" }, { "docid": "ed06ce203579b6fac0e3e45ea70bc26a", "score": "0.59475505", "text": "function _replace_links() {\n\t\t$replace = array();\n\n\t\t$stop_list = array(\"\", \"/\", \"index\".$this->LINKS_ADD_EXT);\n\n\t\tforeach ((array)$GLOBALS['_CRAWLER']['NAMES'] as $_source_url => $_target_url) {\n\t\t\t$_orig_url = $_source_url;\n\t\t\t$_source_url = str_replace($GLOBALS['_CRAWLER']['WEB_PATH'], \"/\", $_source_url);\n\t\t\tif (in_array($_source_url, $stop_list)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_new_key = \"\\\"\".$_source_url.\"\\\"\";\n\t\t\t$_new_val = \"\\\"\".$_target_url.\"\\\"\";\n\n\t\t\t$replace[\"href=\".$_new_key]\t\t= \"href=\".$_new_val;\n\t\t\tif (isset($GLOBALS['_CRAWLER']['IMAGES'][$_orig_url])) {\n\t\t\t\t$replace[\"src=\".$_new_key]\t\t= \"src=\".$_new_val;\n\t\t\t} elseif (isset($GLOBALS['_CRAWLER']['CSS'][$_orig_url])) {\n\t\t\t\t$replace[\"url(\".$_new_key.\")\"]\t= \"url(\".$_new_val.\")\";\n\t\t\t}\n\t\t}\n\t\tuksort($replace, array(&$this, \"_sort_by_length\"));\n\n\t\t$files_path = $GLOBALS['_CRAWLER']['TMP_PATH'];\n\t\t$files = $this->DIR_OBJ->scan_dir($files_path, true, \"-f\", \"/(svn|git)/i\", 0);\n\n\t\t$this->_replace_in_files($files, array_keys($replace), array_values($replace));\n// TODO: list not replaced links (possibly broken)\n\t}", "title": "" }, { "docid": "de61e6cb37cc1df7dbf35ae2d927fbce", "score": "0.588445", "text": "public function renewSecretUrls()\n {\n $this->_cache->clean([\\Magento\\Backend\\Block\\Menu::CACHE_TAGS]);\n }", "title": "" }, { "docid": "fd1951a9fd6fc781679ad95b4aa2bb40", "score": "0.5866864", "text": "public function cacheAction()\n {\n $manager = $this->getDoctrine()->getManager();\n /** @var Reference[] $results */\n $results = $manager->getRepository(Reference::class)\n ->createQueryBuilder(\"r\")\n ->select(\"r\")\n ->getQuery()\n ->getResult();\n\n $cleaned = 0;\n foreach ($results as $result) {\n if ($result->getCache() !== $result->__toString()) {\n $result->setCache($result->__toString());\n $cleaned++;\n }\n\n }\n\n $manager->flush();\n\n return $this->redirectToRoute(\"upload_index\");\n }", "title": "" }, { "docid": "4d9caee7485e90dcfcb850090b2cdd74", "score": "0.58301747", "text": "public function rewrite_cache()\n {\n $this->m_cache_l1 = [];\n\n $this->cache(0, $this->m_cache_l1);\n\n return $this->write_cache($this->get_cache_file());\n }", "title": "" }, { "docid": "63d1da2aed734cfbc4508c445e46a977", "score": "0.5805057", "text": "final public function cache(): void\n {\n \tif (! $this->updated) {\n \t\treturn;\n \t}\n\n\t\tcache()->save($this->key(), $this->store, $this->ttl);\n }", "title": "" }, { "docid": "1aa5cbbeec9ffc543b0627c3523ff626", "score": "0.5800903", "text": "public function cache_cache_output() {\n //check for that and only continue if caching is all right\n if (Wi3::$template->cacheable == true) { \n Wi3::$cache->page_set(self::$cache_page, self::$cache_addendum , Event::$data);\n }\n }", "title": "" }, { "docid": "eadf0790b560c98f41e244b80ef2a9dd", "score": "0.5773465", "text": "public function cache_url($url,$result,$ttl=60) {\r\n\t\t$md5=md5($query);\r\n\t\tif (self::cache_write($md5,$result)) return true;\r\n\t\t}", "title": "" }, { "docid": "3698ddd809daa582c38cbd2d6444033f", "score": "0.57578343", "text": "public static function setCache ($cache) {}", "title": "" }, { "docid": "781bf430ca586df51c563cb5277560d9", "score": "0.57300544", "text": "public function fromCache ( );", "title": "" }, { "docid": "dbd86f344a8120cef544bd0999a90a3e", "score": "0.5720973", "text": "function cache($file,$func,$time=null,$type=null,$params=null){if(isset($_GET['refresh']))@unlink($this->root.'tmp/'.$file);$this->tmp();return parent::cache('tmp/'.$file,$func,$time,$type,$params);}", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.5709429", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.5709429", "text": "public function clearCache();", "title": "" }, { "docid": "ffbffbe8888a97b04cb1c7ffcbeccc36", "score": "0.57007754", "text": "function view_cache_safe($url)\n{\n $myview = FactoryDefault::getDefault()->get('view');\n if (!empty($myview->product_hash)) {\n return \"{$url}?v={$myview->product_hash}\";\n }\n return $url;\n}", "title": "" }, { "docid": "8873403cdf60724f5113352ce9d740a6", "score": "0.5685847", "text": "abstract protected function getCache();", "title": "" }, { "docid": "03be10ce53a9195482a2e131527c78d3", "score": "0.5678779", "text": "function recache() {\n parent::recache();\n\n global $cache;\n\n // for view cache\n $screenshots_limit = 2;\n $generic_list_cache_key = array('screenshot', null,\n array('entity_id' => $this->get_data('entity_id'), 'entity_type' => $this->get_data('entity_type')),\n null, null, null,\n array('rand()'),\n $screenshots_limit, 0, null);\n $cache->clear('GenericList', $generic_list_cache_key);\n\n // for edit cache\n $screenshots_limit = 0;\n $generic_list_cache_key = array('screenshot', null,\n array('entity_id' => $this->get_data('entity_id'), 'entity_type' => $this->get_data('entity_type')),\n null, null, null,\n array('rand()'),\n $screenshots_limit, 0, null);\n\n $cache->clear('GenericList', $generic_list_cache_key);\n }", "title": "" }, { "docid": "f7d343efe6e758fb41346a85fa9de598", "score": "0.5659444", "text": "function modify_urls()\r\n\t\t{\r\n\t\t\t// this was a bitch to code\r\n\t\t\t// follows CGIProxy's logic of his HTML routine in some aspects\r\n\r\n\t\t\t/*\r\n\t\t\t*/\r\n\r\n\t\t\t$tags = array\r\n\t\t\t(\r\n\t\t\t'a' => array('href'),\r\n\t\t\t'area' => array('href'),\r\n\t\t\t'img' => array('src', 'longdesc'),\r\n\t\t\t'image' => array('src', 'longdesc'),\r\n\t\t\t'base' => array('href'),\r\n\t\t\t'body' => array('background'),\r\n\t\t\t'frame' => array('src', 'longdesc'),\r\n\t\t\t'iframe' => array('src', 'longdesc'),\r\n\t\t\t'head' => array('profile'),\r\n\t\t\t'layer' => array('src'),\r\n\t\t\t'input' => array('src', 'usemap'),\r\n\t\t\t'form' => array('action'),\r\n\t\t\t'link' => array('href', 'src', 'urn'),\r\n\t\t\t'meta' => array('content'),\r\n\t\t\t'param' => array('value'),\r\n\t\t\t'applet' => array('codebase', 'code', 'object', 'archive'),\r\n\t\t\t'object' => array('usermap', 'codebase', 'classid', 'archive', 'data'),\r\n\t\t\t'script' => array('src'),\r\n\t\t\t'select' => array('src'),\r\n\t\t\t'hr' => array('src'),\r\n\t\t\t'table' => array('background'),\r\n\t\t\t'tr' => array('background'),\r\n\t\t\t'th' => array('background'),\r\n\t\t\t'td' => array('background'),\r\n\t\t\t'bgsound' => array('src'),\r\n\t\t\t'blockquote' => array('cite'),\r\n\t\t\t'del' => array('cite'),\r\n\t\t\t'embed' => array('src'),\r\n\t\t\t'fig' => array('src', 'imagemap'),\r\n\t\t\t'ilayer' => array('src'),\r\n\t\t\t'ins' => array('cite'),\r\n\t\t\t'note' => array('src'),\r\n\t\t\t'overlay' => array('src', 'imagemap'),\r\n\t\t\t'q' => array('cite'),\r\n\t\t\t'ul' => array('src')\r\n\t\t\t);\r\n\r\n\t\t\tpreg_match_all('#(<\\s*style[^>]*>)(.*?)(<\\s*/style[^>]*>)#is', $this->body_content, $matches, PREG_SET_ORDER);\r\n\r\n\t\t\tfor ($i = 0, $count_i = count($matches); $i < $count_i; $i++)\r\n\t\t\t{\r\n\t\t\t\t$this->body_content = str_replace($matches[$i][0], $matches[$i][1]. $this->proxify_css($matches[$i][2]) .$matches[$i][3], $this->body_content);\r\n\t\t\t}\r\n\r\n\t\t\tpreg_match_all(\"#<\\s*([a-zA-Z]+)([^>]+)>#\", $this->body_content, $matches);\r\n\r\n\t\t\tfor ($i = 0, $count_i = count($matches[0]); $i < $count_i; $i++)\r\n\t\t\t{\r\n\t\t\t\t$tag = strtolower($matches[1][$i]);\r\n\r\n\t\t\t\tif (!isset($tags[$tag]) || !preg_match_all(\"#([a-zA-Z\\-\\/]+)\\s*(?:=\\s*(?:\\\"([^\\\">]*)\\\"?|'([^'>]*)'?|([^'\\\"\\s]*)))?#\", $matches[2][$i], $m, PREG_SET_ORDER))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$rebuild = false;\r\n\t\t\t\t$extra_html = $temp = '';\r\n\t\t\t\t$attrs = array();\r\n\r\n\t\t\t\tfor ($j = 0, $count_j = count($m); $j < $count_j; $attrs[strtolower($m[$j][1])] = (isset($m[$j][4]) ? $m[$j][4] : (isset($m[$j][3]) ? $m[$j][3] : (isset($m[$j][2]) ? $m[$j][2] : false))), $j++);\r\n\r\n\t\t\t\tswitch ($tag)\r\n\t\t\t\t{\r\n\t\t\t\t\t//remove os links para nao desfocar a avaliacao do usuario\r\n\r\n\t\t\t\t\tcase 'a':\r\n\t\t\t\t\tcase 'area':\r\n\t\t\t\t\t\tif (isset($attrs['href']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//space-separated list of urls\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['href'] = \"#\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase 'form':\r\n\t\t\t\t\t\tif (isset($attrs['action']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//space-separated list of urls\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['action'] = \"\";\r\n\t\t\t\t\t\t\t$attrs['method'] = \"POST\";\r\n\t\t\t\t\t\t\t$attrs['onsubmit'] = \"\";\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\r\n\r\n\r\n\t\t\t\t\tcase 'base':\r\n\t\t\t\t\t\tif (isset($attrs['href']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$this->parse_url($attrs['href'], $this->base);\r\n\t\t\t\t\t\t\t$attrs['href'] = $this->proxify_url($attrs['href']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'body':\r\n\t\t\t\t\t\tif (isset($this->flags['include_form']) && $this->flags['include_form'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\tob_start();\r\n\t\t\t\t\t\t\tinclude_once 'url_form.inc';\r\n\t\t\t\t\t\t\t$extra_html = \"\\n\" . ob_get_contents();\r\n\t\t\t\t\t\t\tob_end_clean();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tcase 'meta':\r\n\t\t\t\t\t\tif (isset($this->flags['strip_meta']) && $this->flags['strip_meta'] && isset($attrs['name']) && preg_match('#(keywords|description)#i', $attrs['name']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->body_content = str_replace($matches[0][$i], '', $this->body_content);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['http-equiv'], $attrs['content']) && strtolower($attrs['http-equiv']) === 'refresh')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (preg_match('#^(\\s*[0-9]+\\s*;\\s*url=)(.*)#i', $attrs['content'], $content))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t\t$attrs['content'] = $content[1] . $this->proxify_url($content[2]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'head':\r\n\t\t\t\t\t\tif (isset($attrs['profile']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//space-separated list of urls\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['profile'] = implode(' ', array_map(array(&$this, 'proxify_url'), explode(' ', $attrs['profile'])));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'applet':\r\n\t\t\t\t\t\tif (isset($attrs['codebase']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$temp = $this->base;\r\n\t\t\t\t\t\t\t$this->parse_url($this->proxify_url(rtrim($attrs['codebase'], '/') . '/', false), $this->base);\r\n\t\t\t\t\t\t\tunset($attrs['codebase']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['code']) && strpos($attrs['code'], '/') !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['code'] = $this->proxify_url($attrs['code']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['object']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['object'] = $this->proxify_url($attrs['object']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['archive']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['archive'] = implode(',', array_map(array(&$this, 'proxify_url'), preg_split('#\\s*,\\s*#', $attrs['archive'])));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!empty($temp))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->base = $temp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'object':\r\n\t\t\t\t\t\tif (isset($attrs['usemap']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['usemap'] = $this->proxify_url($attrs['usemap']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['codebase']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$temp = $this->base;\r\n\t\t\t\t\t\t\t$this->parse_url($this->proxify_url(rtrim($attrs['codebase'], '/') . '/', false), $this->base);\r\n\t\t\t\t\t\t\tunset($attrs['codebase']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['data']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['data'] = $this->proxify_url($attrs['data']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['classid']) && !preg_match('#^clsid:#i', $attrs['classid']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['classid'] = $this->proxify_url($attrs['classid']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (isset($attrs['archive']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['archive'] = implode(' ', array_map(array(&$this, 'proxify_url'), explode(' ', $attrs['archive'])));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!empty($temp))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->base = $temp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'param':\r\n\t\t\t\t\t\tif (isset($attrs['valuetype'], $attrs['value']) && strtolower($attrs['valuetype']) == 'ref' && preg_match('#^[\\w.+-]+://#', $attrs['value']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t$attrs['value'] = $this->proxify_url($attrs['value']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'form':\r\n\t\t\t\t\t\tif (isset($attrs['action']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (trim($attrs['action']) === '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t\t$attrs['action'] = $this->url_segments['path'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (!isset($attrs['method']) || strtolower($attrs['method']) === 'get')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t\t$extra_html = '<input type=\"hidden\" name=\"' . $this->config['get_form_name'] . '\" value=\"' . $this->encode_url($this->proxify_url($attrs['action'], false)) . '\" />';\r\n\t\t\t\t\t\t\t\t$attrs['action'] = '';\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tforeach ($tags[$tag] as $attr)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (isset($attrs[$attr]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$rebuild = true;\r\n\t\t\t\t\t\t\t\t$attrs[$attr] = $this->proxify_url($attrs[$attr]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($rebuild)\r\n\t\t\t\t{\r\n\t\t\t\t\t$new_tag = \"<$tag\";\r\n\t\t\t\t\tforeach ($attrs as $name => $value)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$delim = strpos($value, '\"') && !strpos($value, \"'\") ? \"'\" : '\"';\r\n\t\t\t\t\t\t$new_tag .= ' ' . $name . ($value !== false ? '=' . $delim . $value . $delim : '');\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$this->body_content = str_replace($matches[0][$i], $new_tag . '>' . $extra_html, $this->body_content);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "2c762708bc4077f9a3aedc80aac4b806", "score": "0.56517464", "text": "protected abstract function getCache();", "title": "" }, { "docid": "885c05ce2a7e33b895c7f701c18ec8b3", "score": "0.5639892", "text": "protected function flush_cache() {}", "title": "" }, { "docid": "b01c23709da8354681c590d2a335f95b", "score": "0.5615555", "text": "function cache_flush($urls = null)\n\t{\n\t\treturn $urls === null ? XLII_Cache::flush() : XLII_Cache::delete($urls);\n\t}", "title": "" }, { "docid": "274fa477abffb946a432fc38b0559416", "score": "0.56118387", "text": "function predis_update_cache( $post_id ) {\n if ( wp_is_post_revision( $post_id ) )\n return;\n\n $post_url = get_permalink( $post_id );\n delete_predis_cache($post_url);\n}", "title": "" }, { "docid": "3769888e76b18ba4fc280cbd2ca2925f", "score": "0.560217", "text": "public function update_cache(){\n\t\t$this->cache=\"\";\n\t\tif(is_array($this->icache))\n\t\t\tforeach($this->icache as $parentId => $itemes)\n\t\t\t\t $this->build_cache($parentId);\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "4c9b21e8e7b0539264a78db7931e14a2", "score": "0.5600761", "text": "public function flushCache();", "title": "" }, { "docid": "c809fbbf10641c62a27a1279787641c6", "score": "0.5588508", "text": "public function cacheAll(){\n\t\t$this->cache(0,0);\n\t\t//$this->_intervalo = $aux;\n\t}", "title": "" }, { "docid": "2a30cec3cc350d466ecb334816f93b36", "score": "0.55261755", "text": "public function getCache();", "title": "" }, { "docid": "198499fc326752d3dc4687ca91b67494", "score": "0.55226713", "text": "private function update_cache($document) {\n\t\t$match_found = false; #file_name does not exist in the cache until found\n\n\t\ttouch(self::cache_file); #make sure the cache exists\n\n\t\t#load the existing cache file into an array\n\t\t$cache_file = file(self::cache_file);\n\t\t#loop through each line\n\t\tforeach ($cache_file as $line_num => $line) {\n\t\t\t#split out the line based on the field separator\n\t\t\t$xpl = explode(self::field_separator, $line);\n\t\t\t#check to see if we have a file name match\n\t\t\tif ($xpl[0] == $document->get_id()) {\n\t\t\t\t$match_found = true;\n\t\t\t\t$xpl[1] = $document->get_metadata(\"title\"); \n\t\t\t\t$xpl[2] = $document->get_metadata(\"context\"); \n\t\t\t\t#replace the line with whatever we passed in\n\t\t\t\t$cache_file[$line_num] = implode(self::field_separator, $xpl) . \"\\n\";\n\t\t\t}\n\t\t}\n\n\t\t#implode the cache contents array back into one big string\n\t\t$new_cache = implode(\"\", $cache_file);\n\n\t\t#if no match was found in the cache, add the file to the bottom\n\t\tif (!$match_found) {\n\t\t\t$new_cache .= sprintf(\"%s%s%s%s%s\\n\",\n\t\t\t\t\t$document->get_id(),\n\t\t\t\t\tself::field_separator,\n\t\t\t\t\t$document->get_metadata(\"title\"),\n\t\t\t\t\tself::field_separator,\n\t\t\t\t\t$document->get_metadata(\"context\"));\n\t\t}\n\n\t\t#now actually write the results to disk\n\t\t$cf = fopen(self::cache_file, \"w\");\n\t\tfwrite($cf, $new_cache);\n\t\tfclose($cf);\n\t}", "title": "" }, { "docid": "01ab4de52582b84b0cfdad09d25d2acd", "score": "0.5467336", "text": "function cleanShortUrlCache () {\r\n\t\tglobal $TYPO3_DB;\r\n\r\n\t\t$shortUrlLife = intval($this->conf['shortUrlLife']) ? strval(intval($this->conf['shortUrlLife'])) : '30';\r\n\t\t$max_life = time() - (86400 * intval($shortUrlLife));\r\n\t\t$res = $TYPO3_DB->exec_DELETEquery('cache_md5params', 'tstamp<' . $max_life . ' AND type=99');\r\n\t}", "title": "" }, { "docid": "8d8b5a86c0cddf3d8b77fc11ebb1562d", "score": "0.5467116", "text": "public function filter_embed_oembed_html( $cache, $url, $attr, $post_ID ) {\n\n\t\t$host = parse_url( $url, PHP_URL_HOST );\n\t\tswitch ( $host ) {\n\n\t\t\tcase 'www.youtube.com':\n\t\t\t\t$cache = str_replace( '<iframe ', '<iframe class=\"cst-responsive\" data-true-height=\"640\" data-true-width=\"360\" ', $cache );\n\t\t\t\tbreak;\n\n\t\t\tcase 'instagr.am';\n\t\t\tcase 'instagram.com':\n\t\t\t\t$cache = str_replace( '_a.jpg', '_o.jpg', $cache );\n\t\t\t\t$cache = str_replace( '<img ', '<img style=\"width: 100% !important; height: auto !important;\" ', $cache );\n\t\t\t\tbreak;\n\n\t\t}\n\t\treturn $cache;\n\t}", "title": "" }, { "docid": "8a1e95cc92ad3cdb511ea435e41e64ab", "score": "0.54666924", "text": "public static function ClearCache();", "title": "" }, { "docid": "25066a2c3c2af0b55047c7b279e0373e", "score": "0.54565954", "text": "public static function getCache () {}", "title": "" }, { "docid": "982a580ae588a76f86610330037bc083", "score": "0.54337084", "text": "public function disableCache(): void;", "title": "" }, { "docid": "2321be6ee0d9e014d859c3d0978ea759", "score": "0.54279554", "text": "private function _cache($key, $value, $expires=MAXIMUM){\n\t\tif($ret = $this->memcached->replace($key, $value, 0, $expires) === false){\n\t\t\treturn $this->memcached->set($key, $value, 0, $expires);\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "b863344872672874dac53854f8008820", "score": "0.5426435", "text": "private function cacheManager($seconds_tocache){\r\n $ts = gmdate(\"D, d M Y H:i:s\", time() + $seconds_tocache) . \" GMT\";\r\n header(\"Expires: \". $ts);\r\n header(\"Pragma: cache\");\r\n header(\"Cache-Control: max-age=\".$seconds_tocache);\r\n header(\"User-Cache-Control: max-age=\".$seconds_tocache);\r\n }", "title": "" }, { "docid": "2ee6bc5fc453482ae9207da1e19d52db", "score": "0.54249907", "text": "public function disableCache();", "title": "" }, { "docid": "f37ad1b7d002fb24f96e6187fd78da28", "score": "0.5423622", "text": "public function clearCache(): void;", "title": "" }, { "docid": "ca5b2fda6e003d0d17e9c5beedec6e59", "score": "0.5420006", "text": "protected function updateUrls()\n {\n $this->log(\"Updating secure and unsecure URLs.\");\n\n if (strlen($this->dbPassword)) {\n $password = sprintf('-p%s', $this->dbPassword);\n }\n\n foreach ($this->urls as $urlType => $urls) {\n foreach ($urls as $route => $url) {\n $prefix = 'unsecure' === $urlType ? self::PREFIX_UNSECURE : self::PREFIX_SECURE;\n if (!strlen($route)) {\n $this->execute(\"mysql -u $this->dbUser -h $this->dbHost -e \\\"update core_config_data set value = '$url' where path = 'web/$urlType/base_url' and scope_id = '0';\\\" $password $this->dbName\");\n continue;\n }\n $likeKey = $prefix . $route . '%';\n $likeKeyParsed = $prefix . str_replace('.', '---', $route) . '%';\n $this->execute(\"mysql -u $this->dbUser -h $this->dbHost -e \\\"update core_config_data set value = '$url' where path = 'web/$urlType/base_url' and (value like '$likeKey' or value like '$likeKeyParsed');\\\" $password $this->dbName\");\n }\n }\n }", "title": "" }, { "docid": "01332e6a4b58c1820b43f45c7f42b3b6", "score": "0.5409652", "text": "private function set_caching_rules() {\r\n\t\tif ( ! $this->is_connected() || ! $this->is_zone_selected() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->clear_caching_page_rules();\r\n\r\n\t\t$expirations = $this->get_filetypes_expirations();\r\n\r\n\t\tforeach ( $expirations as $filetype => $expiration ) {\r\n\t\t\t$this->add_caching_page_rule( $filetype );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e3da12a49f1b6ee3f2d90aca9b82b26f", "score": "0.5397883", "text": "function cache_init() {\n\t\n\t\tglobal $fp_params;\n\t\t\n\t\t$this->fp_params =& $fp_params;\n\t\t$url = $this->get_url();\n\t\n\t\tif (PRETTYURLS_TITLES) {\n\t\t\t#if ($f = io_load_file(PRETTYURLS_CACHE))\n\t\t\t$this->index = array(); #unserialize($f);\n\t\t\t\n\t\t\tif (!file_exists(PRETTYURLS_CACHE))\n\t\t\t\t$this->cache_create();\n\n\n\t\t\t$this->categories(false);\n\t\t}\n\n\t\tif (!defined('MOD_INDEX'))\n\t\t\treturn;\n\t\t\n\t\t\n\n//\t\t# this is not working if you reach flatpress via symlink\n//\t\t# unless you don't edit manually defaults.php\n//\t\tif (strpos($_SERVER['REQUEST_URI'], BLOG_ROOT)!==false) {\n//\t\t\t$url = $_SERVER['REQUEST_URI'];\n//\t\t\t$del = BLOG_ROOT;\n//\t\t\tif (strpos($url, 'index.php')!==false)\n//\t\t\t\t$del = $del . 'index.php/';\n//\t\t\t$url = substr($url, strlen($del)-1);\n//\t\t}\n\n\t\t// removes querystrings\n\t\tif (false !== $i = strpos($url, '?'))\n\t\t\t$url = substr($url, 0, $i);\n\n\t\t// removes anchors\n\t\tif (false !== $i = strpos($url, '#'))\n\t\t\t$url = substr($url, 0, $i);\n\n\t\n\t\tif (strrpos($url, '/') != (strlen($url)-1)) {\n\t\t\t$url .= '/';\n\t\t}\n\n\n\t\tif ($url=='/')\n\t\t\treturn;\n\n\t\n\t\t\n\t\t//date\n\t\t$url = preg_replace_callback(\n\t\t\t'!^/[0-9]{2}(?P<y>[0-9]{2})(/(?P<m>[0-9]{2})(/(?P<d>[0-9]{2}))?)?!', \n\t\t\tarray(&$this, 'handle_date'), \n\t\t\t$url\n\t\t\t);\n\t\t\t\n\t\t\n\t\tif (!$this->date_handled){\n\t\t\t// static page\n\t\t\t$url = preg_replace_callback('|^/([a-zA-Z0-9_-]+)/$|', array(&$this, 'handle_static'), $url);\n\t\t\tif ($this->status == 2)\n\t\t\t\treturn $this->check_url($url);\n\t\t}\n\t\t\n\t\t\n\t\t$url = preg_replace_callback('{category/([^/]+)/}', array(&$this, 'handle_categories'), $url);\n\t\t\n\t\t\n\t\t$url = preg_replace_callback('|page/([0-9]+)/$|', array(&$this, 'handle_page'), $url);\t\t\n\t\tif ($this->status == 2)\n\t\t\treturn $this->check_url($url);\t\n\t\t\n\t\tif ($this->date_handled){\n\t\t\t$url = preg_replace_callback('|^/([^/]+)|', array(&$this, 'handle_entry'), $url);\n\t\t\t// if status = 2\n\t\t\t\t/*\n\t\t\t\t\tutils_error(404);\n\t\t\t\t*/\n\t\t\t\n\t\t\t$url = preg_replace_callback('|^/comments|', array(&$this, 'handle_comment'), $url);\n\t\t}\n\t\t\n\t\t\n\t\t$url = preg_replace_callback('|^/feed(/([^/]*))?|', array(&$this, 'handle_feed'), $url);\n\t\t\n\t\t$this->check_url($url);\n\t\t\n\t}", "title": "" }, { "docid": "c42c82eb947ebfeb2c88be32269d2b6c", "score": "0.5394081", "text": "public function rebuildCacheFile() {\n\t\t$templateContent = file_get_contents($this->getFilePath());\n\n\t\t$cacheContent\t = preg_replace($this->getPattern(), $this->getReplace(), $templateContent);\n\t\t$fCache\t\t\t = fopen($this->getCacheFile(), 'w+');\n\t\tfwrite($fCache, $cacheContent);\n\t\tfclose($fCache);\n\t\tchmod($this->getCacheFile(), 0777);\n\t}", "title": "" }, { "docid": "f9b553ba68d5a8b1d86bfe040945b5dc", "score": "0.5393694", "text": "protected function clean_cache() {}", "title": "" }, { "docid": "8d6d2c94e03d2975e4ef85193449ca30", "score": "0.53936017", "text": "final protected function cacheReplaceClosure():\\Closure\n {\n $pattern = $this->getCacheReplacePattern();\n $replace = Base\\Arr::keysWrap($pattern[0],$pattern[1],$this->getCacheReplace());\n $replaceSystem = Base\\Arr::keysWrap($pattern[0],$pattern[1],$this->getCacheReplaceSystem());\n\n return function(string $return) use($replace,$replaceSystem) {\n $return = Base\\Str::replace($replace,$return);\n $return = Base\\Str::replace($replaceSystem,$return);\n\n return $return;\n };\n }", "title": "" }, { "docid": "be3f7d2aba4e3999c8e2c7c7938e58d7", "score": "0.53906447", "text": "function Cache() {\n $cachefilename = func_get_args();\n $cachefilename = $cachefilename[0];\n $cachefilename = str_replace('/', '', isset($cachefilename) ? $cachefilename : $_SERVER['PHP_SELF']).'.cache';\n $this->cachefile = $this->cachedir.$cachefilename;\n }", "title": "" }, { "docid": "afbdaf2497cbc8ec037068a77f68b418", "score": "0.53858376", "text": "private function saveToCache() {\n\t\tif ( $this->exists() ) {\n\t\t\t$cachedValues = [\n\t\t\t\t'url' => $this->url,\n\t\t\t\t'type' => $this->type,\n\t\t\t\t'actor' => $this->submitter_actor,\n\t\t\t\t'create_date' => $this->create_date\n\t\t\t];\n\n\t\t\t$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();\n\n\t\t\t// Set cache for one week\n\t\t\t$cache->set( $this->getCacheKey(), $cachedValues, 60 * 60 * 24 * 7 );\n\t\t} else {\n\t\t\t// However we should clear them, so they aren't leftover\n\t\t\t// if we've deleted the file.\n\t\t\t$this->clearCache();\n\t\t}\n\t}", "title": "" }, { "docid": "4f5736f7ae5037b8b2b1ca1053045fae", "score": "0.5380425", "text": "function cache_image($image_url, $use_cache, $cache_dir) {\n\n\tif($use_cache and is_writable($cache_dir)) {\n\t\t$image_file = $cache_dir . substr($image_url,strrpos($image_url,\"/\")+1);\n\n\t\t# check if file already exists in cache\n\t\t# if not, grab a copy of it\n\t\tif (!file_exists($image_file)) {\n\t\t\tif ( function_exists('curl_init') ) { // check for CURL, if not use fopen\n\t\t\t\t$curl = curl_init();\n\t\t\t\t$local_image = fopen($image_file, \"wb\");\n\t\t\t\tcurl_setopt($curl, CURLOPT_URL, $image_url);\n\t\t\t\tcurl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);\n\t\t\t\tcurl_setopt($curl, CURLOPT_FILE, $local_image);\n\t\t\t\tcurl_exec($curl);\n\t\t\t\tcurl_close($curl);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$file_data = \"\";\n\t\t\t\t$remote_image = fopen($image_url, 'rb');\n\t\t\t\tif ($remote_image) {\n\t\t\t\t\twhile(!feof($remote_image)) {\n\t\t\t\t\t\t$file_data.= fread($remote_image,1024*8);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfclose($remote_image);\n\t\t\t\t$local_image = fopen(\"$image_file\", 'wb');\n\t\t\t\tfwrite($local_image,$file_data);\n\t\t\t\tfclose($local_image);\n\t\t\t} // end CURL check\n\t\t} // end file check\n\t\t$path = get_bloginfo('wpurl') . \"/\";\n\t\treturn $path . $image_file;\n\t}\n\telse\n\t\treturn $image_url;\n}", "title": "" }, { "docid": "f2c59548c67731b82332d53c81a79bca", "score": "0.53708774", "text": "function lesscss_compile_cache_set($less_parser, $file_path, $cache_key, $value) {\r\n\tcache_set(\"lesscss:$cache_key\", array('path' => $file_path, 'value' => $value));\r\n}", "title": "" }, { "docid": "51a8387e22a2ebd005de62448624e814", "score": "0.53649676", "text": "function wp_cache_replace($key, $data, $group = '', $expire = 0)\n\t{\n\t\tglobal $wp_object_cache;\n\t\tif (empty($group)) { $group = 'default'; }\n\t\treturn $wp_object_cache->replace($key, $data, $group, $expire);\n\t}", "title": "" }, { "docid": "a8ce4a5c01ad76908b0a43f38e0bf8b9", "score": "0.53485817", "text": "protected function cacheNews()\n {\n $this->cache = $this->service->getMultiple(['sort' => 'created_at:desc']);\n }", "title": "" }, { "docid": "a06f3fe777414794bd2fb76b465a838d", "score": "0.5343067", "text": "public function setCache($cache)\n {\n }", "title": "" }, { "docid": "5ee266d415aa708e6199cccbe4ce72da", "score": "0.5336251", "text": "function updateCache()\n {\n \n // Load simpleXML for reading the cache data file. \n $dom = new DOMDocument;\n \n // Load the File as a DOM document\n \n if( !$dom->loadXML( file_get_contents( $this->cacheDir . \"cache.xml\" ) ) )\n {\n \n throw new Exception( \"Could not load xml cache store file.\" );\n \n }\n \n $xpath = new DOMXPath($dom);\n $els = $xpath->query(\"//file\");\n \n foreach( $els as $file) {\n \n // If the Cache file is old...\n if( $file->getElementsByTagName( \"timestamp\" )->item(0)->nodeValue \n < time() )\n {\n \n // Remove item from the XML document\n $dom->documentElement->removeChild( $file );\n \n // Remove cache file\n unlink( $this->cacheDir . $file->getElementsByTagName( \"filename\" )->\n item(0)->nodeValue );\n \n }\n \n }\n \n if( !@$dom->save( $this->cacheDir . \"cache.xml\" ) )\n {\n \n throw new Exception( \"Could not write the <i>\" . $this->cacheDir . \n \"cache.xml\" . \"</i> file.\" );\n \n }\n \n return true;\n \n }", "title": "" }, { "docid": "835aff855cfb177361574bf805dc560f", "score": "0.53278756", "text": "public function cache($content){\r\n\t\tif( !$this->disabled ){\r\n\t\t\tfile_put_contents($this->cacheDir.$this->requestId.$this->fileSuffix, $content);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8fc69fa69584b12923c3ab2c2e0360f7", "score": "0.53267974", "text": "public function cache($options=null);", "title": "" }, { "docid": "e5b6283d5f75539a74d925d5e09253c2", "score": "0.5310824", "text": "protected function prepareUrlRewrites()\n {\n\n // call the parent method\n parent::prepareUrlRewrites();\n\n // (re-)initialize the array for the existing URL rewrites\n $this->existingUrlRewrites = array();\n\n // load primary key and entity type\n $pk = $this->getPrimaryKey();\n $entityType = UrlRewriteObserver::ENTITY_TYPE;\n\n // load the store ID to use\n $storeId = $this->getSubject()->getRowStoreId();\n\n // load the existing URL rewrites of the actual entity\n $existingUrlRewrites = $this->loadUrlRewritesByEntityTypeAndEntityIdAndStoreId($entityType, $pk, $storeId);\n\n // prepare the existing URL rewrites to improve searching them by store ID/request path\n foreach ($existingUrlRewrites as $existingUrlRewrite) {\n // load the request path from the existing URL rewrite\n $requestPath = $existingUrlRewrite[MemberNames::REQUEST_PATH];\n\n // append the URL rewrite with its store ID/request path\n $this->existingUrlRewrites[$requestPath] = $existingUrlRewrite;\n }\n }", "title": "" }, { "docid": "70b5f6ae645429b70b3e8fac31d9b6e0", "score": "0.5304823", "text": "public function get_cached($url) {\n $simplified_url = str_replace([\"http://\", \"https://\", \"?\", \"&\", \"=\"], [\"\", \"\", \"/\", \"/\", \"/\"], $url);\n\t\t// TODO build this from the variable given to Cache\n\t\t$pageCacheDir = __DIR__ . '/../cache/'.\"pages/\";\n $filename = $pageCacheDir.$simplified_url;\n if (substr($filename, -1) == '/') {\n $filename = $filename.\"index.html\";\n }\n if(file_exists($filename)) {\n// $this->message(\"loading cached file from \".$filename.\" for page at url \".$url);\n\t\t\t// TODO touch file and its parent, and try to do neighbour deletion\n $this->refresh_in_cache($pageCacheDir, $filename);\n\t\t} else {\n// $this->message(\"we have no local copy of \".$url.\" Downloading to \".$filename);\n $dir = substr($filename, 0, strrpos($filename, '/'));\n if(!is_dir($dir)) {\n//\t\t\t\t$this->message(\"creating directories for \".$dir);\n mkdir($dir, 0777, true);\n }\n $this->download_remote($url, $filename);\n }\n return file_get_contents($filename);\n }", "title": "" }, { "docid": "acaad46f776beb7e4e9afde4f07afe87", "score": "0.5303015", "text": "public function clearInternalCache();", "title": "" }, { "docid": "93e870f79cd04b5a1cb429f8a67ca43f", "score": "0.53013617", "text": "protected function currentUrlRewritesRegenerate()\n {\n $currentUrlRewrites = $this->urlFinder->findAllByData(\n [\n UrlRewrite::STORE_ID => array_keys($this->storesList),\n UrlRewrite::ENTITY_ID => array_keys($this->categories),\n UrlRewrite::ENTITY_TYPE => CategoryUrlRewriteGenerator::ENTITY_TYPE,\n ]\n );\n\n $urlRewrites = [];\n foreach ($currentUrlRewrites as $currentUrlRewrite) {\n $category = $this->retrieveCategoryFromMetadata($currentUrlRewrite);\n if ($category === false) {\n continue;\n }\n $url = $currentUrlRewrite->getIsAutogenerated()\n ? $this->generateForAutogenerated($currentUrlRewrite)\n : $this->generateForCustom($currentUrlRewrite);\n $urlRewrites = array_merge($urlRewrites, $url);\n }\n\n $this->categories = null;\n return $urlRewrites;\n }", "title": "" }, { "docid": "7d09a98c8de373653dd0f4ac81fe8583", "score": "0.5296651", "text": "public function updateRates()\n {\n $this->rates = Cache::remember($this->getCacheKey(), $this->cache_expiry, function () {\n return $this->getLiveRates();\n });\n }", "title": "" }, { "docid": "2180c34994d3e4caa87fc091e3a15384", "score": "0.52909344", "text": "function bimber_mashsharer_enable_custom_caching_rules() {\n\tbimber_mashsharer_switch_cache( 'mashsharer_custom_cache' );\n}", "title": "" }, { "docid": "899b8f73e2df7025105b4545c5f18b44", "score": "0.5289786", "text": "function cache_init(){}", "title": "" }, { "docid": "85f0229b239a701bd531e259ae446929", "score": "0.5285651", "text": "private function updateCachedResults() {\n @mkdir(dirname($this->cacheFile), 0777, TRUE); // @ - may exist\n file_put_contents($this->cacheFile, serialize($this->results));\n }", "title": "" }, { "docid": "596e73e6a219a814c7a074bb9fcbc548", "score": "0.52817386", "text": "public function deleteCache($url){\r\n unlink($this->cacheFilename(($url)));\r\n }", "title": "" }, { "docid": "482b788ef593b57f9d58be76a2347d4a", "score": "0.52729607", "text": "function aif_update_source_urls($name = '') {\n\t$uploads_dir = wp_upload_dir();\n\t$directory = $uploads_dir['basedir'];\n\t$file = $directory . '/aif/' . $name . '.css';\n\t$file_handle = file_get_contents($file);\n\n\t$new_path = get_bloginfo( 'url' );\n\t$new_path = preg_split('/http:|https:/', $new_path);\n\t$new_path = $new_path[1];\n\n\t$old_path = explode('~', $file_handle);\n\t$old_path1 = $old_path[1];\n\t$old_path2 = explode('/wp-content', $old_path1);\n\t$old_path3 = $old_path2[0];\n\n\t$file_handle = str_replace($old_path3, $new_path, $file_handle);\n\n\t$handle = fopen($file, 'w');\n\n\tfwrite($handle, $file_handle);\n\tfclose($handle);\n\n\treturn true;\n}", "title": "" }, { "docid": "1a6bc0bbaa3f2fd753957c154c3aef18", "score": "0.5272945", "text": "function purgeUrl($pattern);", "title": "" }, { "docid": "393db974661e644b934d67df54ad297c", "score": "0.5269164", "text": "public function serveCache()\n\t{\n\t\tif(!$data = XLII_Cache::get($this->getUrl()))\n\t\t\treturn $this;\n\t\t\n\t\tif(empty($data['content']))\n\t\t\treturn $this;\n\n\t\t// -- Send caching headers\n\t\theader('Cache-Control: public');\n\n\t\theader('ETag: ' . $this->eTag($this->getUrl()));\n\t\theader('Expires: ' . gmdate('D, d M Y H:i:s', $data['expires']) . ' GMT');\n\t\theader('Cache-Control: public, ' . (XLII_Cache_Manager::option('options.revalidate') ? 'max-age=0, must-revalidate' : 'max-age=' . ($data['expires'] - $this->gmtime()) ));\n\t\n\t\theader('X-Cache-Age: ' . ($this->gmtime() - $data['date']));\n\t\theader('X-Cache-Origin: Server Cache');\n\t\t\n\t\t// -- Send headers\n\t\tforeach($data['headers'] as $header)\n\t\t\theader($header);\n\t\t\t\n\t\t// -- Output content\n\t\techo $this->compress($data['content']);\n\t\t\n\t\texit;\n\t}", "title": "" }, { "docid": "f9eee568f2a78c020500a0b0cfbd15a0", "score": "0.52634776", "text": "function managed_hosting_disable_page_caching() {\n\tadd_filter( 'do_rocket_generate_caching_files', '__return_false' );\n}", "title": "" }, { "docid": "c99f5c4957eebb00f3e158aab9523f5c", "score": "0.5259686", "text": "public function PurgeCache() {\n foreach (glob($this->CacheDir .'/CURL_*') as $filename) {\n $seconds = $this->MaxAge($filename);\n if (file_exists($filename) && @filemtime($filename) < (time() - $seconds)) {\n @unlink($filename);\n }\n }\n }", "title": "" }, { "docid": "13dfcf969766a9cdcca07c72e3e83262", "score": "0.5251746", "text": "public function _set_cache($value) {\n\t\t$this->_cache = $value;\n\t}", "title": "" }, { "docid": "dcf3cb53a22c1ee63480a1a95567aea0", "score": "0.52495354", "text": "private function _getHTMLFromCache($url)\n\t{\n\t\t$key = md5($url);\n\t\t//try to use apc\n\t\tif(extension_loaded('apc') && ini_get('apc.enabled'))\n\t\t{\n\t\t\tif(apc_exists($key))\n\t\t\t\treturn apc_fetch($key);\n\t\t\t$html = BmvComScriptCURL::readUrl ( $url );\n\t\t\tapc_add($key, $html);\n\t\t\treturn $html;\n\t\t}\n\t\treturn BmvComScriptCURL::readUrl ( $url );\n\t}", "title": "" }, { "docid": "365f0b93ce5fcc1fa9dc31ee6e619476", "score": "0.52431595", "text": "function set_cache_refresh($name)\n{\n\tglobal $db, $cache;\n\t\n\t$cache_name = $name . '_time';\n\t\n\t$cache->put($cache_name, time());\n}", "title": "" }, { "docid": "a56224dba370bd1b217c5ab3e0166a5f", "score": "0.5235802", "text": "private function setRoutesCache(){\n\n if(!$this['files']->exists(self::$app_path.'/../cache/routes.cache')) {\n $allRoutes = $this['router']->getRoutes();\n\n //If Routes then Serialize\n if (count($allRoutes) > 0) {\n foreach ($allRoutes as $routeObject) {\n $routeObject->prepareForSerialization();\n }\n }\n //Store Routes in Cache\n $this['files']->put(self::$app_path . '/../cache/routes.cache', base64_encode(serialize($allRoutes)));\n }\n }", "title": "" }, { "docid": "a1392f0f1a723d9523a59353b242a40d", "score": "0.5234238", "text": "public function forceReload(){\n\t\t$this->_cache->clear();\n\t}", "title": "" }, { "docid": "4b25aece1e1f5cfdb66be09d90ae1a1d", "score": "0.52281916", "text": "function cache_file($orig, $cache)\n{\n\tif (cache_valid($orig, $cache))\n\t\treturn $cache;\n\n\tif (!file_exists($orig))\n\t\treturn false;\n\n\t$content = cache_parse($orig);\n\n\t$fh = fopen($cache, 'w');\n\n\tif ($fh !== false) {\n\t\tfwrite($fh, $content);\n\t\tfclose($fh);\n\t\tchmod($cache, 0666);\n\t\ttouch($cache, filemtime($orig));\n\t\treturn $cache;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "2a914e07894fe35d680f3682570f5d37", "score": "0.5220513", "text": "private function update_sitemap_overide_url($url)\r\n\t{\r\n\t\tdelete_option('plugin_warm_cache_sitemap_override');\r\n\t\tadd_option('plugin_warm_cache_sitemap_override',htmlspecialchars($url));\t\t\t\r\n\t}", "title": "" }, { "docid": "7ddc070f555d26a399ec190e6097195a", "score": "0.52142274", "text": "public function updateVarnish()\n {\n $varnishObj = new KC\\Repository\\Varnish();\n $varnishObj->addUrl(rtrim( HTTP_PATH_FRONTEND , '/'));\n if (LOCALE == '') {\n $varnishObj->addUrl(HTTP_PATH_FRONTEND . 'marktplaatsfeed');\n $varnishObj->addUrl(HTTP_PATH_FRONTEND . 'marktplaatsmobilefeed');\n }\n }", "title": "" }, { "docid": "d57ce1bef5bf6c266f761eee369318ea", "score": "0.52043074", "text": "private function serveCache()\n\t{\n\t\theader('ETag: '.$this->identifier);\n\t\treadfile($this->cacheFile);\n\t\treturn;\n\t}", "title": "" }, { "docid": "7c69feb25fb5537483919ee30318f0f6", "score": "0.5197915", "text": "protected function appendCacheBuster($url)\n {\n if (($filePath = $this->resolveFilePath($url)) !== false) {\n $modified = filemtime($filePath);\n $url .= '?_=' . md5($modified);\n }\n return $url;\n }", "title": "" }, { "docid": "68053b7458ad3402fc6dd6f9a2853121", "score": "0.5193908", "text": "public function cache(){\n\n //Cache::set('name','1001');\n echo Cache::get(\"name\");\n\n }", "title": "" }, { "docid": "61bec598420334f9172f17c2015c0cf0", "score": "0.51900434", "text": "protected function getCacheReplace():array\n {\n return [];\n }", "title": "" }, { "docid": "81926fdc6b1657256eb74b308934efd5", "score": "0.51897806", "text": "public abstract function loadCache();", "title": "" }, { "docid": "c3b0be15f2b4dd8e94622a1d720ef858", "score": "0.5185569", "text": "protected abstract function _InitCaching();", "title": "" }, { "docid": "bff664a6f19a5182c5b998162104e18a", "score": "0.51829076", "text": "public function cacheConfig(): void;", "title": "" }, { "docid": "7810abc31053a1eb51800f6ac8d3c110", "score": "0.5180087", "text": "function gmt_courses_do_not_cache_feeds($feed) {\n\t\t$feed->enable_cache(false);\n\t}", "title": "" }, { "docid": "4610b4b02cb9291d99eacfb4d5c131ed", "score": "0.517792", "text": "protected function cacheTags()\n\t{\n\t\t$tags = $this->tagSource->getTags();\n\n\t\tfile_put_contents($this->cacheTagFile, json_encode($tags));\n\t}", "title": "" }, { "docid": "d74f48f444e43b07895af4b81fb23db3", "score": "0.516962", "text": "function createUrl($url, $index)\n {\n global $results;\n // Create cache info\n $cacheKey = md5($url);\n $cachePath = '../cache/'.$cacheKey;\n $cacheUsed = false;\n\n // If cache available\n if(file_exists($cachePath))\n {\n $results[$index] = file_get_contents($cachePath);\n $cacheUsed = true;\n }\n \n // If cache not available\n else\n {\n // Make request to API\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n // Setup in order to fix windows error\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n\n // Result of the request\n $results[$index] = curl_exec($curl);\n curl_close($curl);\n\n // Save in cache\n file_put_contents($cachePath, $results[$index]);\n }\n\n // Decode JSON\n $results[$index] = json_decode($results[$index]);\n }", "title": "" }, { "docid": "4bf5b4adcf54e3450b554c141e589b0d", "score": "0.5168992", "text": "public function generateCache()\n {\n // Get all config files, so they are stored in the appstorage as well\n $this->addAllConfigFiles();\n\n // Same for routes data\n if (!C::has('Router')) {\n $router = new Router();\n $router->init();\n } else {\n C::Router()->init();\n }\n\n // Generate cache, override file\n file_put_contents($this->cache_file, serialize($this->storage));\n }", "title": "" }, { "docid": "3a54c238c29c7ec3c9f652fb381ee05b", "score": "0.51647013", "text": "private function reCacheOnPublish($key)\n {\n if (isset($_GET['_storyblok_published']) && $this->cache && !$cachedItem = $this->cache->load($key)) {\n if (isset($cachedItem['story']) && $cachedItem['story']['id'] == $_GET['_storyblok_published']) {\n $this->cache->delete($key);\n }\n\n // Always refresh cache of links\n $this->cache->delete($this->linksPath);\n }\n\n return $this;\n }", "title": "" }, { "docid": "4caf74662cc684bd1e23fa7b5a6ce75f", "score": "0.5162546", "text": "public function getCached();", "title": "" }, { "docid": "fc43c8b22637e7893dd2b0c2599384e6", "score": "0.5161141", "text": "function setCaching() {\n\t\tglobal $wgOut, $wgEnableParserCache, $wgSimpleFormsEnableCaching;\n\t\tif ($wgSimpleFormsEnableCaching) return;\n\t\t$wgOut->enableClientCache(false);\n\t\theader(\"Cache-Control: no-cache, must-revalidate\");\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t}", "title": "" }, { "docid": "afc0c6288dda29647faac1320ab1b011", "score": "0.51567686", "text": "static private function replaceUrl($matches) {\n\n\t\t$path = $matches[3];\n\n\t\tif (preg_match(\"%(:.*/)%mi\", $path) == 1) {\n\t\t\treturn $matches[0];\n\t\t}\n\n\t\t$i = (substr($path, 0, 1) == \"\\\"\" || substr($path, 0, 1) == \"'\")?1:0;\n\n\t\t$path = substr($path, 0, $i).(substr($path, $i, 1) == \"/\"?self::$rootUrl:self::$baseUrl).substr($path, 1);\n\n\t\treturn $matches[1].$matches[2].\"=\".$path;\n\t}", "title": "" }, { "docid": "e15d42aca6dc92ebb312211652b29380", "score": "0.51550305", "text": "private function expire()\n {\n \\eZCache::clearByID( 'pme-seo' );\n \\eZCache::clearByTag( 'seo' );\n }", "title": "" }, { "docid": "d462cc36808afd4c9ed2acd65e5eb212", "score": "0.51529205", "text": "static function replace($key, $var, $expires = 3600, $flag = false) {\n\n if (!self::$connected) return false;\n\n if (!is_numeric($expires)) die('Cache class: set expires is not numeric!');\n\n if ($flag === false) $flag = self::$flag;\n\n return self::$memcache->replace(self::$prefix.$key, $var, $flag, $expires);\n }", "title": "" }, { "docid": "f153bf03e6873d5931c0e50059f88cf7", "score": "0.5150516", "text": "function cache_update()\n\t{\n\t\t// Lay danh sach trong data\n\t\t$list = $this->get_list();\n\t\t\n\t\t// Luu vao cache\n\t\t$this->load->driver('cache');\n\t\t$this->cache->file->save('m_district', $list, config('cache_expire_long', 'main'));\n\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "4b424a03251a2d7efd650c694101a4b1", "score": "0.5148533", "text": "function getCached($url, $expires = 3600) {\n if (!isset($kirby)) $kirby = kirby();\n\n // Define path to cached file\n $cachePath = $kirby->roots()->cache() . DS . str::slug($url) . '.txt';\n\n // Check for valid cached file\n if (f::isReadable($cachePath) and ((time() - f::modified($cachePath)) < $expires)) {\n return f::read($cachePath);\n }\n\n // Cached file is expired or doesn't exist; pull content from original source and save a new cache\n $content = f::read($url);\n f::write($cachePath, $content);\n return $content;\n}", "title": "" } ]
41a69626950bdf0b0f807bea7b2d5195
TRABAJOS sobre el arbol Asigna permisos de un $grupo a toda la $lista_items_permitidos y sus carpetas ancestras. El resto de los items/carpetas quedan sin permiso
[ { "docid": "2f1425d8b9d84f4930118a3e0c704fc2", "score": "0.72703415", "text": "function cambiar_permisos($lista_items_permitidos, $grupo)\n\t{\n\t\t$carpeta = $this->buscar_carpeta_inicial();\n\t\tif ($carpeta !== false) {\t\n\t\t\ttoba_contexto_info::get_db()->abrir_transaccion();\n\t\t\t$this->borrar_permisos_actuales($grupo);\n\t\t\t$this->cambiar_permisos_recursivo($carpeta, $lista_items_permitidos, $grupo);\n\t\t\ttoba_contexto_info::get_db()->cerrar_transaccion();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "ab20b5da7f242d46bb5782caf26c403f", "score": "0.6415393", "text": "public function permissoes(Usuario $usuario) {\n $modulos = [];\n $criteria = new Criteria;\n $criteria->add(new Filter('id_grupoacesso', '=', $this->id_grupoacesso));\n // Variável com o resultado com os submodulos ao qual o grupo possue permissao\n $grupos_has_modulos = (new Repository(GrupoAcessoModuloSub::class))->load($criteria);\n foreach($grupos_has_modulos as $modulo_sub) {\n $usuario_mod = $usuario->hasAcessModuloSub($modulo_sub->id_modulosub);\n $permissao = $modulo_sub->permissao()->permissao;\n if ($usuario_mod->isLoaded()) {\n $permissao = $usuario_mod->permissao()->permissao;\n }\n $modulo_sub->permissao = $permissao;\n $this->join($modulo_sub, $modulos);\n }\n return self::prepareModulo($modulos);\n }", "title": "" }, { "docid": "dcb3030fe0e04a32bb25e1039047852a", "score": "0.6028496", "text": "function opcionesPermisos($grupo, $concepto) {\r\n\t$sql=\"SELECT FlagAdministrador FROM seguridad_autorizaciones WHERE CodAplicacion='\".$_SESSION['APLICACION_ACTUAL'].\"' AND Usuario='\".$_SESSION['USUARIO_ACTUAL'].\"' AND Estado='A'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$rows=mysql_num_rows($query);\r\n\tif ($rows!=0) $field=mysql_fetch_array($query);\r\n\t$_ADMIN=$field['FlagAdministrador'];\r\n\t//\t--------------------------------------------\r\n\t$sql=\"SELECT FlagMostrar, FlagAgregar, FlagModificar, FlagEliminar FROM seguridad_autorizaciones WHERE CodAplicacion='\".$_SESSION['APLICACION_ACTUAL'].\"' AND Usuario='\".$_SESSION['USUARIO_ACTUAL'].\"' AND Concepto='\".$concepto.\"' AND Estado='A'\";\r\n\t$query=mysql_query($sql) or die ($sql.mysql_error());\r\n\t$rows=mysql_num_rows($query);\r\n\tif ($rows!=0) $field=mysql_fetch_array($query);\r\n\t$_SHOW=$field['FlagMostrar'];\r\n\t$_INSERT=$field['FlagAgregar'];\r\n\t$_UPDATE=$field['FlagModificar'];\r\n\t$_DELETE=$field['FlagEliminar'];\r\n\treturn array($_SHOW, $_ADMIN, $_INSERT, $_UPDATE, $_DELETE);\t\r\n}", "title": "" }, { "docid": "83b9061022abc23801fa50a909fc1770", "score": "0.59833115", "text": "public function grupocargaacademicaAction()\n {\n \n \n $user = $this->get('security.context')->getToken()->getUser();\n \n if(($user->getEsAlumno()==FALSE)){\n $profesor=$user->getProfesor(); \n $id_profesor=$profesor->getId();\n \n $entities=$this->getDoctrine()\n ->getRepository('NetpublicCoreBundle:CargaAcademica')\n ->findBy(array(\n 'profesor'=>$id_profesor\n ));\n \n } \n $entities__=array();\n $ids_grupo=array();\n foreach ($entities as $entity) {\n if (!in_array($entity->getGrupo()->getId(),$ids_grupo)){\n $ids_grupo[]=$entity->getGrupo()->getId();\n $entities__[]=$entity;\n }\n \n }\n // $contratos=$profesor->getContrato();\n return array('entities' => $entities__);\n }", "title": "" }, { "docid": "5620146d9d15930cdc628bdeda8a158b", "score": "0.58796924", "text": "public function BuscarGrupos()\n {\n try {\n $filtros = json_decode(file_get_contents(\"php://input\"), true);\n array_filter($filtros);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $grupos = $dbm->BuscarGrupos($filtros);\n foreach ($grupos as &$grupo) {\n $grado = $dbm->getRepositorioById(\"Grado\", \"gradoid\", $grupo[\"gradoid\"]);\n $grupo['grado'] = $grado;\n $editable = true;\n $subgruposrelacionados = $dbm->getRepositoriosById(\"CeGrupoorigenporsubgrupo\", \"grupoorigenid\", $grupo[\"grupoid\"]);\n $alumnosrelacionados = $dbm->getRepositoriosById(\"CeAlumnocicloporgrupo\", \"grupoid\", $grupo[\"grupoid\"]);\n $profesoresrelacionados = $dbm->getRepositoriosById(\"CeProfesorpormateriaplanestudios\", \"grupoid\", $grupo[\"grupoid\"]);\n if ($subgruposrelacionados || $alumnosrelacionados || $profesoresrelacionados) {\n $editable = false;\n }\n $grupo[\"editable\"] = $editable;\n }\n\n if (!$grupos) {\n return new View(\"No se encontro ningun registro \", Response::HTTP_PARTIAL_CONTENT);\n }\n return new View($grupos, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "500616c4c38a1e999ec69b20e2da9406", "score": "0.58349323", "text": "function listarPorGrupo (GrupoPessoa $obj) {\r\n\t\t$this->sql = sprintf(\"SELECT * FROM grupopessoa WHERE idgrupo = %d\",\r\n\t\t\t\tmysqli_real_escape_string($this->con, $obj->getObjgrupo()->getId()));\r\n\t\t$resultSet = mysqli_query($this->con, $this->sql);\r\n\t\tif(!$resultSet) {\r\n\t\t\tdie('[ERRO]: Class(GrupoPessoa) | Metodo(Listar) | Erro('.mysqli_error($this->con).')');\r\n\t\t}\r\n\t\t$grupoPF = array(); $grupoPJ = array();\r\n\t\twhile($row = mysqli_fetch_object($resultSet)) {\r\n\t\t\t$pessoaControl = new PessoaControl(new Pessoa($row->idpessoa));\r\n\t\t\t$objPessoa = $pessoaControl->buscarPorId();\r\n\t\t\t\r\n\t\t\t// busca em pessoa\r\n\t\t\t$objPF = new PessoaFisica(); $objPF->setObjpessoa($objPessoa);\r\n\t\t\t$pfControl = new PessoaFisicaControl($objPF);\r\n\t\t\t$objPF = $pfControl->buscarPorPessoa();\r\n\t\t\t\r\n\t\t\tif($objPF) {\r\n\t\t\t\t$row->pes = $objPF;\r\n\t\t\t\tarray_push($grupoPF, $row);\r\n\t\t\t}else{\r\n\t\t\t\t$objPJ = new PessoaJuridica(); $objPJ->setObjpessoa($objPessoa);\r\n\t\t\t\t$pjControl = new PessoaJuridicaControl($objPJ);\r\n\t\t\t\t$objPJ = $pjControl->buscarPorPessoa();\r\n\t\t\t\t\t\r\n\t\t\t\t$objRep = new RepresentantePJ(); $objRep->setObjpessoapj($objPessoa);\r\n\t\t\t\t$repControl = new RepresentantePJControl($objRep);\r\n\t\t\t\t$listaRep = $repControl->listarPorPJ();\r\n\t\t\t\t\r\n// \t\t\t\tif(empty($listaRep)) echo 'vazio ';\r\n// \t\t\t\techo $objPJ->getId().' - '.$listaRep[0]->idpessoapf.' ';\r\n\t\t\t\t\r\n\t\t\t\t$row->pes = $objPJ;\r\n\t\t\t\t$row->representantes = $listaRep;\r\n\t\t\t\tarray_push($grupoPJ, $row);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array('grupoPF'=>$grupoPF,'grupoPJ'=>$grupoPJ);\r\n\t}", "title": "" }, { "docid": "8d10bcaf5059b103e8947ce742948aff", "score": "0.57924014", "text": "protected function usuariolistar($grupo=false,$ativado=false,$gravidade=0,$inverter=false,$export=false){\n $i = 0;\n if($grupo===false){\n $categoria = 0;\n if($inverter){\n $where = 'ativado!='.$ativado;\n }else{\n $where = 'ativado='.$ativado;\n }\n if($ativado===false){\n $where = '';\n }\n $nomedisplay = __('Usuários ');\n $nomedisplay_sing = __('Usuário ');\n $nomedisplay_tipo = __('Usuario');\n // Link\n $this->Tema_Endereco(__('Usuários'));\n }else{\n $categoria = (int) $grupo[0];\n \n // Pega GRUPOS VALIDOS\n $sql_grupos = $this->_Modelo->db->Sql_Select('Sistema_Grupo','categoria='.$categoria,0,'','id');\n $grupos_id = Array();\n if(is_object($sql_grupos)) $sql_grupos = Array(0=>$sql_grupos);\n if($sql_grupos!==false && !empty($sql_grupos)){\n foreach ($sql_grupos as &$valor) {\n $grupos_id[] = $valor->id;\n }\n }\n \n if(empty($grupos_id)) throw new \\Exception('Grupos não existe', 404);\n \n // cria where de acordo com parametros\n if($inverter){\n $where = 'grupo NOT IN ('.implode(',',$grupos_id).') AND ativado='.$ativado;\n }else{\n $where = 'grupo IN ('.implode(',',$grupos_id).') AND ativado='.$ativado;\n }\n \n if($ativado===false){\n $where = explode(' AND ', $where);\n $where = $where[0];\n }\n \n $nomedisplay = $grupo[1].' ';\n $nomedisplay_sing = Framework\\Classes\\Texto::Transformar_Plural_Singular(__($grupo[1]));\n $nomedisplay_tipo = Framework\\Classes\\Texto::Transformar_Plural_Singular(__($grupo[1]));\n // Link\n $this->Tema_Endereco(__($grupo[1]));\n }\n \n $linkextra = '';\n if($grupo!==false && $grupo[0]==CFG_TEC_CAT_ID_CLIENTES && $inverter===false){\n $linkextra = '/cliente';\n $link = 'usuario/Admin/ListarCliente';\n $link_editar = 'usuario/Admin/Cliente_Edit';\n $link_deletar = 'usuario/Admin/Cliente_Del';\n $link_add = 'usuario/Admin/Cliente_Add/'.$categoria;\n }\n else if($grupo!==false && $grupo[0]==CFG_TEC_CAT_ID_FUNCIONARIOS && $inverter===false){\n $linkextra = '/funcionario';\n $link = 'usuario/Admin/ListarFuncionario';\n $link_editar = 'usuario/Admin/Funcionario_Edit';\n $link_deletar = 'usuario/Admin/Funcionario_Del';\n $link_add = 'usuario/Admin/Funcionario_Add/'.$categoria;\n }else{\n $link = 'usuario/Admin/ListarUsuario';\n $link_editar = 'usuario/Admin/Usuarios_Edit';\n $link_deletar = 'usuario/Admin/Usuarios_Del';\n $link_add = 'usuario/Admin/Usuarios_Add/'.$categoria;\n }\n \n // add botao\n $this->_Visual->Blocar($this->_Visual->Tema_Elementos_Btn('Superior' ,Array(\n Array(\n 'Adicionar '.Framework\\Classes\\Texto::Transformar_Plural_Singular($nomedisplay),\n $link_add,\n ''\n ),\n Array(\n 'Print' => true,\n 'Pdf' => true,\n 'Excel' => true,\n 'Link' => $link,\n )\n )));\n // Continua Resto\n //$this->_Visual->Blocar('<a title=\"Adicionar \" class=\"btn btn-success lajax explicar-titulo\" acao=\"\" href=\"'.URL_PATH.'usuario/Admin/Usuarios_Add'.$linkextra.'\">Adicionar novo '.Framework\\Classes\\Texto::Transformar_Plural_Singular($nomedisplay).'</a><div class=\"space15\"></div>');\n $usuario = $this->_Modelo->db->Sql_Select('Usuario',$where,0,'','id,grupo,foto,nome,razao_social,email,email2,telefone,telefone2,celular,celular1,celular2,celular3,ativado,log_date_add');\n if(is_object($usuario)){\n $usuario = Array(0=>$usuario);\n }\n if($usuario!==false && !empty($usuario)){\n \n // Puxa Tabela e qnt de registro\n list($tabela,$i) = self::Usuarios_Tabela($usuario,$nomedisplay_sing,$linkextra,$grupo,'usuario/Perfil/Perfil_Show', $link_editar, $link_deletar);\n \n // SE tiver opcao de exportar, exporta e trava o sistema\n if($export!==false){\n self::Export_Todos($export,$tabela, $nomedisplay);\n }else{\n // Imprime a tabela\n $this->_Visual->Show_Tabela_DataTable(\n $tabela, // Array Com a Tabela\n '', // style extra\n true, // true -> Add ao Bloco, false => Retorna html\n true, // Apagar primeira coluna ?\n Array( // Ordenacao\n Array(\n 0,'desc'\n )\n )\n );\n }\n unset($tabela);\n }else{ \n $this->_Visual->Blocar('<center><b><font color=\"#FF0000\" size=\"5\">Nenhum '.$nomedisplay_sing.'</font></b></center>');\n }\n if($ativado===false){\n $titulo = 'Todos os '.$nomedisplay.' ('.$i.')';\n }elseif($ativado==0){\n $titulo = 'Todos os '.$nomedisplay.' Desativados ('.$i.')';\n }else{\n $titulo = 'Todos os '.$nomedisplay.' Ativados ('.$i.')';\n }\n $this->_Visual->Bloco_Unico_CriaJanela($titulo,'',$gravidade);\n }", "title": "" }, { "docid": "4869b2ca356c325abe8b72ab0a2dfc25", "score": "0.5716095", "text": "public function adicionarPermissaoAction()\n {\n $this->view->disable();\n $response = new Response();\n $manager = new TxManager();\n $dados = filter_input_array(INPUT_POST);\n foreach ($dados[\"arrayRoles\"] as $key => $role)\n {\n $valida_controleacesso = PhalconAccessList::findFirst([\n \"conditions\" => \"access_name = ?1 AND roles_name = ?2 AND resources_name = ?3\",\n 'bind' => [\n 1 => $dados[\"arrayAccessNames\"][$key],\n 2 => $role,\n 3 => $dados[\"arrayResources\"][$key]\n ]\n ]);\n //CSRF Token Check\n if (!$valida_controleacesso)\n {\n if ($this->tokenManager->checkToken('User', $dados['tokenKey'], $dados['tokenValue'])) {//Formulário Válido\n try {\n $transaction = $manager->get();\n $controleacesso = new PhalconAccessList();\n $controleacesso->setTransaction($transaction);\n $controleacesso->setRolesName($role);\n $controleacesso->setResourcesName($dados[\"arrayResources\"][$key]);\n $controleacesso->setAccessName($dados[\"arrayAccessNames\"][$key]);\n $controleacesso->setAllowed(0);\n if ($controleacesso->save() == false) {\n $transaction->rollback(\"Não foi possível cadastrar as permissões!\");\n }\n //Commita a transação\n $transaction->commit();\n $response->setContent(json_encode(array(\n \"operacao\" => True\n )));\n } catch (TxFailed $e) {\n $response->setContent(json_encode(array(\n \"operacao\" => False,\n \"mensagem\" => $e->getMessage()\n )));\n return $response;\n }\n } else {//Formulário Inválido\n $response->setContent(json_encode(array(\n \"operacao\" => False,\n \"mensagem\" => \"Check de formulário inválido!\"\n )));\n return $response;\n }\n }\n }\n return $response;\n }", "title": "" }, { "docid": "653e341648ff2874a81c26266259ced4", "score": "0.5692604", "text": "function prepare_items($items,$sacar)\r\n{\r\n //revisamos si las claves pasadas en $sacar, son parte de la\r\n //segunda dimension de $items\r\n /*foreach ($sacar as $clave) {\r\n if(!array_key_exists($clave,$items[0]))\r\n die(\"Error Interno: La clave $clave a sacar de items no existe (prepare_items)\");\r\n }*/\r\n //traemos todas las claves de la segunda dimension del arreglo\r\n $claves_items=array_keys($items[0]);\r\n $cant_claves=sizeof($claves_items);\r\n //arreglo de retorno\r\n $items_retorno=array();\r\n //recorremos todas las claves, y pasamos al arreglo de retorno solo\r\n //aquellas claves que no estan en $sacar\r\n for($j=0;$j<$cant_claves;$j++)\r\n {//si no esta en el arreglo de claves a sacar entonces pasamos ese campo\r\n //al arreglo de retorno (sino, no se lo pasa y asi eliminamos los campos\r\n //especificados en $sacar)\r\n if(!in_array($claves_items[$j],$sacar))\r\n {//pasamos cada arreglo en $items[$i], al correspondiente $items_retorno[$i]\r\n for($i=0; $i < $items[\"cantidad\"];$i++)\r\n \t$items_retorno[$i][$claves_items[$j]]=$items[$i][$claves_items[$j]];\r\n }//de if(!in_array($claves_items[$j],$sacar))\r\n }//de \tfor($j=0;$j<$cant_claves;$j++)\r\n $items_retorno[\"cantidad\"]=$items[\"cantidad\"];\r\n return $items_retorno;\r\n}", "title": "" }, { "docid": "ad93650d4161ad5753f0ecbdfec1965d", "score": "0.566094", "text": "function listarItems($cadena) {\n global $sql;\n \n $respuesta = array();\n $consulta = $sql->seleccionar(array('subgrupos'), array('id', 'nombre'), 'nombre LIKE \"%' . $cadena . '%\" AND activo = \"1\"', '', 'nombre ASC', 0, 20);\n\n while ($fila = $sql->filaEnObjeto($consulta)) {\n $respuesta1 = array();\n $respuesta1['label'] = $fila->nombre;\n $respuesta1['value'] = $fila->id;\n $respuesta[] = $respuesta1;\n }\n\n Servidor::enviarJSON($respuesta);\n \n}", "title": "" }, { "docid": "a3fcb53a73fb7fae31850bf8ffa42c0a", "score": "0.5637622", "text": "function verificarDisponibilidadPresupuestariaOC($anio, $organismo, $codigo, $detalles, $monto_impuestos, $tabla) {\r\n\tglobal $_PARAMETRO;\r\n\t$disponible = true;\r\n\t//\trecorro los detalles de los items o de los commodities\r\n\tif ($tabla == \"item\") {\r\n\t\t$secuencia = 0;\r\n\t\t$detalle = split(\";\", $detalles);\r\n\t\tforeach ($detalle as $linea) {\r\n\t\t\t$secuencia++;\r\n\t\t\tlist($_codigo, $_descripcion, $_codunidad, $_cantidad, $_pu, $_descp, $_descf, $_flagexon, $_pu_total, $_total, $_fentrega, $_codccosto, $_codpartida, $_codcuenta, $_observaciones) = split(\"[|]\", $linea);\r\n\t\t\tif ($secuencia == 1) $filtro_det .= \" i.CodItem = '\".$_codigo.\"'\";\r\n\t\t\telse $filtro_det .= \" OR i.CodItem = '\".$_codigo.\"'\";\r\n\t\t\t$partida[$_codpartida] += ($_cantidad * $_pu);\r\n\t\t}\r\n\t\t$sql = \"(SELECT\r\n\t\t\t\t\tdo.cod_partida,\r\n\t\t\t\t\tpc.denominacion,\r\n\t\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso + do.Monto) AS MontoDisponible\r\n\t\t\t\t FROM\r\n\t\t\t\t\tlg_distribucionoc do\r\n\t\t\t\t\tINNER JOIN pv_partida pc ON (do.cod_partida = pc.cod_partida)\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (do.CodOrganismo = pvp.Organismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t do.Anio = pvp.EjercicioPpto)\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (pc.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\t WHERE\r\n\t\t\t\t\tdo.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\tdo.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\tdo.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\tpc.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\r\n\t\t\t\t\t\r\n\t\t\t\tUNION\r\n\t\t\t\t\r\n\t\t\t\t(SELECT\r\n\t\t\t\t\tp.cod_partida,\r\n\t\t\t\t\tp.denominacion,\r\n\t\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso) AS MontoDisponible\r\n\t\t\t\t FROM\r\n\t\t\t\t\tlg_itemmast i\r\n\t\t\t\t\tINNER JOIN pv_partida p ON (i.PartidaPresupuestal = p.cod_partida)\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (pvp.Organismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.EjercicioPpto = '\".$anio.\"')\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (p.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\t WHERE\r\n\t\t\t\t \t1 AND ($filtro_sel $filtro_det) AND\r\n\t\t\t\t\tp.cod_partida NOT IN (SELECT do1.cod_partida\r\n\t\t\t\t\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t\t\t\t\t\tlg_distribucionoc do1\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN pv_partida pc1 ON (do1.cod_partida = pc1.cod_partida)\r\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuesto pvp1 ON (pvp1.Organismo = do1.CodOrganismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp1.EjercicioPpto = do1.Anio)\r\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd1 ON (pc1.cod_partida = pvpd1.cod_partida AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp1.CodPresupuesto = pvpd1.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp1.Organismo = pvpd1.Organismo)\r\n\t\t\t\t\t\t\t\t\t\t WHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tpc1.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\t\t\t\t\t\r\n\t\t\t\t GROUP BY cod_partida)\r\n\t\t\t\t\r\n\t\t\t\tORDER BY cod_partida\";\r\n\t} else {\r\n\t\t$secuencia = 0;\r\n\t\t$detalle = split(\";\", $detalles);\r\n\t\tforeach ($detalle as $linea) {\r\n\t\t\t$secuencia++;\r\n\t\t\tlist($_codigo, $_descripcion, $_codunidad, $_cantidad, $_pu, $_descp, $_descf, $_flagexon, $_pu_total, $_total, $_fentrega, $_codccosto, $_codpartida, $_codcuenta, $_observaciones) = split(\"[|]\", $linea);\r\n\t\t\tlist($_commodity, $_secuencia) = split(\"[.]\", $_codigo);\r\n\t\t\tif ($secuencia == 1) $filtro_det .= \" cs.Codigo = '\".$_commodity.\"'\";\r\n\t\t\telse $filtro_det .= \" OR cs.Codigo = '\".$_commodity.\"'\";\r\n\t\t\t$partida[$_codpartida] += ($_cantidad * $_pu);\t\t\t\r\n\t\t}\r\n\t\t$sql = \"(SELECT \r\n\t\t\t\t\tdo.cod_partida,\r\n\t\t\t\t\tpc.denominacion,\r\n\t\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso + do.Monto) AS MontoDisponible\r\n\t\t\t\t FROM\r\n\t\t\t\t\tlg_distribucionoc do\r\n\t\t\t\t\tINNER JOIN pv_partida pc ON (do.cod_partida = pc.cod_partida)\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (do.CodOrganismo = pvp.Organismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t do.Anio = pvp.EjercicioPpto)\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (pc.cod_partida = pvpd.cod_partida AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\t WHERE\r\n\t\t\t\t\tdo.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\tdo.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\tdo.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\tpc.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\r\n\t\t\t\t\t\r\n\t\t\t\tUNION\r\n\t\t\t\t\r\n\t\t\t\t(SELECT\r\n\t\t\t\t\tp.cod_partida,\r\n\t\t\t\t\tp.denominacion,\r\n\t\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso) AS MontoDisponible\r\n\t\t\t\t FROM\r\n\t\t\t\t\tlg_commoditysub cs\r\n\t\t\t\t\tINNER JOIN pv_partida p ON (cs.cod_partida = p.cod_partida)\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (pvp.Organismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.EjercicioPpto = '\".$anio.\"')\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (p.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\t WHERE \r\n\t\t\t\t \t1 AND ($filtro_sel $filtro_det) AND\r\n\t\t\t\t\tp.cod_partida NOT IN (SELECT do1.cod_partida\r\n\t\t\t\t\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t\t\t\t\t\tlg_distribucionoc do1\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN pv_partida pc1 ON (do1.cod_partida = pc1.cod_partida)\r\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuesto pvp1 ON (do1.CodOrganismo = pvp1.Organismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t do1.Anio = pvp1.EjercicioPpto)\r\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd1 ON (pc1.cod_partida = pvpd1.cod_partida AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp1.CodPresupuesto = pvpd1.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp1.Organismo = pvpd1.Organismo)\r\n\t\t\t\t\t\t\t\t\t\t WHERE\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tdo1.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\tpc1.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\t\t\t\t\t\r\n\t\t\t\t GROUP BY cod_partida)\r\n\t\t\t\t\r\n\t\t\t\tORDER BY cod_partida\";\r\n\t}\r\n\t\r\n\t//\tconsulto partidas\t\r\n\t$query_general = mysql_query($sql) or die ($sql.mysql_error());\r\n\twhile($field_general = mysql_fetch_array($query_general)) {\r\n\t\t$codpartida = $field_general['cod_partida'];\r\n\t\t$resta = $field_general['MontoDisponible'] - $partida[$codpartida];\r\n\t\tif ($resta < 0) $disponible = false;\r\n\t}\r\n\t\r\n\t//\tconsulto partida igv\r\n\tif ($monto_impuestos > 0) {\r\n\t\t//\tsi ya tiene distribuido algun monto en el igv lo obtengo\r\n\t\t$sql = \"SELECT do.Monto\r\n\t\t\t\tFROM lg_distribucionoc do\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tdo.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\tdo.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\tdo.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\tdo.cod_partida = '\".$_PARAMETRO['IVADEFAULT'].\"'\";\r\n\t\t$query_igv = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\tif (mysql_num_rows($query_igv) != 0) $field_igv = mysql_fetch_array($query_general);\r\n\t\t$montoigv = floatval($field_igv['Monto']);\r\n\t\t\r\n\t\t//\tobtengo la disponibilidad de la partida del igv\t\t\r\n\t\t$sql = \"SELECT\r\n\t\t\t\t\tp.cod_partida,\r\n\t\t\t\t\tp.denominacion,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso + $montoigv) AS MontoDisponible\r\n\t\t\t\tFROM\r\n\t\t\t\t\tpv_partida p\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (pvp.Organismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.EjercicioPpto = '\".$anio.\"')\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (p.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\tWHERE p.cod_partida = '\".$_PARAMETRO['IVADEFAULT'].\"'\";\r\n\t\t$query_general = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\twhile($field_general = mysql_fetch_array($query_general)) {\r\n\t\t\t$resta = $field_general['MontoDisponible'] - $monto_impuestos;\r\n\t\t\tif ($resta < 0) $disponible = false;\r\n\t\t}\r\n\t}\r\n\treturn $disponible;\r\n}", "title": "" }, { "docid": "ccd3d4db421120192f76d0c609652941", "score": "0.5600628", "text": "public function permisoProcesar() {\n\t\t\t//$this->procesar('fd7aab9e');\n\t\t}", "title": "" }, { "docid": "91d6e0fe22cb535bb7204a4643abec0f", "score": "0.558471", "text": "function listarAjuste(){\n\t\t$this->procedimiento='pre.ft_ajuste_sel';\n\t\t$this->transaccion='PRE_AJU_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\t\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_ajuste','int4');\n\t\t$this->captura('id_estado_wf','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('estado','varchar');\n\t\t$this->captura('justificacion','varchar');\n\t\t$this->captura('id_proceso_wf','int4');\n\t\t$this->captura('tipo_ajuste','varchar');\n\t\t$this->captura('nro_tramite','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\t\t\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('id_gestion','int4');\n\t\t$this->captura('importe_ajuste','numeric');\n\t\t$this->captura('movimiento','varchar');\n\t\t$this->captura('nro_tramite_aux','varchar');\n\t\t$this->captura('desc_moneda','varchar');\n\t\t$this->captura('id_moneda','int4');\n\t\t$this->captura('tipo_ajuste_formulacion','varchar');//#39\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "5688e27e2e46df31de08f3ce9cec653c", "score": "0.556941", "text": "function pegaGrupoPessoa($id, $apenasCamposTabela=false)\n{\n $arrRetorno = [];\n $arrRetorno[\"erro\"] = false;\n $arrRetorno[\"msg\"] = \"\";\n $arrRetorno[\"GrupoPessoa\"] = [];\n\n if(!is_numeric($id)){\n $arrRetorno[\"erro\"] = true;\n $arrRetorno[\"msg\"] = \"ID inválido para buscar participante do grupo!\";\n\n return $arrRetorno;\n }\n\n $CI = pega_instancia();\n $CI->load->database();\n\n // so exibe de quem cadastrou\n $UsuarioLog = $CI->session->usuario_info ?? array();\n $vGrpId = $CI->session->grp_id ?? NULL; # se está na session do grupo\n // ==========================\n\n $camposTabela = \"grp_id, grp_gru_id, grp_pes_id, grp_pes_id, grp_ativo\";\n if(!$apenasCamposTabela){\n $camposTabela .= \", ativo, gru_pes_id, gru_descricao, gru_dt_inicio, gru_dt_termino, pes_nome, pes_email, pes_foto, pet_descricao, pet_cliente\";\n }\n\n $CI->db->select($camposTabela);\n $CI->db->from('v_tb_grupo_pessoa');\n $CI->db->where('grp_id =', $id);\n if(isset($UsuarioLog->admin) && $UsuarioLog->admin == 0 && $vGrpId == NULL){\n $CI->db->where('gru_pes_id =', $UsuarioLog->id);\n }\n\n $query = $CI->db->get();\n $row = $query->row();\n\n if (!isset($row)) {\n $arrRetorno[\"erro\"] = true;\n $arrRetorno[\"msg\"] = \"Erro ao encontrar participante do grupo!\";\n\n return $arrRetorno;\n }\n\n $Grupo = [];\n $Grupo[\"grp_id\"] = $row->grp_id;\n $Grupo[\"grp_gru_id\"] = $row->grp_gru_id;\n $Grupo[\"grp_pes_id\"] = $row->grp_pes_id;\n $Grupo[\"grp_pes_id\"] = $row->grp_pes_id;\n $Grupo[\"grp_ativo\"] = $row->grp_ativo;\n if(!$apenasCamposTabela){\n $Grupo[\"ativo\"] = $row->ativo;\n $Grupo[\"gru_pes_id\"] = $row->gru_pes_id;\n $Grupo[\"gru_descricao\"] = $row->gru_descricao;\n $Grupo[\"gru_dt_inicio\"] = $row->gru_dt_inicio;\n $Grupo[\"gru_dt_termino\"] = $row->gru_dt_termino;\n $Grupo[\"pes_nome\"] = $row->pes_nome;\n $Grupo[\"pes_email\"] = $row->pes_email;\n $Grupo[\"pes_foto\"] = $row->pes_foto;\n $Grupo[\"pet_descricao\"] = $row->pet_descricao;\n $Grupo[\"pet_cliente\"] = $row->pet_cliente;\n }\n\n $arrRetorno[\"msg\"] = \"Participante do grupo encontrado com sucesso!\";\n $arrRetorno[\"GrupoPessoa\"] = $Grupo;\n return $arrRetorno;\n}", "title": "" }, { "docid": "db844c4b01260a41273655cf1db217e3", "score": "0.5543469", "text": "public function permiso() {\n\t\t\t$this->plantilla->parametroGlobal('sesion', $this->sesionPHP->obtenerInfo());\n\t\t\t$this->plantilla->parametro('script', $this->permisoJQuery());\n\t\t\t$this->plantilla->parametro('consultaModulos', $this->modelo->consultaModulos());\n\t\t\t$this->plantilla->parametro('consultaAccesos', $this->modelo->consultaAccesos());\n\t\t\techo $this->plantilla->mostrarPlantilla('Nuevo', 'permiso.html');\n\t\t}", "title": "" }, { "docid": "5c2c032afdf5d0b81e9ce900653aef59", "score": "0.5528691", "text": "public function moveralumononuevogrupoAction()\n {\n $request=$this->getRequest();\n $session=$this->get('request')->getSession(); \n $em= $this->getDoctrine()->getEntityManager(); \n \n $ano_escolar=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->findAnoEscolarActivo();\n $ano_escolaractivo_id=$ano_escolar->getId();\n $peridos_academicos=$em->getRepository(\"NetpublicCoreBundle:Dimension\")->findPeriodosEscolar($ano_escolar);\n $alumnos_id=$session->get('alumnos_id',array()); \n $alumnos=array();\n $grupos=array();\n for ($index = 0; $index < count($alumnos_id); $index++) {\n $usuario=$em->getRepository(\"NetpublicCoreBundle:Usuario\")->find($alumnos_id[$index]);\n if($usuario->getEsAlumno()){\n $alumno=$usuario->getAlumno();\n $alumnos[]=$alumno;\n $grupos[]=$alumno->getGrupo();\n $em->getRepository(\"NetpublicCoreBundle:Alumno\")->\n cancelarMatricula($alumno,$ano_escolaractivo_id);\n \n $em->flush(); \n $em->getRepository(\"NetpublicCoreBundle:Alumno\")->asignarGrupo(\n $alumno,\n $request->get('grupo_id'),\n $peridos_academicos,\n $ano_escolaractivo_id \n );\n \n \n }\n }\n $em->flush();\n return array(\n 'alumnos'=>$alumnos,\n 'grupos'=>$grupos\n );\n }", "title": "" }, { "docid": "cd1c0bf37eb5bc9bde2dd693b8623d50", "score": "0.55078846", "text": "public function listaPermisoServicio($idsistema,$idformulario,$idpersona){////\n parent::ConnectionOpen(\"sp_lista_permiso_servicio\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idformulario);\n parent::SetParameterSP(\"$3\",$idpersona);\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n }", "title": "" }, { "docid": "896e9c1c1b0c647c6b2d0ece577efae5", "score": "0.5503968", "text": "public function ListarMateriasPorAsignar() {\n\n\n $carga = array();\n $Conexion = conectar_bd();\n $Conexion->conectarse();\n\n $lista_carga = $Conexion->ejecutar(\"select idGrupo, \n grupo.nombre,materia.nombre as materia, \n carrera.nombre as carrera, grupo.semestre, grupo.grupo \n from carga inner join grupo on carga.Grupo_idGrupo=grupo.idGrupo \n inner join materia on grupo.nombre=materia.clave \n inner join carrera on grupo.Carrera_idCarrera = carrera.idCarrera \n where not exists(select carga.Grupo_idGrupo from carga where (carga.Grupo_idGrupo = grupo.idGrupo )) \n or Docente_idDocente = 0 or Docente_idDocente = 1 or Docente_idDocente = 46;\");\n\n\n while ($renglon = mysql_fetch_array($lista_carga)) {\n $objeto = new cargadocente();\n $objeto->setidgrupo($renglon['idGrupo']);\n $objeto->setmateria($renglon['materia']);\n $objeto->setclave($renglon['nombre']);\n $objeto->setgrupo($renglon['semestre'] . \" \" . $renglon['grupo']);\n $objeto->setcarrera($renglon['carrera']);\n array_push($carga, $objeto);\n }\n\n $Conexion->desconectarse();\n return $carga;\n }", "title": "" }, { "docid": "fdda01368fd297cadc3839dc8b26a369", "score": "0.55028236", "text": "function distribuirPontos($jogo) {\r\n\t\t$dg = DataGetter::getInstance();\r\n\t\tfor ($i = 1; $i<count($this->apostadores); $i++){\r\n\t\t\t$apostas = $dg->getData('apostas_' . $this->apostadores[$i]);\r\n\t\t\tfor ($j = 0; $j<count($apostas); $j++){\r\n\t\t\t\tif (intval($apostas[$j][0])==$jogo->id){\t\t\t\t\t\t\r\n\t\t\t\t\t$p = $jogo->resultado;\r\n\t\t\t\t\tif (intval($apostas[$j][1])==$p->pontosTime1 && intval($apostas[$j][2])==$p->pontosTime2){\r\n\t\t\t\t\t\t$meusboloes = $dg->getData('boloes_'.$this->apostadores[$i]);\r\n\t\t\t\t\t\tfor ($k = 0; $k<count($meusboloes); $k++){\r\n\t\t\t\t\t\t\tif ($meusboloes[$k][1]==$this->id){\r\n\t\t\t\t\t\t\t\t$novoPt = intval($meusboloes[$k][2]);\r\n\t\t\t\t\t\t\t\t$novoPt++;\r\n\t\t\t\t\t\t\t\t$meusboloes[$k][2] = $novoPt;\r\n\t\t\t\t\t\t\t\t$dg->setData('boloes_'.$this->apostadores[$i], $meusboloes);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$this->pontApostador[$i] += $this->ptsAcertarPlacar;\r\n\t\t\t\t\t} else if ((intval($apostas[$j][1]) == intval($apostas[$j][2]) && $p->pontosTime1 == $p->pontosTime2) || (intval($apostas[$j][1]) > intval($apostas[$j][2]) && $p->pontosTime1 > $p->pontosTime2) || (intval($apostas[$j][1]) < intval($apostas[$j][2]) && $p->pontosTime1 < $p->pontosTime2)){\r\n\t\t\t\t\t\t$this->pontApostador[$i] += $this->ptsAcertarVencedor;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//atualiza esse bolao no arquivo\r\n\r\n\t\t$pt = implode(',', $this->pontApostador);\r\n\t\t$usuarios = implode(',', $this->apostadores);\r\n\t\t$boloes = $dg->getData('bolao');\r\n\t\tfor ($i = 0; $i<count($boloes); $i++){\r\n\t\t\tif ($this->id==intval($boloes[$i][0])){\r\n\t\t\t\t$boloes[$i][6] = $pt;\r\n\t\t\t\t$boloes[$i][5] = $usuarios;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$podemGanhar = array();\r\n\t\t$i = 1;\r\n\t\tarray_push($podemGanhar, $this->apostadores[1]);\r\n\t\twhile($i<count($this->pontApostador)-1 && $this->pontApostador[1]==$this->pontApostador[$i+1]){\r\n\t\t\tarray_push($podemGanhar, $this->apostadores[$i+1]);\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$_SESSION['message'] = $podemGanhar[0] . ' ' . $podemGanhar[1];\r\n\t\tif ($this->criterio==\"Menor saldo\"){\r\n\t\t\t$podemGanhar = $this->ordMenorSaldo($podemGanhar);\r\n\t\t} else if ($this->criterio==\"Maior saldo\"){\r\n\t\t\t$podemGanhar = $this->ordMaiorSaldo($podemGanhar);\r\n\t\t} else if ($this->criterio==\"Mais placares acertados\"){\r\n\t\t\t$$podemGanhar = $this->ordMaisAcertos($podemGanhar);\r\n\t\t} else {\r\n\t\t\tfor($i=1; $i<count($this->pontApostador); $i++){\r\n\t\t\t\tfor($j = $i+1; $j<count($this->pontApostador); $j++){\r\n\t\t\t\t\tif($this->pontApostador[$j] > $this->pontApostador[$i]){\r\n\t\t\t\t\t\t$aux = $this->pontApostador[$i];\r\n\t\t\t\t\t\t$this->pontApostador[$i] = $this->pontApostador[$j];\r\n\t\t\t\t\t\t$this->pontApostador[$j] = $aux;\r\n\t\t\t\t\t\t$auxCPF = $this->apostadores[$i];\r\n\t\t\t\t\t\t$this->apostadores[$i] = $this->apostadores[$j];\r\n\t\t\t\t\t\t$this->apostadores[$j] = $auxCPF;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\tfor($i=0; $i<count($boloes); $i++){\r\n\t\t\tif($boloes[$i][0] == $this->id){\r\n\t\t\t\t$apostadores = explode(',', $boloes[$i][5]);\r\n\t\t\t\tfor ($j = 0; $j<count($podemGanhar); $j++){\r\n\t\t\t\t\t$apostadores[$j+1] = $podemGanhar[$j];\r\n\t\t\t\t}\r\n\t\t\t\t$boloes[$i][5] = implode(',', $apostadores);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t$dg->setData('bolao', $boloes);\r\n\t}", "title": "" }, { "docid": "561c9be99dc2a0c8c9265ce51f15a719", "score": "0.5490351", "text": "protected function listarProyecto()//-todavia no le he puesto lo del usuario-/\n {\n \t\t$conexion = new Criteria();\n\t\t$cantidad_Proyectos = AgilhuProyectoPeer::doCount($conexion);\n\t $conexion->add(AgilhuProyectoPeer::USU_ID, $this->getUser()->getAttribute('idUsuario'));//donde el usuario registrado es el creador\n\t\t$conexion->setLimit($this->getRequestParameter('limit'));\n\t\t$conexion->setOffset($this->getRequestParameter('start'));\n\t\t\n\t\n\t\t//aqui agregar los if necesarios, para suplir todas las peticiones de este mismo tipo, terminados, nuevos,en proceso.etc\n\t\n\t\t$proyectos = AgilhuProyectoPeer::doSelect($conexion);\n\t\t\n\t\t$pos = 0;\n\t\t$nbrows=0;\n\t\t$datos;\n\t\tforeach ($proyectos As $proyecto)\n\t\t{\n\t\t\t$datos[$pos]['proid']=$proyecto->getProId();\n \n $datos[$pos]['prosigla']=$proyecto->getProNombreCorto();\n $datos[$pos]['pronom']=$proyecto->getProNombre();\n $datos[$pos]['proareaaplicacion']=$proyecto->getProAreaAplicacion();\n $datos[$pos]['prodescripcion']=$proyecto->getProDescripcion();\n\t $datos[$pos]['profechaini']=$proyecto->getProFechaInicio();\n $datos[$pos]['profechafin']=$proyecto->getProFechaFinalizacion();\n $datos[$pos]['proestado']=$proyecto->getProEstado();\n $datos[$pos]['prologo']=$proyecto->getProLogo();\n \n $pos++;\n $nbrows++;\n\t\t}\n\t\tif($nbrows>0){\n\t\t\t$jsonresult = json_encode($datos);\n\t\t\treturn '({\"total\":\"'.$cantidad_Proyectos.'\",\"results\":'.$jsonresult.'})';\n\t\t}\n\t\telse {\n\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\n\t\t}\n }", "title": "" }, { "docid": "08261cbbcaf6f6738cf1ac29178bb730", "score": "0.54878014", "text": "public function asignados(){\n $asignados=null;\n if( !is_array($asignados) ){\n $usr_id = Session :: get_data('prof.usr.id');\n $usr_grupos = Session :: get_data('prof.usr.grupos');\n $asignados = array();\n // verifica si el usuario solo puede revisar grupos por asignacion\n if( in_array('direccion', $usr_grupos) ||\n in_array('director', $usr_grupos) ||\n in_array('secretario', $usr_grupos) ||\n in_array('oficial', $usr_grupos) ||\n in_array('plantilla', $usr_grupos) ||\n in_array('administradores', $usr_grupos)\n )\n {\n $asignados[] = 'ALL';\n }elseif(in_array('profesores',$usr_grupos)){\n $grupos=new Grupos();\n $asignaciones=$grupos->find_all_by_sql(\n \"SELECT grupos.* FROM \" .\n \"grupos \" .\n \" INNER JOIN cursos ON grupos.id=cursos.grupos_id \" .\n \" WHERE cursos.profesores_id='\".$usr_id.\"' AND cursos.estado_id='3'\"\n );\n\n if(count($asignaciones) > 0){\n foreach($asignaciones as $asignacion){\n $asignados[] = $asignacion->id;\n }\n }\n\n $tutorias=Session :: get_data('prof.usr.tutorias');\n foreach($tutorias as $id=>$grupo){\n $asignados[$id] = $id;\n }\n\n }else{\n $asignaciones = new Asignar();\n $asignaciones = $asignaciones->find(\"conditions: usuarios_id = '\" . $usr_id . \"'\");\n if(count($asignaciones) > 0){\n foreach($asignaciones as $asignacion){\n $asignados[] = $asignacion->grupos_id;\n }\n }\n }\n\n array_unique($asignados);\n Session :: set_data('prof.grp.asignados', $asignados);\n }\n return $asignados;\n }", "title": "" }, { "docid": "a79d39be90439a7e27410cb0456ce8f9", "score": "0.54872966", "text": "public function tutoresTodo(Request $request){\n try{\n $tiposProg = TipoUsuario::where('id_programa',$request->id_programa)->get();\n $idFacu = Programa::where('nombre',$request->nomFacu)->first()->id_programa;\n $tiposFacu = TipoUsuario::where('id_programa',$idFacu)->get();\n $tiposGen = TipoUsuario::where('id_programa',1)->get();\n\n $tiposTotal = array();\n foreach ($tiposProg as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n foreach ($tiposFacu as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n foreach ($tiposGen as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n\n $tutores = UsuarioxPrograma::where('id_programa',$request->id_programa);\n\n $tutores = $tutores->where(function($query) use ($tiposTotal) {\n for ($i = 0; $i <= count($tiposTotal)-1; $i++) {\n if($i==0) $query->where('id_tipo_usuario',$tiposTotal[$i]['id_tipo_usuario']);\n else $query->orWhere('id_tipo_usuario',$tiposTotal[$i]['id_tipo_usuario']);\n }\n });\n\n $tutores = $tutores\n ->get();\n\n $final = array();\n foreach ($tutores as $tutor) {\n $tutor->usuario;\n if($tutor['usuario']['estado']== 'act'){\n $tutor['usuario']->tipoTutorias;\n array_push($final,$tutor);\n }\n\n }\n\n return response()->json($final);\n }catch(Exception $e) {\n echo 'Excepción capturada: ', $e->getMessage(), \"\\n\";\n }\n }", "title": "" }, { "docid": "c95f355cfebfea25aa62409a527a7ed3", "score": "0.5486472", "text": "public function atualizaCompletudeItemEscopoProjetos(){\n \n $allProjetos = $this->reports_model->getAllProjetos();\n\n foreach ($allProjetos as $projeto) {\n $projeto_id = $projeto->projeto_id;\n $nome_projeto = $projeto->projeto;\n $empresa_projeto = $projeto->empresa_projeto;\n \n $fases = $this->projetos_model->getAllFasesByProjetosReports($projeto_id);\n foreach ($fases as $tipo) {\n $fase_id = $tipo->id;\n $tipo_fase = $tipo->nome_fase;\n \n\n $eventos = $this->reports_model->getAllEventosProjetoByFase($fase_id);\n foreach ($eventos as $evento) {\n $id_evento = $evento->id;\n $nome_evento = $evento->nome_evento;\n // echo 'Evento : '.$id_evento.' : '.$nome_evento.'<Br>';\n \n $itens_eventos = $this->projetos_model->getAllItemEventosProjeto($id_evento);\n foreach ($itens_eventos as $item2) {\n $item_id = $item2->id;\n $descricao = $item2->descricao;\n $soma_peso_acoes_concluidas_item = 0;\n $soma_itens_pendentes = 0;\n $soma_peso_acoes_atrasadas_item = 0;\n $soma_peso_acoes_nao_iniciada_item = 0;\n \n // echo ' ----->'.$descricao.' : ';\n \n $quantidade_acoes_item = $this->reports_model->getQuantidadeAcaoByItemEvento($item_id);\n $qtde_acoes = $quantidade_acoes_item->qtde_acoes;\n $soma_total_acoes = $quantidade_acoes_item->quantidade; // soma o peso de todas as ações do item\n \n if($qtde_acoes == 0){\n $soma_total_acoes = 0;\n }\n \n // echo 'total Ações : '.$soma_total_acoes.' : ';\n \n if($qtde_acoes > 0){\n \n \n //Qtde de Ações concluídas\n $concluido = $this->reports_model->getAcoesConcluidasByPItemEvento($item_id);\n $quantidade_acoes_concluidas_item = $concluido->qtde_acoes;\n $soma_peso_acoes_concluidas_item = $concluido->quantidade;\n \n if($quantidade_acoes_concluidas_item > 0){\n $porc_acoes_concluidas_itens = ($soma_peso_acoes_concluidas_item * 100) / $soma_total_acoes;\n }else{\n $porc_acoes_concluidas_itens = 0;\n $soma_peso_acoes_concluidas_item = 0;\n }\n // echo 'concluídos '. $soma_peso_acoes_concluidas_item;\n \n\n //Qtde de ações Pendentes\n $item_pendente = $this->reports_model->getAcoesPendentesByItemEvento($item_id);\n $quantidade_acoes_pendente_item = $item_pendente->qtde_acoes;\n $soma_peso_acoes_pendente_item = $item_pendente->quantidade;\n \n //ações aguardando validação\n $item_avalidacao = $this->reports_model->getAcoesAguardandoValidacaoByItemEvento($item_id);\n $quantidade_acoes_a_validacao_item = $item_avalidacao->qtde_acoes;\n $soma_peso_acoes_a_validacao_item = $item_avalidacao->quantidade;\n \n \n // pendentes = pendentes + aguardando_validação\n $total_pendentes = $quantidade_acoes_pendente_item + $quantidade_acoes_a_validacao_item;\n if($total_pendentes > 0){\n $soma_itens_pendentes = $soma_peso_acoes_pendente_item + $soma_peso_acoes_a_validacao_item;\n }else{\n $soma_itens_pendentes = 0; \n }\n // calcula a porcentagem do item pendente\n $porc_itens_pendentes = ($soma_itens_pendentes * 100) / $soma_total_acoes;\n \n // echo '| pendentes : '.$soma_itens_pendentes;\n \n /*******************************************************************************************/\n \n // ações atrasadas\n $atrasadas = $this->reports_model->getAcoesAtrasadasByItemEvento($item_id);\n $quantidade_acoes_atrasadas_item = $atrasadas->qtde_acoes;\n $soma_peso_acoes_atrasadas_item = $atrasadas->quantidade;\n \n if ($quantidade_acoes_atrasadas_item > 0) {\n $porc_atrasado_itens = ($soma_peso_acoes_atrasadas_item * 100) / $soma_total_acoes;\n \n } else {\n $porc_atrasado_itens = 0;\n $soma_peso_acoes_atrasadas_item = 0;\n }\n\n // echo '| atrasadas : '.$soma_peso_acoes_atrasadas_item;\n \n \n }else{\n \n \n $soma_peso_acoes_nao_iniciada_item = 1;\n $porc_atrasado_itens = 0;\n $porc_itens_pendentes = 0;\n $porc_acoes_concluidas_itens = 0;\n \n \n }\n \n $data_acoes_itens = array(\n 'concluido' => $soma_peso_acoes_concluidas_item,\n 'pendente' => $soma_itens_pendentes,\n 'atrasado' => $soma_peso_acoes_atrasadas_item,\n 'nao_iniciado' => $soma_peso_acoes_nao_iniciada_item\n );\n $this->reports_model->updateAcoesItemEscopo($item_id, $data_acoes_itens); \n \n //print_r($data_acoes_itens);\n // echo '<br>';\n \n \n }\n\n\n }\n \n \n }\n\n\n \n }\n }", "title": "" }, { "docid": "423bb7b5a4099f77114f0244231862d5", "score": "0.5481277", "text": "private function proximosCursosCompetencias($alumno_id, $aprobados, $reprob, $grupo) {\n $proximos = $this->proximosCursosGeneral($alumno_id, $aprobados, $reprob, $grupo);\n \n if(is_array($proximos)){\n //Retiro las materias que pertenen a las TAES\n $prx = array(); \n foreach($proximos as $materia_id => $curso){\n $trayectoriasespecializantesmateria = new Trayectoriasespecializantesmaterias();\n if(!$trayectoriasespecializantesmateria->exists(\"materias_id='\".$materia_id.\"'\")){\n $prx[$materia_id] = $curso;\n \n }\n }\n\n return $prx;\n }else{\n return array(); \n }\n\n }", "title": "" }, { "docid": "006c0aa8d3d5d928a9ed36a925726a57", "score": "0.54772043", "text": "public function agregarGrupos(){\n\t\t$data = Input::all();\n\t\t//Se revisa si había registros antes\n\t\t$temp = Plantilla::select('id_plan', 'grupo')\n\t\t\t\t->where('id_plan', $data['plan'])\n\t\t\t\t->where('grupo', $data['group'])\n\t\t\t\t->get();\n\t\t//Se obtienen los ID de las materias del semestre y plan seleccionados\n\t\t$materias = Subject::select('id')\n\t\t\t\t\t->where('semestre','=', Input::get('semester'))\n\t\t\t\t\t->where('id_plan', '=', Input::get('plan'))\n\t\t\t\t\t->get();\n\t\t//Se eliminan las comas en caso de haber múltiples grupos\n\t\t$data['group'] = str_replace(\" \", \"\", $data['group']);\n\t\t$data['group'] = strtoupper($data['group']);\n\t\t$grupos = explode(',',$data['group']);\n\t\t//Se añade cada uno de los grupos con sus respectivas materias a la base de datos\n\t\tforeach ($grupos as $grupo) {\n\t\t\tforeach ($materias as $materia) {\n\t\t\t\t$plantilla = new Plantilla();\n\t\t\t\t$plantilla->grupo \t\t= $grupo;\n\t\t\t\t$plantilla->id_plan\t\t= $data['plan'];\n\t\t\t\t$plantilla->id_subject \t= $materia['id'];\n\t\t\t\t$plantilla->id_proyecto\t= $data['idProyecto'];\n\t\t\t\t$plantilla->save();\n\t\t\t}\n\t\t}\n\t\treturn Redirect::to('proyectos/editar-proyecto?p='.$data['idProyecto']);\n\t}", "title": "" }, { "docid": "86589abf392eb0aa7fd78fe4c78a2266", "score": "0.5450347", "text": "private function recuperarTodoDatos($grupo)\n\t{\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t$query = $em->createQuery(\n\t\t\t'SELECT u.nombre, u.domainList, u.urlList, u.regularExpression, u.redirectMode, u.redirect, u.descripcion, u.log\n\t\t\t\tFROM PrincipalBundle:Target u\n\t\t\t\tWHERE u.ubicacion = :ubicacion'\n\t\t)->setParameter('ubicacion', $grupo);\n\t\t$datos = $query->getResult();\n\t\treturn $datos;\n\t}", "title": "" }, { "docid": "7dac5e765612b3a9ddb04cb5224ffa8f", "score": "0.5445519", "text": "function get_items($nro_orden=false)\r\n{\r\n global $db;\r\n $i=0;\r\n //BUSCA LOS ID DE LOS ITEMS EN LA VARIABLE @_POST\r\n reset($_POST);\r\n if(!($nro_orden===false))\r\n {\r\n\t $query=\"SELECT * FROM orden_de_compra as o JOIN fila as f on \".\r\n\t\t \t \"o.nro_orden=f.nro_orden WHERE o.nro_orden=$nro_orden\";\r\n\t $datos=$db->Execute($query) or die($db->ErrorMsg(). \"<br>$query\");\r\n\t $items; $i=0;\r\n\t while (!$datos->EOF)\r\n\t {\r\n\t \t$items[$i]['id_fila']=$datos->fields['id_fila'];\r\n\t \t$items[$i]['id_producto']=$datos->fields['id_producto'];\r\n\t \t$items[$i]['cantidad']=$datos->fields['cantidad'];\r\n\t \t$items[$i]['precio_unitario']=$datos->fields['precio_unitario'];\r\n\t \t$items[$i]['descripcion_prod']=$datos->fields['descripcion_prod'];\r\n\t \t$items[$i]['prov_prod']=($datos->fields['prov_prod'])?$datos->fields['prov_prod']:\"null\";\r\n\t \t$items[$i]['desc_adic']=$datos->fields['desc_adic'];\r\n\t \t$i++;\r\n\t \t$datos->MoveNext();\r\n\t }\r\n \t $items['cantidad']=$i;\r\n }\r\n else\r\n {\r\n\t $i=0;\r\n\t while ($clave_valor=each($_POST))\r\n\t {\r\n\t\t if (is_int(strpos($clave_valor[0],\"unitario_\")))\r\n\t\t {\r\n\t\t\t\t $posfijo=substr($clave_valor[0],9);\r\n\t\t\t\t $items[$i]['id_fila']=$_POST['idf_'.$posfijo];\r\n\t\t\t\t $items[$i]['id_producto']=$_POST['idp_'.$posfijo];\r\n\t\t\t\t $items[$i]['cantidad']=$_POST['cant_'.$posfijo];\r\n\t\t\t\t $items[$i]['precio_unitario']=$_POST['unitario_'.$posfijo];\r\n\t\t\t\t $items[$i]['descripcion_prod']=$_POST['desc_orig_'.$posfijo];\r\n\t\t\t\t $items[$i]['prov_prod']=($_POST['idprov_'.$posfijo])?$_POST['idprov_'.$posfijo]:\"null\";\r\n\t\t\t\t $items[$i]['subtotal']=$_POST['subtotal_'.$posfijo];\r\n \t $items[$i]['desc_adic']=$_POST['h_desc_'.$posfijo];\r\n \t $items[$i]['proveedores_cantidad']=$_POST['proveedores_cantidad_'.$posfijo];\r\n\t $items[$i]['id_producto_presupuesto']=$_POST['id_prod_pres_'.$posfijo];\r\n\t\t\t\t //creamos el arreglo con las cantidades y proveedores\r\n\t\t\t\t //para la reserva del producto\r\n\t\t\t\t $temp=substr($_POST['proveedores_cantidad_'.$posfijo],0,strlen($_POST['proveedores_cantidad_'.$posfijo])-1);\r\n\t\t\t\t $prov_cant=split(\";\",$temp);\r\n\t\t\t\t $tam=sizeof($prov_cant);\r\n\t\t\t\t for($x=0;$x<$tam;$x++)\r\n\t\t\t\t {\r\n\t\t\t\t $pc=split(\"-\",$prov_cant[$x]);\r\n\t\t\t\t if($pc[0]!=\"\" && $pc[1]!=\"\")\r\n\t\t\t\t {\r\n\t\t\t\t $items[$i]['proveedores'][$x][\"id_proveedor\"]=$pc[0];\r\n\t\t\t\t $items[$i]['proveedores'][$x][\"cantidad\"]=$pc[1];\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t $i++;\r\n\t\t }\r\n\t }\r\n\t $items['cantidad']=$i;\r\n }\r\n\r\n return $items;\r\n}", "title": "" }, { "docid": "fd6b76b7299850f1bea701caa9640ea0", "score": "0.54127675", "text": "function presentarComponentePropedeutico($registroEncabezadosPropedeuticos,$registroPropedeuticos,$nivel) {\r\n $creditosAprobadosNivel=0;\r\n $creditosNivel=0;\r\n\r\n if(is_array($registroEncabezadosPropedeuticos))\r\n {\r\n//******** presenta los encabezados propedeuticos con sus espacios\r\n\r\n foreach ($registroEncabezadosPropedeuticos as $key1 => $value1) {\r\n $encabezadoEliminado=array_shift($registroEncabezadosPropedeuticos);\r\n if($encabezadoEliminado['COD_ENCABEZADO']!=$id_encabezado)\r\n {\r\n $this->generarCeldaEncabezado($encabezadoEliminado);\r\n if($encabezadoEliminado['CLASIF_ENCABEZADO']!=4)\r\n {\r\n if (!is_null($encabezadoEliminado['COD_ESPACIO']))\r\n {\r\n $this->generarCeldaEspaciosEncabezados($encabezadoEliminado);\r\n }\r\n }\r\n $id_encabezado=$encabezadoEliminado['COD_ENCABEZADO'];\r\n $creditosNivel+=$encabezadoEliminado['CREDITOS_ENCABEZADO'];\r\n if ($encabezadoEliminado['APROBADO_ENC_ESPACIO']==1)\r\n {\r\n $creditosAprobadosNivel+=$encabezadoEliminado['CREDITOS_ENCABEZADO'];\r\n }\r\n }else\r\n {\r\n if($encabezadoEliminado['CLASIF_ENCABEZADO']!=4)\r\n {\r\n if (!is_null($encabezadoEliminado['COD_ESPACIO']))\r\n {\r\n $this->generarCeldaEspaciosEncabezados($encabezadoEliminado);\r\n }\r\n }\r\n $id_encabezado=$encabezadoEliminado['COD_ENCABEZADO'];\r\n }\r\n }\r\n//******** fin encabezados con propedeuticos\r\n }else\r\n {\r\n\r\n }\r\n//******** presenta los espacios propedeuticos no asociados\r\n if (is_array($registroPropedeuticos))\r\n {\r\n foreach($registroPropedeuticos as $key2 => $value2){\r\n $espacioEliminado=array_shift($registroPropedeuticos);\r\n $this->generarCeldaEspacios($espacioEliminado);\r\n $creditosNivel+=$espacioEliminado['CREDITOS_ESPACIO'];\r\n if ($espacioEliminado['APROBADO_ESPACIO']==1)\r\n {\r\n $creditosAprobadosNivel+=$espacioEliminado['CREDITOS_ESPACIO'];\r\n }\r\n }\r\n }else {\r\n\r\n }\r\n $this->mostrarCeldaCreditosNivel($creditosNivel,$creditosAprobadosNivel);\r\n\r\n }", "title": "" }, { "docid": "e8bd1a4f92b6c7a4b9de20281782c262", "score": "0.53906447", "text": "public function listaPerfilFormulario($activo,$idsistema,$idperfil,$nomformulario){////\n if($activo==1){\n parent::ConnectionOpen(\"sp_lista_perfil_formulario_hab\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idperfil);\n }\n else{\n parent::ConnectionOpen(\"sp_lista_perfil_formulario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idperfil);\n parent::SetParameterSP(\"$3\",\"%\".$nomformulario.\"%\");\n }\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n }", "title": "" }, { "docid": "b945691aed5d2858316a6b0bc851e299", "score": "0.53872865", "text": "public function privilegios()\n {\n \n $privilegios = $this->permisos()->pluck('valor','codigo')->toArray();\n\n return $privilegios;\n }", "title": "" }, { "docid": "a7a7135fc3476ef130b4febfcfd111f5", "score": "0.5375157", "text": "public function cargarParametrosDinamicos()\n {\n $grupoControlador = $this->getGrupoControladorParametro();\n list($grupoUsuario, $iUsuarioId) = $this->getGrupoUsuarioParametro();\n\n if(!empty($grupoControlador) && !isset($this->parametrosDinamicos->{$grupoControlador}))\n {\n $array = SysController::getInstance()->obtenerParametrosControlador($grupoControlador);\n if(!empty($array)){\n $this->parametrosDinamicos->{$grupoControlador} = $array;\n //luego de $seconds segundos se borran los parametros forzando a que se vuelvan a buscar en DB.\n $this->parametrosDinamicos->setExpirationSeconds(self::SEGUNDOS_EXPIRACION_CONTROLADORES, $grupoControlador);\n }\n }\n\n if(!empty($grupoUsuario) && !empty($iUsuarioId) && !isset($this->parametrosDinamicos->{$grupoUsuario}))\n {\n $array = SysController::getInstance()->obtenerParametrosUsuario($iUsuarioId);\n if(!empty($array)){\n $this->parametrosDinamicos->{$grupoUsuario} = $array;\n $this->parametrosDinamicos->setExpirationSeconds(self::SEGUNDOS_EXPIRACION_USUARIOS, $grupoUsuario);\n }\n }\n\n if(!isset($this->parametrosDinamicos->sistema))\n {\n $array = SysController::getInstance()->obtenerParametrosSistema();\n if(!empty($array)){\n $this->parametrosDinamicos->sistema = $array;\n $this->parametrosDinamicos->setExpirationSeconds(self::SEGUNDOS_EXPIRACION_SISTEMA, self::GRUPO_SISTEMA);\n }\n }\n }", "title": "" }, { "docid": "de2fee78dea2cbdc7877a47fdd1be54b", "score": "0.53628236", "text": "public function generaPreguntas($idConcurso, $idCategoria,$etapa){\n\t\t\t$rs = ['estado'=> 0, 'mensaje'=>'NO se generaron las preguntas'];\n\t\t\t$mensaje =\"\";\n\t\t\t$objRonda = new Rondas();\n\t\t\t$rondas = $objRonda->getRondas($etapa)['rondas'];\n\t\t\t$objRegla = new Reglas();\n\t\t\t$valida= 1;\n\t\t\tforeach ($rondas as $ronda) {\n\t\t\t\tif($ronda['IS_DESEMPATE'] == 0){\n\t\t\t\t\t$idRonda = $ronda['ID_RONDA'];\n\t\t\t\t\tif($idRonda == 5){\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$regla = $objRegla->getReglasByRonda($idRonda)[0];\n\t\t\t\t\t// la cantidad de preguntas por categoria debe considir a la cantidad de grados en el campo\n\t\t\t\t\t$grados = explode(',',$regla['GRADOS']);\n\n\t\t\t\t\tif($this->cantidadPreguntasCategoria($idConcurso,$idRonda,$idCategoria) \n\t\t\t\t\t\t>= $ronda['PREGUNTAS_POR_CATEGORIA']){\n\t\t\t\t\t\t$mensaje .= 'Se han generado todas las preguntas para la categoria de la ronda '.$idRonda .' ; ';\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif($this->cantidadPreguntasTotal($idConcurso,$idRonda) >= $ronda['CANTIDAD_PREGUNTAS']){\n\t\t\t\t\t\t$mensaje .= 'Se han generado todas las preguntas para la ronda '.$idRonda .' ; ';\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor($cont = 1 ; $cont <= $ronda['PREGUNTAS_POR_CATEGORIA']; $cont++){\n\t\t\t\t\t\t$preguntas = $this->getPreguntasByCatGrado($idCategoria,$grados[$cont - 1]);\n\t\t\t\t\t\t$key = array_rand($preguntas);\n\t\t\t\t\t\t$preguntaAleatoria = $preguntas[$key];\n\t\t\t\t\t\twhile ($this->existePreguntaEnConcursoRonda($idConcurso,\n\t\t\t\t\t\t\t$preguntaAleatoria['ID_PREGUNTA'])) {\n\t\t\t\t\t\t\t$preguntas = $this->getPreguntasByCatGrado($idCategoria,$grados[$cont - 1]);\n\t\t\t\t\t\t\t$preguntaAleatoria = array_rand($preguntas);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($preguntaAleatoria['ID_PREGUNTA'] == null || $preguntaAleatoria['ID_PREGUNTA'] == ''){\n\t\t\t\t\t\t\t$cont -=1;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$valoresInsert = ['ID_PREGUNTA' => $preguntaAleatoria['ID_PREGUNTA'] \n\t\t\t\t\t\t\t, 'ID_CONCURSO' => $idConcurso \n\t\t\t\t\t\t\t, 'ID_RONDA' => $idRonda\n\t\t\t\t\t\t\t, 'PREGUNTA_POSICION' => ($this->cantidadPreguntasTotal($idConcurso,$idRonda) + 1) ];\n\t\t\t\t\t\t\tif($this->save($valoresInsert) <= 0){\n\t\t\t\t\t\t\t\t$valida *= 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$valida2 = 1;\n\t\t\tif($etapa == 2){\n\t\t\t\t$valida2 = $this->generaPreguntasGRP($idConcurso,$idCategoria)['estado'];\n\t\t\t}\n\n\t\t\tif($valida && $valida2){\n\t\t\t\tif($mensaje ==''){\n\t\t\t\t\t$mensaje = \"GENERACION DE PREGUNTAS EXITOSA !\";\n\t\t\t\t}\n\n\t\t\t\t$rs = ['estado'=> 1,\n\t\t\t\t\t'mensaje'=>$mensaje,\n\t\t\t\t\t'counts'=> $this->getCantidadGeneradas($etapa,$idConcurso)];\n\t\t\t}else{\n\t\t\t\t// elimino todas si no se generaron correctamente para volver a intentar\n\t\t\t\t$this->delete(0,\"ID_CONCURSO=? AND ID_CATEGORIA = ?\" \n\t\t\t\t\t, ['ID_CONCURSO' => $idConcurso , 'ID_CATEGORIA'=>$idCategoria]);\n\t\t\t}\n\n\t\t\treturn $rs;\n\t\t}", "title": "" }, { "docid": "f17d58aad0fd7d79b0b4add96d6ca7ed", "score": "0.5327054", "text": "function promedio_grupo($notas, $total_estudiantes){\r\n\t$i=0;\r\n\t$suma = 0;\r\n\tforeach ($notas as $nota){\r\n\t\t$i++;\r\n\t\t$suma+=$nota->nota;\r\n\t}\r\n\treturn round($suma/$total_estudiantes);\r\n\t//return round($suma/$i);\r\n}", "title": "" }, { "docid": "cb0f1460055fb0e2f406b1614e620e3d", "score": "0.53125536", "text": "public function executeImprimirplanillaregularidades($request, $alumnos)\n {\n\t$oComision = Doctrine_Core::getTable('Comisiones')->find($request->getParameter(\"idcomision\"));\n\t$oCatedra = $oComision->getCatedras();\n\t$oMateriaPlan = $oCatedra->getMateriasPlanes();\n\t$oPlanEstudio = $oMateriaPlan->getPlanesEstudios();\n\t$oCarrera = $oPlanEstudio->getCarreras();\n\t$oFacultad = $oCarrera->getFacultades();\t\n\t$oEstadoMateria = Doctrine_Core::getTable('EstadosMateria')->find(1);\n\t$idsede = sfContext::getInstance()->getUser()->getAttribute('id_sede','');\n\t$tipo = $request->getParameter(\"tipo\");\n\t$bucles = 5;\n\n\t// Crea una instancia de la clase de PDF\n\t$pdf = new PlanillaTP('P','mm','Legal');\n\n\t// Toma las variables de la pagina anterior\n\tif ($tipo == \"parcial\"){\n\t\t// Asigna el titulo de la planilla\n\t\t$titulo= \"PLANILLA DE REGULARIDADES\";\n\t} else {\n\t\t// Asigna el titulo de la planilla\n\t\t$titulo= \"INFORME DE CATEDRA\";\n\t}\t\n\t// Agrega la Cabecera al documento\n\t$pdf->CabeceraApaisada($oFacultad,$oCarrera,$titulo);\n\t// Agrega el esquema grafico de la planilla\n\t$pdf->EsquemaPlanillaRegularidades($bucles);\t\n\t$pdf->SetFont('Times','',9);\n\t$pdf->SetXY(6,41);\n\t$pdf->MultiCell(65,3, $oCatedra->getIdmateriaplan().\" - \".$oCatedra->getMateriasPlanes(),0,'C',0);\n\t// Muestra el Curso, la Comisión y el Estado de los alumnos\n\t$pdf->SetFont('Times','',10);\n\t$pdf->SetXY(6,50);\n\t$pdf->Cell(65,5,\"CURSO: \".$oMateriaPlan->getAnodecursada(),0,1,'L');\n\t$pdf->SetXY(6,54);\n\t$pdf->Cell(65,5,\"COMISIÓN: \".$oComision->getNombre(),0,1,'L');\n\t$pdf->SetXY(6,58);\n\t$pdf->Cell(65,5,\"ALUMNOS: \". $oEstadoMateria,0,1,'L');\t\n\t/////////////////////////////////////////////////////////////////////////\n\t// CUERPO PAGINA\n\t/////////////////////////////////////////////////////////////////////////\t\t\n\t$total = count($alumnos);\n\t$y = 66;\n\t$contador = 1;\n\tforeach($alumnos as $alumno){\n\t\t$pdf->SetLineWidth(0);\n\t\t$pdf->SetFont('Times','',9);\n\t\t$pdf->SetXY(6,$y);\n\t\t$pdf->Cell(6,7,$contador,0,1,'C');\n\t\t$pdf->SetXY(12,$y);\n\t\t$nombreAlumno = $alumno->getPersonas();\n\t\tif (strlen($nombreAlumno) <= 30) {\n\t\t\t$pdf->Cell(85,7,$nombreAlumno,0,1,'L');\n\t\t} elseif ((strlen($nombreAlumno) > 30) and (strlen($nombreAlumno) <= 38)) {\n\t\t\t$pdf->SetFont('Times','',8);\n\t\t\t$pdf->Cell(85,7,$nombreAlumno,0,1,'L');\n\t\t\t$pdf->SetFont('Times','',9);\n\t\t} else {\n\t\t\t$pdf->Cell(85,7,substr($nombreAlumno, 0, 32),0,1,'L');\n\t\t\t//$pdf->SetFont('Times','',8);\n\t\t\t//$pdf->MultiCell(85,7,$nombreAlumno,0,1,'L');\n\t\t\t//$pdf->SetFont('Times','',9);\n\t\t}\n\t\t$y = $y + 7;\n\t\t\n\t\t$pdf->Line(5,$y,350,$y);\n\n\t\tif($pdf->PageNo()>1){\n\t\t\t// Lineas verticales que marca las columnas de la planilla\n\t\t\t$pdf->Line(12,5,12,188);\n\t\t\t$pdf->Line(70,5,70,188);\n\t\t\t$pdf->Line(95,5,95,188);\n\t\t\t$pdf->Line(120,5,120,188);\n\t\t\t$pdf->Line(145,5,145,188);\n\t\t\t$pdf->Line(175,5,175,188);\n\t\t\t$pdf->Line(195,5,195,188);\n\t\t\t$pdf->Line(225,5,225,188);\n\t\t\t$pdf->Line(250,5,250,188);\n\t\t}\n\t\t// Pasos a seguir si tiene que continuar en otra pagina\n\t\tif ($y > 180) {\n\t\t\t// Agrega el Pie al Documento\n\t\t\t$pdf->PieApaisada($idsede);\n\t\t\t// Agrega el Esquema Grafico de la segunda pagina\n\t\t\t$pdf->EsquemaPlanillaRegularidades2daHoja($bucles);\t\t\t\n\t\t\t// Reinicia el valor para la nueva página\n\t\t\t$y=9;\n\t\t}\n\t\t$contador++;\n\t}\n\t/////////////////////////////////////////////////////////////////////////\n\t// PIE PAGINA\n\t/////////////////////////////////////////////////////////////////////////\n\t// Agrega el Pie al Documento\n\t$pdf->PieApaisada($idsede);\n\t// Guarda o envía el documento pdf\n\t$pdf->Output('planilla-asistencia.pdf','I');\n\t// Termina el documento\n\t$pdf->Close();\n \t// Para el proceso de symfony\n \tthrow new sfStopException(); \n }", "title": "" }, { "docid": "50bbaf7dda0d96f8b9cfd3477ce75ead", "score": "0.53058875", "text": "public function spHabFormDePermiso($idsistema,$idpersona,$idformulario,$estado){////\n if($estado==1){//Está habilitado -> deseo deshabilitarlo\n parent::ConnectionOpen(\"sp_elimina_permiso_formulario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idpersona);\n parent::SetParameterSP(\"$3\",$idformulario);\n }\n else{//Está deshabilitado -> deseo habilitarlo\n parent::ConnectionOpen(\"sp_inserta_permiso_formulario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idpersona);\n parent::SetParameterSP(\"$3\",$idformulario);\n parent::SetParameterSP(\"$4\",1);\n }\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n }", "title": "" }, { "docid": "fc538c1de5dc097b20af89882ac4d575", "score": "0.52979136", "text": "function isAllowed($perm_type, $mod, $item_id = 0) {\n\tGLOBAL $perms, $AppUI;\n\t$allowed =false;\n\t\n\t/*** Administrator permissions ***/\n\tif ($AppUI->user_type == 1) return 1;\n\t\n\t/*** Special hardcoded permissions ***/\n\t\n\tif ($mod == 'public') return 1;\n\tif ($mod == 'functionalArea') return 1;\n\t\n\tif ( $mod == 'tasks' ){\t\n\t\t$mod=\"projects\";\n\t}\n\n//Si es algun archivo de SecurityCenter pregunto x los permisos de admin\n\tif ( $mod == 'SecurityCenter' ){\t\n\t\t$mod=\"admin\";\n\t}\n\t\n\t/*** Manually granted permissions ***/\n\n\t// TODO: Check this\n\t// If $perms['all'] or $perms[$mod] is not empty we have full permissions???\n\t// If we just set a deny on a item we get read/edit permissions on the full module.\n\t\n\tif($perm_type!=PERM_EDIT)\n\t $allowed = ! empty( $perms['all'] ) | ! empty( $perms[$mod] );\n\t\n\t// check permission on all modules\n\tif ( isset($perms['all']) && $perms['all'][PERM_ALL] ) {\n\t\t$allowed = checkFlag($perms['all'][PERM_ALL], $perm_type, $allowed);\n\t}\n\n\t// check permision on this module\n\tif ( isset($perms[$mod]) && isset($perms[$mod][PERM_ALL]) ) {\n\t\t$allowed = checkFlag($perms[$mod][PERM_ALL], $perm_type, $allowed);\n\t}\n\t\n // check permision for the item on this module\n\tif ($item_id > 0) {\n\t\tif ( isset($perms[$mod][$item_id]) ) {\n\t\t\t$allowed = checkFlag($perms[$mod][$item_id], $perm_type, $allowed);\n\t\t}\n\t}\n\t\t\n\t/*** Permission propagations ***/\n\t\t\t\n\t// if we have access on the project => we have access on its tasks\n/*\tif ( $mod == 'tasks' ) {\n\t\t//$allowed = isAllowed( $perm_type, \"projects\", 6, $allowed );\n\t\tif ( $item_id > 0 ) {\t\t\t\n\t\t\t// get task's project id\n\t\t\t$sql = \"SELECT task_project FROM tasks WHERE task_id = $item_id\";\n\t\t\t$project_id = db_loadResult($sql);\n\t\t\t\n\t\t\t// check task's permission\n\t\t\t$allowed = isAllowed( $perm_type, \"projects\", $project_id, $allowed );\n\t\t}\n\t}\n\n\tif ( $mod == 'projects' ) {\n\t\tif ( $item_id > 0 ) {\t\n\t\t\n\t\t\t$perms = CProject::projectPermissions($AppUI->user_id, $item_id);\t\n\t\t\tswitch ($perm_type){\n\t\t\tcase PERM_READ:\n\t\t\t\t$allowed=$allowed && $perms[1]!= PERM_DENY;\n\t\t\t\tbreak;\n\t\t\tcase PERM_WRITE:\n\t\t\t\t$prjObj = new CProject();\n\t\t\t\t$prjObj->load($item_id);\t\t\t\n\t\t\t\t$allowed=$allowed && (\t$perms[1]== PERM_CHANGE || \n\t\t\t\t\t\t\t\t\t($perms[1]==PERM_EDIT && $prjObj->project_owner == $AppUI->user_id)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\t*/\n\t/*** TODO: Specificaly denied items ***/\n\t// echo \"$perm_type $mod $item_id $allowed<br>\";\n\t\n\treturn $allowed;\n}", "title": "" }, { "docid": "9e49505c42adbdcc2e9a68a89dffae67", "score": "0.529593", "text": "public function asignaturacargaacademicaAction()\n {\n \n \n $user = $this->get('security.context')->getToken()->getUser(); \n if(($user->getEsAlumno()==FALSE)){\n $profesor=$user->getProfesor(); \n $id_profesor=$profesor->getId();\n \n $entities=$this->getDoctrine()->getRepository('NetpublicCoreBundle:CargaAcademica')->getAsignaturaGrupo($id_profesor);\n \n } \n $contratos=$profesor->getContrato();\n return array('entities' => $entities,'contratos'=>$contratos);\n }", "title": "" }, { "docid": "7a3fe91fc67bf620ce11a7643f2d682b", "score": "0.5278325", "text": "function asignarAccesoPerfiles($perfiles){\n\t\t\n\t\t\t$insert=\"insert into s_metodos_perfiles values \";\n\t\t\t$i=0;\n\t\t\tforeach ($perfiles as $key => $idPerfil) {\n\t\t\t\tif($i>0)$insert.=\",\";\n\t\t\t\t$insert.=\"(null,$this->id_metodo,$idPerfil)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$delete = \"delete from s_metodos_perfiles where id_metodo=$this->id_metodo\";\n\t\t\t$this->bd->ejecutarQuery($delete);\n\t\t\t$this->bd->ejecutarQuery($insert);\n\t\t\treturn array('ejecutado'=>1);\n\t}", "title": "" }, { "docid": "dc51206e57871230bdecc56b7f3800bc", "score": "0.527764", "text": "function hacerArregloEstadisticasPracticas($nivel, $idPersonal)\n\t{\n\t\t// buscar todas las practicas organizadas según las categorias y hacer un arreglo\n\t\t$sql = \"select bp_categorias.nombre as categoria,\n\t\t\t\tbp_buenasPracticas.categoriaId,bp_buenasPracticas.id, bp_buenasPracticas.tituloCorto as titulo\n\t\t\t\tfrom bp_categorias\n\t\t\t\tleft join bp_buenasPracticas on bp_categorias.id = bp_buenasPracticas.categoriaId\n\t\t\t\twhere publico=1 order by bp_categorias.orden,bp_buenasPracticas.orden\";\n\t\t$arrTmp=array();\n\t\t$arrTmpSub=array();\n\t\t$resultado = $this->db->query($sql);\n\t\t$categoriaSel=0;\n\t\t$nombreCategoriaSel=\"\";\n\t\twhile ($fila = $resultado->fetch_assoc()) {\n\t\t\tif($fila['categoriaId']!=$categoriaSel){\n\n\t\t\t\t// grabar arreglo hecho hasta ahora\n\t\t\t\tif($categoriaSel!=0) {\n\t\t\t\t\t$arrTmp[] = array(\n\t\t\t\t\t\t'idCategoria' => $categoriaSel,\n\t\t\t\t\t\t'nombreCategoria' => $nombreCategoriaSel,\n\t\t\t\t\t\t'practicas' => $arrTmpSub\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$categoriaSel=$fila['categoriaId'];\n\t\t\t\t$nombreCategoriaSel=$fila['categoria'];\n\t\t\t\t$arrTmpSub=array();\n\t\t\t\t$arrTmpSub[]=array(\n\t\t\t\t\t'idPractica' => $fila['id'],\n\t\t\t\t\t'nombrePractica' => $fila['titulo'],\n\t\t\t\t\t'completadasTotal'=>'',\n\t\t\t\t\t'completadasRegional'=>'',\n\t\t\t\t\t'enProcesoTotal'=>'',\n\t\t\t\t\t'enProcesoRegional'=>'',\n\t\t\t\t);\n\n\n\t\t\t}else{\n\t\t\t\t$arrTmpSub[]=array(\n\t\t\t\t\t'idPractica' => $fila['id'],\n\t\t\t\t\t'nombrePractica' => $fila['titulo'],\n\t\t\t\t\t'completadasTotal'=>'',\n\t\t\t\t\t'completadasRegional'=>'',\n\t\t\t\t\t'enProcesoTotal'=>'',\n\t\t\t\t\t'enProcesoRegional'=>'',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$arrTmp[] = array(\n\t\t\t'idCategoria' => $categoriaSel,\n\t\t\t'nombreCategoria' => $nombreCategoriaSel,\n\t\t\t'practicas' => $arrTmpSub\n\t\t);\n\t\t$tamanoMaximo=0;\n\n\t\t$sql=\"select buenasPracticasId, count(*) as cuantos from bp_empresa_buenaPractica where estatus=4 group by buenasPracticasId\";\n\t\t$resultado=$this->db->query($sql);\n\t\twhile($linea=$resultado->fetch_assoc()){\n\t\t\tif($linea['cuantos']>$tamanoMaximo) $tamanoMaximo=$linea['cuantos'];\n\t\t\tfor($x=0;$x<count($arrTmp);$x++){\n\t\t\t\tfor($y=0;$y<count($arrTmp[$x]['practicas']);$y++){\n\t\t\t\t\tif($arrTmp[$x]['practicas'][$y]['idPractica']==$linea['buenasPracticasId']) $arrTmp[$x]['practicas'][$y]['completadasTotal']=$linea['cuantos'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$sql=\"select buenasPracticasId, count(*) as cuantos from bp_empresa_buenaPractica where estatus=2 group by buenasPracticasId\";\n\t\t$resultado=$this->db->query($sql);\n\t\twhile($linea=$resultado->fetch_assoc()){\n\t\t\tif($linea['cuantos']>$tamanoMaximo) $tamanoMaximo=$linea['cuantos'];\n\t\t\tfor($x=0;$x<count($arrTmp);$x++){\n\t\t\t\tfor($y=0;$y<count($arrTmp[$x]['practicas']);$y++){\n\t\t\t\t\tif($arrTmp[$x]['practicas'][$y]['idPractica']==$linea['buenasPracticasId']) $arrTmp[$x]['practicas'][$y]['enProcesoTotal']=$linea['cuantos'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($nivel==2) {\n\n\t\t\t$sql = \"select buenasPracticasId, count(*) as cuantos from bp_empresa_buenaPractica where estatus=4\n\t\t\t\tand empresaId in (select id from bp_empresas where mentorId in (select Id from bp_personal where superiorId=$idPersonal))\n\t\t\t\tgroup by buenasPracticasId\";\n\t\t\t$resultado=$this->db->query($sql);\n\t\t\twhile($linea=$resultado->fetch_assoc()){\n\t\t\t\tif($linea['cuantos']>$tamanoMaximo) $tamanoMaximo=$linea['cuantos'];\n\t\t\t\tfor($x=0;$x<count($arrTmp);$x++){\n\t\t\t\t\tfor($y=0;$y<count($arrTmp[$x]['practicas']);$y++){\n\t\t\t\t\t\tif($arrTmp[$x]['practicas'][$y]['idPractica']==$linea['buenasPracticasId']) $arrTmp[$x]['practicas'][$y]['completadasRegional']=$linea['cuantos'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sql = \"select buenasPracticasId, count(*) as cuantos from bp_empresa_buenaPractica where estatus=2\n\t\t\t\tand empresaId in (select id from bp_empresas where mentorId in (select Id from bp_personal where superiorId=$idPersonal))\n\t\t\t\tgroup by buenasPracticasId\";\n\t\t\t$resultado=$this->db->query($sql);\n\t\t\twhile($linea=$resultado->fetch_assoc()){\n\t\t\t\tif($linea['cuantos']>$tamanoMaximo) $tamanoMaximo=$linea['cuantos'];\n\t\t\t\tfor($x=0;$x<count($arrTmp);$x++){\n\t\t\t\t\tfor($y=0;$y<count($arrTmp[$x]['practicas']);$y++){\n\t\t\t\t\t\tif($arrTmp[$x]['practicas'][$y]['idPractica']==$linea['buenasPracticasId']) $arrTmp[$x]['practicas'][$y]['enProcesoRegional']=$linea['cuantos'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t$arrTmp['tamanoMaximo']=$tamanoMaximo;\n\t\treturn ($arrTmp);\n\t}", "title": "" }, { "docid": "eec5d03063e1078cd223e9681d3f9015", "score": "0.5277026", "text": "public function listaUsuarios($opcion,$valor,$id_sistema){////\n parent::ConnectionOpen(\"sp_lista_usuario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$opcion);\n parent::SetParameterSP(\"$2\",$valor);\n parent::SetParameterSP(\"$3\",$id_sistema);\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n\t}", "title": "" }, { "docid": "d98bd3480b8f8fcdf88005c9b0eba6dc", "score": "0.52730036", "text": "function listaReceitas()\n {\n //ESSE ARRAY PODE CARREGAR QUALQUER TIPO, SEJA ELE UMA STRING, INTEIRO, BOOLEAN...\n $ingredientes1 = [\n '* 1 pacote de 500g de massa fresca<br>',\n '* 500g de carne moída (patinho, maminha ou outra de sua preferência)<br>',\n '* 5 tomates sem pele amassados ou batidos no liquidificador<br>',\n '* 4 dentes de alho picadinhos<br>',\n '* 1 cebola inteira<br>',\n '* Parmesão ralado a gosto para gratinar<br>',\n ];\n\n //O ARRAY ABAIXO '$ingredientes2' ESTÁ CARREGANDO SEUAS INFORMAÇÕES(TIPO STRING) E TAMBÉM TODAS AS INFORMAÇÕES DO ARRAY ACIMA '$ingredientes1';\n $ingredientes2 = [\n $ingredientes1,\n '* 1 pacote de 500g de massa fresca<br>',\n '* 300g de presunto magro em fatias<br>',\n '* 300g de queijo mussarela em fatias<br>',\n '* 4 dentes de alho picadinhos<br>',\n '* Parmesão ralado a gosto<br>',\n ]; \n \n //POSSO CARREGAR OUTRO ARRAY COLOCANDO EM QUALQUER POSIÇÃO DENTRO DO NOVO ARRAY.\n $ingredientes3 = [\n $ingredientes2,\n '* 5 filés de peito de frango desfiados<br>',\n '* 1/2 kg de queijo mussarela<br>',\n '* 800 g de presunto<br>',\n '* 1 pote de requeijão médio<br>',\n '* 1 tomate<br>',\n '* 1 cebola<br>',\n '* 1kg de massa pronta para lasanha (dois pacotes)<br>',\n '* 5 copos de leite<br>',\n '* 1 colher e ½ de farinha de trigo<br>',\n '* 2 caixas de creme de leite<br>',\n '* Ervas finas, pimenta do reino e sal a gosto<br>',\n ];\n \n $ingredientes4 = [\n $ingredientes3,\n '* 3 berinjelas grandes<br>',\n '* 1 lata de molho de tomate<br>',\n '* 1 maço de coentro cortado<br>',\n '* Azeitonas sem caroços cortadas<br>',\n '* 300g de queijo mussarela fatiado<br>',\n '* 300g de presunto fatiado<br>',\n '* 2 colheres de azeite<br>',\n '* Catupiry light<br>',\n ];\n \n //print_r(); => É UM COMANDO NATIVO DO PHP PARA IMPRIMIR TODO O ARRAY\n print_r($ingredientes4);\n\n }", "title": "" }, { "docid": "157558201a41bf26b856a82a33c29d36", "score": "0.5259228", "text": "function cria_menu($pai_id,$nivel,$lista_itens_menu ){\n\t$q = mysql_query($t=\"SELECT p . *\nFROM usuario_tipo_modulo AS t, sis_modulos AS m, sis_modulos AS p\nWHERE usuario_tipo_id = '\".$_SESSION['usuario']->usuario_tipo_id. \"'\nAND m.id = t.modulo_id\nAND m.modulo_id = p.id\nAND p.modulo_id = '$pai_id'\nGROUP BY p.id\nORDER BY p.ordem_menu, p.nome, m.ordem_menu, m.nome\n\");\n\t\t\t///echo $t.mysql_error();\n\t$nivel++;\n\t\n\twhile($r = mysql_fetch_object($q)){\t\t\n\n\t\t$q2 = mysql_query($t=\"SELECT m.* FROM usuario_tipo_modulo as t ,sis_modulos as m WHERE m.id=t.modulo_id AND usuario_tipo_id = '\".$_SESSION['usuario']->usuario_tipo_id. \"' AND m.modulo_id='$r->id' order by ordem_menu,nome \");\n\t\t//\techo $t.mysql_error();\n\t\t$filhos=array();\n\t\twhile($r2 = mysql_fetch_object($q2)){\t\t\n\t\t\t$filhos[$r2->id] = array(\n\t\t\t\t'id'=>$r2->id,\n\t\t\t\t'pai'=>$r2->modulo_id,\n\t\t\t\t'nome'=>$r2->nome,\n\t\t\t\t'ordem'=>$r2->ordem_menu,\n\t\t\t\t'acao_menu'=>$r2->acao_menu,\n\t\t\t\t'ativo'=>$r2->acao_menu,\n\t\t\t\t);\n\t\t\n\t\t}\n\t\t$lista_itens_menu[$r->modulo_id][]= array(\n\t\t\t'id'=>$r->id,\n\t\t\t'pai'=>$r->modulo_id,\n\t\t\t'nome'=>$r->nome,\n\t\t\t'ordem'=>$r->ordem_menu,\n\t\t\t'acao_menu'=>$r->acao_menu,\n\t\t\t'ativo'=>$r->acao_menu,\n\t\t\t\t\n\t\t\t\t'filhos' => $filhos\n\t\t\t);\n\t\t\t\n\t\t$lista_itens_menu = cria_menu($r->id,$nivel,$lista_itens_menu );\n\n\t}\n\t\n\treturn $lista_itens_menu;\n}", "title": "" }, { "docid": "6e23f431efad0711645a1cabe83f90db", "score": "0.5258451", "text": "private function informacion_interfaces_plantel($grupo)\n\t{\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t $db = $em->getConnection();\n\t\t$query = \"SELECT DISTINCT descripcion FROM interfaces WHERE grupo = '$grupo'\";\n\t\t$stmt = $db->prepare($query);\n\t\t$params =array();\n\t\t$stmt->execute($params);\n\t\t$grupos=$stmt->fetchAll();\n\t\treturn $grupos;\n\t}", "title": "" }, { "docid": "e07a2cafe9f93b5174361954d62ce9dd", "score": "0.5251528", "text": "function verificarDisponibilidadPresupuestariaOS($anio, $organismo, $codigo, $detalles, $monto_impuestos) {\r\n\tglobal $_PARAMETRO;\r\n\t$disponible = true;\r\n\t//\trecorro los detalles de los items o de los commodities\t\r\n\t$secuencia = 0;\r\n\t$detalle = split(\";\", $detalles);\r\n\tforeach ($detalle as $linea) {\r\n\t\t$secuencia++;\r\n\t\tlist($_codigo, $_descripcion, $_cantidad, $_pu, $_total, $_fesperada, $_freal, $_codccosto, $_activo, $_flagterminado, $_codpartida, $_codcuenta, $_observaciones) = split(\"[|]\", $linea);\r\n\t\tlist($_commodity, $_secuencia) = split(\"[.]\", $_codigo);\r\n\t\tif ($secuencia == 1) $filtro_det .= \" cs.Codigo = '\".$_commodity.\"'\";\r\n\t\telse $filtro_det .= \" OR cs.Codigo = '\".$_commodity.\"'\";\r\n\t\t$partida[$_codpartida] += ($_cantidad * $_pu);\r\n\t}\r\n\t$sql = \"(SELECT \r\n\t\t\t\tdo.cod_partida,\r\n\t\t\t\tpc.denominacion,\r\n\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso + do.Monto) AS MontoDisponible\r\n\t\t\t FROM\r\n\t\t\t\tlg_distribucionoc do\r\n\t\t\t\tINNER JOIN pv_partida pc ON (do.cod_partida = pc.cod_partida)\r\n\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (do.CodOrganismo = pvp.Organismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t do.Anio = pvp.EjercicioPpto)\r\n\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (pc.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t WHERE\r\n\t\t\t\tdo.Anio = '\".$anio.\"' AND\r\n\t\t\t\tdo.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\tdo.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\tpc.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\r\n\t\t\t\t\r\n\t\t\tUNION\r\n\t\t\t\r\n\t\t\t(SELECT\r\n\t\t\t\tp.cod_partida,\r\n\t\t\t\tp.denominacion,\r\n\t\t\t\tpvp.EjercicioPpto,\r\n\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso) AS MontoDisponible\r\n\t\t\t FROM\r\n\t\t\t\tlg_commoditysub cs\r\n\t\t\t\tINNER JOIN pv_partida p ON (cs.cod_partida = p.cod_partida)\r\n\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (pvp.Organismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t pvp.EjercicioPpto = '\".$anio.\"')\r\n\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (p.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t \t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t WHERE \r\n\t\t\t\t1 AND ($filtro_sel $filtro_det) AND\r\n\t\t\t\tp.cod_partida NOT IN (SELECT do1.cod_partida\r\n\t\t\t\t\t\t\t\t\t FROM\r\n\t\t\t\t\t\t\t\t\t\t\tlg_distribucionoc do1\r\n\t\t\t\t\t\t\t\t\t\t\tINNER JOIN pv_partida pc1 ON (do1.cod_partida = pc1.cod_partida)\r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuesto pvp1 ON (do1.CodOrganismo = pvp1.Organismo AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t do1.Anio = pvp1.EjercicioPpto)\r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd1 ON (pc1.cod_partida = pvpd1.cod_partida AND \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t pvp1.CodPresupuesto = pvpd1.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp1.Organismo = pvpd1.Organismo)\r\n\t\t\t\t\t\t\t\t\t WHERE\r\n\t\t\t\t\t\t\t\t\t\t\tdo1.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\tdo1.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\tdo1.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\tpc1.cod_partida <> '\".$_PARAMETRO['IVADEFAULT'].\"')\t\t\t\t\t\r\n\t\t\t GROUP BY cod_partida)\r\n\t\t\t\r\n\t\t\tORDER BY cod_partida\";\r\n\t$query_general = mysql_query($sql) or die ($sql.mysql_error());\r\n\twhile($field_general = mysql_fetch_array($query_general)) {\r\n\t\t$codpartida = $field_general['cod_partida'];\r\n\t\t$resta = $field_general['MontoDisponible'] - $partida[$codpartida];\r\n\t\tif ($resta < 0) $disponible = false;\r\n\t}\r\n\t\r\n\t//\tconsulto partida igv\r\n\tif ($monto_impuestos > 0) {\r\n\t\t//\tsi ya tiene distribuido algun monto en el igv lo obtengo\r\n\t\t$sql = \"SELECT do.Monto\r\n\t\t\t\tFROM lg_distribucionoc do\r\n\t\t\t\tWHERE\r\n\t\t\t\t\tdo.Anio = '\".$anio.\"' AND\r\n\t\t\t\t\tdo.CodOrganismo = '\".$organismo.\"' AND\r\n\t\t\t\t\tdo.NroOrden = '\".$codigo.\"' AND\r\n\t\t\t\t\tdo.cod_partida = '\".$_PARAMETRO['IVADEFAULT'].\"'\";\r\n\t\t$query_igv = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\tif (mysql_num_rows($query_igv) != 0) $field_igv = mysql_fetch_array($query_general);\r\n\t\t$montoigv = floatval($field_igv['Monto']);\r\n\t\t\r\n\t\t//\tobtengo la disponibilidad de la partida del igv\t\t\r\n\t\t$sql = \"SELECT\r\n\t\t\t\t\tp.cod_partida,\r\n\t\t\t\t\tp.denominacion,\r\n\t\t\t\t\t(pvpd.MontoAjustado - pvpd.MontoCompromiso + $montoigv) AS MontoDisponible\r\n\t\t\t\tFROM\r\n\t\t\t\t\tpv_partida p\r\n\t\t\t\t\tLEFT JOIN pv_presupuesto pvp ON (pvp.Organismo = '\".$organismo.\"' AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.EjercicioPpto = '\".$anio.\"')\r\n\t\t\t\t\tLEFT JOIN pv_presupuestodet pvpd ON (p.cod_partida = pvpd.cod_partida AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.CodPresupuesto = pvpd.CodPresupuesto AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t pvp.Organismo = pvpd.Organismo)\r\n\t\t\t\tWHERE p.cod_partida = '\".$_PARAMETRO['IVADEFAULT'].\"'\";\r\n\t\t$query_general = mysql_query($sql) or die ($sql.mysql_error());\r\n\t\twhile($field_general = mysql_fetch_array($query_general)) {\r\n\t\t\t$resta = $field_general['MontoDisponible'] - $monto_impuestos;\r\n\t\t\tif ($resta < 0) $disponible = false;\r\n\t\t}\r\n\t}\r\n\treturn $disponible;\r\n}", "title": "" }, { "docid": "1a20d521325bf39a52e37341d09489b8", "score": "0.52498", "text": "function listarObligaciones(){\n\t\t$this->procedimiento='plani.ft_consolidado_sel';\n\t\t$this->transaccion='PLA_DETOBLIREP_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t\n\t\t$this->captura('tipo_obligacion','varchar');\t\t\n\t\t$this->captura('acreedor','varchar');\n\t\t$this->captura('monto','numeric');\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "7abcf9a957b727fe722c39be20726dbc", "score": "0.52474517", "text": "public function procesarBajaDetalleOrdenCompra($codigo_proy){\n\t \t//print_r($codigo_proy);\n\t\t\n\t\t\t$query='SELECT * \n\t\t\t\t\tFROM alm_ord_compra_cab\n\t\t\t\t\tWHERE alm_proy_cod=\"'.$codigo_proy.'\" AND ISNULL(alm_ord_compra_usr_baja)';\n\t\t\t\t\t$cabecera = $this->mysql->query($query);\n\t\t\t\t\tif (empty($cabecera)){\n\t\t\t\t\t\t//print_r(\"Vacio cabecera\");\n\t\t\t\t\t\t$value['alm_proy_usr_baja'] = $_SESSION['login'];\n\t\t\t\t\t\tif($this->mysql->update('alm_proyecto', $value,'alm_proy_cod=\"'.$codigo_proy.'\"')){ \n\t\t\t\t\t\t\t print_r(\"positivo\"); \n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t print_r(\"negativo\");\n\t\t\t\t\t\t }\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t $query='SELECT cd.alm_id_codigo_unico_proy\n\t\t\t\t\t\t\t\t FROM alm_ord_compra_det cd INNER JOIN alm_ord_compra_cab c ON cd.alm_id_codigo_unico_proy=c.alm_id_unico_orden_compra\n\t\t\t\t\t\t\t\t WHERE cd.alm_cod_proyecto=\"'.$codigo_proy.'\" AND ISNULL(cd.alm_item_ord_usr_baja)\n\t\t\t\t\t\t\t\t ';\n\t\t\t\t\t\t\t\t$detalle = $this->mysql->query($query);\n\t\t\t\t\t\t\t\tforeach ($cabecera as $key => $value) {\n\t\t\t\t\t\t\t\t\tif (empty($detalle)){\n\t\t\t\t\t\t\t\t\t\t //print_r(\"Vacio detalle \".$codigo_proy);\n\t\t\t\t\t\t\t\t\t\t $value['alm_ord_compra_usr_baja'] = $_SESSION['login'];\n\t\t\t\t\t\t\t\t\t\t $this->mysql->update('alm_ord_compra_cab', $value,'alm_proy_cod=\"'.$codigo_proy.'\" ');\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t $cont = 0;\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t$data['alm_id_codigo_unico_proy'] = $value['cd']['alm_id_codigo_unico_proy'];\n\t\t\t\t\t\t\t\t\t\t\t\t$value['alm_item_ord_usr_baja'] = $_SESSION['login'];\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mysql->update('alm_ord_compra_det', $value,'alm_cod_proyecto=\"'.$codigo_proy.'\" ');\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mysql->update('alm_ord_compra_cab', $value,'alm_proy_cod=\"'.$codigo_proy.'\" ');\n\t\t\t\t\t\t\t\t\t\t\t\t$this->mysql->update('alm_proyecto', $value,'alm_proy_cod=\"'.$codigo_proy.'\" '); \n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t }", "title": "" }, { "docid": "f1ae165ef8c593b15f1cee6eca2e9bd9", "score": "0.52320015", "text": "function listaEspacios($niveles,$registroEspacios,$totalEspacios,$registroEncabezadosEspacios) {\r\n\r\n $id_encabezado=isset($id_encabezado)?$id_encabezado:'';\r\n\r\n $creditosAprobadosNivel=0;\r\n $nivelPropedeutico=6;\r\n $creditosAprobados=0;\r\n $creditosNivel=0;\r\n $idEncabezado=0;\r\n $creob=0;\r\n $creoc=0;\r\n $creei=0;\r\n $creee=0;\r\n $ob=0;\r\n $oc=0;\r\n $ei=0;\r\n $ee=0;\r\n if(is_array($niveles)){\r\n ?><table class='sigma contenidotabla'><?\r\n foreach ($niveles as $key => $value) {\r\n $this->mostrarEncabezadoNivel('PERIODO DE FORMACI&Oacute;N '.$value['NIVEL']);\r\n if(is_array($registroEncabezadosEspacios))\r\n {\r\n//******** presenta los encabezados del nivel junto con sus espacios\r\n foreach ($registroEncabezadosEspacios as $key1 => $value1) {\r\n if ($registroEncabezadosEspacios[0]['NIVEL_ENCABEZADO']==$niveles[$key]['NIVEL'])\r\n {\r\n $encabezadoEliminado=array_shift($registroEncabezadosEspacios);\r\n if($encabezadoEliminado['COD_ENCABEZADO']!=$id_encabezado)\r\n {\r\n $this->generarCeldaEncabezado($encabezadoEliminado);\r\n if($encabezadoEliminado['CLASIF_ENCABEZADO']!=4)\r\n {\r\n if (!is_null($encabezadoEliminado['COD_ESPACIO'])&&$encabezadoEliminado['ESTADO_ESPACIO']==1)\r\n {\r\n $this->generarCeldaEspaciosEncabezados($encabezadoEliminado);\r\n }\r\n }\r\n $id_encabezado=$encabezadoEliminado['COD_ENCABEZADO'];\r\n $creditosNivel+=$encabezadoEliminado['CREDITOS_ENCABEZADO'];\r\n if ($encabezadoEliminado['APROBADO_ENCABEZADO']==1)\r\n {\r\n $creditosAprobadosNivel+=$encabezadoEliminado['CREDITOS_ENCABEZADO'];\r\n }\r\n }else\r\n {\r\n if($encabezadoEliminado['CLASIF_ENCABEZADO']!=4)\r\n {\r\n if (!is_null($encabezadoEliminado['COD_ESPACIO'])&&$encabezadoEliminado['ESTADO_ESPACIO']==1)\r\n {\r\n $this->generarCeldaEspaciosEncabezados($encabezadoEliminado);\r\n }\r\n }\r\n $id_encabezado=$encabezadoEliminado['COD_ENCABEZADO'];\r\n }\r\n }else\r\n {\r\n }\r\n }\r\n//******** fin encabezados con espacios\r\n }else\r\n {\r\n\r\n }\r\n //******** presenta los espacios no asociados\r\n if (is_array($registroEspacios))\r\n {\r\n foreach($registroEspacios as $key2 => $value2){\r\n if ($registroEspacios[0]['NIVEL_ESPACIO']==$niveles[$key]['NIVEL'])\r\n {\r\n $espacioEliminado=array_shift($registroEspacios);\r\n $this->generarCeldaEspacios($espacioEliminado);\r\n $creditosNivel+=$espacioEliminado['CREDITOS_ESPACIO'];\r\n if ($espacioEliminado['APROBADO_ESPACIO']==1)\r\n {\r\n $creditosAprobadosNivel+=$espacioEliminado['CREDITOS_ESPACIO'];\r\n }\r\n }else{\r\n }\r\n }\r\n }else {\r\n\r\n }\r\n //******** presenta los creditos del nivel\r\n $this->mostrarCeldaCreditosNivel($creditosNivel,$creditosAprobadosNivel);\r\n $creditosAprobadosNivel=0;\r\n $creditosNivel=0;\r\n //******** Presenta el componente propedeutico\r\n if ($value['NIVEL']==$nivelPropedeutico)\r\n {\r\n $registroPropedeuticos=$this->consultarEspaciosPropedeuticosPlan();\r\n $registroEncabezadosPropedeuticos=$this->consultarEncabezadosPropedeuticosConEspacios();\r\n if(is_array($registroEncabezadosPropedeuticos) || is_array($registroPropedeuticos))\r\n {\r\n $this->contarCreditosPlan($registroPropedeuticos,$registroEncabezadosPropedeuticos);\r\n $this->mostrarEncabezadoNivel('COMPONENTE PROPED&Eacute;UTICO');\r\n $this->presentarComponentePropedeutico($registroEncabezadosPropedeuticos,$registroPropedeuticos,$niveles[$key]['NIVEL']);\r\n //************* fin Propedeutico\r\n $nivelPropedeutico=0;\r\n $creditosAprobadosNivel=0;\r\n $creditosNivel=0;\r\n }\r\n }else\r\n {\r\n }\r\n }\r\n ?></table><?\r\n $this->parametrosPlan->presentarAbreviaturas();\r\n $this->presentarCreditosRegistradosPlan();\r\n }else\r\n {\r\n//*** si no hay espacios registrados\r\n $this->presentarMensajeNoEspacios();\r\n }\r\n }", "title": "" }, { "docid": "e3f0fcab9843784b44250c6e53e6759b", "score": "0.5226358", "text": "function lista_distribucion( $ids, $etapa ) {\n\t\t// variables necesarias para la estructura de la p�gina\n\t\t$titulo = 'Lista de Distribuci&oacute;n';\n\t\t$datos['titulo'] = $titulo;\n\t\t$datos['menu'] = $this->menu;\n\t\t$this->inicio_admin_model->set_sort( 20 );\n\t\t$datos['sort_tabla'] = $this->inicio_admin_model->get_sort();\n\t\t\n\t\t// genera la barra de dirección\n\t\t$this->get_barra( array( 'alta' => $titulo ) );\n\t\t$datos['barra'] = $this->barra;\n\t\t\t\t\n\t\t$datos['id'] = $ids;\n\t\t$datos['etapa'] = $etapa;\t\t\n\t\t\n\t\t// obtiene todos los usuarios activos del area\n\t\t$datos['usuarios'] = $this->db->order_by('Nombre')->get_where('ab_usuarios',array('ab_usuarios.IdArea' => $this->session->userdata('id_area'), 'ab_usuarios.Estado' => '1'));\n\t\t$lista_distribucion = $this->db->get_where('pa_solicitudes_distribucion',array('pa_solicitudes_distribucion.IdSolicitud' => $ids));\n\t\t$datos['lista_distribucion'] = $lista_distribucion;\n\t\t\n\t\t// revisa si la solicitud ya tiene soliciador o autoizador\n\t\t$datos['solicitador'] = false;\n\t\t$datos['autorizador'] = false;\n\t\tif( $lista_distribucion->num_rows() > 0 ) {\n\t\t\tforeach ( $lista_distribucion->result() as $row ) {\n\t\t\t\tif( $row->Tipo == 1 ) {\n\t\t\t\t\t$datos['solicitador'] = true;\n\t\t\t\t}\n\t\t\t\tif( $row->Tipo == 2 ) {\n\t\t\t\t\t$datos['autorizador'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// estructura de la p�gina\n\t\t$this->load->view('_estructura/header',$datos);\t\n\t\t$this->load->view('admin/_estructura/top',$datos);\n\t\t$this->load->view('admin/_estructura/usuario',$datos);\n\t\t$this->load->view('admin/solicitudes/lista_distribucion',$datos);\n\t\t$this->load->view('admin/_estructura/footer');\n\t\t\n\t\t// realiza la insercion\n\t\tif( $_POST ) {\n\t\t\t// reglas de validaci�n\n\t\t\t$this->form_validation->set_rules('distribucion[]', 'la Lista de Distribuci&oacute;n', 'required|trim');\n\t\t\t// si la solicitud ya se ha generado y solo se esta agregando a alguien a la lista de distribución\n\t\t\tif( !$etapa ) {\n\t\t\t\t$this->form_validation->set_rules('solicitador[]', 'el Solicitador', 'required|trim');\n\t\t\t\t$this->form_validation->set_rules('autorizador[]', 'el Autorizador', 'required|trim');\n\t\t\t}\t\t\t\n\t\t\t$this->form_validation->set_message('required', 'Debes elegir <strong>%s</strong>');\n\t\t\t\n\t\t\t// envia mensaje de error si no se cumple con alguna regla\n\t\t\tif( $this->form_validation->run() == FALSE ){\n\t\t\t\t$this->load->view('mensajes/error_validacion',$datos);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$i = 0;\n\t\t\t\t$inserta = array();\t\t\t\t\n\t\t\t\tforeach( $this->input->post('distribucion') as $lista ) {\n\t\t\t\t\t// si el mismo usuario es solicitador y autorizador, inserta primero como solicitador\n\t\t\t\t\tif( $lista == $this->input->post('autorizador') && $lista == $this->input->post('solicitador') ) {\t\t\t\t\t\t\n\t\t\t\t\t\t$tipo = '1';\n\t\t\t\t\t\t$inserta[$i] = array(\n\t\t\t\t\t\t 'IdSolicitud'\t=> $ids,\n\t\t\t\t\t\t 'IdUsuario'\t\t=> $lista,\n\t\t\t\t\t\t 'Tipo'\t\t\t=> $tipo,\n\t\t\t\t\t\t 'Aceptado'\t\t=> '0', // solicitud no aceptada\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t$tipo = '2';\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// inserta al solicitador\n\t\t\t\t\telseif( $lista == $this->input->post('solicitador') ) {\n\t\t\t\t\t\t$tipo = '1';\n\t\t\t\t\t}\n\n\t\t\t\t\t// inserta al autorizador\n\t\t\t\t\telseif( $lista == $this->input->post('autorizador') ) {\n\t\t\t\t\t\t$tipo = '2';\n\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t\t// común en lista de distribución\n\t\t\t\t\telse {\n\t\t\t\t\t\t$tipo = '0';\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t$inserta[$i] = array(\n\t\t\t\t\t 'IdSolicitud'\t=> $ids,\n\t\t\t\t\t 'IdUsuario'\t\t=> $lista,\n\t\t\t\t\t 'Tipo'\t\t\t=> $tipo,\n\t\t\t\t\t 'Aceptado'\t\t=> '0', // solicitud no aceptada\n\t\t\t\t\t);\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$resp = $this->db->insert_batch('pa_solicitudes_distribucion', $inserta);\n\t\t\t\tif( $resp ) {\n\t\t\t\t\t// si la solicitud ya se ha generado y solo se esta agregando a alguien a la lista de distribución\n\t\t\t\t\tif( $etapa ) {\n\t\t\t\t\t\t$datos['mensaje_titulo'] = \"&Eacute;xito al Guardar\";\n\t\t\t\t\t\t$datos['mensaje'] = \"Los cambios en la lista de distribuci&oacute;n se han guardado correctamente\";\n\t\t\t\t\t\t$datos['enlace'] = \"admin/solicitudes/ver_lista_distribucion/\".$ids.\"/\".$etapa;\n\t\t\t\t\t\t$this->load->view('mensajes/ok_redirec',$datos);\n\t\t\t\t\t}\n\t\t\t\t\t// si se esta generando la solicitud\n\t\t\t\t\telse {\n\t\t\t\t\t\t$datos['mensaje_titulo'] = \"&Eacute;xito al Guardar\";\n\t\t\t\t\t\t$datos['mensaje'] = \"La lista de distribuci&oacute;n se ha guardado correctamente\";\n\t\t\t\t\t\t$datos['enlace'] = \"admin/solicitudes/ver/\".$ids.\"/lista\";\n\t\t\t\t\t\t$this->load->view('mensajes/ok_redirec',$datos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "11532720377e0f78da57537417c42779", "score": "0.52198535", "text": "public function listaGrupos(Request $request)\n {\n $aspirante = DB::table('users')\n ->select(\n DB::raw('LTRIM(RTRIM(CATR_ASPIRANTE.PREFICHA)) as PREFICHA'),\n 'CATR_CARRERA.CLAVE as CLAVE_CARRERA',\n 'CATR_ASPIRANTE.FOLIO_CENEVAL',\n 'users.name as NOMBRE',\n 'users.PRIMER_APELLIDO',\n DB::raw(\"CASE WHEN users.SEGUNDO_APELLIDO IS NULL THEN '' ELSE users.SEGUNDO_APELLIDO END as SEGUNDO_APELLIDO\")\n )\n ->join('CATR_ASPIRANTE', 'CATR_ASPIRANTE.FK_PADRE', '=', 'users.PK_USUARIO')\n ->join('CATR_CARRERA', 'CATR_CARRERA.PK_CARRERA', '=', 'CATR_ASPIRANTE.FK_CARRERA_1')\n ->join('CATR_EXAMEN_ADMISION', 'CATR_EXAMEN_ADMISION.PK_EXAMEN_ADMISION', '=', 'CATR_ASPIRANTE.FK_EXAMEN_ADMISION')\n ->join('CAT_TURNO', 'CAT_TURNO.PK_TURNO', '=', 'CATR_EXAMEN_ADMISION.FK_TURNO')\n ->join('CATR_ESPACIO', 'CATR_ESPACIO.PK_ESPACIO', '=', 'CATR_EXAMEN_ADMISION.FK_ESPACIO')\n ->where([\n ['CATR_ESPACIO.PK_ESPACIO', '=', $request->PK_ESPACIO],\n ['CAT_TURNO.DIA', '=', $request->DIA],\n ['CAT_TURNO.HORA', '=', $request->HORA]\n ])\n ->get();\n\n return $aspirante;\n /* ->join('CATR_ASPIRANTE', 'CATR_ASPIRANTE.FK_PADRE', '=', 'users.PK_USUARIO')\n ->join('CATR_CARRERA', 'CATR_CARRERA.PK_CARRERA', '=', 'CATR_ASPIRANTE.FK_CARRERA_1')\n ->join('CATR_EXAMEN_ADMISION', 'CATR_EXAMEN_ADMISION.PK_EXAMEN_ADMISION', '=', 'CATR_ASPIRANTE.FK_EXAMEN_ADMISION')\n ->join('CAT_TURNO', 'CAT_TURNO.PK_TURNO', '=', 'CATR_EXAMEN_ADMISION.FK_TURNO')\n ->join('CATR_ESPACIO', 'CATR_ESPACIO.PK_ESPACIO', '=', 'CATR_EXAMEN_ADMISION.FK_ESPACIO')\n ->join('CATR_EDIFICIO', 'CATR_EDIFICIO.PK_EDIFICIO', '=', 'CATR_ESPACIO.FK_EDIFICIO')\n ->join('CAT_CAMPUS', 'CAT_CAMPUS.PK_CAMPUS', '=', 'CATR_EDIFICIO.FK_CAMPUS') */\n }", "title": "" }, { "docid": "84bd4ad8591cd6b526f063b320987df7", "score": "0.52175456", "text": "public function criarProcessPageFields($id_usuario = \"\", $id_tema_panteon = \"\", $permissao = \"\", $coletados = \"\")\n {\n //\n $db = new PontodeVistaDB($this->_context);\n $it = $db->obterTodos();\n\n while($it->hasNext())\n {\n $sr = $it->moveNext();\n\n $texto = substr($sr->getField(\"texto_ponto_de_vista\"), 0 , 196);\n $texto = strip_tags($texto);\n\n $arrayPontoDeVista[$sr->getField(\"id_ponto_de_vista\")] = $texto.\"<div id='aviso_texto_longo'>(Continua)</div>\";\n\n }\n\n //\n // Fim Obtencao de dados de Tabelas Auxiliares-Relacionadas\n\n // Inicio ProcessPageField\n $fieldList = new ProcessPageFields();\n\n // Inicio Campos da Entidade\n\n $field = ProcessPageFields::FactoryMinimal(\"id_ponto_de_vista\", \"Ponto de Vista\", 1, true, true);\n $field->editable = false;\n $field->editListFormatter = new PanteonEscolarPontoDeVistaFormatter($this->_context, \"view\");\n $fieldList->addProcessPageField($field);\n\n $field = ProcessPageFields::FactoryMinimal(\"id_ponto_de_vista\", \"Sujeito\", 32, true, true);\n $field->fieldXmlInput = XmlInputObjectType::TEXTBOX;\n $field->editListFormatter = new PanteonEscolarSujeitoDescByIDFormatter($this->_context);\n $fieldList->addProcessPageField($field);\n\n $field = ProcessPageFields::FactoryMinimal(\"id_ponto_de_vista\", \"Item de Análise\", 32, true, true);\n $field->fieldXmlInput = XmlInputObjectType::TEXTBOX;\n $field->editListFormatter = new PanteonEscolarItemAnaliseByIDFormatter($this->_context);\n $fieldList->addProcessPageField($field);\n\n $field = ProcessPageFields::FactoryMinimal(\"id_ponto_de_vista\", \"Situação-Problema\", 32, true, true);\n $field->fieldXmlInput = XmlInputObjectType::TEXTBOX;\n $field->editListFormatter = new PanteonEscolarSituacaoProblemaByIDFormatter($this->_context);\n $fieldList->addProcessPageField($field);\n\n if(($this->_context->ContextValue(\"acao\") == \"\") || ($this->_context->ContextValue(\"acao\") == \"move\"))\n {\n $field = ProcessPageFields::FactoryMinimal(\"id_\".$this->_nome_entidade, \"Comentário\", 1, true, true);\n $field->editListFormatter = new PanteonEscolarTextoFormatter($this->_context, \"view\",\"texto_usuario_x_ponto_de_vista\", $this->_nome_entidade);\n $fieldList->addProcessPageField($field);\n }\n\n else\n {\n $field = ProcessPageFields::FactoryMinimal(\"texto_usuario_x_ponto_de_vista\", \"Comentário\", 32, true, true);\n $field->fieldXmlInput = XmlInputObjectType::TEXTBOX;\n $fieldList->addProcessPageField($field);\n }\n\n if($coletados == 1)\n {\n $field = ProcessPageFields::FactoryMinimal(\"id_\".$this->_nome_entidade, \"Apagar?\", 1, true, true);\n }\n\n else\n {\n $field = ProcessPageFields::FactoryMinimal(\"id_\".$this->_nome_entidade, \"Restaurar?\", 1, true, true);\n }\n\n $field->editable = false;\n $field->editListFormatter = new PanteonEscolarPontoDeVistaFormatter($this->_context, \"delete\");\n $fieldList->addProcessPageField($field);\n\n $field = ProcessPageFields::FactoryMinimal(\"id_usuario\", \"Usuário\", 30, false, false);\n $field->fieldXmlInput = XmlInputObjectType::HIDDEN;\n $field->defaultValue = $id_usuario;\n $fieldList->addProcessPageField($field);\n\n $field = ProcessPageFields::FactoryMinimal(\"id_tema_panteon\", \"Tema Panteon\", 30, false, false);\n $field->fieldXmlInput = XmlInputObjectType::HIDDEN;\n $field->defaultValue = $id_tema_panteon;\n $fieldList->addProcessPageField($field);\n\n // ID da Entidade (Todos Possuem)\n $field = ProcessPageFields::FactoryMinimal(\"id_\".$this->_nome_entidade, \"\", 1, false, false);\n $field->editable = false;\n $field->key = true;\n $fieldList->addProcessPageField($field);\n\n // Fim dos Campos do ProcessPageFields\n\n $processpage = new PanteonEscolarMyProcess($this->_context,\n $fieldList,\n $this->_titulo_entidade,\n \"module:panteonescolar.\".$this->_nome_modulo.\"&amp;chamada=1\",\n NULL,\n $this->_nome_entidade,\n PanteonEscolarBaseDBAccess::DATABASE());\n\n\n if($permissao)\n {\n $processpage->setPermissions($permissao[0], $permissao[1], $permissao[2], $permissao[3]);\n }\n\n else\n {\n $processpage->setPermissions(false, false, false, false);\n }\n\n // Filtros\n $filtro = \"\";\n\n $texto_ponto_de_vista_filtro = $this->_context->ContextValue(\"texto_ponto_de_vista_filtro\");\n $id_item_analise = $this->_context->ContextValue(\"id_item_analise_filtro\");\n $id_situacao_problema = $this->_context->ContextValue(\"id_situacao_problema_filtro\");\n\n if($id_usuario != \"\")\n {\n $filtro .= \" id_usuario = \" . $id_usuario.\" \";\n }\n\n if($id_tema_panteon != \"\")\n {\n $filtro .= \" AND id_tema_panteon = \" . $id_tema_panteon .\" \";\n }\n\n if($coletados != \"\")\n {\n $filtro .= \" AND coletado_usuario_x_ponto_de_vista =\" . $coletados.\" \";\n }\n\n\n\n if($texto_ponto_de_vista_filtro != \"\")\n {\n $filtro .= \" AND \";\n $filtro .= \"texto_usuario_x_ponto_de_vista LIKE '%\" . $texto_ponto_de_vista_filtro.\"%'\";\n\n }\n\n if(($id_item_analise != \"\") && ($id_item_analise != \"All\"))\n {\n /*\n $dbPontoDeVista = new PontodeVistaDB($this->_context);\n $itPontoDeVista = $dbPontoDeVista->obterTodosOsPontosDeVistaPorIDItemAnalise($id_item_analise);\n\n $filtro .= \" ( \";\n while($itPontoDeVista->hasNext()) {\n $sr = $itPontoDeVista->moveNext();\n $id_ponto_de_vista_item_analise = $sr->getField('id_ponto_de_vista');\n $filtro .= \" id_ponto_de_vista = \" . $id_ponto_de_vista_item_analise;\n\n if($itPontoDeVista->hasNext()) $filtro .= \" AND \";\n\n }\n $filtro .= \" ) \";\n *\n */\n\n\n //$filtro .= \" AND \";\n //$filtro .= \" id_item_analise = \" . $id_item_analise;\n\n }\n\n if(($id_situacao_problema != \"\") && ($id_situacao_problema != \"All\"))\n {\n\n $filtro .= \" AND \";\n $filtro .= \" id_situacao_problema = \" . $id_situacao_problema;\n\n }\n\n if($filtro != \"\")\n {\n $processpage->setFilter($filtro);\n }\n\n return $processpage;\n\n }", "title": "" }, { "docid": "0b1a591b0b3e1c5730980e4f5dc21fcb", "score": "0.5210695", "text": "function listaEquipeCompleta() {\n $chaves[] = opVal(\"codProjeto\",$this->codProjeto);\n\n $lst = new RDLista(\"AMProjetoMatricula\", $chaves,'');\n\n $chaves = \" codUser='\".$this->codOwner.\"' \";\n if($lst->numRecs>0) {\n foreach ($lst->records as $matr) {\n $chaves.=\" OR codUser='\".$matr->codUser.\"' \";\n }\n }\n\n if(!empty($this->codOrientador)) {\n $chaves.=\" OR codUser='\".$this->codOrientador.\"' \";\n }\n\n $param = new RDParam();\n $tab = AMUser::getTables();\n $param->setCamposProjecao(array(\"$tab.codUser\",\"$tab.nomUser\",\"$tab.nomPessoa\"));\n $param->setSqlWhere($chaves);\n\n $lst = new RDLista(\"AMUser\", '','',$param);\n\n return ($lst);\n\n }", "title": "" }, { "docid": "b6db8a4dd06433d02f387f92c122516c", "score": "0.52095836", "text": "function listar($objeto){\n\t// Filtra por el ID de la receta si existe\n\t\t$condicion.=(!empty($objeto['id']))?' AND r.id='.$objeto['id']:'';\n\t// Filtra por los insumos preparados\n\t\t$condicion.=(!empty($objeto['insumos_preparados']))?' AND ids_insumos_preparados!=\\'\\'':'';\n\t// Filtra por tipo\n\t\t$condicion.=(!empty($objeto['tipo']))?' AND p.tipo_producto='.$objeto['tipo']:'';\n\t\t\n\t// Ordena la consulta si existe\n\t\t$condicion.=(!empty($objeto['orden']))?' ORDER BY '.$objeto['orden']:'';\n\t\t\n\t\tsession_start();\n\t\t$sucursal = \"\tSELECT \n\t\t\t\t\t\t\tmp.idSuc AS id \n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tadministracion_usuarios au \n\t\t\t\t\t\tINNER JOIN \n\t\t\t\t\t\t\t\tmrp_sucursal mp \n\t\t\t\t\t\t\tON \n\t\t\t\t\t\t\t\tmp.idSuc = au.idSuc \n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tau.idempleado = \" . $_SESSION['accelog_idempleado'] . \" \n\t\t\t\t\t\tLIMIT 1\";\n\t\t$sucursal = $this -> queryArray($sucursal);\n\t\t$sucursal = $sucursal['rows'][0]['id'];\n\t\n\t\t$sql = \"select * from app_producto_sucursal limit 1\";\n\t\t$total = $this -> queryArray($sql);\n\t\tif($total['total'] > 0){\n\t\t\t$sql = \"SELECT \n\t\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo, \n\t\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, \n\t\t\t\t\t\t(SELECT\n\t\t\t\t\t\t\tnombre\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto, \n\t\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos, \n\t\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo,\n\t\t\t\t\t\tr.proveedores_insumos\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_productos p\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\t\tON\t\n\t\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tr.id = p.id\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\t\tINNER JOIN app_producto_sucursal aps ON aps.id_producto = p.id AND aps.id_sucursal = \".$sucursal.\"\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.status = 1\".\n\t\t\t\t\t$condicion;\n\t\t} else {\n\t\t\t$sql = \"SELECT \n\t\t\t\t\t\tp.id AS idProducto, p.nombre, p.costo_servicio AS costo, \n\t\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad, \n\t\t\t\t\t\t(SELECT\n\t\t\t\t\t\t\tnombre\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad, u.factor, p.tipo_producto, \n\t\t\t\t\t\tr.ids_insumos_preparados AS insumos_preparados, r.ids_insumos AS insumos, \n\t\t\t\t\t\tr.preparacion, r.ganancia, ROUND(p.precio, 2) AS precio, p.codigo,\n\t\t\t\t\t\tr.proveedores_insumos\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_productos p\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tapp_campos_foodware f\n\t\t\t\t\t\tON\t\n\t\t\t\t\t\t\tp.id = f.id_producto\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tcom_recetas r\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tr.id = p.id\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tu.id = p.id_unidad_compra\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tp.status = 1\".\n\t\t\t\t\t$condicion;\n\t\t}\n\n\t\t//print_r($sql);\n\t\t //echo $sql;\n\t\t$result = $this->queryArray($sql);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c4ce5e55e1816ef0eb378405fdbaf15e", "score": "0.52089137", "text": "public function listaPerfiles($id_sistema){////\n parent::ConnectionOpen(\"sp_lista_perfil\",\"permisos\");\n parent::SetParameterSP(\"$1\",'%');\n parent::SetParameterSP(\"$2\",$id_sistema);\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n\t}", "title": "" }, { "docid": "4f060920177320cad84940760cae6fe1", "score": "0.5207243", "text": "function listarAlarmaCorrespondeciaPendiente(){\n\t\t$this->procedimiento='param.ft_alarma_sel';\n\t\t$this->transaccion='PM_ALARMCOR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\t\t\n\t\t\n\t\t//definicion de variables\n\t\t$this->tipo_conexion='seguridad';\n\t\t\n\t\t//$this->count=false;\t\n\t\t$this->arreglo=array(\"id_usuario\" =>1,\n\t\t\t\t\t\t\t \"tipo\"=>'TODOS');\n\t\t\t\t\t\t\t \n\t\t$this->setParametro('id_usuario','id_usuario','integer');\t\t\t\t \n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_alarma','int4');\n\t\t$this->captura('email_empresa','varchar');\n\t\t$this->captura('fecha','date');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('clase','varchar');\n\t\t$this->captura('titulo','varchar');\n\t\t$this->captura('obs','varchar');\n\t\t$this->captura('tipo','varchar');\n\t\t$this->captura('dias','integer');\n\t\t$this->captura('titulo_correo','varchar');\n\t\t$this->captura('acceso_directo','varchar');\n\t\t$this->captura('correos','text');\n\t\t$this->captura('documentos','text');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "6c53a6c436a5724b04caa65793f43f75", "score": "0.51994604", "text": "function listarActivosNoAsignados(){\n $this->procedimiento='kaf.ft_activo_fijo_sel';\n $this->transaccion='SKA_NO_ASIGNADO_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->captura('id_activo_fijo','int4');\n $this->captura('codigo','varchar');\n $this->captura('descripcion','varchar');\n $this->captura('denominacion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "6c954ba25e6c48ec2140d57aefc76e0a", "score": "0.5197697", "text": "function traer_modulo_rol_permisos($id_rol,$id_mod){\n // $rs=$this->fmt->query->consulta($sql,__METHOD__);\n // $num = $this->fmt->query->num_registros($rs);\n // if($num>0){\n // for($i=0;$i<$num;$i++){\n // list($fila_id, $fila_ver, $fila_activar, $fila_agregar, $fila_editar, $fila_eliminar)=$this->fmt->query->obt_fila($rs);\n // $aux[$fila_id][\"ver\"] = $fila_ver;\n // $aux[$fila_id][\"act\"] = $fila_activar;\n // $aux[$fila_id][\"agr\"] = $fila_agregar;\n // $aux[$fila_id][\"edt\"] = $fila_editar;\n // $aux[$fila_id][\"eli\"] = $fila_eliminar;\n // }\n // }\n //\n\n $sql=\"SELECT DISTINCT mod_rol_permisos FROM modulo_roles,rol WHERE mod_rol_rol_id='$id_rol' and mod_rol_mod_id = '$id_mod' \";\n $rs=$this->fmt->query->consulta($sql,__METHOD__);\n $num = $this->fmt->query->num_registros($rs);\n if($num>0){\n $fila_id=$this->fmt->query->obt_fila($rs);\n $aux = $fila_id[\"mod_rol_permisos\"];\n }\n return $aux;\n }", "title": "" }, { "docid": "d8c76e687d92a3e42ff2baa66bc0ee56", "score": "0.51856804", "text": "public function imprimir3director()\n {\n\n $query = Input::get('codigo');\n $idgrupo = Input::get('idgrupo');\n $motivo = Input::get('motivo');\n $gruposol = grupo_solicitud::findOrFail(Input::get('idsolicitud'));\n\n $numerosoli = 0;\n\n $forgs = grupo_solicitud::all()->sortBy('idgrupsol');\n $idgrupo = Input::get('idgrupo');\n $bandera = true;\n\n foreach ($forgs as $forgs) {\n if ($bandera == true && $forgs->idgrupo == $idgrupo && $forgs->idsolicitud == 3 && $forgs->condicion == true) {\n $numerosoli = $numerosoli + 1;\n\n if ($forgs->idgrupsol == Input::get('idsolicitud')) {\n $bandera = false;\n }\n }\n }\n\n if ($gruposol->estado == 4) {\n $gruposol->estado = 0;\n $gruposol->update();\n }\n\n $estudianteg = EstudianteGrupos::all();\n $estudiante = Estudiante::all();\n $asesores = GrupoDocente::all();\n $personas = Persona::all();\n $docentes = Docente::all();\n $tipotema = TipoTema::all();\n $user = User::all();\n $departamento = departamento::all();\n $grupo = Grupo::all();\n $enunciado = Enunciado::all();\n $gso = grupo_solicitud::all();\n $carrera = Carrera::all();\n $rol = Rol::all();\n $rol_carrera = Rol_carrera::all();\n $gs1 = grupo_solicitud::where('idgrupo', '=', $idgrupo)->where('nacuerdo', '!=', ' ')->orderBy('idgrupsol', 'desc')->first();\n\n\n $pdf = \\PDF::loadview('ues.solicitudes.prorrogajddirector', [\"codigo\" => $query, \"motivo\" => $motivo, \"numerosoli\" => $numerosoli], compact('departamento', 'rol', 'gso', 'carrera', 'rol_carrera', 'grupo', 'estudianteg', 'estudiante', 'tipotema', 'personas', 'asesores', 'docentes', 'user', 'gs1', 'enunciado'));\n return $pdf->download('Solicitud_Prorroga_JD_Director ' . $query . '.pdf');\n }", "title": "" }, { "docid": "1f4f9e63a36d6e8e1076a72263cf533e", "score": "0.5181312", "text": "private function reorganizaEstrutura() {\n\n $aGrade = array();\n\n $iPaginas = 1;\n $iColunasImpressas = 0;\n\n $lPossuiBaseDiversificada = $this->possuiBaseDiversificada();\n\n foreach ($this->aDadosOrganizados as $oEtapaCursada) {\n\n if ( count( $oEtapaCursada->aDisicplinasEtapa ) == 0 && !$this->lExibirTodasEtapasCurso ) {\n continue;\n }\n\n if ($iColunasImpressas == RelatorioHistoricoEscolarRetrato::NUMERO_ETAPAS_PAGINA) {\n\n $iColunasImpressas = 0;\n $iPaginas ++;\n }\n $iColunasImpressas ++;\n $oEtapaComum = new stdClass();\n $oEtapaComum->iEtapa = $oEtapaCursada->iEtapa;\n $oEtapaComum->sEtapa = $oEtapaCursada->sEtapa;\n $oEtapaComum->aDisciplinas = array();\n\n $oEtapaDiversificada = new stdClass();\n $oEtapaDiversificada->iEtapa = $oEtapaCursada->iEtapa;\n $oEtapaDiversificada->sEtapa = $oEtapaCursada->sEtapa;\n $oEtapaDiversificada->aDisciplinas = array();\n\n foreach ($oEtapaCursada->aDisicplinasEtapa as $oDisciplina ) {\n\n if ( $oDisciplina->lBaseComum ) {\n $oEtapaComum->aDisciplinas[$oDisciplina->iCadDisciplina] = $oDisciplina;\n } else {\n $oEtapaDiversificada->aDisciplinas[$oDisciplina->iCadDisciplina] = $oDisciplina;\n }\n }\n\n $aGrade[$iPaginas]['comum'][] = $oEtapaComum;\n\n if ( $lPossuiBaseDiversificada ) {\n $aGrade[$iPaginas]['diversificada'][] = $oEtapaDiversificada;\n }\n }\n\n /**\n * Adiciona a grade as etapas ainda não cursadas pelo aluno\n */\n if ( $this->lExibirTodasEtapasCurso ) {\n\n foreach ($this->aEtapasPosterior as $oEtapaPosterior ) {\n\n if ($iColunasImpressas == RelatorioHistoricoEscolarRetrato::NUMERO_ETAPAS_PAGINA) {\n\n $iColunasImpressas = 0;\n $iPaginas ++;\n }\n\n $iColunasImpressas ++;\n $aGrade[$iPaginas]['comum'][] = $oEtapaPosterior;\n\n if ( $lPossuiBaseDiversificada ) {\n $aGrade[$iPaginas]['diversificada'][] = $oEtapaPosterior;\n }\n }\n }\n\n return $aGrade;\n }", "title": "" }, { "docid": "aa428b69b536a36da8c3b813a6fc0626", "score": "0.5174947", "text": "public static function PagarItems($data,$codigo_usuario,$email)\n {\n\n $codigo_orden = Orden::select('ordenes.id')\n ->where('ordenes.user_id',$codigo_usuario)\n ->where('ordenes.nEstado_Orden',1)\n ->get();\n\n\n if (count($codigo_orden) == 1) {\n\n \n $total = 0;\n\n for ($i=0; $i < count($data['oferta_id']); $i++) { \n \n $subtotal = floatval($data['preciofilacarrito'][$i])*intval($data['cantidadfilacarrito'][$i]);\n $cantidad = intval($data['cantidadfilacarrito'][$i]);\n\n $codigo_oferta = intval($data['oferta_id'][$i]);\n\n $detalle_orden = array('fecha_atencion'=>date_create($data['fecha_atencion'][$i])->format('Y-m-d H:i:s'),\n 'cantidad' => $cantidad,\n 'subtotal' => $subtotal);\n\n //$oferta_detalle = new OfertaDetalle();\n // Evaluar si hay una oferta privada y cerrarla.\n\n Oferta::Actualiza_Estado_Oferta_Privada($codigo_oferta);\n\n // Actualizar Detalle de Orden\n\n OrdenDetalle::where('orden_id',$codigo_orden[0]->id)\n ->where('ofertas_id',$codigo_oferta)\n ->update($detalle_orden);\n\n\n $total = $total + $subtotal;\n \n $subtotal = null;\n $cantidad = null;\n $codigo_oferta = null;\n $detalle_orden = null;\n\n }\n\n // Actualiza total de oferta\n $cantidad_total = array('total' => $total);\n\n Orden::where('id',$codigo_orden[0]->id)\n ->update($cantidad_total);\n\n //Actualizando Carrito de Compra.\n $usuario = array('nTotalItemCarritoCompra' => 0);\n \n User::where('id',$codigo_usuario)\n ->update($usuario);\n\n $usuario = null;\n\n //Actualizando Orden.\n $valores = array('nEstado_Orden' => 2,'fecha_pago_orden' => date_create()->format('Y-m-d H:i:s')); \n \n Orden::where('id',$codigo_orden[0]->id)\n ->update($valores);\n \n $valores = null;\n\n }\n\n // Enviar Email\n\n $usuarios_emails = User::ListarEmailsOrden($codigo_orden[0]->id);\n\n\n foreach ($usuarios_emails as $valores) {\n \n if ($valores->tipo_usuario == 2) {\n //Usuario Miembro\n\n Mail::send('emails.ofertacompra', ['valores' => $valores], function ($message) use ($valores) {\n $message->from(Config('mail.from.address'), Config('mail.from.name')); \n $message->to($valores->email, $valores->prov_razon_social);\n \n $message->subject('Felicitaciones: Compra de Oferta');\n \n $message->priority(5);\n });\n \n\n } else {\n //Usuario Proveedor\n Mail::send('emails.ofertacompramiembro', ['valores' => $valores], function ($message) use ($valores) {\n $message->from(Config('mail.from.address'), Config('mail.from.name')); \n $message->to($valores->email, $valores->prov_razon_social);\n \n $message->subject('Felicitaciones: Realizaron una Compra de Oferta');\n \n $message->priority(5);\n });\n\n }\n \n\n\n }\n\n // Enviar Correos a Proveedores.\n\n return true;\n\n }", "title": "" }, { "docid": "dc036facf00c053cbd7638b34273bfc3", "score": "0.51676834", "text": "public function buscar(){\n require_once 'datos/datos.php';\n\n //traemos los valores del formulario\n $numero = $_POST['numero'];\n $especialidad = $_POST['especialidad'];\n\n //creamos un array vacio \n $especialistas =[];\n\n foreach($gente as $valor){\n if ($especialidad == $valor[1]){\n array_push($especialistas, $valor[0]);\n } //llenamos el array con la gente que cumple la condicion\n }\n\n //si hay gente suficiente entre tus especialistas , reordenamos el array y sacamos tantos como hemos pedido\n if(count($especialistas)>=$numero){\n \n shuffle($especialistas);\n\n $contador =1;\n\n foreach($especialistas as $lista){\n\n if($contador<=$numero){\n echo $lista.'<br>';\n }\n\n $contador= $contador +1; \n }\n\n //Si no hay gente suficiente sale este mensaje\n }else{\n echo 'No hay gente suficiente para formar este grupo';\n }\n\n}", "title": "" }, { "docid": "b29f07911c0ce52889c0ee16d5a440e0", "score": "0.51595384", "text": "function evt__formulario__aceptar ($datos){\n \n try{\n foreach($datos as $key=>$organizacion){\n $accion=$organizacion['apex_ei_analisis_fila'];\n switch($accion){\n case 'A' : $this->dep('datos')->tabla('organizacion')->resetear();\n //Si queremos dar de alta varios registros al mismo tiempo se supone que el objeto \n //datos_tabla esta vacio.\n $this->dep('datos')->tabla('organizacion')->nueva_fila($organizacion);\n $this->dep('datos')->tabla('organizacion')->sincronizar();\n $this->dep('datos')->tabla('organizacion')->resetear();\n break;\n\n case 'M' : $organizacion_cargada=$this->dep('datos')->tabla('organizacion')->get();\n \n //Despues de presionar el boton 'Editar' del cuadro 'organizaciones existentes' \n //el datos_tabla queda cargado con la informacion que podemos editar desde el \n //form_ml.\n //Ahora vamos a modificar el registro referenciado por el cursor del datos_tabla.\n $this->dep('datos')->tabla('organizacion')->set($organizacion);\n $this->dep('datos')->tabla('organizacion')->sincronizar();\n $this->dep('datos')->tabla('organizacion')->resetear();\n break;\n\n case 'B' : $organizacion_cargada=$this->dep('datos')->tabla('organizacion')->get();\n \n //Despues de presionar el boton 'Editar' del cuadro 'organizaciones existentes' \n //el datos_tabla queda cargado con la informacion que podemos eliminar desde el \n //form_ml.\n //Ahora vamos a eliminar el registro referenciado por el cursos del datos_tabla.\n $this->dep('datos')->tabla('organizacion')->eliminar_todo();\n $this->dep('datos')->tabla('organizacion')->sincronizar();\n $this->dep('datos')->tabla('organizacion')->resetear();\n break;\n }\n }\n }catch(toba_error $ex){\n //Capturamos la excepcion generada por el objeto datos_tabla.\n }\n }", "title": "" }, { "docid": "eea848eac72c3cd51cd619c986306b64", "score": "0.5158916", "text": "public function crearPreguntas(){\n \n $cuantasPreguntas = $this->getGrupo()->getNumeroPreguntas();\n $disponibles = $this->getGrupo()->getPreguntas()->count();\n\n if($cuantasPreguntas == $disponibles){\n for($numero = 0; $numero<=$disponibles-1; $numero++){\n $preg = $this->getGrupo()->getPreguntas()->get($numero);\n $pe = new PreguntaPeriodo();\n $pe->setGrupo($this);\n $pe->setPregunta($preg);\n $this->addPreguntaPeriodo($pe);\n }\n }\n else{\n $posiciones = Utilerias::selecionarAleatorio($cuantasPreguntas, $disponibles);\n \n for($numero = 0; $numero<=$disponibles-1; $numero++){\n if($posiciones[$numero] == 1){\n $preg = $this->getGrupo()->getPreguntas()->get($numero);\n $pe = new PreguntaPeriodo();\n $pe->setGrupo($this);\n $pe->setPregunta($preg);\n $this->addPreguntaPeriodo($pe);\n }\n }\n\n } \n }", "title": "" }, { "docid": "7277092e57e16bc5c05f187bd28a5b4d", "score": "0.5158689", "text": "function carga(\r\n\t\t$Fechas,\r\n\t\t$Puesto,\r\n\t\t$Id_Cliente,\r\n\t\t$Trabajo,\r\n\t\t$Fecha_Entr = true,\r\n\t\t$Condic_Grupo = false,\r\n\t\t$Condic_Proceso = '',\r\n\t\t$Id_material = '',\r\n\t\t$Id_Grupo = 0,\r\n\t\t$Pais_C = ''\r\n\t)\r\n\t{\r\n\t\t\r\n\t\t//echo '<br />\"'.$Condic_Proceso.'\"<br />';\r\n\t\t//Los datos se almacenaran en esta variable\r\n\t\t$Carga = array(\r\n\t\t\t'imagenes' => array(),\r\n\t\t\t'trabajos' => array(),\r\n\t\t\t'ruta' => array(),\r\n\t\t\t//'enlaces' => array(),\r\n\t\t\t'Fechas' => array(),\r\n\t\t\t'material' => ''\r\n\t\t);\r\n\t\t\r\n\t\t\r\n\t\t//Condiciones segun los datos del formulario\r\n\t\t$Condic_Peus = '';\r\n\t\t$Tiempo = '';\r\n\t\t\r\n\t\t\r\n\t\tif('todos' != $Puesto)\r\n\t\t{\r\n\t\t\tif('finalizado' != $Trabajo)\r\n\t\t\t{\r\n\t\t\t\t$Condic_Peus = '\r\n\t\t\t\t\tand peus.id_usuario = \"'.$Puesto.'\"\r\n\t\t\t\t\tand estado != \"Terminado\"\tand estado != \"Agregado\"\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$Condic_Peus = '\r\n\t\t\t\t\tand peus.id_usuario = \"'.$Puesto.'\"\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$Tiempo = ' and petie.id_usuario = \"'.$Puesto.'\"';\r\n\t\t}\r\n\t\t\r\n\t\t$Condiciones = array();\r\n\t\t\r\n\t\tif('todos' != $Id_Cliente)\r\n\t\t{\r\n\t\t\t/*\r\n\t\t\tif($Id_Cliente == 'Flexo')\r\n\t\t\t{\r\n\t\t\t\t$Condiciones[] = ' and proc.proceso like \"F%\" ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t*/\r\n\t\t\t\t$Condiciones[] = ' and proc.id_cliente = \"'.$Id_Cliente.'\"';\r\n\t\t\t//}\r\n\t\t}\r\n\t\t\r\n\t\tif('' != $Condic_Proceso)\r\n\t\t{\r\n\t\t\t$Condiciones[] = ' and proceso = \"'.$Condic_Proceso.'\"';\r\n\t\t}\r\n\t\t\r\n\t\t$Condicion_Pais = '';\r\n\t\tif('' != $Pais_C)\r\n\t\t{\r\n\t\t\t$Condicion_Pais = ' and clie.pais = \"'.$Pais_C.'\"';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Se buscan los trabajos que tienen fecha de entrega establecida y conincidan\r\n\t\t//con el rango especifico\r\n\t\t\r\n\t\t$Fecha_Inicio = $Fechas['anho1'].'-'.$Fechas['mes1'].'-'.$Fechas['dia1'];\r\n\t\t$Fecha_Fin = $Fechas['anho2'].'-'.$Fechas['mes2'].'-'.$Fechas['dia2'];\r\n\t\t\r\n\t\tif('finalizado' != $Trabajo)\r\n\t\t{\r\n\t\t\tif($Fecha_Entr)\r\n\t\t\t{\r\n\t\t\t\t$Condicion_Fecha = '\r\n\t\t\t\t\tand fecha_entrega >= \"'.$Fecha_Inicio.'\"\r\n\t\t\t\t\tand fecha_entrega <= \"'.$Fecha_Fin.'\"\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//Se buscan los preingresos de los vendedores que no tienen su fecha de\r\n\t\t\t\t//entrega definida\r\n\t\t\t\t$Condicion_Fecha = '\r\n\t\t\t\t\tand fecha_entrega = \"0000-00-00\"\r\n\t\t\t\t';\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$Condicion_Fecha = '\r\n\t\t\t\tand fecha_reale >= \"'.$Fecha_Inicio.'\"\r\n\t\t\t\tand fecha_reale <= \"'.$Fecha_Fin.'\"\r\n\t\t\t';\r\n\t\t}\r\n\t\t\r\n\t\tif('finalizado' == $Trabajo)\r\n\t\t{\r\n\t\t\tif('todos' == $Puesto)\r\n\t\t\t{\r\n\t\t\t\t$Condiciones[] = ' and fecha_reale != \"0000-00-00\"';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$Condicion_Fecha = '\r\n\t\t\t\tand estado=\"Terminado\"\r\n\t\t\t\tand fecha_fin >= \"'.$Fecha_Inicio.' 00:00:00\"\r\n\t\t\t\tand fecha_fin <= \"'.$Fecha_Fin.' 23:59:59\"';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif('incompleto' == $Trabajo)\r\n\t\t{\r\n\t\t\t$Condiciones[] = ' and fecha_reale = \"0000-00-00\"';\r\n\t\t}\r\n\t\tif('atrasado' == $Trabajo)\r\n\t\t{\r\n\t\t\t$Condiciones[] = '\r\n\t\t\t\tand fecha_entrega < \"'.date('Y-m-d').'\"\r\n\t\t\t\tand fecha_reale = \"0000-00-00\"\r\n\t\t\t';\r\n\t\t}\r\n\t\tif('reproceso' == $Trabajo)\r\n\t\t{\r\n\t\t\t//Alguien puede ayudarme a cambiar esto para que no deba poner directamente el ID\r\n\t\t\t$Condiciones[] = ' and id_tipo_trabajo = 4';\r\n\t\t}\r\n\t\t\r\n\t\t$Material = '';\r\n\t\t$FROM = '';\r\n\t\t$Condicion = '';\r\n\t\t$Fotopolimero = '';\r\n\t\tif('' != $Id_material && 'Plani' != $this->session->userdata('codigo'))\r\n\t\t{\r\n\t\t\tif(8 == $Id_material)\r\n\t\t\t{\r\n\t\t\t\t$Fotopolimero = ' or matsoli.id_material_solicitado = \"12\"';\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$Material = 'and (matsoli.id_material_solicitado = \"'.$Id_material.'\"'.$Fotopolimero.')';\r\n\t\t\t$FROM = ' ,especificacion_matsolgru matsol, material_solicitado_grupo matgru, material_solicitado matsoli';\r\n\t\t\t$Condicion = ' and matsol.id_material_solicitado_grupo = matgru.id_material_solicitado_grupo\r\n\t\t\t\tand ped.id_pedido = matsol.id_pedido\r\n\t\t\t\tand matgru.id_material_solicitado = matsoli.id_material_solicitado\r\n\t\t\t\t';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Consulta de los trabajos\r\n\t\t$Consulta = '\r\n\t\t\tselect distinct\r\n\t\t\t\tcodigo_cliente as codcl, proceso as proce,\r\n\t\t\t\tpeus.id_peus, proc.nombre as prod, ped.id_pedido,\r\n\t\t\t\tfecha_entrada as entra, peus.tiempo_asignado,\r\n\t\t\t\tfecha_entrega as entre, fecha_reale as reale,\r\n\t\t\t\tid_tipo_trabajo as tipo, peus.id_usuario, proc.id_proceso\r\n\t\t\tfrom\r\n\t\t\t\tcliente clie, procesos proc, pedido ped, pedido_usuario peus\r\n\t\t\t\t'.$FROM.'\r\n\t\t\twhere\r\n\t\t\t\tclie.id_cliente = proc.id_cliente and proc.id_proceso = ped.id_proceso\r\n\t\t\tand ped.id_pedido = peus.id_pedido\r\n\t\t\t'.implode('', $Condiciones).''.$Condic_Peus.''.$Condicion_Fecha.'\r\n\t\t\tand clie.id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t'.$Material.$Condicion.''.$Condicion_Pais.'\r\n\t\t\torder by ped_prioridad asc, fecha_entrega asc, ped.id_pedido asc\r\n\t\t';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\tforeach($Resultado->result_array() as $Fila)\r\n\t\t\t{\r\n\t\t\t\t$Carga['trabajos'][$Fila['id_pedido']] = $Fila;\r\n\t\t\t\t\r\n\t\t\t\t$Consulta2 = '\r\n\t\t\t\t\tselect ima.url, proc.id_proceso, ima.nombre_adjunto\r\n\t\t\t\t\tfrom procesos proc, proceso_imagenes ima\r\n\t\t\t\t\twhere proc.id_proceso = ima.id_proceso\r\n\t\t\t\t\tand proc.id_proceso = \"'.$Fila['id_proceso'].'\"\r\n\t\t\t\t\torder by ima.id_proceso_imagenes asc\r\n\t\t\t\t';\r\n\t\t\t\r\n\t\t\t\t//echo '<br />'.$Consulta2.'<br />';\r\n\t\t\t\t$Resultado2 = $this->db->query($Consulta2);\r\n\t\t\t\t\r\n\t\t\t\tif(0 < $Resultado2->num_rows())\r\n\t\t\t\t{\r\n\t\t\t\t\t//print_r($Resultado2->result_array());\r\n\t\t\t\t\tforeach($Resultado2->result_array() as $Fila2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$Carga['trabajos'][$Fila['id_pedido']]['url'] = $Fila2['url'];\r\n\t\t\t\t\t\t$Carga['trabajos'][$Fila['id_pedido']]['nombre_adjunto'] = $Fila2['nombre_adjunto'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$Carga['trabajos'][$Fila['id_pedido']]['url'] = '';\r\n\t\t\t\t\t$Carga['trabajos'][$Fila['id_pedido']]['nombre_adjunto'] = '';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\t//Subconsulta las rutas de trabajo\r\n\t\t$Consulta = '\r\n\t\t\tselect distinct ped.id_pedido\r\n\t\t\tfrom cliente clie, procesos proc, pedido ped, pedido_usuario peus\r\n\t\t\twhere clie.id_cliente = proc.id_cliente and proc.id_proceso = ped.id_proceso\r\n\t\t\tand ped.id_pedido = peus.id_pedido\r\n\t\t\t'.implode('', $Condiciones).''.$Condic_Peus.''.$Condicion_Fecha.'\r\n\t\t\tand id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\torder by fecha_entrega asc, ped.id_pedido asc\r\n\t\t';\r\n\t\t\r\n\t\t\r\n\t\t//Rutas de trabajo\r\n\t\t$Consulta = '\r\n\t\t\tselect ped.id_pedido, id_peus, iniciales, estado, usuario,\r\n\t\t\tfecha_fin\r\n\t\t\tfrom procesos proc, pedido ped, pedido_usuario peus, usuario usu,\r\n\t\t\tdepartamentos dpto\r\n\t\t\twhere proc.id_proceso = ped.id_proceso and ped.id_pedido = peus.id_pedido\r\n\t\t\tand peus.id_usuario = usu.id_usuario and usu.id_dpto = dpto.id_dpto\r\n\t\t\t'.implode('', $Condiciones).'\r\n\t\t\tand ped.id_pedido in ('.$Consulta.')'.$Condicion_Fecha.'\r\n\t\t\tand id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\torder by fecha_entrega asc, ped.id_pedido asc, id_peus asc\r\n\t\t';\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\tforeach($Resultado->result_array() as $Fila)\r\n\t\t\t{\r\n\t\t\t\t$Carga['ruta'][$Fila['id_pedido']][$Fila['id_peus']]['est'] = $Fila['estado'];\r\n\t\t\t\t$Carga['ruta'][$Fila['id_pedido']][$Fila['id_peus']]['usu'] = $Fila['usuario'];\r\n\t\t\t\t$Carga['ruta'][$Fila['id_pedido']][$Fila['id_peus']]['ini'] = $Fila['iniciales'];\r\n\t\t\t\t$Carga['ruta'][$Fila['id_pedido']][$Fila['id_peus']]['fin'] = $Fila['fecha_fin'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Extraer el tiempo de cada usuario.\r\n\t\tif('finalizado' != $Trabajo and 'todos' != $Puesto)\r\n\t\t{\r\n\t\t\t$Consulta2 = '\r\n\t\t\t\tselect distinct ped.id_pedido, peus.id_peus\r\n\t\t\t\tfrom cliente clie, procesos proc, pedido ped, pedido_usuario peus\r\n\t\t\t\twhere clie.id_cliente = proc.id_cliente and proc.id_proceso = ped.id_proceso\r\n\t\t\t\tand ped.id_pedido = peus.id_pedido\r\n\t\t\t\t'.implode('', $Condiciones).''.$Condic_Peus.''.$Condicion_Fecha.'\r\n\t\t\t\tand id_grupo = \"'.$this->session->userdata('id_grupo').'\"\r\n\t\t\t\torder by fecha_entrega asc, ped.id_pedido asc\r\n\t\t\t';\r\n\t\t\t\r\n\t\t\t$Resultado = $this->db->query($Consulta2);\r\n\t\t\tif(0 < $Resultado->num_rows())\r\n\t\t\t{\r\n\t\t\t\tforeach($Resultado->result_array() as $Datos)\r\n\t\t\t\t{\r\n\t\t\t\t\t$id_pedido = $Datos['id_pedido'];\r\n\t\t\t\t\t$Consulta_tiempo = 'select sum(petie.tiempo) as tiempo_usuario,\r\n\t\t\t\t\t\t\t\t\t\tpeus.id_peus, petie.id_pedido\r\n\t\t\t\t\t\t\t\t\t\tfrom pedido_tiempos petie, pedido_usuario peus, pedido ped\r\n\t\t\t\t\t\t\t\t\t\twhere peus.id_pedido = '.$id_pedido.'\r\n\t\t\t\t\t\t\t\t\t\tand ped.id_pedido = peus.id_pedido\r\n\t\t\t\t\t\t\t\t\t\tand ped.id_pedido = petie.id_pedido\r\n\t\t\t\t\t\t\t\t\t\t'.$Condic_Peus.''.$Tiempo;\r\n\t\t\t\t\t////echo $Consulta_tiempo.'<br>';\r\n\t\t\t\t\t$Resultado = $this->db->query($Consulta_tiempo);\r\n\t\t\t\t\tif(0 < $Resultado->num_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach($Resultado->result_array() as $Datos_tiempo)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($Datos_tiempo['tiempo_usuario'] >= 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$Carga['tiempo'][$id_pedido][$Datos_tiempo['id_peus']]['tiempo'] = $Datos_tiempo['tiempo_usuario'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$Carga['tiempo'][$id_pedido][$Datos_tiempo['id_peus']]['tiempo'] = 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Consulta_tiempo2 = 'select petie.inicio, peus.id_peus\r\n\t\t\t\t\t\t\t\t\t\tfrom pedido_tiempos petie, pedido_usuario peus, pedido ped\r\n\t\t\t\t\t\t\t\t\t\twhere peus.id_pedido = \"'.$id_pedido.'\"\r\n\t\t\t\t\t\t\t\t\t\tand petie.id_pedido = \"'.$id_pedido.'\"\r\n\t\t\t\t\t\t\t\t\t\tand ped.id_pedido = peus.id_pedido\r\n\t\t\t\t\t\t\t\t\t\tand ped.id_pedido = petie.id_pedido\r\n\t\t\t\t\t\t\t\t\t\tand petie.fin = \"0000-00-00 00:00:00\"\r\n\t\t\t\t\t\t\t\t\t\t'.$Condic_Peus.''.$Tiempo;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$Resultado = $this->db->query($Consulta_tiempo2);\r\n\t\t\t\t\tif(0 < $Resultado->num_rows())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach($Resultado->result_array() as $Datos_inicio)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($Datos_inicio['inicio'] != '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$Carga['tiempo'][$id_pedido][$Datos_inicio['id_peus']]['inicio'] = $Datos_inicio['inicio'];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$Carga['tiempo'][$id_pedido][$Datos_inicio['id_peus']]['inicio'] = ' ';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $Carga;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "32230e989507cdee2e78e11abff5c40b", "score": "0.51583457", "text": "public function ordenes_planta(){\n\n $GLOBALS['mensaje'] = \"\";\n\n $m = new Modelo_consultas(Config::$mvc_bd_nombre, Config::$mvc_bd_usuario,\n Config::$mvc_bd_clave, Config::$mvc_bd_hostname);\n\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $dataNew = array();\n $data = $m->buscarOrdenesSistemaCampus(\"3\", \"2\");\n\n foreach ($data as $clave => $valor) {\n $temp1 = $valor['descripcion1'];\n $temp2 = $valor['descripcion2'];\n $temp3 = $valor['descripcion3'];\n $novedad1 = $m->getNombreNovedad($temp1);\n $novedad2 = $m->getNombreNovedad($temp2);\n $novedad3 = $m->getNombreNovedad($temp3);\n foreach ($novedad1 as $a => $b) {\n $novedad1 = $b['novedad'];\n }foreach ($novedad2 as $c => $d) {\n $novedad2 = $d['novedad'];\n }foreach ($novedad3 as $e => $f) {\n $novedad3 = $f['novedad'];\n }\n $arrayAux = array(\n 'numero_solicitud' => $valor['numero_solicitud'],\n 'usuario' => $valor['usuario'],\n 'cod_sede' => $valor['cod_sede'],\n 'codigo_campus' => $valor['codigo_campus'],\n 'codigo_edificio' => $valor['codigo_edificio'],\n 'piso' => $valor['piso'],\n 'espacio' => $valor['espacio'],\n 'cantidad1' => $valor['cantidad1'],\n 'descripcion1' => $novedad1,\n 'descripcion_novedad' => $valor['descripcion_novedad'],\n 'cantidad2' => $valor['cantidad2'],\n 'descripcion2' => $novedad2,\n 'descripcion_novedad2' => $valor['descripcion_novedad2'],\n 'cantidad3' => $valor['cantidad3'],\n 'descripcion3' => $novedad3,\n 'descripcion_novedad3' => $valor['descripcion_novedad3'],\n 'contacto' => $valor['contacto'],\n 'estado' => $valor['estado'],\n 'descripcion' => $valor['descripcion'],\n 'fecha' => $valor['fecha'],\n 'impreso' => $valor['impreso'],\n 'operario' => $valor['operario'],\n );\n array_push($dataNew, $arrayAux);\n\n }\n }\n\n $dataNew['mensaje'] = $GLOBALS['mensaje'];\n\n echo json_encode($dataNew);\n\n }", "title": "" }, { "docid": "172b50a50f6dced12fd29bd23ea21735", "score": "0.5135379", "text": "private function proximosCursosGeneral($alumno_id, $aprobados, $reprob, $grupo) {\n $proximos = array ();\n if ($grupo->grado < 6) { //Si el grupo es menor a 6\n if (count($reprob) < 3) { //Si las reprobadas es menor a 3 avanza al siguiente grado\n $grupo_siguiente = new Grupos();\n $grupo_siguiente = $grupo_siguiente->find_first(\"ciclos_id='\" .\n $this->SIGUIENTE->id . \"' AND\n grado='\" . ($grupo->grado + 1) . \"' AND\n letra='\" . $grupo->letra . \"' AND\n turno='\" . $grupo->turno . \"' AND oferta_id=\" . $grupo->oferta_id);\n\n //$grupos[$grupo_siguiente->grado][$grupo_siguiente->letra]=$grupo_siguiente;\n $cc = $grupo_siguiente->cursos();\n\n $cursos = array ();\n foreach ($cc as $c) {\n $cursos[$c->materia_id] = $c;\n }\n\n $materias = new Materias();\n $materias = $materias->find(\"semestre='\" . ($grupo->grado + 1) . \"'\");\n foreach ($materias as $m) {\n if ( ( $m->semestre<5 && ($m->tipo == \"OBL\" || $m->tipo == \"TLR\"))\n ||\n ($m->semestre>4 && $m->tipo == \"OBL\" )\n ) {\n if (array_key_exists($m->id, $cursos)) {\n\n //$agrega = true;\n //$pre = $m->prerrequisitosasociativo();\n // foreach ($pre as $pr_id => $pr) { //reviso si no se reprobo un prerrequisito\n\n // if (array_key_exists($pr_id, $reprob)) { //si el prerrequisito se encuentra en las reprobadas no se puede agregar a los proxmos\n // $agrega = false;\n // break;\n // }\n // }\n\n // if ($agrega) //Sino hace falta ningun prerrequisito se agrega\n $proximos[$m->id] = $cursos[$m->id];\n }\n\n }\n }\n //Revisando los siguientes cursos de las aprobadas , si es prerrequisito de algun curso este se agrega al arreglo de los proximos\n $llavesaprobadas=array_keys($aprobados);\n $llavesreprobadas=array_keys($reprob);\n foreach ($aprobados as $ap) {\n $materia = $ap->materia();\n if (($materia->tipo == \"OBL\" || $materia->tipo == \"TLR\") && $materia->semestre < 6) { //Si es de tipo obligatoria o taller y no es de 6 se revisa\n $pre = $materia->prerrequisitodemateriasasociativo(); //obtengo las materias de las cuales la materia es prerrequisito\n foreach ($pre as $pr_id => $pr) {\n $mt=new Materias();\n $mt=$mt->find($pr_id);\n if (($grupo->grado+1)==$mt->semestre && !array_key_exists($pr_id, $proximos) && ( !in_array($pr_id,$llavesaprobadas) && !in_array($pr_id,$llavesreprobadas) )) { //la materia no se encuentra en los proximos,se buscara curso de la materia para agregar a los proximos\n $materiapre = new Materias();\n $materiapre = $materiapre->find($pr_id);\n if ($materiapre->tipo == \"OBL\" || $materiapre->tipo == \"TLR\") {\n $grupomateria = $ap->grupo(); //grupo de la materia aprobada\n $grupocurso = new Grupos();\n $grupocurso = $grupocurso->find_first(\"ciclos_id='\" .\n $this->SIGUIENTE->id . \"' AND\n grado='\" . $materiapre->semestre . \"' AND\n letra='\" . $grupomateria->letra . \"' AND\n turno='\" . $grupomateria->turno . \"' AND oferta_id=\" . $grupomateria->oferta_id);\n if ($grupocurso->id != \"\") {\n $cc1 = $grupocurso->cursos();\n\n foreach ($cc1 as $c1) {\n if ($materiapre->id == $c1->materia_id) {\n $proximos[$materiapre->id] = $c1; //se agrega el curso para la materia\n break;\n }\n }\n\n }\n }\n }\n }\n }\n\n }\n }\n } //Obtengo todos los cursos del siguiente grado, ahora a revisar las reprobadas\n\n\n\n $grupos = array ();\n $cursosGrupo = array ();\n foreach ($reprob as $k => $reprobado) { //por cada reprobada se buscara un curso donde inscibir al alumno\n $g = $reprobado->grupo();\n $grupo_siguiente = $grupos[$g->grado][$g->letra][$g->turno]; //buscamos si el grupo ya esta en memoria\n if ($grupo_siguiente == null) { //sino lo sacamos\n $turno = '';\n\n if ($g->oferta_id == $this->BACHILLERATOGENERAL) {\n $turno = $g->turno;\n } else {\n if ($g->turno == 'M') {\n $turno = 'V';\n } else {\n $turno = 'M';\n }\n\n }\n $grupo_siguiente = new Grupos();\n $grupo_siguiente = $grupo_siguiente->find_first(\"ciclos_id='\" .\n $this->SIGUIENTE->id . \"' AND\n grado='\" . ($g->grado) . \"' AND\n letra='\" . $g->letra . \"' AND\n turno='\" . $turno . \"' AND oferta_id=\" . $g->oferta_id);\n\n $grupos[$grupo_siguiente->grado][$grupo_siguiente->letra][$grupo_siguiente->turno] = $grupo_siguiente;\n\n }\n\n $materia=$reprobado->materia();\n\n if($g->grado>4 && $materia->tipo!=\"OBL\"){ //Si es optativa,taller o programa de 5 o 6 se tiene que buscar el curso\n $encontrada=false;\n if ($grupo_siguiente->id != '') {\n $cursos = $cursosGrupo[$grupo_siguiente->grado][$grupo_siguiente->letra][$grupo_siguiente->turno];\n if ($cursos == null) { //reviso si los cursos del grupo ya estan memoria\n $cc = $grupo_siguiente->cursos();\n\n $cursos = array ();\n\n foreach ($cc as $c) {\n $cursos[$c->materia_id] = $c;\n }\n\n $cursosGrupo[$grupo_siguiente->grado][$grupo_siguiente->letra][$grupo_siguiente->turno] = $cursos;\n }\n\n if (array_key_exists($reprobado->materia_id, $cursos)) { //obtengo el curso a repetir de los cursos del grupo\n $proximos[$reprobado->materia_id] = $cursos[$reprobado->materia_id]; //se agrega a los proximos\n unset ($reprob[$k]); //lo elimino del arreglo de los reprobados\n $encontrada=true;\n }\n }\n\n if(!$encontrada){//No se oferto en el mismo grupo buscarla en los demas\n $cursos=new Cursos();\n $cursos=$cursos->find_all_by_sql(\n \"SELECT cursos.*\n FROM\n `cursos`\n INNER JOIN grupos ON cursos.grupos_id=grupos.id\n WHERE grupos.ciclos_id='\".$this->SIGUIENTE->id.\"' AND materias_id='\".$materia->id.\"' AND grupos.turno='\".$g->turno.\"';\"\n );\n if(is_array($cursos) && count($cursos)>0){\n $curso=$cursos[0];\n if($curso->id!=''){\n $encontrada=true;\n $curso->materia_id=$curso->materias_id;\n $curso->materia=$materia->nombre;\n $proximos[$reprobado->materia_id] = $curso; //se agrega a los proximos\n unset ($reprob[$k]); //lo elimino del arreglo de los reprobados\n }\n }\n\n\n }\n\n\n\n }else{\n\n if ($grupo_siguiente->id != '') {\n $cursos = $cursosGrupo[$grupo_siguiente->grado][$grupo_siguiente->letra][$grupo_siguiente->turno];\n if ($cursos == null) { //reviso si los cursos del grupo ya estan memoria\n $cc = $grupo_siguiente->cursos();\n\n $cursos = array ();\n\n foreach ($cc as $c) {\n $cursos[$c->materia_id] = $c;\n }\n\n $cursosGrupo[$grupo_siguiente->grado][$grupo_siguiente->letra][$grupo_siguiente->turno] = $cursos;\n }\n\n if (array_key_exists($reprobado->materia_id, $cursos)) { //obtengo el curso a repetir de los cursos del grupo\n $proximos[$reprobado->materia_id] = $cursos[$reprobado->materia_id]; //se agrega a los proximos\n unset ($reprob[$k]); //lo elimino del arreglo de los reprobados\n }else{//como no existe el curso se crea\n $profesor=new Profesores();\n $profesor=$profesor->staff();\n $curso = new Cursos();\n $curso->estado_id='1';\n $curso->grupos_id=$grupo_siguiente->id;\n $curso->materias_id=$reprobado->materia_id;\n $curso->profesores_id=$profesor->id;\n $curso->observaciones='El avance de ciclo agrego el curso por que este no se estaba ofertando.';\n $curso->inicio='0000-00-00';\n\n if($curso->save()){\n $curso->materia=$curso->verMateriaNombre();\n $curso->materia_id=$reprobado->materia_id;\n $myLog = new Logger('GruposCierre.log');\n $myLog->log(\"Curso creado por necesidad: \".$curso->verGrupo().' '.$curso->verMateriaNombre());\n $myLog->close();\n $proximos[$reprobado->materia_id] = $curso; //se agrega a los proximos\n unset ($reprob[$k]); //lo elimino del arreglo de los reprobados\n }else{\n $myLog = new Logger('GruposCierre.log');\n $myLog->log(\"ERROR Curso creado por necesidad: \".$curso->verGrupo().' '.$curso->verMateriaNombre());\n $myLog->close();\n\n }\n }\n }\n }\n\n } //Todos los cursos a cursar uncluidos aquellos a repetir\n\n /***********\n if(count($reprob)<3){\n $grupo_siguiente=new Grupos();\n $grupo_siguiente=$grupo_siguiente->find_first(\n \"ciclos_id='\".$this->SIGUIENTE->id.\"' AND\n grado='\".($grupo->grado+1).\"' AND\n letra='\".$grupo->letra.\"' AND\n turno='\".$grupo->turno.\"' AND oferta_id=\".$grupo->oferta_id\n );\n\n\n $cc=$grupo_siguiente->cursos();\n\n $cursos=array();\n foreach($cc as $c){\n $cursos[$c->materia_id]=$c;\n }\n\n $materias=new Materias();\n $materias=$materias->find(\"semestre='\".($grupo->grado+1).\"'\");\n foreach($materias as $m){\n if($m->tipo==\"OBL\" || $m->tipo==\"TLR\"){\n if(array_key_exists($m->id,$cursos)){\n $proximos[]=$cursos[$m->id];\n }\n\n }\n }\n\n\n }\n\n $grupo_siguiente=new Grupos();\n $grupo_siguiente=$grupo_siguiente->find_first(\n \"ciclos_id='\".$this->SIGUIENTE->id.\"' AND\n grado='\".$grupo->grado.\"' AND\n letra='\".$grupo->letra.\"' AND\n turno='\".$grupo->turno.\"' AND oferta_id=\".$grupo->oferta_id\n );\n $cc=$grupo_siguiente->cursos();\n\n $cursos=array();\n foreach($cc as $c){\n $cursos[$c->materia_id]=$c;\n }\n\n foreach($reprob as $k=>$reprobado){\n if(array_key_exists($reprobado->materia_id,$cursos)){\n $proximos[]=$cursos[$reprobado->materia_id];\n unset($reprob[$k]);\n }\n }\n\n\n foreach($reprob as $reprobado){\n $curso=$this->buscaCurso($reprobado->materia_id,$grupo);\n if($curso->id==''){\n //Posible error\n }else{\n $proximos[]=$curso;\n }\n }\n\n\n *****************/\n\n //revisar que no se encuentre algun curso que no cumpla con los prerrequisitos\n //$materias = array_keys($proximos);\n //$prerrequisistos = array ();\n //foreach ($proximos as $proximo) {\n // $materia = $proximo->materia();\n // $pre = $materia->prerrequisitosasociativo();\n // $prerrequisistos[$materia->id] = $pre;\n //}\n\n //foreach ($proximos as $llave => $proximo) {\n // foreach ($prerrequisistos as $mat => $pre) {\n // if (array_key_exists($llave, $pre)) {\n // unset ($proximos[$mat]);\n // }\n // }\n //}\n\n $myLog = new Logger('GruposCierre.log');\n $myLog->log(\"PROXIMOS: \".$alumno_id.' '.count($proximos));\n $myLog->close();\n return $proximos;\n\n }", "title": "" }, { "docid": "1835ef9fe154b0a227bc8405dfa562ab", "score": "0.51335907", "text": "public function executeImprimirplanillaexamensinparcial($request, $alumnos)\n {\n\t$oComision = Doctrine_Core::getTable('Comisiones')->find($request->getParameter(\"idcomision\"));\n\t$oCatedra = $oComision->getCatedras();\n\t$oMateriaPlan = $oCatedra->getMateriasPlanes();\n\t$oPlanEstudio = $oMateriaPlan->getPlanesEstudios();\n\t$oCarrera = $oPlanEstudio->getCarreras();\n\t$oFacultad = $oCarrera->getFacultades();\t \t\n\t$oEstadoMateria = Doctrine_Core::getTable('EstadosMateria')->find(1);\n\t$idsede = sfContext::getInstance()->getUser()->getAttribute('id_sede',''); \n\t$bucles = 5;\n\t\n\t// Crea una instancia de la clase de PDF\n\t$pdf = new PlanillaSinParcial();\n\n\t// Asigna el titulo de la planilla\n\t$titulo= \"PLANILLA DE EXAMEN PARCIAL\";\n\t// Agrega la Cabecera al documento\n\t$pdf->Cabecera($oFacultad, $oCarrera, $titulo);\n\t// Agrega el esquema grafico de la planilla\n\t$pdf->EsquemaPlanillaSinParcial1eraHoja($bucles);\n\t$pdf->SetFont('Times','',9);\n\t$pdf->SetXY(11,41);\n\t$pdf->MultiCell(65,3, $oCatedra->getIdmateriaplan().\" - \".$oCatedra->getMateriasPlanes(),0,'C',0);\n\t// Muestra el Curso y la Comisión\n\t$pdf->SetFont('Times','',10);\n\t$pdf->SetXY(11,50);\n\t$pdf->Cell(65,5,\"CURSO: \".$oMateriaPlan->getAnodecursada(),0,1,'L');\n\t$pdf->SetXY(11,54);\n\t$pdf->Cell(65,5,\"COMISIÓN: \".$oComision->getNombre(),0,1,'L');\n\t$pdf->SetXY(11,58);\n\t$pdf->Cell(65,5,\"HS. SEMANALES: \".$oCatedra->getMateriasPlanes()->getCargahorariasemanal(),0,1,'L');\n\t/////////////////////////////////////////////////////////////////////////\n\t// CUERPO PAGINA\n\t/////////////////////////////////////////////////////////////////////////\t\t\n\t// Muestra la lista de Alumnos\n\t$total = count($alumnos);\n\t$y = 66;\n\t$contador = 1;\n\t// Valor de la altura de comienzo de página a partir de la segunda página\n\t$aux =5;\n\tforeach($alumnos as $alumno) {\n\t\t$pdf->SetLineWidth(0);\n\t\t$pdf->SetFont('Times','',9);\n\t\t$pdf->SetXY(11,$y);\n\t\t$pdf->Cell(7,7,$contador,0,1,'C');\n\t\t$pdf->SetXY(18,$y);\n\t\t$nombre = $alumno->getPersonas();\n\t\tif(strlen($nombre) < 30) {\n\t\t\t$pdf->Cell(62,7,$nombre,0,1,'L');\n\t\t}else{\n\t\t\t$pdf->Cell(62,7,substr($nombre,0, 29),0,1,'L');\n\t\t}\t\n\t\t$y = $y + 7;\n\t\t$pdf->Line(10,$y,200,$y);\n\t\t\n\t\tif($pdf->PageNo()>1){\n\t\t\t// Asigna el ancho a la linea\n\t\t\t$pdf->SetLineWidth(0);\n\t\n\t\t\t// Linea vertical que separa el Nro de renglon y el Nombre\n\t\t\t$pdf->Line(17,$aux,17,$y);\n\t\t\t// Lineas verticales que marca las columnas de la planilla\n\t\t\t$pdf->Line(160,$aux,160,$y);\n\t\t\t$pdf->Line(180,$aux,180,$y);\n\t\t}\n\t\t// Pasos a seguir si tiene que continuar en otra pagina\n\t\tif ($y > 280){\n\t\t\t// Agrega el Pie al Documento\n\t\t\t$pdf->Pie($idsede,1);\n\t\t\t// Agrega el Esquema Grafico de la segunda pagina\n\t\t\t$pdf->EsquemaPlanillaSinParcial2daHoja($aux);\t\t\t\t\n\t\t\t// Reinicia el valor para la nueva página\n\t\t\t$y=9;\n\t\t}\n\t\t$contador++;\n\t}\n\t/////////////////////////////////////////////////////////////////////////\n\t// PIE PAGINA\n\t/////////////////////////////////////////////////////////////////////////\n\t// Agrega el Pie al Documento\n\t$pdf->Pie($idsede,1);\n\t// Guarda o envía el documento pdf\n\t$pdf->Output('planilla-examen-parcial.pdf','I');\n\t// Termina el documento\n\t$pdf->Close();\n \t// Para el proceso de symfony\n \tthrow new sfStopException(); \n }", "title": "" }, { "docid": "fbcab904dced57d91efe9ca7ac709b93", "score": "0.513155", "text": "public static function listar($categorias, $idiomasAudio, $puntuacion, $bloqueados=FALSE) {\n $resultado=FALSE;\n $user=comprobarLogin();\n if(!$user) $user=new User(0, '', '', '', '');\n if(!$bloqueados) $bloqueados='and bloqueado=0';\n else $bloqueados='';\n //Concatenamos las categorías\n $idCat='and idCategoria in (';\n foreach($categorias as $categoria) {\n if($categoria->getIdCategoria() == 0) {\n //Una categoría cualquiera\n $idCat = '';\n break;\n }\n $idCat.=intval($categoria->getIdCategoria()).', ';\n }\n if($idCat) $idCat=substr($idCat, 0, -2).')';\n //Ahora los idiomaAudio\n if($idiomasAudio)\n $idIdiomaAudio='and idIdiomaAudio in (';\n else\n $idIdiomaAudio = '';\n foreach($idiomasAudio as $idiomaAudio) {\n if($idiomaAudio->getIdIdiomaAudio() == 0) {\n //Está seleccionada la opción cualquiera\n $idIdiomaAudio='';\n break;\n }\n\n $idIdiomaAudio.=intval($idiomaAudio->getIdIdiomaAudio()).', ';\n }\n if($idIdiomaAudio) $idIdiomaAudio=substr($idIdiomaAudio, 0, -2).')';\n \n try {\n $db=new DB();\n $datos=$db->obtainData(\"select * from at_audio where (marca=0 or (marca=1 and idUser={$user->getIdUser()})) $idCat $idIdiomaAudio $bloqueados\");\n if($datos['rows'] > 0) {\n //Obtenemos las categorías y los idiomasAudio\n $categoriasOrdenadas=Categoria::listar(TRUE);\n $categoriasOrdenadas=$categoriasOrdenadas['categorias'];\n $idiomasAudioOrdenados=IdiomaAudio::listar(TRUE);\n $idiomasAudioOrdenados=$idiomasAudioOrdenados['idiomasAudio'];\n //Preparamos las consulta para la puntuación y las descargas\n $BDPreparadaP=Puntuacion::cargarPreparada();\n $BDPreparadaD=Audio::cargarPreparadaDescargas();\n \n foreach($datos['data'] as $data)\n //Tenemos los audios\n $resultado[]=new Audio($data['idAudio'], $categoriasOrdenadas[$data['idCategoria']], \n $data['idUser'], $data['archivo'], $idiomasAudioOrdenados[$data['idIdiomaAudio']], \n $data['latitud'], $data['longitud'], $data['bloqueado'], \n Puntuacion::ejecutarPreparada($BDPreparadaP, $data['idAudio']), $data['marca'], \n $data['descripcion'], Audio::ejecutarPreparadaDescargas($BDPreparadaD, $data['idAudio']), \n $data['idArea']);\n }\n }\n catch(Exception $ex) { }\n \n return $resultado;\n }", "title": "" }, { "docid": "f829c47b33dbb977da47b1bf105a7990", "score": "0.5126364", "text": "public function listaItems(){\n\t\t$query = 'SELECT GRAL_PAR_PRO_ID, GRAL_PAR_PRO_GRP, GRAL_PAR_PRO_COD, GRAL_PAR_PRO_SIGLA, GRAL_PAR_PRO_DESC\n\t\t\tFROM gral_param_propios \n\t\t\tWHERE GRAL_PAR_PRO_GRP=\"1600\" AND GRAL_PAR_PRO_COD<>\"0\" ORDER BY GRAL_PAR_PRO_COD';\n\t\treturn $this->mysql->query($query);\n\t}", "title": "" }, { "docid": "15952a737d0cf6bcf46a91152ad954fb", "score": "0.5125678", "text": "public function getAutoresGrupo($codgrupo) {\r\n $sql = \"SELECT t1.*, t3.titulo, t4.nome_completo, t4.cpf, t4.data_nascimento, t4.data_falecimento, t5.*, t6.* FROM Usuarios AS t1 INNER JOIN Grupo_Integrantes AS t2 ON (t1.cod_usuario=t2.cod_autor) INNER JOIN Urls AS t3 ON (t1.cod_usuario=t3.cod_item) INNER JOIN Autores AS t4 ON (t1.cod_usuario=t4.cod_usuario) LEFT JOIN Estados AS t5 ON (t1.cod_estado=t5.cod_estado) LEFT JOIN Cidades AS t6 ON (t1.cod_cidade=t6.cod_cidade) WHERE t2.cod_grupo='$codgrupo' AND t3.tipo='2' AND t3.cod_sistema='\".ConfigVO::getCodSistema().\"'\";\r\n $lista = array();\r\n $query = $this->banco->executaQuery($sql);\r\n while ($row = $this->banco->fetchArray($query))\r\n \t\t$lista[] = $row;\r\n return $lista;\r\n }", "title": "" }, { "docid": "3da826a9abdaf74a718b6c37c4b6bda9", "score": "0.5125304", "text": "function anunciosCriados() {\n if ($_SESSION['logado']) {\n $id = $_SESSION['id'];\n $ctrlUsuario = ControllerUsuario::getInstancia();\n $anuncios = $ctrlUsuario->buscarAnuncio($id);\n if ($anuncios == null) {\n echo '</br><strong>Você não possui nenhum anúncio criado!</strong>';\n }\n $quant = 0;\n foreach ($anuncios as $anuncio) {\n if ($quant < 2) {\n echo'\n <div class=\"row\">\n <div class=\"col-xs-5 col-md-3\">\n <a href=\"#\" class=\"thumbnail\">\n <img src=\"../../Upload/' . $anuncio->caminhoImagem . '\" alt=\"' . $anuncio->titulo . '\">\n </a>\n </div>\n <span class=\"col-xs-3 col-md-3\">' . $anuncio->titulo . '</span>\n </div>\n </div>';\n $quant = $quant + 1;\n } else {\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "eec2cb69eab9fcb59a20ba0e8295d975", "score": "0.5123359", "text": "public function showP(Request $request)\n { \n $pregunta = Puestosorganigrama::query()->delete();\n $idpue=$request->pue;\n $puesto=Puesto::find($idpue);\n $iduni=$puesto->unidad_id;\n $puestos = Puesto::where('unidad_id','>=',$iduni)\n ->get();\n //dd($puestos);\n //hacer carga de puestos aux\n \n $vacio=1;\n $organ = Puestosorganigrama::create([\n 'nombre' => \"-\", \n 'id_puesto' => $vacio, \n 'iddependencia' => $vacio, \n 'unidad_id' => $vacio,\n 'op_codigo' => $vacio,\n 'nivel_id' => $vacio,\n 'empleado' => $vacio\n ]);\n\n foreach ($puestos as $pue){\n $iddep=$pue->iddependencia;\n //dd($pue->unidad_id);\n $unidad=$pue->unidad_id;\n\n $puestodep=Puesto::find($iddep);\n \n $idunidep=$puestodep->unidad_id;\n //dd($idunidep);\n\n if($idunidep>=$iduni || $pue->id==$idpue){\n $idinsertado=$iddep;\n //iddep es 26\n \n //dd($pue->nombre);buscar vacios\n $i=$unidad-1;\n $uni=$i.\"\"; \n $e=\"1\";\n $u=\"0\";\n\n if($i == $idunidep || $i > $iduni){\n $idinsertado=Puestosorganigrama::buscarDep($idinsertado);\n // dd(\"entt\"); \n }\n\n if($i > $idunidep){\n // dd(\"entro2\");\n $organ = Puestosorganigrama::create([\n 'nombre' => \"-\", \n 'id_puesto' => $e, \n 'iddependencia' => $idinsertado, \n 'unidad_id' => $u,\n 'op_codigo' => $e,\n 'nivel_id' => $e,\n 'empleado' => $e\n ]);\n $i=$i-1;\n \n $idinsertado=$organ->id;\n }\n\n while ( $i > $idunidep) {\n //dd(\"entro2\");\n //dd($uni);\n $organ = Puestosorganigrama::create([\n 'nombre' => \"-\", \n 'id_puesto' => $e, \n 'iddependencia' => $idinsertado, \n 'unidad_id' => $u,\n 'op_codigo' => $e,\n 'nivel_id' => $e,\n 'empleado' => $e\n ]);\n $i=$i-1;\n \n $idinsertado=$organ->id;\n //dd($iddep);\n }\n $organ = Puestosorganigrama::create([\n 'nombre' => $pue->nombre, \n 'id_puesto' => $pue->id, \n 'iddependencia' => $idinsertado, \n 'unidad_id' => $pue->unidad_id,\n 'nivel_id' => $pue->nivel_id,\n 'op_codigo' => $pue->op_codigo,\n 'empleado' => $pue->empleado\n ]);\n $idinsertado=$organ->id;\n }\n }\n\n\n $puestosorg = Puestosorganigrama::all();\n //dd($puestosorg);\n $puestosorg = Puestosorganigrama::join('nivel', 'nivel.id', '=', 'puestosorganigrama.nivel_id')\n ->join('unidad', 'unidad.id', '=', 'puestosorganigrama.unidad_id') \n ->select('puestosorganigrama.*','nivel.nombre as nivel_name','unidad.nombre as unidad_name') \n ->get();\n\n return view('organigrama.verP',compact('puestosorg'));\n }", "title": "" }, { "docid": "bc1eec27aa7cd9ac46b654020522c345", "score": "0.51183224", "text": "public function ModificarIngreso($params, $practicas){\n if (is_array($params))\n {\n //modifico el ingreso del paciente - sin modificar id paciente \n $updateStatement = $this->update(array('Cama' => $params[1],\n 'SinCargo' => $params[2],\n 'RealizaDescuentos' => $params[3],\n 'ReajustaImporte' => $params[4],\n 'AbonoSena' => $params[5],\n 'Comentarios' => $params[6],\n 'ModificadoPor' => $params[7],\n 'ModificadoFecha' => date('Y-m-d H:i:s')))\n ->table('Ingresos ing')\n ->where('ing.Id', '=', $params[0]);\n\n $modifId = $updateStatement->execute();\n\n //ingresos practica existentes antes de la modificacion\n $selectStatement = $this->select(array('ingp.Id'))\n ->from('IngresosPracticas ingp')\n ->where('ingp.IngresoId', '=', $params[0])\n ->where('ingp.EstaBorrado', '=', (int) 0);\n $stmt = $selectStatement->execute();\n $ingresosexistentes = $stmt->fetchAll();\n \n if ($practicas !== null) //existen practicas para modificar o crear\n {\n for ($i = 0; $i < count($practicas); $i++) //recorro practicas a agregar\n {\n $selectStatement = $this->select(array('ingp.Id', 'ingp.IngresoId', 'ingp.NomencladorId'))\n ->from('IngresosPracticas ingp')\n ->where('ingp.Id', '=', $practicas[$i][0])\n ->where('ingp.EstaBorrado', '=', (int) 0);\n $stmt = $selectStatement->execute();\n $ingresoP = $stmt->fetchAll();\n\n if ($ingresoP) //el ingresopractica que se buscó ya existe -> averiguar que operacion hacer\n {\n if ($ingresoP[0]['NomencladorId'] !== $practicas[$i][1])\n {\n //el ingresopractica existente tiene una practica distinta -> modifica\n $updateStatement = $this->update(array('NomencladorId' => $practicas[$i][1],\n 'ModificadoPor' => $params[7],\n 'ModificadoFecha' => date('Y-m-d H:i:s')))\n ->table('IngresosPracticas')\n ->where('Id', '=', $practicas[$i][0]);\n $modifIP = $updateStatement->execute();\n }\n }\n else //el ingresopractica que se buscó no existe -> se inserta\n {\n $insertStatement = $this->insert(array('IngresoId', 'NomencladorId', 'CreadoPor', 'CreadoFecha'))\n ->into('IngresosPracticas')\n ->values(array($params[0],\n $practicas[$i][1],\n $params[7],\n date('Y-m-d H:i:s')));\n $insertId = $insertStatement->execute();\n }\n }\n //formo un array con los Id de los ingresos nuevos\n $ingresosnuevos = array();\n for ($i = 0; $i < count($practicas); $i++) \n { \n array_push($ingresosnuevos, $practicas[$i][0]);\n }\n\n //cicla entre los ingresos existentes previos a la modificacion\n for ($i = 0; $i < count($ingresosexistentes); $i++) \n { //pregunta si el ingreso previo existe en los nuevos, sino existe lo borra\n if (!in_array($ingresosexistentes[$i]['Id'], $ingresosnuevos)) \n {\n $updateStatement = $this->update(array('EstaBorrado' => (int) 1,\n 'ModificadoPor' => $params[7],\n 'ModificadoFecha' => date('Y-m-d H:i:s')))\n ->table('IngresosPracticas')\n ->where('Id', '=', $ingresosexistentes[$i]['Id']);\n $modifIP = $updateStatement->execute();\n }\n }\n }\n else //no existen practicas para modificar o crear -> se borraron todas en la modificacion\n { \n $updateStatement = $this->update(array('EstaBorrado' => (int) 1,\n 'ModificadoPor' => $params[7],\n 'ModificadoFecha' => date('Y-m-d H:i:s')))\n ->table('IngresosPracticas')\n ->where('IngresoId', '=', $params[0]);\n $modifIP = $updateStatement->execute();\n }\n\n if ($modifId)\n {\n return $modifId;\n }\n else\n {\n return FALSE;\n }\n }\n }", "title": "" }, { "docid": "3d19f215fe2433899e785c533d774532", "score": "0.51165295", "text": "public function perfilAction()\n {\n //Variable de SESION\n/* $user = $this->get('security.context')->getToken()->getUser();\n if(!($user->getEsAlumno())){\n $profesor=$user->getProfesor();\n echo \"Estas como\".$profesor->getNombre();\n \n $profesor_id=$profesor->getId();\n }\n \n $session = $this->get('request')->getSession();\n $session->set(\"profesor_id\",$profesor_id);\n $repository= $this->getDoctrine()->getRepository(\"NetpublicCoreBundle:Dimension\");\n $dim_grupo_padre=$repository->findBy(array('es_ano_escolar'=>1));\n $carga_academica=$this->getDoctrine()\n ->getRepository(\"NetpublicCoreBundle:CargaAcademica\")\n ->findBy(array(\"profesor\"=>$profesor_id));\n $grupo=$carga_academica[0]->getGrupo();\n $asignatura=$carga_academica[0]->getAsignatura();\n \n return array(\n \"dimension_defecto\"=>$dim_grupo_padre[0],\n \"grupo_defecto\"=>$grupo,\n \"asignatura_defecto\"=>$asignatura\n );*/\n return new \\Symfony\\Component\\HttpFoundation\\Response(\"OK\");\n }", "title": "" }, { "docid": "b31c737f9dbe87189edcc5252577e9ee", "score": "0.51097417", "text": "public function tutores(Request $request){\n try{\n $tiposProg = TipoUsuario::where('id_programa',$request->id_programa)->get();\n $idFacu = Programa::where('nombre',$request->nomFacu)->first()->id_programa;\n $tiposFacu = TipoUsuario::where('id_programa',$idFacu)->get();\n $tiposGen = TipoUsuario::where('id_programa',1)->get();\n\n $tiposTotal = array();\n foreach ($tiposProg as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n foreach ($tiposFacu as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n foreach ($tiposGen as $item) {\n $perm = $item->permisos;\n foreach ($perm as $permiso) {\n if($permiso['id_permiso']==21){\n array_push($tiposTotal,$item);\n break;\n }\n }\n }\n\n $tutores = UsuarioxPrograma::\n selectRaw(\"*\")\n ->join('usuario','usuario.id_usuario','=','usuario_x_programa.id_usuario')\n ->where('id_programa',$request->id_programa)\n ->where('usuario.nombre','ILIKE','%'.$request->nombre.'%');\n\n $tutores = $tutores->where(function($query) use ($tiposTotal) {\n for ($i = 0; $i <= count($tiposTotal)-1; $i++) {\n if($i==0) $query->where('id_tipo_usuario',$tiposTotal[$i]['id_tipo_usuario']);\n else $query->orWhere('id_tipo_usuario',$tiposTotal[$i]['id_tipo_usuario']);\n }\n });\n\n $tutores = $tutores->paginate(10);\n\n foreach ($tutores as $tutor) {\n $tutor->usuario;\n $tutor['usuario']->tipoTutorias;\n }\n\n $datosFinal=[\n 'paginate' => [\n 'total' => $tutores->total(),\n 'current_page' => $tutores->currentPage(),\n 'per_page' => $tutores->perPage(),\n 'last_page' => $tutores->lastPage(),\n 'from' => $tutores->firstItem(),\n 'to' => $tutores->lastPage(),\n ],\n 'tasks'=> $tutores\n ];\n return response()->json($datosFinal);\n }catch(Exception $e) {\n echo 'Excepción capturada: ', $e->getMessage(), \"\\n\";\n }\n }", "title": "" }, { "docid": "815f5aea9282a3a7824d7f9ae598ddc1", "score": "0.5105647", "text": "function buscarPerguntas() {\n $data_atual = date('Y-m-d');\n //buscar o curso pelo ra\n $sql = \"SELECT idcurso FROM `aluno` WHERE ra = '\" . $_SESSION['ra'] . \"'\";\n $stmt = mysqli_prepare($this->linkDB->con, $sql);\n if (!$stmt) {\n die(\"Falha no comando SQL: buscarPerguntas() buscar Curso\");\n }\n $stmt->execute();\n $result = $stmt->get_result();\n $row = $result->fetch_assoc();\n $curso = $row[\"idcurso\"];\n\n //busca as perguntas do curso\n $sql = \"SELECT id FROM `pergunta` WHERE idCurso = '\" . $curso . \"' and dataInicial <= '\" . $data_atual . \"' and dataFinal >= '\" . $data_atual . \"'\";\n $stmt = mysqli_prepare($this->linkDB->con, $sql);\n if (!$stmt) {\n die(\"Falha no comando SQL: busca das perguntas \" . $data_atual);\n }\n $stmt->execute();\n $result = $stmt->get_result();\n $saida = \"\";\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $saida .= $row[\"id\"] . \";\";\n }\n } else {\n header('location:fim.php');\n }\n $pergunta = explode(\";\", $saida);\n unset($pergunta[sizeof($pergunta) - 1]);\n $pergunta = array_values($pergunta);\n $this->conferirJafeito($pergunta);\n }", "title": "" }, { "docid": "00ebe08917e262c0c1b2994b2cef6a06", "score": "0.5103066", "text": "public function SaveGrupos()\n {\n try {\n $datos = json_decode(file_get_contents(\"php://input\"), true);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $dbm->getConnection()->beginTransaction();\n $hydrator = new ArrayHydrator($dbm->getEntityManager());\n foreach ($datos as $grupo) {\n $existe = $dbm->BuscarGrupos([\"cicloid\" => $grupo[\"cicloid\"], \"nivelid\" => $grupo[\"nivelid\"], \"gradoid\" => $grupo[\"gradoid\"], \"nombre\" => $grupo[\"nombre\"]]);\n if ($existe) {\n return new View(\"Ya existe un grupo con el mismo nombre en el mismo grado y ciclo.\", Response::HTTP_PARTIAL_CONTENT);\n }\n $grupo[\"tipogrupoid\"] = 1;\n $Grupo = $hydrator->hydrate(new CeGrupo(), $grupo);\n\n $dbm->saveRepositorio($Grupo);\n }\n $dbm->getConnection()->commit();\n return new View(\"Se han guardado los registros.\", Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "38908439588f49263b2384c30562e42c", "score": "0.51020247", "text": "public function listaTargetAction()\n\t{\n\t\t$u = $this->getUser();\n\t\t$role=$u->getRole();\n\t\tif($role == 'ROLE_SUPERUSER')\n\t\t{\n\t\t\t$grupo=$_REQUEST['id'];\n\t\t\t$ipGrupos = $this->ipGrupos($grupo);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$grupo=$u->getGrupo();\n\t\t\t$ipGrupos = $this->ipGrupos($grupo);\n\t\t}\n\t\tif(isset($_POST['solicitar']))\n\t\t{\n\t\t\t#$u = $this->getUser();\n\t\t\tif($u != null)\n\t\t\t{\n\t\t #$role=$u->getRole();\n\t\t #$grupo=$u->getGrupo();\n\t\t $ubicacion = $_REQUEST['ubicacion'];\n\t\t if($role == \"ROLE_SUPERUSER\")\n\t\t {\n\t\t \t#$id=$_REQUEST['id'];\n\t\t\t\t\t$target = $this->recuperarTodoTargetGrupo($grupo, $ubicacion);\n\t\t\t\t\treturn $this->render('@Principal/target/listaTarget.html.twig', array(\n\t\t\t\t\t\t\"target\"=>$target\n\t\t\t\t\t));\n\t\t }\n\t\t if($role == \"ROLE_ADMINISTRATOR\")\n\t\t {\n\t\t \t$target = $this->recuperarTodoTargetGrupo($grupo, $ubicacion);\n\t\t\t\t\treturn $this->render('@Principal/target/listaTarget.html.twig', array(\n\t\t\t\t\t\t\"target\"=>$target\n\t\t\t\t\t));\n\t\t }\n\t\t if($role == \"ROLE_USER\")\n\t\t {\n\t\t \t$target = $this->recuperarTodoTargetGrupo($grupo, $ubicacion);\n\t\t\t\t\treturn $this->render('@Principal/target/listaTarget.html.twig', array(\n\t\t\t\t\t\t\"target\"=>$target\n\t\t\t\t\t));\n\t\t }\n\t\t }\n\t\t}\n\t\treturn $this->render('@Principal/plantillas/solicitudGrupo.html.twig', array(\n\t\t\t'ipGrupos'=>$ipGrupos\n\t\t));\n\t}", "title": "" }, { "docid": "10b4dc03997c318de588f9547f7e973f", "score": "0.509736", "text": "function presentarCreditosRegistradosPlan() {\r\n $mensajeEncabezado='CRÉDITOS APROBADOS POR VICERRECTORIA';\r\n $mensaje='Los cr&eacute;ditos aprobados por vicerrector&iacute;a, corresponden a la suma de cr&eacute;ditos de los espacios acad&eacute;micos<br>\r\n registrados por el coordinador y aprobados por vicerrector&iacute;a, para el plan de estudios.';\r\n $creditosAprobados=array(array('OB'=>$this->creditosOB,\r\n 'OC'=>$this->creditosOC,\r\n 'EI'=>$this->creditosEI,\r\n 'EE'=>$this->creditosEE,\r\n 'CP'=>$this->creditosCP,\r\n 'TOTAL'=>$this->creditosTotal,\r\n 'ENCABEZADO'=>$mensajeEncabezado,\r\n 'MENSAJE'=>$mensaje,\r\n 'PROPEDEUTICO'=>$this->datosPlan[0]['PLAN_PROPEDEUTICO']));\r\n $this->parametrosPlan->mostrarParametrosRegistradosPlan($creditosAprobados);\r\n $mensajeEncabezado='RANGOS DE CR&Eacute;DITOS INGRESADOS POR EL COORDINADOR *';\r\n $mensaje='*Los rangos de cr&eacute;ditos, corresponden a los datos que el Coordinador registr&oacute; como par&aacute;metros iniciales<br>\r\n del plan de estudio, seg&uacute;n lo establecido en el art&iacute;culo 12 del acuerdo 009 de 2006.';\r\n $parametrosAprobados=array(array('ENCABEZADO'=>$mensajeEncabezado,\r\n 'MENSAJE'=>$mensaje,\r\n 'PROPEDEUTICO'=>$this->datosPlan[0]['PLAN_PROPEDEUTICO']));\r\n $this->parametrosPlan->mostrarParametrosAprobadosPlan($this->datosPlan[0]['COD_PLAN_ESTUDIO'],$parametrosAprobados);\r\n }", "title": "" }, { "docid": "89cf4bb482cb6c5e7620d37c64301c78", "score": "0.5096", "text": "public function spHabFormDePerfil($idsistema,$idperfil,$idformulario,$estado){////\n if($estado==1){//Está habilitado -> deseo deshabilitarlo\n parent::ConnectionOpen(\"sp_elimina_perfil_formulario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idperfil);\n parent::SetParameterSP(\"$3\",$idformulario);\n }\n else{//Está deshabilitado -> deseo habilitarlo\n parent::ConnectionOpen(\"sp_inserta_perfil_formulario\",\"permisos\");\n parent::SetParameterSP(\"$1\",$idsistema);\n parent::SetParameterSP(\"$2\",$idperfil);\n parent::SetParameterSP(\"$3\",$idformulario);\n parent::SetParameterSP(\"$4\",1);\n }\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n }", "title": "" }, { "docid": "51e1af586982c4de6dcde06798888b75", "score": "0.5094267", "text": "function getEtapasProcesoAgrupacionDetalles($con, $idagrupacion)\n{\n $wherePost = \"\";\n if ($idagrupacion != null) {\n $wherePost = \" AND proceso_pertenece = $idagrupacion\";\n }\n $sql = \"SELECT idproceso_entregable, nombre_proceso, descripcion, peso_total_proceso, estado_etapa, proceso_pertenece as proceso_agrupacion\n\tFROM public.proceso_entregable\n WHERE 1 = 1\n $wherePost\n ORDER BY 1 DESC\";\n return executeQuery($con, $sql);\n}", "title": "" }, { "docid": "7c2c64b32d07f5cd1c116abfb0ec421b", "score": "0.5092923", "text": "public function actionConfigPlantilla($titulo,$regn)\n\t{\n\t\t$rq = Yii::$app->request;\n\t\t$regn = Yii::$app->funcion->descifrar($regn,date('d'));\n\n\t\t$listaCapitulos = Listacapitulos::find()->asArray()->all();\n\t\t$listaItems = [];\n\n\t\tif ($rq->post('escogeItems') !== null) {\n\t\t\t$listaItems = Itemsgraficos::find()->select('regn,titulo')->where('titulo LIKE :titulo', [':titulo' => '%'.$rq->post('listaItems').'%'])->asArray()->all();\n\t\t}\n\t\t//\t\t$listaItems = Itemsgraficos::find()->asArray()->all();\n\t\t$contenidoPlantilla = Plantillas::traerCapitulosItems($regn);\n\n\t\t$itemsPlantilla = []; // Columna número 1 (Soltar aquí) Capítulos e items\n\t\t$liscapitulos = []; // Columna número 2 de capitulos disponibles\n\t\t$items = []; // Columna número 3 de items dispobibles\n\n\t\tforeach ($listaCapitulos as $key=>$value) $liscapitulos[$value['regn'].'-0'] = ['content' => $value['nombrecapitulo']];\n\n\t\tforeach ($listaItems as $key=>$value) $items['I-'.$value['regn']] = ['content' => $value['titulo']];\n\n\t\t// llena datos en la primera columna (Capítulos e items)\n\t\t$nomcap = '';\n\t\tforeach ($contenidoPlantilla as $key=>$value) {\n\t\t\tif ($nomcap <> $value['nombrecapitulo']) { // Es capitulo\n\t\t\t\t$nomcap = $value['nombrecapitulo'];\n\t\t\t\t$contenido = '<div class=\"alert-warning\"><strong>'.$value['nombrecapitulo'].'</strong></div>';\n\t\t\t\t$registro = $value['reglistacap'];\n\t\t\t\t$regItem = 0;\n\t\t\t\t$liscapitulos[$registro.'-0'] = ['content' => $value['nombrecapitulo'], 'disabled'=>true];\n\t\t\t} else { // Es item\n\t\t\t\t$contenido = '<div class=\"alert-info\"><strong>'.$value['titulo'].'</strong></div>';\n\t\t\t\t$registro = 'I';\n\t\t\t\t$regItem = $value['regitems'];\n\t\t\t\tif (array_key_exists('I-'.$value['regitems'], $items)) {\n\t\t\t\t\t$items['I-'.$value['regitems']] = ['content' => $value['titulo'], 'disabled'=>true];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$itemsPlantilla[$registro.'-'.$regItem] = ['content' => $contenido];\n\t\t}\n\n\t\t// Cuando se da click en el botón grabar cambios\n\t\tif ($rq->post('grabaCambios') !== null) {\n\t\t\t$modelCapitulos = new Capitulos();\n\t\t\t$registros = explode(\",\", $rq->post('kv-conn-1'));\n\n\t\t\t$regcap = 0; $ordencapitulos = 0; $ordenitems = 0; $datos = [];\n\t\t\tforeach ($registros as $key=>$valor) {\n\t\t\t\t$capItem = explode(\"-\", $valor); // $capItem[0]=RegCapitulo, $capItem[1]=RegItem\n\t\t\t\tif ($regcap <> $capItem[0] && $capItem[0] <> 'I') {\n\t\t\t\t\t$regcap = $capItem[0]; $ordencapitulos += 10; $ordenitems = 0;\n\t\t\t\t}\n\t\t\t\tif ($capItem[1]>0) $ordenitems += 10;\n\t\t\t\t// Se busca el nombre del capitulo\n\t\t\t\t$nombreCapitulo = Listacapitulos::find()->select('nombrecapitulo')->where('regn = :regn', [':regn' => $regcap])->asArray()->one();\n\n\t\t\t\t// Se alimentan los campos de la tabla capitulos\n\t\t\t\t$modelCapitulos->ordencapitulos = $ordencapitulos;\n\t\t\t\t$modelCapitulos->ordenitems = $ordenitems;\n\t\t\t\t$modelCapitulos->nombrecapitulo = $nombreCapitulo['nombrecapitulo'];\n\t\t\t\t$modelCapitulos->extregnplantilla = $regn;\n\t\t\t\t$modelCapitulos->extregnitemsg = $capItem[1];\n\t\t\t\t$modelCapitulos->activo = 'S';\n\t\t\t\t$modelCapitulos->fecham = date('Y-m-d H:i:s');\n\n\t\t\t\tif ($modelCapitulos->validate()) {\n\t\t\t\t\t$datos[] = [ $ordencapitulos,$ordenitems,$nombreCapitulo['nombrecapitulo'],$regn,$capItem[1],'S',date('Y-m-d H:i:s') ];\n\t\t\t\t} else {\n\t\t\t\t\t// validation failed: $errors is an array containing error messages\n\t\t\t\t\t$errors = $modelCapitulos->errors;\n\t\t\t\t\treturn $this->render('/site/errors', ['errors' => $errors, 'modulo' => 'en configurar plantilla']);\n\t\t\t\t}\n\t\t\t} // foreach\n\n\t\t\t// se borra todo el conjunto de plantilla, porque se vuelve a grabar a partir del formulario configPlantilla\n\t\t\tCapitulos::deleteAll('extregnplantilla = :regplan', [':regplan' => $regn]);\n\t\t\t// Para varios registros se usa batchInsert, así se evita crear n objetos de Capitulos().\n\t\t\t// Solo se usa un objeto de $modelCapitulos para validar registro por registro.\n\t\t\tyii::$app->db->createCommand()->batchInsert(\n\t\t\t\t'capitulos',\n\t\t\t\t['ordencapitulos','ordenitems','nombrecapitulo','extregnplantilla','extregnitemsg','activo','fecham'],$datos\n\t\t\t)->execute();\n\n\t\t\treturn $this->redirect('grilla-plantillas');\n\t\t} // $_POST\n\n\t\t$lItems = '';\n\n\t\treturn $this->render('configPlantilla', compact('titulo','itemsPlantilla','liscapitulos','items','lItems'));\n\t}", "title": "" }, { "docid": "e829e4abe4355cfd301af8013374d01a", "score": "0.5086475", "text": "public function consultarporEstadoGeneracionParametros()\n {\n $id_estadoPerfil = $this->request[\"perfil\"];\n $generacion = $this->request[\"generacion\"];\n $id_parametro = $this->request[\"estado\"];\n $anio = $this->request[\"anio\"];\n $gr = new genero();\n $data = array();\n if (empty($id_estadoPerfil) and empty($generacion) and !empty($id_parametro)) {\n\n $dataList = $gr->consultarEstadoParametro($id_parametro);\n } else\n if (!empty($id_estadoPerfil) and empty($generacion) and empty($id_parametro)) {\n\n $dataList = $gr->consultarEstado($id_estadoPerfil);} else\n if (empty($id_estadoPerfil) and !empty($generacion) and empty($id_parametro)) {\n $dataList = $gr->Consultargeneraciones($generacion);\n } else\n if (empty($id_estadoPerfil) and !empty($generacion) and !empty($id_parametro)) {\n $dataList = $gr->consultarGeneracionParametro($generacion, $id_parametro);\n } else\n if (!empty($id_estadoPerfil) and !empty($generacion) and empty($id_parametro)) {\n $dataList = $gr->consultarEstadoGeneracion($generacion, $id_estadoPerfil);\n } else\n if (!empty($id_estadoPerfil) and empty($generacion) and !empty($id_parametro)) {\n $dataList = $gr->consultarEstadosParametro($id_estadoPerfil, $id_parametro);\n } else\n if (!empty($id_estadoPerfil) and !empty($generacion) and !empty($id_parametro)) {\n $dataList = $gr->consultarEstadosParametroGeneracion($id_estadoPerfil, $generacion, $id_parametro);\n }\n\n foreach ($dataList as $d) {\n $carnet = $d['carnet_alumno'];\n $id_estado = $d['id_estado'];\n array_push($data, array(\n $d['carnet_alumno'],\n $d['primer_nombre'],\n $d['primer_apellido'],\n $d['nombre_estado'],\n $d['id_estado'] != 4 && $d['id_estado'] != 5 && $d['id_estado'] != 6 && $d['id_estado'] != 8 ?\n '<a onclick=\"cambioEstado(' . $d['carnet_alumno'] . ',' . $d['id_estado'] . ')\"><img src=' . $this->_helpers->linkTo(\"assets/img/\") . 'shield.png></a>' : '<a onclick=\"cambioEstado_alumno(' . $d['carnet_alumno'] . ')\"><img src=' . $this->_helpers->linkTo(\"assets/img/\") . 'cancelar.png></a>',\n $d['id_estado'] != 4 && $d['id_estado'] != 5 && $d['id_estado'] != 6 && $d['id_estado'] != 8 ? \n '<a onclick=\"cambioEstadoReprobado(' . $d['carnet_alumno'] . ',' . $d['id_estado'] . ')\"><img src='.$this->_helpers->linkTo(\"assets/img/\").'cancel.png></a>' : '<a onclick=\"cambioEstado_alumno(' . $d['carnet_alumno'] . ')\"><img src=' . $this->_helpers->linkTo(\"assets/img/\") . 'cancelar.png></a>',\n $d['id_estado'] != 4 &&$d['id_estado'] != 5 && $d['id_estado'] != 6 && $d['id_estado'] != 8 && $id_parametro != 3 && $id_parametro != 2 && $id_parametro != 1 ? \n '<a onclick=\"cambioEstadoDesercion(' . $d['carnet_alumno'] . ',' . $d['id_estado'] . ')\"><img src=' . $this->_helpers->linkTo(\"assets/img/\") . 'sad.png></a></a>': '<a onclick=\"cambioEstadoAlumnoDesercion(' . $d['carnet_alumno'] . ',' . $d['id_estado'] . ' )\"><img src=' . $this->_helpers->linkTo(\"assets/img/\") . 'cancelar.png></a>',\n\n )\n );\n }\n echo json_encode($data);\n }", "title": "" }, { "docid": "8ab128564362872c0f897148078ae0c1", "score": "0.5084858", "text": "public function executeBajarCantidadArticuloPedido()\n\t{\n\t\t// Obtenemos el menu segun sus permisos\n\t\t$menu = new GenerarMenus();\t\t\n\t\t$this->menu_botones =$menu->generarMenuBotones();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesUrl\n\t\t$this->acc_url = new AccionesUrl();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesFechas\n\t\t$this->acc_fechas = new AccionesFechas();\n\t\t\n\t\t// Obtenemos un objeto de la clase Utilidades\n\t\t$this->acc_utilidades = new Utilidades();\n\t\t\n\t\t// Obtenemos un objeto de la clase Proveedores\n\t\t$this->acc_proveedores = new AccionesProveedores();\n\t\t\n\t\t// Obtenemos un objeto de la clase AccionesPedidos\n\t\t$this->acc_pedidos = new AccionesPedidos();\n\t\t\n\t\t// Obtenemos un select con todos los Proveedores\n\t\t$this->ar_proveedores = $this->acc_proveedores->obtenerSelectProveedores();\t\n\t\t\t\t\n\t\t// Obtenemos un objeto de la clase Articulos\n\t\t$this->acc_articulos = new AccionesArticulos();\t\n\n\t\t// Obtenemos el id del pedido para mantener la trazabilidad\t\t\n\t\t$this->id_pedido_temporal = $this->getRequestParameter('id_pedido_temporal');\n\t\t\t\n\t\t// Obtenemos el id del articulo que vamos a a agregar\n\t\t$this->id_articulo = $this->getRequestParameter('id_articulo');\n\t\t\n\t\t// La cantidad esta vacia\n\t\t$cantidad = $this->getRequestParameter('cantidad');\n\t\t\t\t\t\n\t\t// Obtenemos el id de la linea de pedido a actualizar\t\t\n\t\t$this->id_linea_pedido = $this->getRequestParameter('id_linea_pedido');\t\n\t\t\n\t\t$obj_articulo_x_pedido = $this->acc_pedidos->obtenerObjArticulosXPedido($this->id_linea_pedido);\n\t\t\n\t\t$id_pedido = $obj_articulo_x_pedido->getIdPedido();\n\t\t\n\t\tif($this->id_linea_pedido)\n\t\t{\n\t\t\t$cantidad_old = $obj_articulo_x_pedido->getCantidad();\n\t\t\tif($cantidad_old == 1)\n\t\t\t{\n\t\t\t\t$cantidad = $cantidad_old;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$cantidad = $cantidad_old - 1;\n\t\t\t}\n\t\t\t$linea_pedido_update = $this->acc_pedidos->actualizarLineaPedido($this->id_linea_pedido,$cantidad);\n\t\t}\n\t\t\n\t\t// Obtenemos el listado de las lineas de pedido según el id de pedido\n\t\t$this->ar_lineas_pedido = $this->acc_pedidos->obtenerLineasPedidoXIdPedido($id_pedido);\t\t\n\t}", "title": "" }, { "docid": "4526637e12e877229ab1b7e92cff1dd7", "score": "0.50834006", "text": "public function calculadoraPublicacion($publicacion, $idUsuarioMELI, $isSimulacion=false, $precioSimulacion=0, $tipoPublicacion='', $isEnvioGratis=false){\n try{\n //~Tasas de impuestos\n $parametria = Parametria::where('xstatus','=','1')->where('clave_proceso','=','IMPUESTO')->where('llave','=','TASA_IVA')->select('valor')->first();\n $tasaIva = floatval($parametria->valor);\n\n $parametria = Parametria::where('xstatus','=','1')->where('clave_proceso','=','IMPUESTO')->where('llave','=','TASA_ISR')->select('valor')->first();\n $tasaIsr = floatval($parametria->valor);\n\n $parametria = Parametria::where('xstatus','=','1')->where('clave_proceso','=','IMPUESTO')->where('llave','=','MONTO_ENVIO_GRATIS_LIMITE')->select('valor')->first();\n $limiteEnvioGratis = floatval($parametria->valor);\n\n $id = $publicacion->id; \n $precio = $publicacion->price;\n \n $shipping = $publicacion->shipping;\n $envioGratis = $shipping->free_shipping; \n $idCategoria = $publicacion->category_id;\n $tipoListing = $publicacion->listing_type_id;\n $envioGratis = $publicacion->shipping->free_shipping;\n\n if($isSimulacion==true){\n $precio = floatval($precioSimulacion);\n $envioGratis = $isEnvioGratis=='false' ? false: true;\n if($precio>=$limiteEnvioGratis){\n $envioGratis= true;\n }\n\n $tipoListing = $tipoPublicacion == 'CLASICA' ? 'gold_special' : 'gold_pro'; //gold_special|gold_pro\n }\n\n //~Calcula la comision por venta del producto\n $comisionVenta = app(MercadoLibreController::class)->precioVentaCategoria($idCategoria, $tipoListing, $precio); \n \n //~Calcula impuestos aplicables\n $baseGravable = $precio / 1.16;\n $iva = $baseGravable * $tasaIva;\n $isr = $baseGravable * $tasaIsr;\n\n //~Precio del envio en caso de aplicar\n if($envioGratis){\n $costoEnvio = app(MercadoLibreController::class)->costoEnvioGratis($id, $idUsuarioMELI);\n }else{\n $costoEnvio = 0;\n }\n\n $final = $precio - $comisionVenta - $iva - $isr - $costoEnvio; \n\n return array ($comisionVenta, $iva, $isr, $costoEnvio, $final);\n }catch (\\Exception $e) {\n \\Log::error($e->getTraceAsString()); \n return ['exception' => $e->getMessage()];\n } \n }", "title": "" }, { "docid": "3513b80961ec1a112b678171af874a70", "score": "0.5081143", "text": "public function obtenerGruposToUbicacion(Request $request)\n {\n $this->validate(\n $request,\n [\n \"iModuloId\" => \"required|integer\"\n ]\n );\n $parameters = [\n $request->iModuloId,\n ];\n try {\n $grupos = DB::select('exec [acad].[Sp_CCTIC_SEL_Examenes_Ubicacion_ListadoGrupos] ?', $parameters);\n $response = ['validated' => true, 'data' => $grupos, 'message' => 'datos obtenidos correctamente'];\n $responseCode = 200;\n } catch (\\Exception $e) {\n $response = ['validated' => false, 'data' => [], $e->getMessage()];\n $responseCode = 500;\n }\n return response()->json($response, $responseCode);\n }", "title": "" }, { "docid": "3b1dee23eff0d999c5457145c708eb70", "score": "0.50809336", "text": "function CadastraGrupo()\n{\n\t $erro = Array();\n \n foreach ($_POST as $chv => $vlr) \n {\n if($vlr == \"\" && substr($chv,0,3) == \"GRP\") \n {\n $erro[] = \"O campo \" . substr($chv,4) . \" não foi informado\";\n }\n }\n\t\n\t$n = count($erro);\n\tif ($n > 0)\n\t{\n\t\theader(\"location: ../grupos.php?status=error\");\n\t\treturn;\n\t}\n\t\n\t$grupos = new Grupos();\n\t\n\t$_nome = $_POST['GRP_NOME'];\n\t$_cats = $_POST['GRP_CATS'];\n\t\n\t// Cria a lista de categorias, separadas por virgula\n\t$categorias = \"\";\n\t$n = count($_cats);\n\tfor ($i = 0; $i < $n; $i++)\n\t{\n\t\t$categorias .= $_cats[$i] . \",\";\n\t}\n\t$categorias = substr_replace($categorias, \"\", -1);\n\t\n\t// Adiciona o grupo e redireciona\n\t\n\t$result = $grupos->AdicionaGrupo($_nome, $categorias);\n\t\t\n\tif ($result == TRUE)\n\t{\n\t\theader(\"location: ../grupos.php?status=success\");\t\n\t}\n\telse\n\t{\n\t\theader(\"location: ../grupos.php?status=error\");\t\t\n\t}\n\t\n\treturn;\n}", "title": "" }, { "docid": "c1181647ff28c3175920e08bef42efab", "score": "0.5076249", "text": "function contarCreditosPlan($datosEspacios,$datosEspaciosAsociados) {\r\n if (is_array($datosEspacios))\r\n {\r\n foreach ($datosEspacios as $key => $value) {\r\n $this->sumarCreditosClasificacion($value);\r\n }\r\n }\r\n if(is_array($datosEspaciosAsociados))\r\n {\r\n //var_dump($datosEspaciosAsociados);exit;\r\n foreach ($datosEspaciosAsociados as $key => $value) {\r\n if ($datosEspaciosAsociados[$key]['COD_ENCABEZADO']!=(isset($datosEspaciosAsociados[$key-1]['COD_ENCABEZADO'])?$datosEspaciosAsociados[$key-1]['COD_ENCABEZADO']:''))\r\n {\r\n $this->sumarCreditosClasificacionEncabezado($value);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5e8bc66587583322dcea11d3ce59eff5", "score": "0.507151", "text": "public function fun_pn_usuarios_habilitados($opcion,$valor,$habilitado,$id_sistema){////\n parent::ConnectionOpen(\"sp_pn_usuarios_habilitados\",\"permisos\");\n parent::SetParameterSP(\"$1\",$opcion);\n parent::SetParameterSP(\"$2\",$valor);\n parent::SetParameterSP(\"$3\",$habilitado);\n parent::SetParameterSP(\"$4\",$id_sistema);\n parent::SetSelect(\"*\");\n parent::SetPagination('ALL');\n return parent::executeSPArrayX();\n\t}", "title": "" }, { "docid": "77cbf30ca7a9fa153eecbd082c826636", "score": "0.50710046", "text": "public function executeImprimirplanillatp($request, $alumnos)\n {\n\t$oComision = Doctrine_Core::getTable('Comisiones')->find($request->getParameter(\"idcomision\"));\n\t$oCatedra = $oComision->getCatedras();\n\t$oMateriaPlan = $oCatedra->getMateriasPlanes();\n\t$oPlanEstudio = $oMateriaPlan->getPlanesEstudios();\n\t$oCarrera = $oPlanEstudio->getCarreras();\n\t$oFacultad = $oCarrera->getFacultades();\t\n\t$oEstadoMateria = Doctrine_Core::getTable('EstadosMateria')->find(1);\n\t$idsede = sfContext::getInstance()->getUser()->getAttribute('id_sede','');\n\t$tipo = $request->getParameter(\"tipo\");\n\t$bucles = 5;\n\n\t// Crea una instancia de la clase de PDF\n\t$pdf = new PlanillaTP('P','mm','Legal');\n\n\t// Toma las variables de la pagina anterior\n\tif ($tipo == \"parcial\"){\n\t\t// Asigna el titulo de la planilla\n\t\t$titulo= \"PLANILLA DE EXAMEN PARCIAL\";\n\t} else {\n\t\t// Asigna el titulo de la planilla\n\t\t$titulo= \"INFORME DE CATEDRA\";\n\t}\t\n\t// Agrega la Cabecera al documento\n\t$pdf->CabeceraApaisada($oFacultad,$oCarrera,$titulo);\n\t// Agrega el esquema grafico de la planilla\n\t$pdf->EsquemaPlanillaTP1eraHoja($bucles);\t\n\t$pdf->SetFont('Times','',9);\n\t$pdf->SetXY(6,41);\n\t$pdf->MultiCell(65,3, $oCatedra->getIdmateriaplan().\" - \".$oCatedra->getMateriasPlanes(),0,'C',0);\n\t// Muestra el Curso, la Comisión y el Estado de los alumnos\n\t$pdf->SetFont('Times','',10);\n\t$pdf->SetXY(6,50);\n\t$pdf->Cell(65,5,\"CURSO: \".$oMateriaPlan->getAnodecursada(),0,1,'L');\n\t$pdf->SetXY(6,54);\n\t$pdf->Cell(65,5,\"COMISIÓN: \".$oComision->getNombre(),0,1,'L');\n\t$pdf->SetXY(6,58);\n\t$pdf->Cell(65,5,\"ALUMNOS: \". $oEstadoMateria,0,1,'L');\t\n\t/////////////////////////////////////////////////////////////////////////\n\t// CUERPO PAGINA\n\t/////////////////////////////////////////////////////////////////////////\t\t\n\t$total = count($alumnos);\n\t$y = 66;\n\t$contador = 1;\n\tforeach($alumnos as $alumno){\n\t\t$pdf->SetLineWidth(0);\n\t\t$pdf->SetFont('Times','',9);\n\t\t$pdf->SetXY(6,$y);\n\t\t$pdf->Cell(6,7,$contador,0,1,'C');\n\t\t$pdf->SetXY(12,$y);\n\t\t$nombreAlumno = $alumno->getPersonas();\n\t\tif (strlen($nombreAlumno) <= 30) {\n\t\t\t$pdf->Cell(85,7,$nombreAlumno,0,1,'L');\n\t\t} elseif ((strlen($nombreAlumno) > 30) and (strlen($nombreAlumno) <= 38)) {\n\t\t\t$pdf->SetFont('Times','',8);\n\t\t\t$pdf->Cell(85,7,$nombreAlumno,0,1,'L');\n\t\t\t$pdf->SetFont('Times','',9);\n\t\t} else {\n\t\t\t$pdf->Cell(85,7,substr($nombreAlumno, 0, 32),0,1,'L');\n\t\t\t//$pdf->SetFont('Times','',8);\n\t\t\t//$pdf->MultiCell(85,7,$nombreAlumno,0,1,'L');\n\t\t\t//$pdf->SetFont('Times','',9);\n\t\t}\n\t\t$y = $y + 7;\n\t\t\n\t\t$pdf->Line(5,$y,350,$y);\n\n\t\tif($pdf->PageNo()>1){\n\t\t\t// Lineas verticales que marca las columnas de la planilla\n\t\t\t$pdf->Line(12,5,12,188);\n\t\t\t$pdf->Line(70,5,70,188);\n\t\t\t$pdf->Line(95,5,95,188);\n\t\t\t$pdf->Line(120,5,120,188);\n\t\t\t$pdf->Line(145,5,145,188);\n\t\t\t$pdf->Line(175,5,175,188);\n\t\t\t$pdf->Line(195,5,195,188);\n\t\t\t$pdf->Line(225,5,225,188);\n\t\t\t$pdf->Line(250,5,250,188);\n\t\t}\n\t\t// Pasos a seguir si tiene que continuar en otra pagina\n\t\tif ($y > 180) {\n\t\t\t// Agrega el Pie al Documento\n\t\t\t$pdf->PieApaisada($idsede);\n\t\t\t// Agrega el Esquema Grafico de la segunda pagina\n\t\t\t$pdf->EsquemaPlanillaTP2daHoja($bucles);\t\t\t\n\t\t\t// Reinicia el valor para la nueva página\n\t\t\t$y=9;\n\t\t}\n\t\t$contador++;\n\t}\n\t/////////////////////////////////////////////////////////////////////////\n\t// PIE PAGINA\n\t/////////////////////////////////////////////////////////////////////////\n\t// Agrega el Pie al Documento\n\t$pdf->PieApaisada($idsede);\n\t// Guarda o envía el documento pdf\n\t$pdf->Output('planilla-asistencia.pdf','I');\n\t// Termina el documento\n\t$pdf->Close();\n \t// Para el proceso de symfony\n \tthrow new sfStopException(); \n }", "title": "" }, { "docid": "10df86241fcd66ef87ea86072a11945d", "score": "0.50697213", "text": "function procesar_periodo ($periodos, $i){\n //Falta considerar curso_de_ingreso, pero es menos importante.\n $cuatrimestre=array();\n $ccu=array();\n $examen_final=array();\n $ex=array();\n foreach($periodos as $clave=>$valor){\n switch ($valor['tipo_periodo']){\n case 'Cuatrimestre' : if(strcmp($i, \"hd\")==0){\n $cuatrimestre=$this->dep('datos')->tabla('asignacion')->get_asignaciones_cuatrimestre($this->s__id_sede, $this->s__dia_consulta, $valor['id_periodo'], $this->s__fecha_consulta);\n }else{//--Consideramos la rama de horarios registrados, \"hr\".\n $ccu=$this->dep('datos')->tabla('asignacion')->get_asignaciones($this->s__where, $valor['id_periodo']);\n //--Si no unimos cjtos. de asignaciones se pisan entre si.\n $this->unificar_conjuntos(&$cuatrimestre, $ccu);\n }\n \n break;\n \n case 'Examen Final' : if(strcmp($i, \"hd\")==0){\n $examen_final=$this->dep('datos')->tabla('asignacion')->get_asignaciones_examen_final($this->s__id_sede, $this->s__dia_consulta, $valor['id_periodo'], $this->s__fecha_consulta);\n }else{//Consideramos la rama de horarios registrados, \"hr\".\n $ex=$this->dep('datos')->tabla('asignacion')->get_asignaciones($this->s__where, $valor['id_periodo']);\n $this->unificar_conjuntos(&$examen_final, $ex);\n }\n break;\n }\n }\n \n if((count($cuatrimestre)>0) && (count($examen_final)>0)){\n $this->unificar_conjuntos(&$cuatrimestre, $examen_final);\n return $cuatrimestre;\n }\n \n if((count($cuatrimestre)>0) && (count($examen_final)==0)){\n return $cuatrimestre;\n }\n \n if((count($cuatrimestre)==0) && (count($examen_final)>0)){\n return $examen_final;\n }\n \n if((count($cuatrimestre)==0) && (count($examen_final)==0)){\n return array();\n }\n }", "title": "" }, { "docid": "7665909c466c8682b89e7f998de0fae6", "score": "0.50679433", "text": "public function listadoPermisos($data) {\n $sql=\"SELECT * FROM core_permisos WHERE 1 \";\n if(!empty($data['id'])) {\n $sql .= \"AND id='{$data['id']}'\";\n }\n if(!empty($data['id_usuario'])) {\n $sql .= \"AND id_usuario='{$data['id_usuario']}'\";\n }\n $consulta = $this->db->QuerySingleRow($sql);\n if(!$consulta) {\n $consulta = $this->db->Error();\n }\n return $consulta;\n }", "title": "" }, { "docid": "0db1525ea37f835a7aff2630bbf78c47", "score": "0.50655955", "text": "public function CopiarGruposCiclo()\n {\n try {\n $datos = json_decode(file_get_contents(\"php://input\"), true);\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $dbm->getConnection()->beginTransaction();\n\n $ciclosiguiente = $dbm->getRepositorioById(\"Ciclo\", \"siguiente\", 1);\n\n $existengrupos = $dbm->BuscarGrupos([\"cicloid\" => $ciclosiguiente->getCicloid(), \"tipogrupoid\" => 1, \"nivelid\" => $datos['nivelid']]);\n if ($existengrupos) {\n return new View(\"Ya existen grupos creados en el ciclo siguiente.\", Response::HTTP_PARTIAL_CONTENT);\n }\n $cicloactual = $dbm->getRepositorioById(\"Ciclo\", \"actual\", 1);\n $grupos = $dbm->BuscarGrupos([\"cicloid\" => $cicloactual->getCicloid(), \"nivelid\" => $datos['nivelid']]);\n foreach ($grupos as $grupo) {\n $grupo = $dbm->getRepositorioById(\"CeGrupo\", \"grupoid\", $grupo['grupoid']);\n $Grupo = clone $grupo;\n $Grupo->setCicloid($ciclosiguiente);\n $dbm->saveRepositorio($Grupo);\n }\n $dbm->getConnection()->commit();\n return new View(\"Se han guardado los registros.\", Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }", "title": "" }, { "docid": "3dbd34f30884e01b835374ba28904e77", "score": "0.506499", "text": "public function perfilcargopostulanteAction()//$id \n {\n\t\tif (false === $this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {\n\t\t\tthrow new AccessDeniedException();\n\t\t}\n\t\t\n\t $entityUser = $this->get('security.context')->getToken()->getUser();\n\t \n\t $em = $this->getDoctrine()->getManager();\n\t $idspcandidate=$entityUser->getId();\n \n\t $entitysp = $entityUser->getSelectionProcess();\n\t \n\t $idtemp = $entitysp->getID(); \n\t \n\t $entityrdr = $em->getRepository('RolBundle:RegisterDefinitionRol')->findOneBy(array('selectionProcess' => $idtemp));\n\t \n\t if (!$entityrdr ){\n\t\t\t\n\t\t\treturn $this->render('RolBundle:RegisterDefinitionRol:message.html.twig', array(\n 'title'=> 'Perfil', 'message'=>'El Perfil no ha sido definido por el consultor'));\n\t\t\t//throw $this->createNotFoundException('El rol asignado no ha sido definido por el consultor\t');\n\t\t}\n\t\t\n\t $id = $entityrdr->getId();\n\t \n $entity = $em->getRepository('RolBundle:RegisterDefinitionRol')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el Perfil de cargo solicitado');\n }\n \n $rol_lenguaje = $em->getRepository('RolBundle:RolLanguage')->findBy(array('registerDefinitionRol' => $id));\n \n $rol_study_level = $em->getRepository('RolBundle:RolStudyLevel')->findBy(array('registerdefinitionrol' => $id));\n \n $rol_master = $em->getRepository('RolBundle:RolMaster')->findBy(array('registerDefinitionRol' => $id));\n \n $rol_personality = $em->getRepository('RolBundle:RolPersonality')->findBy(array('RegisterDefinitionRol' => $id));\n \n $rol_function = $em->getRepository('RolBundle:RolFunction')->findBy(array('RegisterDefinitionRol' => $id));\n \n $rol_detail = $em->getRepository('RolBundle:RolDetail')->findBy(array('registerDefinitionRol' => $id));\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('RolBundle:RegisterDefinitionRol:perfilcargopostulante.html.twig', array( //RolBundle:RegisterDefinitionRol:show.html.twig\n 'entity' => $entity,\n 'languages' => $rol_lenguaje,\n 'study_levels' => $rol_study_level,\n 'masters' => $rol_master,\n 'personalitys' => $rol_personality,\n 'functions' => $rol_function,\n 'details' => $rol_detail,\n 'delete_form' => $deleteForm->createView(),\n ));\n\t\t\n\t}", "title": "" }, { "docid": "1c1a074776bddef3e795f73cf732796a", "score": "0.5064422", "text": "public function detalleRiesgo($IDEmpresa,$IDGiro,$Quienes,$ComoQue,$Periodo){\n //obtengo el periodo\n $listas_fechas=_fechas_array_List($Periodo);\n // vdebug($listas_fechas);\n $lista_clientes = [];\n \n // obtengo el giro principal de la empresa si no traigo filtros\n if($IDGiro === ''){\n $IDGiro = '1';\n }\n\n // tengo que obtener la lista de preguntas dependiendo el Giro\n // obtener las preguntas de ese giro \n $listado_preguntas = $this->Model_Preguntas->configuracion_cuestionario($IDGiro,$ComoQue);\n //vdebug($listado_preguntas);\n $preguntas_cumplimiento=explode(',',$listado_preguntas[0]['Cumplimiento']);\n $preguntas_calidad=explode(',',$listado_preguntas[0]['Calidad']);\n $preguntas_sanidad=explode(',',$listado_preguntas[0]['Sanidad']);\n $preguntas_socioambiental=explode(',',$listado_preguntas[0]['Socioambiental']);\n $preguntas_oferta=explode(',',$listado_preguntas[0]['Oferta']);\n\n //vdebug($preguntas_cumplimiento);\n \n //empiezo con calidad, tengo que recorrer cada pregunta y ver cuantas veces fue respondida \n // a la lista de clientes o proveedores que estubieron en en cada fecha solo las preguntas de SI y NO\n /*\n variables para guardas los datos de cada seccion\n */\n \n\n\n $ListaCumplimineto=[];\n $ListaSocioambiental=[];\n $ListaSanidad=[];\n $ListaOferta=[];\n // calidad\n $ListaCalidad['datospregunta']=[];\n foreach($preguntas_calidad as $pregunta){\n \n //vdebug($pregunta);\n $ListaCalidad_data['totalContestadas']=[];\n $ListaCalidad_data['Si']=[];\n $ListaCalidad_data['No']=[];\n $ListaCalidad_data['Na']=[];\n $ListaCalidad_data['Ns']=[];\n $ListaCalidad_data['labels']=[];\n \n $datos_pregunta = $this->Model_Preguntas->Datos_Pregunta($pregunta);\n $total_contestadas =0;\n // vdebug($datos_pregunta['Forma']);\n if($datos_pregunta['Forma']==='SI/NO' || $datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n // con las fechas enlistadas \n \n foreach($listas_fechas as $fecha){\n array_push($ListaCalidad_data['labels'],$fecha);\n //obtengo los clientes o proveedores que son de esta fecha hacia atras\n $listaClientes= $this->getClientesProveedores($IDEmpresa,$fecha,$Periodo,$Quienes);\n // vdebug($listaClientes);\n \n //ahora tengo que ver por cada cliente cuetas veces hicieron esa pregunta\n $total_si=0;\n $total_no=0;\n $total_na=0;\n $total_ns=0;\n foreach($listaClientes as $cliente){\n $Respuesta =$this-> PreguntaRespondidaFecha($ComoQue,$pregunta,$fecha,$cliente['IDEmpresaB'],$datos_pregunta['Forma'],$Periodo);\n $total_contestadas = $total_contestadas +$Respuesta['NumeroTotal'];\n if($datos_pregunta['Forma']==='SI/NO'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NA'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_na=$total_na + $Respuesta['NA'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_ns=$total_ns + $Respuesta['NS'];\n }\n }\n array_push($ListaCalidad_data['totalContestadas'],$total_contestadas);\n if($datos_pregunta['Forma']==='SI/NO'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n }\n if($datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Na'],$total_na);\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Ns'],$total_ns);\n }\n \n \n }\n \n array_push($ListaCalidad['datospregunta'],array(\n \"Pregunta\"=>$datos_pregunta['Pregunta'],\n \"labels\"=>$ListaCalidad_data['labels'],\n \"data\"=>[\n (object)[\"data\"=>$ListaCalidad_data['Si'],\"label\"=> 'Si',\"backgroundColor\"=> '#10E0D0'],\n (object)[\"data\"=>$ListaCalidad_data['No'],\"label\"=>'No',\"backgroundColor\"=> '#F2143F'],\n (object)[\"data\"=>$ListaCalidad_data['Na'],\"label\"=>'Na',\"backgroundColor\"=> '#8F8F8F'],\n (object)[\"data\"=>$ListaCalidad_data['Ns'],\"label\"=>'NS',\"backgroundColor\"=> '#8F8F8F'],\n ],\n \"dataTotal\"=>[\n (object)[\"data\"=>$ListaCalidad_data['totalContestadas'],\"label\"=> 'Calificaciones Recibidas'],\n \n ]\n ));\n \n }\n \n }\n \n // cumplimiento\n $ListaCumplimineto['datospregunta']=[];\n foreach($preguntas_cumplimiento as $pregunta){\n //vdebug($pregunta);\n $ListaCalidad_data['totalContestadas']=[];\n $ListaCalidad_data['Si']=[];\n $ListaCalidad_data['No']=[];\n $ListaCalidad_data['Na']=[];\n $ListaCalidad_data['Ns']=[];\n $ListaCalidad_data['labels']=[];\n \n $datos_pregunta = $this->Model_Preguntas->Datos_Pregunta($pregunta);\n $total_contestadas =0;\n \n if($datos_pregunta['Forma']==='SI/NO' || $datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n // con las fechas enlistadas \n \n foreach($listas_fechas as $fecha){\n array_push($ListaCalidad_data['labels'],$fecha);\n //obtengo los clientes o proveedores que son de esta fecha hacia atras\n $listaClientes= $this->getClientesProveedores($IDEmpresa,$fecha,$Periodo,$Quienes);\n // vdebug($listaClientes);\n \n //ahora tengo que ver por cada cliente cuetas veces hicieron esa pregunta\n $total_si=0;\n $total_no=0;\n $total_na=0;\n $total_ns=0;\n foreach($listaClientes as $cliente){\n $Respuesta =$this-> PreguntaRespondidaFecha($ComoQue,$pregunta,$fecha,$cliente['IDEmpresaB'],$datos_pregunta['Forma'],$Periodo);\n $total_contestadas = $total_contestadas +$Respuesta['NumeroTotal'];\n if($datos_pregunta['Forma']==='SI/NO'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NA'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_na=$total_na + $Respuesta['NA'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_ns=$total_ns + $Respuesta['NS'];\n }\n }\n array_push($ListaCalidad_data['totalContestadas'],$total_contestadas);\n if($datos_pregunta['Forma']==='SI/NO'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n }\n if($datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Na'],$total_na);\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Ns'],$total_ns);\n }\n \n \n }\n \n array_push($ListaCumplimineto['datospregunta'],array(\n \"Pregunta\"=>$datos_pregunta['Pregunta'],\n \"labels\"=>$ListaCalidad_data['labels'],\n \"data\"=>[\n (object)[\"data\"=>$ListaCalidad_data['Si'],\"label\"=> 'Si',\"backgroundColor\"=> '#10E0D0'],\n (object)[\"data\"=>$ListaCalidad_data['No'],\"label\"=>'No',\"backgroundColor\"=> '#F2143F'],\n (object)[\"data\"=>$ListaCalidad_data['Na'],\"label\"=>'Na',\"backgroundColor\"=> '#8F8F8F'],\n (object)[\"data\"=>$ListaCalidad_data['Ns'],\"label\"=>'NS',\"backgroundColor\"=> '#8F8F8F'],\n ],\n \"dataTotal\"=>[\n (object)[\"data\"=>$ListaCalidad_data['totalContestadas'],\"label\"=> 'Calificaciones Recibidas'],\n \n ]\n ));\n \n }\n \n }\n\n // Socioambiental\n $ListaSocioambiental['datospregunta']=[];\n foreach($preguntas_socioambiental as $pregunta){\n //vdebug($pregunta);\n $ListaCalidad_data['totalContestadas']=[];\n $ListaCalidad_data['Si']=[];\n $ListaCalidad_data['No']=[];\n $ListaCalidad_data['Na']=[];\n $ListaCalidad_data['Ns']=[];\n $ListaCalidad_data['labels']=[];\n \n $datos_pregunta = $this->Model_Preguntas->Datos_Pregunta($pregunta);\n $total_contestadas =0;\n \n if($datos_pregunta['Forma']==='SI/NO' || $datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n // con las fechas enlistadas \n \n foreach($listas_fechas as $fecha){\n array_push($ListaCalidad_data['labels'],$fecha);\n //obtengo los clientes o proveedores que son de esta fecha hacia atras\n $listaClientes= $this->getClientesProveedores($IDEmpresa,$fecha,$Periodo,$Quienes);\n // vdebug($listaClientes);\n \n //ahora tengo que ver por cada cliente cuetas veces hicieron esa pregunta\n $total_si=0;\n $total_no=0;\n $total_na=0;\n $total_ns=0;\n foreach($listaClientes as $cliente){\n $Respuesta =$this-> PreguntaRespondidaFecha($ComoQue,$pregunta,$fecha,$cliente['IDEmpresaB'],$datos_pregunta['Forma'],$Periodo);\n $total_contestadas = $total_contestadas +$Respuesta['NumeroTotal'];\n if($datos_pregunta['Forma']==='SI/NO'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NA'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_na=$total_na + $Respuesta['NA'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_ns=$total_ns + $Respuesta['NS'];\n }\n }\n array_push($ListaCalidad_data['totalContestadas'],$total_contestadas);\n if($datos_pregunta['Forma']==='SI/NO'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n }\n if($datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Na'],$total_na);\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Ns'],$total_ns);\n }\n \n \n }\n \n array_push($ListaSocioambiental['datospregunta'],array(\n \"Pregunta\"=>$datos_pregunta['Pregunta'],\n \"labels\"=>$ListaCalidad_data['labels'],\n \"data\"=>[\n (object)[\"data\"=>$ListaCalidad_data['Si'],\"label\"=> 'Si',\"backgroundColor\"=> '#10E0D0'],\n (object)[\"data\"=>$ListaCalidad_data['No'],\"label\"=>'No',\"backgroundColor\"=> '#F2143F'],\n (object)[\"data\"=>$ListaCalidad_data['Na'],\"label\"=>'Na',\"backgroundColor\"=> '#8F8F8F'],\n (object)[\"data\"=>$ListaCalidad_data['Ns'],\"label\"=>'NS',\"backgroundColor\"=> '#8F8F8F'],\n ],\n \"dataTotal\"=>[\n (object)[\"data\"=>$ListaCalidad_data['totalContestadas'],\"label\"=> 'Calificaciones Recibidas'],\n \n ]\n ));\n \n }\n \n }\n // fin de socioambiental\n\n // Sanidad\n $ListaSanidad['datospregunta']=[];\n foreach($preguntas_sanidad as $pregunta){\n //vdebug($pregunta);\n $ListaCalidad_data['totalContestadas']=[];\n $ListaCalidad_data['Si']=[];\n $ListaCalidad_data['No']=[];\n $ListaCalidad_data['Na']=[];\n $ListaCalidad_data['Ns']=[];\n $ListaCalidad_data['labels']=[];\n \n $datos_pregunta = $this->Model_Preguntas->Datos_Pregunta($pregunta);\n $total_contestadas =0;\n \n if($datos_pregunta['Forma']==='SI/NO' || $datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n // con las fechas enlistadas \n \n foreach($listas_fechas as $fecha){\n array_push($ListaCalidad_data['labels'],$fecha);\n //obtengo los clientes o proveedores que son de esta fecha hacia atras\n $listaClientes= $this->getClientesProveedores($IDEmpresa,$fecha,$Periodo,$Quienes);\n // vdebug($listaClientes);\n \n //ahora tengo que ver por cada cliente cuetas veces hicieron esa pregunta\n $total_si=0;\n $total_no=0;\n $total_na=0;\n $total_ns=0;\n foreach($listaClientes as $cliente){\n $Respuesta =$this-> PreguntaRespondidaFecha($ComoQue,$pregunta,$fecha,$cliente['IDEmpresaB'],$datos_pregunta['Forma'],$Periodo);\n $total_contestadas = $total_contestadas +$Respuesta['NumeroTotal'];\n if($datos_pregunta['Forma']==='SI/NO'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NA'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_na=$total_na + $Respuesta['NA'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_ns=$total_ns + $Respuesta['NS'];\n }\n }\n array_push($ListaCalidad_data['totalContestadas'],$total_contestadas);\n if($datos_pregunta['Forma']==='SI/NO'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n }\n if($datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Na'],$total_na);\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Ns'],$total_ns);\n }\n \n \n }\n \n array_push($ListaSanidad['datospregunta'],array(\n \"Pregunta\"=>$datos_pregunta['Pregunta'],\n \"labels\"=>$ListaCalidad_data['labels'],\n \"data\"=>[\n (object)[\"data\"=>$ListaCalidad_data['Si'],\"label\"=> 'Si',\"backgroundColor\"=> '#10E0D0'],\n (object)[\"data\"=>$ListaCalidad_data['No'],\"label\"=>'No',\"backgroundColor\"=> '#F2143F'],\n (object)[\"data\"=>$ListaCalidad_data['Na'],\"label\"=>'Na',\"backgroundColor\"=> '#8F8F8F'],\n (object)[\"data\"=>$ListaCalidad_data['Ns'],\"label\"=>'NS',\"backgroundColor\"=> '#8F8F8F'],\n ],\n \"dataTotal\"=>[\n (object)[\"data\"=>$ListaCalidad_data['totalContestadas'],\"label\"=> 'Calificaciones Recibidas'],\n \n ]\n ));\n \n }\n \n }\n // fin de sanidad\n\n\n\n\n // oferta\n $ListaOferta['datospregunta']=[];\n foreach($preguntas_oferta as $pregunta){\n //vdebug($pregunta);\n $ListaCalidad_data['totalContestadas']=[];\n $ListaCalidad_data['Si']=[];\n $ListaCalidad_data['No']=[];\n $ListaCalidad_data['Na']=[];\n $ListaCalidad_data['Ns']=[];\n $ListaCalidad_data['labels']=[];\n \n $datos_pregunta = $this->Model_Preguntas->Datos_Pregunta($pregunta);\n $total_contestadas =0;\n \n if($datos_pregunta['Forma']==='SI/NO' || $datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n // con las fechas enlistadas \n \n foreach($listas_fechas as $fecha){\n array_push($ListaCalidad_data['labels'],$fecha);\n //obtengo los clientes o proveedores que son de esta fecha hacia atras\n $listaClientes= $this->getClientesProveedores($IDEmpresa,$fecha,$Periodo,$Quienes);\n // vdebug($listaClientes);\n \n //ahora tengo que ver por cada cliente cuetas veces hicieron esa pregunta\n $total_si=0;\n $total_no=0;\n $total_na=0;\n $total_ns=0;\n foreach($listaClientes as $cliente){\n $Respuesta =$this-> PreguntaRespondidaFecha($ComoQue,$pregunta,$fecha,$cliente['IDEmpresaB'],$datos_pregunta['Forma'],$Periodo);\n $total_contestadas = $total_contestadas +$Respuesta['NumeroTotal'];\n if($datos_pregunta['Forma']==='SI/NO'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NA'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_na=$total_na + $Respuesta['NA'];\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n $total_si= $total_si + $Respuesta['SI'] ;\n $total_no= $total_no + $Respuesta['NO'];\n $total_ns=$total_ns + $Respuesta['NS'];\n }\n }\n array_push($ListaCalidad_data['totalContestadas'],$total_contestadas);\n if($datos_pregunta['Forma']==='SI/NO'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n }\n if($datos_pregunta['Forma']==='SI/NO/NA' || $datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Na'],$total_na);\n }\n if($datos_pregunta['Forma']==='SI/NO/NS'){\n array_push($ListaCalidad_data['Si'],$total_si);\n array_push($ListaCalidad_data['No'],$total_no);\n array_push($ListaCalidad_data['Ns'],$total_ns);\n }\n \n \n }\n \n array_push($ListaCumplimineto['datospregunta'],array(\n \"Pregunta\"=>$datos_pregunta['Pregunta'],\n \"labels\"=>$ListaCalidad_data['labels'],\n \"data\"=>[\n (object)[\"data\"=>$ListaCalidad_data['Si'],\"label\"=> 'Si',\"backgroundColor\"=> '#10E0D0'],\n (object)[\"data\"=>$ListaCalidad_data['No'],\"label\"=>'No',\"backgroundColor\"=> '#F2143F'],\n (object)[\"data\"=>$ListaCalidad_data['Na'],\"label\"=>'Na',\"backgroundColor\"=> '#8F8F8F'],\n (object)[\"data\"=>$ListaCalidad_data['Ns'],\"label\"=>'NS',\"backgroundColor\"=> '#8F8F8F'],\n ],\n \"dataTotal\"=>[\n (object)[\"data\"=>$ListaCalidad_data['totalContestadas'],\"label\"=> 'Calificaciones Recibidas'],\n \n ]\n ));\n \n }\n \n }\n $data[\"calidad\"] = $ListaCalidad;\n $data[\"cumplimiento\"] = $ListaCumplimineto;\n $data[\"sanidad\"] = $ListaSanidad;\n $data['socioambiental'] = $ListaSocioambiental;\n $data[\"oferta\"] = $ListaOferta;\n\n return $data;\n \n /// aqui termina las preguntas de cumplimiento\n\n\n }", "title": "" }, { "docid": "76044297c86a795d769ecd6bf64093b6", "score": "0.50590783", "text": "private function autenticaPermissao() {\n\n $oUsuarioLogado = $this->usuarioLogado;\n if (!in_array($oUsuarioLogado->getPerfil()->getId(), $this->PERFIS_PERMITIDOS) || $oUsuarioLogado->getLogin() !== 'dbseller') {\n $this->_redirector->gotoSimple('index', 'logout', 'auth');\n }\n\n }", "title": "" }, { "docid": "6b4636b23a27c7f89b86c6b204208d1d", "score": "0.50553405", "text": "function pegar_tarefas_do_projeto_por_usuario( $parametro_pro_id, $parametro_sit_id, $parametro_usu_id )\r\n\t\t{\r\n\t\t\t$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or\r\n\t\t\tdie('Erro ao conectar ao BD!');\r\n\t\t\r\n\t\t\t// Seleciona o banco de dados\r\n\t\t\tmysqli_select_db($dbc, \"easykanban-bd\")\r\n\t\t\t\tor die ('Erro ao selecionar o Banco de Dados');\r\n\t\t\r\n\t\t\t$query = 'SELECT t.`tar_id`, t.`tar_titulo`, r.`usu_id`\r\n\t\t\t\t\t FROM `tarefa` t\r\n\t\t\t\t\t JOIN `projeto` p ON p.`pro_id` = t.`pro_id`\r\n\t\t\t\t\t JOIN `situacao` s ON s.`sit_id` = t.`sit_id`\r\n\t\t\t\t\t JOIN `responsavel` r on r.`tar_id` = t.`tar_id` \r\n\t\t\t\t\t JOIN `usuario` u on u.`usu_id` = r.`usu_id`\r\n\t\t\t\t\t WHERE t.`pro_id` = %s AND s.`sit_id`= %s AND u.`usu_id`= %s'\r\n\t\t\tor die (\"Erro ao construir a consulta\");\r\n\t\t\t\t\t\r\n\t\t\t// alimenta os parametros da conculta\r\n\t\t\t$query = sprintf($query, $parametro_pro_id, $parametro_sit_id, $parametro_usu_id ); \t\t\t\r\n\t\t\t\t\t\r\n\t\t\t//executa query de consulta na tabela tarefa\r\n\t\t\t$result = mysqli_query($dbc, $query)\r\n\t\t\t\tor die('Erro ao executar a consulta na tabela tarefa');\r\n\r\n\t\t\tmysqli_close($dbc);\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "5609c5f8726c88d6dfc75c4c812c13bf", "score": "0.50540024", "text": "public function promoverParaModerador($id_grupo, $id_user) {\n if($this->esseGrupoExiste($id_grupo) == false) {\n return view('mensagemErro', ['msg' => \"Esse grupo não existe!\"]);\n }\n\n $grupo = \\site\\Grupo::find($id_grupo);\n $moderadores = $grupo->getModeradores;\n\n //Verifica se o usuário logado é Moderador\n if($this->ehModerador($id_grupo, Auth::user()->id) == false) {\n return view('mensagemErro', ['msg' => \"Você não é Moderador!!\"]);\n }\n\n $membros = $grupo->getMembros;\n\n //Verifica se aquele cara é membro do grupo\n if($this->ehMembroDoGrupo($id_grupo, $id_user) == false) {\n return view('mensagemErro', ['msg' => \"Esse cara ai não é membro do grupo não! ~.~\"]);\n }\n\n //Verifica se aquele cara já não é moderador\n if($this->ehModerador($id_grupo, $id_user) == true) {\n return view('mensagemErro', ['msg' => \"Esse cara já é moderador!\"]);\n }\n\n $grupo->getModeradores()->attach($id_user);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0406f6900a11b7323d0c32d753fe210e", "score": "0.5053509", "text": "function loadPossibleItemList(&$request) {\n\t\t$monographId = $request->getUserVar('monographId');\n\t\t$userGroupId = $request->getUserVar('userGroupId');\n\n\t\t// Retrieve all users that belong to the current user group\n\t\t$userGroupDao =& DAORegistry::getDAO('UserGroupDAO');\n\n\t\t// FIXME #6000: If user group is in the series editor role, only allow it if the series editor is assigned to the monograph's series.\n\t\t$users =& $userGroupDao->getUsersById($userGroupId);\n\n\t\t$itemList = array();\n\t\twhile($item =& $users->next()) {\n\t\t\t$id = $item->getId();\n\t\t\t$itemList[] = $this->_buildListItemHTML($id, $item->getFullName());\n\t\t\tunset($item);\n\t\t}\n\n\t\t$this->possibleItems = $itemList;\n\t}", "title": "" }, { "docid": "a495068cbdd57f0e68db2ebbaf04311f", "score": "0.5046996", "text": "function accesgroupes_trouve_proprio_groupe($id_grpe) {\n\t$sql = \"SELECT spip_accesgroupes_groupes.proprio, spip_auteurs.nom\n\t\t\t\tFROM spip_accesgroupes_groupes\n\t\t\t\tLEFT JOIN spip_auteurs\n\t\t\t\tON spip_accesgroupes_groupes.proprio = spip_auteurs.id_auteur\n\t\t\t\tWHERE id_grpacces = $id_grpe\n\t\t\t\tLIMIT 1\";\n\t$result = spip_query($sql);\n\tif ($row = spip_fetch_array($result)) { // si le proprio est un admin restreint $row['nom'] est vide\n\t\treturn array('id_proprio' => $row['proprio'], 'nom_proprio' => ($row['nom'] != '' ? $row['nom'] : _T('accesgroupes:tous_les_admins')) );\n\t}\n}", "title": "" }, { "docid": "51eb0b94737252d684c82d67e9f1d4bb", "score": "0.50468737", "text": "public function FormPermisos($idUsuario)\n\t\t{\n\t\t\t$permisos = $this->parents->mod->get_permission(); // Lista de Permisos Asignables\n\t\t\t\n\t\t\t$pu = $this->PermisosUsuario( $idUsuario ); // Lista de Los permisos Asignados a un Usuario\n\t\t\t$form = '<form id=\"FormPermisosUsuario\" class=\"col-xs-12\">'.$this->fichaUsuario($idUsuario);\n\t\t\tforeach( $permisos as $mod => $cd )\n\t\t\t{\n\t\t\t\t$check_mod = ( isset( $pu[$mod][$mod] ) ) ? \"checked\":\"\";\n\t\t\t\t$form.='<div class=\"col-xs-12\">\n\t\t\t\t<div class=\"box box-primary box-solid collapsed-box\">\n\t\t\t\t\t<div class=\"box-header with-border\">\n\t\t\t\t\t\t<h3 class=\"box-title\"><input type=\"checkbox\" '.$check_mod.' name=\"permiso['.$mod.']['.$mod.']\"> <span class=\"text-bold\">Módulo:</span> '.strtoupper($mod).'</h3>\n\t\t\t\t\t\t<div class=\"box-tools pull-right\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"btn btn-box-tool\" data-widget=\"collapse\"><i class=\"fa fa-plus\"></i></button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"box-body\">\n\t\t\t\t\t\t<div class=\"form-group\">';\n\t\t\t\tforeach( $cd as $code => $desc )\n\t\t\t\t{\n\t\t\t\t\t$check_per = ( isset( $pu[$mod][$code] ) ) ? \"checked\":\"\";\n\t\t\t\t\t$form .= '<div class=\"checkbox\">\n\t\t\t\t\t\t\t\t<label class=\"col-xs-6\">\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" '.$check_per.' name=\"permiso['.$mod.']['.$code.']\"> '.$desc.'\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t\t$form.='</div></div></div></div>';\n\t\t\t}\n\t\t\t$form.='</form>';\n\t\t\treturn $form;\n\t\t}", "title": "" }, { "docid": "71a04dd89bfc2501dd2af6a0168631c1", "score": "0.5045384", "text": "public function listar(){\n\n foreach ($this->documentos as $key => $value) {\n //variable- posicion -valor\n $value->imprimirCaracteristicas();\n # code...\n }\n\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "13fe49628e9739c9f57005f4d2b5f971", "score": "0.0", "text": "public function run()\n {\n Pasajero::create([\n \t'nombre' => 'Felipe',\n \t'apellido' => 'Mosqueira Jurado',\n \t'dni' => '42882358',\n \t'email' => '[email protected]',\n \t'contraseña' => '123456',\n 'fecha_suspension' => null,\n ]);\n Pasajero::create([\n \t'nombre' => 'pasajero',\n \t'apellido' => 'Mosqueira Jurado',\n \t'dni' => '25123456',\n \t'email' => '[email protected]',\n \t'contraseña' => '123456',\n 'fecha_suspension' => null,\n ]);\n Pasajero::create([\n 'nombre' => 'Gerónimo',\n 'apellido' => 'Vega',\n 'dni' => '43194505',\n 'email' => '[email protected]',\n 'contraseña' => '123456',\n 'fecha_suspension' => null,\n ]);\n Pasajero::create([\n 'nombre' => 'Luis Miguel',\n 'apellido' => 'Rodríguez',\n 'dni' => '42538639',\n 'email' => null,\n 'contraseña' => null,\n 'fecha_suspension' => null,\n ]);\n }", "title": "" } ]
[ { "docid": "f74cb2c339072d43cd3b96858a89c600", "score": "0.8112695", "text": "public function run()\n {\n $this->seeds();\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "8d9ddbc23166c0cafca145e7a525c10a", "score": "0.80032176", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1,100) as $index) {\n DB::table('product')->insert([\n 'productName' => $faker->company,\n 'description' => $faker->text,\n 'productId' => $faker->randomNumber(),\n 'images' => $faker->image(),\n ]);\n }*/\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('recital')->insert([\n 'pagesRecital' => $faker->text,\n 'pageId' => $faker->randomNumber(),\n ]);\n }\n }", "title": "" }, { "docid": "8113ba9f29863f44dc33dbd7c0f98245", "score": "0.796029", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n DB::table('users')->insert([\n // [\n // 'name' => 'Alan',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n // [\n // 'name' => 'Alice',\n // 'email' => '[email protected]',\n // 'password' => '1234'\n // ],\n [\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make( 'admin' )\n ],\n ]);\n \n // Création de 10 authors en utilisant la factory\n // la fonction factory de Laravel permet d'utiliser le facker définit\n factory(App\\Author::class, 10)->create();\n $this->call(BookTableSeeder::class);\n }", "title": "" }, { "docid": "424a278b0bd7df7af33c6c946314dcb5", "score": "0.7928953", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n factory(App\\User::class, 100)->create();\n\n factory(App\\Category::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 10)->create()->each(function ($d) {\n $d->audiobookChapter()->saveMany(factory(App\\AudioBookChapter::class, 10)->create()->each(function ($chapter) use ($d) {\n $chapter->purchase()->saveMany(factory(App\\Purchase::class, 10)->create()->each(function ($purchase) use ($d, $chapter) {\n $purchase->user_id = User::all()->random(1)->id;\n $purchase->audiobookChapter_id = $chapter->id;\n $purchase->audiobook_id = $d->id;\n }));\n\n }));\n $d->review()->save(factory(App\\Review::class)->make());\n $d->wishlist()->save(User::all()->random(1));\n }));\n });\n\n\n factory(App\\Collection::class, 10)->create()->each(function ($c) {\n $c->audiobook()->saveMany(factory(App\\AudioBook::class, 5)->create()->each(function ($d) {\n $d->category_id = Category::all()->random(1)->id;\n }));\n });\n\n Model::reguard();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "29a4267326dbe1e561d79877123a4ef8", "score": "0.79262906", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\School', 10)->create();\n factory('App\\Department', 20)->create();\n factory('App\\Course', 40)->create();\n factory('App\\CourseContent', 40)->create();\n factory('App\\CourseMaterial', 120)->create();\n factory('App\\Library', 200)->create();\n factory('App\\Download', 200)->create();\n factory('App\\Preview', 200)->create();\n factory('App\\Image', 5)->create();\n factory('App\\Role', 2)->create();\n }", "title": "" }, { "docid": "23ad0adf7c7d172d03ff87f186b2b80d", "score": "0.7900386", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n ['nome' => 'Wiiliam',\n 'usuario' => 'will',\n 'cpf' => '033781783958',\n 'tipo' => 'ADM',\n 'ativo' => 1,\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm'//secret\n ] \n ]);\n DB::table('dentes')->insert([\n ['nome' => 'canino', 'numero' => 39],\n ['nome' => 'molar', 'numero' => 2],\n ['nome' => 'presa', 'numero' => 21]\n ]);\n\n DB::table('servicos')->insert([\n ['nome' => 'Restauração', 'ativo' => 1],\n ['nome' => 'Canal', 'ativo' => 1],\n ['nome' => 'Limpeza', 'ativo' => 1]\n ]);\n }", "title": "" }, { "docid": "c5b1891e5f39d3e2551b908d083d5516", "score": "0.78698856", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Poll::create([\n 'user_id' => 1,\n 'poll_name' => 'How much do you like me?',\n 'is_public' => 1,\n 'nr_choice' => 0\n ]);\n \n Votes::create([\n 'user_id' => 1,\n 'vote_to_poll' => 2\n ]);\n\n Choices::create([\n 'choice_id'=> 1,\n 'choice_text'=>'A lot.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>260\n ]);\n\n Choices::create([\n 'choice_id'=> 2,\n 'choice_text'=>'A little.',\n 'choice_to_poll'=>1,\n 'nr_votes'=>178\n ]);\n }", "title": "" }, { "docid": "5b3dd72a68cd7caf5cb41622cf1f17f8", "score": "0.78664595", "text": "public function run()\n {\n // Truncate existing record in book table\n Book::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create dummy records in our table books:\n for ($i = 0; $i < 50; $i++) {\n Book::create([\n 'title' => $faker->title,\n 'author' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "0edef3cdac4be0882cf354181e1a63fd", "score": "0.7847239", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $roles = Role::all();\n\n // And now, let's create a few users in our database:\n for ($i = 0; $i < 5; $i++) {\n User::create([\n 'username' => \"user_$i\",\n 'pilot_callsign' => $faker->numerify('SCI###'),\n 'rank_id' => $ranks[rand ( 0 , $ranks->count()-1 )]->id,\n 'role_id' => $roles[0]->id\n ]);\n }\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "7e308ea06065b02bb3be211e8748bf5f", "score": "0.7835999", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 1,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 2,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 3,\n ]);\n DB::table('partidos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipo' => 4,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 1,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 2,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 3,\n ]);\n DB::table('Puntos')->insert([\n 'GrupoEquipos' => 1,\n 'Equipos' => 4,\n ]);\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "29381516f53bafb0bf8797720ed6de7b", "score": "0.78240335", "text": "public function run()\n {\n\n $datas = [\n ['text' => 'Migracion'],\n ['text' => 'Familia'],\n ];\n\n\n foreach($datas as $data){\n \n $this->createSeeder($data);\n\n }\n }", "title": "" }, { "docid": "51daed999a883c3842fb92fb9bf4889b", "score": "0.78238165", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\User'::class, 20)->create();\n factory('App\\Post'::class, 1000)->create();\n factory('App\\Comment'::class, 2000)->create();\n }", "title": "" }, { "docid": "778b6afd89da9f29737c3c12e565289e", "score": "0.78130686", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('SEED_PWD')),\n ]);\n\n // 10 categorie\n $categories = factory(Category::class, 10)->create();\n\n // 20 tags\n $tags = factory(Tag::class, 20)->create();\n\n // 9 utenti\n factory(User::class, 9)->create();\n $users = User::all();\n // x ogni utente 15 posts\n foreach ($users as $user) {\n $posts = factory(Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()->id,\n ]);\n\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "8ad50814f16b74d56ba096d0d57f2685", "score": "0.7809736", "text": "public function run()\n {\n $this->call(LaratrustSeeder::class);\n // $this->call(UsersTableSeeder::class);\n $discount = factory(\\App\\Discount::class, 1)->create();\n\n $categories = factory(\\App\\Category::class, 8)->create();\n $products = factory(\\App\\Product::class, 10)->create();\n $address=factory(\\App\\Users_address::class, 24)->create();\n $this->call(DiscountTableSeeder::class);\n $this->call(m_imagesTableSeeder::class);\n\n $images = factory(\\App\\m_image::class, 2)->create();\n\n }", "title": "" }, { "docid": "b762d028067463470324860cc9a29e0e", "score": "0.7805969", "text": "public function run(): void\n {\n $this->seedUsers();\n $this->seedCategories();\n $this->seedMedia();\n $this->seedProducts();\n $this->seedOrders();\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "36b206fe3f9e5582fff99bdd44c268e2", "score": "0.77952313", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Edson Chivambo',\n 'email' => '[email protected]',\n 'password' => bcrypt('002523'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n\n\n DB::table('users')->insert([\n 'name' => 'Emidio Nhacudima',\n 'email' => '[email protected]',\n 'password' => bcrypt('Psi12345'),\n 'provincia_id' => '1',\n 'distrito_id' => '101',\n 'grupo' => '2'\n ]);\n/*\n // Let's truncate our existing records to start from scratch.\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n ]);\n }\n*/\n }", "title": "" }, { "docid": "914dd54501738d8f24f08d44c10d6a1f", "score": "0.77949405", "text": "public function run()\n {\n // default seeder to create fake users by using users factory\n // \\App\\Models\\User::factory(10)->create();\n\n // truncate deletes data or row from db. so when seed is run firsly it will delete the existing fiels\n // Product::truncate();\n // Category::truncate();\n // * first way for database seeding\n // creating a category and then passing it to create a product in seeder\n // $category = Category::create([\n // \"name\" => \"Headphones\",\n // \"description\" => \"This Category contains Headphones\"\n // ]);\n\n // Product::create([\n // \"product_name\" => \"Iphone\",\n // \"product_desc\" => \"An Iphone uses IOS and is developed by Apple\",\n // \"price\" => \"100000\",\n // \"category_id\" => $category->id\n // ]);\n // * using second method for creating/seeding fake data using factory \n // Category::factory(5)->create();\n //* overriding the default category_id of the factory in seeder\n Product::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "73bbd2eb8a462a3994465397aabc387c", "score": "0.7793759", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class, 5)->create();\n $product = factory(App\\Product::class, 50)->create();\n $reviews = factory(App\\Review::class, 100)->create()\n ->each(function ($review) {\n $review->reviews()->save(factory(App\\Product::class)->make());\n });\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "89ccfc64e34980c1c88e0ac32bd95ed7", "score": "0.7779508", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('tags')->insert([\n\t 'title' => $faker->title,\n\t 'slug' => $faker->slug,\n\t \n\t ]);\n\t}\n }", "title": "" }, { "docid": "17ed7bd7f1c8118ed9c57701c65a3308", "score": "0.7774864", "text": "public function run()\n {\n require_once 'vendor/fzaninotto/faker/src/autoload.php';\n $faker = \\Faker\\Factory::create();\n\n// \\DB::table('articles')->delete();\n\n foreach (range(1, 50) as $index) {\n dump($faker->name);\n DB::table('articles')->insert([\n 'name' => $faker->name,\n 'description' => $faker->text($maxNbChars = 400),\n 'slug' => $index,\n 'autor_id' => 2\n ]);\n };\n \n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "a00d7625c3ac246fb4c8d0c5f542c844", "score": "0.7772737", "text": "public function run()\n {\n \n /*inserting dummy data, if we want to insert a 1000 of data,every seeder foreach table, it insert 1 data*/\n // DB::table('users')->insert([\n // 'name'=>str_Random(10), \n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret')\n // ]);\n //ro run : php artisan db:seed\n\n\n /**ANOTHER WAY */\n\n //User::factory()->count(10)->hasPosts(1)->create(); //if the user has a relation with post\n User::factory()->count(10)->create();\n\n \n \n }", "title": "" }, { "docid": "7610e7d2e2f861ae0a32e114a63a583f", "score": "0.77626514", "text": "public function run()\n {\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>100,\n 'item_case_name' => 'الضريبه',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>101,\n 'item_case_name' => 'المشتريات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>102,\n 'item_case_name' => 'المبيعات',\n 'notes' => 'from seeder '\n ]);\n\n App\\Models\\BusinessItemSetupCases::create([\n 'id'=>103,\n 'item_case_name' => 'السيوله النقديه',\n 'notes' => 'from seeder '\n ]);\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "0b05db86e70b2e211fbf0469301f7d9a", "score": "0.7761681", "text": "public function run()\n {\n //\n DB::table('employees')->delete();\n $faker = Faker\\Factory::create();\n foreach(range(1,50) as $index)\n {\n Employee::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'avatar' => '',\n 'address' => $faker->address,\n 'phone'=> rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),\n ]);\n }\n }", "title": "" }, { "docid": "df7b256adbff916fcdd12b520b0dc208", "score": "0.7760763", "text": "public function run() {\n\n\t\t// $this->call('ArticlesTableSeeder::class');\n\t\t// $this->call('CategoriesTableSeeder::class');\n\t\t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t\t// \t$u->posts()->save(factory(App\\Article::class)->make());\n\t\t// });\n\n\t}", "title": "" }, { "docid": "e7527a5bc8529a2c2aad4c53046ea43d", "score": "0.7758918", "text": "public function run()\n {\n //\\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Section::factory(10)->create();\n // \\App\\Models\\Classe::factory(20)->create();\n // \\App\\Models\\Eleve::factory(120)->create();\n // \\App\\Models\\Stock::factory(2)->create();\n // \\App\\Models\\Category::factory(5)->create();\n // \\App\\Models\\Product::factory(120)->create();\n\n $this->call([\n AnneScolaireSeeder::class\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "7b81b233cbf3938d421802fdd7f8d35b", "score": "0.77587956", "text": "public function run()\n {\n $categories = [\n [\n 'name' => 'Groenten',\n 'description' => '',\n ],\n [\n 'name' => 'Fruit',\n 'description' => '',\n ],\n [\n 'name' => 'Zuivel',\n 'description' => '',\n ],\n [\n 'name' => 'Vlees',\n 'description' => '',\n ],\n ];\n\n foreach($categories as $category){\n Category::create($category);\n }\n\n //factory(Category::class, DatabaseSeeder::AMOUNT['DEFAULT'])->create();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "ab9c424e435c82e381ba211c2fe79243", "score": "0.7753077", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n // User::factory()->count(200)\n // ->has(Order::factory()->count(random_int(1, 20)))\n // ->has(Assigned_order::factory()->count(random_int(1,5)))\n // ->has(Blocked_writer::factory()->count(random_int(0, 2)))\n // ->has(Favourite_writer::factory()->count(random_int(0, 5)))\n // ->has(Payed_order::factory()->count(random_int(2, 6)))\n // ->has(Notification::factory()->count(random_int(5, 20)))\n // ->has(Review::factory()->count(random_int(1, 2)))\n // ->has(Assigned_order::factory()->count(random_int(1, 3)))\n // ->create();\n }", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "e5d1626abf07334bad40def153b6ebf5", "score": "0.7744136", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(MediaSeeder::class);\n //$this->call(GuestSeeder::class);\n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n\t DB::table('guests')->insert([\n 'roomnumber' => Category::all()->random()->id,\n 'name' => $faker->firstName,\n 'surname' => $faker->name,\n 'email' => $faker->email,\n 'phonenumber' => $faker->phoneNumber\n\t ]);\n\t }\n\n }", "title": "" }, { "docid": "8da9a1776904f6cc6a5ccc3953a8e40f", "score": "0.7742624", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('products')->insert([\n 'name' => 'Basil',\n 'price' => 0.99,\n 'description' => 'Perhaps the most popular and widely used culinary herb.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Bay Laurel',\n 'price' => 1.99,\n 'description' => 'Bay laurel is an evergreen shrub or tree in warmer growing zones ( 8 and above).',\n ]);\n DB::table('products')->insert([\n 'name' => 'Borage',\n 'price' => 2.99,\n 'description' => 'Borage is a coarse textured plant growing to about 2-3 feet.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Caraway',\n 'price' => 3.99,\n 'description' => 'Caraway is most often grown for its seeds, but the root and leaves are also edible.',\n ]);\n DB::table('products')->insert([\n 'name' => 'Catnip',\n 'price' => 4.99,\n 'description' => 'Catnip is a hardy perennial with an open mound shaped habit growing to about 2-3 feet tall.',\n ]);\n\n }", "title": "" }, { "docid": "cac69861fb7a00c50daa5b54ee724177", "score": "0.7740592", "text": "public function run()\n {\n //\n DB::table('Proveedores')->insert([\n \t[\n \t'nombre'=> 'juan perez',\n \t'marca'=> 'matel',\n \t'correo_electronico'=> '[email protected]',\n \t'direccion'=>'av. peru 321,santiago',\n \t'fono'=> 993842739\n \t]\n ]);\n\n $faker=Faker::create();\n for ($i=0; $i <20 ; $i++) { \n DB::table('Proveedores')->insert([\t\n \t'nombre'=> $faker->name,\n \t'marca'=>$faker->company,\n \t'correo_electronico'=> $faker->email,\n \t'direccion'=>$faker->address,\n \t'fono'=> $faker->isbn10 ,\n ]);\n }\n }", "title": "" }, { "docid": "9a3fc5f60166a9785c73750188e6596d", "score": "0.7737875", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n DB::table('product')->insert([\n 'title' => 'Ceci est un titre de produit',\n 'description' => 'lorem ipsum',\n 'price' => 12,\n 'brand' => 'nouvelle marque',\n ]);\n */\n factory(App\\Product::class, 2)->create();\n factory(App\\Categorie::class, 2)->create();\n }", "title": "" }, { "docid": "b6066308d0ac655bb5d5825a458ef8b1", "score": "0.77361476", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(LangauageTableSeeder::class);\n $this->call(CountryTableSeeder::class);\n\n \n\n Country::create([\n 'name' => 'India'\n ]);\n\n Country::create([\n 'name' => 'USA'\n ]);\n\n Country::create([\n 'name' => 'UK'\n ]);\n\n CompanyCateogry::updateOrCreate([\n 'name' => 'category1'\n ]);\n\n factory(App\\Models\\Customer::class, 50)->create();\n factory(App\\Models\\Supplier::class, 50)->create();\n // $this->call(CompanySeeder::class);\n $this->call(InvoiceSeeder::class);\n $this->call(CashFlowSeeder::class);\n }", "title": "" }, { "docid": "8de228115e4192b5098d2a339ff99bf2", "score": "0.7735688", "text": "public function run()\n {\n //delete the users table when the seeder is called\n DB::table('users')->delete();\n\n Eloquent::unguard();\n\n\t\t//disable foreign key before we run the seeder\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n factory(App\\User::class, 50)->create();\n\n //Also create these accounts - used for easy testing purposes\n DB::table('users')->insert([\n [\n 'name' => 'Test',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n ],\n [\n 'name' => 'Test2',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'email_verified_at' => now(),\n 'bio' => 'Sed ut perspiciatis unde omnis iste natus',\n\n ],\n ]);\n }", "title": "" }, { "docid": "e0d9bd8b4c025867e30c1a5579c4da9c", "score": "0.7734883", "text": "public function run()\n {\n\n $this->call([\n EstadosSeeder::class,\n MunicipiosSeeder::class,\n RelacionEstadosMunicipiosSeeder::class,\n StatusSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Categories::factory()->count(20)->create();\n \\App\\Models\\Products::factory()->count(100)->create();\n \\App\\Models\\Galery::factory()->count(1000)->create();\n \\App\\Models\\Providers::factory()->count(20)->create();\n \\App\\Models\\Valorations::factory()->count(1000)->create();\n \\App\\Models\\Sales::factory()->count(999)->create();\n \\App\\Models\\Directions::factory()->count(999)->create();\n \\App\\Models\\LastView::factory()->count(999)->create();\n \\App\\Models\\Offers::factory()->count(20)->create();\n // \\App\\Models\\Favorites::factory()->count(50)->create();\n \\App\\Models\\Notifications::factory()->count(999)->create();\n /**\n * $this->call([\n * CategoriesSeeder::class,\n * ]);\n */\n\n $this->call([\n FavoritesSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "79751b67da244a7913b06f140364d6c0", "score": "0.7732834", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n PartCategory::truncate();\n Brand::truncate();\n Manufacturer::truncate();\n PartSubcategory::truncate();\n Part::truncate();\n Admin::truncate();\n\n $usersQuantity = 500;\n $categoriesQuantity = 30;\n $subCategoriesQuantity = 200;\n $partQuantity = 1000;\n $brandQuantity = 20;\n $manufacturerQuantity = 50;\n $adminQuantity = 10;\n\n factory(User::class, $usersQuantity)->create();\n factory(PartCategory::class, $categoriesQuantity)->create();\n factory(Brand::class, $brandQuantity)->create();\n factory(Manufacturer::class, $manufacturerQuantity)->create();\n\n factory(PartSubcategory::class, $subCategoriesQuantity)->create();\n factory(Part::class, $partQuantity)->create();\n\n factory(Admin::class, $adminQuantity)->create();\n\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "95f6236854296207546d9b1517fa175a", "score": "0.77278304", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n // Create 10 records of posts\n factory(App\\Post::class, 10)->create()->each(function ($post) {\n // Seed the relation with 5 comments\n $commments = factory(App\\Comment::class, 5)->make();\n $post->comments()->saveMany($commments);\n });\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "f198ce46b8e947563c34aa166ca6fd70", "score": "0.772602", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\TourCategory::class, 4)->create()->each(function (\\App\\TourCategory $category) {\n $category->tours()->saveMany(\n factory(\\App\\Tour::class,10)->make()\n );\n });\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "f6e951e99c926a5aa070324982a80a85", "score": "0.7717371", "text": "public function run()\n {\n Model::unguard();\n\n $seedData = [\n 'Taiwan' => [\n 'Taipei City',\n 'New Taipei City',\n 'Taoyuan City',\n 'Taichung City',\n 'Kaohsiung City',\n 'Tainan City',\n 'Hsinchu City',\n 'Chiayi City',\n 'Keelung City',\n 'Hsinchu County',\n 'Miaoli County',\n 'Changhua County',\n 'Nantou County',\n 'Yunlin County',\n 'Chiayi County',\n 'Pingtung County',\n 'Yilan County',\n 'Hualien County',\n 'Taitung County',\n 'Kinmen County',\n 'Lienchiang County',\n 'Penghu County',\n ]\n ];\n\n foreach ($seedData as $countryName => $cityList) {\n $country = Country::create(['name' => $countryName]);\n\n foreach ($cityList as $cityName) {\n $country->cities()->create(['name' => $cityName]);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "4fc1f9ee76a037b3655d6f4e73603494", "score": "0.7714682", "text": "public function run()\n {\n //\n //factory(App\\User::class)->create();\n\n DB::table('users')->insert(\n [\n 'name' => 'Seyi', \n 'email' => '[email protected]',\n 'password' => 'somerandompassword'\n ]\n );\n DB::table('posts')->insert([\n [\n 'title' => 'My First Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My second Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ], [\n 'title' => 'My third Post', \n 'content' => 'lorem ipsum dolor sit ammet',\n 'user_id' => 1\n ]\n ]);\n \n \n }", "title": "" }, { "docid": "80b4dcada74bc12860abdaff1c2aa1bb", "score": "0.7712008", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 50) as $index) {\n DB::table('books')->insert([\n 'name' => $faker->firstName(),\n 'yearOfPublishing' => $faker->year(),\n 'content' => $faker->paragraph(1, true),\n 'author_id' => $faker->numberBetween(1, 50),\n ]);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "bd6458274ff09172851640f92c233c59", "score": "0.77101403", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n \n User::truncate();\n TipoUsuario::truncate();\n Reserva::truncate();\n PuntuacionEstablecimiento::truncate();\n PuntuacionProducto::truncate();\n Producto::truncate();\n Imagen::truncate();\n Establecimiento::truncate();\n Carta::truncate();\n\n $this->call(TipoUsuarioSeeder::class);\n\n foreach (range(1, 10) as $i){\n $u = factory(User::class)->create();\n $u->usuarios_tipo()->attach(TipoUsuario::all()->random());\n }\n\n\n //factory(Establecimiento::class,4)->create();\n //factory(Reserva::class,20)->create();\n //factory(Carta::class, 4)->create(); //Crear tantas como restaurantes\n //factory(Producto::class,100)->create();\n //factory(PuntuacionEstablecimiento::class,50)->create();\n //factory(PuntuacionProducto::class,50)->create();\n //factory(Imagen::class,200)->create();\n\n Schema::enableForeignKeyConstraints(); \n }", "title": "" }, { "docid": "7d3aed410918c722790ec5e822681b71", "score": "0.7708702", "text": "public function run() {\n \n //seed should only be run once\n $faker = Faker::create();\n\n $cat = [\n 1 => \"Home Appliances\",\n 2 => \"Fashion\",\n 3 => \"Home & Living\",\n 4 => \"TV, Gaming, Audio, WT\",\n 5 => \"Watches, Eyewear, Jewellery\",\n 6 => \"Mobiles & Tablets\",\n 7 => \"Cameras\",\n 8 => \"Computers & Laptop\",\n 9 => \"Travel & Luggage\",\n 10 => \"Health & Beauty\",\n 11 => \"Sports, Automotive\",\n 12 => \"Baby, Toys\",\n ];\n\n for ($i = 1; $i <= 12; $i++) {\n DB::table('categories')->insert([\n 'name' => $cat[$i],\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n \n 'created_at' => $faker->dateTimeThisYear($max = 'now'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "75f8fae397ad6cf1e3077c2a32e423ad", "score": "0.77076155", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n WarrantyProduct::truncate();\n\n factory(User::class, 200)->create();\n\n factory(Category::class, 10)->create()->each(\n function ($category){\n factory(Product::class, mt_rand(8,15))->create(['category_id' => $category->id])->each(\n function ($product){\n factory(WarrantyProduct::class, mt_rand(2, 3))->create(['product_id' => $product->id]);\n }\n );\n }\n );\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "ddf328298d79f78f3d971cd04aba1d68", "score": "0.7705306", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n\n\n factory(\\App\\Entities\\Category::class, 3)->create()->each(function ($c){\n $c->products()\n ->saveMany(\n factory(\\App\\Entities\\Product::class, 3)->make()\n );\n });\n }", "title": "" }, { "docid": "5f9901567b2bd8ddbdf263c78ddac102", "score": "0.7703055", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n // User Table Data\n /*for($i = 0; $i < 1000; $i++) {\n \tApp\\User::create([\n\t 'email' => $faker->email,\n\t 'password' => $faker->password,\n\t 'full_name' => $faker->name,\n\t 'phone_number' => $faker->name,\n\t ]);\n\t }*/\n\n // User Event Data\n\t /*for($i = 0; $i < 50; $i++) {\n \tApp\\Events::create([\n\t 'event_name' => $faker->name,\n\t 'event_date' => $faker->date,\n\t 'event_startTime' => '2019-01-01',\n\t 'event_duration' => '2',\n\t 'event_venue' => $faker->address,\n\t 'event_speaker' => '1',\n\t 'event_sponsor' => '3',\n\t 'event_topic' => $faker->text,\n\t 'event_details' => $faker->text,\n\t 'event_avatar' => $faker->imageUrl,\n\t 'created_at' => $faker->date(),\n\t ]);\n\t }*/\n }", "title": "" }, { "docid": "6fbcd5e15b63b9dabff8dbaff5d2ea82", "score": "0.77023256", "text": "public function run()\n {\n $faker = Factory::create();\n\n Persona::truncate();\n Pago::truncate();\n Detalle::truncate();\n\n // Schema::disableForeignKeyConstraints();\n User::truncate();\n // HaberDescuento::truncate();\n // Schema::enableForeignKeyConstraints();\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'dni' => '12345678',\n 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret\n 'remember_token' => Str::random(10),\n ]);\n\n // foreach (range(1, 25) as $i) {\n // $dni = mt_rand(10000000, 99999999);\n // Persona::create([\n // 'nombre' => $faker->firstname,\n // 'apellidoPaterno' => $faker->lastname,\n // 'apellidoMaterno' => $faker->lastname,\n // 'dni' => $dni,\n // 'codmodular' => '10' . $dni,\n // 'user_id' => 1,\n // 'estado' => $faker->randomElement(['activo', 'inactivo']),\n // ]);\n // }\n\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "4e84e995d3e716ac7ab157ddfcc67a39", "score": "0.7700629", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tag::class, 10)->create();\n\n // Get all the roles attaching up to 3 random roles to each user\n $tags = App\\Tag::all();\n\n\n factory(App\\User::class, 10)->create()->each(function($user) use ($tags){\n $user->save();\n factory(App\\Question::class, 5)->create(['user_id'=>$user->id])->each(function($question) use ($user, $tags){\n \n $question->tags()->attach(\n $tags->random(rand(1, 10))->pluck('id')->toArray()\n ); \n factory(App\\Comment::class, 5)->create(['user_id'=>$user->id, 'question_id'=>$question->id])->each(function($comment){\n $comment->save(); \n });\n });\n });\n }", "title": "" }, { "docid": "44607c99534f6f67a920e806653b05d8", "score": "0.76990753", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \\App\\Models\\Rol::factory(10)->create();\n \\App\\Models\\Persona::factory(10)->create();\n \\App\\Models\\Configuracion::factory(10)->create();\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "55df2400596f6d82130eb26db7635b8b", "score": "0.7695885", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contact::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n Contact::create([\n 'first_name' => $faker->name,\n 'last_name' => $faker->name,\n 'email' => $faker->email,\n 'telephone' => $faker->phoneNumber,\n 'contact_type' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "d250f232a40eb13d0fa688dd5dc63e8c", "score": "0.7693821", "text": "public function run()\n {\n factory(App\\User::class,5)->create();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'type' => 1,\n 'confirmed' =>1,\n ]);\n\n factory(App\\Category::class,5)->create();\n\n $categories_array = App\\Category::all('id')->pluck('id')->toArray();\n\n $post = factory(App\\Post::class,20)->create()->each(function($post) use ($categories_array){\n $this->attachRandomCategoriesToPost($post->id, $categories_array);\n $this->addCommentsToPost($post->id);\n });\n }", "title": "" }, { "docid": "f440a18e1170b8250c14144757b8cc81", "score": "0.76937693", "text": "public function run()\n\t{\n\t\t//\n\t\tApp\\Book::truncate();\n\t\tApp\\Genre::truncate();\n\t\tApp\\Author::truncate();\n\n\t\tfactory(App\\Book::class, 50)->create()->each(function($books) {\n\t\t$books->authors()->save(factory(App\\Author::class)->make());\n\t\t$books->genres()->save(factory(App\\Genre::class)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "dbd59b913d32cfed4a7fd5cda3083940", "score": "0.7692271", "text": "public function run()\n {\n //\n DB::table('oa')->delete();\n\n DB::table('oa')->insert([\n /*'id' => 1,*/\n /*'id_educativo' => 1,\n 'id_general' => 1,\n 'id_clasificacion' => 1,\n 'id_tecnica' => 1,*/\n ]);\n\n $this->call(Lom_generalSeeder::class);\n $this->call(Lom_clasificacionSeeder::class);\n $this->call(Lom_educativoSeeder::class);\n $this->call(Lom_tecnicaSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "82fbb499231e85aef13b133c2fd7bebb", "score": "0.76907074", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Tomas Landa',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n ]);\n\n\n $this->call(AuthorSeeder::class);\n $this->call(BookSeeder::class);\n\n\n }", "title": "" }, { "docid": "7d5e2b097fa405f728e42815bc2fa95f", "score": "0.76902896", "text": "public function run()\n {\n Category::create(['name' => 'remeras']);\n Category::create(['name' => 'camperas']);\n Category::create(['name' => 'pantalones']);\n Category::create(['name' => 'gorras']);\n Category::create(['name' => 'mochilas']);\n Category::create(['name' => 'Sombreros']);\n Category::create(['name' => 'Muñequeras']);\n Category::create(['name' => 'Medias']);\n\n $discounts = Discount::factory(40)->create();\n\n $products = Product::factory(50)\n ->make()\n ->each(function ($product){\n $categories = Category::all();\n $product->category_id = $categories->random()->id;\n $product->save();\n });\n\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "1bfaef844c455e578ca42264d7b5fd55", "score": "0.76846653", "text": "public function run()\n {\n factory(User::class, 10)->create();\n factory(Category::class, 6)->create();\n factory(Question::class, 60)->create();\n factory(Reply::class, 160)->create();\n factory(Like::class, 200)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "b9641bc88f5f5c670d56d18a040a9927", "score": "0.7675924", "text": "public function run()\n {\n //création de seeder grace a faker\n // $faker = Faker::create();\n // for ($user = 0; $user < 10; $user++){\n // \\App\\User::create([\n // 'name' => $faker->name,\n // 'email' => $faker->unique()->safeEmail,\n // 'password' =>bcrypt('secret')\n // ]);\n // }\n \\App\\User::create([\n 'name' =>'Admin',\n 'email' => '[email protected]',\n 'password' =>bcrypt('adminadmin'),\n 'admin' =>1\n ]);\n\n\n //permet de créer des utilisateurs sans les relations\n factory(\\App\\User::class, 20)->create();\n\n //permet de créer 10 articles chacun écrit par un seul utilisateur\n // factory(\\App\\User::class, 10)->create()->each(function ($u) {\n // $u->articles()->save(factory(\\App\\Article::class)->make());\n // });\n\n //Permet de creer 20 articles par utilisateur -> 15x 20\n // $user = factory(\\App\\User::class, 15)->create();\n // $user->each(function ($user) {\n // factory(\\App\\Article::class, 20)->create([\n // 'user_id' => $user->id\n // ]);\n // });\n }", "title": "" }, { "docid": "0a79213fd15a52faa35b5d39bdf72ab9", "score": "0.7673569", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Categoria::class, 2)->create();\n\n //Se crearan 40 post\n factory(App\\Curso::class, 40)->create();\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fec3323e6f3a81f6348e08d8097828b8", "score": "0.76672584", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Listing::truncate();\n\n $userQuantity=5;\n $listingQnt=100;\n\n factory(App\\User::class,$userQuantity)->create();\n factory(App\\Listing::class,$listingQnt)->create();\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "2344b2d3d5ee3f98e7bbbe7784cad8c9", "score": "0.7663209", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n $counry = Country::inRandomOrder()->first()->country;\n $city = City::inRandomOrder()->where('country', $counry)->first()->city;\n\n Agencies::create([\n 'name' => $faker->company,\n 'address' => $faker->address,\n\t\t\t\t'city' => $city,\n\t\t\t\t'countri' => $counry,\n\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'web' => \"www.addadadadad.com\",\n ]);\n }\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "47d7ad0594d6fea4c95ece125a11f12f", "score": "0.76622707", "text": "public function run()\n {\n\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('menus')->insert([\n 'title' => $faker->firstName(),\n 'price' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2),\n 'meat' => $faker->randomNumber(2),\n 'about' => $faker->realText(rand(10, 20))\n ]);\n }\n\n //\n foreach (range(1, 10) as $_) {\n $faker = Factory::create();\n DB::table('restaurants')->insert([\n 'title' => $faker->company(),\n 'customer' => $faker->randomNumber(2),\n 'employee' => $faker->randomNumber(2),\n // 'menu_id' => $faker->randomNumber(1),\n\n ]);\n }\n }", "title": "" }, { "docid": "317d47304eb6df80c5511ceb3b9b995f", "score": "0.76618236", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n $faker = Faker\\Factory::create();\n for ($i=0; $i < 10; $i++) { \n BeTagModel::create([\n 'name' => $faker->sentence,\n 'name_alias' => implode('',$faker->sentences(4)),\n 'status' => $faker->randomDigit(),\n 'created_by' => $faker->unixTime(),\n 'updated_by' => $faker->unixTime(),\n 'created_at' => $faker->unixTime(),\n 'updated_at' => $faker->unixTime(),\n ]);\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "0de657d649c6926b71b8f5e0b4af5374", "score": "0.76618147", "text": "public function run() {\n // Example list, this seed will only create admin role, if you wanna create user account, please use normal register.\n // The pattern for each list value will be array[0] for username, array[1] for password (it will be hashed later, calma) and array[2] for email.\n // Add as many as you like.\n $list = array(\n array('pulselab', 'nopassword', '[email protected]'),\n );\n\n DB::collection('users')->delete();\n DB::collection('users')->insert(array_map(function($o) {\n return array(\n 'username' => $o[0],\n 'password' => app('hash')->make(sha1($o[1])),\n 'email' => $o[2],\n 'facebook_id' => '',\n 'twitter_id' => '',\n 'point' => 0,\n 'role' => 'admin',\n 'word_translated' => 0,\n 'word_categorized'=> 0,\n 'languages'\t\t => '',\n 'isconfirmed'\t => true,\n 'resetcode'\t\t => '',\n 'isVirgin' => 0,\n );\n }, $list));\n }", "title": "" }, { "docid": "591cc779df1a315a5bb877f8e1fe4600", "score": "0.7660859", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('indicadores')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('indicadores')->insert([\n 'rels' => json_encode([$faker->words(3)]),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->sentence,\n 'ano_inicial' => $faker->numberBetween(2019,2025),\n 'ano_final' => $faker->numberBetween(2025,2030),\n 'status_atual' => $faker->randomNumber(3),\n 'status_final' => $faker->boolean(),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "9bf3fa05d4ae071adbab0386bc123da6", "score": "0.7660738", "text": "public function run()\n {\n $data = [];\n $faker = Factory::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'email' => $faker->email(),\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n }\n\n $users = $this->table(DbConfig::DB_USER_TABLE);\n $users->insert($data)\n ->saveData();\n }", "title": "" }, { "docid": "4928806405a07b1df0cb55aaf31cc6fd", "score": "0.76591706", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Section::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Section in our database:\n for ($i = 0; $i < 10; $i++) {\n Section::create([\n 'name' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "ac091d03c70afaa39edeb6588c3c3993", "score": "0.7657682", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //semillero cuando se ejecute el comando migrate se crearan en automatico los datos\n factory(User::class)->create(['email'=>'[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n }", "title": "" } ]
80279177344d268417ecedef19272480
Specify Validator class name.
[ { "docid": "bc6c6997940edb2c5c6c0d3fdbc7e54d", "score": "0.63959974", "text": "public function validator()\n {\n return ZfpzValidator::class;\n }", "title": "" } ]
[ { "docid": "89ec083674a5ceecd030e19393e0efdf", "score": "0.69733196", "text": "public function validator()\n {\n return VendorValidator::class;\n }", "title": "" }, { "docid": "5927fcaa81eed4e4a6d93a29fba40782", "score": "0.69730306", "text": "public function validator()\n {\n\n return CompanyValidator::class;\n }", "title": "" }, { "docid": "eed3e19d8eda71389b01aed74453c799", "score": "0.693754", "text": "public function validator()\n {\n\n return ContractFileValidator::class;\n }", "title": "" }, { "docid": "7aed44a88b17f16517acf5008c277295", "score": "0.6903534", "text": "public function validator()\n {\n\n return AccountValidator::class;\n }", "title": "" }, { "docid": "d8f479c968eb6bb81e9032c7ced55308", "score": "0.6894097", "text": "public function validator()\n {\n\n return DespesasValidator::class;\n }", "title": "" }, { "docid": "053197727a94c3f96157868ed3a8bcc5", "score": "0.6887514", "text": "public function validator()\n {\n return UserValidator::class;\n }", "title": "" }, { "docid": "f4706ba5671847d4f89e9edff45915f5", "score": "0.6859855", "text": "public function validator()\n {\n\n return AlertValidator::class;\n }", "title": "" }, { "docid": "b55a3e983e479e0b343e7b568143bdff", "score": "0.6857024", "text": "public function validator()\n {\n\n return UserValidator::class;\n }", "title": "" }, { "docid": "300b3b6b6f03ea0235deb4fcc2a981a8", "score": "0.68135417", "text": "public function validator()\n {\n return EmployeeReportValidator::class;\n }", "title": "" }, { "docid": "03eb8e760202166e833eac8317112722", "score": "0.68121976", "text": "public function validator()\n {\n return SmsValidator::class;\n }", "title": "" }, { "docid": "29e679d42adf94269cd1f0112234ddad", "score": "0.67958105", "text": "public function validator()\n {\n return EmployeeApproverValidator::class;\n }", "title": "" }, { "docid": "589ae9aaf3e6f9ed391ed68e57d57387", "score": "0.67665774", "text": "public function validator()\n {\n\n return CatalogoValidator::class;\n }", "title": "" }, { "docid": "c46baf4bcbb1633dc0594ac192aa299e", "score": "0.6752202", "text": "public function validator()\n {\n return \"App\\\\Validators\\\\RouteValidator\";\n }", "title": "" }, { "docid": "22beb463a4abb3306d8d0b2d64bc8ab6", "score": "0.6747182", "text": "public function validator(){\n\t\treturn BillValidator::class;\n\t}", "title": "" }, { "docid": "db895421056dc54cd16e8a0f712b6541", "score": "0.6734733", "text": "public function validator()\n {\n return BooksetValidator::class;\n }", "title": "" }, { "docid": "f7038f4b8089718df7ef7156f6163ed8", "score": "0.6722491", "text": "public function validator()\n {\n\n return ElectricAccountValidator::class;\n }", "title": "" }, { "docid": "f7e18c7baff31c65491ca4c0b545411d", "score": "0.670252", "text": "public function validator()\n {\n\n return UserMessageValidator::class;\n }", "title": "" }, { "docid": "b004c5596cf70361a5ab4211372251fd", "score": "0.66948736", "text": "public function setValidator($className) {\n Jm_Util_Checktype::check('string', $className);\n $this->validatorClass = $className;\n return $this;\n }", "title": "" }, { "docid": "4776e693437739e479b6574748bdad52", "score": "0.66655797", "text": "public function validator()\n {\n\n return ContestValidator::class;\n }", "title": "" }, { "docid": "fc4aae1171abbf910bc48481e0d620d9", "score": "0.66445106", "text": "public function validator()\n {\n return BannerValidator::class;\n }", "title": "" }, { "docid": "3a1fc20422c49d06ef2f6172800df4c4", "score": "0.6608971", "text": "public function validator()\n {\n\n return CalendarioValidator::class;\n }", "title": "" }, { "docid": "d77176d5ba4c8a8ffb9a3569c1ec90c5", "score": "0.6601298", "text": "public function validator()\n {\n\n return OrigemVendaValidator::class;\n }", "title": "" }, { "docid": "1293d233f871306a4f3267afb510b173", "score": "0.6578772", "text": "protected function getClientClassName()\n\t{\n\t\treturn 'Prado.WebUI.TEmailAddressValidator';\n\t}", "title": "" }, { "docid": "309588aa0e1e08baa616542d678d362b", "score": "0.6576723", "text": "public function validator()\n {\n\n return CrawlerDataValidator::class;\n }", "title": "" }, { "docid": "f42e06e1774c1dfdf122e8648a090648", "score": "0.6567396", "text": "public function validator()\n {\n\n return SignatureValidator::class;\n }", "title": "" }, { "docid": "b4fb556795c83b4c9bc7a07b1c5d103e", "score": "0.65576404", "text": "public function validator()\n {\n\n return CalledStatusValidator::class;\n }", "title": "" }, { "docid": "a73f1d3278d0150c8d83520e5485f67d", "score": "0.6555193", "text": "public function setName($name) {\n $this->validatorName = $name;\n }", "title": "" }, { "docid": "58a1fdb1ef8cc40d3032457f81e9cb4a", "score": "0.655396", "text": "public function validator()\n {\n\n return MachineValidator::class;\n }", "title": "" }, { "docid": "2576c136c34c60b0743f3b2038f9a556", "score": "0.65419763", "text": "public function validator()\n {\n\n return ElectionResultValidator::class;\n }", "title": "" }, { "docid": "2f3037e3a68d5b0a6af0225d5b851eed", "score": "0.6539645", "text": "public function validator()\n {\n return AddressValidator::class;\n }", "title": "" }, { "docid": "8b0af5610c5218a1dcc12f16429ce0eb", "score": "0.65359646", "text": "public function validator()\n {\n\n return GameBetValidator::class;\n }", "title": "" }, { "docid": "bfe8b8e77cd1c27d90aa6377d5dc5abe", "score": "0.6512931", "text": "public function validator()\n {\n\n return IssueValidator::class;\n }", "title": "" }, { "docid": "6a26c1e82ea8f3792f1892c0d2df5254", "score": "0.6509391", "text": "public function validator()\n {\n\n return AlunoTurmaValidator::class;\n }", "title": "" }, { "docid": "f91b4873c1d103feb258126c7ee50d7b", "score": "0.65058494", "text": "public function validator()\n {\n return LoginLogValidator::class;\n }", "title": "" }, { "docid": "b1b7330c562a5dc5d6e9cc7d3d7c2c9b", "score": "0.6504048", "text": "public function validator()\n {\n\n return GroupValidator::class;\n }", "title": "" }, { "docid": "35f788e2340b4ffe6dbd199b6202fa36", "score": "0.64833176", "text": "public function validator()\n {\n return FaqValidator::class;\n }", "title": "" }, { "docid": "b5c0e5f7813a4f4179e4e7fecc567b14", "score": "0.64770424", "text": "public function validator()\n {\n\n return FlowDepartmentsValidator::class;\n }", "title": "" }, { "docid": "0f526710a8327a3356c5164017a3d178", "score": "0.6474319", "text": "public function validator()\n {\n return ExaminationValidator::class;\n }", "title": "" }, { "docid": "6fc0dcb513dd51421262c5d64c0444a9", "score": "0.64733106", "text": "public function validator()\n {\n\n return BillDetailValidator::class;\n }", "title": "" }, { "docid": "edfeac8c61ebe8daaf1641345062cbbc", "score": "0.6447356", "text": "public function validator()\n {\n\n return PerguntaValidator::class;\n }", "title": "" }, { "docid": "b08523fee2e4a1c33596d473e8b4dc1d", "score": "0.64405096", "text": "public function validator()\n {\n return WorkExperienceValidator::class;\n }", "title": "" }, { "docid": "0ad1a9c741fc32c943a7084c8aecd8b8", "score": "0.6438643", "text": "public function validator()\n {\n\n return RoutineRoleValidator::class;\n }", "title": "" }, { "docid": "85c4844f6d9318420d940ced59bb3ee8", "score": "0.6427682", "text": "public function newValidator($class, ...$args);", "title": "" }, { "docid": "5cfb51e794b8a2e159acefc8fda7be43", "score": "0.64189535", "text": "public function getName() {\n return $this->validatorName;\n }", "title": "" }, { "docid": "e76863c64682abd0633ada16039cf111", "score": "0.6383801", "text": "public function validator()\n {\n\n return SolicitacaoDeMaterialValidator::class;\n }", "title": "" }, { "docid": "49357715142166823574b22ebc6b57fb", "score": "0.6360491", "text": "public function validator()\n {\n\n return ScheduleByBarberValidator::class;\n }", "title": "" }, { "docid": "d2d3fe2601398aa8785edf938d6e327a", "score": "0.6345488", "text": "public function validator()\n {\n\n return InstituitonValidator::class;\n }", "title": "" }, { "docid": "d95329bb6e0c28e600ce3147f2421a47", "score": "0.6332415", "text": "public function validator()\n {\n\n return InstitutionsValidator::class;\n }", "title": "" }, { "docid": "e351fb8544634ee8938cf3302dda347c", "score": "0.6315874", "text": "public function validator()\n {\n\n return DepartamentoValidator::class;\n }", "title": "" }, { "docid": "05dc63a75ed9d41696003a4d5ae07d07", "score": "0.63097477", "text": "public function validator()\n {\n return ReferralTypeValidator::class;\n }", "title": "" }, { "docid": "75d2f1f7fa5eca562cbd84f14be5e543", "score": "0.6299483", "text": "public function validator()\n {\n\n return ProductClientValidator::class;\n }", "title": "" }, { "docid": "3ab5a00e2fd87182677131e0da2cea3c", "score": "0.6269669", "text": "public function validator(){\n\t\treturn OrderValidator::class;\n\t}", "title": "" }, { "docid": "d949bbe77c55a88bd44bb1eecf3915b9", "score": "0.62679446", "text": "public function validator()\n {\n\n return PostValidator::class;\n }", "title": "" }, { "docid": "b5e55ff096196623e09ef807f4a2e0b9", "score": "0.6264178", "text": "public function validator()\n {\n\n return RepositoriesValidator::class;\n }", "title": "" }, { "docid": "f4882d4d6d193768e6346ca94bdb56e7", "score": "0.6221344", "text": "public function validatorClass($resource, $modelClass=null)\n {\n if ($modelClass) {\n return $this->findClass($modelClass.'Validator');\n }\n\n return $this->findClass($this->className($resource).'Validator');\n }", "title": "" }, { "docid": "b7fef386b34667f9244149451e18e9bd", "score": "0.6219222", "text": "public function validator()\n {\n\n return RoleValidator::class;\n }", "title": "" }, { "docid": "b7fef386b34667f9244149451e18e9bd", "score": "0.6219222", "text": "public function validator()\n {\n\n return RoleValidator::class;\n }", "title": "" }, { "docid": "bc492cffea1a23925d98471abd4a241b", "score": "0.62160003", "text": "public function validator()\n {\n\n return TaskStatusValidator::class;\n }", "title": "" }, { "docid": "fd8781375d962093486d8ec5869dfe58", "score": "0.6214224", "text": "public function validator()\n {\n\n return CategoryValidator::class;\n }", "title": "" }, { "docid": "2f00a140c7acfa67c12a371c2b2db69c", "score": "0.6201897", "text": "public function validator()\n {\n\n return LogisticsValidator::class;\n }", "title": "" }, { "docid": "d4e027e901bb2ce86021d17b536d1624", "score": "0.61992687", "text": "public function validator()\n {\n\n return StockValidator::class;\n }", "title": "" }, { "docid": "7e6daedc5f30cf5cd2c4aad4f5d6e8fb", "score": "0.6193464", "text": "public function validator()\n {\n // Return empty is to close the validator about create and update on the repository.\n return AuthValidator::class;\n }", "title": "" }, { "docid": "aba8939fe585c7745ce9de8962f9a07b", "score": "0.6158598", "text": "public function validator()\n {\n\n return OrdersStatusValidator::class;\n }", "title": "" }, { "docid": "ffefc18015d3d30e598cb1f796abc184", "score": "0.61437815", "text": "public function validator()\n {\n\n return TaskActionValidator::class;\n }", "title": "" }, { "docid": "a1f8209483b78233219c5362dcd87ff3", "score": "0.61403954", "text": "public function validator()\n {\n\n return ClusterInfoValidator::class;\n }", "title": "" }, { "docid": "c7598c4ea5c28206b1be44e8e8606af7", "score": "0.61314875", "text": "public function validator()\n {\n\n return ServicoSublimacaoLocalizadaFullPrintValidator::class;\n }", "title": "" }, { "docid": "0384648c97a275672a76ec6647d2816a", "score": "0.6131012", "text": "public function getValidator();", "title": "" }, { "docid": "0384648c97a275672a76ec6647d2816a", "score": "0.6131012", "text": "public function getValidator();", "title": "" }, { "docid": "0384648c97a275672a76ec6647d2816a", "score": "0.6131012", "text": "public function getValidator();", "title": "" }, { "docid": "0384648c97a275672a76ec6647d2816a", "score": "0.6131012", "text": "public function getValidator();", "title": "" }, { "docid": "986293b9300a6593aeac98aa705068c3", "score": "0.6039136", "text": "public function validator()\n {\n\n return OrderDetailValidator::class;\n }", "title": "" }, { "docid": "c1c557d4ad26036365f408329f32a306", "score": "0.60238415", "text": "abstract protected function getValidatorProvider();", "title": "" }, { "docid": "19411206023fb9003a9b392357288f23", "score": "0.60155773", "text": "public function validator()\n {\n\n return ModalidadesValidator::class;\n }", "title": "" }, { "docid": "a8d3922d2ea2abfcbf8f6e0a16bcfd78", "score": "0.598765", "text": "public function validator() {\n\n return CandidatoValidator::class;\n }", "title": "" }, { "docid": "d7a8030225255b9ea986482cef157190", "score": "0.5983005", "text": "public function validator()\n {\n\n return ActivitySessionValidator::class;\n }", "title": "" }, { "docid": "85355f7872e2aa24c1ef857d2ad485eb", "score": "0.59775656", "text": "public function validatedBy()\n {\n $pathParts = explode('\\\\', get_class($this));\n return 'Symfony\\\\Component\\\\Validator\\\\Constraints\\\\' . end($pathParts) . 'Validator';\n }", "title": "" }, { "docid": "84c1e5081287c501b30b9f467feffc17", "score": "0.5948291", "text": "public function validator()\n {\n\n return ResetPasswordValidator::class;\n }", "title": "" }, { "docid": "159afee6bd8342394afdd59cebb01807", "score": "0.5933888", "text": "public function validator()\n {\n\n return MkOsValidator::class;\n }", "title": "" }, { "docid": "9bcbb555679f1c90c3f72d046cf92725", "score": "0.59196514", "text": "private function getRuleClassname(): string\n {\n $classname = sprintf('Intervention\\Validation\\Rules\\%s', $this->parse('rule'));\n \n if (! class_exists($classname)) {\n trigger_error(\n \"Error: Unable to create not existing rule (\" . $classname . \")\",\n E_USER_ERROR\n );\n }\n\n return $classname;\n }", "title": "" }, { "docid": "e6bfc901152780d7882ebc012fa9b2d3", "score": "0.58708084", "text": "public function registerValidator($name, $validatorClass)\n {\n $this->validators[$name] = $validatorClass;\n\n return $this;\n }", "title": "" }, { "docid": "18c6006d6c2ce636e6b301145cbc76af", "score": "0.5865919", "text": "public function validator()\n {\n\n return BlockNomemclatureValidator::class;\n }", "title": "" }, { "docid": "0fbd26a07901373e2bf4e2744c2c6e93", "score": "0.5840385", "text": "public function __construct()\n {\n $this->validator = new Validator;\n }", "title": "" }, { "docid": "7e6aef1e411f28c566977c5e4179fdb0", "score": "0.5805338", "text": "public static function getPatternForValidator()\n {\n return '%s/Laminas_Validate.php';\n }", "title": "" }, { "docid": "64abdfd5100de19e9fcac132c3008ba9", "score": "0.5799473", "text": "public function validator()\n {\n\n return RolePermissionsValidator::class;\n }", "title": "" }, { "docid": "a53d68f0196fc9caac9870a4c5d86f0d", "score": "0.5761118", "text": "public function get(string $name): ValidatorInterface\n {\n $classnames = json_decode(\n $this->cache->find(\n 'validators',\n $this->getCacheCallback()\n )->get(),\n true\n );\n if (!array_key_exists($name, $classnames)) {\n throw new InvalidClassnameException(\n sprintf('Cannot find validator class for rule: %s', $name)\n );\n }\n\n return $classnames[$name]::resolve();\n }", "title": "" }, { "docid": "332e79914d283d69eaf4a16bbdb7f81f", "score": "0.5743756", "text": "public function validateRules($class_name = false)\n {\n }", "title": "" }, { "docid": "323779744eea86f76b04ddf0f844dadb", "score": "0.5732093", "text": "protected function defaultValidators()\n {\n return [FileValidator::className()];\n }", "title": "" }, { "docid": "5d0065aed49de7adf40f376b598d85fa", "score": "0.57245433", "text": "public function validator()\n {\n\n return MkMovimentacaoBancariaValidator::class;\n }", "title": "" }, { "docid": "f8b89c5e456ad779652d84fec320c1aa", "score": "0.5697122", "text": "public function validator()\n {\n\n }", "title": "" }, { "docid": "a4c4c317008e069f0c6a00e61742b48b", "score": "0.56873566", "text": "public function validator($validator) {\n $initName = ucfirst(strtolower($validator));\n if (in_array(strtolower($initName), $this->_loadedModels)) {\n return;\n }\n else {\n if ($this->_modelsPath !== '') {\n $validator = 'Model_' . ucfirst(strtolower($validator)) . '.php';\n $location = str_replace(\"\\\\\", \"/\", $this->_modelsPath . $validator);\n if (file_exists($location)) {\n $this->_loadedModels[] = $initName;\n $this->loadClass($initName, NULL, NULL, $location, 'validator');\n }\n else {\n // Model file could not be found\n $this->throwError(6);\n }\n }\n else {\n // Models folder could not be located\n $this->throwError(5);\n }\n }\n }", "title": "" }, { "docid": "df02d27f213d101b44d10da2e6a0b80a", "score": "0.5673474", "text": "public static function create($name) {\n // Get the requested validator class name\n $className = App::getInstance()->getConf()->getValidator($name);\n\n // Instantiates the corresponding validator\n $validator = new $className();\n\n // If the validator does not extend the Validator class, throw an exception\n if (!$validator instanceof Validator) {\n throw new ValidatorException('The class [' . $className . '] specified for the validator [' . $name . '] is not a valid Validator class');\n }\n\n // Setup\n $validator->setup();\n\n return $validator;\n }", "title": "" }, { "docid": "da5311cb80d9400e332d45aef5ed5d57", "score": "0.5662884", "text": "public static function registerValidator( $name )\n\t{\n\t\tarray_push( self::$registered_validators, $name );\n\t\tself::$registered_validators = array_unique(self::$registered_validators);\n\t}", "title": "" }, { "docid": "d30098b3dc084411ae618ffa6115e470", "score": "0.56530225", "text": "public function validator(){\n $this->runValidation(new ReqValidator($this, ['field'=>'category_name', 'msg' => 'Category name is required.']));\n $this->runValidation(new MaxValidator($this, ['field'=>'category_name', 'rule'=>100, 'msg' => 'Category name must be less than 100 characters']));\n $this->runValidation(new AlphaNumValidator($this, ['field'=>'category_name', 'msg' => 'Category name can only contain letters, numbers and spaces']));\n }", "title": "" }, { "docid": "74163790028149a3f4b8ee86989e4f9b", "score": "0.5645783", "text": "protected function registerValidator()\n {\n $extend = static::canUseDependentValidation() ? 'extendDependent' : 'extend';\n\n $this->app['validator']->{$extend}('phone', Validation\\Phone::class . '@validate');\n }", "title": "" }, { "docid": "4c98f932061a71c3e4ad76561813b1a8", "score": "0.5643656", "text": "static function GetValidator($name){\n\t\tif(!array_key_exists($name,static::$validators))\n\t\t\treturn null;\n\t\treturn static::$validators[$name];\n\t}", "title": "" }, { "docid": "5b5e80a3cd45a5b4165f0f9c9d57f570", "score": "0.5577753", "text": "public function setValidator(Factory $validator);", "title": "" }, { "docid": "ec19d8dbdcde2f30e4e0d9fb82192131", "score": "0.55747545", "text": "public function getValidator(): ValidatorInterface;", "title": "" }, { "docid": "e23bd96ec3e701def3ca0c5eee6d9fcf", "score": "0.555295", "text": "public function name(): string\n {\n return 'KickUsersValidation';\n }", "title": "" }, { "docid": "3157fc3c07f29d16d0f80b21870f541d", "score": "0.55491954", "text": "function getJsValidatorName($name) \n{\t\n\tswitch ($name) \n\t{\n\t\tcase \"Number\":\n\t\t\treturn \"IsNumeric\";\n\t\t\tbreak;\n\t\tcase \"Password\":\n\t\t\treturn \"IsPassword\";\n\t\t\tbreak;\n\t\tcase \"Email\":\n\t\t\treturn \"IsEmail\";\n\t\t\tbreak;\n\t\tcase \"Currency\":\n\t\t\treturn \"IsMoney\";\n\t\t\tbreak;\n\t\tcase \"US ZIP Code\":\n\t\t\treturn \"IsZipCode\";\n\t\t\tbreak;\n\t\tcase \"US Phone Number\":\n\t\t\treturn \"IsPhoneNumber\";\n\t\t\tbreak;\n\t\tcase \"US State\":\n\t\t\treturn \"IsState\";\n\t\t\tbreak;\n\t\tcase \"US SSN\":\n\t\t\treturn \"IsSSN\";\n\t\t\tbreak;\n\t\tcase \"Credit Card\":\n\t\t\treturn \"IsCC\";\n\t\t\tbreak;\n\t\tcase \"Time\":\n\t\t\treturn \"IsTime\";\n\t\t\tbreak;\n\t\tcase \"Regular expression\":\n\t\t\treturn \"RegExp\";\n\t\t\tbreak;\t\t\t\t\t\t\n\t\tdefault:\n\t\t\treturn $name;\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "f423e1f9a829893f7094a4b5bead3f9d", "score": "0.5547972", "text": "abstract protected function getValidator(array $options = []);", "title": "" } ]
6fbebf14c22a2326a021d6991812b7b9
Check if an array as at least one associative keys.
[ { "docid": "5a4ebd40fa150d756a088c0fccd3a653", "score": "0.75382173", "text": "private function is_assoc(array $array) {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" } ]
[ { "docid": "40a917c8c286d7d7f05af1efdcea873b", "score": "0.77840924", "text": "function is_assoc($array) {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n}", "title": "" }, { "docid": "d821bcbc52b7b1c2835652a96f1061db", "score": "0.7778938", "text": "function is_assoc($array) {\n return is_array($array) && (bool)count(array_filter(array_keys($array), 'is_string'));\n}", "title": "" }, { "docid": "13dc199413a5898e6b9a3fdb62ab4b75", "score": "0.77746993", "text": "private function isAssociativeArray($array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "9052099bbfe82f89a682b2c16f832e7f", "score": "0.77725726", "text": "function is_assoc($array)\n{\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n}", "title": "" }, { "docid": "92fcd5d35387e0e4c9e4f72d1967890c", "score": "0.7751759", "text": "function is_associative_array( array $array )\n {\n if ( $array == [] ) {\n return true;\n }\n $keys = array_keys( $array );\n if ( array_keys( $keys ) !== $keys ) {\n foreach ( $keys as $key ) {\n if ( ! is_numeric( $key ) ) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "66f102153d845b7784e0bbf0dffaa4cf", "score": "0.7743255", "text": "function is_assoc($array) {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n}", "title": "" }, { "docid": "e08c9ce3f4a381e7cc463d50a4657eea", "score": "0.7705789", "text": "function isAssociativeArray($array): bool\n {\n return array_keys($array) !== range(0, (is_countable($array) ? count($array) : 0) - 1);\n }", "title": "" }, { "docid": "f0de6364f5072d4d945ae6ded80eb462", "score": "0.77031046", "text": "function is_assoc(array $a): bool {\n $count_of_string_keys_in_array = p\\pipe([\n larray_keys(),\n lfilter(fn($x) => is_string($x)),\n fn($x) => count($x),\n ])($a);\n return $count_of_string_keys_in_array > 0;\n}", "title": "" }, { "docid": "d440b32aa4d592ffa93ebf5b81736171", "score": "0.76930153", "text": "private static function arrayIsAssociative($array){\n\t\treturn (bool)count(array_filter(array_keys($array), 'is_string'));\n\t}", "title": "" }, { "docid": "573148ab3736665c6c84fa3aa4dcd417", "score": "0.7640067", "text": "function is_assoc_array ( $array )\n{\n\t$return = null;\n\tif ( !is_array( $array ) )\n\t{\n\t\t$return = false;\n\t}\n\telse\n\t{\n\t\t$return = (bool) count( array_filter( array_keys( $array ), 'is_string' ) );\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "74c2c14d486e3e79e8a9fa1b39776b23", "score": "0.7634971", "text": "private function __isAssoc($array)\n {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "b6b804f1ece327043fc81af48ee2a1cc", "score": "0.7630463", "text": "private function isAssoc($array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "4ea86b8e99831ada9c108e7b2b858c38", "score": "0.7584291", "text": "function x_is_assoc($arr)\n{\n return is_array($arr) && !empty($arr) && ($c = count($arr)) && array_keys($arr) !== range(0, $c - 1);\n}", "title": "" }, { "docid": "b655b64bbaa16abc0c28c8c60d8df05a", "score": "0.75724286", "text": "public static function isAssoc($array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "316fa206d35abb52a5fea64841de5de4", "score": "0.75523806", "text": "function isAssoc($array)\n{\n return (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n}", "title": "" }, { "docid": "a8525804882243c08adc574ca002535a", "score": "0.75225484", "text": "public static function isAssoc($array) {\n return (is_array($array) && 0 !== count(array_diff_key($array, array_keys(array_keys($array)))));\n }", "title": "" }, { "docid": "bb2e66a9a6b329117d4fe3f31892f8ea", "score": "0.7518248", "text": "protected function _isAssoc($array) {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "01eb5c188621269f4a50f0f4c29dfd83", "score": "0.75039196", "text": "function array_is_associative(array $array)\n {\n if ($array == []) {\n return true;\n }\n\n $keys = array_keys($array);\n\n if (array_keys($keys) !== $keys) {\n foreach ($keys as $key) {\n if (!is_numeric($key)) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "78bd489e4a0002312186f68b86e50e65", "score": "0.74939024", "text": "function is_assoc_array($data) {\n\t\treturn is_array($data) && !empty($data) && !preg_match('/^\\d+$/', implode('', array_keys($data)));\n\t}", "title": "" }, { "docid": "bd16e6dd6ad65ceb723f8853d81baf35", "score": "0.7487216", "text": "private function isAssoc(array $array)\n {\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "844c6629112d11dbf402a0b1c91871b1", "score": "0.7475375", "text": "protected function isAssociative(array $array)\n\t{\n\t\treturn count(array_filter(array_keys($array), 'is_string')) > 0;\n\t}", "title": "" }, { "docid": "db43c09af4c32db8c549cdc397687f95", "score": "0.74750984", "text": "function is_assoc ($arr) {\n // something I got off http://php.net/manual/en/function.is-array.php\n // that tells you if an array is associative.\n return (is_array($arr) && (!count($arr) || count(array_filter(array_keys($arr),'is_string')) == count($arr)));\n }", "title": "" }, { "docid": "6835bd7d2e6dcdd46446d891839581d7", "score": "0.7469149", "text": "protected function isAssoc(array $array)\r\r\n {\r\r\n return count(array_filter(array_keys($array), 'is_string')) > 0;\r\r\n }", "title": "" }, { "docid": "a7e1720078ac0a92ccd2c56258bb1a2b", "score": "0.7468301", "text": "function array_is_associative($array) {\r\r\n\t$count = count ( $array );\r\r\n\tfor($i = 0; $i < $count; $i ++) {\r\r\n\t\tif (! array_key_exists ( $i, $array )) {\r\r\n\t\t\treturn true;\r\r\n\t\t}\r\r\n\t}\r\r\n\treturn false;\r\r\n}", "title": "" }, { "docid": "779ab41872ff0ff413bc09f5ececba71", "score": "0.7445798", "text": "public static function isAssoc(array $array): bool\n {\n return 0 < count($array) && count(array_filter(array_keys($array), 'is_string')) == count($array);\n }", "title": "" }, { "docid": "8cb369454bce641c9350cf687822ede4", "score": "0.7434575", "text": "public static function isAssoc($array)\n {\n if (!is_array($array))\n return false;\n\n return (bool) count(array_filter(array_keys($array), 'is_string'));\n }", "title": "" }, { "docid": "6a7bb6d337eea4a80da0036de96599fd", "score": "0.7425261", "text": "function is_array_assoc ($array) {\n\tif (!is_array($array) || empty($array)) {\n\t\treturn false;\n\t}\n\t$count = count($array);\n\tfor ($i = 0; $i < $count; ++$i) {\n\t\tif (!array_key_exists($i, $array)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "2fb6301896bf1edd1a02ca8b1bc18cf2", "score": "0.7380087", "text": "function is_associative_array($var) {\n\treturn is_array($var) && !is_numeric(implode('', array_keys($var)));\n}", "title": "" }, { "docid": "fa7d51d8e7788ec9f23e482648a10566", "score": "0.73777175", "text": "public function isAssociativeArray($array)\n {\n if (empty($array)) {\n return true;\n }\n\n if (is_array($array)) {\n foreach ($array as $key => $value) {\n if (!is_int($key)) {\n return true;\n }\n }\n }\n\n return false;\n\n }", "title": "" }, { "docid": "1680df567d0537edfeca8db7604bdbf1", "score": "0.73182505", "text": "static public function IS_ASSOC(array $arr)\n {\n return (is_array($arr) && (!count($arr) || count(array_filter(array_keys($arr),'is_string')) == count($arr)));\n }", "title": "" }, { "docid": "8d0df0babc92cdeb5086951de0568916", "score": "0.73116577", "text": "public function isAssociative(array $arr);", "title": "" }, { "docid": "79c9c42977ccec2be3e73b0fd8981b17", "score": "0.72985196", "text": "private function isAssociativeArray($array) {\n if (!is_array($array)) {\n return false;\n }\n $keys = array_keys($array);\n foreach($keys as $key) {\n if (is_string($key)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "544ac77be3da6773fc0c892f3a5fe55b", "score": "0.7298509", "text": "public function isAssocArray($array)\n {\n if (empty($array)) return false;\n return (array_keys($array) !== range(0,count($array)-1));\n }", "title": "" }, { "docid": "7493690e08c04ccf0eff851827b97fa0", "score": "0.72934717", "text": "static function is_assoc($array): bool {\n $isAssoc = false;\n if(\n is_array($array) &&\n array_keys($array) !== range(0, count($array) - 1)\n ){\n $isAssoc = true;\n }\n\n return $isAssoc;\n }", "title": "" }, { "docid": "a68ae1a1a4e6874ebc600ae6a53889b7", "score": "0.7259236", "text": "function isAssoc($arr){\n // return array_keys($arr) !== range(0, count($arr) - 1);\n}", "title": "" }, { "docid": "5687cb7456287e3ba152a1af5f612a78", "score": "0.7245557", "text": "protected function isAssoc(array $array): bool\n {\n foreach (array_keys($array) as $key) {\n if (!is_integer($key)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f0a1a3059a1755d59cb53d82f3745231", "score": "0.7227127", "text": "function df_is_assoc(array $a):bool {return !$a || !array_is_list($a);}", "title": "" }, { "docid": "6d5a8d2da31b43b7507d83ded9cda4bd", "score": "0.7226082", "text": "public static function isAssociative($array)\n {\n if (!is_array($array)) {\n return false;\n }\n return array_keys($array) !== range(0, count($array) - 1);\n }", "title": "" }, { "docid": "127cbbd1d7d7dea58ba0db43e99b9b17", "score": "0.72257733", "text": "public function arrayAssoc($array)\n {\n $allStrings = true;\n \n if (!is_array($array) || empty($array)) {\n return false;\n }\n\n if ($allStrings) {\n foreach ($array as $key => $value) {\n if (!is_string($key)) {\n return false;\n }\n }\n\n return true;\n }\n\n foreach ($array as $key => $value) {\n if (is_string($key)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4137435dc15a5e06c1758f4162c6b372", "score": "0.7189623", "text": "function isAssoc($arr)\n{\n return array_keys($arr) !== range(0, count($arr) - 1);\n}", "title": "" }, { "docid": "77b22f8c0cb421fb868eca90f05b5234", "score": "0.7153607", "text": "function array_is_assoc($array)\n {\n if (is_array($array)) {\n foreach (array_keys($array) as $k => $v) {\n if ($k !== $v) {\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "22f93906be55701d4621fa1bc7555c30", "score": "0.71401554", "text": "public static function isAssoc($array)\n {\n if (!is_array($array) || empty($array)) {\n return false;\n }\n\n return array_keys($array) !== range(0, count($array) - 1);\n }", "title": "" }, { "docid": "d7ed19f37548dabd5ae38bfa670f6388", "score": "0.7123363", "text": "function is_array_dict_A(array $input): bool {\n\tif (!$input) {\n\t\treturn false;\n\t}\n\n\treturn array_keys($input) !== range(0, count($input) - 1);\n\n}", "title": "" }, { "docid": "7346e62b5ef1e3dca472afd66ae675dd", "score": "0.7097557", "text": "protected function isAssociativeArray($array)\n {\n if (!is_array($array)) {\n return false;\n }\n $keys = array_keys($array);\n foreach ($keys as $key) {\n if (is_string($key)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "4edd56231b4dbb6ac3c74452e9f53335", "score": "0.7096775", "text": "function wds_acf_blocks_has_array_key( $key, $array = array() ) {\n\n\tif ( ! is_array( $array ) || ( ! $array || ! $key ) ) {\n\t\treturn false;\n\t}\n\n\treturn is_array( $array ) && array_key_exists( $key, $array ) && ! empty( $array[ $key ] );\n}", "title": "" }, { "docid": "f8dbc27ca08aa8d965c70ecb04db4527", "score": "0.7089848", "text": "function hasStringKeys($array) {\n return count(array_filter(array_keys($array), 'is_string')) > 0;\n}", "title": "" }, { "docid": "fc6cf71f931f60d92ae92216781b7c62", "score": "0.7078685", "text": "public static function isAssoc(array $array) {\n // Keys of the array\n $keys = array_keys($array);\n\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "title": "" }, { "docid": "3745cfe8b16740d1cc13f4cfe17c27db", "score": "0.70736575", "text": "public static function isAssoc($arr)\n {\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "title": "" }, { "docid": "b76f0b2b37050c757715821124284073", "score": "0.7063386", "text": "public static function isAssoc(array $arr): bool\n {\n return !count($arr) || count(array_filter(array_keys($arr), 'is_string')) == count($arr);\n }", "title": "" }, { "docid": "66e7283512819e4c315c813a68516680", "score": "0.70564437", "text": "public function isAssoc(array $array): bool\r\n {\r\n return !\\is_int(key($array));\r\n }", "title": "" }, { "docid": "827207b0cd700b52aee0cced4d2d8351", "score": "0.7050501", "text": "public static function isAssoc($arr)\n {\n #return (is_array($array) && (count($array)==0 || 0 !== count(array_diff_key($array, array_keys(array_keys($array))) )));\n return (is_array($arr) && array_keys($arr) !== range(0, count($arr) - 1));\n }", "title": "" }, { "docid": "4f7f671af619f2bd8bab576d6963e254", "score": "0.70480686", "text": "public static function isAssoc(array $arr){\n if (array() === $arr) return false;\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "title": "" }, { "docid": "aa8861ec635d56f389674c0eb2cd6912", "score": "0.7041425", "text": "function isNonAssocArray($array) {\n\t$keys = array_keys($array);\n\t$firstKey = $keys[0];\n\treturn is_numeric($firstKey);\n}", "title": "" }, { "docid": "e097004cb7611ff0d34e7199598a9f1e", "score": "0.70037097", "text": "protected function _is_associative_array($arr)\n\t{\n\t\tforeach (array_keys($arr) as $key => $val)\n\t\t{\n\t\t\tif ($key !== $val)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "68b8f3ad64e8b25d884abb4bad336766", "score": "0.6988839", "text": "public static function is_assoc(array $array): bool\n {\n if (!is_array($array)){\n return false;\n }\n\n // Keys of the array\n $keys = array_keys($array);\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "title": "" }, { "docid": "a7d89174cfc5bd9de0c667446c5007ea", "score": "0.69865763", "text": "private function isAssoc(array $array)\n {\n $keys = array_keys($array);\n\n return array_keys($keys) !== $keys;\n }", "title": "" }, { "docid": "e0610559d61c05c5cac607ce81b566e9", "score": "0.6974938", "text": "public static function is_assoc_array( array $arr ) {\n\t\tif ( array() === $arr ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn array_keys( $arr ) !== range( 0, count( $arr ) - 1 );\n\t}", "title": "" }, { "docid": "0312158fb601f5a9edbcdad1b2c91c9c", "score": "0.69728845", "text": "function _arrayHasKeys($array, $keys, $size = null) {\n\t\tif (count($array) != count($keys)) return false;\n\n\t\t$array = array_keys($array);\n\t\tforeach ($keys as &$key) {\n\t\t\tif (!in_array($key, $array)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "968def519a5fb79d4f10c07b6a2341ac", "score": "0.6970955", "text": "protected function is_assoc($arr)\n\t{\n\t if (!is_array( $arr ) || array() === $arr) {\n\t \treturn false;\n\t }\n\t return array_keys($arr) !== range(0, count($arr) - 1);\n\t}", "title": "" }, { "docid": "3a993f639464444a6ad1b347aacd7601", "score": "0.6955431", "text": "function is_array_assosiative($arr){\n return (array_keys($arr) !== range(0, count($arr) - 1));\n }", "title": "" }, { "docid": "9af2c9148eb269f5c13f530aaa293578", "score": "0.69127434", "text": "public static function isAssociativeArray($array)\n {\n if (is_array($array)) {\n foreach (array_keys($array) as $k => $v) {\n if ($k !== $v) {\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0380c108561d9ee276de4d3ba9704484", "score": "0.6889286", "text": "function array_and_key_exist($array, $key){\n if(!is_array($array)){\n return false;\n }\n return $array !== null && array_key_exists($key, $array);\n}", "title": "" }, { "docid": "5f94ecdcf7892bf0f6fc602c5a670f62", "score": "0.68890446", "text": "private function arrayIsAssociative(array $arr): bool\n {\n return (\\array_keys($arr) !== \\range(0, \\count($arr) - 1));\n }", "title": "" }, { "docid": "f97569c63f6b828a03c38c7aa7643eaf", "score": "0.6850096", "text": "public static function isAssoc(Array $arr)\n {\n return array_keys($arr) !== range(0, count($arr) - 1);\n }", "title": "" }, { "docid": "1684e01498f5c9c929c52fec4c2b5928", "score": "0.68446887", "text": "private function isArrAssoc($arr)\n\t{\n\t\treturn array_keys($arr) !== range(0, count($arr) - 1);\n\t}", "title": "" }, { "docid": "875826a15bec42bb4b71e027a151a0b5", "score": "0.68378216", "text": "function is_array_key(int|string $key, array $array): bool\n{\n return array_key_exists($key, $array);\n}", "title": "" }, { "docid": "37216131a9e8160684c2b6c1bb5f3303", "score": "0.6836205", "text": "public function hasKeys()\n {\n return $this->_has(1);\n }", "title": "" }, { "docid": "53b06d248bbbaa206b92b3d86ebbda6c", "score": "0.6826757", "text": "private function isArrayAssociative($data){\n foreach ($data as $key => $value) {\n if(!is_numeric($key)){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "1b68ffdce218fceff4f689154d617d7a", "score": "0.6808049", "text": "protected function isAssoc(Array $arr)\r\n {\r\n return array_keys($arr) !== range(0, count($arr) - 1);\r\n }", "title": "" }, { "docid": "9114969e87a093c76fdfc6560389e55a", "score": "0.67715365", "text": "public function hasKeys()\n\t\t{\n\t\t\treturn !empty($this->keys);\n\t\t}", "title": "" }, { "docid": "d678b1982944d1f17a5d743eae2c4927", "score": "0.6758008", "text": "function wpforms_list_is_assoc( $array ) {\n\n\t$keys = array_keys( $array );\n\n\treturn array_keys( $keys ) !== $keys;\n}", "title": "" }, { "docid": "39ff17cdb79cd0b8a5c046c183a3f249", "score": "0.6693357", "text": "protected function isAssoc(array $array): bool\n {\n return ($array !== array_values($array));\n }", "title": "" }, { "docid": "f09390a14c773849026326fc0c659f75", "score": "0.66524255", "text": "function has_keys(array $a, array $key_names): bool {\n return is_true_for_all_elements(\n $key_names, fn($key) => array_key_exists($key, $a));\n}", "title": "" }, { "docid": "d794552f3ab2680d1a42edff39f8dbf5", "score": "0.6636003", "text": "function is_indexed_array( array $array )\n {\n if ( $array == [] ) {\n return true;\n }\n\n return ! is_associative_array( $array );\n }", "title": "" }, { "docid": "c232702beac7df4778c338e7337e4828", "score": "0.6633593", "text": "private static function areArrayKeysSequentialInts(array &$arr): bool {\n for (reset($arr), $base = 0; key($arr) === $base++;) {\n next($arr);\n }\n return is_null(key($arr));\n }", "title": "" }, { "docid": "e01dde11d899a13dfad21904841e3621", "score": "0.66054016", "text": "function isAssoc(array $arr)\n {\n return \\Wolff\\Core\\Helper::isAssoc($arr);\n }", "title": "" }, { "docid": "e4ee9c186ab4135c04d69203f731f831", "score": "0.6601273", "text": "function is_array_dict_B(array $input): bool {\n\tif (!$input) {\n\t\treturn false;\n\t}\n\n\t$length = count($input);\n\tfor ($i = 0; $i < $length; $i++) {\n\t\tif (!array_key_exists($i, $input)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n\n}", "title": "" }, { "docid": "f75e845f44338a020d9e0bccab9676ee", "score": "0.6594518", "text": "function array_is_indexed(array $array)\n {\n if ($array == []) {\n return true;\n }\n\n return !array_is_associative($array);\n }", "title": "" }, { "docid": "bfba6a3f524187b378c96ecb5def28c4", "score": "0.6545664", "text": "public function testIsAssociativeArray1() {\n $array = array('a', 'b', 'c');\n $isAssociative = $this->protocol->isAssociativeArray($array);\n $this->assertFalse($isAssociative);\n }", "title": "" }, { "docid": "5b8a413106045b8b332200c7bf13285b", "score": "0.6522609", "text": "function is_array_dict_C(array $input): bool {\n\tif (!$input) {\n\t\treturn false;\n\t}\n\n\t$c = 0;\n\tforeach ($input as $i => $_) {\n\t\tif ($c++ !== $i) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n\n}", "title": "" }, { "docid": "b6bc93c58525fe47e906c68299e06bdf", "score": "0.6480355", "text": "public function testIsAssoc()\n {\n $array = ['test' => 'test'];\n\n $this->assertTrue(ArrayHelper::isAssoc($array));\n }", "title": "" }, { "docid": "40ae0a25972b1756d8bd0e4770d07b42", "score": "0.6476162", "text": "protected static function isAssociative(array $array, bool $allStrings = true)\n {\n if (! is_array($array) || empty($array)) {\n return false;\n }\n\n if ($allStrings) {\n foreach ($array as $key => $value) {\n if (! is_string($key)) {\n return false;\n }\n }\n\n return true;\n }\n\n foreach ($array as $key => $value) {\n if (is_string($key)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "aed81be8797a98f2e810e411d2c916ae", "score": "0.6473484", "text": "function is_populated_array($array) {\n return (is_array($array) && sizeof($array) > 0);\n }", "title": "" }, { "docid": "301a0d8268d38688ab7efac3a8114603", "score": "0.6467268", "text": "private function isAssociative($value): bool\n {\n $assoc = false;\n if (is_array($value)) {\n foreach (array_keys($value) as $key) {\n if (!is_int($key)) {\n $assoc = true;\n break;\n }\n }\n }\n\n return $assoc;\n }", "title": "" }, { "docid": "324aac91a9a45338da2a0b68942faf15", "score": "0.64664996", "text": "function isList ( array $array )\n{\n return count(array_diff_key($array, array_keys(array_keys($array)))) === 0;\n}", "title": "" }, { "docid": "1518589647825ab4a86a0cb7a2247d18", "score": "0.64614236", "text": "function check_array($ar=\"\"){\n if(is_array($ar) && count($ar)>0){\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "3b6cb22da584fb1c2d47a4a98df31e40", "score": "0.64140373", "text": "function is_array_assoc($value): bool\n {\n if (!is_array($value)) {\n return false;\n }\n\n return !array_is_list($value);\n }", "title": "" }, { "docid": "4a854b8b16482fe956517f00694e6a32", "score": "0.63994145", "text": "public function valid() {\n\t\treturn key($this->_array) !== null;\n\t}", "title": "" }, { "docid": "85304d34a9da3c1ae2a926abaa19649e", "score": "0.6386029", "text": "function is_array_indexed ($array) {\n\tif (!is_array($array) || empty($array)) {\n\t\treturn false;\n\t}\n\treturn !is_array_assoc($array);\n}", "title": "" }, { "docid": "982107fb00fa533ee4efaaff4a011b0e", "score": "0.6368925", "text": "function array_empty($array) {\r\n \t$is_empty = true;\r\n foreach($array as $k) {\r\n \t$is_empty = $is_empty && empty($k);\r\n }\r\n return $is_empty;\r\n }", "title": "" }, { "docid": "fb396dc0845613a4a392ecdb7d3b4c2e", "score": "0.63638407", "text": "public static function isHashedArray(array $array)\n {\n $keys = array_keys($array);\n\n // If the array keys of the keys match the keys, then the array must\n // not be associative (e.g. the keys array looked like {0:0, 1:1...}).\n return array_keys($keys) !== $keys;\n }", "title": "" }, { "docid": "1637c778aa9b59c14147d2ead7151e45", "score": "0.63633525", "text": "static public function isValid($key,$array){\n if ((!$array)||(!$key)) return false;\n return (\t(array_key_exists($key,$array))&&(isset($array[$key]))\t);\n }", "title": "" }, { "docid": "47fcaf8c6c97d5d6239f3cdf5b62d867", "score": "0.635021", "text": "public static function hasArrayKeys($array, $keys)\n\t{\n\t\t// must be an array and must have at least one key to test\n\t\tif(!is_array($array) || func_num_args() < 2)\n\t\t\tthrow new CDFInvalidArgumentException();\n\n\t\tif(!is_array($keys))\n\t\t{\n\t\t\t// argument is not an array, use variable args\n\t\t\t$keyNames = array();\n\t\t\tfor($arg = 1; $arg < func_num_args(); $arg++)\n\t\t\t\t$keyNames[] = func_get_arg($arg);\n\t\t}\n\t\telse\n\t\t\t$keyNames = $keys;\n\n\t\t// test the array for the keys\n\t\tforeach($keyNames as $key)\n\t\t{\n\t\t\tif(!isset($array[$key]))\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7f0a0d4911c546798398d9265effe5cc", "score": "0.6348931", "text": "public abstract function hasArray();", "title": "" }, { "docid": "cc6e64f128296b57e0ebe6dc7eb5472d", "score": "0.63451487", "text": "function x_has_list_keys(array $arr)\n{\n if (!(is_array($arr) && !empty($arr))) {\n return false;\n }\n $count = count($keys = array_keys($arr));\n foreach ($keys as $key) {\n if (!(is_integer($key) && $key >= 0 && $key < $count)) {\n return false;\n }\n }\n return true;\n}", "title": "" }, { "docid": "bb5dc456c140ea03dbef02246f772b9d", "score": "0.63138026", "text": "public function AssociativeKeys()\n {\n if($this->force_assoc)\n return true;\n\n if(!is_null($this->assoc))\n return $this->assoc;\n\n // use either is_int or is_numeric to test\n $test = $this->assoc_test;\n if(is_null($this->key_field)) {\n foreach($this->data as $k => $item) {\n if(! $test($k))\n return ($this->assoc = true);\n }\n } else {\n foreach($this->data as $item) {\n if(isset($item[$this->key_field]) && !$test($item[$this->key_field]))\n return ($this->assoc = true);\n }\n }\n return ($this->assoc = false);\n }", "title": "" }, { "docid": "44bfab422c2a3656c277bd446402654c", "score": "0.63124114", "text": "function chk_array($array, $key){\n\t// Verifica se a chave existe no array\n\tif ( isset( $array[ $key ] ) && ! empty( $array[ $key ] ) ) {\n\t\t// Retorna o valor da chave\n\t\treturn $array[ $key ];\n\t}\n\t// Retorna nulo por padrão\n\treturn null;\n}", "title": "" }, { "docid": "b01486db4262e326cbcd97102186c456", "score": "0.63092715", "text": "function array_has($array, $keys)\n {\n if (is_null($keys)) {\n return false;\n }\n\n $keys = (array) $keys;\n\n if (! $array || $keys === []) {\n return false;\n }\n\n foreach ($keys as $key) {\n $subKeyArray = $array;\n\n if (array_exists($array, $key)) {\n continue;\n }\n\n foreach (explode('.', $key) as $segment) {\n if (array_accessible($subKeyArray) && array_exists($subKeyArray, $segment)) {\n $subKeyArray = $subKeyArray[$segment];\n } else {\n return false;\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "3be01220666f2b79857ede0251e4bb38", "score": "0.62961495", "text": "public function testIsAssocGoodArray()\n\t\t{\n\t\t\t$model=new KaModel('users');\n\t\t\t$array=array(\"key1\"=>\"value1\");\n\t\t\t$this->assertTrue($model->is_assoc($array));\n\t\t}", "title": "" }, { "docid": "041801515c7868e65750b4ff065caeca", "score": "0.6290582", "text": "public function testKeyExistsTrue()\n {\n $array = ['apple' => 'red'];\n\n $result = ArrayValidator::keyExists($array, 'apple');\n\n $this->assertTrue($result);\n }", "title": "" } ]
74f70c552bb28d6f9f11df763dc8a575
Checks if an URL is valid using filter_var()
[ { "docid": "a81e4f2d11d2f677daa97c1ad2e87a65", "score": "0.7134237", "text": "public function checkUrl($url){\n\t\tif(filter_var($url, FILTER_VALIDATE_URL) === false){\n\t\t\treturn false;\n\t\t}\n\t\t// todo: check against whitelist?\n\n\t\treturn $url;\n\t}", "title": "" } ]
[ { "docid": "63cbb8360fd71faed58318b8cdf50fa7", "score": "0.80140895", "text": "public static function checkURL($var)\n {\n return filter_var($var, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "989ca535fb2ec12ca2ccd2c542646c08", "score": "0.8012689", "text": "function isValidUrl($string) {\n if (!filter_var($string, FILTER_VALIDATE_URL)) \n return false;\n else\n return true;\n}", "title": "" }, { "docid": "d65b9e6364a1ddb87fe408fdf012cfb2", "score": "0.79312474", "text": "function isValidURL($url)\n{\n //return $rs;\n return filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_HOST_REQUIRED) === false ? false : true;\n\n}", "title": "" }, { "docid": "637114860f03834e0a61c694a41c9410", "score": "0.78888077", "text": "function url_valid($url)\n\t{\n\t\treturn (filter_var($url, FILTER_VALIDATE_URL)) ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "36827238a1ef7a3cb20fc9d4d0b77e8c", "score": "0.7582445", "text": "function urlCheck($url) {\n\tif (function_exists('idn_to_ascii'))\n\t\t$url = idn_to_ascii($url);\n\treturn filter_var($url, FILTER_VALIDATE_URL);\n}", "title": "" }, { "docid": "da97bd2e837084877cb8ebe6e1de37f1", "score": "0.75539786", "text": "function is_valid_url($url) {\n if(str_starts_with(strtolower($url), 'http://localhost')) {\n return true;\n } // if\n \n if (preg_match(IP_URL_FORMAT, $url)) {\n return true;\n } // if\n \n return preg_match(URL_FORMAT, $url);\n }", "title": "" }, { "docid": "15263e0197e650bfe37961fb091ab78c", "score": "0.742685", "text": "function valid_url ($myinput, $good_input) {\n\t\n\t\tif (preg_match(\"$good_input\",$myinput)) {\n\t\t\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "89e66d9f10553aedbc292108f6f4c22c", "score": "0.74121875", "text": "function isValidUrl($var)\n\t\t{\n\t\t\t//if(eregi(\"^(http|https)+(:\\/\\/)+[a-z0-9_-]+\\.+[a-z0-9_-]\", $var ))\n\t\t\tif(eregi(\"^(http:\\/\\/|http:\\/\\/www\\.|https:\\/\\/www\\.|ftp:\\/\\/|www\\.|www\\.)+([0-9a-zA-Z])+(\\.{1}[0-9a-zA-Z]{1,3}){1}(\\/{1}[\\w]+)*$\", trim($var)))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\telse\n\t\t\t{\n\t\t\t\t$this->strErrorMessage = \"Please enter valid link.\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "89264cabceccd6878d518ffb9ab68006", "score": "0.7366404", "text": "function validateUrl($url) {\n return true;\n }", "title": "" }, { "docid": "e96bf5573ce147ac190add701e6a02e4", "score": "0.7317394", "text": "private function validUrl($url) {\n if(filter_var($url, FILTER_VALIDATE_URL)) return true;\n\n return false;\n }", "title": "" }, { "docid": "7bfaa32640076f8b57392d54d752342b", "score": "0.73130864", "text": "public function it_can_check_is_valid_url()\n {\n $this->assertFalse(validate_url(null));\n $this->assertFalse(validate_url(''));\n $this->assertFalse(validate_url('www.api.com'));\n\n $this->assertTrue(validate_url('http://www.arcanedev.net'));\n $this->assertTrue(validate_url('http://www.api.com/v1/object?id=1'));\n }", "title": "" }, { "docid": "e314bf9824ad124b84e92223afac28e3", "score": "0.73108387", "text": "private function is_valid_url($url) {\n\t\t if ($this->str_starts_with(strtolower($url), $this->localhost)) {\n\t\t return true;\n\t\t }\n\t\t if ($this->str_starts_with(strtolower($url), 'http://')) {\n\t\t return true;\n\t\t }\n\t\t if ($this->str_starts_with(strtolower($url), 'https://')) {\n\t\t return true;\n\t\t }\n\t\t return preg_match($this->url_format, $url);\n\t\t}", "title": "" }, { "docid": "3d077c2be172238e1147b8dc22663df3", "score": "0.72814393", "text": "private static function urlIsValid ($url)\n\t{\n\t\treturn (Str::startsWith($url, 'http://') || Str::startsWith($url, 'https://'));\n\t}", "title": "" }, { "docid": "5e09c1391e74db67cc28f8b8e83d5366", "score": "0.7280935", "text": "function _check_url(){\n \n if (empty($this->url) or $this->url==''){ \n $this->_error('_check_url','URL is empty!');\n return false;\n }\n else if (!preg_match(\"/^http:\\/\\//i\", $this->url)){\n $this->_error('_check_url','URL is invalid (it does not start with \"http://\")');\n return false;\n }\n return true;\n \n }", "title": "" }, { "docid": "4ca0e1bc25deb90a9a38f6b54c54ee90", "score": "0.724414", "text": "public function isValidUrl($url)\n {\n return filter_var($url, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "2e206fdeb3bc8b9e692b484aea745aa9", "score": "0.72057426", "text": "private function isUrlCorrect(string $url): bool\n {\n return filter_var($url, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "38bc96f512635d5626043d0c44747104", "score": "0.72003096", "text": "function isURL($value) {\n \tif(strlen($value) == 0)\n \treturn $empty;\n\n \treturn preg_match('!^http(s)?://[\\w-]+\\.[\\w-]+(\\S+)?$!i', $value)\n \t|| preg_match('!^http(s)?://localhost!', $value);\n \t// quick and dirty hack: review --NoWhereMan\n\t}", "title": "" }, { "docid": "801af337e2996bdaa76d6ec0a508099d", "score": "0.71745086", "text": "private function validateUrl($url)\n {\n if (!filter_var($url, FILTER_VALIDATE_URL)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "2e7f79e6c54e36b900a81a9c7f7046e6", "score": "0.71526605", "text": "function SanintyCheckURL($url)\n {\n $sane = true;\n \n // Check for blank URL\n if (strlen($url) < 4) { $sane = false; }\n \n // Check for spaces\n $ptr = (int) strpos($url, \" \");\n if ($ptr > 0) { $sane = false; }\n \n return $sane;\n }", "title": "" }, { "docid": "d7067d5f50656a1000cb9344f200c5eb", "score": "0.71190965", "text": "function validate($url)\r\n {\r\n $regex = \"((https?|ftp)\\:\\/\\/)?\"; // SCHEME\r\n $regex .= \"([a-z0-9+!*(),;?&=\\$_.-]+(\\:[a-z0-9+!*(),;?&=\\$_.-]+)?@)?\"; // User and Pass\r\n $regex .= \"([a-z0-9-.]*)\\.([a-z]{2,3})\"; // Host or IP\r\n $regex .= \"(\\:[0-9]{2,5})?\"; // Port\r\n $regex .= \"(\\/([a-z0-9+\\$_-]\\.?)+)*\\/?\"; // Path\r\n $regex .= \"(\\?[a-z+&\\$_.-][a-z0-9;:@&%=+\\/\\$_.-]*)?\"; // GET Query\r\n $regex .= \"(#[a-z_.-][a-z0-9+\\$_.-]*)?\"; // Anchor\r\n\r\n \t$result = preg_match(\"/^$regex$/\", $url);\r\n \treturn $result;\r\n }", "title": "" }, { "docid": "1e18afaef502e83a31cdc7a290d174c9", "score": "0.7116555", "text": "protected function validateUrlFormat($url) {\n\t\treturn filter_var($url, FILTER_VALIDATE_URL);\n\t}", "title": "" }, { "docid": "3e6f51e6da431008220189a6db1cf7e6", "score": "0.7104568", "text": "function validate_url($url) {\n $path = parse_url($url, PHP_URL_PATH);\n $encoded_path = array_map('urlencode', explode('/', $path));\n $url = str_replace($path, implode('/', $encoded_path), $url);\n\n return filter_var($url, FILTER_VALIDATE_URL) ? true : false;\n }", "title": "" }, { "docid": "4c3f8df8be3273c5382c95f7bdae945c", "score": "0.70999783", "text": "public static function validateUrl($value)\n {\n return filter_var($value, FILTER_VALIDATE_URL) !== false;\n }", "title": "" }, { "docid": "b7f5211c235b0a7f2f2df72e8699dcf7", "score": "0.7089555", "text": "public function isValidUrl($url) {\n\treturn (!filter_var(trim($url), FILTER_VALIDATE_URL) === false);\n}", "title": "" }, { "docid": "d2e9f0293e788971e63e18b3eab9a6e5", "score": "0.70738965", "text": "public function isUrl(): bool\n {\n return $this->filterString(FILTER_VALIDATE_URL, null, false);\n }", "title": "" }, { "docid": "68afc0658319612d9817b9ff0e6b4251", "score": "0.70634663", "text": "function check_valid_url($url){\r\n\t//if(ereg('^(http|ftp):\\/\\/([\\w-]+\\.)+([\\w-]+)+([- .\\/?%&=\\w]*)?(:8080)?$',$url)) return true;\r\n\tif(ereg(\"((http|https|ftp|telnet|news):\\/\\/)([a-z0-9_\\-\\/\\.]+\\.[][a-z0-9:;&#@=_~%\\?\\/\\.\\,\\+\\-]+)\",$url)) return true;\r\n\treturn false;\r\n }", "title": "" }, { "docid": "7eb56d1d119dd9a74536c8bb219d190d", "score": "0.70242184", "text": "public function is_valid() {\n\t\tif (!$this->url || !is_string($this->url)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// quick check url is roughly a valid http request: ( http://blah/... ) \n\t\tif (! preg_match('/^http(s)?:\\/\\/[a-z0-9-]+(\\.[a-z0-9-]+)*(:[0-9]+)?(\\/.*)?$/i', $this->url)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// all good!\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2478ac2b1167106cc18654265f54a80f", "score": "0.7003721", "text": "protected function validUrl(string $url): bool\n {\n return (bool) filter_var($url, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "f5a72ce98c48864a1f465c679924d976", "score": "0.69875705", "text": "public static function isURLValid($url)\n {\n return (filter_var($url,\\FILTER_VALIDATE_URL)!==false);\n }", "title": "" }, { "docid": "16d8784eac1d19c1db046938a7c91e30", "score": "0.6980579", "text": "public function check_valid_url($param)\n\t\t{\n\t\t if (!filter_var($param, FILTER_VALIDATE_URL))\n\t\t {\n\t\t\t\t$this->form_validation->set_message('check_valid_url', 'Input a valid url!');\n\t\t return false;\n\t\t }\n\n\t\t return true;\n\t\t}", "title": "" }, { "docid": "be201e808e550979a317f20f26ed98e1", "score": "0.6975769", "text": "public function isValid($value)\n{\n\treturn (filter_var($value, FILTER_VALIDATE_URL)\n\t\t&& preg_match(self::REGEX, $value)\n\t\t&& parse_url($value) !== FALSE);\n}", "title": "" }, { "docid": "35093fc05c5e5c65c40c321e39edf132", "score": "0.6957625", "text": "public static function is_url($value) {\n return !empty(filter_var($value, FILTER_VALIDATE_URL));\n }", "title": "" }, { "docid": "4265f27df7da25f4268cd1fecdf11a69", "score": "0.69156224", "text": "protected function isValid()\n {\n if (! filter_var($this->url, FILTER_VALIDATE_URL)) {\n throw new Exception(\"The URL {$this->url} is invalid.\");\n }\n }", "title": "" }, { "docid": "ab907d489e0b97cd6bc2dff3f19b2a26", "score": "0.68545836", "text": "function ValidateURL(&$test, &$error, &$settings)\r\n{\r\n $url = parse_url($test['url']);\r\n $host = $url['host'];\r\n \r\n if( strpos($host, '.') === FALSE )\r\n $error = \"Please enter a Valid URL. <b>$host</b> is not a valid Internet host name\";\r\n elseif( !strcmp($host, \"127.0.0.1\") || ((!strncmp($host, \"192.168.\", 8) || !strncmp($host, \"10.\", 3)) && !$settings['allowPrivate']) )\r\n $error = \"You can not test <b>$host</b> from the public Internet. Your web site needs to be hosted on the public Internet for testing\";\r\n}", "title": "" }, { "docid": "d8595a414563508ca7d83c4c00540705", "score": "0.68232673", "text": "public static function validateInput($input = null): bool\n {\n\n return is_readable($input) || filter_var($input, FILTER_VALIDATE_URL);\n\n\n }", "title": "" }, { "docid": "95fe330b734bda2ee00a9608bf6556ce", "score": "0.68048424", "text": "function valid_url($str)\n {\n\t//simple url regex\n\t$ptn = '([\\<]?)((http(?:s)?\\:\\/\\/)?[a-zA-Z0-9\\-]+(?:\\.[a-zA-Z0-9\\-]+)*\\.[a-zA-Z]{2,6}(?:\\/?|(?:\\/[\\w\\-]+)*)'\n\t .'(?:\\/?|\\/\\w+\\.[a-zA-Z]{2,4}(?:\\?[\\w]+\\=[\\w\\-]+)?)?(?:\\&[\\w]+\\=[\\w\\-]?(\\&)*)*)([\\>]?)'; \n \n\treturn $this->regex_match($str, $ptn);\n }", "title": "" }, { "docid": "f18c93a82fc1069b7f2752a60fbb3f64", "score": "0.6803265", "text": "private function isValidUrl($value)\n {\n $isValid = true;\n\n if (!filter_var($value, FILTER_VALIDATE_URL)) {\n $isValid = false;\n } else {\n $url = parse_url($value);\n if (empty($url['scheme']) || !in_array($url['scheme'], ['http', 'https'])) {\n $isValid = false;\n }\n }\n return $isValid;\n }", "title": "" }, { "docid": "ad956c8eace69d392a8cb0ebe724a971", "score": "0.679842", "text": "static function ValidateURL() {\n $URL = isset($_POST['url']) ? $_POST['url'] : '';\n // regular expression validation to check if link is an Instagram post url match\n if (preg_match('@^https://www.instagram.com/p/(.*)/$@', $URL) && $URL !== ''):\n self::GetResponse($URL);\n else:\n self::SetSessionAndRedirect(self::$Error);\n endif;\n }", "title": "" }, { "docid": "82914f1a7f6d4f2bc716d2414c8841b7", "score": "0.6780799", "text": "public static function isValidUrl(string $url): bool\n {\n return (bool) filter_var($url, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "0ffc27e7a6b24c4d009f4769e80f41ef", "score": "0.6775872", "text": "function isURLValid($url)\n{\t\n\tif (!preg_match('/^(http|https|ftp):\\/\\/(([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)+)(:(\\d+))?\\//i', $url)) \n\t{\n \treturn false; \n\t} else \n\t{ \n\n\t\t$hostname=gethostbyname($ip);\n\t\t$arr=explode(\".\",$hostname);\t\t\n\t\tif(count($arr)!=4)\n\t\t\treturn false;\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "b17e9c1cc01be46d421c159bca530bec", "score": "0.6775398", "text": "public function validate()\n\t{\n\t\t$value = filter_var($this->value, FILTER_VALIDATE_URL);\n\t\tif ($value === false) {\n\t\t\t$this->throwValidationError(ucfirst($this->label).\" does not appear to be a valid URL.\");\n\t\t}\n\t\t$this->value = filter_var($value, FILTER_SANITIZE_URL);\n\t}", "title": "" }, { "docid": "840aa822004619ccbffb1411c5522b6d", "score": "0.6773416", "text": "function fnValidateUrl($url){\n\treturn preg_match('/^(http(s?):\\/\\/|ftp:\\/\\/{1})((\\w+\\.){1,})\\w{2,}$/i', $url);\n}", "title": "" }, { "docid": "73ee3bc1ab5d8043cc87864300e3ebe4", "score": "0.6772511", "text": "private function validateUrl($url) {\n $formattedUrl = preg_replace('/^https?:\\/\\//', '', $url);\n $absoluteBaseUrl = Yii::app()->getAbsoluteBaseUrl();\n $formattedAbsoluteBaseUrl = preg_replace('/^https?:\\/\\//', '', $absoluteBaseUrl);\n return !preg_match(\"/^\" . preg_quote($formattedAbsoluteBaseUrl, '/')\n . \".*\\/api2?\\/.*/\", $formattedUrl);\n }", "title": "" }, { "docid": "c90a358946d35a60738c26ce119e5767", "score": "0.6771953", "text": "protected function is_valid_url($url) {\n $_domain_regex = \"|^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})/?$|\";\n if (preg_match($_domain_regex, $url)) {\n return true;\n }\n\n // Second: Check if it's a url with a scheme and all\n $_regex = '#^([a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))$#';\n if (preg_match($_regex, $url, $matches)) {\n // pull out the domain name, and make sure that the domain is valid.\n $_parts = parse_url($url);\n if (!in_array($_parts['scheme'], array( 'http', 'https' )))\n return false;\n\n // Check the domain using the regex, stops domains like \"-example.com\" passing through\n if (!preg_match($_domain_regex, $_parts['host']))\n return false;\n\n // This domain looks pretty valid. Only way to check it now is to download it!\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "1df90619e13c6672eb8a7ab8296e1240", "score": "0.6765463", "text": "public function isGoodUrl(){\n\t\treturn strpos($this->url, 'http://www.123people.') == 0 && strpos($this->url, '/s/') != false;\n\t}", "title": "" }, { "docid": "41907015f826157ee2491403682d9693", "score": "0.6760733", "text": "function bad_url($url) {\n // See if the URL starts with http: or https:...\n if (strncmp($url, \"http://\", 7) != 0 &&\n strncmp($url, \"https://\", 8) != 0) {\n return 1;\n }\n\n // Check for bad characters in the URL...\n $len = strlen($url);\n for ($i = 0; $i < $len; $i ++) {\n if (!strchr(\"~_*()/:%?+-&@;=,$.0123456789\"\n .\"abcdefghijklmnopqrstuvwxyz\"\n .\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", $url[$i])) {\n return 1;\n }\n }\n\n return 0;\n}", "title": "" }, { "docid": "e5b77c425c98726235714da86f4739e8", "score": "0.67528284", "text": "function chk_url ($url){\n\t\tglobal $config, $tpl;\n\t\t\n\t\t$db = mysql_q(\"SELECT url FROM redirect WHERE url='\".add_slash($url).\"'\");\n\t\t$rx = preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);\n\t\tif(!$db && $rx){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "20296274142b6f816dac94635b7730b8", "score": "0.67374784", "text": "function mmpm_is_uri( $variable = false ) { \n\t\tif( filter_var( $variable, FILTER_VALIDATE_URL ) === FALSE ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "1d88f4e90fa238f08acdcf170aa9372f", "score": "0.6733829", "text": "function fnSanitizeUrl($url)\n{\n return filter_var($url, FILTER_SANITIZE_URL);\n}", "title": "" }, { "docid": "919125b5c9828e783fea95f4449335e0", "score": "0.6731229", "text": "public function validate($url) {\r\n\t\tif (!$url) {\r\n\t\t\t$url = '';\r\n\t\t}\r\n\t\t\r\n\t\t$url = trim($url);\r\n\t\tif (empty($url)) {\r\n\t\t\treturn $this->_allowEmpty;\r\n\t\t} \r\n\t\treturn filter_var($url, FILTER_VALIDATE_URL) !== false\r\n\t\t\t&& $this->_checkProtocols($url);\r\n\t}", "title": "" }, { "docid": "4c8a95928738a6b40cf05c29b6970dcd", "score": "0.67192453", "text": "function URLcheck($URL){\nreturn eregi(\"[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]\", $URL); \n}", "title": "" }, { "docid": "3203239dec00bf809339b8bf6faa530e", "score": "0.67105675", "text": "private static function isSafeUrl(string $url): bool\n {\n if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)) return false;\n $host = parse_url($url, PHP_URL_HOST);\n\n // Prevent filter:// attacks\n if (!in_array(parse_url($url, PHP_URL_SCHEME), ['http', 'https'])) return false;\n\n // Prevent direct IPs\n if (filter_var($host, FILTER_VALIDATE_IP)) return false;\n\n // Make sure the IP isn't for a private subnet\n $ips = gethostbynamel($host);\n if (!$ips) return false;\n foreach ($ips as $ip) {\n if (!filter_var(\n $ip, \n FILTER_VALIDATE_IP, \n FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE\n )) return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "5080aa9ce48ef9fc2e7ab958580db57b", "score": "0.67033774", "text": "function clean_url($url)\n{\n\t$url = strip_tags($url);\n\t\n\t// Append 'http://' if not there\n\n\tif(!preg_match('#^[^:]+://#', $url))\n\t{\n\t\t$url = 'http://' . $url;\n\t}\n\t\n\t// Is it well-formed?\n\t\n\tif(!preg_match('/^(http|https|ftp):\\/\\/([A-Z0-9][A-Z0-9_-]*(?:\\.[A-Z0-9][A-Z0-9_-]*)+):?(\\d+)?\\/?/i', $url))\n\t{\n\t\tshow_error('The URL you entered is not valid, please check if you typed it correctly: ' . $url);\n\t}\n\telse\n\t{\n\t\treturn $url;\n\t}\n}", "title": "" }, { "docid": "d8af456307cf7bb9ded0dd6999e8e101", "score": "0.6703355", "text": "function isValidURL($url) {\n\treturn preg_match(\"/^http(s)?:\\/\\/[a-z0-9-]+(\\.[a-z0-9-]+)*(:[0-9]+)?(\\.*)?$/i\", $url);\n}", "title": "" }, { "docid": "377078ac4f082d4c88f3a6ef2a717082", "score": "0.6695749", "text": "function sd_check_url($url) // SD 322\n{\n // source: Brian Bothwell, http://regexlib.com/REDetails.aspx?regexp_id=501\n return preg_match(\"`^(http|https|ftp)\\://([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&amp;%\\$\\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\\:[0-9]+)*(/($|[a-zA-Z0-9\\.\\,\\?\\'\\\\\\+&amp;%\\$#\\=~_\\-]+))*$`\", $url);\n}", "title": "" }, { "docid": "55cd72a98dbd91f3860b6689ee956a3a", "score": "0.66881484", "text": "public function isValidURL($url)\n {\n return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*\n (:[0-9]+)?(/.*)?$|i', $url);\n }", "title": "" }, { "docid": "cee34f11df0eaa883d23698282c4fdab", "score": "0.6681544", "text": "public static function is_url($value){\n\t\t\treturn filter_var($value, FILTER_VALIDATE_URL) === false ? false : true;\n\t\t}", "title": "" }, { "docid": "fa67c31e52f8c591a6d1d0e3a3a225f2", "score": "0.6666674", "text": "function check_url($url = false)\r\n{\r\n if($url == false)\r\n return false;\r\n\r\n $url = str_ireplace('http://', '', $url);\r\n $url = str_ireplace('https://', '', $url);\r\n $url = str_ireplace('www.', '', $url);\r\n\r\n $url = explode('/', $url);\r\n $url = $url[0];\r\n\r\n return $url;\r\n}", "title": "" }, { "docid": "e8cc16cdcbd5f2d471dd53934c21bdb9", "score": "0.6662617", "text": "private function validateUrlStructure(string $value): bool\n {\n if (preg_match('~^(http(s)?://)?((w){3}.)?youtu(be\\.com|\\.be)/.+~', $value, $matches) !== 1) {\n return false;\n }\n\n // if path does not contain \"watch\" we don't have to check for query string variables and assume it is valid\n if (!in_array('watch', explode('/', parse_url($value, PHP_URL_PATH)), true)) {\n return true;\n }\n\n if (parse_url($value, PHP_URL_QUERY) === null) {\n return false;\n }\n\n parse_str(parse_url($value, PHP_URL_QUERY), $queryStringParameters);\n\n return array_key_exists('v', $queryStringParameters);\n }", "title": "" }, { "docid": "1f410d584ce20904859efe3a5f94887d", "score": "0.664021", "text": "public static function testInvalidQueryBareUrl()\n {\n Module::isAbsoluteBareUrl('http://example.com/?a=1');\n }", "title": "" }, { "docid": "b5a93127a35a1f950adf399eb22c547b", "score": "0.6626999", "text": "private function isValidUrl($path)\n {\n if (Str::startsWith($path, ['#', '//', 'mailto:', 'tel:', 'http://', 'https://'])) {\n return true;\n }\n\n return filter_var($path, FILTER_VALIDATE_URL) !== false;\n }", "title": "" }, { "docid": "014b421c2121e1dc2482cbe10eac47a7", "score": "0.6622429", "text": "private function isValidUrl($url = '') {\n if (!$url) {\n return false;\n }\n $headers = @get_headers($url);\n if (!isset($headers[0])) {\n return false;\n }\n return (strpos($headers[0], '200') !== false);\n }", "title": "" }, { "docid": "efcef12e07e2a0978a8b16d92a5590a4", "score": "0.66150403", "text": "public function isURL($url)\n\t{\n\t\treturn filter_var($url, FILTER_VALIDATE_URL);\n\t}", "title": "" }, { "docid": "5886439bdcfe3e70663424f1e3ee6ce1", "score": "0.6588205", "text": "protected static function isSafeInURL(Attribute $attribute)\n\t{\n\t\t// List of filters that make a value safe to be used as/in a URL\n\t\t$safeFilters = array(\n\t\t\t'#url',\n\t\t\t'urlencode',\n\t\t\t'rawurlencode',\n\t\t\t'#id',\n\t\t\t'#int',\n\t\t\t'#uint',\n\t\t\t'#float',\n\t\t\t'#range',\n\t\t\t'#number',\n\t\t\t/** @todo should probably ensure the regexp isn't something useless like /./ */\n\t\t\t'#regexp'\n\t\t);\n\n\t\treturn self::hasSafeFilter($attribute, $safeFilters);\n\t}", "title": "" }, { "docid": "031842e2343e6d267588712cd6b3565d", "score": "0.6580183", "text": "public function validUrl() {\n $file_headers='';\n try {\n $url = $this->url;\n $exists = true;\n $file_headers = @get_headers($url);\n $InvalidHeaders = array('404', '403', '500');\n if ($file_headers || is_array($file_headers)) {\n foreach ($file_headers as $headerInfo) {\n foreach ($InvalidHeaders as $HeaderVal) {\n if (strstr($headerInfo, $HeaderVal)) {\n $exists = false;\n break;\n }\n }\n }\n } else {\n $exists = false;\n }\n if (!$exists) {\n $this->addError('url', Yii::t('url', 'Http Status Code:'.$file_headers[0].' Invalid URL'));\n }\n } catch (Exception $e) {\n $this->addError('url', Yii::t('url', 'Domain does not exist'));\n }\n }", "title": "" }, { "docid": "46b7b298cc22fa509b13c00336fa8504", "score": "0.65685767", "text": "function isValidURL($url)\n {\n global $vm2rs_videoId;\n // Vimeo url?\n if (preg_match(\"/vimeo.com\\/[a-z1-9.-_]+/\", $url))\n {\n preg_match(\"/vimeo.com\\/([a-z1-9.-_]+)/\", $url, $matches);\n }\n else if (preg_match(\"/vimeo.com(.+)v=([^&]+)/\", $url))\n {\n preg_match(\"/v=([^&]+)/\", $url, $matches);\n }\n\n if (!empty($matches))\n {\n $vm2rs_videoId = $matches[1];\n\n if (!$fp = curl_init($url))\n {\n return false;\n }\n\n return true;\n }\n }", "title": "" }, { "docid": "02c911f0e0de786183b29ff685be0433", "score": "0.65636975", "text": "private function __prepareurl() {\n\t\t\t// prepare url, checks different type of entry's\n\t\t\t// http://test.com, http://www.test.com, http://multiple.subdomains.whatever.com\n\t\t\t\n\t\t\t$this->__params = mgParseUrl($this->__url);\n\t\t\tif(is_array($this->__params)){return true;}\n\t\t\t$this->ErrorString = \"Invalid URL\";\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "a8afc824c8b76432a65bfb69ed3a6286", "score": "0.6559965", "text": "function isValid($value) \n\t{\n\t\t$value = (string) $value;\n $this->_setValue($value);\n \n if (! Zend_Uri::check($value)) {\n \t$this->_error(self::INVALID_URL);\n \treturn false;\n }\n \n return true;\n\t}", "title": "" }, { "docid": "8657999477279640a96540d27fd94f46", "score": "0.6559586", "text": "function validate_url( $url )\n {\n if( empty($url) ) return false;\n\n $allowed_uri_schemes = array(\n 'http',\n 'https',\n );\n\n // Validate URL structure\n if( preg_match( '~^\\w+:~', $url ) )\n { // there's a scheme and therefore an absolute URL:\n\n $this->debug_disp( 'Validating URL', $url );\n\n if( $this->idna_url )\n { // Use IDN URL if exists\n $url = $this->idna_url;\n $this->debug_disp( 'IDNa URL supplied, using it instead', $url );\n }\n\n if( ! preg_match('~^ # start\n ([a-z][a-z0-9+.\\-]*) # scheme\n :// # authorize absolute URLs only ( // not present in clsid: -- problem? ; mailto: handled above)\n (\\w+(:\\w+)?@)? # username or username and password (optional)\n ( localhost |\n [a-z0-9]([a-z0-9\\-])* # Don t allow anything too funky like entities\n \\. # require at least 1 dot\n [a-z0-9]([a-z0-9.\\-])+ # Don t allow anything too funky like entities\n )\n (:[0-9]+)? # optional port specification\n .* # allow anything in the path (including spaces, but no newlines).\n $~ix', $url, $match) )\n { // Cannot validate URL structure\n return false;\n }\n\n $scheme = strtolower($match[1]);\n if( ! in_array( $scheme, $allowed_uri_schemes ) )\n { // Scheme not allowed\n return false;\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3850dd35112ecdb73c2cb458e8e5028c", "score": "0.6557333", "text": "public function isURL($url) {\n\t\t\t$valid\t\t\t= 0;\n\t\t\t$patternNormal\t= '/^https?:\\/\\/([a-zA-Z0-9_\\-]+:[^\\s@:]+@)?((([a-zA-Z][a-zA-Z0-9\\-]+\\.)+[a-zA-Z\\-]+)|((2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})))(:[0-9]{1,5})?(\\/[!~*\\'\\(\\)a-zA-Z0-9;\\/\\\\\\?:\\@&=\\+\\$,%#\\._-]*)*$/';\n\t\t\t$patternShort\t= '/^([a-zA-Z0-9_\\-]+:[^\\s@:]+@)?((([a-zA-Z][a-zA-Z0-9\\-]+\\.)+[a-zA-Z\\-]+)|((2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})\\.(2(5[0-5]|[0-4][0-9])|[01][0-9]{2}|[0-9]{1,2})))(:[0-9]{1,5})?(\\/[!~*\\'\\(\\)a-zA-Z0-9;\\/\\\\\\?:\\@&=\\+\\$,%#\\._-]*)*$/';\n\t\t\t\n\t\t\tif (preg_match($patternNormal, $url)) {\n\t\t\t\t$valid\t\t= 1;\n\t\t\t} else if (preg_match($patternShort, $url)) {\n\t\t\t\t$valid\t\t= 2;\n\t\t\t}\n\t\t\t// return\n\t\t\treturn $valid;\n\t\t}", "title": "" }, { "docid": "ae241a1dfaf859e5b8a034215eea6b37", "score": "0.6545389", "text": "protected function valid_url($str, $val=''){\n\t\t$regex = '^(https?|s?ftp\\:\\/\\/)|(mailto\\:)';\n\t\t$regex .= '([a-z0-9\\+!\\*\\(\\)\\,\\;\\?&=\\$_\\.\\-]+(\\:[a-z0-9\\+!\\*\\(\\)\\,\\;\\?&=\\$_\\.\\-]+)?@)?';\n\t\t$regex .= \"[a-z0-9\\+\\$_\\-]+(\\.[a-z0-9+\\$_\\-]+)+\";\n\t\t$regex .= '(\\:[0-9]{2,5})?';\n\t\t$regex .= '(\\?[a-z\\+&\\$_\\.\\-][a-z0-9\\;\\:@\\/&%=\\+\\$_\\.\\-]*)?';\n\t\t$regex = '/'.$regex.'/i';\n\t\t\n\t\treturn (bool) preg_match($regex, $str);\n\t}", "title": "" }, { "docid": "15136fe140054d1bf9fa0cc455277e78", "score": "0.6543431", "text": "function validateUrl($url){\n $regexUrl = '/^(http\\:\\/\\/)?([a-zA-Z0-9\\.\\-]+(\\:[a-zA-Z0-9\\.&amp;%\\$\\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\\-]+\\.)*[a-zA-Z0-9\\-]+\\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\\:[0-9]+)*(\\/($|[a-zA-Z0-9\\.\\,\\?\\'\\\\\\+&amp;%\\$#\\=~_\\-]+))*$/i';\n if( preg_match($regexUrl,$url) )\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "b2c91d08947e1774cd5172785e4c5674", "score": "0.6539412", "text": "public static function isUrl($file)\n {\n return false !== filter_var($file, FILTER_VALIDATE_URL);\n }", "title": "" }, { "docid": "44b4d6eaaf1230f8ed12431a3dbae43b", "score": "0.6535267", "text": "protected function validateUrl($attribute, $value)\n {\n return filter_var($value, FILTER_VALIDATE_URL) !== false;\n }", "title": "" }, { "docid": "19651f71faab29d19030d2e15247b1f2", "score": "0.6529149", "text": "public static function isUrl($input = false) {\n\n if ($input && !filter_var($input, FILTER_VALIDATE_URL) === false) {\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "1c7205d3c8a4d62d8fe0a44c9f703dfb", "score": "0.65183324", "text": "protected function prepareUrlToProcess(string &$url): bool\n {\n $url = trim($url, ' ');\n\n $url = $this->removeExclusionsFromUrl($url);\n\n $parts = parse_url($url);\n\n foreach ($this->url_validation_rules as $key => $rules) {\n if (!isset($parts[$key])) {\n $parts[$key] = '';\n }\n foreach ($rules as $rule) {\n if (!preg_match(\"/$rule/\", $parts[$key])) {\n return false;\n }\n }\n }\n\n $url = $parts['path'] ?? '';\n\n $url = $this->context->context->localization->removeScriptNameFromUrl($url);\n\n $url = rtrim($url, '/');\n\n return true;\n }", "title": "" }, { "docid": "11a60b4319555a5a82ac54531b5433d7", "score": "0.64852995", "text": "public function validateIsUrl(Value $v)\n\t{\n\t\t// matching only done when non-empty\n\t\tif ($this->_empty($v->get()))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! filter_var($v->get(), FILTER_VALIDATE_URL))\n\t\t{\n\t\t\t$v->setError('isUrl');\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8805e8e1d5314704b0bea983fed818d7", "score": "0.64716285", "text": "function _ah_valid_url($url, $absolute = FALSE) {\n\n\t# url validation\n return $absolute ? (bool)preg_match(\"/^(?:ftp|https?|feed):\\/\\/(?:(?:(?:[\\w\\.\\-\\+!$&'\\(\\)*\\+,;=]|%[0-9a-f]{2})+:)*(?:[\\w\\.\\-\\+%!$&'\\(\\)*\\+,;=]|%[0-9a-f]{2})+@)?(?:(?:[a-z0-9\\-\\.]|%[0-9a-f]{2})+|(?:\\[(?:[0-9a-f]{0,4}:)*(?:[0-9a-f]{0,4})\\]))(?::[0-9]+)?(?:[\\/|\\?](?:[\\w#!:\\.\\?\\+=&@$'~*,;\\/\\(\\)\\[\\]\\-]|%[0-9a-f]{2})*)?$/xi\", $url) : (bool)preg_match(\"/^(?:[\\w#!:\\.\\?\\+=&@$'~*,;\\/\\(\\)\\[\\]\\-]|%[0-9a-f]{2})+$/i\", $url);\n}", "title": "" }, { "docid": "1fbdfb6da283ab73e976920f54c15134", "score": "0.6458932", "text": "public function validatorUrl($_url=NULL){\n if(\n NULL!==$_url &&\n is_string($_url) &&\n strlen(trim($_url))\n ){\n $pos=strpos($_url, '://');\n return substr($_url,0,$pos+2).preg_replace('/[\\/\\\\\\\\]+/', \"/\", substr($_url,$pos+2));\n }\n return NULL;\n }", "title": "" }, { "docid": "9fa6c7dddf6d3259e2a484e83b8e921c", "score": "0.6444725", "text": "public function isUrl(?string $url): bool\n {\n return filter_var($url, FILTER_VALIDATE_URL) !== false;\n }", "title": "" }, { "docid": "aceb1eac86a7fd84e924300517df27c1", "score": "0.6442572", "text": "public function isValidURL( $url ) {\n // non-ASCII URLs, which we want to support\n $url = trim( $url );\n\n if ( $url == '' ) {\n return false;\n }\n\n if ( strpos( $url, '.php' ) !== false ) {\n return false;\n }\n\n if ( strpos( $url, ' ' ) !== false ) {\n return false;\n }\n\n if ( $url[0] == '#' ) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "2768ba4a016d11776a057dc335313c21", "score": "0.6442518", "text": "public static function checkUrl($url) {\r\n return preg_match('!^https?://!i', $url);\r\n }", "title": "" }, { "docid": "45b750c61a93660369921a8e4f179898", "score": "0.64224577", "text": "function is_url($url){\n\t \treturn preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);\n\t}", "title": "" }, { "docid": "a4892ef90f6da9ec675f1c270b306cc4", "score": "0.64183104", "text": "public static function urlValidate($url)\n {\n $url = trim($url);\n if (preg_match('%^(?:(?:https?)://)(?:\\S+(?::\\S*)?@|\\d{1,3}(?:\\.\\d{1,3}){3}|(?:(?:[a-z\\d\\x{00a1}-\\x{ffff}]+-?)*[a-z\\d\\x{00a1}-\\x{ffff}]+)(?:\\.(?:[a-z\\d\\x{00a1}-\\x{ffff}]+-?)*[a-z\\d\\x{00a1}-\\x{ffff}]+)*(?:\\.[a-z\\x{00a1}-\\x{ffff}]{2,6}))(?::\\d+)?(?:[^\\s]*)?$%iu', $url)){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "32d4109963554852d6534fae0304c375", "score": "0.64134306", "text": "public static function validate_type_url(String $url)\r\n {\r\n preg_match('/\\\\/:/', $url, $elementVar);\r\n if (count($elementVar) > 0) {\r\n return array(\"isVar\" => true);\r\n }\r\n }", "title": "" }, { "docid": "67d332c0da4693b58e8a8db1be9dc316", "score": "0.64124775", "text": "protected function url_valid($url) {\n\t\t\t$curl = curl_init($url);\n\t\t\tcurl_setopt($curl, CURLOPT_NOBODY, true);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n\t\t\tcurl_exec($curl);\n\t\t\t$info = curl_getinfo($curl);\n\t\t\tcurl_close($curl);\n\t\t\treturn $info['http_code'] == 200;\n\t\t}", "title": "" }, { "docid": "27c58be9fed5727725d41f456ccb4acb", "score": "0.64039844", "text": "static public function is_url( $url )\n\t{\n\t\treturn ( filter_var( $url, FILTER_VALIDATE_URL )===false )? false:true;\n\t}", "title": "" }, { "docid": "d6a31de3a9645e357db9da4ff052a1af", "score": "0.6399135", "text": "public function testNotString(): void\n {\n $validator = new UrlValidator();\n $result = $validator->validate(9);\n\n $this->assertFalse($result->isValid());\n }", "title": "" }, { "docid": "6bf66a9f51ea59543d53d0640b9b5500", "score": "0.6389531", "text": "public function isUrlEncoded();", "title": "" }, { "docid": "230ce01d68e3210c8f02bac30e0f3c42", "score": "0.6381315", "text": "public function validUrl($url) {\n\n\t\tif ( empty($url) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$valid = false;\n\n\t\tforeach($this->formats as $handle => $options) {\n\t\t\tif (preg_match($options['regex'], $url)) {\n\t\t\t\t$valid = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn preg_match($this->urlRegex, $url) && $valid;\n\t}", "title": "" }, { "docid": "0c9bbf8f25798e435fa90af4f1d56825", "score": "0.6354535", "text": "protected function isUrl($value)\n {\n return Zend_Uri_Http::check($value);\n }", "title": "" }, { "docid": "f9f7fd756bfdd8b4f487fd03426e9868", "score": "0.63456476", "text": "private function validateUrl()\n\t{\n\t\tif ( $this->validateComponent() && $this->validateView())\n\t\t{\n\t\t\tif (method_exists($this, 'validateExtra'))\n\t\t\t{\n\t\t\t\treturn $this->validateExtra();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "773bf639a17635383399f22b7bb6f9a4", "score": "0.63412076", "text": "public static function check_url_var( $var, $val = '' ) {\n\t\tif ( isset( $_GET[$var] ) ) {\n\t\t\tif ( ! empty( $val ) ) {\n\t\t\t\treturn $val == $_GET[$var];\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fd191b5d6ab03bb7482fddec92aca3d8", "score": "0.6334745", "text": "public function _checkUrlString($text)\n {\n // Check control code\n if (preg_match('/[\\x0-\\x1f\\x7f]/', $text)) {\n return false;\n }\n // check black pattern(deprecated)\n return !preg_match('/^(javascript|vbscript|about):/i', $text);\n }", "title": "" }, { "docid": "f5319932a9e9d47e5cd1abc180293704", "score": "0.63334256", "text": "private function _check_for_clean_url() {\n\n\t\t$url = url::base().\"help\";\n\n\t\t$curl_handle = curl_init();\n\n\t\tcurl_setopt($curl_handle, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true );\n\t\tcurl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_exec($curl_handle);\n\n\t\t$return_code = curl_getinfo($curl_handle,CURLINFO_HTTP_CODE);\n\t\tcurl_close($curl_handle);\n\n\t\treturn ($return_code ==\t 404)? FALSE : TRUE;\n\t}", "title": "" }, { "docid": "d0927b85a266c0212c571d296e106b53", "score": "0.63250065", "text": "private function checkUrl($url) {\n if (!Zend_Uri::check($url)) {\n throw new Pas_Exception_Url(self::INVALIDURL);\n }\n return $url;\n }", "title": "" }, { "docid": "f418bacbfb1629f33940f599278a9080", "score": "0.63127613", "text": "public static function isUrl($url) {\n // From: http://www.daniweb.com/web-development/php/threads/290866\n // Scheme\n $url_regex = '^(https?|s?ftp\\:\\/\\/)|(mailto\\:)';\n // User and password (optional)\n $url_regex .= '([a-z0-9\\+!\\*\\(\\)\\,\\;\\?&=\\$_\\.\\-]+(\\:[a-z0-9\\+!\\*\\(\\)\\,\\;\\?&=\\$_\\.\\-]+)?@)?';\n // Hostname or IP\n // http://x = allowed (ex. http://localhost, http://routerlogin)\n $url_regex .= '[a-z0-9\\+\\$_\\-]+(\\.[a-z0-9\\+\\$_\\-]+)*';\n // http://x.x = minimum\n // $url_regex .= \"[a-z0-9\\+\\$_\\-]+(\\.[a-z0-9+\\$_\\-]+)+\";\n // http://x.xx(x) = minimum\n // $url_regex .= \"([a-z0-9\\+\\$_\\-]+\\.)*[a-z0-9\\+\\$_\\-]{2,3}\";\n // use only one of the above\n // Port (optional)\n $url_regex .= '(\\:[0-9]{2,5})?';\n // Path (optional)\n // $urlregex .= '(\\/([a-z0-9\\+\\$_\\-]\\.\\?)+)*\\/?';\n // GET Query (optional)\n $url_regex .= '(\\?[a-z\\+&\\$_\\.\\-][a-z0-9\\;\\:@\\/&%=\\+\\$_\\.\\-]*)?';\n // Anchor (optional)\n // $urlregex .= '(\\#[a-z_\\.\\-][a-z0-9\\+\\$_\\.\\-]*)?$';\n return preg_match('/' . $url_regex . '/i', $url);\n }", "title": "" }, { "docid": "b24d5312103287799bfb49f743079a39", "score": "0.63108325", "text": "function checkURI() {\n $attack = \"Vulnerability scanner in URL\";\n $score = 10;\n\n if(isset($_SERVER[\"REQUEST_URI\"])) {\n $db = $this->getDb();\n $results = $db->query(\"SELECT string FROM denyUrlString\");\n while ($row = $results->fetchArray()) {\n if(strpos(strtolower($_SERVER[\"REQUEST_URI\"]), $row['string']) !== false) {\n $results->finalize();\n $this->attackDetected($attack, $score);\n return self::ATTACK;\n }\n }\n } else\n return self::ERROR;\n return self::OK;\n }", "title": "" }, { "docid": "9fd35be8781daf97b86a0cc24aa4d36b", "score": "0.63089114", "text": "function internalSafeURL($str, $mustContainValue = FALSE) {\n return checkit::check(\n $str,\n '~^[a-zA-Z0-9\\.\\(\\)\\[\\]\\/ ,_-]+$~u',\n $mustContainValue\n );\n }", "title": "" }, { "docid": "2bc4a5fb0e55e2639e32c96556d85909", "score": "0.6285438", "text": "public function validate($input)\n\t{\n\t\t// RFC 3987 compliant.\n\t\t$valid_url = preg_match(\"/^(?:[a-z](?:[-a-z0-9\\+\\.])*:(?:\\/\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:])*@)?(?:\\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\\._~!\\$&'\\(\\)\\*\\+,;=:]+)\\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=@])*)(?::[0-9]*)?(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|\\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*)?|(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])))(?:\\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\x{E000}-\\x{F8FF}\\x{F0000}-\\x{FFFFD}|\\x{100000}-\\x{10FFFD}\\/\\?])*)?(?:\\#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\/\\?])*)?|(?:\\/\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:])*@)?(?:\\[(?:(?:(?:[0-9a-f]{1,4}:){6}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|::(?:[0-9a-f]{1,4}:){5}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:[0-9a-f]{1,4}:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3})|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|v[0-9a-f]+[-a-z0-9\\._~!\\$&'\\(\\)\\*\\+,;=:]+)\\]|(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?:\\.(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}|(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=@])*)(?::[0-9]*)?(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|\\/(?:(?:(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*)?|(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=@])+)(?:\\/(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@]))*)*|(?!(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])))(?:\\?(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\x{E000}-\\x{F8FF}\\x{F0000}-\\x{FFFFD}|\\x{100000}-\\x{10FFFD}\\/\\?])*)?(?:\\#(?:(?:%[0-9a-f][0-9a-f]|[-a-z0-9\\._~\\x{A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}\\x{10000}-\\x{1FFFD}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}\\x{40000}-\\x{4FFFD}\\x{50000}-\\x{5FFFD}\\x{60000}-\\x{6FFFD}\\x{70000}-\\x{7FFFD}\\x{80000}-\\x{8FFFD}\\x{90000}-\\x{9FFFD}\\x{A0000}-\\x{AFFFD}\\x{B0000}-\\x{BFFFD}\\x{C0000}-\\x{CFFFD}\\x{D0000}-\\x{DFFFD}\\x{E1000}-\\x{EFFFD}!\\$&'\\(\\)\\*\\+,;=:@])|[\\/\\?])*)?)$/ui\", $input);\n\n\t\t$scheme = parse_url($input);\n\t\t$scheme = isset($scheme[\"scheme\"]) ? strtolower($scheme[\"scheme\"]) : false;\n\n\t\t// Whitelist schemes we allow people to link to\n\t\t$allowed_schemes = array(\n\t\t\tfalse, // for relative links\n\t\t\t\"http\",\n\t\t\t\"https\",\n\t\t\t\"stepmania\",\n\t\t\t\"magnet\",\n\t\t\t\"irc\",\n\t\t\t\"ftp\",\n\t\t\t\"mailto\"\n\t\t);\n\n\t\treturn $valid_url && in_array($scheme, $allowed_schemes);\n\t}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "9e0fcc2a98f14d9fdd431e599dd27572", "score": "0.0", "text": "public function run()\n {\n $categories = Category::all();\n foreach ($categories as $cat){\n Collection::create([\n 'category_id' => $cat->id,\n 'name' => 'Master Collection'\n ]);\n }\n }", "title": "" } ]
[ { "docid": "0bfde9ef2f3ebe06cba65de4fe4e0c07", "score": "0.8007822", "text": "public function run()\n {\n factory('App\\User')->create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin123')\n ]);\n \n // $this->call(UsersTableSeeder::class);\n factory('App\\User', 10)->create();\n factory('App\\Post', 50)->create();\n factory('App\\Tag', 10)->create();\n\n $posts = Post::all()->pluck('id');\n $tags = Tag::all()->pluck('id');\n\n foreach(range(1, 50) as $index){\n DB::table('taggables')->insert([\n 'tag_id' => $tags[rand(0,9)],\n 'taggable_id' => $posts[rand(0,49)],\n 'taggable_type' => 'App\\Post'\n ]);\n }\n\n factory('App\\Department', 20)->create();\n }", "title": "" }, { "docid": "be70abafa425894fc1f5fffa84ad1c58", "score": "0.799776", "text": "public function run()\n {\n\n Eloquent::unguard();\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n $faker = Faker::create();\n\n App\\ProductDetail::truncate();\n App\\Product::truncate();\n\n for ($i = 0; $i < 100; $i++) {\n $products = DB::table('products')->insert([\n 'product_name' => $faker->sentence($nbWords = 6, $variableNbWords = true),\n ]);\n }\n\n $productList = App\\Product::pluck('id')->toArray();\n\n for ($i = 0; $i < 100; $i++) {\n $productDetails = DB::table('product_details')->insert([\n 'product_id' => $faker->randomElement($productList),\n 'selling_price' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0, $max = 23),\n 'product_cost' => $faker->randomFloat($nbMaxDecimals = 2, $min = 0, $max = 23),\n 'weight' => $faker->randomDigit,\n 'weight_unit' => 'kg',\n 'SKU' => $faker->ean13,\n 'active' => true,\n 'descriptions' => $faker->paragraphs($nb = 3, $asText = true),\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "cbc18118ffdf77b61b5599ddb34c1812", "score": "0.79821414", "text": "public function run()\n {\n\n //Seed Users table with 50 entries \n factory(User::class, 10)->create();\n\n //Seed Articles table with 50 entries \n factory(Article::class, 10)->create();\n\n //Seed Tags table with 15 entries \n factory(Tag::class, 10)->create();\n\n //Seed Images table with 50 entries \n factory(Thumbnail::class, 10)->create();\n\n //Get array of ids of Users and Tags\n $articleIds = DB::table('articles')->pluck('id')->all();\n $tagsIds = DB::table('tags')->pluck('id')->all();\n\n\n //Seed article_tag table with 50 entries\n foreach ((range(1, 10)) as $index) {\n DB::table('article_tag')->insert(\n [\n 'article_id' => $articleIds[array_rand($articleIds)],\n 'tag_id' => $tagsIds[array_rand($tagsIds)]\n ]\n );\n } \n\n }", "title": "" }, { "docid": "e997c5cb5c91efaf84cdc8c54ff75337", "score": "0.7977852", "text": "public function run()\n {\n //Seed some random titles like Doctor, Chef, Technician, System Analyst\n DB::table('titles')->insert([\n 'name' => 'Human Resources Manager',\n 'salary' => '600000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Senior Accountant',\n 'salary' => '750000',\n 'department_id' => 1,\n 'user_id' => 1,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n DB::table('titles')->insert([\n 'name' => 'Field Officer',\n 'salary' => '400000',\n 'department_id' => 2,\n 'user_id' => 2,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ]);\n }", "title": "" }, { "docid": "b0d690b7877e9052a404018f9bbcb857", "score": "0.7964612", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('pages')->delete();\n\n $page = array(\n array(\n 'content'=>'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam autem dolor facilis magni nemo placeat? Ad, aliquam cum deserunt excepturi fugit inventore ipsa odio possimus quaerat tempora voluptates voluptatum?',\n 'custom_fields'=>'',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('pages')->insert($page);\n\n DB::table('posts')->delete();\n\n $post = array(\n array(\n 'content'=>'Lorem ipsum dolor sit amet, consectetur adipisicing elit. A aperiam autem dolor facilis magni nemo placeat? Ad, aliquam cum deserunt excepturi fugit inventore ipsa odio possimus quaerat tempora voluptates voluptatum?',\n 'custom_fields'=>'',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('posts')->insert($post);\n\n DB::table('categories')->delete();\n\n $post = array(\n array(\n 'name'=>'Simple',\n 'description'=>'Lorem ipsum dolor sit amet.',\n 'parent'=>0,\n 'thumbnail'=>'',\n )\n );\n\n DB::table('categories')->insert($post);\n }", "title": "" }, { "docid": "b8d732d24d0cafa0a09ae0fae273abc1", "score": "0.79600173", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('books')->insert([\n [\n 'title'=>'Name of the wind',\n 'description'=>'good book',\n ],\n [\n 'title'=>'Les rois mages',\n 'description'=>'Livre 1',\n ],\n [\n 'title'=>'Les mésirables',\n 'description'=>'faire machine avant',\n ],\n [\n 'title'=>'Name the goods',\n 'description'=>'good book two',\n ],\n [\n 'title'=>'Name of the world',\n 'description'=>'book type',\n ]\n ]);\n\n $this->call(AuthorTableSeeder::class);\n \n $this->call(BookTableSeeder::class);\n\n }", "title": "" }, { "docid": "28c90ca039b31e0b4ea668fe4b7200a1", "score": "0.79537797", "text": "public function run()\n {\n // $this->call(RolesTableSeeder::class);\n DB::table('roles')->insert([\n ['name' => 'Super Admin'],\n ['name' => 'Admin'],\n ['name' => 'Super Manager'],\n ['name' => 'Manager'],\n ['name' => 'User']\n ]);\n\n DB::table('departaments')->insert([\n ['name' => 'Developers'],\n ['name' => 'Managers'],\n ['name' => 'Mobiles'],\n ['name' => 'SEO']\n ]);\n\n DB::table('offices')->insert([\n ['name' => 'Trainee'],\n ['name' => 'Junior'],\n ['name' => 'Middle'],\n ['name' => 'Senjor']\n ]);\n }", "title": "" }, { "docid": "414c56fa7478f0f26f90e25015547739", "score": "0.7938816", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call('UserTableSeeder');\n User::truncate();\n App\\Models\\Article::truncate();\n // App\\Models\\Category::truncate();\n // factory(User::class, 47)->create()->each(function($u) {\n // $n = rand(1,30);\n // // dd($u);\n // $u->articles()->save(factory(App\\Models\\Article::class, $n)->make());\n // });\n $users = factory(App\\Models\\User::class, 13)\n ->create()\n ->each(function($u) {\n $n = rand(1,30);\n for ($i=1; $i < $n; $i ++) {\n $u->articles()->save(factory(App\\Models\\Article::class)->make());\n }\n });\n // factory(App\\Models\\Article::class, 54)->create();\n factory(App\\Models\\Category::class, 20)->create();\n // factory(App\\Mo/usdels\\Comment::class, 98)->create();\n // factory(App\\Models\\Notification::class, 12)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "e5a10ab44791834389d06f68b18e61a0", "score": "0.79154366", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Actor', 10)->create();\n factory('App\\Genre', 5)->create();\n factory('App\\Director', 3)->create();\n factory('App\\Movie', 20)->create();\n //factory('App\\MovieActor', 10)->create();\n factory('App\\MovieGenre', 10)->create();\n }", "title": "" }, { "docid": "78877988f9d7b9a209f3d7e3b76783c1", "score": "0.79043496", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(NewsTableSeeder::class);\n $this->call(AuthorsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(TagsTableSeeder::class);\n\n foreach (array_fill(0,49, 1) as $value) {\n DB::table('categories_news')->insert([\n 'categories_id' => rand(1, 10),\n 'news_id' => rand(1, 50)\n ]);\n DB::table('news_tags')->insert([\n 'news_id' => rand(1, 50),\n 'tags_id' => rand(1, 50)\n ]);\n }\n }", "title": "" }, { "docid": "519140d4569147b92caec85e96a7d54d", "score": "0.7861984", "text": "public function run()\n {\n DB::table('main')->insert(['name' => 'title', 'value' => 'All About Aqua']);\n DB::table('main')->insert(['name' => 'short-title', 'value' => 'A3']);\n DB::table('main')->insert(['name' => 'admin', 'value' => 'bRexx']);\n\n DB::table('categories')->insert(['name' => 'Fish']);\n DB::table('categories')->insert(['name' => 'Aquarium']);\n DB::table('categories')->insert(['name' => 'Food']);\n DB::table('categories')->insert(['name' => 'Decoration']);\n DB::table('categories')->insert(['name' => 'Medicine']);\n DB::table('categories')->insert(['name' => 'Others']);\n\n //admin seed\n DB::table('users')->insert(['name'=>'admin','email'=>'[email protected]','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n DB::table('shops')->insert(['name'=>'admin','email'=>'[email protected]','password'=>bcrypt('admin'),'address'=>'test,testing,tested','phone'=>987654321,'bio'=>'Quibusdam sed consequatur nisi ipsam doloribus quasi exercitationem ducimus dolore']);\n\n }", "title": "" }, { "docid": "cbe94f71f3320e562446a3857980162d", "score": "0.78545153", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // $table->increments('id');\n // $table->string('image');\n // $table->text('huni_too');\n // $table->text('usni_heregle');\n // $table->text('hereglesen_od');\n // $table->text('number');\n // $table->string('link');\n // $table->rememberToken();\n // $table->timestamps();\n\n\n DB::table('comus')->insert([\n 'image' => str_random(''),\n 'huni_too' => str_random('1'),\n 'usni_heregle' => str_random('2'),\n 'hereglesen_od' => str_random('5'),\n 'number' => str_random('666'),\n 'link' => str_random('gogo.mn'),\n ]);\n }", "title": "" }, { "docid": "32a1a19094e28fbcdf4c0f9a799b242e", "score": "0.78494513", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Element::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few elements in our database:\n for ($i = 0; $i < 50; $i++) {\n Element::create([\n 'title' => $faker->sentence,\n 'description' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "3aba22301887990477ce9cba4fcd6d61", "score": "0.78490025", "text": "public function run()\n {\n //seed for user account\n \\Illuminate\\Support\\Facades\\DB::table('users')->insert([\n [\n \"name\" => \"User\",\n \"email\" => \"[email protected]\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('user12345'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ],\n [\n \"name\" => \"Admin\",\n \"email\" => \"[email protected]\",\n \"password\" => \\Illuminate\\Support\\Facades\\Hash::make('admin123'),\n \"phone_number\" => \"+62811111111\",\n \"full_address\" => \"Jalan Mendut Gg.XV No.18\",\n \"city\" => \"Jember\",\n \"province\" => \"Jawa timur\",\n \"postal_code\" => \"68416\"\n ]\n ]);\n\n //seed for role each account\n DB::table('user_role')->insert([\n [\n 'user_id' => 1,\n 'role_id' => 1\n ],\n [\n 'user_id' => 2,\n 'role_id' => 2\n ]\n ]);\n }", "title": "" }, { "docid": "4a808c704f3d0986a8185bbaa1f0bda0", "score": "0.78462607", "text": "public function run()\n {\n\n // $this->call(UserSeeder::class);\n\n //DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //disable forign key checks temporaliry fr truncateing the tables\n\n //first truncate all the tables before seedingthe data in db\n User::truncate();\n Category::truncate();\n Course::truncate();\n Topic::truncate();\n Enrollment::truncate();\n\n //use the db facade to truncate the pivot tables since they dont have models\n DB::table('category_course')->truncate();\n DB::table('course_topic')->truncate();\n\n ///prevent listening to events when running our db seed command\n User::flushEventListeners();\n Category::flushEventListeners();\n Course::flushEventListeners();\n Topic::flushEventListeners();\n Enrollment::flushEventListeners();\n\n\n //setting quntity for the entities to put in database\n $usersQuantity = 1000;\n $categoriesQuantity = 30;\n $topicsQuantity = 100;\n $coursesQuantity = 100;\n $enrollmentsQuantity = 200;\n\n factory(User::class, $usersQuantity)->create();\n\n factory(Category::class, $categoriesQuantity)->create();\n\n factory(Topic::class, $topicsQuantity)->create();\n\n //create courses and attach relationships to each of them\n factory(Course::class, $coursesQuantity)->create()->each(\n function ($course) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $topics = Topic::all()->random(mt_rand(1, 5))->pluck('id');\n\n $course->categories()->attach($categories); //attching categories\n $course->topics()->attach($topics); //attaching topics\n }\n );\n\n factory(Enrollment::class, $enrollmentsQuantity)->create();\n }", "title": "" }, { "docid": "de244443af2a696896399e699e059f2a", "score": "0.78436476", "text": "public function run()\n {\n \t$faker = Faker::create();\n \tfor ($i=0; $i < 20; $i++) { \n \t\t$post = new App\\Post;\n \t\t$post->title = $faker->sentence;\n \t\t$post->body = $faker->paragraph;\n \t\t$post->category_id = rand(1, 5);\n $post->user_id = rand(1,2);\n \t\t$post->save();\n \t}\n\n $categories = ['General','Technology','Computer','Internet','Moblie'];\n foreach ($categories as $name) {\n $category= new App\\Category;\n $category ->name =$name;\n $category->save();\n }\n\n for ($i=0; $i <20 ; $i++) { \n $comment=new App\\Comment;\n $comment->comment=$faker->paragraph;\n $comment->post_id = rand(10, 20);\n $comment->save();\n }\n\n $bob = new App\\User;\n $bob->name='Bob';\n $bob->email='[email protected]';\n $bob->password=bcrypt('123456');\n $bob->save();\n\n $alice = new App\\User;\n $alice->name='Alice';\n $alice->email='[email protected]';\n $alice->password=bcrypt('12345678');\n $alice->save();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "07bb157e7f1f9063025b8db84ac92a02", "score": "0.78420794", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 20)->create();\n\n Topic::create(['name' => 'Featured Sites', 'slug' => 'featured']);\n Topic::create(['name' => 'Useful Links', 'slug' => 'links']);\n Topic::create(['name' => 'Guides & Tutorials', 'slug' => 'tutorials']);\n\n\n factory(Post::class, 20)->create();\n\n }", "title": "" }, { "docid": "8cbf125f1cbe9a706631b0b6739a5347", "score": "0.7840275", "text": "public function run()\n {\n factory(App\\Models\\User::class, 50)->create();\n// factory(App\\Models\\Category::class, 6)->create();\n $this->call(CategoriesTableSeeder::class);\n factory(App\\Models\\Post::class, 400)->create();\n factory(App\\Models\\Comment::class, 700)->create();\n factory(App\\Models\\Tag::class, 20)->create();\n $this->call(PostTagTableSeeder::class);\n $this->call(LikesTableSeeder::class);\n $this->call(BannersTableSeeder::class);\n }", "title": "" }, { "docid": "65770945a3971c8728c1a323d1cfe087", "score": "0.7829855", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Company::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,10) as $index) {\n Company::create([\n 'name' => $faker->catchPhrase,\n 'email' => $faker->unique()->companyEmail,\n 'website' => $faker->unique()->domainName,\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "f34bd24daeef3025bf64273a62304b04", "score": "0.7821777", "text": "public function run()\n {\n\n // \\App\\Models\\User::factory(10)->create();\n // Model::unguard();\n\n // $faker = Faker::create();\n\n // foreach(range(1, 30) as $index) {\n // Article::create([\n // 'title' => $faker->sentence(5),\n // 'content' => $faker->paragraph(6)\n // ]);\n // }\n\n\n // Model::reguard();\n }", "title": "" }, { "docid": "ed892f45b12929faabc610f2b0985f93", "score": "0.7821691", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('objects')->insert([\n 'name' => 'name1',\n 'description' => 'description1',\n 'type' => 'type1',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name2',\n 'description' => 'description2',\n 'type' => 'type2',\n ]);\n DB::table('objects')->insert([\n 'name' => 'name3',\n 'description' => 'description3',\n 'type' => 'type3',\n ]);\n\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 2,\n ]);\n DB::table('relations')->insert([\n 'from' => 1,\n 'to' => 3,\n ]);\n DB::table('relations')->insert([\n 'from' => 2,\n 'to' => 3,\n ]);\n\n }", "title": "" }, { "docid": "f7ba48b900e751e70594de5e33421d60", "score": "0.7802776", "text": "public function run()\n {\n // Seeding 1st user with 2 project\n User::factory(1)\n ->hasProjects(2)\n ->create();\n\n // Seed issue statuses\n DB::table('issue_statuses')->insert([\n 'name' => 'Backlog'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'To Do'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'In Progress'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Testing'\n ]);\n DB::table('issue_statuses')->insert([\n 'name' => 'Completed'\n ]);\n\n // Seeding 8 issues, project_id will be random\n Issue::factory(8)\n ->create();\n }", "title": "" }, { "docid": "29cb5cb84c4bffd9e2b2c12fec684fa6", "score": "0.780078", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Address::truncate();\n \n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 4; $i++) {\n \n $main = $i == 0 ? 1 : 0;\n Address::create([\n 'user_id' => 1,\n 'address' => $faker->address,\n 'code' => $faker->postcode,\n 'city' => $faker->city,\n 'phone' => $faker->phoneNumber,\n 'main' => $main\n ]);\n }\n }", "title": "" }, { "docid": "f50f6d54fb799adc3b1bdb3b79c484d3", "score": "0.78002775", "text": "public function run()\n {\n $faker = Faker::create();\n \tforeach (range(1,50) as $index) {\n\n \t\t$title=$faker->sentence(3);\n\n\t DB::table('articles')->insert([\n\t 'title' =>$title,\n\t 'content' => $faker->paragraph(5),\n\t 'slug'=> Str::slug($title),\n\t 'user_id'=>1,\n\t 'created_at' => new DateTime, \n\t 'updated_at' => new DateTime\n\t ]);\n }\n }", "title": "" }, { "docid": "5f769899c919388eb4ce556b4a40b76f", "score": "0.7799289", "text": "public function run()\n {\n \\DB::table('users')->insert(\n [\n 'name' => 'sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('INIT_PASSWD')),\n ]\n );\n\n //Creare 10 categorie\n $categories = factory(Category::class, 10)->create();\n //Creare 10 utenti\n $users = factory(User::class, 10)->create();\n //Creare 30 tags\n $tags = factory(Tag::class, 30)->create();\n\n //per ciascun utente creare 15 post\n foreach ($users as $user) {\n //assegnare una categoria random\n $category = $categories->random();\n $posts = factory(Post::class, 15)->create(\n [\n 'category_id' => $category->id,\n 'user_id' => $user->id,\n ]\n );\n //assegnare 3 tags random\n foreach ($posts as $post) {\n $post->tags()->sync($tags->random(3)->pluck('id')->toArray());\n }\n }\n }", "title": "" }, { "docid": "b7cfff08e0d76911d75a02d312a85fed", "score": "0.77978605", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = collect();\n $users->push([\"username\" => \"Alessandro\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n $users->push([\"username\" => \"Giorgetto\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n $users->push([\"username\" => \"Marco\", \"email\" => \"[email protected]\", \"password\" => md5(\"eldrazi\")]);\n\n foreach($users as $user) {\n User::create([\n \"username\" => $user[\"username\"],\n \"email\" => $user[\"email\"],\n \"password\" => $user[\"password\"]\n ]);\n }\n\n $articles = collect();\n $articles->push([\"title\" => \"Titolo 1\", \"content\" => \"Articolo bellissimo 1\", \"user_id\" => 1]);\n $articles->push([\"title\" => \"Titolo 2\", \"content\" => \"Articolo bellissimo 2\", \"user_id\" => 2]);\n $articles->push([\"title\" => \"Titolo 3\", \"content\" => \"Articolo bellissimo 3\", \"user_id\" => 2]);\n $articles->push([\"title\" => \"Titolo 4\", \"content\" => \"Articolo bellissimo 4\", \"user_id\" => 3]);\n\n foreach($articles as $article) {\n Article::create([\n \"title\" => $article[\"title\"],\n \"content\" => $article[\"content\"],\n \"user_id\" => $article[\"user_id\"]\n ]);\n }\n }", "title": "" }, { "docid": "30fe5a8e5f9a52e2ff54231982691f0f", "score": "0.7795682", "text": "public function run()\n {\n $this->call(AdminSeeder::class);\n factory(App\\Models\\User::class, 50)->create();\n factory(App\\Models\\Category::class, 5)->create();\n factory(App\\Models\\Category::class, 5)->create();\n factory(App\\Models\\Book::class, 50)->create();\n factory(App\\Models\\Review::class, 100)->create();\n factory(App\\Models\\Comment::class, 200)->create();\n }", "title": "" }, { "docid": "78df9713302ed4286177ce6880823388", "score": "0.77945477", "text": "public function run()\n {\n /**\n * IMPORTANT!\n * The database seed is written to handle the task centralized\n * It should use:\n * php artisan db:seed\n * -> You can not run the seeds separately, it could cause errors!\n */\n\n // Truncate all tables, except migrations\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n $tables = DB::select('SHOW TABLES');\n foreach ($tables as $table) {\n if ($table->{'Tables_in_' . env('DB_DATABASE')} !=='migrations')\n DB::table($table->{'Tables_in_' . env('DB_DATABASE')})->truncate();\n }\n\n User::factory()->count(5)->create();\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n\n $this->call(CategoriesTableSeeder::class);\n Category::factory()->count(10)->create();\n\n Post::factory()->count(100)->create();\n\n Tag::factory()->count(20)->create();\n $this->call(PostTagTableSeeder::class);\n\n Comment::factory()->count(250)->create();\n }", "title": "" }, { "docid": "aff5888ce4fe9dc9547987a84da0f5b3", "score": "0.77938676", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n factory(\\App\\User::class)->create(['email' => '[email protected]']);\n\n $series_collection = factory(\\App\\Series::class, 4)->create();\n foreach ($series_collection as $series) {\n factory(\\App\\Lesson::class, 8)->create(['series_id' => $series->id]);\n }\n }", "title": "" }, { "docid": "7a9160c6e6922f81836e612d863e24eb", "score": "0.77872473", "text": "public function run()\n {\n //\n // Let's truncate our existing records to start from scratch.\n Program::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few Programs in our database:\n for ($i = 0; $i < 50; $i++) {\n Program::create([\n 'name' => $faker->sentence,\n 'type' => $faker->word,\n 'gif' => $faker->word,\n ]);\n }\n }", "title": "" }, { "docid": "f95dae06b42b3874fd917fdaad0f1532", "score": "0.7784616", "text": "public function run()\n {\n\n // DB::table('users')->insert([\n // 'name' => 'Demo',\n // 'email' => '[email protected]',\n // 'password' => Hash::make('demo'),\n // ]);\n\n // DB::table('roles')->insert([\n // 'name' => 'admin',\n // 'slug' => 'admin', \n // ]);\n\n // DB::table('users_roles')->insert([\n // 'user_id' => '1',\n // 'role_id' => '1', \n // ]);\n DB::table('statuses')->insert([\n ['name' => 'В обработке'],\n ['name' => 'Ожидает оплату'],\n ['name' => 'Оплачен'],\n ['name' => 'Завершен'],\n ]);\n\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(10)->create();\n // \\App\\Models\\Product::factory(2)->create();\n // \\App\\Models\\Review::factory(5)->create();\n // \\App\\Models\\News::factory(22)->create();\n\n }", "title": "" }, { "docid": "9bd3519b5c055646fdf21e6b831e35f3", "score": "0.77809006", "text": "public function run()\n {\n \t// DB::table('testings')->delete();\n\n $testings = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('testings')->insert($testings);\n }", "title": "" }, { "docid": "70a0a4edc2e80e4fcf2d6a5dfa07fb36", "score": "0.7778213", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $authors = factory(App\\Author::class, 1000)->create();\n // $this->call(BooksTableSeeder::class);\n // $this->call(CategoriesTableSeeder::class);\n $this->call(BookCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "4a914f5bd3889c772b35d5a600367ac9", "score": "0.7775184", "text": "public function run()\n {\n //User::factory(1)->create();\n //Category::factory(5)->create();\n\n //Tag::factory(10)->create();\n\n $this->call([\n //PostsTableSeeder::class,\n AbilitiesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "2904723cb5eb301c095322aa920e8d1d", "score": "0.7774837", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $authorTableSeeder = new AuthorTableSeeder();\n $authorTableSeeder->run();\n\n $categoryTableSeeder = new CategoryTableSeeder();\n $categoryTableSeeder->run();\n\n $languageTableSeeder = new LanguageTableSeeder();\n $languageTableSeeder->run();\n\n $publisherTableSeeder = new PublisherTableSeeder();\n $publisherTableSeeder->run();\n\n $bookTableSeeder = new BookTableSeeder();\n $bookTableSeeder->run();\n\n $booksCategoriesTableSeeder = new BooksCategoriesTableSeeder();\n $booksCategoriesTableSeeder->run();\n\n $booksLanguagesTableSeeder = new BooksLanguagesTableSeeder();\n $booksLanguagesTableSeeder->run();\n\n }", "title": "" }, { "docid": "8d6193c666b8022d4bb4d5d90e85f9c8", "score": "0.77674073", "text": "public function run()\n {\n //\n DB::table('authors')->delete();\n $faker = Faker::create();\n foreach (range(1, 10) as $index ) {\n DB::table('authors')->insert([\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName\n ]);\n }\n }", "title": "" }, { "docid": "d11b12ac185f2cce6ea50e0c94537c98", "score": "0.77665746", "text": "public function run()\n {\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n Role::truncate();\n $roleNames = [\n ['name'=>'Superadmin'],\n ['name'=>'Admin'],\n ['name'=>'Inventory Manager'],\n ['name'=>'Order Manager'],\n ['name'=>'Customer']\n ];\n\n DB::table(\"roles\")->insert($roleNames);\n }", "title": "" }, { "docid": "0ed44f3c88a0bd394dbf05e0a1eaf0e6", "score": "0.7765398", "text": "public function run()\n {\n $this->seed(CategoriesTableSeeder::class);\n $this->seed(UsersTableSeeder::class);\n $this->seed(PostsTableSeeder::class);\n $this->seed(PagesTableSeeder::class);\n $this->seed(TranslationsTableSeeder::class);\n }", "title": "" }, { "docid": "749e5d54beba75329a6df6b91aaf15df", "score": "0.7764386", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // DB::table('users')->create([\n // 'name' => 'Admin',\n // 'email' => '[email protected]',\n // 'password' => Hash::make('Admin'),\n // ]);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('Admin'),\n ]);\n\n // factory(App\\Group::class, 10)->create()->each(function($group) {\n // $group->mappings()->saveMany(\n // factory(App\\Mapping::class, rand(1,8))->make()\n // )->each(function($mapping) {\n // $mapping->logs()->saveMany(\n // factory(App\\Log::class, rand(1,30))->make()\n // );\n // });\n // });\n }", "title": "" }, { "docid": "88449646c44f6fc44e59d75c49da4932", "score": "0.7762312", "text": "public function run()\n {\n $categories = factory(App\\Category::class, 10)->create();\n $tags = factory(App\\Tag::class, 30)->create();\n\n App\\User::create([\n 'name' => 'Sidrit',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'role' => 'admin'\n ]);\n\n factory(App\\User::class, 9)->create();\n\n $users = App\\User::all();\n\n foreach ($users as $user) {\n $posts = factory(App\\Post::class, 15)->create([\n 'user_id' => $user->id,\n 'category_id' => $categories->random()\n ]);\n\n foreach ($posts as $post) {\n $randomTags = $tags->random(3);\n\n $post->tags()->sync($randomTags->pluck('id'));\n }\n }\n }", "title": "" }, { "docid": "0b01af06c23cadcbf5be6127abe3744b", "score": "0.7760595", "text": "public function run()\n {\n $faker = Faker::create();\n foreach(range(1,10) as $index)\n {\n DB::table('expense_details')->insert([\n 'expense_details' => $faker->name,\n 'quantity' => $faker->numberBetween(5,20),\n 'cost_per_quantity' => $faker->numberBetween(100,200),\n 'created_at' => $faker->dateTimeBetween('-6 months','+1 month')\n ]);\n }\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(ConsigneeSeeder::class);\n $this->call(BrightSeeder::class);\n $this->call(roleManagement::class);\n $this->call(CategorySeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(ChallanSeeder::class);\n $this->call(OrderSeeder::class);\n $this->call(MapOrderChallanSeeder::class);\n $this->call(DesignationSeeder::class);\n $this->call(EmployeeSeeder::class);\n }", "title": "" }, { "docid": "9da011cdf6feb2eb2419c695706d6152", "score": "0.7759525", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $journals = factory('App\\Journal', 50)->create();\n $journals->each(function ($journal) {\n factory('App\\Entry', 10)->create(['journal_id' => $journal->id]);\n });\n }", "title": "" }, { "docid": "095d09077e72b251380fae2155ece479", "score": "0.7758182", "text": "public function run()\n {\n DB::table('posts')->delete();\n $faker = Faker::create();\n\n User::all()->each(function ($user) use ($faker) {\n Post::create([\n 'title' => $faker->word,\n 'body' => $faker->paragraph(),\n 'user_id' => $user->id\n ]);\n });\n }", "title": "" }, { "docid": "ac0c0ae6e47a2c4aa1523579e917e923", "score": "0.77538705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Create just one user\n DB::table('users')->insert([\n 'email' => '[email protected]',\n 'name' => 'Pierre-Yves',\n 'password' => Hash::make('secret'),\n 'created_at' => DB::raw('CURRENT_TIMESTAMP'),\n 'updated_at' => DB::raw('CURRENT_TIMESTAMP'),\n ]);\n\n // Create just one product\n DB::table('products')->insert([\n 'name' => 'Beer x24',\n 'price' => 1999,\n 'currency' => 'EUR',\n 'created_at' => DB::raw('CURRENT_TIMESTAMP'),\n 'updated_at' => DB::raw('CURRENT_TIMESTAMP'),\n ]);\n }", "title": "" }, { "docid": "1a661e3c68b00aab559fe0792729bdfa", "score": "0.7750661", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\indicadores::class, 50)->create()->each(function ($indicadores) {\n $indicadores->tipo_id()->save(factory(App\\tipo::class)->make());\n });\n }", "title": "" }, { "docid": "cb13c73a32f5f81d9840ca37255dfe68", "score": "0.774903", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //create default user\n \tDB::table('users')->insert([\n \t\t'name' => 'Christian Rosandhy',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('123456'), //Hash default laravel\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n\n \t//create example dummy post\n \tDB::table('post')->insert([\n \t\t'title' => 'Post Example Title',\n \t\t'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, dignissimos magnam eum voluptate saepe quis iste. Dolor aliquid, et beatae.',\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n \tDB::table('post')->insert([\n \t\t'title' => 'Another Title',\n \t\t'content' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nihil, odit ab ea labore distinctio aut quam commodi deserunt expedita repudiandae nostrum. Illo aliquid, nemo quos maiores eos nostrum accusamus odit.',\n \t\t'created_at' => date('Y-m-d H:i:s'),\n \t\t'updated_at' => date('Y-m-d H:i:s'),\n \t]);\n }", "title": "" }, { "docid": "4947b62035e447361c6545d854cf992b", "score": "0.7748853", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => \"Luiz Otávio Rodrigues\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('users')->insert([\n 'name' => \"Geisibel Ramos\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('users')->insert([\n 'name' => \"André Vitebo\",\n 'email' => '[email protected]',\n 'admin' => 1,\n 'password' => bcrypt('senha123'),\n ]);\n DB::table('types')->insert([\n 'name' => \"Escolha Unica\",\n ]);\n DB::table('types')->insert([\n 'name' => \"Escolha Multipla\",\n ]);\n }", "title": "" }, { "docid": "5a9fc5195b15679581362e881c52240f", "score": "0.7747358", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('users')->delete();\n\n $users = array(\n \t['uname' => 'BluePrint', 'email' => '[email protected]', 'password' => 'temp'],\n \t['uname' => 'Howken', 'email' => '[email protected]', 'password' => 'temp']\n );\n\n // Uncomment the below to run the seeder\n DB::table('users')->insert($users);\n }", "title": "" }, { "docid": "390d111bc1635559242d183c3bf5278f", "score": "0.77467203", "text": "public function run()\n {\n // Seed the 2 user roles into the database.\n DB::table('user_role')->insert([\n 'name' => 'gebruiker'\n ]);\n DB::table('user_role')->insert([\n 'name' => 'administrator'\n ]);\n\n // Create an admin account\n DB::table('users')->insert([\n 'userRole' => '2',\n 'firstName' => 'admin',\n 'lastName' => 'admin',\n 'studentNumber' => '12345678',\n 'email' => '[email protected]',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password\n ]);\n\n // Fill the database with random users.\n factory(App\\User::class, 50)->create()->each(function ($user) {});\n }", "title": "" }, { "docid": "a147f8a51837f71221c23210594445e5", "score": "0.7745889", "text": "public function run()\n {\n //没有弄数据工厂 直接使用是不行的\n //factory(\\App\\Article::class,5)->create();\n //https://github.com/fzaninotto/Faker\n $faker = Faker\\Factory::create(); //生成一个实例\n DB::table('articles')->insert([\n 'title' => $faker->title, //这个title是指标签 并不是指标题\n 'intro' => $faker->word,\n 'content' => $faker->paragraph,\n 'published_at' => \\Carbon\\Carbon::now()\n ]);\n }", "title": "" }, { "docid": "6b85b8debf03b969ec9a47557892cc2f", "score": "0.7741882", "text": "public function run()\n {\n //delete all data.\n //DB::statement('SET CONSTRAINTS ALL DEFERRED;');\n// Answer::truncate();\n //DB::statement('SET CONSTRAINTS ALL IMMEDIATE;');\n\n $faker = Faker\\Factory::create(\"ja_JP\");\n\n $questions = \\App\\Question::all();\n\n foreach ($questions as $q) {\n $answer = Answer::create([\n \"question_id\" => $q->id,\n \"text\" => $faker->text($maxNbChars = 20),\n ]);\n $answer->save();\n }\n }", "title": "" }, { "docid": "14f4502d7510513e57b886a9741f6f9a", "score": "0.77397126", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => 'password',\n 'urlImage' => $faker->imageUrl($width = 300, $height = 300)\n ]);\n }\n }", "title": "" }, { "docid": "78c25d822f8fcd9980407ceac5f94ac6", "score": "0.7737599", "text": "public function run()\n {\n \\App\\Models\\User::factory(100)->create();\n \\App\\Models\\NewsCategory::factory(5)->create();\n \\App\\Models\\KindOfNews::factory(5)->create();\n\n $this->call([\n\t BrandsTableSeeder::class,\n UsersTableSeeder::class,\n\t CategoriesTableSeeder::class,\n\t ProductsTableSeeder::class,\n\t ImageTableSeeder::class,\n NewsTableSeeder::class,\n StatusTableSeeder::class,\n ProvincesTableSeeder::class,\n DistrictsTableSeeder::class,\n WardsTableSeeder::class,\n RevenueTableSeeder::class,\n ]);\n \\App\\Models\\Comment::factory(600)->create();\n \\App\\Models\\Slide::factory(2)->create();\n }", "title": "" }, { "docid": "759c59838d104fbdc111725a197a71f5", "score": "0.77345306", "text": "public function run()\n {\n $blogFaker = Faker::create();\n $min_user_id = DB::table('users')->min('id');\n $max_user_id = DB::table('users')->max('id');\n $user_id = rand($min_user_id,$max_user_id); // generating a random user id to be use on Faker\n //seeding blog_models Table\n foreach (range(1,30) as $index) {\n DB::table('blog_models')->insert([\n 'title' => $blogFaker->title,\n 'blog_description' => 'Blog description',\n 'user_id' => $user_id\n ]);\n }\n\n\n //seeding users Table\n DB::table('users')->insert([\n 'name'=>Str::random(10),\n 'email'=>Str::random(10).'@gmail.com',\n 'password'=>Str::random(10)\n ]);\n\n }", "title": "" }, { "docid": "5ddebd551a1747c3f86d747756748099", "score": "0.77317834", "text": "public function run()\n {\n //$this->call(UserSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(DisctrictSeeder::class);\n $this->call(ClientSeeder::class);\n $this->call(ProvinciaSeeder::class);\n $this->call(TipoPagoSeeder::class);\n\n \\App\\Models\\Product::factory(50)->create();\n Motorizado::factory(10)->create();\n Pedido::factory(400)->create();\n $this->call(PedidoSeeder::class);\n $this->call(ImageSeeder::class);\n }", "title": "" }, { "docid": "30e1f0977628b8f69a6f41ca53787d31", "score": "0.77316725", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n \n // Create 5 records\n for ($i = 0; $i < 5; $i++) {\n Item::create([\n 'name' => $faker->firstName,\n 'color' => $faker->rgbCssColor,\n 'ShippingCost' => $faker->randomNumber(2),\n 'weight' => $faker->randomNumber(2)\n ]);\n }\n }", "title": "" }, { "docid": "c5dd116e4598e2886f4b456ab6a3745d", "score": "0.7731391", "text": "public function run()\n {\n $this->call(ItemSeeder::class);\n\n DB::table('users')->truncate();\n\n $user = User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'is_admin' => True,\n ]);\n\n $user = User::create([\n 'name' => 'user1',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'is_admin' => False,\n ]);\n\n $this->call(OrderSeeder::class);\n $this->call(OrderedItemSeeder::class); \n $this->call(CategorySeeder::class); \n\n Item::all()->each(function ($item) {\n $ids = Category::all()->random(rand(1,Category::count()))->pluck\n ('id')->toArray();\n $item->categories()->attach($ids);\n\n });\n\n \n\n }", "title": "" }, { "docid": "08eaf2e19291f76c747104be264bb86e", "score": "0.7730943", "text": "public function run()\n {\n $this->seedCategories();\n $this->seedMovies();\n $this->seedActors();\n }", "title": "" }, { "docid": "ac98c07de7f448c43d8cd04f5b7cf375", "score": "0.7728929", "text": "public function run()\n {\n \n ///Eloquent::unguard();\n //$this->call('UsersTableSeeder'::Class);\n\n //user table seed\n DB::table('users')->delete();\n $users = array(\n array(\n\n 'name'=>'Admin User',\n 'password'=> Hash::make('admin1'),\n 'email'=>'[email protected]',\n )\n );\n\n DB::table('users')->insert($users);\n\n //vehicle table seed\n DB::table('vehicle')->delete();\n $vehicle = array(\n array(\n\n 'name'=>'Admin User',\n 'contactnumber'=> 719977232,\n 'email'=>'[email protected]',\n 'manufacture'=>'Volkswagon',\n 'type'=>'Polo',\n 'year'=>2010,\n 'colour'=>'White',\n 'mileage'=> 12000,\n 'created_at'=>date('Y-M-D h:m:s'),\n )\n );\n\n DB::table('vehicle')->insert($vehicle);\n }", "title": "" }, { "docid": "c1498193b69425fc2ad9300a42572dd3", "score": "0.7728553", "text": "public function run()\n {\n // removes previously created data\n \\App\\User::truncate();\n \\App\\Todo::truncate();\n\n // seeds the database\n factory(\\App\\User::class, 20)->create();\n factory(\\App\\Todo::class, 60)->create();\n }", "title": "" }, { "docid": "1db1d3897b4fa92b0187c48f545a59a1", "score": "0.77277166", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(UsersSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(ArticulosSeeder::class);\n $this->call(ArticuloCategoriaSeeder::class);\n\n Articulo::factory()->count(55)->create();\n\n\n\n }", "title": "" }, { "docid": "857343b3f1f9be61d656bcb899727c9d", "score": "0.7726611", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory('App\\Blog',100)->create();\n factory('App\\client',50)->create();\n factory('App\\App_Services',10)->create();\n factory('App\\Msg',30)->create();\n }", "title": "" }, { "docid": "b13076b4062ba89b35a625f899bbb96f", "score": "0.772651", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 8',\n 'price' => '22000',\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 11',\n 'price' => '31000',\n ]);\n\n DB::table('products')->insert([\n 'name' => 'Iphone 11 pro',\n 'price' => '39000',\n ]);\n }", "title": "" }, { "docid": "51e41d2883ea3afa0a3f136436d8b297", "score": "0.7726129", "text": "public function run()\n {\n $user_ids = ['1'];\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(Article::class)->times(50)->make()->each(function ($articles) use ($faker, $user_ids) {\n $articles->user_id = $faker->randomElement($user_ids);\n });\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "33a330b6e5aa3b365ffb9df8e8361a48", "score": "0.7725176", "text": "public function run()\n {\n // \\App\\Models\\User::factory()->create();\n \\App\\Models\\Role::factory()->create();\n // \\App\\Models\\Profile::factory()->create();\n // \\App\\Models\\ContentSection::factory(3)->create();\n // \\App\\Models\\Language::factory(1)->create();\n\n $this->call([\n ContentSectionSeeder::class,\n ]);\n\n $this->call([\n LanguageSeeder::class,\n ]);\n }", "title": "" }, { "docid": "342d48d9c10a6f82d2ab72419a6764dd", "score": "0.77239937", "text": "public function run()\n {\n //\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Role::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Role::create([\n 'role_name' => 'admin',\n ]);\n Role::create([\n 'role_name' => 'etudiant',\n ]);\n Role::create([\n 'role_name' => 'enseignant',\n ]);\n }", "title": "" }, { "docid": "5089a000911f524c7758cc800589f1a0", "score": "0.77177197", "text": "public function run()\n {\n\n $this->call(LanguageSeeder::class);\n\n\n\n factory(App\\User::class)->create([\n 'name' => 'Eslam Fakhry',\n 'email' => '[email protected]',\n 'bio' => 'Full-stack web developer',\n ]);\n factory(App\\User::class, 20)->create();\n\n\n $this->call(BookSeeder::class);\n\n\n factory(App\\Review::class, 100)->create([\n 'reviewer_id' => function () {\n return \\App\\User::inRandomOrder()->first()->id;\n },\n 'book_id' => function () {\n return \\App\\Book::inRandomOrder()->first()->id;\n },\n 'language_id' => function () {\n return \\App\\Language::inRandomOrder()->first()->id;\n },\n ]);\n\n \\App\\User::find(1)->followings()->sync([2, 3, 4, 8, 10, 20, 8]);\n\n }", "title": "" }, { "docid": "6e1a2b00c8e9ea2d0430a94dd2dc07a6", "score": "0.77159035", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Deputy_Director::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker=Faker::create();\n $fakerS=Faker::create('es_ES');\n\n\n $genders = Gender::all()->pluck('id')->toArray();\n $document_types = Document_Type::all()->pluck('id')->toArray();\n\n\n for($i=0;$i<=19;$i++){\n\n $name= $faker->firstName.\" \".$faker->firstName;\n $lname= $faker->lastName;\n $var = explode(\" \", $name);\n $email= strtolower($var[0][0].$var[1][0].$lname).$faker->numberBetween($min=1,$max=20).\"@misena.edu.co\";\n\n Deputy_Director::create([\n 'document_type_id'=>$faker->randomElement($document_types),\n 'gender_id'=>$faker->randomElement($genders),\n 'deputy_director_names'=>$name,\n 'deputy_director_lastnames'=> $lname,\n 'document_number'=>$fakerS->unique()->dni,\n 'phone_number'=>$fakerS->mobileNumber,\n 'email'=>$email,\n 'digital_firm'=>'tmp/firms/'.bcrypt($faker->word).'.jpg',\n 'created_at'=>Carbon::now(),\n 'updated_at'=>Carbon::now()\n ]);\n }\n }", "title": "" }, { "docid": "86140c23beade708078da92aa5df55e1", "score": "0.7714966", "text": "public function run()\n {\n \\App\\Models\\User::create([\n 'name' => 'Admin',\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'is_admin' => true\n ]);\n \n $user = \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Category::create([\n 'name' => 'Lifestyle',\n 'slug' => 'lifestyle'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'Home',\n 'slug' => 'home'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'World',\n 'slug' => 'world'\n ]);\n\n \\App\\Models\\Category::create([\n 'name' => 'Sports',\n 'slug' => 'sports'\n ]);\n\n Category::all()->each(function($category) use ($user){\n return \\App\\Models\\Post::factory(5)->create([\n 'user_id' => rand(1,9),\n 'category_id' => $category->id\n ])->each(fn($post) => \\App\\Models\\Comment::factory(3)->create(['post_id' => $post->id]));\n });\n\n \\App\\Models\\Category::factory(30)->create();\n }", "title": "" }, { "docid": "59f955bedb8a711f268867709f8dea81", "score": "0.7714579", "text": "public function run()\n {\n DB::table('users')->insert([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'email_verified_at' => '2020-1-1 23:59:59',\n 'password' => Hash::make('12345678'),\n 'role' => '2',\n 'phone'=> '0123456789',\n 'address' => \"Ha Noi\"\n ]);\n\n $this->call(CategorySeeder::class);\n $this->call(UserSeeder::class);\n $this->call(PostSeeder::class);\n $this->call(CommentSeeder::class);\n\n\n }", "title": "" }, { "docid": "c821d4627c62beb0b71b0abb66435065", "score": "0.77121747", "text": "public function run()\n {\n \t$this->seedPresencesTable();\n \t#$this->seedFamillesTable();\n \t#$this->seedReponsesTable();\n }", "title": "" }, { "docid": "7efff028f8bcd73672942f6e64f55cb8", "score": "0.7711514", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Hotel::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // Create Hotels in our database:\n for ($i = 0; $i < 3; $i++) {\n Hotel::create([\n 'name' => $faker->name,\n 'address' => $faker->text,\n 'city' => $faker->city,\n 'state' => $faker->state,\n 'country' => $faker->country,\n 'zipcode' => $faker->text,\n 'phonenumber' => $faker->PhoneNumber,\n 'email' => $faker->email,\n 'image' => $faker->Image,\n ]);\n }\n }", "title": "" }, { "docid": "153c1f8bdfd59fce12788f6d5d7d6c36", "score": "0.77101886", "text": "public function run()\n {\n $this->call([\n CategorySeeder::class,\n UserTableSeeder::class\n ]);\n PostFactory::factoryForModel(Post::class)->count(12)->create();\n ProjectFactory::factoryForModel(Project::class)->count(12)->create();\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "c3a88275c1c72240c6d83f192871cfe3", "score": "0.7710164", "text": "public function run()\n {\n //\n $faker = Faker\\Factory::create();\n\n //\n foreach (range(1,20) as $index) {\n DB::table('el_news')->insert([\n 'title' => $faker->sentence(),\n 'content' => $faker->paragraph(50),\n 'description' => $faker->paragraph(50),\n 'type' => 1,\n 'image' => '',\n 'views' => 1,\n 'status' => 1,\n 'category_id' => $faker->randomElement(\\Modules\\News\\Entities\\NewsCategory::pluck('id')->toArray()),\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => date('Y-m-d H:I:s'),\n 'updated_at' => date('Y-m-d H:I:s'),\n ]);\n }\n }", "title": "" }, { "docid": "5281e1bc8fae384813e91026d075e658", "score": "0.77091146", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // for disable foreign key for some time\n\n User::truncate();\n Post::truncate();\n Comment::truncate();\n\n User::flushEventListeners();\n Post::flushEventListeners();\n Comment::flushEventListeners();\n\n factory(User::class,1000)->create();\n factory(Post::class,3000)->create();\n factory(Comment::class,5000)->create();\n }", "title": "" }, { "docid": "f8b16a91635feff9b0eed8613162a30c", "score": "0.77088976", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory('App\\Doctor')->create(['nip' => 'doc', 'password' => bcrypt('123456')]);\n factory('App\\Patient')->create(['nip' => 'pat', 'password' => bcrypt('123456')]);\n factory('App\\Staff')->create(['nip' => 'stf', 'password' => bcrypt('123456')]);\n }", "title": "" }, { "docid": "bb1ac66935520f1e65bc2c3e57ceeb96", "score": "0.77083236", "text": "public function run()\n {\n // Truncate tables\n Schema::disableForeignKeyConstraints();\n DB::table(\"categories\")->truncate();\n DB::table(\"comments\")->truncate();\n DB::table(\"images\")->truncate();\n DB::table(\"password_resets\")->truncate();\n DB::table(\"posts\")->truncate();\n DB::table(\"tags\")->truncate();\n DB::table(\"users\")->truncate();\n DB::table(\"videos\")->truncate();\n Schema::enableForeignKeyConstraints();\n\n // User with same address\n App\\User::factory()->create([\n 'email' => \"[email protected]\"\n ]);\n // Create random data\n App\\User::factory()->count(20)->create();\n App\\Modele\\Category::factory()->count(10)->create();\n App\\Modele\\Post::factory()->count(250)->create();\n App\\Modele\\Tag::factory()->count(50)->create();\n App\\Modele\\Image::factory()->count(200)->create();\n App\\Modele\\Video::factory()->count(50)->create();\n App\\Modele\\Comment::factory()->count(1500)->create();\n }", "title": "" }, { "docid": "317c20db1e0b5a1227665f31230ccfc2", "score": "0.770664", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Department::truncate();\n \n $faker = \\Faker\\Factory::create();\n $departments = [\n 'Sales',\n 'Customer care',\n 'ping pong training',\n 'management',\n 'package repair'\n ];\n\n for ($I1 = 0; $I1 < 100; $I1++){\n Department::create([\n 'name' => $departments[$I1 % 5],\n 'head' => $faker->name,\n 'location' => $fake->city\n ]);\n }\n\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "53a3c8a23a49f26ca26290c5746850bc", "score": "0.7704476", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n //delete all data on each table on any call\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n //The quantities of factories to create\n $userQuantity = 200;\n $categoryQuantity = 30;\n $productQuantity = 1000;\n $transactionQuantity = 1000;\n\n //Use factory helper to create the data\n factory(User::class, $userQuantity)->create();\n factory(Category::class, $categoryQuantity)->create();\n factory(Product::class, $productQuantity)->create()->each(function($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n factory(Transaction::class, $transactionQuantity)->create();\n }", "title": "" }, { "docid": "f6f8b18092f343eec722788678235929", "score": "0.77022856", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n\n //Liga::factory()->has(Equipo::factory()->count(8))->create();\n\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n Liga::factory()->has(Equipo::factory()->has(Jugador::factory()->count(12))->count(8))->create();\n\n }", "title": "" }, { "docid": "a922d59f300416d258d2970e78be71ed", "score": "0.77017814", "text": "public function run() {\n\t\t//Model::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n DB::table('articles')->delete();\n \n $articles = array(\n ['titulo' => 'Project 1', 'conteudo' => 'project-1', 'autor' => 'Leonardo', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['titulo' => 'Project 2', 'conteudo' => 'project-2', 'autor' => 'Fernanda', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['titulo' => 'Project 3', 'conteudo' => 'project-3', 'autor' => 'Leonardo', 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n\n // Uncomment the below to run the seeder\n DB::table('articles')->insert($articles);\n\t}", "title": "" }, { "docid": "c4ea649d992a2f46320661ff70d8946c", "score": "0.77015346", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(SpecialsTableSeeder::class);\n //MedicalCard::factory(10)->create();\n $user = User::factory(1)->create()->each(function ($user){\n Member::factory()->create([\n 'user_id'=>$user->id,\n 'id_card'=>null,\n 'id_spec'=>null,\n ]);\n });\n foreach ($user as $userWithoutRole){\n $userWithoutRole->assignRole('admin');\n }\n //Member::factory(10)->create();\n //Meet::factory(10)->create();\n //Recipe::factory(10)->create();\n //Appointment::factory(10)->create();\n //Time::factory(10)->create();\n }", "title": "" }, { "docid": "a32483a969494071a38b045c323d0f50", "score": "0.77011496", "text": "public function run()\n {\n\n\t\tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('questions')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,100) as $key => $value ) {\n \t\tQuestion::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(1),\n \t\t'cour_id'=>$faker->randomElement($cours) ,\n \t\t//'type'=>$faker->randomElement(['one'=>'one' , 'multiple'=>'multiple']) ,\n 'type'=>$faker->randomElement(['multiple'=>'multiple']) ,\n \t\t'score'=>$faker->numberBetween( 0, 100) ,\n 'pass'=>$faker->paragraph(1),\n 'fail'=>$faker->paragraph(1),\n 'partial'=>$faker->paragraph(1),\n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "1931281363962728676ce211cdbc898c", "score": "0.77004915", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(20)->create();\n // \\App\\Models\\Product::factory(100)->create();\n \\App\\Models\\Slider::factory(30)->create();\n // $this->call(ProductCategorySeeder::class);\n // $this->call(SizeSeeder::class);\n // $this->call(ProductSizeSeeder::class);\n // $this->call(ShippingMethodSeeder::class);\n // $this->call(RegionSeeder::class);\n\n }", "title": "" }, { "docid": "869b86c9673e17509719354cadb4e6ee", "score": "0.76994365", "text": "public function run()\n {\n factory(User::class, 10)->create()->each(function($user) {\n $user->articles()->saveMany(factory(Article::class, rand(1,6))->make());\n });\n factory(Category::class, 5)->create();\n\n// $this->call(UsersTableSeeder::class);\n// $this->call([\n// UserTableSeeder::class,\n// ArticlesTableSeeder::class,\n// ]);\n }", "title": "" }, { "docid": "ac903ce5d99a599c602b0990b0103290", "score": "0.7698475", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('groups')->delete();\n\n $projects = array(\n ['id'=> 1, 'name' => \"txtcmdr\"],\n ['id'=> 2, 'name' => \"duterte\"],\n ['id'=> 3, 'name' => \"baligod\"],\n ['id'=> 4, 'name' => \"marcos\"]\n );\n\n // Uncomment the below to run the seeder\n DB::table('projects')->insert($projects);\n }", "title": "" }, { "docid": "b9a88949d87e4830da37107328024747", "score": "0.76979405", "text": "public function run()\n {\n $this->seedSettings();\n $this->seedUsers();\n }", "title": "" }, { "docid": "87a0832df706dd20db820b1e2fab0c9c", "score": "0.7697926", "text": "public function run()\n {\n DB::table('users')->insert([\n \t'id' => '1',\n 'name' => 'Super Admin',\n 'email' => '[email protected]',\n 'role' => '1',\n 'password' => bcrypt('superadmin')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '2',\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'role' => '2',\n 'password' => bcrypt('admin123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '3',\n 'name' => 'Teacher',\n 'email' => '[email protected]',\n 'role' => '3',\n 'password' => bcrypt('teacher123')\n ]);\n\n DB::table('users')->insert([\n \t'id' => '4',\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'role' => '4',\n 'password' => bcrypt('student123')\n ]);\n\n $faker = Faker::create();\n \n \tforeach(range(5,20) as $i){\n \n \t DB::table('users')->insert([\n 'id' => $i,\n \t\t\t'name' => $faker->name,\n \t\t\t'email' => $faker->email,\n \t\t\t'role' => $faker->numberBetween(1,4),\n 'password' => bcrypt('password'),\n \t\t]);\n \n \t}\n }", "title": "" }, { "docid": "aa53f1c5fb430766e7a98e469ae64e55", "score": "0.769578", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /*DB::table('ambitos')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => bcrypt('secret'),\n ]);*/\n\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Laboratorios',\n ]\n );\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Inspección',\n ]\n );\n DB::table('ambitos')->insert(\n [\n 'nombreAmbito' => 'Certificación',\n ]\n );\n }", "title": "" }, { "docid": "dfd6d8c639638a96be0cadeef15562d9", "score": "0.76953965", "text": "public function run()\n {\n\n // factory(App\\User::class, 3)->create()->each(function($u) {\n // $u->questions()\n // ->saveMany(\n // factory(App\\Models\\Question::class, rand(1, 5))->make()\n // )->each(function ($q){\n // $q->answers()->saveMany(\n // factory(App\\Models\\Answer::class,rand(1,5))->make()\n // );\n // });\n // });\n // $this->call(UsersTableSeeder::class);\n //factory(App\\User::class,5)->create();\n //factory(Question::class,30)->create();\n // factory(App\\User::class,3)->create()->each(function($user){\n // $user->questions()\n // ->saveMany(\n // factory(Question::class)->make()\n // );\n // });\n // factory(App\\Models\\Question::class,20)->create();\n // $this->call([\n // UsersQuestionsAnswersTableSeeder::class,\n // FavoritesTableSeeder::class,\n // VotablesTableSeeder::class\n // ]);\n }", "title": "" }, { "docid": "27c99873266cde824f7337394289d5ba", "score": "0.7694441", "text": "public function run()\n {\n factory(Users::class, 1)->create(['name' => 'Maria', 'email' => '[email protected]']);\n\n factory(Users::class, 6)->create();\n\n //Fazendo seeds ao modo antigo\n /*$dados = [\n [\n 'id' => '1', \n 'name' => 'Maria',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'user_name' => 'Mariajog',\n 'language_id' => '1',\n 'user_type' => 'internal',\n 'entity_id' => NULL\n ],\n [\n 'id' => '2', \n 'name' => 'Jose',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n 'user_name' => 'Jose',\n 'language_id' => '1',\n 'user_type' => 'internal',\n 'entity_id' => NULL\n ]\n ];\n\n foreach ($dados as $value) {\n Users::create($value);\n }*/\n }", "title": "" }, { "docid": "50bfbb81e7f0b2cada39621bf4b75676", "score": "0.7692319", "text": "public function run()\n {\n // faker基本使用\n /*$faker = Faker\\Factory::create();\n $data = [];\n for ($i=1;$i<10;$i++) {\n $data[] = [\n 'title'=>$faker->name,\n 'desc'=>$faker->sentence\n ];\n }\n DB::table('articles')->insert($data);*/\n\n //使用faker数据工厂模拟数据\n factory(\\App\\Models\\ArticleModel::class, 20)->create();\n }", "title": "" }, { "docid": "44a48d15b3281fa6fbc422f22f3822ad", "score": "0.7691214", "text": "public function run()\n {\n $this->call([\n UsersTableSeeder::class,\n Users_ProfileTableSeeder::class,\n BlogSeeder::class,\n BookStoreSeeder::class,\n CategoryTableSeeder::class,\n AdvertisementSeeder::class,\n InterestTableSeeder::class,\n RelationshipTableSeeder::class,\n SkillTableSeeder::class,\n SubjectTableSeeder::class,\n UserMediaSeeder::class,\n\n\n\n ]);\n\n // User::factory(50)->create();\n // Advertisement::factory(100)->create();\n // UserMedia::factory(100)->create();\n // Book_Store::factory(100)->create();\n // Blog::factory(100)->create();\n\n\n }", "title": "" }, { "docid": "e4eee217bbf7d32481fc105c3b5751a3", "score": "0.76893795", "text": "public function run()\n {\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $key => $index) {\n PostCategory::create([\n 'category_id' => $faker->numberBetween($min = 1, $max = 5),\n 'post_id' => $faker->numberBetween($min = 1, $max = 5),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(), \n ]);\n }\n }", "title": "" }, { "docid": "fcb394d31b8bc02eaf3d748869eb0952", "score": "0.7688843", "text": "public function run()\n {\n\n $this->call([\n PermissionSeeder::class,\n RatingSeeder::class\n ]);\n Post::query()->delete();\n User::query()->delete();\n User::factory(1)\n ->create()\n ->each(function ($user) {\n $user->assignRole('admin');\n });\n User::factory(1)\n ->create()\n ->each(function ($user) {\n $user->assignRole('moderator');\n });\n User::factory(3)\n ->create()\n ->each(function ($user) {\n $user->assignRole('author');\n });\n User::factory(10)\n ->create()\n ->each(function ($user) {\n $user->assignRole('reader');\n });\n Post::factory(30)->create();\n }", "title": "" }, { "docid": "c1cba4ba964267e60436752e1daf7256", "score": "0.7688797", "text": "public function run(): void\n {\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'DE',\n 'language_code' => 'de',\n 'author_id' => random_int(1, 5),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'US',\n 'language_code' => 'en',\n 'author_id' => random_int(6, 10),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'FR',\n 'language_code' => 'fr',\n 'author_id' => random_int(11, 15),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'CH',\n 'language_code' => 'de',\n 'author_id' => random_int(16, 20),\n ]);\n factory(App\\Models\\Book::class, 5)->create([\n 'country_code' => 'CH',\n 'language_code' => 'fr',\n 'author_id' => random_int(11, 20),\n ]);\n }", "title": "" }, { "docid": "4a0c4ba7e38375d8b1a0bdcf318313bd", "score": "0.76850325", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('review')->truncate();\n\n $data = [];\n\n foreach (range(1,10) as $value){\n $data[] = [\n 'id'=>$value,\n \"code_id\"=>$value,\n \"user_id\"=>1,\n \"company_id\"=>1\n ];\n\n }\n\n DB::table('review')->insert($data);\n }", "title": "" }, { "docid": "7d0e99ebf59b9e7e65637b3d9c38bddb", "score": "0.76849854", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n factory(MenuGroup::class, 5)->create()->each(function ($group) {\n $group->items()->createMany(factory(MenuItem::class, 2)->make()->toArray());\n });\n\n factory(MenuItem::class, 5)->create();\n\n $this->call(PostsTableSeeder::class);\n }", "title": "" }, { "docid": "de8bed7f0641273ac93ceebe6aee2ba9", "score": "0.7684196", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\tDB::table('users')->delete();\n\n\t\t$faker = \\Faker\\Factory::create('es_AR');\n\n\t\tforeach(range(0, 10) as $index)\n\t\t{\n\t\t\tUser::create([\n\t\t\t\t'nombres' => $faker->firstName,\n\t\t\t\t'apellidos' => $faker->lastName,\n\t\t\t\t'direccion' => $faker->address,\n\t\t\t\t'telefono' => $faker->phoneNumber,\n\t\t\t\t'celular' => $faker->phoneNumber,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 12345,\n\t\t\t]);\n\n\t\t\tProduct::create([\n\t\t\t\t'codigo' => $faker->uuid,\n\t\t\t\t'marca' => $faker->company,\n\t\t\t\t'modelo' => $faker->md5,\n\t\t\t\t'cantidad' => $faker->numberBetween(1, 100),\n\t\t\t]);\n\t\t}\n\n\t\tRole::create([\n\t\t\t'name' => 'Administrator',\n\t\t\t'detail' => 'Administrador de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Seller',\n\t\t\t'detail' => 'Vendedor de la tienda'\n\t\t]);\n\t\tRole::create([\n\t\t\t'name' => 'Client',\n\t\t\t'detail' => 'Cliente de la tienda'\n\t\t]);\n\t}", "title": "" }, { "docid": "6cefa488bb7f414dd43c39041af00a3b", "score": "0.76809907", "text": "public function run()\n {\n //How to create multiple data for a table\n // $this->call(UsersTableSeeder::class);\n // DB::table('names')->insert(\n // [\n // 'name'=>str_random(10),\n // 'email'=>str_random(10).'@gmail.com',\n // 'password'=>bcrypt('secret'),\n // ]\n // );\n\n factory(App\\User::class,50)->create();\n $this->call(TestSeeder::class);\n\n //we can call multiple seeders here\n\n //to seed only a single seeder use\n //php artisan db:seed --class=TestSeeder\n }", "title": "" }, { "docid": "44ec12a31cf67e6e0e55dc0fd46fa7fd", "score": "0.76787496", "text": "public function run()\n\t{\n\t\t$faker = $this->getFaker();\n\t\t$users = NULL;\n\n\n\t\t// Uncomment the below to wipe the table clean before populating\n\t\tDB::table('users')->truncate();\n\n\n\t\t// Default user\n\t\t$users[] = array('username' => 'admin', 'email' => '[email protected]', 'password' => Hash::make('1234'), 'status' => 'Active');\n\n\t\t// Random users\n\t\tfor($i=0; $i<5; $i++)\n\t\t{\n\t\t\t$users[] = array('username' => strtolower($faker->firstname) ,\n\t\t\t\t 'email' => $faker->email,\n\t\t\t\t 'password' => Hash::make('1234'),\n\t\t\t\t 'status' => 'Active');\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('users')->insert($users);\n\t}", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "8871c9f26c18a7258a1b1019f13be378", "score": "0.0", "text": "public function up(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE brief DROP FOREIGN KEY FK_1FBB1007B3E9C81');\n $this->addSql('DROP INDEX IDX_1FBB1007B3E9C81 ON brief');\n $this->addSql('ALTER TABLE brief DROP niveau_id');\n }", "title": "" } ]
[ { "docid": "2b6b08a052405f52f7571399eebafe14", "score": "0.7806049", "text": "abstract function up();", "title": "" }, { "docid": "666cb139d12af7d816086944f5f0c863", "score": "0.77790695", "text": "public function up() {\n\t\tparent::up();\n\t\t//$this->addForeignKey( \"fk_extlogin_user\",\"{{\".$this->table_name.\"}}\",\"userid\",\"{{\".$this->foreign_table_name.\"}}\",\"id\",\"CASCADE\",\"CASCADE\" );\n\t\t\n\t}", "title": "" }, { "docid": "e2334bab9dd612fa79a2b1a4d623516e", "score": "0.77155256", "text": "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `ccmp_company` \n ADD COLUMN `ccmp_registration_date` DATE NULL AFTER `ccmp_vat_registrtion_no`,\n CHANGE `ccmp_office_phone` `ccmp_office_phone` VARCHAR(45) CHARSET utf8 COLLATE utf8_general_ci NULL,\n CHANGE `ccmp_office_email` `ccmp_office_email` VARCHAR(100) CHARSET utf8 COLLATE utf8_general_ci NULL;\n \");\n }", "title": "" }, { "docid": "2b0c8094ac63ff7719a09fb2d432adb5", "score": "0.7674763", "text": "protected function up()\n {\n }", "title": "" }, { "docid": "627326097197ff042404b56d31587847", "score": "0.759487", "text": "public function up();", "title": "" }, { "docid": "1942e3cd3b336f035cd536962c112758", "score": "0.75792944", "text": "public function up()\n\t{\n\n\t}", "title": "" }, { "docid": "c1e4f19c954a9191966e7d133a534219", "score": "0.75745314", "text": "public function up()\n {\n $workflow_item = $this->table('workflow_item');\n\n if ( !$workflow_item->hasColumn('arg_context')) {\n $this->execute(\n \"ALTER TABLE `\" . $this->dbName . \"_tables`.`workflow_item` ADD `arg_context` TEXT COMMENT 'Parameter of script call' AFTER `workflow_transition_id`;\"\n\n );\n $this->execute(\"\n CREATE OR REPLACE ALGORITHM=MERGE\n DEFINER=`root`@`localhost`\n SQL SECURITY DEFINER\n\n VIEW \" . $this->dbName . \".workflow_item AS\n select *\n from \" . $this->dbName . \"_tables.workflow_item\n WITH CASCADED CHECK OPTION\n \");\n }\n }", "title": "" }, { "docid": "bdecf392ccdd6d2c401c7a1524f32a60", "score": "0.74465215", "text": "public function up()\n {\n \t$table = $this->table('seotrackings');\n\t\t\n\t\t// drop column type\n\t\t$table->removeColumn('type')\n\t\t\t->update();\n\t\t\t\n\t\t// rename column name to title\n\t\t$table->renameColumn('name', 'title');\n\t\t\n\t\t// add column description\n\t\t$table->addColumn('description', 'text', array('after' => 'title'))\n ->update();\n }", "title": "" }, { "docid": "6779c2251748fceb57bfce22aea93014", "score": "0.7443179", "text": "abstract public function up(): void;", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "ed445846a100b96d354475f1790f51e3", "score": "0.74241734", "text": "public function up()\n {\n DBManager::get()->execute(\"ALTER TABLE `external_videos`\n ADD `type` ENUM('share','vimeo') NOT NULL DEFAULT 'share' AFTER `video_id`,\n ADD `external_id` VARCHAR(255) NULL AFTER `type`\");\n }", "title": "" }, { "docid": "a83f864d6b79e8c88e59e471b33f29df", "score": "0.7395421", "text": "public function up()\n {\n Schema::table('posts', function (Blueprint $table) {\n //Since this file just adds a column, the command used \"make:migration\" didn't include some table columns in the up method to begin with\n $table->tinyinteger('is_admin')->default('0');\n });\n }", "title": "" }, { "docid": "dc501caeb3b453d07b24fcfb9e86bee1", "score": "0.7381998", "text": "public function up()\n\t{\n\t\t$this->db->disableForeignKeyChecks();\n \n\t\t$this->forge->addField($this->_fJenis);\n\t\t$this->forge->addPrimaryKey('id');\n\t\t$this->forge->createTable('tb_jenis_soal');\n\t\t$this->db->enableForeignKeyChecks();\n\n\t}", "title": "" }, { "docid": "7bb2a94218ad5949b4df30971ae6e8a0", "score": "0.7368462", "text": "public function up()\n {\n\n }", "title": "" }, { "docid": "aa91de7449cf07485148a8824fd4d0f2", "score": "0.73647416", "text": "public function up()\n\t{\n $migrationQuery = \"ALTER TABLE `tbl_pm` CHANGE `user1read` `is_read` TINYINT( 2 ) NOT NULL DEFAULT '0'\";\n\n //Run the query\n\t\tmysql_query($migrationQuery);\n\n //Some fields name are changed. Owner became from_user\n $migrationQuery = \"ALTER TABLE `tbl_pm` CHANGE `owner` `to_user` BIGINT( 20 ) NULL\";\n\n //Run the query\n\t\tmysql_query($migrationQuery);\n\n //Some fields name are changed. Escape person became to_user\n $migrationQuery = \"ALTER TABLE `tbl_pm` CHANGE `escape_person` `from_user` BIGINT( 20 ) NULL\";\n\n //Run the query\n\t\tmysql_query($migrationQuery);\n }", "title": "" }, { "docid": "f4dda53aaf174db3afff101e94632838", "score": "0.7341817", "text": "public function up()\n {\n $users = $this->table('materials');\n $users->addColumn('material', 'string', ['limit' => 100])\n ->addColumn('created_at', 'datetime')\n ->addColumn('updated_at', 'datetime', ['null' => true])\n ->save();\n }", "title": "" }, { "docid": "f082d03a4d4ac5eb7f765b6b10d77864", "score": "0.73326826", "text": "public function safeUp()\r\n\t{\r\n $this->createTable('orders', array(\r\n 'id' => 'pk',\r\n 'ref_number' => 'string NOT NULL',\r\n 'state' => 'string NOT NULL',\r\n 'payment_state' => 'string NOT NULL',\r\n 'delivery_state' => 'string NOT NULL',\r\n 'delivery_address' => 'text',\r\n 'quantity' => 'int NOT NULL',\r\n 'total_amount' => 'float',\r\n 'product_id' => 'int NOT NULL',\r\n 'user_id' => 'int NOT NULL',\r\n 'shop_id' => 'int NOT NULL'\r\n ));\r\n\t}", "title": "" }, { "docid": "4da6c0ccfa4c99196b4495ba5e330717", "score": "0.73326755", "text": "public function up()\n {\n $this->addColumn('vote', 'point', $this->integer()->defaultValue(0));\n $this->dropColumn('vote', 'up');\n $this->dropColumn('vote', 'down');\n\n }", "title": "" }, { "docid": "824290bbc6202ad18beaa4209e8bd15a", "score": "0.73230404", "text": "public function up()\n\t{\n\t\t#$this->down(); \n\t\tSchema::table('categories', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->increments('id');\n\t\t\t$table->integer('event_id');\n\t\t\t$table->string('name');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('event_id')->references('id')->on('events');\n\t\t});\n\n\t\tSchema::table('products', function($table)\n\t\t{\n\t\t\t$table->integer('category_id');\n\t\t\t#$table->foreign('category_id')->references('id')->on('categories');\n\t\t});\n\t}", "title": "" }, { "docid": "f26b77bf7761f25cad343060653b272d", "score": "0.73182607", "text": "public function safeUp()\n {\n \t$this->createTable('ComplaintStatus', [\n 'id' => $this->primaryKey(),\n 'value' => $this->string(16)->notNull(),\n ]);\n\n \t$this->createIndex('index_complaintstatus_id', 'ComplaintStatus', 'value');\n }", "title": "" }, { "docid": "74589a1ee8d409aaaa5a7ad30bcdbd89", "score": "0.7302128", "text": "public function safeUp()\n {\n $sql = <<<SQL\nALTER TABLE \"heritage_assessment\".heritage ALTER COLUMN d_code TYPE INTEGER\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE \"heritage_assessment\".heritage ALTER COLUMN v_code TYPE INTEGER\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n $sql = <<<SQL\nALTER TABLE \"heritage_assessment\".heritage ALTER COLUMN ward_no TYPE INTEGER\nSQL;\n Yii::$app->db->createCommand($sql)->execute();\n\n }", "title": "" }, { "docid": "06632ebdfd40b47a597f9b8fe8cf1dcd", "score": "0.7280657", "text": "public function up()\n\t{\n\t\tDB::statement('ALTER TABLE `habitat_Company` CHANGE company_name name VARCHAR(255);');\n DB::statement('ALTER TABLE `habitat_Certification` CHANGE cert_name name VARCHAR(255);');\n DB::statement('ALTER TABLE `habitat_Trade` CHANGE trade_name name VARCHAR(255);');\n DB::statement('ALTER TABLE `habitat_Project` CHANGE project_name name VARCHAR(255);');\n\t}", "title": "" }, { "docid": "e673e6009afbe5a3bedb0dd2fc7b7771", "score": "0.7271997", "text": "public function up() {\n $this->db->query(\"\n ALTER TABLE `RecyclingInvoices`\n ADD COLUMN `BOLNumber` varchar(255) NULL AFTER `total`;\n \");\n \n }", "title": "" }, { "docid": "a22f18a098689ae9c6fdfe01b2852f67", "score": "0.7271653", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE `esq_client_messages` \r\n ADD `submitted_by_user_agent` TEXT NULL AFTER `submitted_by_ip`,\r\n ADD `is_spam` BOOL NULL DEFAULT NULL AFTER `is_viewed`;\");\r\n }", "title": "" }, { "docid": "0d3a736d14ea94a8bdc7fb65796fbc89", "score": "0.7254428", "text": "public function safeUp()\n {\n $this->alterColumn('barang', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Ubah barang.kategori_id menjadi (allow) null */\n $this->dropForeignKey('fk_barang_kategori', 'barang');\n $this->alterColumn('barang', 'kategori_id', ' INT(10) UNSIGNED NULL');\n $this->addForeignKey('fk_barang_kategori', 'barang', 'kategori_id', 'barang_kategori', 'id');\n\n /* Tambah kolom barang.struktur_barang_id */\n $this->addColumn('barang', 'struktur_id', 'INT UNSIGNED NULL AFTER `nama`');\n $this->createIndex('fk_barang_struktur_idx', 'barang', 'struktur_id');\n $this->addForeignKey('fk_barang_struktur', 'barang', 'struktur_id', 'barang_struktur', 'id');\n }", "title": "" }, { "docid": "1b71eaa6bc2c1a0bba5457433eec428b", "score": "0.72423035", "text": "public function up()\n { $this->renameColumn('ull_wiki', 'deleted', 'deleted_at');\n $this->changeColumn('ull_wiki', 'deleted_at', 'timestamp');\n }", "title": "" }, { "docid": "443cd1e5bc421d44c8121bbe6ca64120", "score": "0.72265714", "text": "public function up()\n {\n $this->addColumn('catalog_category', 'is_active', $this->boolean()->defaultValue(false));\n $this->addColumn('catalog_category', 'is_main_page', $this->boolean()->defaultValue(false));\n }", "title": "" }, { "docid": "b97218194a025464693f445ea18e3b71", "score": "0.7214844", "text": "public function up()\n {\n $this->dropColumn('{{%sales_coupon_usage}}', 'times_used');\n $this->addColumn('{{%sales_coupon_usage}}', 'is_used', $this->integer(1)->defaultValue(1)->comment('是否使用过,1未使用,2使用过'));\n $this->addColumn('{{%sales_coupon_usage}}', 'created_at', $this->timestamp());\n\n $this->addColumn('{{%sales_coupon_usage}}', 'updated_at', $this->timestamp()->defaultValue(NULL));\n }", "title": "" }, { "docid": "a205ddeefafcf721a1f7550c2dfb4c48", "score": "0.7209416", "text": "public function safeUp()\n\t{\n $this->createTable('user_status_comments', array(\n 'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n 'user_id' => 'INT(11) UNSIGNED',\n 'admin_id' => 'INT(11) UNSIGNED',\n 'status' => \"enum('APPROVED','FAILED')\",\n 'comment' => 'TEXT',\n 'visible' => 'BOOLEAN DEFAULT 1',\n 'created_at' => 'TIMESTAMP',\n ), 'DEFAULT CHARSET=\"utf8\" collate utf8_unicode_ci');\t \n \n $this->createIndex(\"user_id\",\"user_status_comments\",\"user_id\");\n $this->createIndex(\"admin_id\",\"user_status_comments\",\"admin_id\");\t \n\t}", "title": "" }, { "docid": "8c0da7d57f5a537f5208b3189126c429", "score": "0.71975726", "text": "public function up()\n {\n $cards =$this->table('cards');\n $cards->changeColumn('cost', 'integer')\n ->save();\n }", "title": "" }, { "docid": "c77276199f24d272bffbff390518d8aa", "score": "0.7188565", "text": "public function up()\n {\n\n $table = $this->table('addresses');\n $table->dropForeignKey('user-id')\n ->removeIndex('user-id')\n ->renameColumn('user-id', 'user_id')\n ->addForeignKey('user_id', 'users', 'id')\n ->save();\n }", "title": "" }, { "docid": "03447e26bef8771847101630e4901398", "score": "0.7183204", "text": "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n\n }", "title": "" }, { "docid": "9749fe66cf3483130530009ec4aaf789", "score": "0.7176112", "text": "public function up()\n {\n\n $model = new \\App\\Models\\Setting;\n $prefix = $model->prefix;\n\n $table = $this->table($model->table);\n $table->addColumn($prefix . '_user_id', ColumnTypes::INTEGER, [\n ColumnOptions::COMMENT => 'User id',\n ColumnOptions::DEFAULT => 0 //Setting của hệ thống\n ]);\n $table->removeIndex([$prefix . '_key']);\n $table->addIndex([$prefix . '_key', $prefix . '_user_id'], ['unique' => true]);\n\n $table->save();\n }", "title": "" }, { "docid": "43776533a34c3074eb0390ec77527738", "score": "0.717585", "text": "public function up()\n\t{\n\t\t//\n\t\t$accounts = Account::all();\n\t\tforeach($accounts as $account) \n\t\t{\n\t\t\tfor($i=0; $i<2; $i++)\n\t\t\t{\n\t\t\t\t$l = new Location;\n\t\t\t\t$l->address = \"123 fake St.\";\n\t\t\t\t$l->city = \"Vancouver\";\n\t\t\t\t$l->postal_code = \"V8V3X4\";\n\t\t\t\t$l->account_id = $account->id;\n\t\t\t\t$l->save();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "971dcb3ff6c104998f90d65acdbb8704", "score": "0.7168008", "text": "public function safeUp()\n {\n $this->createTable( '{{declaration_detail}}', array(\n 'id' => 'int(10) unsigned NOT NULL AUTO_INCREMENT',\n 'declaration_id' => 'int(10) unsigned NOT NULL',\n 'invoice_num_and_date' => 'varchar(50) NOT NULL',\n 'customs_tariff_number' => 'varchar(30) NOT NULL',\n 'prod_prom_code' => 'varchar(30) NOT NULL',\n 'price_list_id' => 'int(10) unsigned NOT NULL',\n 'price_list_code' => 'varchar(10) NOT NULL',\n 'price_list_name' => 'varchar(120) NOT NULL',\n 'total_weight' => 'decimal(10,2) NOT NULL',\n 'PRIMARY KEY (id)',\n ), 'ENGINE=InnoDB DEFAULT CHARSET=utf8'\n );\n $this->addForeignKey( 'fk_declaration_detail_declaration_id_declaration_id', '{{declaration_detail}}',\n 'declaration_id', '{{declaration}}', 'id', 'RESTRICT', 'CASCADE'\n );\n $this->addForeignKey( 'fk_declaration_detail_price_list_id_price_list_id', '{{declaration_detail}}',\n 'price_list_id', '{{price_list}}', 'id', 'RESTRICT', 'CASCADE'\n );\n }", "title": "" }, { "docid": "a76bc8fa608598a2aa194fd972e70ea3", "score": "0.71617156", "text": "public function safeUp()\n {\n $this->createTable('app_param', array(\n 'name' => 'string NOT NULL',\n 'value' => 'string NOT NULL',\n ));\n }", "title": "" }, { "docid": "4c1fd271eeacf85745685bcfbadf6c4f", "score": "0.71260315", "text": "public function up()\n\t{\n\t\t//CREATE USERS TABLE\n\t\tSchema::create('pages', function($table) {\n\t\t\t$table->increments('id');\n\t\t\t$table->integer('parent_id');\n\t\t\t$table->integer('role_id');\n\t\t\t$table->integer('role_level');\n\t\t\t$table->integer('author_id');\n\t\t\t$table->string('slug', 255);\n\t\t\t$table->string('name', 255);\n\t\t\t$table->text('preview');\n\t\t\t$table->string('title', 255);\n\t\t\t$table->text('keyw');\n\t\t\t$table->text('descr');\n\t\t\t$table->string('header', 100);\n\t\t\t$table->string('layout', 100);\n\t\t\t$table->string('footer', 100);\n\t\t\t$table->integer('access_level');\n\t\t\t$table->integer('extra_id');\n\t\t\t$table->integer('order_id')->defaults(Config::get('cms::settings.order'));\n\t\t\t$table->string('lang', 5);\n\t\t\t$table->boolean('is_home');\n\t\t\t$table->boolean('is_valid');\n\t\t\t$table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "45d64016beb029826d96fc655b8b73e9", "score": "0.7123496", "text": "public function up()\n\t{\n\t\t$this->alterColumn('tbl_user_facebook', 'facebook_access_token', \"VARCHAR( 256 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL\");\n\t}", "title": "" }, { "docid": "14597135f50c3f3974b62771bfccd58d", "score": "0.7123007", "text": "public function up()\n {\n $this->createTable('phones', [\n 'id' => $this->primaryKey(),\n 'phone' => 'VARCHAR(256)',\n 'object_id' => 'INT(19) DEFAULT 1', //FK\n 'created_at' => 'TIMESTAMP',\n 'updated_at' => 'TIMESTAMP',\n ]);\n }", "title": "" }, { "docid": "fba9b11f95d769c51a0f43f97f15f376", "score": "0.7122763", "text": "public function up()\n {\n $this->execute(\"\n-- --------------------------------------------------------\n\n--\n-- Struktur dari tabel `m_roles`\n--\n\nCREATE TABLE IF NOT EXISTS `m_roles` (\n`id` int(11) NOT NULL,\n `nama` varchar(40) NOT NULL,\n `akses` text NOT NULL,\n `is_deleted` tinyint(1) NOT NULL\n) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;\n\n--\n-- Dumping data untuk tabel `m_roles`\n--\n\nINSERT INTO `m_roles` (`id`, `nama`, `akses`, `is_deleted`) VALUES\n(1, 'Administrator', '\".'{\"master_roles\":true,\"master_user\":true}'.\"', 0);\n\n--\n-- Indexes for dumped tables\n--\n\n--\n-- Indexes for table `m_roles`\n--\nALTER TABLE `m_roles`\n ADD PRIMARY KEY (`id`);\n\n--\n-- AUTO_INCREMENT for dumped tables\n--\n\n--\n-- AUTO_INCREMENT for table `m_roles`\n--\nALTER TABLE `m_roles`\nMODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;\n\n \");\n }", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "f7f58d076093db97bf6bb6a6007be05f", "score": "0.71153647", "text": "public function up()\n {\n $subQuery = 'SELECT m.* FROM member AS m WHERE m.id = intro_friend.member_id_from';\n $sql = 'DELETE FROM intro_friend WHERE NOT EXISTS ('.$subQuery.')';\n\n $conn = Doctrine::getTable('IntroFriend')->getConnection();\n $conn->execute($sql);\n\n // write to member does not exist\n $subQuery = 'SELECT m.* FROM member AS m WHERE m.id = intro_friend.member_id_to';\n $sql = 'DELETE FROM intro_friend WHERE NOT EXISTS ('.$subQuery.')';\n\n $conn = Doctrine::getTable('IntroFriend')->getConnection();\n $conn->execute($sql);\n }", "title": "" }, { "docid": "1615d6a0cc18024062a32fb6a35518bd", "score": "0.710693", "text": "public function up()\n\t{\n\t\tif (!ClientDetectorComponent::getInstance()->isSferastudios()) {\n\t\t\tif (Yii::app()->db->schema->getTable('delivery_specs_territory_requirements',true)->getColumn('rubies_boutens')!==null) {\n\t\t\t\t$this->update('delivery_specs_territory_requirements', ['rubies_boutens' => \"0\"], \"rubies_boutens = 1\");\n\t\t\t}\n\n\t\t\tif (Yii::app()->db->schema->getTable('project_job_preferences',true)->getColumn('rubies_boutens')!==null) {\n\t\t\t\t$this->update('project_job_preferences', ['rubies_boutens' => \"0\"], \"rubies_boutens = 1\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d01a6a435b41f85cee3b6ef8b0e1a80d", "score": "0.7104628", "text": "public function safeUp()\n {\n $this->up();\n }", "title": "" }, { "docid": "729686648b4fb19a58079443e2e6f816", "score": "0.7102916", "text": "public function up()\n {\n Schema::table('provinces', function (Blueprint $table) {\n // Get rid of enum field, they're fkcn painful with Laravel\n $table->string('type', 16)->default(ProvinceTypeProxy::defaultValue())->change();\n });\n\n Schema::table('provinces', function (Blueprint $table) {\n $table->integer('parent_id')->unsigned()->nullable();\n\n $table->index('code', 'provinces_code_index');\n $table->unique(['country_id', 'code'], 'provinces_country_id_code_index');\n $table->foreign('parent_id')\n ->references('id')\n ->on('provinces')\n ->onDelete('cascade');\n });\n }", "title": "" }, { "docid": "dba34126a732b03d083c2b28de68a041", "score": "0.7095153", "text": "public function up() {\n DB::table('category')->insert(array(\n 'category_name' => 'Zusatzleistung'\n ));\n DB::table('category')->insert(array(\n 'category_name' => 'Elektronik'\n ));\n }", "title": "" }, { "docid": "cdba742bf23099bf6242b7a6948b2b27", "score": "0.7093317", "text": "public function up()\n {\n echo 'up' . PHP_EOL;\n }", "title": "" }, { "docid": "309f4547a2c339f84906f5f0774dd4c9", "score": "0.70931405", "text": "public function up()\n {\n $tableOptions = null;\n if($this->db->driverName=='mysql'){\n $tableOptions = \"character set utf8 collate utf8_general_ci engine=innodb comment='商品详情表'\";\n }\n $this->createTable('goods_intro',[\n 'goods_id'=>$this->integer()->unsigned()->notNull()->comment('商品id'),\n 'content'=>$this->text()->comment('商品详情')\n ],$tableOptions);\n $this->addPrimaryKey('gid','goods_intro','goods_id');\n\n }", "title": "" }, { "docid": "1e4aa66c21f5a96922f1116a0ef3682d", "score": "0.7083131", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE esq_pages\r\n DROP control_panel_picture,\r\n DROP max_children,\r\n DROP edit_status,\r\n DROP customer_id,\r\n DROP logo;\");\r\n $this -> executeSQL(\"ALTER TABLE esq_page_entries DROP customer_id, DROP website_id, DROP page_id, DROP object_type, DROP status;\");\r\n $this -> executeSQL(\"ALTER TABLE esq_page_groups DROP customer_id, DROP website_id, DROP object_type, DROP status, DROP max_children;\");\r\n $this -> executeSQL(\"ALTER TABLE esq_client_messages DROP customer_id;\");\r\n $this -> executeSQL(\"ALTER TABLE esq_coupons_to_websites DROP row_id;\");\r\n $this -> executeSQL(\"DROP TABLE membersession\");\r\n }", "title": "" }, { "docid": "036c735c9a28f0ff481eb0cb47b4c610", "score": "0.70802504", "text": "public function up()\n {\n \n $this->addDicionarioDados();\n $this->criarTabelas(); \n $this->alterarFormulaPontoHora();\n }", "title": "" }, { "docid": "c0e5486ebe374e2cd3b34ec238ccacc7", "score": "0.7079283", "text": "public function up()\n {\n $this->dropIndex('username', 'user');\n $this->addColumn('user', 'token','VARCHAR(255)');\n $this->addColumn('user', 'social_id','VARCHAR(255)')->unique();\n $this->addColumn('user', 'role','INT(1)')->defaultValue(0);\n }", "title": "" }, { "docid": "5ceae14a91291366e36123313da81c53", "score": "0.70778364", "text": "public function safeUp()\n {\n $tableOptions = null;\n if($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_slovak_ci ENGINE=InnoDB';\n }\n\n $this->execute('DELETE FROM tag');\n\n $this->dropForeignKey('fk_documnet_tag', 'tag');\n\n $this->dropColumn('tag', 'document_id');\n\n $this->createTable('view', [\n 'id' => 'pk',\n 'document_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'user_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'tag_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'view_timestamp' => Schema::TYPE_TIMESTAMP . ' NOT NULL',\n ], $tableOptions);\n\n $this->addForeignKey('fk_view_document',\n 'view', 'document_id',\n 'document', 'id',\n 'CASCADE'\n );\n\n $this->addForeignKey('fk_view_user',\n 'view', 'user_id',\n 'user', 'id',\n 'CASCADE'\n );\n\n $this->addForeignKey('fk_view_tag',\n 'view', 'tag_id',\n 'tag', 'id',\n 'CASCADE'\n );\n\n }", "title": "" }, { "docid": "22b69c1d6f6f9ffd391228bea52cf324", "score": "0.70742065", "text": "public function safeUp()\n\t{\n $this->dropForeignKey('robot_video_robot', 'robot_video');\n $this->dropTable('robot_video');\n\n $this->createTable('video', array(\n 'file_name' => 'varchar(255) NOT NULL',\n 'preview_image' => 'varchar(255) NOT NULL',\n 'status' => 'tinyint(1)',\n ));\n\t}", "title": "" }, { "docid": "24c04c29c0ecc1c2be69cdfde5ca26b5", "score": "0.7073946", "text": "public function up()\n\t{\n\t\t\n\t\n Schema::table('pages', function($table)\n\t\t{\n\t\t $table->create();\n\t\t $table->string('slug')->unique();\n \t$table->text('title');\n\t\t\t$table->text('text');\n\t\t\t$table->text('others')->nullable();\n\t\t $table->timestamps();\n\t\t});\n\n\n\t}", "title": "" }, { "docid": "bed352a6ccd3412667c5f63cf40dafb4", "score": "0.70697165", "text": "public function up()\n\t{\n\t\tSchema::table('stocks', function(Blueprint $table)\n\t\t{\n\t\t\t$table->tinyInteger('have_history')->default(0)->after('market_cap');\n\t\t});\n\t}", "title": "" }, { "docid": "2ad466d47a572dd6b86d33a5fe165a0a", "score": "0.7068609", "text": "abstract function up(): void;", "title": "" }, { "docid": "9fa2e159b35e9b158d33048edc3d1daf", "score": "0.7068492", "text": "public function safeUp()\n {\n $this->addColumn('agents', 'f', 'VARCHAR(25) NULL COMMENT \\'Фамилия\\'');\n $this->addColumn('agents', 'i', 'VARCHAR(25) NULL COMMENT \\'Имя\\'');\n $this->addColumn('agents', 'o', 'VARCHAR(25) NULL COMMENT \\'Отчество\\'');\n }", "title": "" }, { "docid": "324da85eb5e0c5bea268aeca55025b4f", "score": "0.7064866", "text": "public function safeUp()\n {\n $this->createTable('location', [\n 'id' => $this->primaryKey(),\n 'source' => $this->smallInteger()->notNull()->defaultValue(0)->comment('1:diver 2:coach 3:divestore'),\n 'name' => $this->string(45)->notNull()->defaultValue('country, province或者city的名字'),\n 'detail' => $this->string(150)->notNull()->defaultValue('city, province,country'),\n 'in_count' => $this->bigInteger()->notNull()->defaultValue(0)->comment('地区里的注册人数或者潜店数'),\n 'query_count' => $this->bigInteger()->notNull()->defaultValue(0)->comment('被检索次数'),\n 'created_at' => $this->integer(11)->notNull()->defaultValue(0)->comment('创建时间戳'),\n 'updated_at' => $this->integer(11)->notNull()->defaultValue(0)->comment('更新时间戳'),\n ]);\n $this->alterColumn('location',\"id\",\"bigint auto_increment\");\n $this->createIndex('uniq_i',\"location\",['source','name'],true);\n }", "title": "" }, { "docid": "8853ffc8167e57846cfb881b22750cb1", "score": "0.7057723", "text": "public function safeUp() {\n\t\t$this->addColumn('visitor', 'is_under_18', 'TINYINT DEFAULT 0');\n\t\t$this->addColumn('visitor', 'under_18_detail', 'varchar(255)');\n\t}", "title": "" }, { "docid": "b545854346c9161338ac2de13dbac675", "score": "0.7051396", "text": "public function up()\n\t{\n\t\t$this->forge->addField([\n\t\t\t'id INT NOT NULL AUTO_INCREMENT',\n\t\t\t'nama_video VARCHAR(255)',\n\t\t\t'key_twofish VARCHAR(255)',\n\t\t\t'content TEXT',\n\t\t\t'status ENUM(\"enkripsi\", \"dekripsi\")',\n\t\t\t'PRIMARY KEY(id)'\n\t\t]);\n\n\t\t// membuat table news\n\t\t$this->forge->createTable('video', TRUE);\n\t}", "title": "" }, { "docid": "565eb28da9f73ff216de6bb35404043a", "score": "0.70463353", "text": "public function up()\n {\n $this->renameColumn(\"user\", \"user_email\", \"user_fullname\");\n\n //Add Missing Columns to User table\n $this->addColumn('user', 'user_profile_pic', $this->string());\n $this->addColumn('user', 'user_bio', $this->text());\n $this->addColumn('user', 'user_website', $this->string());\n }", "title": "" }, { "docid": "9eceb5114d60028950bd23bc8962c635", "score": "0.7044401", "text": "public function up()\n {\n Schema::table('result', function (Blueprint $table) {\n $table->integer('thread_id')\n ->unsigned()\n ->after('state');\n $table->foreign('thread_id')\n ->references('id')\n ->on('thread')\n ->onDelete('cascade');\n });\n }", "title": "" }, { "docid": "b4666c62c2cc77ebbdf594c4607ba037", "score": "0.70441985", "text": "public function up()\n {\n $this->dbforge->add_field(array(\n 'serial' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'unsigned' => TRUE,\n 'auto_increment' => TRUE\n ),\n 'g_id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'unsigned' => TRUE,\n ),\n 'u_id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'unsigned' => TRUE,\n ),\n ));\n $this->dbforge->add_key('serial', TRUE);\n $this->dbforge->add_field('CONSTRAINT FOREIGN KEY (u_id) REFERENCES users(userId)');\n $this->dbforge->add_field('CONSTRAINT FOREIGN KEY (g_id) REFERENCES im_group(g_id)');\n $this->dbforge->create_table('im_group_members');\n }", "title": "" }, { "docid": "dc19d61f4c3d4a877a8aa0cd45f74f94", "score": "0.7043133", "text": "public function up()\n {\n \n $isExist = \\Yii::$app->db->createCommand(\"SHOW TABLES LIKE 'counter_models'\")->execute();\n\n if(!$isExist) {\n $this->execute(\"\n CREATE TABLE `counter_models` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `name` varchar(100) NOT NULL,\n `type` enum('gas','water'),\n `rate` int(11) NOT NULL ,\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\n \");\n }\n \n }", "title": "" }, { "docid": "e3f044b30430104119ea00c13ecbb02a", "score": "0.7038597", "text": "public static function databaseUp() {\n\n if (!Capsule::schema()->hasTable(Migrate::prefixedTableName(self::TABLENAME))) {\n Capsule::schema()->create(Migrate::prefixedTableName(self::TABLENAME), function($table) {\n $table->increments('id');\n $table->string('name', 50)->unique();\n $table->string('description', 500);\n $table->string('short_label', 25);\n $table->string('slug', 60)->unique();\n $table->integer('created_by')->nullable();\n $table->integer('last_updated_by')->nullable();\n $table->softDeletes();\n $table->timestamps();\n });\n }\n }", "title": "" }, { "docid": "0d535a02532b86cc8fb5b01e05bc15f9", "score": "0.70231247", "text": "public function safeUp()\n\t{\n $this->addColumn('products', 'image_1', 'string');\n $this->addColumn('products', 'image_2', 'string');\n $this->addColumn('products', 'image_3', 'string');\n $this->addColumn('products', 'image_4', 'string');\n $this->addColumn('products', 'image_5', 'string');\n\t}", "title": "" }, { "docid": "2d780b075bc483a7ae635e68aa919b53", "score": "0.702295", "text": "public function up()\n {\n\n if (!$this->hasTable('cities')) {\n $table = $this->table('cities');\n $table->addColumn('name', 'string', ['default' => null, 'limit' => 255, 'null' => false,]);\n $table->save();\n }\n }", "title": "" }, { "docid": "402e4c5d8ccaec155e4ae5ad8b7eb6e4", "score": "0.7020164", "text": "public function up()\n\t{\n\t\tDB::table('productdetailtypes')->insert(array(\n\t\t\t//array('name' => 'Pris (exkl. moms)'),\n\t\t\t//array('name' => 'Inköpspris (enkl. moms)'),\n\t\t\t//array('name' => 'Lager'),\n\t\t\tarray('name' => 'Vikt')\n\t\t\t//array('name' => 'Moms')\n\t\t));\n\t}", "title": "" }, { "docid": "6929d21ab72f2dae8a8f9cf6f95b8815", "score": "0.7006968", "text": "public function up()\n {\n $this->createTable('{{%Languag}}', [\n 'id' => $this->primaryKey(),\n 'Name' => $this->char(50)->notNull(),\n 'iso_639-1' => $this->char(2)->notNull(),\n 'created_at' => $this->integer()->notNull(),\n 'updated_at' => $this->integer()->notNull(),\n ]);\n }", "title": "" }, { "docid": "b833524bc256f3335a47f0c0d10b2581", "score": "0.7004482", "text": "public function up()\n {\n $tableName = $this->getTableName();\n $users = $this->table($tableName);\n $users->addColumn('username', 'string', array('limit' => 20))\n ->addColumn('password', 'string', array('limit' => 100))\n ->addColumn('email', 'string', array('limit' => 100))\n ->addColumn('first_name', 'string', array('limit' => 30))\n ->addColumn('last_name', 'string', array('limit' => 30))\n ->addColumn('status', 'string', array('limit' => 30, 'default' => 'active'))\n ->addColumn('created', 'datetime')\n ->addColumn('updated', 'datetime', array('default' => null))\n ->addIndex(array('username'), array('unique' => true))\n ->save();\n\n // Manually add these as there seems to be a bug in Phinx...\n $this->execute('alter table '.$tableName.' add password_reset_code VARCHAR(100)');\n $this->execute('alter table '.$tableName.' add password_reset_code_timeout DATETIME');\n }", "title": "" }, { "docid": "5c01cfc1df5955412ce245c2e25ecd65", "score": "0.7000967", "text": "public function up()\n {\n $table = Portals::tableName();\n Yii::$app->db->createCommand(\"delete from $table\")->execute();\n\n $this->path = 'migrations/_portals.sql';\n $this->execute(file_get_contents($this->path));\n }", "title": "" }, { "docid": "a39be1fd806134554cec5ee3cf332cda", "score": "0.69954705", "text": "public function up()\n {\n\n \t$sql = 'select * from {{%address_question}} where question=\"PACI No/Zip Code\"';\n\n \t$question = Yii::$app->db->createCommand($sql)->queryOne();\n\n if($question['ques_id'])\n {\n $sql = 'delete from {{%customer_address_response}} where address_type_question_id=\"'.$question['ques_id'].'\"';\n\n Yii::$app->db->createCommand($sql)->execute(); \n }\n \n\t\t//remove `PACI No/Zip Code` from address question \n\n\t\t$sql = 'delete from {{%address_question}} where question=\"PACI No/Zip Code\"';\n\n\t\tYii::$app->db->createCommand($sql)->execute();\n }", "title": "" }, { "docid": "0e139781559b08523ce0c36023741bc9", "score": "0.699288", "text": "public function up()\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$users = $this->table(\"users\", array(\"engine\" => \"TokuDB\"));\n\t\t\t\t\t\t\t\t$users\n\t\t\t\t\t\t\t\t\t->addColumn(\"characterName\", \"string\", array(\"limit\" => 128))\n\t\t\t\t\t\t\t\t\t->addColumn(\"characterID\", \"integer\", array(\"limit\" => 11))\n\t\t\t\t\t\t\t\t\t->addColumn(\"characterOwnerHash\", \"string\", array(\"limit\" => 64))\n\t\t\t\t\t\t\t\t\t->addColumn(\"loginHash\", \"string\", array(\"limit\" => 64))\n\t\t\t\t\t\t\t\t\t->addColumn(\"accessToken\", \"string\", array(\"limit\" => 255))\n\t\t\t\t\t\t\t\t\t->addColumn(\"refreshToken\", \"string\", array(\"limit\" => 255, \"null\" => true))\n\t\t\t\t\t\t\t\t\t->addColumn(\"scopes\", \"string\", array(\"limit\" => 255, \"null\" => true))\n\t\t\t\t\t\t\t\t\t->addColumn(\"tokenType\", \"string\", array(\"limit\" => 255))\n\t\t\t\t\t\t\t\t\t->addColumn(\"created\", \"datetime\", array(\"default\" => \"CURRENT_TIMESTAMP\"))\n\t\t\t\t\t\t\t\t\t->addColumn(\"updated\", \"datetime\", array(\"null\" => true))\n\t\t\t\t\t\t\t\t\t->addIndex(array(\"characterName\", \"characterOwnerHash\"), array(\"unique\" => true))\n\t\t\t\t\t\t\t\t\t->save();\n\t\t\t\t}", "title": "" }, { "docid": "676a0c56d2826fef130d9b8e245c03f3", "score": "0.6991042", "text": "public function up(){\r\n $this->dbforge->add_field(array( //creacion del vector que contiene los campos de la tabla\r\n 'ATCN_PK' => array( //columna USPR_PK tipo int, tamaño 10, auto icremental, solo positivos\r\n 'type' => 'INT',\r\n 'constraint' => 10,\r\n 'unsigned' => TRUE,\r\n 'auto_increment' => TRUE,\r\n ),\r\n 'ATCN_date_down' => array( //columna USPR_FK_users tipo int, tamaño 10, solo positivos\r\n 'type' => 'DATETIME',\r\n ),\r\n 'ATCN_date_up' => array( //columna USPR_FK_users tipo int, tamaño 10, solo positivos\r\n 'type' => 'DATETIME',\r\n ),\r\n 'ATCN_FK_canal' => array( //columna USPR_PK tipo int, tamaño 10, auto icremental, solo positivos\r\n 'type' => 'INT',\r\n 'constraint' => 10,\r\n 'unsigned' => TRUE,\r\n )\r\n 'ATCN_descripcion' => array( //columna USPR_PK tipo int, tamaño 10, auto icremental, solo positivos\r\n 'type' => 'VARCHAR',\r\n 'constraint' => 50,\r\n )\r\n '\tATCN_id_problem' => array( //columna USPR_PK tipo int, tamaño 10, auto icremental, solo positivos\r\n 'type' => 'INT',\r\n 'constraint' => 10,\r\n )\r\n \r\n ));\r\n \r\n $this->dbforge->add_key('ATCN_PK', TRUE); //agregar atributo de llave primaria al campo USPR_PK\r\n $this->dbforge->create_table('tbl_activity_canal'); //creacion de la tabla users con los atributos y columnas\r\n \r\n $this->dbforge->add_column('tbl_activity_canal',[\r\n 'CONSTRAINT ATCN_FK_canal FOREIGN KEY(ATCN_FK_canal) REFERENCES tbl_canal(CANL_PK)',\r\n ]);\r\n \r\n }", "title": "" }, { "docid": "c5b7dcdc24a783aa0870cf56fd9cb2db", "score": "0.69848907", "text": "public function up()\n {\n $this->table('users')\n ->removeColumn('see_nsfw')\n ->update();\n }", "title": "" }, { "docid": "2c2a596e0eb25d8db179db37a78d63a3", "score": "0.69749695", "text": "public function up()\n\t{\n\t\t//create multiple columns through an array\n\t\t$this->dbforge->add_field(array(\n\t\t\t'user_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '5',\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'username' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'password' => array(\n\t\t\t\t'type' => 'TEXT',\n\t\t\t\t'constraint' => '100',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t'firstname' => array(\n\t\t\t\t'type' => 'TEXT',\n\t\t\t\t'constraint' => '100',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t'lastname' => array(\n\t\t\t\t'type' => 'TEXT',\n\t\t\t\t'constraint' => '100',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t'email' => array(\n\t\t\t\t'type' => 'TEXT',\n\t\t\t\t'constraint' => '100',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t'telephone' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '16',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t'dob' => array(\n\t\t\t\t'type' => 'DATE',\n//\t\t\t\t'constraint' => '100',\n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t));\n\n\t\t//Assign a primary key to a column\n\t\t$this->dbforge->add_key('user_id',TRUE);\n\n\t\t//Create the table with the specified column\n\t\t$this->dbforge->create_table('users');\n\t}", "title": "" }, { "docid": "c14fe5c7070b7f7311214e7f5dd700a1", "score": "0.6973758", "text": "public function up()\n\t{\n\t\t// // create the table\n $exists = $this->hasTable('users');\n if (!$exists) {\n\t\t $table = $this->table('users');\n \t\t$table\n \t\t\t->addColumn('mail', 'string', ['limit' => 100])\n \t\t\t->addColumn('password', 'string', ['limit' => 80])\n \t\t\t->addColumn('date_create', 'datetime')\n \t\t\t->addColumn('date_cancel', 'datetime')\n \t\t\t->addColumn('last_login', 'datetime')\n \t\t\t->addColumn('civilite', 'string', ['limit' => 20])\n \t\t\t->addColumn('prenom', 'string', ['limit' => 50])\n \t\t\t->addColumn('nom', 'string', ['limit' => 50])\n \t\t\t->addColumn('adress1', 'string', ['limit' => 100])\n \t\t\t->addColumn('adress2', 'string', ['limit' => 100])\n \t\t\t->addColumn('city', 'string', ['limit' => 70])\n \t\t\t->addColumn('zipcode', 'string', ['limit' => 10])\n \t\t\t->addColumn('country', 'string', ['limit' => 50])\n \t\t\t->addColumn('telephone', 'string', ['limit' => 20])\n \t\t\t->addColumn('job', 'string', ['limit' => 50])\n \t\t\t->create();\n } \n\t}", "title": "" }, { "docid": "5c32751a138b28fa721749341f39b3ea", "score": "0.6973053", "text": "public function up()\n\t{\n\t\t$this->createTable('project',\n\t\t\t\t\t\t array('id' => 'pk',\n\t\t\t\t\t\t \t 'name' => 'string NOT NULL',\n\t\t\t\t\t\t \t\t 'description' => 'text NOT NULL',\n\t\t\t\t\t\t \t\t 'create_time' => 'datetime DEFAULT NULL',\n\t\t\t\t\t\t \t\t 'create_user_id' => 'int(11) DEFAULT NULL',\n\t\t\t\t\t\t \t\t 'update_time' => 'datetime DEFAULT NULL',\n\t\t\t\t\t\t \t\t 'update_user_id' => 'int(11) DEFAULT NULL',\n\t\t\t\t\t\t \t\t ),\n\t\t\t\t\t\t 'ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT = 3');\n\t}", "title": "" }, { "docid": "2ee6915861d776ba27c5384e620f521f", "score": "0.6970838", "text": "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `act` CHANGE `text` `text` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL;\nALTER TABLE `act` ADD `xml` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL AFTER `text`;\nALTER TABLE `act_reference` ADD `reference_count` INT UNSIGNED NOT NULL AFTER `target_act_id`;\n\nSET FOREIGN_KEY_CHECKS = 1;\n',\n );\n }", "title": "" }, { "docid": "8779d8372e1ed06d55200205539ab0f0", "score": "0.69681185", "text": "public function up()\n {\n $table = $this->table('Carts');\n if($table->exists()){\n\n \n $table->removeColumn('Name');\n $table->removeColumn('Price');\n $table->removeColumn('Image')\n ->save();\n } }", "title": "" }, { "docid": "935af9f08d738bbd3ad04288b07c7673", "score": "0.6967965", "text": "public function up()\n\t{\n\t\t$this->forge->addField([\n\t\t\t'RequestID' => [\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'auto_increment' => true,\n\t\t\t],\n\t\t\t'MahasiswaNIM' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => 255,\n\t\t\t],\n\t\t\t'MahasiswaNama' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => 255,\n\t\t\t],\n\t\t\t'RequestDetail' => [\n\t\t\t\t'type' => 'TEXT',\n\t\t\t],\n\t\t\t'ThreadKey' => [\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => 255,\n\t\t\t],\n\t\t\t'Timestamp' => [\n\t\t\t\t'type' => 'DATETIME',\n\t\t\t],\n\t\t]);\n\n\t\t// Membuat primary key\n\t\t$this->forge->addKey('RequestID', TRUE);\n\t\t\n\t\t// Membuat tabel role\n\t\t$this->forge->createTable('Request', TRUE);\n\n\t}", "title": "" }, { "docid": "18d5bd0fa59c359334bb00e6d0c08982", "score": "0.69640243", "text": "public function up()\n {\n // UserSeeder table\n $user = $this->table('users', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('username', STRING, [LIMIT => 20])\n ->addColumn('password', STRING, [LIMIT => 75])\n ->addColumn('email', STRING, [LIMIT => 100])\n ->addColumn('first_name', STRING, [LIMIT => 30])\n ->addColumn('last_name', STRING, [LIMIT => 30])\n ->addColumn('ip', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->addIndex(['username', 'email'], [UNIQUE => true])\n ->save();\n }", "title": "" }, { "docid": "c63dbb42a696b8f95466e7677ea1fa53", "score": "0.69535434", "text": "public function up()\n {\n $table = $this->table('title_score_details');\n\n // 参照キー削除\n $table\n ->dropForeignKey('rank_id')\n ->update();\n\n // カラム削除\n $table\n ->removeColumn('rank_id')\n ->update();\n }", "title": "" }, { "docid": "5bdd7ff30b271418dfb8327e53247451", "score": "0.695308", "text": "public function up()\n\t{\n\t\t$this->execute(\"\n CREATE TABLE `vodo_odometer`( \n `vodo_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n `vodo_vtrc_id` SMALLINT UNSIGNED NOT NULL COMMENT 'Truck',\n `vodo_type` ENUM('READING','VOYAGE_RUN','VOYAGE_ODO','ODO_CHANGE') NOT NULL COMMENT 'reading type',\n `vodo_start_odo` SMALLINT UNSIGNED,\n `vodo_start_datetime` DATETIME,\n `vodo_end_odo` SMALLINT UNSIGNED,\n `vodo_end_datetime` DATETIME,\n `vodo_run` SMALLINT UNSIGNED COMMENT 'mileage',\n `vodo_abs_odo` MEDIUMINT UNSIGNED COMMENT 'absolut odmeter',\n `vodo_notes` TEXT,\n `vodo_ref_model` VARCHAR(20) CHARSET latin1 COMMENT 'referenc model name',\n `vodo_ref_id` INT UNSIGNED COMMENT 'refernc model pk value',\n PRIMARY KEY (`vodo_id`)\n ) ENGINE=INNODB CHARSET=utf8\n COMMENT='Registre all odometer reading';\n\n ALTER TABLE `vodo_odometer`( \n ADD FOREIGN KEY (`vodo_vtrc_id`) REFERENCES `vtrc_truck`(`vtrc_id`)\n ) ENGINE=INNODB CHARSET=utf8\n COMMENT='Registre all odometer reading';\n\n \");\n\t}", "title": "" }, { "docid": "71050c9f5d574ae224150176c45ca58c", "score": "0.69515526", "text": "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'id' => $this->bigPrimaryKey(),\n 'num' => $this->smallInteger()->notNull(),\n 'text' => $this->text()->notNull(),\n 'blago' => $this->smallInteger()->notNull()\n ]);\n\n $this->createIndex('moon_dni_num_idx', $this->tableName, 'num');\n $this->createIndex('moon_dni_blago_idx', $this->tableName, 'blago');\n }", "title": "" }, { "docid": "7c4bf3ab253481dc746c2b90bd1cda63", "score": "0.69514954", "text": "public function up() {\n\t\t$this->query(\"DELETE FROM fotoalbums WHERE subdir = 'fotoalbum/Publiek/'\");\n\n\t\t$this->query(\"UPDATE fotos SET subdir = TRIM(LEADING 'fotoalbum/' FROM TRIM(TRAILING '/' FROM subdir))\");\n\t\t$this->query(\"UPDATE fotoalbums SET subdir = TRIM(LEADING 'fotoalbum/' FROM TRIM(TRAILING '/' FROM subdir))\");\n\t\t$this->query(\"UPDATE foto_tags SET refuuid = TRIM(LEADING 'fotoalbum/' FROM refuuid)\");\n\t}", "title": "" }, { "docid": "ec2b545813d4cbd48f72bcce2d8e4816", "score": "0.69502765", "text": "public function safeUp()\n\t{\n\t\t$sql=\"ALTER TABLE `user` ADD COLUMN `data_conf` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '用户其他信息' AFTER `concern_remark`;\";\n\t\t$this->execute($sql);\n\t\t$data_conf=CJSON::encode(['viewTime'=>time()]);\n\t\t$updateSql=\"UPDATE `user` SET `data_conf`=:data_conf\";\n\t\t$this->execute($updateSql,[':data_conf'=>$data_conf]);\n\t\t$this->refreshTableSchema('user');\n\t}", "title": "" }, { "docid": "86e34ac708829f0ef63370fc7f044dda", "score": "0.69500536", "text": "public function up() {\n $table = $this->table('secondary_relations');\n $table->addColumn('property','integer')\n ->addForeignKey('property', 'properties', 'id')\n ->addColumn('value','string', array('null'=>true))\n ->addColumn('qualifier', 'integer', array('null'=>true))\n\n ->addColumn('nodevalue', 'integer', array('null'=>true))\n ->addForeignKey('nodevalue', 'nodes', 'id')\n ->addColumn('geometryvalue', 'integer', array('null'=>true))\n ->addForeignKey('geometryvalue', 'geometries', 'id')\n ->addColumn('parent_relation', 'integer')\n ->addForeignKey('parent_relation', 'relations', 'id')\n ->create();\n\n $this->execute('ALTER TABLE secondary_relations ADD COLUMN rank ranks');\n }", "title": "" }, { "docid": "d8dac076c0b0110b981df7428fa6e4f4", "score": "0.6937629", "text": "public function up()\n {\n $enabledModules = sfConfig::get('sf_enabled_modules');\n \n if (in_array('ullCourse', $enabledModules))\n {\n $permission = new UllPermission;\n $permission['namespace'] = 'ull_course';\n $permission['slug'] = 'ull_course_index';\n $permission->save();\n $ull_permission_ull_course_index = $permission; \n \n $ull_group_ull_course_admins = UllGroupTable::findByDisplayName('CourseAdmins');\n \n $group_permission = new UllGroupPermission;\n $group_permission['namespace'] = 'ull_course';\n $group_permission['UllGroup'] = $ull_group_ull_course_admins;\n $group_permission['UllPermission'] = $ull_permission_ull_course_index;\n $group_permission->save(); \n \n \n } \n }", "title": "" }, { "docid": "bc806308d6529fa6b0ec91c1477c1373", "score": "0.6936138", "text": "public function up()\n {\n Schema::table($this->getTableName(), function (Blueprint $table) {\n $table->string('title')->nullable()->default(null)->after('id');\n });\n }", "title": "" }, { "docid": "dd1000dd44835084e893676915fda466", "score": "0.6932776", "text": "public function up()\n {\n $tableOptions = null;\n if($this->db->driverName=='mysql'){\n $tableOptions = \"character set utf8 collate utf8_general_ci engine=innodb comment='文章详情表'\";\n }\n $this->createTable('article_detail',[\n 'article_id'=>$this->primaryKey()->comment('文章id'),\n 'content'=>$this->text()->notNull()->comment('文章内容'),\n ],$tableOptions);\n\n }", "title": "" }, { "docid": "1e2c037bf6dd9b556b10878cf6aa8de5", "score": "0.69202346", "text": "public function safeUp()\n {\n $this->addColumn($this->tableName, 'alias', $this->string()->notNull()->defaultValue(''). ' AFTER label');\n }", "title": "" }, { "docid": "29648e02e761c37f09b3d8a652169273", "score": "0.6920124", "text": "public function up() {\n\t\t$this->down();\n\n\t\t$this->db->query(\"CREATE TABLE `countries` (\n\t\t\t\t\t\t\t\t\t `id` int(5) NOT NULL,\n\t\t\t\t\t\t\t\t\t `countryCode` char(2) NOT NULL DEFAULT '',\n\t\t\t\t\t\t\t\t\t `countryName` varchar(45) NOT NULL DEFAULT '',\n\t\t\t\t\t\t\t\t\t `currencyCode` char(3) DEFAULT NULL\n\t\t\t\t\t\t\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8;\");\n\n\t\t$this->db->query(\"ALTER TABLE `countries` ADD PRIMARY KEY (`id`);\");\n\t\t$this->db->query(\"ALTER TABLE `countries` MODIFY `id` int(5) NOT NULL AUTO_INCREMENT;\");\n\n\t}", "title": "" }, { "docid": "afabe1ddbed459a3c19acac48ee4a0c1", "score": "0.6919528", "text": "public function up()\n {\n $this->addColumn('message', 'label', $this->string());\n $this->addColumn('message', 'language', $this->string());\n }", "title": "" }, { "docid": "1df89205c1a2b8d3f5f3bce07fbba733", "score": "0.69167405", "text": "public function up()\n {\n $this->createTable(\n 'blog_article_to_product',\n [\n 'id' => $this->primaryKey(),\n 'blog_article_id' => $this->integer()\n ->notNull(),\n 'product_id' => $this->integer()\n ->notNull(),\n ]\n );\n \n $this->createIndex(\n 'blog_article_to_product_uk',\n 'blog_article_to_product',\n [\n 'blog_article_id',\n 'product_id',\n ],\n true\n );\n \n $this->addForeignKey(\n 'blog_article_to_product_art_fk',\n 'blog_article_to_product',\n 'blog_article_id',\n 'blog_article',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n \n $this->addForeignKey(\n 'blog_article_to_product_prod_fk',\n 'blog_article_to_product',\n 'product_id',\n 'product',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "90fbf6e8e0d9b1f1116ed7569ad2cade", "score": "0.6915505", "text": "public function up()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->string('lastname')->after('name');\n $table->date('birthdate')->before('created_at');\n // Important: binary attribute is too short, instead\n // we need to do this\n DB::statement(\"ALTER TABLE users ADD profile_image MEDIUMBLOB\");\n });\n }", "title": "" }, { "docid": "0e78c6be53bded8f137b1aa51e6ce9a0", "score": "0.69137365", "text": "public function up()\n\t{\n\t\t//\n\t\t$accounts = Account::all();\n\t\tforeach($accounts as $account)\n\t\t{\n\t\t\tfor($i=1; $i<=5; $i++)\n\t\t\t{\n\t\t\t\t$location = new Location;\n\t\t\t\t$location->address = \"$i blah St.\";\n\t\t\t\t$location->city = \"Vancouver\";\n\t\t\t\t$location->postal_code = \"v8v2v3\";\n\t\t\t\t$location->account_id = $account->id;\n\t\t\t\t$location->save();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a147dcaaa95ad982a8484e1179af4cef", "score": "0.6911307", "text": "public function up()\n {\n Schema::table('submissions', function (Blueprint $table) {\n $table->dropColumn('sequence_id');\n });\n\n Schema::table('sat_status', function (Blueprint $table) {\n $table->integer('sequence_id');\n $table->increments('id')->unique();\n $table->dropColumn('submission_id');\n });\n Schema::table('sat_gps', function (Blueprint $table) {\n $table->integer('sequence_id');\n $table->increments('id')->unique();\n $table->dropColumn('submission_id');\n });\n Schema::table('sat_img', function (Blueprint $table) {\n $table->integer('sequence_id');\n $table->increments('id')->unique();\n $table->dropColumn('submission_id');\n });\n Schema::table('sat_imu', function (Blueprint $table) {\n $table->integer('sequence_id');\n $table->increments('id')->unique();\n $table->dropColumn('submission_id');\n });\n Schema::table('sat_health', function (Blueprint $table) {\n $table->integer('sequence_id');\n $table->increments('id')->unique();\n $table->dropColumn('submission_id');\n });\n }", "title": "" }, { "docid": "05cf4f5909aafea7a4144de813b3d9d6", "score": "0.6910967", "text": "public function safeUp()\n {\n }", "title": "" } ]
0ece38cf6d32c2847af539d3c3f47edc
Update post count totals
[ { "docid": "1cac04ad9f19f786d473743cbf29f2b3", "score": "0.71212286", "text": "public function update_count() {\n\t\t\t$post_count = get_option( 'wbc_import_progress' );\n\n\t\t\tif ( is_array( $post_count ) ) {\n\t\t\t\tif ( $post_count['remaining'] > 0 ) {\n\t\t\t\t\t$post_count['remaining'] = $post_count['remaining'] - 1;\n\t\t\t\t\t$post_count['imported_count'] = $post_count['imported_count'] + 1;\n\t\t\t\t\tupdate_option( 'wbc_import_progress', $post_count );\n\t\t\t\t}else {\n\t\t\t\t\t$post_count['remaining'] = 0;\n\t\t\t\t\t$post_count['imported_count'] = $post_count['total_post'];\n\t\t\t\t\tupdate_option( 'wbc_import_progress', $post_count );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "4af2b42a99ff693e0376ce5154d2ab2f", "score": "0.6975803", "text": "public function update_topics_post_counts()\n\t{\n\t\t$sql = 'UPDATE ' . $this->table_prefix . 'topics\n\t\t\tSET topic_posts_approved = topic_replies + 1,\n\t\t\t\ttopic_posts_unapproved = ' . $this->db->sql_case('topic_replies_real > topic_replies', 'topic_replies_real - topic_replies', '0') . '\n\t\t\tWHERE topic_visibility = ' . ITEM_APPROVED;\n\t\t$this->sql_query($sql);\n\n\t\t$sql = 'UPDATE ' . $this->table_prefix . 'topics\n\t\t\tSET topic_posts_approved = 0,\n\t\t\t\ttopic_posts_unapproved = (' . $this->db->sql_case('topic_replies_real > topic_replies', 'topic_replies_real - topic_replies', '0') . ') + 1\n\t\t\tWHERE topic_visibility = ' . ITEM_UNAPPROVED;\n\t\t$this->sql_query($sql);\n\t}", "title": "" }, { "docid": "4f81cade24067202d2232ed926b551b9", "score": "0.6968834", "text": "public function updatePostStatistics() {\n\t\t\t$sql = \"UPDATE `postStatistics` SET `comments` = `comments` + 1 WHERE `postID` = '\".$this->get('postID').\"'\";\n\t\t\tquery($sql);\n\t\t}", "title": "" }, { "docid": "d80beeb192b4f2879d8aa97445320cf8", "score": "0.6900136", "text": "public function updatePostCount($topic, $posts)\n \t{\n// \t\t$expr = array(\n// \t\t\t'$set' => array('postCount' => $posts)\n// \t\t);\n//\n// \t\t// ** Perform increment update statement against the tuple.\n// \t\t$this->getDocumentManager()\n// \t\t\t\t->getDocumentCollection($this->getDocumentName())\n// \t\t\t\t->getMongoCollection()\n// \t\t\t\t->update($filter, $expr);\n \t}", "title": "" }, { "docid": "10a3f09333bffe1846d5bffdfedf6939", "score": "0.6815043", "text": "function oqp_stats_update_posts_count() {\r\n\t$nposts = get_option('oqp_posts_stats');\r\n\tupdate_option( 'oqp_posts_stats', $nposts+1 );\r\n\t$is_hundred=$nposts/100;\r\n\t\r\n\tif (is_int($is_hundred)){\r\n\t\t$oqp_options = oqp_get_option();\r\n\t\tunset($oqp_options['donated']);\r\n\t\tupdate_option( 'oqp_options', $oqp_options );\r\n\t}\r\n}", "title": "" }, { "docid": "2d57e0d9d9468e183871cb934f280380", "score": "0.67822295", "text": "function update_counts_for_q($postid)\n {\n }", "title": "" }, { "docid": "feeeced87b62292233427e28afe583db", "score": "0.6732702", "text": "private function viewCount($post_id){\n $data = Post::find($post_id);\n $old_view = $data->views;\n $data->views = $old_view + 1;\n $data->update();\n }", "title": "" }, { "docid": "75c69ceab02b9c22607c544626b42f12", "score": "0.6658663", "text": "function _update_posts_count_on_delete($post_id)\n{\n}", "title": "" }, { "docid": "b623f0ea42d576f48cbc06d95f2338dc", "score": "0.6640754", "text": "function foundation_q_set_post_views( $post_id ) {\n $count_key = 'post_views_count';\n $count = get_post_meta($post_id, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($post_id, $count_key);\n add_post_meta($post_id, $count_key, '0');\n }else{\n $count++;\n update_post_meta($post_id, $count_key, $count);\n }\n}", "title": "" }, { "docid": "37cbe2c187ee5fde2f58b242fb3944e9", "score": "0.6610513", "text": "function tp_count_post_views () {\t\n // Garante que vamos tratar apenas de posts\n if ( is_single() ) {\n \n // Precisamos da variável $post global para obter o ID do post\n global $post;\n \n // Se a sessão daquele posts não estiver vazia\n if ( empty( $_SESSION[ 'tp_post_counter_' . $post->ID ] ) ) {\n \n // Cria a sessão do posts\n $_SESSION[ 'tp_post_counter_' . $post->ID ] = true;\n \n // Cria ou obtém o valor da chave para contarmos\n $key = 'tp_post_counter';\n $key_value = get_post_meta( $post->ID, $key, true );\n \n // Se a chave estiver vazia, valor será 1\n if ( empty( $key_value ) ) { // Verifica o valor\n $key_value = 1;\n update_post_meta( $post->ID, $key, $key_value );\n } else {\n // Caso contrário, o valor atual + 1\n $key_value += 1;\n update_post_meta( $post->ID, $key, $key_value );\n } // Verifica o valor\n \n } // Checa a sessão\n \n } // is_single\n \n return;\n \n }", "title": "" }, { "docid": "6dcb30a5d8643c6e93308166eb397065", "score": "0.65239036", "text": "public function update_views($post_id ,$counter_data) {\n $this->db->query(\"UPDATE posts_u SET views = $counter_data+1 WHERE id = $post_id\");\n \n \n }", "title": "" }, { "docid": "39b2f05b5f2eab062ba9ec56932826cb", "score": "0.65144444", "text": "public function adjust_posts_count($count, $query)\n {\n }", "title": "" }, { "docid": "f9071acb6a8e4469649ce5277ca43c71", "score": "0.6513379", "text": "function _set_total_update_count($type) {\n if (isset($this->context['results']['total'][$type])) {\n $this->context['results']['total'][$type] ++; \n }\n else {\n $this->context['results']['total'][$type] = 1;\n }\n }", "title": "" }, { "docid": "7b7ad2bb29a4489af4d037cde6be5f3b", "score": "0.64802706", "text": "function incrementViewsCount( $post_id ) {\n global $connection;\n \n $query = \"UPDATE posts SET \";\n $query .= \"post_views_count = post_views_count + 1 \";\n $query .= \"WHERE post_id = {$post_id} \";\n \n $result = mysqli_query($connection, $query);\n\n confirmQuery( $result );\n }", "title": "" }, { "docid": "9ef6d0de5b5f89f9999fbfaffa90c394", "score": "0.64495975", "text": "protected function refreshPostScore()\n {\n // calcular el score del post sumando el total de votos de cada uno de los post\n $this->score = Vote::query()\n ->where(['post_id' => $this->id])\n ->sum('vote');\n\n $this->save();\n }", "title": "" }, { "docid": "e80bb2cc23d098b529dfe0ca8b91b3bb", "score": "0.6442573", "text": "function wp_set_post_views($postID) {\n// global $count_key;\n $count_key = 'job_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if ($count == '') {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n } else {\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "6ecc9695b7c8cc314d0cc537bd1adc23", "score": "0.643678", "text": "public function calculatePosts()\n {\n if ($this->categories && is_array($this->categories)) {\n foreach ($this->categories as $category) {\n $this->cntPosts[$category->id] = 0;\n foreach ($category->posts as $post) {\n if ($post->unvisible === Post::STATUS_UNVISIBLE && $post->moderated === Post::STATUS_MODERATED) {\n $this->cntPosts[$category->id] += 1;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ec2fc0a753cc8d3bfc46414aa37b03e6", "score": "0.6419334", "text": "public function incrementNumPosts()\n {\n $this->numPosts++;\n }", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.6401775", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.6401775", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.6401775", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "95e5e41a0fe6b92d2bd3d4df7ad0b1ef", "score": "0.63520515", "text": "public function update_views($post_id ,$counter_data) {\n $this->db->query(\"UPDATE users SET views = $counter_data+1 WHERE user_id = $post_id\");\n \n \n }", "title": "" }, { "docid": "097f684e38e26baa8ad461c7308c2eb3", "score": "0.6351212", "text": "function setPostViews($postID) {\n $countKey = 'post_views_count';\n $count = get_post_meta($postID, $countKey, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $countKey);\n add_post_meta($postID, $countKey, '0');\n }else{\n $count++;\n update_post_meta($postID, $countKey, $count);\n }\n}", "title": "" }, { "docid": "cfad342dd5d956a324610f011373a256", "score": "0.63445234", "text": "public function incrementPost()\n {\n $member_handler = xoops_gethandler('member');\n return $member_handler->updateUserByField($this, 'posts', $this->getVar('posts') + 1);\n }", "title": "" }, { "docid": "494bf18d0c2083492abb94fba882cd28", "score": "0.6333468", "text": "abstract public function getPostCount();", "title": "" }, { "docid": "6670aff07bbeed35cfbaf55fb6919ab8", "score": "0.63224536", "text": "protected function updateData()\n {\n ArticleCategory::updateTotal();\n }", "title": "" }, { "docid": "51e97efae120b5ef3007aa1bd5a3d764", "score": "0.6315989", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "106738e91d24f4a4ec77eda6931ae715", "score": "0.63153434", "text": "function docount()\n\t{\n\t\tif ( (! $this->ipsclass->input['posts']) and (! $this->ipsclass->input['online']) and (! $this->ipsclass->input['members'] ) and (! $this->ipsclass->input['lastreg'] ) )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Nothing to recount!\");\n\t\t}\n\t\t\n\t\t$stats = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'cache_store', 'where' => \"cs_key='stats'\" ) );\n\t\t\n\t\t$stats = unserialize($this->ipsclass->txt_stripslashes($stats['cs_value']));\n\t\t\n\t\tif ($this->ipsclass->input['posts'])\n\t\t{\n\t\t\t$topics = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'from' => 'topics',\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t \t 'where' => 'approved=1' ) );\n\t\t\n\t\t\t$posts = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'SUM(posts) as replies',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'topics',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => 'approved=1' ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$stats['total_topics'] = $topics['tcount'];\n\t\t\t$stats['total_replies'] = $posts['replies'];\n\t\t}\n\t\t\n\t\tif ($this->ipsclass->input['members'])\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'count(id) as members', 'from' => 'members', 'where' => \"mgroup <> '\".$this->ipsclass->vars['auth_group'].\"'\" ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\t\n\t\t\t$r = $this->ipsclass->DB->fetch_row();\n\t\t\t$stats['mem_count'] = intval($r['members']);\n\t\t}\n\t\t\n\t\tif ($this->ipsclass->input['lastreg'])\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name',\n\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\n\t\t\t\t\t\t\t\t\t\t 'where' => \"mgroup <> '\".$this->ipsclass->vars['auth_group'].\"'\",\n\t\t\t\t\t\t\t\t\t\t 'order' => \"id DESC\",\n\t\t\t\t\t\t\t\t\t\t 'limit' => array(0,1) ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\t\n\t\t\t$r = $this->ipsclass->DB->fetch_row();\n\t\t\t$stats['last_mem_name'] = $r['members_display_name'] ? $r['members_display_name'] : $r['name'];\n\t\t\t$stats['last_mem_id'] = $r['id'];\n\t\t}\n\t\t\n\t\tif ($this->ipsclass->input['online'])\n\t\t{\n\t\t\t$stats['most_date'] = time();\n\t\t\t$stats['most_count'] = 1;\n\t\t}\n\t\t\n\t\tif ( count($stats) > 0 )\n\t\t{\n\t\t\t$this->ipsclass->cache['stats'] =& $stats;\n\t\t\t$this->ipsclass->update_cache( array( 'name' => 'stats', 'array' => 1, 'deletefirst' => 1 ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Nothing to recount!\");\n\t\t}\n\t\t\n\t\t$this->ipsclass->main_msg = 'Statistics Recounted';\n\t\t\n\t\t$this->ipsclass->admin->done_screen(\"Statistics Recounted\", \"Recount statistics section\", \"{$this->ipsclass->form_code}\", 'redirect' );\n\t\t\n\t}", "title": "" }, { "docid": "07147da53a5ec36071c25e890fabf187", "score": "0.62862194", "text": "public static function incPost()\n {\n $db = \\DB::get_instance();\n $sql = \"UPDATE users SET post=post+1 WHERE username=:username\";\n $stmt = $db->prepare($sql);\n $data = [\n \":username\" => $_SESSION[\"username\"],\n ];\n $stmt->execute($data);\n\n }", "title": "" }, { "docid": "631782cf341468fc296e2b8367ece34b", "score": "0.6284856", "text": "function tfuse_count_post_visits()\n {\n if ( !is_single() ) return;\n\n global $post;\n\n $views = get_post_meta($post->ID, TF_THEME_PREFIX . '_post_viewed', true);\n $views = intval($views);\n tf_update_post_meta( $post->ID, TF_THEME_PREFIX . '_post_viewed', ++$views);\n }", "title": "" }, { "docid": "a58e4f4db80167f197bf419d863e47e7", "score": "0.6271024", "text": "public function updateCounts()\n {\n $counts['facebook'] = getFacebookLikes($url);\n $counts['google_plus'] = getGooglePlusOnes($url);\n $counts['linkedin'] = getLinkedInShares($url);\n $counts['stumble_upon'] = getStumbles($url);\n $counts['tweets'] = getTweets($url);\n }", "title": "" }, { "docid": "9d7f3f707c651a7d8ac02ae8a341c4a0", "score": "0.6269516", "text": "public function updateTotalVotes()\n {\n $this->votes = $this->countVotes();\n return $this->save();\n }", "title": "" }, { "docid": "35f90537140b69353729ba11333f9d6f", "score": "0.62641484", "text": "function wpb_set_post_views($postID) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "66482096c6c15797f2f802ee3fdf0900", "score": "0.6256342", "text": "public function updateCount()\n {\n $this->count = $this->messages()->count();\n\n $this->save();\n }", "title": "" }, { "docid": "8795c889c0f5cbf60971929a39b0cefc", "score": "0.6253532", "text": "public function setTotalCount($count);", "title": "" }, { "docid": "33a93173855f119205979e100d9faf8e", "score": "0.62521666", "text": "public function updateTotal()\n {\n $this->updateRequested = true;\n $this->saveState();\n }", "title": "" }, { "docid": "4dcf4b1883974a9002bd6abade56346a", "score": "0.62428135", "text": "function setPostViews($postID) {\n\t$count_key = 'post_views_count';\n\t$count = get_post_meta($postID, $count_key, true);\n\tif($count==''){\n\t\t$count = 0;\n\t\tdelete_post_meta($postID, $count_key);\n\t\tadd_post_meta($postID, $count_key, '0');\n\t}else{\n\t\t$count++;\n\t\tupdate_post_meta($postID, $count_key, $count);\n\t}\n}", "title": "" }, { "docid": "961cc20ac791d03d9ce40b02f88ac2c0", "score": "0.62363136", "text": "function set_post_views($postID){\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if ($count=='') {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0'); \n\n return '0 Views';\n } else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n\n return $count . ' Views';\n }\n}", "title": "" }, { "docid": "67f0c2e3bbf89b4dace28500fba5f8fe", "score": "0.62345845", "text": "function snax_bump_post_submission_count( $post = null, $difference = 1 ) {\n\t$post = get_post( $post );\n\n\t// Get current value.\n\t$submission_count = snax_get_post_submission_count( $post );\n\n\t// Update it.\n\t$submission_count += (int) $difference;\n\n\t// And store again.\n\tupdate_post_meta( $post->ID, '_snax_submission_count', $submission_count );\n\n\treturn apply_filters( 'snax_bump_post_submission_count', $submission_count, $post->ID, (int) $difference );\n}", "title": "" }, { "docid": "0c2de2a9ff4c5b40d7c74b2aa7ba2bf3", "score": "0.6228765", "text": "function setPostViews($postID) {\n\t $count_key = 'post_views_count';\n\t $count = get_post_meta($postID, $count_key, true);\n\t if($count==''){\n\t $count = 0;\n\t delete_post_meta($postID, $count_key);\n\t add_post_meta($postID, $count_key, '0');\n\t }else{\n\t $count++;\n\t update_post_meta($postID, $count_key, $count);\n\t }\n\t}", "title": "" }, { "docid": "0c2de2a9ff4c5b40d7c74b2aa7ba2bf3", "score": "0.6228765", "text": "function setPostViews($postID) {\n\t $count_key = 'post_views_count';\n\t $count = get_post_meta($postID, $count_key, true);\n\t if($count==''){\n\t $count = 0;\n\t delete_post_meta($postID, $count_key);\n\t add_post_meta($postID, $count_key, '0');\n\t }else{\n\t $count++;\n\t update_post_meta($postID, $count_key, $count);\n\t }\n\t}", "title": "" }, { "docid": "bd86bb97ea79a4f772a7579f2b58d112", "score": "0.62242347", "text": "function tfuse_count_post_visits()\r\r\n {\r\r\n if ( !is_single() ) return;\r\r\n\r\r\n global $post;\r\r\n\r\r\n $views = get_post_meta($post->ID, TF_THEME_PREFIX . '_post_viewed', true);\r\r\n $views = intval($views);\r\r\n tf_update_post_meta( $post->ID, TF_THEME_PREFIX . '_post_viewed', ++$views);\r\r\n }", "title": "" }, { "docid": "29a8a18df8e35c644d5031451174e8d8", "score": "0.6222323", "text": "function _update_posts_count_on_transition_post_status($new_status, $old_status, $post = \\null)\n{\n}", "title": "" }, { "docid": "45ec8037c1303c7090f23aafbe483f37", "score": "0.6220439", "text": "function increase_view_count($post_id){\n $current_view_count = get_post_meta( $post_id, 'view_count', true );\n if($current_view_count)\n {\n $current_view_count = $current_view_count +1;\n }\n else{\n $current_view_count = 1;\n }\n return update_post_meta($post_id, 'view_count',$current_view_count);\n }", "title": "" }, { "docid": "40404ba395d39c11d42a4118a745f82f", "score": "0.6214196", "text": "function vmw_set_post_views($postID) {\n\t\t$count_key = 'vmw_post_views_count';\n\t\t$count = get_post_meta($postID, $count_key, true);\n\t\tif($count==''){\n\t\t\t$count = 0;\n\t\t\tdelete_post_meta($postID, $count_key);\n\t\t\tadd_post_meta($postID, $count_key, '0');\n\t\t} else {\n\t\t\t$count++;\n\t\t\tupdate_post_meta($postID, $count_key, $count);\n\t\t}\n\t}", "title": "" }, { "docid": "10f92cbfcd6568a6b2236b76bde8291e", "score": "0.6210611", "text": "function wpb_set_post_views($postID) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "1335c6d0dcb207427df978ddc5cb872f", "score": "0.617939", "text": "public function updateCounter() {\n if ($this->checkAuth()) {\n $postedData = $this->input->post();\n $this->mToken->updateCounter($postedData);\n }\n }", "title": "" }, { "docid": "4269c6ac6e635a8322cf43c8b3029114", "score": "0.615604", "text": "protected function updateCount()\n {\n $categories = $this->getPartCategories();\n\n $this->updateStatus('Updating category part count...');\n\n if (! $this->option('bulk')) {\n $progress = $this->output->createProgressBar($categories->count());\n $progress->start();\n }\n\n foreach ($categories as $category) {\n $category->addPartCount($category->parts->count());\n\n if (! $this->option('bulk')) {\n $progress->advance();\n }\n }\n\n $this->processed = $categories->count();\n\n if (! $this->option('bulk')) {\n $progress->finish();\n }\n }", "title": "" }, { "docid": "33a9757e7c94787eb1e46774901eff22", "score": "0.61501247", "text": "function sPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if ($count == '') {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n } else {\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "1c9e180a861901b0d8389832f3f0d78a", "score": "0.61484146", "text": "function wpb_set_post_views($postID) {\n \t$count_key = 'wpb_post_views_count';\n \t$count = get_post_meta($postID, $count_key, true);\n \tif($count==''){\n \t\t$count = 0;\n \t\tdelete_post_meta($postID, $count_key);\n \t\tadd_post_meta($postID, $count_key, '0');\n \t}else{\n \t\t$count++;\n \t\tupdate_post_meta($postID, $count_key, $count);\n \t}\n }", "title": "" }, { "docid": "73b669394fd14d6299be7ab01bbee398", "score": "0.61441", "text": "public function setTotalCount()\n {\n if ($this->totalCount>0){\n return;\n }\n $sql = $this->sql();\n \n $this->totalCount = $this->getOriginDb()->createCommand(\"SELECT count(*) FROM ({$sql}) as query\")->queryScalar();\n }", "title": "" }, { "docid": "77f73ecbc16464b4ee2a4a2d3c1d4b53", "score": "0.6140488", "text": "function publisher_the_post() {\n\n\t\t// If count customized\n\t\tif ( publisher_get_prop( 'posts-count', null ) != null ) {\n\t\t\tpublisher_set_prop( 'posts-counter', absint( publisher_get_prop( 'posts-counter', 1 ) ) + 1 );\n\t\t}\n\n\t\t// Do default the_post\n\t\tpublisher_get_query()->the_post();\n\n\t\t// Clear post cache for this post\n\t\tpublisher_clear_post_cache();\n\t}", "title": "" }, { "docid": "ff91e9770a00d364b55e3cc061068fbc", "score": "0.6140195", "text": "function updateNumbers() {\n/* numbering the published posts, starting with 1 for oldest;\n/ creates and updates custom field 'incr_number';\n/ to show in post (within the loop) use <?php echo get_post_meta($post->ID,'your_post_type',true); ?>\n/ alchymyth 2010 */\nglobal $wpdb;\n$querystr = \"SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'europians' \";\n$pageposts = $wpdb->get_results($querystr, OBJECT);\n$counts = 0 ;\nif ($pageposts):\nforeach ($pageposts as $post):\n$counts++;\nadd_post_meta($post->ID, 'incr_number', $counts, true);\nupdate_post_meta($post->ID, 'incr_number', $counts);\nendforeach;\nendif;\n}", "title": "" }, { "docid": "363f6044233902755171f77b8e0df6e6", "score": "0.6133469", "text": "function wpb_set_post_views($postID) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if ($count == '') {\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n } else {\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "6e636dfd540b5d3488ed025b284bb339", "score": "0.6121813", "text": "function _update_users_posts_count( $tt_ids, $taxonomy ) {\n\t\tglobal $wpdb;\n\n\t\t$tt_ids = implode( ', ', array_map( 'intval', $tt_ids ) );\n\t\t$term_ids = $wpdb->get_results( \"SELECT term_id FROM $wpdb->term_taxonomy WHERE term_taxonomy_id IN ($tt_ids)\" );\n\n\t\tforeach( (array)$term_ids as $term_id_result ) {\n\t\t\t$term = get_term_by( 'id', $term_id_result->term_id, $this->coauthor_taxonomy );\n\t\t\t$this->update_author_term_post_count( $term );\n\t\t}\n\t\t$tt_ids = explode( ', ', $tt_ids );\n\t\tclean_term_cache( $tt_ids, '', false );\n\n\t}", "title": "" }, { "docid": "042b1b2079f6f709cdeae475153fdc5b", "score": "0.6120006", "text": "public function getposttotalCount() {\n $select = $this->select()\n ->from(array(\"post\" => $this->POST_TBL), Array(\"cnt\" => \"count(*)\"))\n ->where(\"post_status != 3\"); \n $rows = parent::fetchRow($select);\n return($rows->cnt);\n }", "title": "" }, { "docid": "1aa08a53a5bbe894eefd13837d514da0", "score": "0.6084058", "text": "function publisher_set_prop_count_multi_column( $post_counts = 0, $columns = 1, $current_column = 1 ) {\n\n\t\tif ( $post_counts == 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$count = floor( $post_counts / $columns );\n\n\t\t$reminder = $post_counts % $columns;\n\n\t\tif ( $reminder >= $current_column ) {\n\t\t\t$count ++;\n\t\t}\n\n\t\tpublisher_set_prop( \"posts-count\", $count );\n\t}", "title": "" }, { "docid": "41cf2ed1d172c0f1961dde9952ec0e90", "score": "0.6079274", "text": "public function recount( $args ) {\n\t\tforeach ( $args as $id ) {\n\t\t\twp_update_comment_count( $id );\n\t\t\t$post = get_post( $id );\n\t\t\tif ( $post ) {\n\t\t\t\tWP_CLI::log( \"Updated post {$post->ID} comment count to {$post->comment_count}.\" );\n\t\t\t} else {\n\t\t\t\tWP_CLI::warning( \"Post {$post->ID} doesn't exist.\" );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e238767e1d44d9fe056c93305d80d252", "score": "0.6076435", "text": "function setProductViews($productID, $uID) { //βαζει τον counter για καθε προιον και για καθε χρηστη\r\n $count_key = $uID;\r\n $count = get_post_meta($productID, $count_key, true);\r\n \r\n if($count ==''){\r\n $count = 1;\r\n echo \"add\";\r\n delete_post_meta($productID, $count_key);\r\n add_post_meta($productID, $count_key, '1');\r\n \r\n }else{\r\n $count++;\r\n echo \"update\";\r\n update_post_meta($productID, $count_key, $count);\r\n \r\n }\r\n}", "title": "" }, { "docid": "1a1e1f8bd5c02ebe1f10593d5edf9759", "score": "0.60547155", "text": "public static function handlePostCount(?Post $post, ?array $postData)\n {\n if (empty($post) || empty($postData)) {\n return $postData;\n }\n\n $configKeys = ConfigHelper::fresnsConfigByItemKeys([\n 'post_liker_count',\n 'post_disliker_count',\n 'post_follower_count',\n 'post_blocker_count',\n 'comment_liker_count',\n 'comment_disliker_count',\n 'comment_follower_count',\n 'comment_blocker_count',\n ]);\n\n $postData['viewCount'] = $post->view_count;\n $postData['likeCount'] = $configKeys['post_liker_count'] ? $post->like_count : null;\n $postData['dislikeCount'] = $configKeys['post_disliker_count'] ? $post->dislike_count : null;\n $postData['followCount'] = $configKeys['post_follower_count'] ? $post->follow_count : null;\n $postData['blockCount'] = $configKeys['post_blocker_count'] ? $post->block_count : null;\n $postData['commentCount'] = $post->comment_count;\n $postData['commentDigestCount'] = $post->comment_digest_count;\n $postData['commentLikeCount'] = $configKeys['comment_liker_count'] ? $post->comment_like_count : null;\n $postData['commentDislikeCount'] = $configKeys['comment_disliker_count'] ? $post->comment_dislike_count : null;\n $postData['commentFollowCount'] = $configKeys['comment_follower_count'] ? $post->comment_follow_count : null;\n $postData['commentBlockCount'] = $configKeys['comment_blocker_count'] ? $post->comment_block_count : null;\n $postData['postCount'] = $post->post_count;\n\n return $postData;\n }", "title": "" }, { "docid": "7c0d7b2386609fa16e6f93274f15e8b8", "score": "0.60257554", "text": "public function getNewPostTotal()\n {\n $id = session('user_id');\n $logoutTime = logouts::find($id);\n if(empty($logoutTime))\n {\n $count = posts::get()->count();\n return $count;\n }\n else\n {\n $time = $logoutTime->updated_at;\n $count = posts::where('created_at' , '>=' , $time)->count();\n return $count;\n\n }\n \n }", "title": "" }, { "docid": "d3fc95b7ea1974de15287dc41b3b1321", "score": "0.60200834", "text": "function hsk_talnet_pofile_count($post_ID) {\n $talent_count_id = 'post_views_count'; \n $count = get_post_meta($post_ID, $talent_count_id, true);\n if($count == ''){\n $count = 0; // set the counter to zero.\n delete_post_meta($post_ID, $talent_count_id);\n add_post_meta($post_ID, $talent_count_id, '0');\n return $count;\n }else{\n $count++; //increment the counter by 1.\n update_post_meta($post_ID, $talent_count_id, $count);\n if($count == '1'){\n return $count;\n }\n else {\n return $count;\n }\n }\n}", "title": "" }, { "docid": "d2381aedf10692c4ea6c5f2837cc1861", "score": "0.5991257", "text": "public static function sync_rating_count($post_id)\n {\n }", "title": "" }, { "docid": "07cc95cfe145336838b6f09c03c112d6", "score": "0.59875095", "text": "function overlap_set_post_views($post_id) {\r\n $count_key = '_w_post_views';\r\n $count = get_post_meta($post_id, $count_key, true);\r\n if($count == ''){\r\n $count = 0;\r\n delete_post_meta($post_id, $count_key);\r\n add_post_meta($post_id, $count_key, '0');\r\n }else{\r\n $count++;\r\n update_post_meta($post_id, $count_key, $count);\r\n }\r\n}", "title": "" }, { "docid": "bcd4ce32505ac3cf3e3829ce360acd9b", "score": "0.59846056", "text": "function qa_db_uapprovecount_update()\n{\n\tif (qa_should_update_counts() && !QA_FINAL_EXTERNAL_USERS) {\n\t\tqa_db_query_sub(\n\t\t\t\"INSERT INTO ^options (title, content) \" .\n\t\t\t\"SELECT 'cache_uapprovecount', COUNT(*) FROM ^users \" .\n\t\t\t\"WHERE level < # AND NOT (flags & #) \" .\n\t\t\t\"ON DUPLICATE KEY UPDATE content = VALUES(content)\",\n\t\t\tQA_USER_LEVEL_APPROVED, QA_USER_FLAGS_USER_BLOCKED\n\t\t);\n\t}\n}", "title": "" }, { "docid": "201e185b206a9b89efd625e97323547a", "score": "0.59802514", "text": "function post_count($string){\r\n\r\n\tglobal $db;\r\n\r\n\t//get current post count then add on to it.\r\n\t$db->SQL = \"select Post_Count from ebb_users where Username='$string'\";\r\n\t$get_num = $db->fetchResults();\r\n\r\n\t$increase_count = $get_num['Post_Count'] + 1;\r\n\t$db->SQL = \"UPDATE ebb_users SET Post_Count='$increase_count' WHERE Username='$string'\";\r\n\t$db->query();\r\n}", "title": "" }, { "docid": "2daf29d1ecc9e61a0a314990cbf357ec", "score": "0.5977526", "text": "function nb_update_post_total_liked_count( $value, $object, $field_name ) {\n if ( ! $value || ! is_numeric( $value ) ) {\n return;\n }\n return update_post_meta( $object->ID, $field_name, (int) $value );\n}", "title": "" }, { "docid": "6e6c1a61b081d3e26451aabcdc897751", "score": "0.5973741", "text": "function voisen_set_post_view($postID){\n $count_key = 'post_views_count';\n $count = (int)get_post_meta($postID, $count_key, true);\n if(!$count){\n $count = 1;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, $count);\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "beb8b98e8a6cc137f84afdea2d6ca654", "score": "0.5973557", "text": "function update_posts_count($deprecated = '')\n{\n}", "title": "" }, { "docid": "a82312b6e79787f77f6fd14c3958128c", "score": "0.5944686", "text": "function rebuild_post_counts()\n\t{\n\t\t//-----------------------------------------\n\t\t// Forums not to count?\n\t\t//-----------------------------------------\n\t\t\n\t\t$forums = array();\n\t\t\n\t\tforeach( $this->ipsclass->cache['forum_cache'] as $data )\n\t\t{\n\t\t\tif ( ! $data['inc_postcount'] )\n\t\t\t{\n\t\t\t\t$forums[] = $data['id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$done = 0;\n\t\t$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;\n\t\t$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;\n\t\t$dis = $end + $start;\n\t\t$output = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Got any more?\n\t\t//-----------------------------------------\n\t\t\n\t\t$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'id', 'from' => 'members', 'limit' => array($dis,1) ) );\n\t\t$max = intval( $tmp['id'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Avoid limit...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'order' => 'id ASC', 'limit' => array($start,$end) ) );\n\t\t$outer = $this->ipsclass->DB->simple_exec();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Process...\n\t\t//-----------------------------------------\n\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row( $outer ) )\n\t\t{\n\t\t\tif ( ! count( $forums ) )\n\t\t\t{\n\t\t\t\t$count = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'count(*) as count', 'from' => 'posts', 'where' => 'queued != 1 AND author_id='.$r['id'] ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ipsclass->DB->build_query( array( 'select' \t=> 'count(p.pid) as count',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from'\t\t=> array( 'posts' => 'p' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where'\t=> 'p.queued <> 1 AND p.author_id='.$r['id'].' AND t.forum_id NOT IN ('.implode(\",\",$forums).')',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'add_join'\t=> array( 1 => array( 'type'\t=> 'left',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'from'\t=> array( 'topics' => 't' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t 'where'\t=> 't.tid=p.topic_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t)\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t)\t\t);\n\t\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\t\t\t\t\t\n\t\t\t\t$count = $this->ipsclass->DB->fetch_row();\n\t\t\t}\n\t\t\t\n\t\t\t$new_post_count = intval( $count['count'] );\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_update( 'members', array( 'posts' => $new_post_count ), 'id='.$r['id'] );\n\t\t\t\n\t\t\t$done++;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish - or more?...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $done and ! $max )\n\t\t{\n\t\t \t//-----------------------------------------\n\t\t\t// Done..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Rebuild completed</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}\";\n\t\t\t$time = 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// More..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Up to $dis processed so far, continuing...</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}&code=\".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;\n\t\t\t$time = 0;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Bye....\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->redirect( $url, $text, 0, $time );\n\t}", "title": "" }, { "docid": "08f15f0069218ae437da63ae7524542d", "score": "0.59394884", "text": "function _update_term_count_on_transition_post_status($new_status, $old_status, $post)\n{\n}", "title": "" }, { "docid": "7145ea38f073dda9dc0ec0d88130e51e", "score": "0.5939095", "text": "function csco_archive_post_count() {\n\t\tif ( is_archive() ) {\n\t\t\tglobal $wp_query;\n\t\t\t$found_posts = $wp_query->found_posts;\n\t\t\t?>\n\t\t\t<div class=\"post-count\">\n\t\t\t\t<?php printf( esc_html( _n( '%s post', '%s posts', $found_posts, 'authentic' ) ), intval( $found_posts ) ); ?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "d982c7c097015bb20ed947c6d734ea6a", "score": "0.5936184", "text": "function _update_post_term_count($terms, $taxonomy)\n{\n}", "title": "" }, { "docid": "57f1f260c89ddae326fabcbf7db615aa", "score": "0.59248704", "text": "function share_count(Model_Blog_Post $post);", "title": "" }, { "docid": "9171f7e5f362b7d68ae4f4a4f28e167c", "score": "0.5915725", "text": "public function post_count_func() {\n global $catpdf_core;\n $item = count($catpdf_core->posts);\n return $item;\n }", "title": "" }, { "docid": "9756a9f92be2796048211f4788c29beb", "score": "0.5911991", "text": "public function getPostCount()\n {\n return $this->post_count;\n }", "title": "" }, { "docid": "9a87e7137c30ecfc0630dd78121a9cf9", "score": "0.59060496", "text": "static function count_post(){\n return self::$PDO->prepare('SELECT '.self::$prefix.'count_post()')->execute(array());\n }", "title": "" }, { "docid": "7df7054fbe1670c49ec58fc975e57fa4", "score": "0.58912396", "text": "public function fix_comment_count( $args, $assoc_args ) {\n\n\t\t// Starting time of the script.\n\t\t$start_time = time();\n\n\t\tglobal $wpdb;\n\n\t\t$batch_size = 500;\n\t\t$offset = 0;\n\t\t$total_found = 0;\n\t\t$success_count = 0;\n\t\t$fail_count = 0;\n\n\t\t$query = \"SELECT ID FROM {$wpdb->posts} WHERE post_status='publish' ORDER BY ID ASC LIMIT %d, %d\";\n\n\t\tdo {\n\n\t\t\tWP_CLI::line();\n\t\t\tWP_CLI::line( sprintf( 'Starting from offset %d:', absint( $offset ) ) );\n\n\t\t\t$all_posts = $wpdb->get_col( $wpdb->prepare( $query, $offset, $batch_size ) );\n\n\t\t\tif ( empty( $all_posts ) ) {\n\n\t\t\t\tWP_CLI::line();\n\t\t\t\tWP_CLI::line( 'No posts found.' );\n\t\t\t\tWP_CLI::line();\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $all_posts as $single_post_id ) {\n\n\t\t\t\tWP_CLI::line();\n\t\t\t\tWP_CLI::line( sprintf( 'Updating comment count for Post #%d:', $single_post_id ) );\n\n\t\t\t\tif( wp_update_comment_count( $single_post_id ) ) {\n\t\t\t\t\t$success_count++;\n\t\t\t\t} else {\n\t\t\t\t\t$fail_count++;\n\t\t\t\t}\n\n\t\t\t\tWP_CLI::success( sprintf( 'Comment count updated for Post #%d.', $single_post_id ) );\n\t\t\t}\n\n\t\t\t// Update offset.\n\t\t\t$offset += $batch_size;\n\n\t\t\tsleep( 1 );\n\n\t\t\t$count = count( $all_posts );\n\t\t\t$total_found += $count;\n\n\t\t} while ( $count === $batch_size );\n\n\t\tWP_CLI::line();\n\t\tWP_CLI::success( sprintf( 'Comment count updated successfully for total %d posts.', $success_count ) );\n\t\tWP_CLI::warning( sprintf( 'Comment count failed to update for total %d posts.', $fail_count ) );\n\n\t\tWP_CLI::line();\n\t\tWP_CLI::success( sprintf( 'Total time taken by this migration script: %s', human_time_diff( $start_time, time() ) ) );\n\t\tWP_CLI::line();\n\t}", "title": "" }, { "docid": "ebae3d305bb357d8f972ecb138b268c7", "score": "0.58659285", "text": "function draft_post_count(){\n global $conn;\n $sql=\"SELECT COUNT(`id`) 'total' FROM `db_lostandfound`.`fthings` WHERE draft=1\";\n $retval = mysqli_query($conn, $sql);\n $row = mysqli_fetch_array($retval);\n $total=$row['total'];\n\n $sql=\"SELECT COUNT(`id`) 'total' FROM `db_lostandfound`.`lthings` WHERE draft=1\";\n $retval = mysqli_query($conn, $sql);\n $row = mysqli_fetch_array($retval);\n\n $total=$total+$row['total'];\n return $total;\n}", "title": "" }, { "docid": "47d3ef826394216380655480abb67de5", "score": "0.5865543", "text": "public function set_post_views( $post ) {\n if ( is_singular( 'post' ) ) {\n //get post id & set count meta key\n $post_id = get_the_ID();\n $count_key = 'post_views_count';\n\n $count = get_post_meta( $post_id, $count_key, true );\n\n // check the condition if count emplty or not\n if ( $count == '' ) {\n $count = 0;\n add_post_meta( $post_id, $count_key, '0' );\n } else {\n $count++;\n update_post_meta( $post_id, $count_key, $count );\n }\n }\n\n /**\n * Call post views methods\n * Get post count views\n */\n $content = $this->get_post_view();\n return $post . $content;\n }", "title": "" }, { "docid": "c8e7d7cee34a8975df07941cf10430f2", "score": "0.5825754", "text": "public function updateEventCounts() {\n \n $eventIds = $this->Event->find('list', array(\n 'fields' => array('Event.id')\n ));\n \n foreach ($eventIds as $eventId){\n// debug($eventId);\n $attending_count = $this->EventMember->find('count', array(\n 'conditions' => array(\n 'EventMember.status' => 1,\n 'EventMember.event_id' => $eventId\n )\n ));\n \n $invited_count = $this->EventMember->find('count', array(\n 'conditions' => array(\n 'EventMember.status' => 0,\n 'EventMember.event_id' => $eventId\n )\n ));\n \n $not_attending_count = $this->EventMember->find('count', array(\n 'conditions' => array(\n 'EventMember.status' => 2,\n 'EventMember.event_id' => $eventId\n )\n ));\n \n $maybe_count = $this->EventMember->find('count', array(\n 'conditions' => array(\n 'EventMember.status' => 3,\n 'EventMember.event_id' => $eventId\n )\n ));\n \n if($attending_count == null) {\n $attending_count = 0;\n }\n if($invited_count == null) {\n $invited_count = 0;\n\n }\n if($not_attending_count == null) {\n $not_attending_count = 0;\n\n }\n if($maybe_count == null) {\n $maybe_count = 0;\n\n }\n $this->Event->id = $eventId;\n $this->Event->saveField('attending_count', $attending_count);\n $this->Event->saveField('invited_count', $invited_count);\n $this->Event->saveField('not_attending_count', $not_attending_count);\n $this->Event->saveField('maybe_count', $maybe_count);\n \n// debug($maybe_count);\n// debug($not_attending_count);\n// debug($invited_count);\n// debug($attending_count);\n }\n \n exit;\n }", "title": "" }, { "docid": "4092543f1b265c0a2af0ecb267fae976", "score": "0.5824762", "text": "function chomikoo_save_post_views( $postID ){\n\n\t$metaKey = 'chomikoo_post_views';\n\t$views = get_post_meta( $postID, $metaKey, true );\n\n\t$count = ( empty( $views ) ? 0 : $views );\n\t$count++;\n\tupdate_post_meta( $postID, $metaKey, $count );\n\t// echo $count;\n}", "title": "" }, { "docid": "532e609bfda839d6546253773499d2a3", "score": "0.58212", "text": "private function updateCount(array $selectData, string $content)\r\n {\r\n if ($selectData['content'] == $content && $selectData['status'] == 0) {\r\n $this->_query->update($selectData['id'], 'totalCount', $selectData['totalCount'] + 1);\r\n }\r\n }", "title": "" }, { "docid": "5939972d484ea9d6b2450a56f45e4482", "score": "0.58146757", "text": "function add_total_count(){\n mysql_query(\"UPDATE cb_total_videos_watched SET count = count +1\") or e('Count not working!'); // add one to the count, since page loads several times it will happen more than once\n}", "title": "" }, { "docid": "a300434019f77566f256eb43f90b3496", "score": "0.5809614", "text": "public function update_1() {\n\t\tglobal $wpdb;\n\n\t\t// get index\n\t\t$old_index = $wpdb->query( \"SHOW INDEX FROM `\" . $wpdb->prefix . \"post_views` WHERE Key_name = 'id_period'\" );\n\n\t\t// check whether index already exists\n\t\tif ( $old_index > 0 ) {\n\t\t\t// drop unwanted index which prevented saving views with indentical weeks and months\n\t\t\t$wpdb->query( \"ALTER TABLE `\" . $wpdb->prefix . \"post_views` DROP INDEX id_period\" );\n\t\t}\n\n\t\t// get index\n\t\t$new_index = $wpdb->query( \"SHOW INDEX FROM `\" . $wpdb->prefix . \"post_views` WHERE Key_name = 'id_type_period_count'\" );\n\n\t\t// check whether index already exists\n\t\tif ( $new_index === 0 ) {\n\t\t\t// create new index for better performance of SQL queries\n\t\t\t$wpdb->query( 'ALTER TABLE `' . $wpdb->prefix . 'post_views` ADD UNIQUE INDEX `id_type_period_count` (`id`, `type`, `period`, `count`) USING BTREE' );\n\t\t}\n\n\t\tPost_Views_Counter()->add_notice( __( 'Thank you! Datebase was successfully updated.', 'post-views-counter' ), 'updated', true );\n\t}", "title": "" }, { "docid": "628ffe86f4aa524c08a799e2faaef299", "score": "0.5806498", "text": "public function updateReplyCount($topic, $replies)\n \t{\n// \t\t$expr = array(\n// \t\t\t'$set' => array('replyCount' => $posts)\n// \t\t);\n//\n// \t\t// ** Perform increment update statement against the tuple.\n// \t\t$this->getDocumentManager()\n// \t\t\t\t->getDocumentCollection($this->getDocumentName())\n// \t\t\t\t->getMongoCollection()\n// \t\t\t\t->update($filter, $expr);\n \t}", "title": "" }, { "docid": "e25cf58c80e99f4ed877b1a2121ddeb8", "score": "0.57952714", "text": "function incrementCommentCount( $post_id ) {\n global $connection;\n \n $post = getPost($post_id);\n $post_comment_count = $post['post_comment_count'];\n $post_comment_count++; \n \n $query = \"UPDATE posts SET \";\n $query .= \"post_comment_count = {$post_comment_count} \";\n $query .= \"WHERE post_id = {$post_id} \";\n \n $result = mysqli_query($connection, $query);\n\n confirmQuery( $result );\n }", "title": "" }, { "docid": "73d77bab81a43664f3f9db1e1f47ac71", "score": "0.57847065", "text": "function tptn_save_meta_box( $post_id ) {\n\tglobal $wpdb;\n\n\t$tptn_post_meta = array();\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\n\t// Bail if we're doing an auto save.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// If our nonce isn't there, or we can't verify it, bail.\n\tif ( ! isset( $_POST['tptn_meta_box_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['tptn_meta_box_nonce'] ), 'tptn_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If our current user can't edit this post, bail.\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\t// Update the posts view count.\n\tif ( isset( $_POST['total_count'] ) && isset( $_POST['total_count_original'] ) ) {\n\t\t$total_count = intval( $_POST['total_count'] );\n\t\t$total_count_original = intval( $_POST['total_count_original'] );\n\t\t$blog_id = get_current_blog_id();\n\n\t\tif ( 0 === $total_count ) {\n\t\t\t$wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"DELETE FROM {$table_name} WHERE postnumber = %d AND blog_id = %d\", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t\t\t\t$post_id,\n\t\t\t\t\t$blog_id\n\t\t\t\t)\n\t\t\t);\n\t\t} elseif ( $total_count_original !== $total_count ) {\n\t\t\t$wpdb->query( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"INSERT INTO {$table_name} (postnumber, cntaccess, blog_id) VALUES( %d, %d, %d ) ON DUPLICATE KEY UPDATE cntaccess= %d \", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t\t\t\t$post_id,\n\t\t\t\t\t$total_count,\n\t\t\t\t\t$blog_id,\n\t\t\t\t\t$total_count\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\t// Update the thumbnail URL.\n\tif ( isset( $_POST['thumb_meta'] ) ) {\n\t\t$thumb_meta = empty( $_POST['thumb_meta'] ) ? '' : sanitize_text_field( wp_unslash( $_POST['thumb_meta'] ) );\n\t}\n\n\tif ( ! empty( $thumb_meta ) ) {\n\t\tupdate_post_meta( $post_id, tptn_get_option( 'thumb_meta' ), $thumb_meta );\n\t} else {\n\t\tdelete_post_meta( $post_id, tptn_get_option( 'thumb_meta' ) );\n\t}\n\n\t// Disable posts.\n\tif ( isset( $_POST['disable_here'] ) ) {\n\t\t$tptn_post_meta['disable_here'] = 1;\n\t} else {\n\t\t$tptn_post_meta['disable_here'] = 0;\n\t}\n\n\tif ( isset( $_POST['exclude_this_post'] ) ) {\n\t\t$tptn_post_meta['exclude_this_post'] = 1;\n\t} else {\n\t\t$tptn_post_meta['exclude_this_post'] = 0;\n\t}\n\n\t/**\n\t * Filter the Top 10 Post meta variable which contains post-specific settings\n\t *\n\t * @since 2.2.0\n\t *\n\t * @param array $tptn_post_meta Top 10 post-specific settings\n\t * @param int $post_id Post ID\n\t */\n\t$tptn_post_meta = apply_filters( 'tptn_post_meta', $tptn_post_meta, $post_id );\n\n\t$tptn_post_meta_filtered = array_filter( $tptn_post_meta );\n\n\t/**** Now we can start saving */\n\tif ( empty( $tptn_post_meta_filtered ) ) { // Checks if all the array items are 0 or empty.\n\t\tdelete_post_meta( $post_id, 'tptn_post_meta' ); // Delete the post meta if no options are set.\n\t} else {\n\t\tupdate_post_meta( $post_id, 'tptn_post_meta', $tptn_post_meta );\n\t}\n\n\t/**\n\t * Action triggered when saving Contextual Related Posts meta box settings\n\t *\n\t * @since 2.2\n\t *\n\t * @param int $post_id Post ID\n\t */\n\tdo_action( 'tptn_save_meta_box', $post_id );\n\n}", "title": "" }, { "docid": "4615af205259bb472e0f5035a6f6f8a9", "score": "0.5783386", "text": "public static function incrementPostCount($userId)\n {\n $db = self::getInstance()->getAdapter();\n $where = $db->quoteInto('user_id = ?', $userId);\n $rowsAffected = $db->update('users', array('post_count' => new Zend_Db_Expr('post_count + 1')), $where);\n\n return $rowsAffected;\n }", "title": "" }, { "docid": "3ae4bb80167505207e6c513fc69b3888", "score": "0.5761784", "text": "function wp_update_comment_count_now($post_id)\n{\n}", "title": "" }, { "docid": "3ee0b95382abe565e973c9a8cf222462", "score": "0.5757262", "text": "function setAndViewPostViews($postID) {\n $count_key = 'event_views';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n return $count; /* so you can show it */\n}", "title": "" }, { "docid": "c77544b8401aea30df7620cb58fbea0e", "score": "0.5757059", "text": "function pronamic_entry_views_update_ajax() {\n\tif ( function_exists( 'ev_get_post_view_count' ) ) {\n\t\t$post_id = filter_input( INPUT_POST, 'post_id', FILTER_SANITIZE_STRING );\n\n\t\t$data = array(\n\t\t\t'post_id' => $post_id,\n\t\t\t'post_view_count' => ev_get_post_view_count( $post_id ),\n\t\t);\n\n\t\twp_send_json_success( $data );\n\t}\n}", "title": "" }, { "docid": "947667ee221cc1491a483064a21e40ce", "score": "0.5756572", "text": "function popular_post_views($postID) {\n\t$total_key = 'views';\n\n\t$total = get_post_meta($postID, $total_key, true);\n\n\tif ($total == '') {\n\t\tdelete_post_meta($postID, $total_key);\n\t\tadd_post_meta($postID, $total_key, '0');\n\t} else {\n\t\t//en caso de que tenga un valor.\n\t\t$total++;\n\t\tupdate_post_meta($postID, $total_key, $total);\n\t}\n}", "title": "" }, { "docid": "403c468d4219277621c6e0193233baaf", "score": "0.5746248", "text": "public function count_views() {\n\n\t\t\tif ( ! is_singular( $this->slug ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tglobal $post;\n\n\t\t\t$current = get_post_meta( $post->ID, $this->views_meta, true );\n\t\t\t$current = intval( $current );\n\n\t\t\tif ( ! $current ) {\n\t\t\t\t$current = 0;\n\t\t\t}\n\n\t\t\t$current++;\n\n\t\t\tupdate_post_meta( $post->ID, $this->views_meta, $current );\n\t\t}", "title": "" }, { "docid": "ea555e6dd8f88b7394345f87ad1edf6f", "score": "0.57360363", "text": "public function updateSubCounter() {\n if ($this->checkAuth()) {\n $postedData = $this->input->post();\n $this->mToken->updateSubCounter($postedData);\n }\n }", "title": "" }, { "docid": "9699ff996ae42624ad41ad053b3836d8", "score": "0.5730766", "text": "public function get_total_post_impression( $args = array() ) {\n $default_args = array( 'fields' => array( 'COUNT(*) AS quantity' ) );\n $args = wp_parse_args( $args, $default_args );\n\n return $this->get_row( $args );\n }", "title": "" }, { "docid": "da7800610dcc09baac741d0cc32a7b12", "score": "0.57291037", "text": "public function total_posts()\n {\n global $wpdb;\n $total = $wpdb->get_var(\"\n SELECT\n COUNT({$wpdb->posts}.ID)\n FROM\n {$wpdb->posts}\n WHERE\n post_status = 'publish'\n AND\n post_type IN ('\" . implode(\"', '\", $this->post_types) . \"')\n \");\n return intval($total);\n }", "title": "" }, { "docid": "b6ff0b3fabdf3bd82173a9d5b357a4f2", "score": "0.572565", "text": "protected function _updateTotals($data)\n {\n foreach ($data as $key => $amount) {\n if (null !== $amount) {\n $was = $this->getDataUsingMethod($key);\n $this->setDataUsingMethod($key, $was + $amount);\n }\n }\n }", "title": "" }, { "docid": "4e52dc575d0288602ce78156ea1f6d86", "score": "0.57191265", "text": "function tie_setPostViews() {\n\tif( !tie_get_option( 'post_views' ) ) return false;\n\n\tglobal $post;\n\t$postID = $post->ID ;\n $count_key = 'tie_views';\n $count = get_post_meta($postID, $count_key, true);\n\tif( !defined('WP_CACHE') || !WP_CACHE ){\n\t\tif($count==''){\n\t\t\t$count = 0;\n\t\t\tdelete_post_meta($postID, $count_key);\n\t\t\tadd_post_meta($postID, $count_key, '0');\n\t\t}else{\n\t\t\t$count++;\n\t\t\tupdate_post_meta($postID, $count_key, $count);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4f6e8f8ca50d70c435a113dce3de6bba", "score": "0.57038933", "text": "function arixWp_PostViews( $id, $action ) { \n\n\t$axCountMeta = 'ax_post_views'; // Your Custom field that stores the views \n\n\t$axCount = get_post_meta($id, $axCountMeta, true); \n\n\t\n\n\tif ( $axCount == '' ) {\n\n\t\tif ( $action == 'count' ) { $axCount = 0; } \n\n\t\tdelete_post_meta( $id, $axCountMeta ); \n\n\t\tadd_post_meta( $id, $axCountMeta, 0, true ); \n\n\t\tif ( $action == 'display' ) { echo \"0 Views\"; } \n\n\t} else {\n\n\t\tif ( $action == 'count' ) { \n\n\t\t\t$axCount++; \n\n\t\t\tupdate_post_meta( $id, $axCountMeta, $axCount ); \n\n\t\t} else { \n\n\t\t\techo $axCount . ' Views'; \n\n\t\t} \n\n\t} \n\n}", "title": "" }, { "docid": "c4b73a4968dee1f0bfe627a68eb7fde7", "score": "0.5703021", "text": "function count_post_comments($post_id) {\r\n\t\t//echo \"populate_post_comments<br/>\";\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t/* Count existing comments */\r\n\t\t$result = mysql_query(\"\r\n\t\t\tSELECT comment_ID\r\n\t\t\tFROM $wpdb->comments\r\n\t\t\tWHERE comment_post_ID = '$post_id'\r\n\t\t\tAND comment_type = ''\r\n\t\t\tAND comment_approved = '1'\r\n\t\t\");\r\n\t\t$nb_comments = mysql_num_rows($result);\r\n\r\n\t\t/* Count existing trackbacks */\r\n\t\t$result = mysql_query(\"\r\n\t\t\tSELECT comment_ID\r\n\t\t\tFROM $wpdb->comments\r\n\t\t\tWHERE comment_post_ID = '$post_id'\r\n\t\t\tAND comment_type = 'trackback'\r\n\t\t\tAND comment_approved = '1'\r\n\t\t\");\r\n\t\t$nb_trackbacks = mysql_num_rows($result);\r\n\r\n\t\t/* Count existing pingbacks */\r\n\t\t$result = mysql_query(\"\r\n\t\t\tSELECT comment_ID\r\n\t\t\tFROM \".$wpdb->prefix.\"comments\r\n\t\t\tWHERE comment_post_ID = '$post_id'\r\n\t\t\tAND comment_type = 'pingback'\r\n\t\t\tAND comment_approved = '1'\r\n\t\t\");\r\n\t\t\r\n\t\t$nb_pingbacks = mysql_num_rows($result);\r\n\r\n\t\t/* Write values in the table */\r\n\t\tif ($nb_comments > 0 || $nb_trackbacks > 0 || $nb_pingbacks > 0 ) {\r\n\r\n\t\t\t$result = mysql_query(\"\r\n\t\t\t\tUPDATE \".$wpdb->prefix.\"aixorder\r\n\t\t\t\tSET comments = $nb_comments, trackbacks = $nb_trackbacks, pingbacks = $nb_pingbacks\r\n\t\t\t\tWHERE post_id = '$post_id'\r\n\t\t\t\");\r\n\r\n\t\t\tif (!$result) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "dcb5d67c26376fd57a5dc3977e13979f", "score": "0.720747", "text": "public function store(Resource $resource, $tempResource);", "title": "" }, { "docid": "29f523253fa183bb58e06565b71660d4", "score": "0.70471525", "text": "public function store(ResourceStoreRequest $request)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was created');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }", "title": "" }, { "docid": "43692f9286169160bb1c60a601ad98b5", "score": "0.679025", "text": "protected function storeResources()\n {\n $resources = $this->resources(['format' => 'json']);\n $this->resourceRepo->put($resources);\n }", "title": "" }, { "docid": "414a41005fac4c5124023387fb0ac54f", "score": "0.6786136", "text": "public function store(ResourceStoreRequest $request)\n {\n $resource = Resource::create($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was created');\n\n return redirect('/resources');\n }", "title": "" }, { "docid": "c8211f121a8daac5ecd303e9a47b19e5", "score": "0.67509526", "text": "public function store(ResourceStoreRequest $request)\n {\n $this->data->resource = Resource::create($request->all());\n return $this->json();\n }", "title": "" }, { "docid": "2550c05736a0d6808eb726ba834a3af7", "score": "0.6565381", "text": "public function save()\n {\n if ($id = Input::get('id')) {\n $storage = Storage::find($id);\n }\n\n // Validation\n $validator = Validator::make($data = Input::all(), Storage::$rules);\n\n // Check if the form validates with success.\n if ($validator->passes()) {\n // Own?\n if (isset($storage) && $storage->isMine()) {\n // Save model\n $storage->update($data);\n // Message\n Flash::success('Storage saved successfully');\n } else {\n // Create model\n $storage = new Storage($data);\n // Asociate to current user\n Auth::user()->storages()->save($storage);\n // Message\n Flash::success('Storage created successfully');\n }\n\n // Redirect to resource list\n return Redirect::route('storages.index');\n }\n\n // Something went wrong\n return Redirect::back()->withErrors($validator)->withInput(Input::all());\n }", "title": "" }, { "docid": "ec6d262da21079d4f1969481774027a6", "score": "0.6557738", "text": "public function store(ResourceStoreRequest $request)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "c47832a35d324942b82c153c36e19205", "score": "0.6529359", "text": "public function create($storage = null);", "title": "" }, { "docid": "7a008e03ec51a0b31adc684eaf2fd916", "score": "0.651324", "text": "public function store(CreateStorageAPIRequest $request)\n {\n $input = $request->all();\n\n $storages = $this->storageRepository->create($input);\n\n return $this->sendResponse($storages->toArray(), 'Storage saved successfully');\n }", "title": "" }, { "docid": "c8c10c69f24ff56f5e9054d0271d55ee", "score": "0.64884007", "text": "protected function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "98fadc36fd3a4194a25023de21dae9ff", "score": "0.6428514", "text": "public function save($resource);", "title": "" }, { "docid": "fa129c22fa10de6d1193110a7112a319", "score": "0.64097387", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new resource();\n $user = $request->user();\n if (!!$user->resources\n ->where('resource_name', $request->get('resource_name'))\n ->where('path', $request->get('path'))\n ->where('trashed', false)->count()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"400006\"],\n ])->status(400);\n }\n $resource->resource_name = $request->get('resource_name');\n $resource->file = false;\n $resource->path = $request->get('path');\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n $user->resources()->attach($resource->id);\n\n return new ResourceResource(Resource::find($resource->id));\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "5ca3b168620bb43c8e426b5b5e9b4164", "score": "0.6365236", "text": "public function store(Request $request)\n {\n $resource = new Resource;\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n \n\n $resource->save();\n return redirect()->route('resources.show', [$resource->id]);\n }", "title": "" }, { "docid": "27c4a631f3e680f007d86149d1c453b3", "score": "0.6359224", "text": "private function store()\n\t{\n\t\t// Store the instance\n\t\t_MyCache::set($this->getServer(), $this->generateKey(), json_encode($this->aRecord));\n\n\t\t// Reset the changed flag\n\t\t$this->bChanged\t= false;\n\t}", "title": "" }, { "docid": "508f9936cc069ee7a710b93d12ee1beb", "score": "0.63469714", "text": "public function create(IResource $resource);", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "14ea338a622facf6b0551afa1d5d33fb", "score": "0.0", "text": "public function index()\n {\n $events = DailyEvent::orderBy('weekly_id', 'ASC')->orderBy('start_time', 'ASC')->orderBy('end_time', 'ASC')->paginate(PAGINATE);\n return view('admin.events.index')->with(compact('events'));\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\n \n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "1c0c0aefcfbef26445ad6c95b7c7f60c", "score": "0.6501281", "text": "public function index()\n {\n $listings = $this->listings->paginate(15);\n\n return view('backend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "9169a301a1e687b391dc420a75819c41", "score": "0.64856774", "text": "public function index()\n {\n $products = $this->allResources($this->productRepository);\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" }, { "docid": "32e9a450ea4cabeba3749d02f2ef99e6", "score": "0.6473708", "text": "public function actionIndex()\n\t{\n\t\t$theLists = Listt::find()\n\t\t\t->where(['account_id'=>0])\n\t\t\t->orderBy('grouping, sorder, name')\n\t\t\t->asArray()\n\t\t\t->all();\n\t\treturn $this->render('list_index', [\n\t\t\t'theLists'=>$theLists,\n\t\t]);\n\t}", "title": "" } ]
a2a47ae6e4905125373c12aa04fa575e
Retorna a lista de pessoas para o contato telefonico
[ { "docid": "67594b1d1a22fee6f5e2fe0de19ee7c4", "score": "0.0", "text": "public function show(Request $request)\n {\n $data = $request->all(); \n\n $pessoas = $this->pessoas->show($data['inicial'], $data['final'], $data['mailing']);\n\n foreach($pessoas as $pes){\n $pes['pes_nascimento'] = date('d/m/Y', strtotime($pes['pes_nascimento']));\n\n $pes['link'] = \"<a onclick='registrarContatoPessoas($pes->pes_id)' class='btn btn-sm btn-primary' data-toggle='tooltip' title='Registra Contato!' style='margin: 3px;'>\n <span class='glyphicon glyphicon-earphone'></span></a>\n <a onclick='cadastrarDoadorDoacao($pes->pes_id)' class='btn btn-sm btn-success' data-toggle='tooltip' title='Cadastrar como doador!' style='margin: 3px;'>\n <span class='glyphicon glyphicon-user'></span></a>\";\n\n // Telefones\n $pes['telefones'] = '';\n if($pes['pes_tel1']){\n $pes['telefones'] .= \"<a onclick='retirarTelefonePessoas($pes->pes_id, \\\"$pes->pes_tel1\\\", \\\"pes_tel1\\\")' data-toggle='tooltip' title='Apagar telefone da lista!' style='margin:3px;color:red;font-size:11px;'><span class='glyphicon glyphicon-remove'></span></a>\" . $pes['pes_tel1'];\n } \n if ($pes['pes_tel2']) {\n $pes['telefones'] .= \"</br><a onclick='retirarTelefonePessoas($pes->pes_id, \\\"$pes->pes_tel2\\\", \\\"pes_tel2\\\")' data-toggle='tooltip' title='Apagar telefone da lista!' style='margin:3px;color:red;font-size:11px;'><span class='glyphicon glyphicon-remove'></span></a>\" . $pes['pes_tel2'];\n } \n if ($pes['pes_tel3']) {\n $pes['telefones'] .= \"</br><a onclick='retirarTelefonePessoas($pes->pes_id, \\\"$pes->pes_tel3\\\", \\\"pes_tel3\\\")' data-toggle='tooltip' title='Apagar telefone da lista!' style='margin:3px;color:red;font-size:11px;'><span class='glyphicon glyphicon-remove'></span></a>\" . $pes['pes_tel3'];\n } \n if ($pes['pes_tel4']) {\n $pes['telefones'] .= \"</br><a onclick='retirarTelefonePessoas($pes->pes_id, \\\"$pes->pes_tel4\\\", \\\"pes_tel4\\\")' data-toggle='tooltip' title='Apagar telefone da lista!' style='margin:3px;color:red;font-size:11px;'><span class='glyphicon glyphicon-remove'></span></a>\" . $pes['pes_tel4'];\n } \n if ($pes['pes_tel5']){\n $pes['telefones'] .= \"</br><a onclick='retirarTelefonePessoas($pes->pes_id, \\\"$pes->pes_tel5\\\", \\\"pes_tel5\\\")' data-toggle='tooltip' title='Apagar telefone da lista!' style='margin:3px;color:red;font-size:11px;'><span class='glyphicon glyphicon-remove'></span></a>\" . $pes['pes_tel5'];\n }\n\n $pes['info'] = '';\n $pes['flag'] = '';\n\n $ccsDt = $pes->contato;\n if($ccsDt){\n // formata data\n if($ccsDt['ccs_data']){\n $ccsDt['ccs_data'] = date('d/m/Y', strtotime($ccsDt['ccs_data']));\n }\n\n $pes['info'] .= \"<div>Obs.: \" . $ccsDt['ccs_obs'] . \"</div>\";\n $pes['info'] .= \"<div>Data: \" . $ccsDt['ccs_data'] . \"</div>\";\n $pes['info'] .= \"<div>Status: \" . $ccsDt->statusContato->stc_nome . \"</div>\";\n if($ccsDt['ccs_stc_id'] == 3){\n $pes['flag'] = '<a class=\"btn btn-xs btn-danger\" style=\"width:50px;height:25px;\" data-toggle=\"tooltip\" title=\"Não deseja ser Doador!\"></a>';\n } else if ($ccsDt['ccs_stc_id'] == 1){\n $pes['flag'] = '<a class=\"btn btn-xs btn-warning\" style=\"width:50px;height:25px;\" data-toggle=\"tooltip\" title=\"Não Atendeu a ligação!\"></a>';\n } else if ($ccsDt['ccs_stc_id'] == 2){\n $pes['flag'] = '<a class=\"btn btn-xs btn-info\" style=\"width:50px;height:25px;\" data-toggle=\"tooltip\" title=\"Pediu para ligar mais tarde!\"></a>';\n } else if ($ccsDt['ccs_stc_id'] == 4){\n $pes['flag'] = '<a class=\"btn btn-xs btn-success\" style=\"width:50px;height:25px;\" data-toggle=\"tooltip\" title=\"Já é doador!\"></a>';\n } else if ($ccsDt['ccs_stc_id'] == 5){\n $pes['flag'] = '<a class=\"btn btn-xs btn-danger2\" style=\"width:50px;height:25px;\" data-toggle=\"tooltip\" title=\"Já é doador!\"></a>';\n }\n } else {\n $pes['flag'] = '<a class=\"btn btn-xs btn-default\" style=\"width:50px;height:25px; data-toggle=\"tooltip\" title=\"Não houve contato!\"\"></a>';\n $pes['info'] .= '';\n }\n \n }\n\n return $pessoas;\n }", "title": "" } ]
[ { "docid": "586f50b5728eba503a9ea62337b3ea0a", "score": "0.73041356", "text": "public function trovaTelefono() {\n $rec = Recapiti::all ();\n $cpp = CareProvider::all ();\n $all = array ();\n\n foreach ( $cpp as $c ) {\n foreach ( $rec as $r ) {\n if ($c->id_utente == $r->id_utente) {\n array_push ( $all, $r->contatto_telefono );\n }\n }\n }\n return $all;\n }", "title": "" }, { "docid": "952032c6e91fb60961a3364721d14593", "score": "0.6495774", "text": "public function getListPharmacie(){\n \t/*$listeAdresseByVille = new array(); \n \tforeach ($this->getListVille() as $ville) {\n \t\tarray_push($listeAdresseByVille,$ville=>User::select('adresse', 'id')->whereVille($ville)->get();)\n \t}\n \techo \"<br><br><br><br>\".$listeAdresseByVille;*/\n \treturn User::select('ville','id','adresse')->get();\n }", "title": "" }, { "docid": "55e91e71a36f3f301fb0aeca73c58eff", "score": "0.6420879", "text": "public function getPessoas()\n {\n return $this->pessoaRepository->getPessoas();\n }", "title": "" }, { "docid": "976e0debfe9e55c77d638d396e652db8", "score": "0.6358855", "text": "public function listarParticipantesPendentesFiltro(){\n\t\t$cpf = $this->get('cpf');\n\t\t$congressista = $this->get('congressista');\n\t\t$limite = $this->get('limite');\n\t\t\n\t\t\t$sql = \"SELECT c.id_congressista, c.nome, c.cpf \n\t\t\t FROM congressista as c\n\t\t\t \tWHERE c.pagamento = 0\t\t\t \t\n\t\t\t \tAND c.cpf LIKE '%\".$cpf.\"%'\n\t\t\t \tAND c.nome LIKE '%\".$congressista.\"%'\n\t\t\t \tGROUP BY c.id_congressista\n\t\t\t \tORDER BY c.nome ASC \n\t\t\t \tLIMIT \".$limite;\n\t\t\t\n\t\t$result = $this->query($sql);\n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "9f75fee7b34d3136a0c8bb17cc281513", "score": "0.62076896", "text": "function listarEndereco(){\n\t\t$dados = array();\n\t\t$dados[\"enderecos\"] = pegarTodosEderecos();\n\t\texibir(\"endereco/listar\", $dados);\n\n\t}", "title": "" }, { "docid": "9bee7349ba5525382005b9444c4f5579", "score": "0.61619115", "text": "public static function getPersonajesTienda(){\n $personajes = array();\n $app = App::getSingleton();\n $conn = $app->conexionBd();\n $query = sprintf(\"SELECT * FROM personaje\");\n $rs = $conn->query($query);\n if($rs && $rs->num_rows > 0){\n while($fila = $rs->fetch_assoc()){ \n $personaje = new Personaje($fila['id'],$fila['fuerza'],$fila['nombre'],$fila['vida'],$fila['precio'],$fila['rutaImagen'],$fila['w'],$fila['h']);\n array_push($personajes, $personaje);\n }\n $rs->free();\n }\n else{\n echo \"<p>No hay personajes disponibles</p>\";\n }\n return $personajes;\n }", "title": "" }, { "docid": "4725a9031bd0c30ad7deb290e1ee0554", "score": "0.6127242", "text": "public function trovaInformazioni() {\n $persona = CppPersona::all ();\n $cpp = CareProvider::all ();\n $all = array ();\n $i=0;\n\n foreach ( $cpp as $c ) {\n foreach ( $persona as $r ) {\n if ($c->id_utente == $r->id_utente) {\n if ($r->persona_reperibilita != \" \") {\n array_push ( $all, $r->persona_reperibilita );\n } else {\n array_push ( $all, \"--\" );\n }\n }\n }\n }\n return $all;\n }", "title": "" }, { "docid": "9ad1b05a4a41cafdd50c5f9e7b73e0b6", "score": "0.6087022", "text": "public function listarTodos(){\n //Criar a conexao com o banco de dados com o PDO\n $pdo = new PDO(server,usuario,senha);\n //Criar o comando sql\n $smtp = $pdo->prepare('select * from notificacao');\n //Executar o comando no Banco de Dados\n $smtp->execute();\n //Verificar se o comando retornou resultados\n if ($smtp->rowCount() > 0){\n //Retornar os dados para o HTML\n return $result = $smtp->fetchAll (PDO::FETCH_CLASS);\n }\n }", "title": "" }, { "docid": "e562836c13bdf7e8f687ecc5a6883270", "score": "0.60866857", "text": "public function telefonoCppAssociato() {\n $arrayCpp = array ();\n $arrayCpp = CareProvider::all ();\n $arrayPazienti = array ();\n $arrayPazienti = CppPaziente::all ();\n $info = array ();\n $rec = array ();\n\n $rec = Recapiti::all ();\n\n foreach ( $arrayCpp as $c ) {\n foreach ( $arrayPazienti as $r ) {\n if (($c->id_cpp == $r->id_cpp) && ($this->patient->first ()->id_paziente == $r->id_paziente)) {\n foreach ( $rec as $re ) {\n if ($c->id_utente == $re->id_utente) {\n array_push ( $info, $re->contatto_telefono );\n }\n }\n }\n }\n }\n return $info;\n }", "title": "" }, { "docid": "a4769728662e6161d8e15632e77b267b", "score": "0.60363257", "text": "public function listar_pacientes() {\n $db = Zend_Registry::get('pgdb');\n //opcional, esto es para que devuelva los resultados como objetos $row->campo\n $db->setFetchMode(Zend_Db::FETCH_OBJ);\n $select = \"SELECT * FROM paciente\";\n return $db->fetchAll($select);\n }", "title": "" }, { "docid": "cd794e148c9751066f9c0c080f2c3de7", "score": "0.6019556", "text": "public function listarParticipantesPagosFiltro(){\n\t\t$cpf = $this->get('cpf');\n\t\t$congressista = $this->get('congressista');\n\t\t$limite = $this->get('limite');\n\t\t\n\t\t\t$sql = \"SELECT c.id_congressista, c.nome, c.cpf \n\t\t\t FROM congressista as c\n\t\t\t \tWHERE c.pagamento = 1\n\t\t\t \tAND c.cpf LIKE '%\".$cpf.\"%'\n\t\t\t \tAND c.nome LIKE '%\".$congressista.\"%'\n\t\t\t \tGROUP BY c.id_congressista\n\t\t\t \tORDER BY c.nome ASC\n\t\t\t \tLIMIT \".$limite;\n\t\t\t\n\t\t$result = $this->query($sql);\n\t\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "b5849aa557a3ab961b82cbb7e19519f6", "score": "0.60040295", "text": "public function listaPropuestas(){\n $resultado = $this->conexion_db->query('SELECT DISTINCT a.id_conferencia, a.conferencia, a.enlaceEncuesta, a.status, b.nombre,\n b.apellidos, b.localidad FROM conferencia AS a\n INNER JOIN conferencista AS b\n ON a.id_conferencia = b.id_conferencia\n GROUP BY id_conferencia');\n $respuesta = $resultado->fetch_all(MYSQLI_ASSOC);\n return $respuesta;\n }", "title": "" }, { "docid": "7af36049ef4c49eadaccb62be8025018", "score": "0.59957224", "text": "public function listarPacote()\n {\n $this->sql = \"SELECT sql_cache * from vsites_pacotes as p where status='Ativo' order by id_pacote\";\n return $this->fetch();\n }", "title": "" }, { "docid": "9624a8cd29ed6fd8357084372a959fc4", "score": "0.59761345", "text": "public function listarParaJurado() {\n\n\t\t$jurado = $this -> juradoMapper -> findByDNI($_SESSION[\"currentuser\"]);\n\n\t\tif ($jurado -> isJuradoP == \"1\") {//Si es profesional le buscamos sus pinchos\n\t\t\t\n\t\t\t$pinchos = $this -> pinchoMapper -> findAllForJuradoConcreto($jurado);\n\n\t\t\t// manda el array que contiene los pinchos a la vista(view)\n\t\t\t$this -> view -> setVariable(\"pinchos\", $pinchos);\n\t\t\t// renderiza la vista (/view/pinchos/listarJuradoP.php)\n\t\t\t$this -> view -> render(\"pinchos\", \"listarJuradoP\");\n\t\t} else {//Si no le redirigimos al listado normal\n\t\t\t$pinchos = $this -> pinchoMapper -> findAll();\n\n\t\t\t// manda el array que contiene los pinchos a la vista(view)\n\t\t\t$this -> view -> setVariable(\"pinchos\", $pinchos);\n\n\t\t\t// renderiza la vista (/view/pinchos/listar.php)\n\t\t\t$this -> view -> render(\"pinchos\", \"listar\");\n\t\t}\n\t}", "title": "" }, { "docid": "cca75d6caa73128bd8fd78fd24976f6d", "score": "0.5954554", "text": "public function listarParticipantesPagos(){\n\t\t$sql = \"SELECT c.id_congressista, c.nome, c.cpf \n\t\t\t FROM congressista as c\n\t\t\t \tWHERE c.pagamento = 1\n\t\t\t \tORDER BY c.nome\n\t\t\t \tASC LIMIT 10\";\n\t\t$result = $this->query($sql);\n\t\treturn ($result);\n }", "title": "" }, { "docid": "3e1f1b1beda7b7160fa0008e142cc418", "score": "0.59526074", "text": "public function getPegiList() {\n $data = $this->read();\n if(empty($data)){\n $error = $this->db->error();\n return false;\n }\n return $data;\n }", "title": "" }, { "docid": "c4467f4df851e85aa055fe20cdb91cd5", "score": "0.59451246", "text": "public function getAllPersona(){\n return $this->getPersons();\n }", "title": "" }, { "docid": "6974f767c914f617dba34cc7a2c6e800", "score": "0.5939395", "text": "public function ObtenerParetos(){\n\t\theader(\"Content-type: text/javascript\");\n\t\t$resultado = $this->pareto_model->Listar();\n\t\t$i=0;\n\t\tforeach($resultado->result() as $registros){\n\t\t\t$paretos[$i][\"nIdPareto\"]=$registros->nIdPareto;\n\t\t\t$paretos[$i][\"sNombrePareto\"]=$registros->sNombrePareto;\n\t\t\t$i++;\n\t\t}\n\t\techo json_encode($paretos);\n\t}", "title": "" }, { "docid": "abf53661ae4531d9ac887595ef0af43a", "score": "0.5932865", "text": "public function cargaPeticiones() {\r\n $app = Aplicacion::getSingleton();\r\n $conn = $app->conexionBd();\r\n $sql = 'SELECT * FROM friendrequests WHERE idReceiver = '.$this->id.''; // Todas las peticiones que me han enviado a mí\r\n $result = $conn->query($sql);\r\n if ($result->num_rows == 0) return false;\r\n else return $result;\r\n }", "title": "" }, { "docid": "934903de332572f9a16a6c6b910f009f", "score": "0.591024", "text": "public function index()\n {\n $telefones = Telefone::all();\n return $telefones;\n }", "title": "" }, { "docid": "2dc53b2d7a3934703555dc51b16c75a1", "score": "0.5901146", "text": "function listerCommunications()\n\t\t{\n\t\t$sql = \"SELECT annuaire_rel_contact_communication.ID_communication \n\t\t\t\t\t\tFROM annuaire_rel_contact_communication, annuaire_obj_communication, annuaire_typ_communication \n\t\t\t\t\t\tWHERE ID_contact = '\".$this->ID.\"' \n\t\t\t\t\t\tAND annuaire_obj_communication.ID = annuaire_rel_contact_communication.ID_communication\n\t\t\t\t\t\tAND annuaire_obj_communication.ID_communication = annuaire_typ_communication.ID\n\t\t\t\t\t\tORDER BY annuaire_typ_communication.ordre ASC, annuaire_obj_communication.numero ASC\";\n\t\t$result = $this->query($sql);\n\t\twhile($row = $result->fetchRow(DB_FETCHMODE_ASSOC))\n\t\t\t{\n\t\t\t$retour[] = $row['ID_communication'];\n\t\t\t}\n\t\treturn($retour);\n\t\t}", "title": "" }, { "docid": "be0ef4166712dbcc5687c21985fead7f", "score": "0.58928883", "text": "public function listaPuntoControl()\n {\n $puntoControl = DB::table('punto_control as pc')\n ->select('pc.id as idPunto', 'pc.descripcion')\n ->where('pc.organi_id', '=', session('sesionidorg'))\n ->where('pc.estado', '=', 1)\n ->where('pc.controlRuta', '=', 1)\n ->get();\n\n return response()->json($puntoControl, 200);\n }", "title": "" }, { "docid": "d3436bbe141f7136a1f6c4b42ce952fd", "score": "0.5857116", "text": "public function Listar_per()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$result = array();\n\n\t\t\t$statement = $this->pdo->prepare(\"CALL PRO_LIST_PERSONA()\");\n\t\t\t$statement->execute();\n\n\t\t\tforeach($statement->fetchAll(PDO::FETCH_OBJ) as $r)\n\t\t\t{\n\t\t\t\t$per = new Persona();\n\n\t\t\t\t$per->__SET('idPersona', $r->idPersona);\n\t\t\t\t$per->__SET('Documento', $r->Documento);\n\t\t\t\t$per->__SET('Nombre', $r->Nombre);\n\t\t\t\t$per->__SET('ApellidoPaterno', $r->ApellidoPaterno);\n\t\t\t\t$per->__SET('ApellidoMaterno', $r->ApellidoMaterno);\n\t\t\t\t$per->__SET('FechaNacimiento', $r->FechaNacimiento);\n\t\t\t\t$per->__SET('Sexo', $r->Sexo);\n\n\t\t\t\t$result[] = $per;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "c2b60b0c1ecedff7ef796039cb89c0c4", "score": "0.5836507", "text": "function listar_metodos_pago($objeto) {\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tidFormapago AS id, nombre\n\t\t\t\tFROM\n\t\t\t\t\tforma_pago\";\n\t\t$result = $this -> queryArray($sql);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1f83fcbc8841318da52472b34bc89685", "score": "0.5809974", "text": "public function getTiposContrato() {\r\n\t\t$sql = \"select tpcoid,tpcdescricao from tipo_contrato order by tpcdescricao\";\r\n\t\t\r\n\t\t$rs = pg_query ( $this->conn, $sql );\r\n\t\tif (! is_resource ( $rs ))\r\n\t\t\tthrow new Exception ( 'Falha ao consultar tipos de contrato.' );\r\n\t\t\r\n\t\t$arr = pg_fetch_all ( $rs );\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "c1c939aacee2ed648ee4191cc368c9bb", "score": "0.5801114", "text": "function buscaPessoa($string){\n $resultado = [];\n\n global $pessoas;\n\n foreach($pessoas as $pessoa) {\n if(stripos($pessoa[\"nome\"],$string) == true) {\n $resultado[] = $pessoa;\n }\n }\n\n return $resultado;\n}", "title": "" }, { "docid": "308aa021309a379181ed5e29c27b0a79", "score": "0.57988507", "text": "public function getOwnservantList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "7173ecde6e0edf1d510d9e8126726ce9", "score": "0.5790805", "text": "public function listaProvinciasParaSelect()//muestra la lista con todos los datos de nuestras tareas\r\n\t{\r\n\t\t$instruccion = \"SELECT * FROM tbl_provincias\";\r\n\t\t$result=$this->db->query($instruccion);\r\n\t\t\r\n\t\t$provincias=array();\r\n\t\r\n\t\twhile ($fila=$this->db->obtener_fila($result,0))//strm=result\r\n\t\t{\r\n\t\t\t$provincias[$fila['cod']]=$fila['nombre'];\r\n\t\t}\r\n\t\r\n\t\treturn $provincias;\r\n\t}", "title": "" }, { "docid": "28ecc4d5f1ff3e01b8ae9e1813fd996c", "score": "0.57807547", "text": "function get_lista_cuentas_posibles()\n\t{\n\t\t$datos = $this->get_atributos_usuario();\n\t\tif (! empty($datos) && isset($datos[self::$session_usuarios_posibles])) {\n\t\t\treturn $datos[self::$session_usuarios_posibles];\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "3fe3a2191f4d8cd0ae392938837a808e", "score": "0.57789356", "text": "public function getPendentes($data){\n $this->data['inicio'] = '01/' . $data['mesFiltro'] . '/' . $data['anoFiltro'];\n $this->dateToObject('inicio');\n $this->data['fim'] = clone $this->data['inicio'];\n $this->data['fim']->add(new \\DateInterval('P1M'));\n $this->data['fim']->sub(new \\DateInterval('P1D'));\n $this->data['administradora'] = $data['administradora'];\n \n $orcamento = $this->em->getRepository(\"Livraria\\Entity\\Orcamento\")->getPendentes($this->data);\n $renovacao = $this->em->getRepository(\"Livraria\\Entity\\Renovacao\")->getPendentes($this->data);\n \n \n $lista = array_merge($orcamento, $renovacao);\n $ordena = [];\n foreach ($lista as $key => $value) {\n $ordena[$key] = $value['locatario']['nome'];\n }\n \n array_multisort($ordena, SORT_ASC, SORT_STRING, $lista);\n //Armazena lista no cache para gerar outra saidas\n $this->getSc()->lista = $lista;\n \n return $lista;\n }", "title": "" }, { "docid": "3224f1426c0e1b77a98294de4fea5342", "score": "0.5775389", "text": "public function cargoParticipantsList() {\n $cargoParticipantsList = array(\n '' => 'Selecione',\n 'Advogado' => 'Advogado',\n 'Analista' => 'Analista',\n 'Arquiteto' => 'Arquiteto',\n 'Assessor' => 'Assessor',\n 'Assistente' => 'Assistente',\n 'Auxiliar' => 'Auxiliar',\n 'Chefe' => 'Chefe',\n 'Consultor' => 'Consultor',\n 'Controller' => 'Controller',\n 'Coordenador' => 'Coordenador',\n 'Diretor' => 'Diretor',\n 'Encarregado' => 'Encarregado',\n 'Engenheiro' => 'Engenheiro',\n 'Estagiário' => 'Estagiário',\n 'Executivo' => 'Executivo',\n 'Gerente' => 'Gerente',\n 'Gestor' => 'Gestor',\n 'Inspetor' => 'Inspetor',\n 'Jornalista' => 'Jornalista',\n 'Outros' => 'Outros',\n 'Presidente' => 'Presidente',\n 'Responsável' => 'Responsável',\n 'Sócio - Diretor' => 'Sócio - Diretor',\n 'Sócio - Empreendedor' => 'Sócio - Empreendedor',\n 'Sócio - Gerente' => 'Sócio - Gerente',\n 'Superintendente' => 'Superintendente',\n 'Superintendente Adjunto' => 'Superintendente Adjunto',\n 'Supervisor' => 'Supervisor',\n 'Técnico' => 'Técnico',\n 'Trainee' => 'Trainee',\n 'Vice - Presidente' => 'Vice - Presidente'\n );\n\n return $cargoParticipantsList;\n }", "title": "" }, { "docid": "c9384c6808204c1f92d0b46ed87ec818", "score": "0.5768645", "text": "public function listAll() {\n require_once('db.class.php');\n $objDb = new db();\n $link = $objDb->conecta_mysql();\n \n $sql = \" SELECT receptaculo, pecas FROM CONTEM\";\n \n $resultado = mysqli_query($link, $sql);\n \n if($resultado){\n \n $peca = [];\n while($registro = mysqli_fetch_array($resultado, MYSQLI_ASSOC)){\n $pec = new Contem();\n $pec->construtor($registro['receptaculo'], $registro['pecas']);\n array_push($peca, $pec);\n }\n \n return $peca;\n \n \n } else {\n echo 'Erro ao executar a query';\n }\n }", "title": "" }, { "docid": "27458ca3a21b8ec1e8d97b7854b09973", "score": "0.576782", "text": "function listar_pedidos_persona($objeto) {\n\t\t$sql = \"SELECT \n\t\t\t\t\ta.id, a.idproducto, SUM(a.cantidad) AS cantidad, b.nombre, \n\t\t\t\t\tROUND(b.precio, 2) AS precio, opcionales, adicionales, sin, a.status, a.complementos, a.id_promocion,\n\t\t\t\t\t(CASE a.id_promocion \n\t\t\t\t\t\tWHEN 0 THEN\n\t\t\t\t\t\t\t'producto'\n\t\t\t\t\t\tELSE a.id END) as tipin\n\t\t\t\tFROM \n\t\t\t\t\tcom_pedidos a \n\t\t\t\tLEFT JOIN \n\t\t\t\t\t\tapp_productos b \n\t\t\t\t\tON \n\t\t\t\t\t\tb.id = a.idproducto\n\t\t\t\tWHERE \n\t\t\t\t\ta.dependencia_promocion = 0 \n\t\t\t\tAND\n\t\t\t\t\tcantidad > 0\n\t\t\t\tAND\n\t\t\t\t\torigen = 1\n\t\t\t\tAND \n\t\t\t\t\ta.npersona = \".$objeto['persona'].\"\n\t\t\t\tAND \n\t\t\t\t\ta.idcomanda = \" . $objeto['id_comanda'] . \" \n\t\t\t\tGROUP BY \n\t\t\t\t\t\ta.id, tipin, status, a.idproducto, a.opcionales, a.adicionales, a.complementos\";\n\t\t$result = $this -> queryArray($sql);\n\t\t//print_r($sql);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "7097cd5887eba594224a611bd0159546", "score": "0.5757984", "text": "public function listaTiposPagos()\n {\n $tipospagos = TipoPago::where('pago' , '<>', 'DEFECTO')->get();\n\n return $tipospagos;\n }", "title": "" }, { "docid": "ded26c2d9de8fd5beb56e9efd5327cef", "score": "0.575278", "text": "public function getPhones()\n {\n if ($this->validatePadre() == false) {\n return Redirect::route('home');\n }else{\n $data2['Phones'] = DB::table('Usuarios_Telefonos as UT')\n ->select('UT.Telefono', 'UT.Cedula')\n ->where('U.Codigo_Familia', '=', Auth::user()->Codigo_Familia)\n ->join('Usuarios AS U','U.Cedula','=','UT.Cedula')\n ->get(); \n return Response::json($data2);\n }\n }", "title": "" }, { "docid": "d2f58e47732c59d3803c874a19a53061", "score": "0.5752195", "text": "function get_puestos() {\n // Create a temporary user object\n $e = new Puesto();\n $e->where('estatus_general_id', \"1\");\n\n //Buscar en la base de datos\n $e->get();\n if ($e->c_rows > 0) {\n return $e;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "8e4dcff25fb1abb9eb0b0284a6e9fb08", "score": "0.57475525", "text": "public function getAgendaProntuarios() {\n $sql = $this->prepare('select * from tb_agends_pronts');\n $sql->execute();\n \n $lista = array();\n \n if($sql->execute()) {\n while($dados = $sql->fetch(PDO::FETCH_OBJ)) {\n $agendaprontuario = new AgendaProntuario();\n \n $agendaprontuario->setId($dados->$id);\n $agendaprontuario->setId_Prontuario($dados->$id_prontuario);\n $agendaprontuario->setId_Agendamento($dados->$id_prontuario);\n \n $lista[] = $agendaprontuario;\n }\n } else {\n echo $sql->erroCode();\n return null;\n }\n \n return $lista;\n }", "title": "" }, { "docid": "f2c11f8219813324156b0d7c20cb6b12", "score": "0.57445467", "text": "public function getAllpersonne() {\n\t\t$listePersonnes = array();\n\t\t$requete = $this->db->prepare(\"SELECT per_num, per_nom, per_prenom, per_tel, per_mail, per_login, per_pwd\n\t\t\tFROM personne ORDER BY per_nom\");\n\t\t$requete->execute();\n\t\twhile ($personne = $requete->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$listePersonnes[] = new Personne($personne);\n\t\t}\n\t\treturn $listePersonnes;\n\t}", "title": "" }, { "docid": "566d65a98441451aac3f9aa83a2202e9", "score": "0.5729164", "text": "public function listaContato()\r\n {\r\n //Chama o método que seleciona todos os registros\r\n $list = $this->contatoDAO->selectAllContato();\r\n \r\n if($list)\r\n return $list;\r\n else\r\n die();\r\n }", "title": "" }, { "docid": "d8cb09546a192b9e378464f93534e4f4", "score": "0.5726018", "text": "function listar_tipos() \n {\n return orm::find(orm::tipo_maquina,[\n \"conexion\" => $this->db,\n \"cabeceras\" => false,\n \"json\" => true\n ]);\n }", "title": "" }, { "docid": "13f23a0431c4636c8d14a1e943a750be", "score": "0.56930697", "text": "public function listarPessoasProprietariosAutoCompleteJSON(Pessoa $Pessoa){\r\n\t\r\n\t\t$arrayCampos = array(\r\n\t\t\t\t\"co_pessoa\",\r\n\t\t\t\t\"no_pessoa\"\r\n\t\t);\r\n\t\t\t\r\n\t\t$res = $this->connBanco->selecionar(\"tb_pessoa\", $arrayCampos, \"no_pessoa like '%\" . $Pessoa->getNoPessoa(). \"%'\", \"\", \"\", \"\", FALSE);\r\n\t\t\t\r\n\t\tif ($res) {\r\n\t\t\treturn $res;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "edaf15b43c4f9fea1dc2dc7125618f81", "score": "0.56831765", "text": "public function getPokemons()\n\t{\n\t\t\n\t\treturn [\n\t\t\t['Salamèche', 100, Type::TYPE_FIRE, $this->getReference('Flamèche')],\n\t\t\t['Carapuce', 100, Type::TYPE_PLANT, $this->getReference(\"Tranch'herb\")],\n\t\t\t['Bulbizare', 100, Type::TYPE_WATER, $this->getReference('Pistolet à O')],\n\t\t\t['Dracaufeu', 100, Type::TYPE_NORMAL, $this->getReference('Acier')]\n\t\t];\n\t}", "title": "" }, { "docid": "1b1b888c863c66b09ddab18bd76aaf83", "score": "0.56798196", "text": "public function getTiposContato()\n {\n $tiposContato = $this->tipoContatoBO->getTiposContato();\n\n return $this->toJson($tiposContato);\n }", "title": "" }, { "docid": "9d1e88dfd92a1083d4c77f61221a0c35", "score": "0.5672698", "text": "private function GetLista(){\n $i = 1;\n //eu estou chamando o meu metodo listar dados da classe conexão\n while($lista = $this->ListarDados()):\n $this->itens[$i] = array(\n 'idProduto'=> $lista['id_Produto'],\n 'nomeProduto' => $lista['nomeProduto'],\n 'referencia' => $lista['referencia'],\n 'custo' => 'R$ ' . str_replace(\".\", \",\", $lista['custo']),\n 'venda' => 'R$ ' . str_replace(\".\", \",\", $lista['venda']),\n 'lucro' => 'R$ ' . str_replace(\".\", \",\", $lista['lucro'])\n );\n $i++;\n endwhile;\n }", "title": "" }, { "docid": "c9f73a2fc7e24231e8ae34cf2bae5aa7", "score": "0.56707525", "text": "public function getListOtsOtPadreEmail() {\n $condicion = \" \";\n if (Auth::user()->n_role_user == 'ingeniero') {\n $usuario_session = Auth::user()->k_id_user;\n $condicion = \" AND otp.k_id_user = $usuario_session \";\n }\n $query = $this->db->query(\"\n SELECT\n otp.k_id_ot_padre, otp.n_nombre_cliente, otp.orden_trabajo,\n otp.servicio, REPLACE(otp.estado_orden_trabajo,'otp_cerrada','Cerrada') AS estado_orden_trabajo, otp.fecha_programacion,\n otp.fecha_compromiso, otp.fecha_creacion, otp.k_id_user, user.n_name_user,\n CONCAT(user.n_name_user, ' ' , user.n_last_name_user) AS ingeniero,\n otp.lista_observaciones, otp.observacion, SUM(oth.c_email) AS cant_mails, hitos.id_hitos, otp.finalizo, otp.ultimo_envio_reporte,\n CONCAT('$ ',FORMAT(oth.monto_moneda_local_arriendo + oth.monto_moneda_local_cargo_mensual,2)) AS MRC\n FROM ot_hija oth\n INNER JOIN ot_padre otp ON oth.nro_ot_onyx = otp.k_id_ot_padre\n INNER JOIN user ON otp.k_id_user = user.k_id_user\n LEFT JOIN hitos ON hitos.id_ot_padre = otp.k_id_ot_padre\n $condicion\n GROUP BY nro_ot_onyx\n HAVING cant_mails > 0\n ORDER BY cant_mails DESC\n \");\n return $query->result();\n }", "title": "" }, { "docid": "87e9635507786398a9978caa6bffedb8", "score": "0.5670225", "text": "public function trovaRuolo() {\n $ruolo = User::all ();\n $cpp = CareProvider::all ();\n $all = array ();\n\n foreach ( $cpp as $c ) {\n foreach ( $ruolo as $r ) {\n if ($c->id_utente == $r->id_utente) {\n array_push ( $all, $r->id_tipologia );\n }\n }\n }\n return $all;\n }", "title": "" }, { "docid": "a0aa07c909b7fc15a8ddda814a71c48c", "score": "0.5664809", "text": "public function Traer()\n {\n $televisores = array();\n $objetoAccesoDato =AccesoDatos::DameUnObjetoAcceso();\n $consulta = $objetoAccesoDato->RetornarConsulta(\"SELECT * FROM televisores\");\n $consulta->execute();\n\n while($fila = $consulta->fetch())\n {\n $tele= new Televisor($fila[1], $fila[2], $fila[3], $fila[4]); //no guardo el id\n array_push($televisores, $tele);\n }\n return $televisores;\n }", "title": "" }, { "docid": "b52b0a189dfc6eef23a31cb59abaf2f8", "score": "0.56603634", "text": "public function getOppilas(){\n // return-komento palautaa ominaisuuden sisällön.\n return $this->etunimi . \", \" . $this->sukunimi . \", \" . $this->kotiosoite . \", \" . $this->email; \n }", "title": "" }, { "docid": "3aa499533c50e0b0862168c58c2466b0", "score": "0.56601983", "text": "public function index()\n {\n $telefonos = Telefono::with(['status'])\n ->get();\n \n return $telefonos;\n\n }", "title": "" }, { "docid": "f4483a856dfb775ac1c180040df4fbd8", "score": "0.56558514", "text": "public function getPortalesLista() {\n $aIni = array();\n $aPor = $this->getPortales();\n $sIni = \"\";\n foreach ($aPor as $portal) {\n if($portal != $sIni) {\n $aIni[] = $portal;\n }\n $sIni = $portal;\n }\n return $aIni;\n }", "title": "" }, { "docid": "758835aea4669ad077c41d9ff646938b", "score": "0.5642964", "text": "public function list_Perfil(){\n\t\t$resultado = null;\n\t\t$modelo = new conexion();\n\t\t$conexion = $modelo->get_conexion();\n\t\t$sql = \"SELECT pefid, pefnom FROM perfil;\";\n\t\t$result = $conexion->prepare($sql);\n\t\t$result->execute();\n\t\twhile($f=$result->fetch()){\n\t\t\t$resultado[]=$f;\n\t\t}\n\t\treturn $resultado;\n\t}", "title": "" }, { "docid": "616ec57d25d17e921ed3fc64982d914c", "score": "0.56406474", "text": "public function getPortales() {\n return $this->getDatos(0);\n }", "title": "" }, { "docid": "c6ec45d4f8d42ee59f3b2df5e09bf2d3", "score": "0.5640624", "text": "static public function listarPacientes()\n\t{\n\t\t$bd = new Conexion();\n\t\t$parametros = array(\"table\" => Paciente::TABLA, \"fields\" => Paciente::CAMPOS_TABLA);\n\t\t$filas = $bd->select($parametros);\n\t\t$pacientes = array();\n\t\tforeach($filas as $fila)\n\t\t{\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t$pacientes[] = new Paciente($fila->idPac_pk, $fila->run, $fila->nombre, $fila->apellidoP, $fila->apellidoM, $fila->direccion, $fila->telefono, $fila->email, $fila->fechaNac, $fila->fechaPrimeraCita, $fila->sexo, $fila->celular, $fila->prevision, $fila->ocupacion, $fila->derivadoPor, $fila->alergia, $fila->seguroSalud);\n\t\t}\n\t\treturn $pacientes;\n\t}", "title": "" }, { "docid": "a87a42263a22e87f055632a7278fe59a", "score": "0.56350374", "text": "public function getLesChauffeurs(){\n\t\t$req = \"select id, nom, prenom, tel, mail, adresse from pgcovchauffeur\";\n var_dump($req);\n\t\t$rs = self::$monPdo->query($req);\n\t\t$lesLignes = $rs->fetchAll();\n \n\t\treturn $lesLignes;\n\t}", "title": "" }, { "docid": "ffc6e0c8604a50dfb11b8a3844c7f29a", "score": "0.5622975", "text": "public function getPisos() {\n return $this->getDatos(1);\n }", "title": "" }, { "docid": "21a558be6fb0e0e4af1dd4bd89d87ad1", "score": "0.5621375", "text": "public function listar() {\n $sentencia = $this->bd->prepare(\"SELECT * FROM medicamento\");\n $sentencia->execute();\n return $sentencia->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "46a6af1a5207a1bdedc04443a25a6e9f", "score": "0.56105006", "text": "function listadoNoticias() {\n\t\tglobal $conn;\n\t\ttry {\n\t\t\t$sc = \"Select * From noticias Order By ID_NOTICIA\";\n\t\t\t$stm = $conn->prepare($sc);\n\t\t\t$stm->execute();\n\t\t\treturn ($stm->fetchAll(PDO::FETCH_ASSOC));\n\t\t} catch(Exception $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "3ce819ec20565e2cfc6bd271300ed3fd", "score": "0.56098396", "text": "public function get_cptos($data) //listo\n\t{\n\t\t//$sql=$this->db->query(\"SELECT * FROM memoria_gastos where {$data['id_proyecto']} = id_proyecto\");\n\t\t$sql = $this->db->get_where('memoria_gastos', $data);\n\t\treturn $sql->result();\n\t}", "title": "" }, { "docid": "6e450cece1b68b352056affdae85599b", "score": "0.56031525", "text": "public function getOtros_apellido()\n {\n return $this->otros_apellido;\n }", "title": "" }, { "docid": "8d9e0e4e669ba045c001e6c84350053b", "score": "0.559593", "text": "public function getTelUsers()\n {\n return $this->telUsers;\n }", "title": "" }, { "docid": "592d1b33c47651a65b86cb64bb68c64e", "score": "0.55943525", "text": "function listarReportes() {\n\t\t\t$consulta = 'SELECT * FROM reportes, usuarios where reportes.tecnico = usuarios.id';\n\t\t\t$resultado = parent::ejecutarConsulta($consulta);\n\t\t\treturn $resultado;\n\t\t}", "title": "" }, { "docid": "ec01c594143cfb8fcfe7d49651706e8c", "score": "0.5592713", "text": "function lista(){\n\t\t//$where=($_REQUEST['lista']>'')?\" AND \".$_REQUEST['lista'].\".bestado='1'\":\"\"; \n if($_REQUEST['filtro']>''){\n if(is_numeric($_REQUEST['filtro'])){\n $where=\" and pers_dni like '\".$_REQUEST['filtro'].\"%'\";\n }else{\n $where=\" and pers_apepat like '%\".$_REQUEST['filtro'].\"%'\";\n }\n }\n\t\t$sql=\"SELECT *,\t\t\t\t\n\t\t(SELECT ubigeo_nombre FROM ubigeo WHERE ubigeo_id=persona.pers_nacionalidad) AS pers_nacionalidad,\n\t\t(SELECT ubigeo_nombre FROM ubigeo WHERE ubigeo_id=persona.pers_dir_pais) AS pers_dir_pais,\n\t\t(SELECT alias FROM pers_sexo WHERE pers_sexo_id=persona.pers_sexo_id) AS pers_sexo\n\t\tFROM persona \".$inner.\" WHERE persona.bestado='1'\".$where.\" order by pers_apepat\";\n\t\t//return qryPaginada($sql,true);\n $result = mysql_query($sql);\n\t\twhile($row=mysql_fetch_array($result,1)){$prg[]=$row;}\t\t\n\t\treturn $prg;\n\t}", "title": "" }, { "docid": "830da61da3b6f487eefe460abb863c1e", "score": "0.5592711", "text": "public function getInfoList() {\n\t\tif ($this->language == 'english') {\n\t\t\t$query = 'SELECT TIT_EN, CONT_EN FROM PERSONAL_INFO ORDER BY ORDEN';\n\t\t}\n\t\telse if ($this->language == 'espanol') {\n\t\t\t$query = 'SELECT TIT_ES, CONT_ES FROM PERSONAL_INFO ORDER BY ORDEN';\n\t\t\tmysql_query(\"SET NAMES 'utf8'\");\n\t\t}\n\t\t\n\t\t$result = mysql_query($query) or die('Consulta fallida: ' . mysql_error());\n\n\t\t// Imprimir los resultados en HTML\n\t\twhile ($line = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t\techo \"<p><strong>$line[0]:</strong> $line[1]</p>\";\n\t\t}\n\t\t\n\t\t// Liberar resultados\n\t\tmysql_free_result($result);\n\t}", "title": "" }, { "docid": "1934af741c04cd86d18db8e5ebbc0825", "score": "0.55905443", "text": "public function listar(){\n\t\t\t$conexion = new Conexion();\n\n\t\t\ttry {\n\t\t\t\t$cnn = $conexion->getConexion();\n\t\t\t\t$sql = \"SELECT idcliente, nombres, apellidopaterno, apellidomaterno, email, celular, dni, direccion, contrasena \n\t\t\t\t\t\tFROM cliente WHERE estado = 1;\";\n\t\t\t\t$statement=$cnn->prepare($sql);\n\t\t\t\t$statement->execute();\n\n\t\t\t\t$data[\"data\"] = [];//arreglo vacio\n\t\t\t\twhile($resultado = $statement->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t\t$data[\"data\"][] = $resultado;\n\t\t\t\t}\n\t\t\t\techo json_encode($data);\n\t\t\t}catch (Throwable $e) {\n\t\t\t\treturn $e->getMessage();\n\t\t\t}finally{\n\t\t\t\t$statement->closeCursor();\n\t\t\t\t$conexion = null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c404b50aa12f6734d4d9bf847545e7d3", "score": "0.55873245", "text": "public function listarTodo()\n {\n $query = \"SELECT * FROM personas\";\n $resultados = array();\n\n $resultados = $this\n ->baseUtil\n ->listarDesdeTabla($query, null, null);\n return $this->procesarRegistros($resultados);\n\n }", "title": "" }, { "docid": "46efa6f5dddb5a280bb287801b026c1d", "score": "0.5574391", "text": "public function listar(){\n log_message('DEBUG','#TRAZA | TRAZ-COMP-ALMACENES | Establecimientos | listar()');\n $empr_id = empresa();\n $url = REST_ALM.'/establecimientos/empresa/'.$empr_id;\n $array = $this->rest->callAPI(\"GET\",$url);\n $resp = json_decode($array['data']);\n return $resp;\n }", "title": "" }, { "docid": "7f2b31c50cd5e7afb4d1e987031aee89", "score": "0.557168", "text": "public function pesquisarListaEmailResponsavel(stdClass $parametros = null, $ultimoRegistro = false) {\r\n $condicoes = array();\r\n $resultadoPesquisa = array();\r\n\r\n $this->parametros->usuario = isset($parametros->usuario) ? $parametros->usuario : false;\r\n $this->parametros->email = isset($parametros->email) ? $parametros->email : false;\r\n if ($this->parametros->usuario) {\r\n $condicoes[] = \"nm_usuario ILIKE ('\" . $this->parametros->usuario . \"%')\";\r\n }\r\n if ($this->parametros->email) {\r\n $condicoes[] = \"usuemail = '\" . $this->parametros->email . \"' \";\r\n }\r\n\r\n $sql = \"SELECT\r\n \t\t\t\t\tcferoid,\r\n \t\t\t\t\tcd_usuario,\r\n \t\t\t\t\tnm_usuario,\r\n CASE \r\n WHEN usuemail IS NOT NULL THEN\r\n usuemail\r\n ELSE\r\n ''\r\n END as usuemail\r\n \t\t\t\t\t\r\n \t\t\tFROM\r\n \t\t\t\t\tcredito_futuro_email_responsavel\r\n \t\t\tJOIN \r\n \t\t\t\t\tusuarios ON cd_usuario = cferusuoid\r\n \";\r\n if (count($condicoes) > 0) {\r\n $sql .=\" WHERE \" . implode(\" AND \", $condicoes);\r\n }\r\n\r\n $sql .= $ultimoRegistro ? \" ORDER BY cferoid DESC LIMIT 1\" : \" ORDER BY nm_usuario ASC\";\r\n\r\n if ($resultado = pg_query($sql)) {\r\n\r\n if (pg_num_rows($resultado) == 1) {\r\n \r\n $usuario = pg_fetch_object($resultado);\r\n \r\n $retorno->usuario = $usuario;\r\n $retorno->motivo = $this->buscarMotivoCreditoResponsavel($usuario->cd_usuario);\r\n return $retorno;\r\n }\r\n\r\n if (pg_num_rows($resultado) > 0) {\r\n \r\n $i = 0;\r\n \r\n while ($objeto = pg_fetch_object($resultado)) { \r\n $resultadoPesquisa[$i]['usuario'] = $objeto;\r\n $resultadoPesquisa[$i]['motivo'] = $this->buscarMotivoCreditoResponsavel($objeto->cd_usuario);\r\n $i++;\r\n }\r\n }\r\n }\r\n\r\n return $resultadoPesquisa;\r\n }", "title": "" }, { "docid": "ed50b6cebd46b8d14979a0c814052627", "score": "0.5567987", "text": "function listarTipoProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_tipo_proceso_caja_sel';\n\t\t$this->transaccion='TES_PRCJ_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_tipo_proceso_caja','int4');\n\t\t$this->captura('visible_en','varchar');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('codigo_wf','varchar');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('codigo_plantilla_cbte','varchar');\n\t\t$this->captura('codigo','varchar');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "53d91822ae85053178c6c05ec1f9aed4", "score": "0.5562959", "text": "public function lst_proyectos()\n {\n \t$redmineConnectionAPI = new EasyRedmineConn();\n\t\t$listaProyectos = array();\n\t\t$listaProyectos = $redmineConnectionAPI->lst_proyectos();\n\t\tif(is_null($listaProyectos))\n\t\t{\n\t\t\treturn view('aplicacionOTS.paginaDeError');\n\t\t}\n\t\treturn view('aplicacionOTS.proyectos',[ 'listaProyectos' => $listaProyectos ]);\n }", "title": "" }, { "docid": "de1aa1b62e88643866d2550c771fcb2a", "score": "0.55608547", "text": "public function listarTipos(){\n//\t\t$this->values = array();\n//\t\treturn $this->fetch();\n\t\t$tipo1->id = 1;\n\t\t$tipo2->id = 1;\n\t\t\n\t\treturn array($tipo2,$tipo2);\n\t}", "title": "" }, { "docid": "ff06c6b92c824e8afc3931b509768635", "score": "0.5557126", "text": "function listarCorrespondenciaFisicaEmitida(){\n\t\t//Definicion de variables para ejecucion del procedimientp\n\t\t$this->procedimiento='corres.ft_correspondencia_sel';\n\t\t$this->transaccion='CO_CORFIEM_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setParametro('id_funcionario_usuario','id_funcionario_usuario','int4');\n\n\t\t$this->captura('tiene','text');\n\t\t$this->captura('id_correspondencia','int4');\n\t\t$this->captura('numero','varchar');\n\t\t$this->captura('fecha_documento','date');\n\t\t$this->captura('ruta_archivo','varchar');\n\t\t$this->captura('estado_fisico','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\n\t}", "title": "" }, { "docid": "bfc5fddaac1b75fbc921fe5e959a04cd", "score": "0.55565804", "text": "function do_get_pois_list(){\n\tglobal $db;\n\t///TODO: SPRAWDZANIE UPRAWNIEŃ\n\tif(!isset($_POST['mapid'])||!isset($_POST['pois'])||!preg_match('/^[0-9]{1,5}$/',$_POST['mapid']))\n\t\treturn do_error('Malformed request');\n\telse{\n\t\t$mapid = (int)$_POST['mapid'];\n\t\t\n\t\t$q = array(\n\t\t\t'status' => 'SUCCESS',\n\t\t\t'mapid' => $mapid,\n\t\t\t'pois' => array()\n\t\t);\n\t\t\n\t\t$pois = $_POST['pois'];\n\t\t$query = $db->prepare('SELECT a.id, a.title, a.description, a.position[0] AS lat, a.position[1] AS lng, b.name AS style, c.rank-1 AS pinid FROM pois a LEFT JOIN pins_styles b ON b.id = a.style LEFT JOIN pins_ordered c ON c.id = a.pinid WHERE a.mid = :mapid');\n\t\t$query->bindValue(':mapid', $mapid, PDO::PARAM_INT);\n\t\tif($query->execute()===false)\n\t\t\treturn do_error('PIOTRUŚ :)');\n\t\t\t\n\t\twhile($row=$query->fetch())\n\t\t\tif(in_array((int)$row['id'], $pois)){\n\t\t\t\t$q['pois'][$row['id']] = array(\n\t\t\t\t\t'title'=>$row['title'],\n\t\t\t\t\t'desc'=>$row['description'],\n\t\t\t\t\t'lat'=>(float)$row['lat'],\n\t\t\t\t\t'lng'=>(float)$row['lng'],\n\t\t\t\t\t'look'=>array(\n\t\t\t\t\t\t'type'=>'pin',\n\t\t\t\t\t\t'style'=>$row['style'],\n\t\t\t\t\t\t'pin'=>$row['pinid']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\treturn $q;\n\t}\n}", "title": "" }, { "docid": "2f20f4fc1a9d40a16584f85162828874", "score": "0.55507964", "text": "public function listar() {\n\t\t$pinchos = $this -> pinchoMapper -> findAll();\n\n\t\t// manda el array que contiene los pinchos a la vista(view)\n\t\t$this -> view -> setVariable(\"pinchos\", $pinchos);\n\n\t\t// renderiza la vista (/view/pinchos/listar.php)\n\t\t$this -> view -> render(\"pinchos\", \"listar\");\n\n\t}", "title": "" }, { "docid": "6d8ce3944d6edd1ea806b05bf0ffc092", "score": "0.55506915", "text": "function getDeptos(){\r\n\t\t//consulta todas as areas dos usuarios distintas\r\n\t\t$r = getAreasFromUsers();\r\n\t\t//coloca as areas em um array\r\n\t\tforeach ($r as $dep) {\r\n\t\t\t$deptos[] = $dep['area'];\r\n\t\t}\r\n\t\t//retorna o array\r\n\t\treturn $deptos;\r\n\t}", "title": "" }, { "docid": "f2c883bcd7284a531aaf0688eca608ab", "score": "0.55490166", "text": "public function Listar() {\n $lista = Cliente::where('estado','=','1')->orderBy('nombres')->get();\n $data = array();\n\n foreach ($lista as $value) {\n\n $data[] = [\"nombres\" => $value->nombres, \"apellidos\" => $value->apellidos, \"ci\" => $value->ci,\n \"correo\" => $value->correo, \"direccion\" => $value->direccion, \"telefono\" => $value->telefono,\n \"user\" => $value->user];\n }\n return $data;\n }", "title": "" }, { "docid": "3b8d4081b571ef393d6269fc4a445002", "score": "0.5547795", "text": "public function getPasantes(){\n // $dato = $this->model_pasante->getPostulados();\n // echo json_encode($dato);\n }", "title": "" }, { "docid": "51549905166ccb57956f8cb282d5b691", "score": "0.55451286", "text": "public function listar()\n {\n $sql=\"SELECT a.idusuario,c.PERnombre,c.PERapellidos,b.TCUnombre,a.Ulogin,\n a.Uclave,a.Uimagen,a.Uestado FROM usuario a INNER JOIN persona c \n ON a.idpersona=c.idpersona INNER JOIN tipocargousuario b ON a.idtipocargousu=b.idtipocargousu\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "5daefddeac0c133c92e22fe5a4349c91", "score": "0.55418926", "text": "public function getList()\r\n\t{\r\n\t\t$data = array(\r\n\t\t\t'phone' => '+30123456789',\r\n\t\t\t'email' => 'email@domain',\r\n\t\t);\r\n\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "37b96fea3c7c0dd7cca5292bb54b088c", "score": "0.5538749", "text": "public function listar($tipo)\n\t {\n\t \t$this->_tipo = intval($tipo);\n\t \t/*$this->_sql = \"SELECT paciente.*, cuentahabiente.nombre AS nombre_Cuenta FROM paciente, cuentahabiente WHERE Id_Paciente>=1 AND paciente.Id_Cuenta=cuentahabiente.Id_Cuenta ORDER BY paciente.Id_Paciente ASC;\";\n\t \t*/\n\t \t$this->_sql = \"SELECT pp.*, p.Id_Paciente as paciente, p.Nombre as nombre, p.Apellidop as ap1, p.Apellidom as ap2, pa.nombre AS nombre_Paquete FROM paciente_paquete pp join paciente p on (pp.Id_Paciente=p.Id_Paciente) join paquetes pa on (pp.Clave_Paquete=pa.Clave_Paquete) WHERE pp.ClavePP>=1 ORDER BY pp.ClavePP ASC\";\n\t \t\n\t \treturn $this->sentenciaSQL($this->_sql,$this->_tipo);\n\t }", "title": "" }, { "docid": "c177995997fe5e1a11877571688bcd04", "score": "0.5537082", "text": "public function createPhones(){\n return array (\"phone1\",\"phone2\",\"phone n...\");\n }", "title": "" }, { "docid": "c177995997fe5e1a11877571688bcd04", "score": "0.5537082", "text": "public function createPhones(){\n return array (\"phone1\",\"phone2\",\"phone n...\");\n }", "title": "" }, { "docid": "c177995997fe5e1a11877571688bcd04", "score": "0.5537082", "text": "public function createPhones(){\n return array (\"phone1\",\"phone2\",\"phone n...\");\n }", "title": "" }, { "docid": "c9dadaa0f26a9d314d02028ad8c14b82", "score": "0.5535219", "text": "function getPedidos(){\n $sentencia = $this->db->prepare(\"SELECT * FROM solicitud_retiro\");\n $sentencia->execute();\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "d024eee997f4163b11085d46e2064176", "score": "0.55286795", "text": "public function PesquisarTodos()\n {\n try {\n /* Sql de pesquisa, seleciona todos os campos da tabela contato\n e ordena pelo nome de forma ascendente */\n $sql = \"select id, nome, numero, endereco from contato order by nome ASC\";\n\n /* Cria um array vazio */\n $contatos = array();\n\n /* Cria uma variavel que rescebe o conjunto de itens resultantes\n da execução do sql construido acima */\n $itens = $this->banco->ExecuteQuery($sql);\n\n /* Laço de repetição */\n foreach ($itens as $item) {\n /* Cria um novo objeto agenda */\n $agenda = new Agenda();\n /* Seta os valores do item trazido do banco de dados no novo agenda */\n $agenda->setId($item[\"id\"]);\n $agenda->setNome($item[\"nome\"]);\n $agenda->setNumero($item[\"numero\"]);\n $agenda->setEndereco($item[\"endereco\"]);\n\n /* Adiciona o novo contato ao array criado anteriormente */\n $contatos[] = $agenda;\n }\n /* Retorna o array com todos os contatos encontrados no banco de dados*/\n return $contatos;\n } catch (PDOException $e) {\n if ($this->debug) {\n echo \"Error: {$e->getMessage()}\";\n }\n }\n }", "title": "" }, { "docid": "218c7a5d667b8937bf0a423929f49aa4", "score": "0.55271417", "text": "public function getPeers();", "title": "" }, { "docid": "3ee04a091f8ff0115a5a8e1afbe55c0b", "score": "0.5520857", "text": "public function listarcpf($cpf){\n\n //Verificar se recebeu o cpf como parametro\n if(isset($cpf)){\n //Preenche os atributos com os valroes do formulário\n $this->cpf = $cpf;\n //Criar a conexao com o banco de dados\n $pdo = new PDO(server,usuario,senha);\n //Criar o comando sql\n $smtp = $pdo->prepare(\"select * from notificacao where usuario_cpf = :usuario_cpf\");\n\n //Executar no banco passando o numero como parametro\n $smtp->execute(array(\n ':cpf' => $this->cpf\n ));\n\n //Verficar se retornou dados\n if ($smtp->rowCount() > 0) {\n return $result = $smtp->fetchObject();\n }\n }\n }", "title": "" }, { "docid": "9ea02d81a0d70f133b08bf7fc8038afd", "score": "0.55203474", "text": "public function empleadosPuntos()\n {\n // TODOS LOS EMPLEADOS\n $empleados = DB::table('empleado as e')\n ->join('persona as p', 'p.perso_id', '=', 'e.emple_persona')\n ->select('e.emple_id', 'p.perso_nombre as nombre', 'p.perso_apPaterno as apPaterno', 'p.perso_apMaterno as apMaterno')\n ->where('e.emple_estado', '=', 1)\n ->where('e.organi_id', '=', session('sesionidorg'))\n ->get();\n\n return response()->json($empleados, 200);\n }", "title": "" }, { "docid": "fe743d87784a6cf92103fa5dc6806009", "score": "0.5518775", "text": "function listar_tipo_mesas($objeto) {\n\t\t$sql = \"SELECT\n\t\t\t\t\t*\n\t\t\t\tFROM \n\t\t\t\t\tcom_tipo_mesas\n\t\t\t\tORDER BY \n\t\t\t\t\ttipo_mesa\";\n\t\t// return $sql;\n\t\t$result = $this -> queryArray($sql);\n\t\t$result = $result['rows'];\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "70110f61147ecd5cb9063b7cfa127c9f", "score": "0.55123764", "text": "public function get_entidad_telefonos() : string {\n return $this->entidad_telefonos;\n }", "title": "" }, { "docid": "46375fdb66618403b3882c37e880f5e1", "score": "0.5509055", "text": "public function consultaPersonas(){\n\t\t$conect= Yii::app()->db;\n\t\t$sqlConsPersona=\"select (nombre_personal ||' '||apellidos_personal)as nombres,* from persona\";\n\t\t$consPersona=$conect->createCommand($sqlConsPersona);\n\t\t$readPersona=$consPersona->query();\n\t\t$resPersona=$readPersona->readAll();\n\t\t$readPersona->close();\n\t\treturn $resPersona;\n\t}", "title": "" }, { "docid": "2a26865120a1e63a66bd1b7328336c91", "score": "0.55075705", "text": "public function getAllJSON()\n {\n $pokemons = $this->getAll();\n foreach($pokemons as $key=>$value){\n $pokemons[$key]['info'] = '<p class=\\\"poke-titulo\\\">'.$pokemons[$key]['nome'].'</p>' . //cuidado com as aspas pro json_encode\n '<ul><li>HP - '.$pokemons[$key]['vida'].'</li>' .\n '<li>Ataque - '.$pokemons[$key]['ataque'].'</li>' .\n '<li>Defesa - '.$pokemons[$key]['defesa'].'</li></ul>' .\n '<a href=\\\"capturaBixo.php?id=' . $pokemons[$key]['id'] . '\\\" class=\\\"btn btn-block btn-success\\\" role=\\\"button\\\">Cadpturar</a>' .\n '</div>';\n }\n return $pokemons;\n }", "title": "" }, { "docid": "1944a752de250222054610cbddb8383d", "score": "0.550008", "text": "public function getPersonajes()\n {\n return Personajes::find()->where(['usuario_id' => $this->id]);\n }", "title": "" }, { "docid": "69b426b37ec31a03ab37830bf4b7828c", "score": "0.54996", "text": "function listarReporteMinisterioCabecera(){\n\t\t$this->procedimiento='plani.ft_planilla_sel';\n\t\t$this->transaccion='PLA_REPMINCABE_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\t\n\t\t\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('nombre_entidad','varchar');\t\t\n\t\t$this->captura('nit','varchar');\n\t\t$this->captura('identificador_min_trabajo','varchar');\n\t\t$this->captura('identificador_caja_salud','varchar');\n\t\t\t\t\n\t\t\t\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\n\t\t\n\t\t\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "17b95dc8d49c73d3213b348d63f9defc", "score": "0.5498131", "text": "public function index()\n {\n $tiposPersona = TipoPersona::with(['usuario', 'status'])->get();\n \n return $tiposPersona;\n }", "title": "" }, { "docid": "6277fa34158cde3d90b86efc60eb2ad9", "score": "0.54898745", "text": "function obtener_lista_pacientes(){\n global $wpdb;\n $query =\"SELECT wp_users.id,wp_users.user_login, wp_users.user_email from wp_users where wp_users.user_super iS NOT NULL\";\n $results = $wpdb->get_results( $query, OBJECT );\n return $results;\n }", "title": "" }, { "docid": "c72eb9a6be7a8cb0a99614a7bace35b2", "score": "0.5489061", "text": "public function telefones()\n {\n return $this->hasMany(Telefone::class);\n }", "title": "" }, { "docid": "c4e686554272d11744affae61e8071e9", "score": "0.54883546", "text": "public function GetPais()\r\n {\r\n $url = 'http://id.techo.org/pais?api=true&token='.$_SESSION['Planificacion']['token'];\r\n \r\n $curl = curl_init();\r\n curl_setopt($curl, CURLOPT_URL, $url);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);\r\n curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);\r\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n \r\n $output = curl_exec($curl);\r\n curl_close($curl);\r\n \r\n $data = json_decode($output, true);\r\n \r\n return $data;\r\n }", "title": "" }, { "docid": "e299ccd8d6517b969f32411f930b901b", "score": "0.5487261", "text": "public function areaParticipantsList() {\n $areaParticipantsList = array(\n '' => 'Selecione',\n 'Adm - Financeiro' => 'Adm - Financeiro',\n 'Administrativo' => 'Administrativo',\n 'Arquitetura' => 'Arquitetura',\n 'Atendimento - SAC' => 'Atendimento - SAC',\n 'Auditoria' => 'Auditoria',\n 'Comercial' => 'Comercial',\n 'Conselho' => 'Conselho',\n 'Desenvolvimento de Negócios' => 'Desenvolvimento de Negócios',\n 'Diretoria' => 'Diretoria',\n 'Empreendedor' => 'Empreendedor',\n 'Financeiro' => 'Financeiro',\n 'Imprensa - Comunicação' => 'Imprensa - Comunicação',\n 'Jurídico' => 'Jurídico',\n 'Mall & Merchandising' => 'Mall & Merchandising',\n 'Marketing' => 'Marketing',\n 'Não se aplica' => 'Não se aplica',\n 'Operações' => 'Operações',\n 'Pesquisas' => 'Pesquisas',\n 'Planejamento Estratégico' => 'Planejamento Estratégico',\n 'Presidência' => 'Presidência',\n 'Relacionamento' => 'Relacionamento',\n 'RH' => 'RH',\n 'RI' => 'RI',\n 'Segurança' => 'Segurança',\n 'Superintendencia' => 'Superintendencia',\n 'Sustentabilidade' => 'Sustentabilidade',\n 'TI' => 'TI'\n );\n\n return $areaParticipantsList;\n }", "title": "" }, { "docid": "08243dbe99c4ab6525c85ad483b46811", "score": "0.5485479", "text": "public function listar(){\n $tirajson=array();\n $tirajson= $this->persona->listar();\n echo json_encode($tirajson);\n }", "title": "" }, { "docid": "600df09268271fb6886e43618a1f817f", "score": "0.5484996", "text": "public function getPegawais()\n {\n return $this->hasMany(Pegawai::className(), ['id_personal' => 'id_personal']);\n }", "title": "" }, { "docid": "e42c01ab7cb50821cae76508ced05de0", "score": "0.5480982", "text": "public function listaPaciente($pagina = 1)\n {\n\n //esto es la operacion de paginado\n $inicio = 0;\n //esto es lo unico que se va poder cambiar;\n $cantidad = 100;\n if ($pagina > 1) {\n $inicio = ($cantidad * ($pagina - 1) + 1);\n $cantidad = $cantidad * $pagina;\n }\n\n $query = \"select PacienteId,Nombre, DNI, Telefono, Correo from \" . $this->table . \" limit $inicio, $cantidad\";\n $datos = parent::obtenerDatos($query);\n return $datos;\n }", "title": "" } ]
c1250f9bf4d04e93f05ba1c0fae9010f
Retrieve found document ids from Solr index sorted by relevance
[ { "docid": "7db92ddfbae7300c74357697cbaabe25", "score": "0.0", "text": "public function getIdsByQuery($query, $params = array())\n {\n //$params['fields'] = array('id');\n\n $result = $this->_search($query, $params);\n\n if (!isset($result['ids'])) {\n $result['ids'] = array();\n }\n\t\t/*\n if (!empty($result['ids'])) {\n foreach ($result['ids'] as &$id) {\n $id = $id['id'];\n }\n }\n\t\t*/\n return $result;\n }", "title": "" } ]
[ { "docid": "8aaa96ea7cc72c474c227ca0eb591de0", "score": "0.686469", "text": "protected function getResultSet() {\n $scores = $this->calculateDocsScores();\n\n // sort documents by score (DESC)\n arsort($scores);\n\n // return only docIds (sorted)\n return array_keys($scores);\n }", "title": "" }, { "docid": "aa420f80cb96170fd1ccb94736bbdcb0", "score": "0.64068407", "text": "protected function getFullPhraseDocuments() {\n $termsIds = array();\n $terms = $this->searchTerms->popAll();\n foreach ($terms as $termObj) {\n $termsIds[] = $termObj->getId();\n }\n \n $searchDocs = $this->dbConn->prepare(\"\n SELECT\n ii.doc_id, \n MAX(o.position) AS max_position,\n MIN(o.position) AS min_position,\n IF (COUNT(o.position) > 1, COUNT(o.position), 0) AS count_of_occurrances\n FROM inverted_index AS ii\n JOIN occurrences AS o \n ON o.inverted_index_id = ii.id\n WHERE \n ii.term_id IN (\" . implode(', ', $termsIds) . \")\n GROUP BY ii.doc_id\n HAVING max_position - min_position = count_of_occurrances - 1\");\n $searchDocs->execute();\n\n return __($searchDocs->fetchAll())->pluck('doc_id');\n }", "title": "" }, { "docid": "820f75ff679483768e83420a86e132b3", "score": "0.57577455", "text": "public function getDocIdsList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "8bcd9d4fced37e5c3422bb148de7399d", "score": "0.57230145", "text": "function query_solr_index( $title, $q, &$result, $x=NULL ) {\n $repo = variable_get( 'icg_tuque_URL' );\n $solr = str_replace( '/fedora', '/solr', $repo );\n \n // Before the query, commit all pending Solr documents with http://solrhost:8080/solr/update?commit=true\n $url = $solr.'/update?commit=true';\n if ( !$result = curl_query( $url )) {\n drupal_set_message( 'Solr commit failed (returned FALSE) in query_solr_index!', 'error' );\n return FALSE;\n }\n \n // We need to urlencode( ) the title before the search.\n $t = urlencode( $title );\n \n // Also, the search may not contain any single or double quotes, so remove them \n // before searching.\n if ( strstr( $t, \"'\" ) || strstr( $t, '\"' )) {\n die( \"Stopped in query_solr_index: The search string '$t' contains quotes!\" );\n }\n\n // @TODO...implement argument $x\n\n // Attempt to query Solr's $q field for the target title.\n $url = $solr.'/collection1/select?q='.$q.':\"'.$t.'\"&fl=PID';\n $result = curl_query( $url );\n $content = trim( $result );\n \n // Fetch Num Found.\n $xml = new SimpleXMLElement( $content ); // open record as searchable XML\n $xpath = '/response/result/@numFound';\n $node = $xml->xpath( $xpath );\n $num_found = intval((string) $node[0]);\n \n // If $num_found is ONE, return the target PID only in $result rather than\n // returning the whole result document!\n if ( $num_found == 1 ) {\n $xpath = \"/response/result/doc/str\";\n $node = $xml->xpath( $xpath );\n $result = (string) $node[0];\n }\n \n return $num_found;\n}", "title": "" }, { "docid": "1c03a931040b56e6bd7702db2710f5ac", "score": "0.54617834", "text": "public function get_ids() {\n\t\tglobal $wpdb;\n\n\t\t$results = $this->query();\n\n\t\t$this->total_found = (int) $wpdb->get_var( 'SELECT FOUND_ROWS()' );\n\n\t\t$ids = array();\n\n\t\tforeach( $results as $result ) {\n\t\t\t$ids[] = $result[0];\n\t\t}\n\n\t\treturn $ids;\n\t}", "title": "" }, { "docid": "acd7bb2bafa6b58f762eb3a726910ae4", "score": "0.545862", "text": "function CreatePositionalIndex($corpus,$shouldstem_terms)\n{\n $results = array();\n $word_dict = array();\n\n\n $num_of_docs = count($corpus);\n array_push($results,$num_of_docs);\n\t//for every url in the list, we go through the terms in the downloaded page\n foreach($corpus as $corpus_info)\n {\n $doc_idx = array_search($corpus_info,$corpus);\n $words = $corpus_info[0];\n $words = preg_split('/[\\s.,]+/', $words,NULL, PREG_SPLIT_NO_EMPTY);\n\t\t$words = array_filter($words,'strlen');\n\n foreach($words as $key=>$term){\n $words[$key] = strtolower($term);\n }\n\t\t//Stem the terms if the command line argument should_stem is true\n if($shouldstem_terms)\n {\n foreach($words as $key=>$term){\n $words[$key] = stemTerm($term,$corpus_info[1]);\n }\n }\n\t\t//For every term, create/update the word encode object.\n foreach ($words as $word)\n {\n $orig_word = $word;\n $word_without_punct = RemovePunctuation($word);\n\n if(array_key_exists($word_without_punct,$word_dict))\n {\n $word_dict[$word_without_punct]->add_doc($doc_idx,array_keys($words,$orig_word));\n }\n else if($word_without_punct != \"\")\n {\n $word_encode_obj = new WordEncode($word_without_punct,$doc_idx);\n $word_dict[$word_without_punct] = $word_encode_obj;\n //$word_dict[$word_without_punct]->add_doc($doc_idx,array_search($word,$words));\n $key_positions = array_keys($words,$orig_word);\n $word_dict[$word_without_punct]->add_doc($doc_idx,$key_positions);\n $word_dict[$word_without_punct]->add_doc_positions($doc_idx,$key_positions);\n }\n }\n }\n\t//return the result with total number of documents in the corpus,index\n array_push($results,$word_dict);\n\t//$keys = array_keys($results[1]);\n\t//print_r($keys);\n\t//exit();\n return $results;\n}", "title": "" }, { "docid": "b59594362c43d97431bea36782a4498a", "score": "0.5443391", "text": "public function searchIdsAction()\n {\n // start time measurement\n $timeStart = microtime(true);\n\n // get search data\n $searchData = $this->getSearchData('searchids');\n\n // end time measurement\n $timeEnd = microtime(true);\n\n // return data\n return $this->dataResponse(array(\n 'took' => $timeEnd - $timeStart,\n 'query'=> $searchData['query'],\n 'fromCache'=>$searchData['fromCache'],\n ), $searchData['data'], $searchData['key']);\n }", "title": "" }, { "docid": "b8163d39f667f8230b3594650091c169", "score": "0.53762615", "text": "protected function getSuggestions($docId) {\n $searchDocs = $this->dbConn->prepare(\"\n SELECT\n t.term,\n COUNT(o.id) / (d.count_of_terms * t.count_of_documents) AS metric\n FROM docs AS d\n JOIN inverted_index AS ii\n ON ii.doc_id = d.id\n JOIN terms AS t\n ON t.id = ii.term_id\n JOIN occurrences AS o \n ON o.inverted_index_id = ii.id\n WHERE\n d.id = :doc_id\n GROUP BY t.id\n ORDER BY metric DESC\n LIMIT 3\n \");\n $searchDocs->execute(array(\n ':doc_id' => $docId\n ));\n \n return __($searchDocs->fetchAll(PDO::FETCH_ASSOC))->pluck('term');\n }", "title": "" }, { "docid": "a65d6a886dce4f16b37295a0acdf7f3e", "score": "0.5369326", "text": "public function index() {\n\t\t$query = $this->get_query( false, $this->get_limit() );\n\t\t$term_ids = $this->wpdb->get_col( $query );\n\n\t\t$indexables = [];\n\t\tforeach ( $term_ids as $term_id ) {\n\t\t\t$indexables[] = $this->repository->find_by_id_and_type( (int) $term_id, 'term' );\n\t\t}\n\n\t\t\\delete_transient( static::TRANSIENT_CACHE_KEY );\n\n\t\treturn $indexables;\n\t}", "title": "" }, { "docid": "bbedbfbb53181b5588b12e64ce636ac9", "score": "0.5344662", "text": "public function getDocuments() {\r\n $docList = array();\r\n $docs = $this->_output->verifyOrderResponse->documents;\r\n if (is_null($docs))\r\n return $docList;\r\n $doc = $docs->document;\r\n if (is_array($doc))\r\n foreach ($doc as $d)\r\n $docList[] = $d->id;\r\n else\r\n $docList[] = $doc->id;\r\n return $docList;\r\n }", "title": "" }, { "docid": "95b42ec5df07cef5e13531b41d00ab8c", "score": "0.53421396", "text": "public function testFindWithScores() {\n\t\t$connection = new ASolrConnection();\n\t\t$connection->clientOptions->hostname = SOLR_HOSTNAME;\n\t\t$connection->clientOptions->port = SOLR_PORT;\n\t\t$connection->clientOptions->path = SOLR_PATH;\n\t\tASolrDocument::$solr = $connection;\n\t\t$pkList = array();\n\t\tforeach($this->fixtureData() as $attributes) {\n\t\t\t$criteria = new ASolrCriteria;\n\t\t\t$criteria->query = \"id:\".$attributes['id'];\n\t\t\t$criteria->withScores();\n\t\t\t$doc = ASolrDocument::model()->find($criteria);\n\t\t\t$this->assertTrue(is_object($doc));\n\t\t\t$this->assertTrue($doc instanceof ASolrDocument);\n\t\t\t$this->assertGreaterThan(0, $doc->getScore());\n\t\t\tforeach($attributes as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t\t$pkList[$doc->getPrimaryKey()] = $attributes;\n\t\t}\n\t\t$criteria = new ASolrCriteria();\n\t\t$criteria->query = \"*:*\";\n\t\t$criteria->limit = 100;\n\t\t$criteria->addInCondition(\"id\",array_keys($pkList));\n\t\t$criteria->withScores();\n\t\t$models = ASolrDocument::model()->findAll($criteria);\n\t\t$this->assertEquals(count($pkList),count($models));\n\t\tforeach($models as $doc) {\n\t\t\t$this->assertGreaterThan(0, $doc->getScore());\n\t\t\tforeach($pkList[$doc->getPrimaryKey()] as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "31c0f9ee395c20ef1ad9f397a2858e13", "score": "0.5309815", "text": "function findDocumentsByTags($repo_id = null, $tags = array()) {\n\t\tif(is_null($repo_id)) {\n\t\t\treturn null;\n\t\t}\n\t\t$docs = array();\n\t\tforeach ($tags as $tag) {\n\t\t\t$tmp = $this->find('all', array(\n\t\t\t \t\t'conditions' => array(\n\t\t\t\t\t\t'Tag.tag' => $tag,\n\t\t\t\t\t\t'Document.repository_id' => $repo_id\n\t\t\t\t\t),\n\t\t\t \t\t'fields' => array('Tag.document_id')\n\t\t\t\t)\n\t\t\t);\n\t\t\t\t\n\t\t\t$hola = array();\n\t\t\tforeach($tmp as $t) {\n\t\t\t\t$hola[] = $t['Tag']['document_id'];\n\t\t\t}\n\t\t\t$docs[] = $hola;\n\t\t}\n\t\tif(count($docs) > 0) {\n\t\t\t$res = $docs[0];\n\t\t\tfor ($i = 1; $i < count($docs); $i++) {\n\t\t\t\t$res = array_intersect($res, $docs[$i]);\n\t\t\t}\n\t\t} else {\n\t\t\t$res = $this->find('all', array(\n\t\t\t\t'conditions' => array('Document.repository_id' => $repo_id),\n\t\t \t\t'fields' => 'DISTINCT Tag.document_id',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "4b7d8e04d7ac01150046b72766bad6dd", "score": "0.5296555", "text": "public function find($query)\n {\n if (is_string($query)) {\n require_once 'Zend/Search/Lucene/Search/QueryParser.php';\n\n $query = Zend_Search_Lucene_Search_QueryParser::parse($query);\n }\n\n if (!$query instanceof Zend_Search_Lucene_Search_Query) {\n require_once 'Zend/Search/Lucene/Exception.php';\n throw new Zend_Search_Lucene_Exception('Query must be a string or Zend_Search_Lucene_Search_Query object');\n }\n\n $this->commit();\n\n $hits = [];\n $scores = [];\n $ids = [];\n\n $query = $query->rewrite($this)->optimize($this);\n\n $query->execute($this);\n\n $topScore = 0;\n\n /** Zend_Search_Lucene_Search_QueryHit */\n require_once 'Zend/Search/Lucene/Search/QueryHit.php';\n\n foreach ($query->matchedDocs() as $id => $num) {\n $docScore = $query->score($id, $this);\n\n if ($docScore != 0) {\n $hit = new Zend_Search_Lucene_Search_QueryHit($this);\n $hit->id = $id;\n $hit->score = $docScore;\n\n $hits[] = $hit;\n $ids[] = $id;\n $scores[] = $docScore;\n\n if ($docScore > $topScore) {\n $topScore = $docScore;\n }\n }\n\n if (self::$_resultSetLimit != 0 && count($hits) >= self::$_resultSetLimit) {\n break;\n }\n }\n\n if (count($hits) === 0) {\n // skip sorting, which may cause a error on empty index\n return [];\n }\n\n if ($topScore > 1) {\n foreach ($hits as $hit) {\n $hit->score /= $topScore;\n }\n }\n\n if (func_num_args() === 1) {\n // sort by scores\n array_multisort($scores, SORT_DESC, SORT_NUMERIC,\n $ids, SORT_ASC, SORT_NUMERIC,\n $hits);\n } else {\n // sort by given field names\n\n $argList = func_get_args();\n $fieldNames = $this->getFieldNames();\n $sortArgs = [];\n\n // PHP 5.3 now expects all arguments to array_multisort be passed by\n // reference (if it's invoked through call_user_func_array());\n // since constants can't be passed by reference, create some placeholder variables.\n $sortReg = SORT_REGULAR;\n $sortAsc = SORT_ASC;\n $sortNum = SORT_NUMERIC;\n\n $sortFieldValues = [];\n\n require_once 'Zend/Search/Lucene/Exception.php';\n for ($count = 1; $count < count($argList); $count++) {\n $fieldName = $argList[$count];\n\n if (!is_string($fieldName)) {\n throw new Zend_Search_Lucene_Exception('Field name must be a string.');\n }\n\n if (strtolower($fieldName) == 'score') {\n $sortArgs[] = &$scores;\n } else {\n if (!in_array($fieldName, $fieldNames)) {\n throw new Zend_Search_Lucene_Exception('Wrong field name.');\n }\n\n if (!isset($sortFieldValues[$fieldName])) {\n $valuesArray = [];\n foreach ($hits as $hit) {\n try {\n $value = $hit->getDocument()->getFieldValue($fieldName);\n } catch (Zend_Search_Lucene_Exception $e) {\n if (strpos($e->getMessage(), 'not found') === false) {\n throw new Zend_Search_Lucene_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $value = null;\n }\n\n $valuesArray[] = $value;\n }\n\n // Collect loaded values in $sortFieldValues\n // Required for PHP 5.3 which translates references into values when source\n // variable is destroyed\n $sortFieldValues[$fieldName] = $valuesArray;\n }\n\n $sortArgs[] = &$sortFieldValues[$fieldName];\n }\n\n if ($count + 1 < count($argList) && is_integer($argList[$count+1])) {\n $count++;\n $sortArgs[] = &$argList[$count];\n\n if ($count + 1 < count($argList) && is_integer($argList[$count+1])) {\n $count++;\n $sortArgs[] = &$argList[$count];\n } else {\n if ($argList[$count] == SORT_ASC || $argList[$count] == SORT_DESC) {\n $sortArgs[] = &$sortReg;\n } else {\n $sortArgs[] = &$sortAsc;\n }\n }\n } else {\n $sortArgs[] = &$sortAsc;\n $sortArgs[] = &$sortReg;\n }\n }\n\n // Sort by id's if values are equal\n $sortArgs[] = &$ids;\n $sortArgs[] = &$sortAsc;\n $sortArgs[] = &$sortNum;\n\n // Array to be sorted\n $sortArgs[] = &$hits;\n\n // Do sort\n call_user_func_array('array_multisort', $sortArgs);\n }\n\n return $hits;\n }", "title": "" }, { "docid": "d515b91656b21ad4918dbbcabcab6d89", "score": "0.5285945", "text": "public function getTopSearchWords(){\n\n $select = array(\n 'fields' => 'keywords, count(*) as cnt ',\n 'table' => 'tx_solr_statistics',\n 'where' => 'tstamp = ' . time() - (86400*7),\n 'group' => 'keywords',\n 'order' => 'cnt DESC',\n 'limit' => '0, 20',\n );\n\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($select['fields'], $select['table'], $select['where'], $select['group'], $select['order'], $select['limit'] );\n\n if ( $res->num_rows >= 1) {\n\n return $res;\n\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "38120af01be713110f1e6caea8ce8264", "score": "0.5231804", "text": "public function getIddocuments()\n {\n return $this->idDocuments;\n }", "title": "" }, { "docid": "69cee5f8e2fdbdc6c73da222da47fbd3", "score": "0.5179712", "text": "public function getComparedIds()\n {\n $collection = Mage::getModel('reports/product_index_compared')->getCollection()\n ->addPriceData()\n ->addIndexFilter()\n ->setAddedAtOrder()\n ->setPageSize(5);\n\n Mage::getSingleton('catalog/product_visibility')\n ->addVisibleInSiteFilterToCollection($collection);\n\n return $collection->getColumnValues('entity_id');\n }", "title": "" }, { "docid": "2967302e8bd200a828e3570675ea70df", "score": "0.5179611", "text": "public function getSearchResultsDocumentLibrary($searchquery);", "title": "" }, { "docid": "6c9f2211b5f2d733a516408cbd2bec0b", "score": "0.5152624", "text": "function getSearchResults($argRequest)\n {\n //Prepare the array of the all categories\n $objCore = new Core();\n if(isset($argRequest) && $argRequest['catId']!=\"\")\n {\n $arrCat = $this->getAllCategories('CategoryIsDeleted = 0 AND CategoryStatus = 1 AND pkCategoryId ='.$argRequest['catId']);\n }\n else\n {\n $arrCat = $this->getAllCategories('CategoryIsDeleted = 0 AND CategoryStatus = 1');\n }\n $arrCat = $this->getAllCategories();\n $_REQUEST['sortingId']=$argRequest['sortingId'];\n \n $whQuery = '';\n $cid = '';\n $varStartLimit = ($argRequest['startlimit']) ? $argRequest['startlimit'] : 0;\n $varEndLimit = ($argRequest['endlimit']) ? $argRequest['endlimit'] : 200;\n\n if ($argRequest['searchKey'] != '')\n {\n if ($argRequest['searchKey'] != '')\n {\n //$searchKey = htmlentities($argRequest['searchKey']);\n $searchKey = $argRequest['searchKey'];\n $whQuery .= '(ProductName:\"' . $searchKey . '\" OR ProductDescription:\"' . $searchKey . '\" OR CompanyName:\"' . $searchKey . '\" OR CategoryName:\"' . $searchKey . '\")';\n }\n if ($argRequest['frmPriceFrom'] > 0 && $argRequest['frmPriceTo'] > 0 && is_numeric($argRequest['frmPriceFrom']))\n {\n $whQueryPrice2 .= \" AND \";\n $whQueryPrice2 .= \"( DiscountFinalPrice:[\" . $argRequest['frmPriceFrom'] . \" TO \" . $argRequest['frmPriceTo']. \"])\";\n }\n if($argRequest['catId'] != '')\n {\n $catId = $argRequest['catId'];\n $whQueryCat .= \" AND \";\n $whQueryCat .= '(pkCategoryId:\"' . $catId . '\" OR CategoryParentId:\"' . $catId . '\")'; \n }\n \n //mail('[email protected]','hi',$whQuery.$whQueryPrice2);\n //echo $whQueryPrice2;die;\n $varResult = getSolrResult($whQuery.$whQueryPrice2.$whQueryCat . ' AND ProductStatus:1', $varStartLimit, $varEndLimit, $arrCat[(int) $cid]);\n //var_dump($arrCat); die();\n return $varResult;\n }\n }", "title": "" }, { "docid": "4c19b148d35aa9aea16867df4963a069", "score": "0.51504153", "text": "private function getShopifyIDsIndexedByRecordReferences($rawProducts){\r\n\t\t$indexedIDs = [];\r\n\r\n\t\tforeach($rawProducts as $rawProduct){\t\r\n\t\t\tif(!empty($rawProduct['variants'][0]['sku'])){\r\n\t\t\t\t$recordReference = $this->getProductRecordReference($rawProduct['variants'][0]['sku'], $rawProduct['vendor']);\r\n\t\t\t\t$indexedIDs[$recordReference] = $rawProduct['id'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $indexedIDs;\r\n\t}", "title": "" }, { "docid": "fea2f483f28dc7e11d145f5b961cbee2", "score": "0.51446575", "text": "function get_similar_terms(\n $lang_id, $compared_term, $max_count, $min_ranking\n): array { \n global $tbpref;\n $compared_term_lc = mb_strtolower($compared_term, 'UTF-8');\n $sql = \"SELECT WoID, WoTextLC FROM {$tbpref}words \n WHERE WoLgID = $lang_id\n AND WoTextLC <> \" . convert_string_to_sqlsyntax($compared_term_lc);\n $res = do_mysqli_query($sql);\n $termlsd = array();\n while ($record = mysqli_fetch_assoc($res)) {\n $termlsd[(int)$record[\"WoID\"]] = getSimilarityRanking(\n $compared_term_lc, $record[\"WoTextLC\"]\n );\n }\n mysqli_free_result($res);\n arsort($termlsd, SORT_NUMERIC);\n $r = array();\n $i = 0;\n foreach ($termlsd as $key => $val) {\n if ($i >= $max_count || $val < $min_ranking) { \n break; \n }\n $i++;\n $r[$i] = $key;\n }\n return $r;\n}", "title": "" }, { "docid": "26d5200ef131532f232d165fa676feda", "score": "0.51159084", "text": "public function testFind() {\n\t\t$connection = new ASolrConnection();\n\t\t$connection->clientOptions->hostname = SOLR_HOSTNAME;\n\t\t$connection->clientOptions->port = SOLR_PORT;\n\t\t$connection->clientOptions->path = SOLR_PATH;\n\t\tASolrDocument::$solr = $connection;\n\t\t$pkList = array();\n\t\tforeach($this->fixtureData() as $attributes) {\n\t\t\t$criteria = new ASolrCriteria;\n\t\t\t$criteria->query = \"id:\".$attributes['id'];\n\t\t\t$doc = ASolrDocument::model()->find($criteria);\n\t\t\t$this->assertTrue(is_object($doc));\n\t\t\t$this->assertTrue($doc instanceof ASolrDocument);\n\t\t\tforeach($attributes as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t\t$pkList[$doc->getPrimaryKey()] = $attributes;\n\t\t}\n\t\t$criteria = new ASolrCriteria();\n\t\t$criteria->limit = 100;\n\t\t$criteria->query = \"*:*\";\n\t\t$criteria->addInCondition(\"id\",array_keys($pkList));\n\t\t$models = ASolrDocument::model()->findAll($criteria);\n\t\t$this->assertEquals(count($pkList),count($models));\n\t\tforeach($models as $doc) {\n\t\t\tforeach($pkList[$doc->getPrimaryKey()] as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "205295b5a6ec640bf15302f5c710255b", "score": "0.51136535", "text": "function searchResults($hit)\n {\n echo \"<a href=\\\"KVR\\\\\".$hit['_source']['doc_id'].\"\\\"><h4>\";\n\n if ($hit['_source']['inhoud'] == \"\")\n {\n if ($hit['_source']['trefwoorden'] == \"\")\n {\n echo $hit['_source']['doc_id'];\n }\n else\n {\n $splitTref = explode(\" \", $hit['_source']['trefwoorden']);\n\n foreach (array_slice($splitTref, 0, 15) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitTref) > 15) {\n echo \"...\";\n }\n }\n } else {\n $splitInhoud = explode(\" \", $hit['_source']['inhoud']);\n //$splitInhoud = explode(\" \", $hit['highlight']['inhoud'][0]);\n\n foreach (array_slice($splitInhoud, 0, 15) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitInhoud) > 15) {\n echo \"...\";\n }\n }\n echo \"</h4></a>\";\n\n\n\n // some document contents\n $splitVraag = explode(\" \",$hit['_source']['vraag']);\n\n foreach (array_slice($splitVraag, 0, 50) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n if (count($splitVraag) > 50)\n {\n echo \"...\";\n }\n elseif (count($splitVraag) < 50)\n {\n $splitAnt = explode(\" \", $hit['_source']['antwoord']);\n\n foreach (array_slice($splitAnt, 0, 50 - count($splitVraag)) as $token)\n {\n echo $token;\n echo \" \";\n }\n\n echo \"...\";\n }\n echo \"<br>\";\n\n // doc-id\n echo \"<span class=\\\"label label-info\\\">\".\"Jaar: \".$hit['_source']['jaar'].\"</span> \";\n $temp = explode(\", \",$hit['_source']['partij']);\n $temp = array_unique($temp);\n echo \"<span class=\\\"label label-default\\\">\".\"Partij: \";\n $i = 0;\n foreach ($temp as $word) {\n echo $word;\n if ($i != count($temp) - 1)\n echo \", \";\n $i++;\n }\n echo \"</span>\";\n }", "title": "" }, { "docid": "63ed5c9957772e65862adfff035b0ddf", "score": "0.5111857", "text": "public function getIDs()\n {\n if (!$this->executed) {\n $this->execute();\n }\n\n return array_map(function ($hit) {\n return $hit->_id;\n }, $this->response->hits->hits);\n }", "title": "" }, { "docid": "769968337269b70ec99208b3ed48b472", "score": "0.51085556", "text": "public function search($op = array())\n {\n $pagination_array = array();\n $output = null;\n\n $solr = $this->get_solr_connection();\n if ($solr->ping()) {\n\n $params = array(\n 'defType' => 'dismax',\n 'wt' => 'json',\n 'fl' => '*,score',\n 'df' => 'description',\n 'qf' => empty($op['qf']) ? 'title^3 description^2 username^1 cat_title' : $op['qf'],\n 'bq' => 'changed_at:[NOW-1YEAR TO NOW/DAY]',\n //'bf' => 'if(lt(laplace_score,50),-10,10)',\n 'bf' => 'product(recip(ms(NOW/HOUR,changed_at),3.16e-11,0.2,0.2),1000)',\n 'sort' => 'score desc,changed_at desc',\n //'hl' => 'on',\n //'hl.fl' => 'title, description, username',\n //'facet' => 'on',\n //'facet.field[0]' => 'project_category_id',\n //'facet.field[1]' => 'username',\n //'facet.mincount' => '1',\n 'spellcheck' => 'true',\n );\n\n $params = $this->setStoreFilter($params);\n\n $offset = ((int)$op['page'] - 1) * (int)$op['count'];\n\n $query = trim($op['q']);\n\n $results = $solr->search($query, $offset, $op['count'], $params);\n\n $output['response'] = (array)$results->response;\n $output['responseHeader'] = (array)$results->responseHeader;\n $output['facet_counts'] = (array)$results->facet_counts;\n $output['highlighting'] = (array)$results->highlighting;\n $output['hits'] = (array)$results->response->docs;\n\n $pagination_array = array();\n if (isset($output['response']['numFound'])) {\n $pagination_array = array_combine(\n range(0, $output['response']['numFound'] - 1),\n range(1, $output['response']['numFound'])\n );\n }\n }\n $pagination = Zend_Paginator::factory($pagination_array);\n $pagination->setCurrentPageNumber($op['page']);\n $pagination->setItemCountPerPage($op['count']);\n $pagination->setPageRange(9);\n\n $this->_pagination = $pagination;\n\n return $output;\n }", "title": "" }, { "docid": "91b857ce683b6178dddf5db3deb9db47", "score": "0.5102323", "text": "public function index()\n\t{\n\t\tlog::info('Inside alert controller');\n\t\t$searchedResults = array();\n\t\t$searchedResults = SearchedTerms::where('alert_flag', 1)->get();\n\t\t//log::info($searchedResults);\n\t\t\n\t\tforeach($searchedResults as $result)\n\t\t{\n\t\t\tlog::info('Searchedterm is');\n\t\t\tlog::info($result->search_term);\n\t\t\t$filterQueryParams = array();\n\t\t\t$filterQueryParams[] = sprintf('titles:%s', $result->title);\n\t\t\t//$filterQueryParams[] = sprintf('id:%s', $result->search_term);\n\t\t\t$filterQueryParams[] = sprintf('parties:%s', $result->parties);\n\t\t\t$filterQueryParams[] = sprintf('citations:%s', $result->citation);\n\t\t\t$filterQueryParams[] = sprintf('judges:%s', $result->judges);\n\t\t\t\n\t\t\tif($result->to_date == null)\n\t\t\t{\n\t\t\t\t $filterQueryParams[] = sprintf('dates:[%s TO %s]', \n\t\t\t\tDocument::convertDateToSolrFormat($result->from_date),\n\t\t\t\tDocument::convertDateToSolrFormat(date('Y-m-d')));\n\t\t\t\t \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$filterQueryParams[] = sprintf('dates:[%s TO %s]', \n\t\t\t\tDocument::convertDateToSolrFormat($result->from_date),\n\t\t\t\tDocument::convertDateToSolrFormat($result->to_date));\n\t\t\t}\n\t\t\t\n\t\t\t$query = $this->client->createSelect();\n\t\t\t$filterQueryString = '';\t\n\t\t\tif($filterQueryParams) \n\t\t\t{\n\t\t\t\t$filterQueryString = implode(' & ', $filterQueryParams);\n\t\t\t\tlog::info($filterQueryString);\n\t\t\t\t$query->setQuery($result->search_term);\n\t\t\t\t$query->createFilterQuery('fq')->setQuery($filterQueryString);\n\t\t\t}\n\t\t\t$resultset = $this->client->select($query);\n\t\t\tlog::info($resultset->getNumFound());\n\t\t\t\n\t\t\t$newResultSet = $this->fullsearch($result->search_term, $filterQueryString, $resultset->getNumFound());\n\t\t\tlog::info($newResultSet->getNumFound());\n\t\t\t$newFilesAdded = $this->compareDocumentIDs($newResultSet,$result);\n\t\t\tlog::info('new fields added');\n\t\t\tlog::info($newFilesAdded);\n\t\t\tif(count($newFilesAdded)>0)\n\t\t\t{\n\t\t\t\t$newDocIds=$result->document_ids;\n\t\t\t\tforeach ($newFilesAdded as $index => $doc)\n\t\t\t\t{\n\t\t\t\t\t$newDocIds=$newDocIds.','.$doc;\n\t\t\t\t}\n\t\t\t\tlog::info($newDocIds);\n\t\t\t\t$newCnt = $result->document_count + count($newFilesAdded);\n\t\t\t\tlog::info($newCnt);\n\t\t\t\t$result->document_ids = $newDocIds;\n\t\t\t\t$result->document_count = $newCnt;\n\t\t\t\t$result->save();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "353cb2721530e282ac97772af6779506", "score": "0.50769037", "text": "public function updateIndex()\n {\n $this->_lucene = Lucene::open('data/index/');\n\n foreach ($this->_providers as $provider) {\n $documents = $provider->getDocuments();\n\n foreach ($documents as $document) {\n // find document by url and delete id\n $query = new QueryTerm(new IndexTerm($document->url, 'url'));\n $hits = $this->_lucene->find($query);\n foreach ($hits as $hit) {\n $this->_lucene->delete($hit);\n }\n // re-add document to index\n $this->_lucene->addDocument($document);\n }\n }\n\n $this->_lucene->optimize();\n }", "title": "" }, { "docid": "78548b35ec951760579c0f5441b854cb", "score": "0.5076048", "text": "function getSearchLogs($user_id)\n {\n\n $where = array( '$and' => array(\n array('userfk' => $user_id),\n array( '$or' => array(\n array('table' => 'quick_search'),\n array('table' => 'complex_search')\n ))\n ) );\n //$orderBy = array('login_system_historypk' => '-1');\n $orderBy = '';\n $limit = '15';\n $logs = getMongoLog($where,$orderBy,$limit);\n\n $result = iterator_to_array($logs, false);\n\n return $result;\n }", "title": "" }, { "docid": "8ae5d88b62caf0358d0e6429dcfa7744", "score": "0.50704", "text": "abstract public function getHits( Query $search );", "title": "" }, { "docid": "c181809c35a653b7d45dd60b0ffec423", "score": "0.5067477", "text": "function getSearchResults($request,$mode = 'global', $infofields = array('title','title_orig','actors','directors','year')){\n global $db;\n global $CONFIG;\n $results = array();\n $temp_results = array();\n //requette\n\n if ($mode =='global') {\n $key_words = explode(\" \",$request);\n }\n else{\n $key_words[] = htmlspecialchars($request);\n }\n\n $nbkey_words = count($key_words);\n\n // search for movies how containe a keyword\n foreach ($key_words as $key_word) {\n // key word need to be longer than 2 char to avoid a, an, etc... and all the shorts articles\n if (strlen($key_word) >= 3) {\n // search in all predeterminate fields.\n foreach ($infofields as $field) {\n $movies = $db->query('SELECT id,title,title_orig,actors,directors,year FROM '.$CONFIG['PrefixDB'].'List WHERE '.$field.' REGEXP \"([[:<:]])'.$key_word.'([[:>:]])\" ORDER BY year DESC, title ASC')->fetchall(PDO::FETCH_ASSOC);\n if (!empty($movies)) {\n foreach ($movies as $movie) {\n // Add the corresponding keyword and field to the info of each movie\n if (isset($results[$movie['id']])) {\n $results[$movie['id']]['search'][$field][] = $key_word;\n }\n else{\n $movie['search'][$field][] = $key_word;\n $results[$movie['id']] = $movie;\n }\n }\n } \n }\n }\n }\n\n // Sort by number of accurate key words\n foreach ($results as $id => $movie) {\n $nbkword=array();\n foreach ($movie['search'] as $field) {\n foreach ($field as $keyword) {\n $nbkword[] = $keyword;\n } \n }\n $nbkword = array_unique($nbkword,SORT_STRING);\n $temp_results[count($nbkword)][$id] = $movie;\n }\n\n krsort($temp_results);\n\n $results = array();\n $results['key_words'] = $key_words;\n $results['results'] = $temp_results;\n return $results;\n}", "title": "" }, { "docid": "e5e91f395c01bd0cb09c46f24def4435", "score": "0.5067162", "text": "protected function getSearchResults()\n {\n $results = [];\n\n foreach ($this->resources as $resource) {\n $query = $resource::buildIndexQuery(\n $this->request, $resource::newModel()->newQuery(),\n $this->request->search\n );\n\n if (count($models = $query->limit(5)->get()) > 0) {\n $results[$resource] = $models;\n }\n }\n\n return collect($results)->sortKeys()->all();\n }", "title": "" }, { "docid": "fa0010b2409c553c2f22dd2f478688d8", "score": "0.5057908", "text": "public function actionGetDocumentsElasticSearch()\n\t{\n\t $ch = curl_init();\n\t $method = \"GET\";\n\t $url = \"http://desarrollo4.blendarsys.com:9200/zeki/document/_search\";\n\t \n\t $qry = '\n\t\t{\n \"from\" : 0, \n \"size\" : 100,\n \"query\": {\n \"match_all\": {}\n }\n\t\t}\n\t\t';\n\t \n\t curl_setopt($ch, CURLOPT_URL, $url);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n\t curl_setopt($ch, CURLOPT_POSTFIELDS, $qry);\n\t curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t 'Content-Type: application/json',\n\t 'Content-Length: ' . strlen($qry))\n\t );\n\t \n\t $results_elastic_search = curl_exec($ch);\n\t curl_close($ch);\n\t \n\t $json_results_elastic_search = json_decode($results_elastic_search, true);\n\t \n\t \n\t if($json_results_elastic_search['hits']['total'] > 0)\n\t {\n\t $registros = array();\n\t \n\t foreach($json_results_elastic_search['hits']['hits'] as $result)\n\t {\t \n\t try\n\t {\n \t $libro_obj = new Libros();\n \t $libro_obj->title = $result['_source']['title'];\n \t $libro_obj->author = $result['_source']['author'];\n \t $libro_obj->keywords = $result['_source']['keywords'];\n \t $libro_obj->magazine = $result['_source']['magazine'];\n \t $libro_obj->publication_date = $result['_source']['publicationDate'];\n \t $libro_obj->abstract = $result['_source']['abstract'];\n \t $libro_obj->content = $result['_source']['content'];\n \t $libro_obj->bibliography = $result['_source']['bibliography'];\n \t $libro_obj->file = $result['_source']['fileName'];\n \t \n \t if($libro_obj->save() == true)\n \t {\n \t $registros[] = array(\n \t 'source' => $result['_source'],\n \t 'mensaje' => 'Registrado',\n \t );\n \t }\n \t else\n \t {\n \t $registros[] = array(\n \t 'source' => $result['_source'],\n \t 'mensaje' => $libro_obj->getFirstErrors(),\n \t );\n \t }\n\t }\n\t catch(\\Exception $e)\n\t {\n\t $registros[] = array(\n\t 'source' => $result['_source'],\n\t 'mensaje' => $e->getMessage(),\n\t );\n\t }\n\t }\n\t \n\t \n\t $json_respuesta = array(\n\t 'message' => 'Documentos creados exitosamente...',\n\t 'registros' => $registros,\n\t );\n\t \n\t Yii::$app->response->format = Response::FORMAT_JSON;\n\t return $json_respuesta;\n\t \n\t }\n\t else\n\t {\n\t $json_respuesta = array(\n\t 'message' => 'URL not found...'\n\t );\n\t \n\t Yii::$app->response->format = Response::FORMAT_JSON;\n\t return $json_respuesta;\n\t }\n\t \n\t}", "title": "" }, { "docid": "2c75f9b19737f5f5d3643264c1f792ee", "score": "0.50553924", "text": "function find_institution($searchstring)\r\n{\r\n\tif ( !isset($searchstring) )\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\t$offset=0;\r\n\t$cl = new SphinxClient ();\r\n\t$sql = \"\";\r\n\r\n\t$host = \"localhost\";\r\n\t$port = 9312;\r\n\t$index = \"institutions\"; // \"*\" for all\r\n\t$groupby = \"\";\r\n\t$groupsort = \"@name\";\r\n\t$filtervals = array();\r\n\t$distinct = \"\";\r\n\t$sortby = \"\";\r\n\t$sortexpr = \"\";\r\n\r\n\t$limit = 100;\r\n\t$ranker = SPH_RANK_PROXIMITY_BM25;\r\n\t$select = \"\";\r\n\t$mode = SPH_MATCH_EXTENDED2;\r\n\r\n\t$cl->SetServer ( $host, $port );\r\n\t$cl->SetConnectTimeout ( 2 );\r\n\t$cl->SetArrayResult ( true );\r\n\t$cl->SetWeights ( array ( 100, 1 ) );\r\n\t$cl->SetMatchMode ( $mode );\r\n\tif ( count($filtervals) )\t$cl->SetFilter ( $filter, $filtervals );\r\n\tif ( $groupby )\t\t\t\t$cl->SetGroupBy ( $groupby, SPH_GROUPBY_ATTR, $groupsort );\r\n\tif ( $sortby )\t\t\t\t$cl->SetSortMode ( SPH_SORT_EXTENDED, $sortby );\r\n\tif ( $sortexpr )\t\t\t$cl->SetSortMode ( SPH_SORT_EXPR, $sortexpr );\r\n\tif ( $distinct )\t\t\t$cl->SetGroupDistinct ( $distinct );\r\n\tif ( $select )\t\t\t\t$cl->SetSelect ( $select );\r\n\tif ( $limit )\t\t\t\t$cl->SetLimits ( $offset, $limit, ( $limit>1000 ) ? $limit : 1000 );\r\n\t$cl->SetRankingMode ( $ranker );\r\n\tif(strlen($searchstring)>=2) $searchstring = '*'.$searchstring.'*';\r\n\t$res = $cl->Query ( $searchstring, $index );\r\n\r\n\tif ( $res===false )\r\n\t{\r\n\t\treturn false;\r\n\t} \r\n\telse\r\n\t{\r\n\r\n\t\tif ( is_array($res[\"matches\"]) )\r\n\t\t{\r\n\t\t\t$n = 1;\r\n\t\t\t$institution_ids=array();\r\n\t\t\tforeach ( $res[\"matches\"] as $docinfo )\r\n\t\t\t{\r\n\t\t\t\tif($docinfo[weight]>1900)\r\n\t\t\t\t{\r\n\t\t\t\t\t$institution_ids[] = $docinfo[id];\r\n\t\t\t\t}\r\n\t\t\t\t$n++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $institution_ids;\r\n}", "title": "" }, { "docid": "2478a9704ec04d97d3e7d53e4159259b", "score": "0.50521004", "text": "static function index_search($title)\n {\n $title = strtr($title, '_', ' ');\n $title = strtolower(trim($title));\n #wfDebug(\"looking up word [$title]\");\n\n try {\n require_once(\"xapian.php\");\n global $wgOfflineWikiPath;\n $db = new XapianDatabase(\"$wgOfflineWikiPath/db\");\n #$qp = new XapianQueryParser();\n #$qp->set_database($db);\n #$stemmer = new XapianStem(\"english\");\n #$qp->set_stemmer($stemmer);\n #$query = $qp->parse_query($title);\n $query = new XapianQuery($title);\n $enquire = new XapianEnquire($db);\n $enquire->set_query($query);\n $matches = $enquire->get_mset(0, 25);\n\n if (0 /*SCORING*/) {\n\t $scores = array();\n\t for ($i = $matches->begin(); !$i->equals($matches->end()); $i->next())\n\t {\n\t $row = $i->get_document();\n\t $str = $i->get_percent().\"% [\".$row->get_data().\"]\";\n\t $scores[] = $str;\n\t if (1/*DEBUG*/) wfDebug(\"$str\\n\");\n\t }\n }\n\n $result = array();\n for ($i = $matches->begin(); !$i->equals($matches->end()); $i->next())\n\t {\n\t\t $entry = $i->get_document()->get_data();\n\t\t $fsep = strpos($entry, ':');\n\t\t $row = array(substr($entry, 0, $fsep), substr($entry, $fsep + 1));\n\t\t $result[] = $row;\n }\n # not in Xapian 1.0.X\n #$db->close();\n\n return $result;\n\n } catch (Exception $e) {\n\twfDebug(__METHOD__.':'.$e->getMessage());\n\treturn null;\n }\n }", "title": "" }, { "docid": "a279c4d64560b5ef37ff5c9d5db7356a", "score": "0.50484204", "text": "function getTopMatchedDocs($length,$limit=10){\n $length=absint($length);\n $limit=absint($limit);\n $docIdentifies=$this->getDocIdentifier($length);\n $queries=array();\n for($i=0;$i<$this->m;$i++){\n $index=$i+1;\n $queries[]=\"(i{$length}$index=\".$docIdentifies[$i].')';\n }\n $jselect=join('+',$queries);\n $query=\"select ID,$jselect as jaccard from docs order by jaccard desc limit $limit\";\n //echo $query;\n $jaccardValues=$this->cdb->get_results($query);\n $results=array();\n if($jaccardValues){\n foreach($jaccardValues as $j){\n $results[$j->ID]=$j->jaccard/$this->m;\n }\n }\n return $results;\n }", "title": "" }, { "docid": "5a661631429052fffb05d5fe7ac7d06b", "score": "0.5044403", "text": "public function getViewedIds()\n {\n $collection = Mage::getModel('reports/product_index_viewed')->getCollection()\n ->addPriceData()\n ->addIndexFilter()\n ->setAddedAtOrder()\n ->setPageSize(5);\n\n Mage::getSingleton('catalog/product_visibility')\n ->addVisibleInSiteFilterToCollection($collection);\n\n return $collection->getColumnValues('entity_id');\n }", "title": "" }, { "docid": "4a50655490494368a34ccfed4624058e", "score": "0.50395495", "text": "private function _search($query, $formatting, $rows=10, $start=0) {\n $server_path = \"http://\".$this->host.\":\".$this->port.\"/solr/\".$this->core;\n if (!$this->checkURL($server_path.\"select\")) {\n error_log(\"Solr Host is inaccessible $server_path\");\n $_SESSION['feedback'] .= g_feedback(\"error\", \"Solr Host is inaccessible!\");\n return false;\n }\n // dump_var($query);\n // search\n $result = \"\";\n // print_r(\"Querying: \".PHP_EOL.$server_path.\"select?rows=$rows&start=$start&q=\".str_replace(\" \", \"+\", $query));\n $code = file_get_contents($server_path.\"select?rows=$rows&start=$start&wt=php&q=\".urlencode($query).$formatting);\n // print_r($code);\n eval(\"\\$result = \" . $code . \";\");\n // error_log(print_r($result, true));\n\n if ($result['response']['numFound'] > 0) {\n $result_arrays = array();\n $result_objects = array();\n $results = $result['response']['docs'];\n // print_r($result).PHP_EOL;\n $i = 0;\n if (array_key_exists('highlighting', $result)) {\n foreach ($result['highlighting'] as $k=>$v) {\n if (array_key_exists(\"content\", $v)) {\n $temp_array = array();\n $temp_array = $results[$i];\n if (array_key_exists(\"author\", $results[$i]) === false) {\n $temp_array['author'] = \"\";\n }\n $temp_array['filename'] = \"\";\n $temp_array['row_number'] = $i;\n $temp_array['content'] = $v['content'][0];\n $temp_array['content_type'] = $results[$i]['content_type'][0];\n if (strpos($temp_array['resourcename'], \"/\") !== false) {\n $file_array = explode(\"/\", $temp_array['resourcename']);\n $temp_array['filename'] = end($file_array);\n }\n if (array_key_exists('id', $result)) $temp_array['id'] = $results[$i]['id'];\n if (array_key_exists('sha1', $result)) $temp_array['sha1'] = $results[$i]['sha1'];\n if (array_key_exists('sha256', $result)) $temp_array['sha256'] = $results[$i]['sha256'];\n $temp_object = new stdClass();\n array2object(array($temp_array), $temp_object);\n $result_arrays[$i] = $temp_array;\n $result_objects[$i] = $temp_object;\n // $results[$i]['row_number'] = $i;\n // $results[$i]['content'] = $v['content'][0];\n // $results[$i]['content_type'] = $results[$i]['content_type'][0];\n } else {\n $temp_array = array();\n $temp_array[] = array('resourcename' => $k);\n if (array_key_exists('id', $result)) $temp_array['id'] = $results[$i]['id'];\n if (array_key_exists('sha1', $result)) $temp_array['sha1'] = $results[$i]['sha1'];\n if (array_key_exists('sha256', $result)) $temp_array['sha256'] = $results[$i]['sha256'];\n $temp_object = new stdClass();\n array2object(array($temp_array), $temp_object);\n $result_arrays[$i] = $temp_array;\n $result_objects[$i] = $temp_object;\n }\n $i++;\n }\n } elseif (array_key_exists('resourcename', $results)) {\n foreach ($result['resourcename'] as $k=>$v) {\n $temp_array = array();\n $temp_array[] = array('resourcename' => $k);\n if (array_key_exists('id', $result)) $temp_array['id'] = $results[$i]['id'];\n if (array_key_exists('sha1', $result)) $temp_array['sha1'] = $results[$i]['sha1'];\n if (array_key_exists('sha256', $result)) $temp_array['sha256'] = $results[$i]['sha256'];\n $temp_object = new stdClass();\n array2object(array($temp_array), $temp_object);\n $result_arrays[$i] = $temp_array;\n $result_objects[$i] = $temp_object;\n $i++;\n }\n } else {\n foreach ($results as $r) {\n if (array_key_exists('resourcename', $r)) {\n $temp_array = array();\n $temp_array = array('resourcename' => $r['resourcename']);\n if (array_key_exists('id', $r)) $temp_array['id'] = $r['id'];\n if (array_key_exists('sha1', $r)) $temp_array['sha1'] = $r['sha1'];\n if (array_key_exists('sha256', $r)) $temp_array['sha256'] = $r['sha256'];\n $temp_object = new stdClass();\n array2object(array($temp_array), $temp_object);\n $result_arrays[] = $temp_array;\n $result_objects[] = $temp_object;\n }\n }\n }\n if (empty($result_arrays)) {\n return array('total' => $result['response']['numFound']);\n }\n return array('total' => $result['response']['numFound'], 'result_arrays' => $result_arrays, 'result_objects' => $result_objects);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0c1c76c458a13007b529b11a264b1bce", "score": "0.50326073", "text": "function tokenize_for_solr( $title, $counter=0 ) {\n $stopwords = 'a,an,and,are,as,at,be,but,by,for,if,in,into,is,it,no,not,of,on,or,s,such,t,that,the,their,then,there,these,they,this,to,was,will,with';\n $ignore = explode( ',', $stopwords );\n $keywords = preg_split( \"/[^a-zA-Z_0-9]+/\", $title, NULL, PREG_SPLIT_NO_EMPTY );\n $limit = count( $keywords );\n if ( $counter > 0 ) { $limit--; } \n $query = \"\";\n \n for ($k=0; $k<$limit; $k++) {\n $lcToken = strtolower($keywords[$k]);\n if (!in_array($lcToken, $ignore)) { $query .= \"$lcToken \"; }\n }\n \n return trim($query);\n}", "title": "" }, { "docid": "a64dc4ca8d6369b12368b4f9516ebaba", "score": "0.5031877", "text": "public function getKeywords($id= 0) {\n if ($id == 0) {\n $id= $this->documentObject['id'];\n }\n $tblKeywords= $this->getFullTableName('site_keywords');\n $tblKeywordXref= $this->getFullTableName('keyword_xref');\n $sql= \"SELECT keywords.keyword FROM \" . $tblKeywords . \" AS keywords INNER JOIN \" . $tblKeywordXref . \" AS xref ON keywords.id=xref.keyword_id WHERE xref.content_id = '$id'\";\n $result= $this->db->query($sql);\n $limit= $this->db->getRecordCount($result);\n $keywords= array ();\n if ($limit > 0) {\n for ($i= 0; $i < $limit; $i++) {\n $row= $this->db->getRow($result);\n $keywords[]= $row['keyword'];\n }\n }\n return $keywords;\n }", "title": "" }, { "docid": "db8e9d6d7c7ff93f35ee01df66c7ea42", "score": "0.501769", "text": "function apachesolr_index_page() {\r\n $data = (object) array();\r\n try {\r\n $solr = apachesolr_get_solr();\r\n // TODO: possibly clear this every page view if we are running multi-site.\r\n if (apachesolr_index_updated()) {\r\n $solr->clearCache();\r\n }\r\n $data = $solr->getLuke();\r\n }\r\n catch (Exception $e) {\r\n watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);\r\n drupal_set_message(nl2br(check_plain($e->getMessage())), \"warning\");\r\n $data->fields = array();\r\n }\r\n\r\n $output = '';\r\n if (isset($data->index->numDocs)) {\r\n $pending_docs = $delay_msg = $delete_msg = '';\r\n try {\r\n $stats_summary = $solr->getStatsSummary();\r\n $solr_msg = '<p>' . t('Using schema.xml version: <strong>@schema_version</strong>', $stats_summary);\r\n if ($stats_summary['@core_name']) {\r\n $solr_msg .= '<br />' . t('Solr core name: <strong>@core_name</strong>', $stats_summary);\r\n }\r\n $delay_msg = '<br />' . t('<em>The server has a @autocommit_time delay before updates are processed.</em>', $stats_summary) . \"</p>\\n\";\r\n $delete_msg = '<p>' . t('Number of pending deletions: @deletes_total', $stats_summary) . \"</p>\\n\";\r\n }\r\n catch (Exception $e) {\r\n watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);\r\n }\r\n $output .= $solr_msg . $delay_msg;\r\n $pending_msg = $stats_summary['@pending_docs'] ? t('(@pending_docs sent but not yet processed)', $stats_summary) : '';\r\n $output .= '<p>' . t('Number of documents in index: @num !pending', array('@num' => $data->index->numDocs, '!pending' => $pending_msg)) . \"</p>\\n\";\r\n $output .= $delete_msg;\r\n }\r\n $output .= '<p>' . l(t('View more details on the search index contents'), 'admin/reports/apachesolr') . \"</p>\\n\";\r\n if (variable_get('apachesolr_read_only', APACHESOLR_READ_WRITE) == APACHESOLR_READ_WRITE) {\r\n // Display the Delete Index form.\r\n $output .= drupal_get_form('apachesolr_delete_index_form');\r\n }\r\n else {\r\n drupal_set_message(t('The index is in read-only mode. Options for deleting and re-indexing are therefore not available. The index mode can be changed on the !settings_page', array('!settings_page' => l(t('settings page'), 'admin/settings/apachesolr'))), 'warning');\r\n }\r\n\r\n return $output;\r\n}", "title": "" }, { "docid": "1041d51caf828bdc5ce863bc62c6d21b", "score": "0.5017647", "text": "public static function getEntities( Application_Model_User $user, $idDocument ){\r\t\t\r\t\treturn Application_Model_SubEntitiesDocumentsMapper::getEntities( $user, $idDocument );\r\t\t$stmt = Anta_Core::mysqli()->query( \"\r\t\t SELECT id_entity,\r\t\t\t\tcount( id_entity ) AS occurrences,\r\t\t\t\tcount( distinct id_document ) as spread,\r\t\t\t\tcontent,\r\t\t\t\tgroup_concat( distinct anta_\".$user->username.\".entities.type) as type, \r\t\t\t\tAVG( anta_\".$user->username.\".entities_occurrences.relevance ) as avg_relevance,\r\t\t\t\tMIN( anta_\".$user->username.\".entities_occurrences.relevance ) as min_relevance,\r\t\t\t\tMAX( anta_\".$user->username.\".entities_occurrences.relevance ) as max_relevance\r\t\t\tFROM anta_\".$user->username.\".entities_occurrences JOIN anta_\".$user->username.\".entities \r\t\t\t\tUSING ( id_entity )\r\t\t\tWHERE id_document = ?\r\t\t\tGROUP BY id_entity\r\t\t\tORDER BY avg_relevance DESC\",array( $idDocument ) );\r\t\t\t\r\t\t$results = array();\r\t\t\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t$buffer = new Application_Model_Entity( $row->id_entity, $row->content, $row->type, $row->avg_relevance );\r\t\t\t\r\t\t\t$buffer->minRelevance = $row->min_relevance;\r\t\t\t$buffer->maxRelevance = $row->max_relevance;\r\t\t\t$buffer->spread = $row->spread;\r\t\t\t$buffer->occurrences = $row->occurrences;\r\t\t\t\r\t\t\t$results[] = $buffer;\r\t\t\t\r\t\t}\r\t\t\r\t\treturn $results;\r\t}", "title": "" }, { "docid": "56d03cc2490f482802a1b9ba47443d11", "score": "0.5013342", "text": "protected function _getFindologicSearchResult(){\n \treturn $this->getLayer()->getProductCollection()->getFindologicSearchResult();\n }", "title": "" }, { "docid": "90f9bd4a5b754d5c0aef1bfa2160f7e9", "score": "0.50045145", "text": "public function getMostRecentRecords(): array\n {\n $documents = [];\n $mongo = new Client(env('MONGO_LINEPIG_CONN'), [], config('emuconfig.mongodb_conn_options'));\n\n if (App::environment() === \"production\") {\n $searchCollection = $mongo->linepig->search;\n } else {\n $searchCollection = $mongo->linepig->search_dev;\n }\n\n $daysAgoCarbon = Carbon::now('UTC')->subDays(config('emuconfig.homepage_days_ago_for_recent_records'));\n $utcDaysAgo = new \\MongoDB\\BSON\\UTCDateTime($daysAgoCarbon);\n $filter = [\n 'keywords' => ['$in' => ['primary']],\n 'date_created' => ['$gte' => $utcDaysAgo],\n ];\n\n $cursor = $searchCollection->find($filter);\n if (is_null($cursor)) {\n return [];\n }\n\n foreach ($cursor as $document) {\n $documents[] = $document;\n }\n\n // Sort the results\n usort($documents, function($a, $b) {\n $genusComp = $a['genus'] <=> $b['genus'];\n if ($genusComp !== 0) {\n return $genusComp;\n }\n\n return $a['species'] <=> $b['species'];\n });\n\n $records = [];\n foreach ($documents as $document) {\n $record = [];\n $genus = $document['genus'];\n $species = $document['species'];\n $text = \"$genus $species\";\n $link = env('APP_URL', \"https://linepig.fieldmuseum.org\") .\n \"/search-results/genus/$genus/species/$species/keywords/none\";\n\n $record['text'] = $text;\n $record['link']= $link;\n $records[] = $record;\n }\n\n return $records;\n }", "title": "" }, { "docid": "8c5917ee93f5d80eb2e3faf8dbda08df", "score": "0.49881133", "text": "public static function find( Application_Model_User $antaUser, array $words, $offset=\"0\", $limit=\"20\", $orderBy=\"id_document\", $orderDir=\"DESC\", $useCoOccurrencesTable = true, $useStemming = true, $leakCoOccurrence = false ){\r\t\t/*\r\t\tif( $useStemming ){\r\t\t\t\"SELECT COUNT( DISTINCT stem_A ) as relevance, MIN( distance ) as distance, co_occurrences.id_document, id_sentence, content, stem_A, stem_B, word_A, word_B, distance FROM `co_occurrences` INNER JOIN sentences USING (id_sentence) WHERE stem_A IN ( \"unknown\", \"aircraft\", \"compani\" ) AND stem_B IN ( \"unknown\", \"aircraft\", \"compani\" ) GROUP BY id_sentence ORDER BY relevance DESC, distance ASC\r\t\t\";}\r\t\t*/\r\t\t\r\t}", "title": "" }, { "docid": "5ff3c80c88f3b2513f0031bb62438f1d", "score": "0.4974258", "text": "public function getTerms()\r\n {\r\n if (is_null($this->xapianDocument))\r\n throw new Exception('Pas de document courant');\r\n\r\n// $indexName=array_flip($this->schema['index']);\r\n// $entryName=array_flip($this->schema['entries']);\r\n\r\n $result=array();\r\n\r\n $begin=$this->xapianDocument->termlist_begin();\r\n $end=$this->xapianDocument->termlist_end();\r\n while (!$begin->equals($end))\r\n {\r\n $term=$begin->get_term();\r\n if (false === $pt=strpos($term,':'))\r\n {\r\n $kind='index';\r\n $index='*';\r\n }\r\n else\r\n {\r\n //print_r($this->lookuptableById);\r\n //die();\r\n $prefix=substr($term,0,$pt);\r\n if($prefix[0]==='T')\r\n {\r\n $kind='lookup';\r\n $prefix=substr($prefix, 1);\r\n $index=$this->lookuptableById[$prefix]->name; //$entryName[$prefix];\r\n }\r\n else\r\n {\r\n $kind='index';\r\n// $index=$prefix; //$indexName[$prefix];\r\n $index=$this->indexById[$prefix]->name;\r\n }\r\n $term=substr($term,$pt+1);\r\n }\r\n\r\n $posBegin=$begin->positionlist_begin();\r\n $posEnd=$begin->positionlist_end();\r\n $pos=array();\r\n while(! $posBegin->equals($posEnd))\r\n {\r\n $pos[]=$posBegin->get_termpos();\r\n $posBegin->next();\r\n }\r\n// echo \"kind=$kind, index=$index, term=$term<br />\";\r\n $result[$kind][$index][$term]=array\r\n (\r\n 'freq'=>$begin->get_termfreq(),\r\n 'wdf'=>$begin->get_wdf(),\r\n// 'positions'=>$pos\r\n );\r\n if ($pos)\r\n $result[$kind][$index][$term]['positions']=$pos;\r\n\r\n //'freq='.$begin->get_termfreq(). ', wdf='. $begin->get_wdf();\r\n $begin->next();\r\n }\r\n foreach($result as &$t)\r\n ksort($t);\r\n return $result;\r\n }", "title": "" }, { "docid": "c785b68822f1d4f8963a722e7dc70f21", "score": "0.4971784", "text": "function getSearchIndexWordsInSearchResult($search_id)\n {\n $result = execQuery('SELECT_SEARCH_INDEX_WORDS_IN_SEARCH_RESULT', array('search_id'=>$search_id));\n if (isset($result[0]['words']))\n {\n $this->updateSearchResultAccessTime($search_id);\n return unserialize($result[0]['words']);\n }\n else\n {\n return array();\n }\n }", "title": "" }, { "docid": "9d1c3a3f18ffc42dad3c1459143d4253", "score": "0.49635988", "text": "public function getIdsBySearchTerm($searchTerm)\n {\n $query = $this->createQuery();\n $constraint = [];\n $constraint[] = $query->like('title', '%' . $searchTerm . '%');\n $constraint[] = $query->like('description', '%' . $searchTerm . '%');\n $query->matching($query->logicalOr($constraint));\n $rows = $query->execute(true);\n\n $ids = [];\n foreach ($rows as $row) {\n $ids[] = (int)$row['uid'];\n }\n return $ids;\n }", "title": "" }, { "docid": "4664d8cd8026dc986ca186fc4f3d74fa", "score": "0.4960828", "text": "public function getReferenceDocs($str_val) {\n $ref_uuid = array();\n $ref_result = $this->getFilters($str_val);\n if ($ref_result) {\n foreach ($ref_result as $rows) {\n $ref_uuid[] = $rows['_id'];\n }\n }\n return $ref_uuid;\n }", "title": "" }, { "docid": "5549ebd23b923f55a13ec44c62acf60a", "score": "0.49542496", "text": "public function getDocuments(){\n\t\t$ch = curl_init();\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->host.$this->db.'/_all_docs?include_do‌​cs=true');\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t\t'Content-type: application/json',\n\t\t\t\t'Accept: */*'\n\t\t));\t\t\n\t\t\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\t\t\n\t\t\n\t\t// prepare document\n\t\t$data = json_decode($response);\n\t\tif(isset($data->error)){\n\t\t\tdie($data->error);\n\t\t}else{\n\t\t\t$document = [];\n\t\t\t$counter = count($data->rows);\n\t\t\tif($counter > 0){\n\t\t\t\t\n for($i =0; $i < $counter; $i++){\n $uid = $data->rows[$i]->id;\n $document['data'][] = $this->getDocumentByID($uid);\n }\n return $document;\n \n\t\t\t}else{\n\t\t\t\treturn false;\n \n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "c61fcf7b0a9ec1d849f3f4f2e3b48392", "score": "0.4946667", "text": "public function getPositionsForDocuments(){\r\n \t$all_positions = CalculationPosition::getAllCalculationPositions($this->getId(), true);\r\n \treturn $all_positions;\r\n }", "title": "" }, { "docid": "f412191438325445f204c7560964657f", "score": "0.49449497", "text": "function queryMongo($searchArray) {\n\t\tglobal $activities, $textbooks, $dictionary, $chapters, $timelines;\n\n\t\t$chapter_cursor = $chapters->find($searchArray);\n\t\t$textbook_cursor = $textbooks->find($searchArray);\n\t\t$activities_cursor = $activities->find($searchArray);\n\t\t$dictionary_cursor = $dictionary->find($searchArray);\n\n\t\t$docArrays = array();\n\t\t$chapterArray = array();\n\t\t$textbookArray = array();\n\t\t$actArray = array();\n\t\t$dictArray = array();\n\t\t// $i = 0;\n\n\t\tforeach($chapter_cursor as $doc) {\n\t\t\tif(isset($doc)) {\n\t\t\t\tarray_push($chapterArray, $doc);\n\t\t\t\t// $chapterArray[] = $doc;\n\t\t\t\t// echo (\"ADDINGCHAPTER!!!\");\n\t\t\t\t// echo json_encode($chapterArray);\n\t\t\t}\n\t\t}\n\t\tforeach($textbook_cursor as $doc) {\n\t\t\tif(isset($doc)) {\n\t\t\t\tarray_push($textbookArray, $doc);\n\t\t\t\t// echo (\"textbooks\");\n\t\t\t}\n\t\t}\n\t\tforeach($activities_cursor as $doc) {\n\t\t\tif(isset($doc)) {\n\t\t\t\tarray_push($actArray, $doc);\n\t\t\t}\n\t\t}\n\t\tforeach($dictionary_cursor as $doc) {\n\t\t\tif(isset($doc)) {\n\t\t\t\tarray_push($dictArray, $doc);\n\t\t\t}\n\t\t}\n\n\n\t\t// foreach($activities_cursor as $doc)\n\t\t// {\n\t\t// \tif(isset($doc))\n\t\t// \t{\n\t\t// \t\t$actArray[$i] = $doc;\n\t\t// \t\t// echo json_encode($doc);\n\t\t// \t\t$i++;\n\t\t// \t}\n\t\t// }\n\t\t// $i = 0;\n\t\t// foreach($dictionary_cursor as $doc)\n\t\t// {\n\t\t// \tif(isset($doc))\n\t\t// \t{\n\t\t// \t\t$dictArray[$i] = $doc;\n\t\t// \t\t// echo json_encode($doc);\n\t\t// \t\t$i++;\n\t\t// \t}\n\t\t// }\n\t\t// $i = 0;\n\t\t// foreach($textbook_cursor as $doc)\n\t\t// {\n\t\t// \tif(isset($doc))\n\t\t// \t{\n\t\t// \t\t$textbookArray[$i] = $doc;\n\t\t// \t\t//echo json_encode($doc);\n\t\t// \t\t$i++;\n\t\t// \t}\n\t\t// }\n\t\t// $i = 0;\n\t\t// foreach($chapter_cursor as $doc)\n\t\t// {\n\t\t// \tif(isset($doc))\n\t\t// \t{\n\t\t// \t\t$chapterArray[$i] = $doc;\n\t\t// \t\t//echo json_encode($doc);\n\t\t// \t\t$i++;\n\t\t// \t}\n\t\t// }\n\t\t// $docArrays[] = \n\t\t// echo json_encode($docArrays);\n\t\tarray_push($docArrays, $chapterArray, $textbookArray, $actArray, $dictArray);\t// This is an array of arrays\n\t\t// echo json_encode($chapterArray);\n\t\treturn $docArrays;\n\t}", "title": "" }, { "docid": "2fa1ab3a9a7a45f423306b0e752be4af", "score": "0.49311003", "text": "public function indexAction() \n {\n $mongo = MongoObject::getInstance();\n $collection = $mongo->getCollection('demo'); //->insert(array('id' => 'abc' ) );\n $data = $mongo->find( array('loc' => array( '$near' => array(113.182, 69.111) ) ) );\n\n $mongo->close();\n var_dump( iterator_to_array( $data ) );\n }", "title": "" }, { "docid": "2e55378d9aeb281cd84850fffdef166d", "score": "0.49306837", "text": "public function get($columns = array('*'))\n\t{\n\t\tif (!$this->applyTagFilters()) {\n\t\t\tif (!empty($this->aggregate)) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn $this->model->newCollection();\n\t\t}\n\t\t\n\t\tif (!empty($this->aggregate)) {\n\t\t\treturn parent::get($columns);\n\t\t}\n\t\telse {\n\t\t\t$results = parent::get(array('t.xref_id'));\n\t\t}\n\t\t\n\t\tif (empty($results)) {\n\t\t\treturn $this->model->newCollection();\n\t\t}\n\t\t\n\t\t$xref_ids = array();\n\t\tforeach ($results as $result) {\n\t\t\tif (!isset($result->xref_id)) continue;\n\t\t\t$xref_ids[] = $result->xref_id;\n\t\t}\n\t\t\n\t\tif (empty($xref_ids)) {\n\t\t\treturn $this->model->newCollection();\n\t\t}\n\t\t\n\t\t$key = $this->model->getKeyName();\n\t\t\n\t\t$models = $this->model->newQuery()->whereIn($key, $xref_ids)->get();\n\t\t\n\t\t$models->sortBy(function ($model) use ($xref_ids, $key) {\n\t\t\tforeach ($xref_ids as $idx => $i) {\n\t\t\t\tif ($model->{$key} == $i) {\n\t\t\t\t\treturn $idx;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t});\n\t\t\n\t\tif (!empty($this->relations)) {\n\t\t\t$models->load($this->relations);\n\t\t}\n\t\t\n\t\treturn $models;\n\t}", "title": "" }, { "docid": "de6ae8a23c2c7a294dde1f4d27c154a3", "score": "0.49278954", "text": "abstract public function searchRetrieve( Query $search, $start = 1, $max = 10, $sort = \"\" );", "title": "" }, { "docid": "928902fb2cddf08cb0348be5779acfee", "score": "0.4923789", "text": "public function buildDocuments()\n {\n $repositories = $this->store->getRepositories();\n $documents = [];\n\n foreach ($repositories as $repo) {\n $documents[] = $this->buildSolrDocument($repo);\n }\n\n return $documents;\n }", "title": "" }, { "docid": "cd931d3175d65d1fecf15f5786687d92", "score": "0.49231628", "text": "function asu_isearch_get_field_solr_mappings() {\n\n $map = array(\n //'status' => 'status',\n 'field_isearch_displayname' => 'displayName',\n 'field_isearch_firstname' => 'firstName',\n 'field_isearch_lastname' => 'lastName',\n 'field_isearch_employment_title' => 'primaryTitle',\n 'field_isearch_eid' => 'eid',\n 'field_isearch_asurite_id' => 'asuriteId',\n 'field_isearch_email' => 'emailAddress',\n 'field_isearch_phone' => 'phone',\n 'field_isearch_fax' => 'fax',\n 'field_isearch_campus_building' => 'addressLine1',\n 'field_isearch_campus_room' => 'addressLine2',\n 'field_isearch_primary_campus' => 'primaryJobCampus',\n 'field_isearch_photo_preference' => 'photoPreference',\n 'field_isearch_photo_permission' => 'photoPermission',\n 'field_isearch_social_twitter' => 'twitterLink',\n 'field_isearch_social_facebook' => 'facebook',\n 'field_isearch_social_linkedin' => 'linkedin',\n 'field_isearch_social_googleplus' => 'googlePlus',\n 'field_isearch_social_personalweb' => 'website',\n 'field_isearch_short_bio' => 'shortBio',\n 'field_isearch_bio' => 'bio',\n 'field_isearch_education' => 'education',\n 'field_isearch_cv_url' => 'cvUrl',\n 'field_isearch_rsrch_website' => 'researchWebsite',\n 'field_isearch_rsrch_interests' => 'researchInterests',\n 'field_isearch_rsrch_group' => 'researchGroup',\n 'field_isearch_rsrch_activity' => 'researchActivity',\n 'field_isearch_rsrch_publications' => 'publications',\n 'field_isearch_tch_website' => 'teachingWebsite',\n 'field_isearch_tch_courses' => 'courses',\n 'field_isearch_tch_presentations' => 'presentations',\n 'field_isearch_honors_awards' => 'honorsAwards',\n 'field_isearch_editorships' => 'editorships',\n 'field_isearch_prof_associations' => 'professionalAssociations',\n 'field_isearch_graduate_faculties' => 'graduateFaculties',\n 'field_isearch_work_history' => 'workHistory',\n 'field_isearch_service' => 'service',\n );\n\n return $map;\n\n}", "title": "" }, { "docid": "712a4fe6fb98e0267efaf7ccf1f1a21f", "score": "0.49136892", "text": "function commerce_pos_product_search_api_search($keywords) {\n $results = array();\n\n // Check if an index has been selected.\n if ($index_id = variable_get('commerce_pos_search_api_index')) {\n if ($index_id != 'default') {\n $index = search_api_index_load($index_id);\n $query = new SearchApiQuery($index);\n if (variable_get('commerce_pos_search_published_only', FALSE) && isset($index->getFields()['status'])) {\n $query->condition('status', 1);\n }\n $query->keys($keywords);\n $query->range(0, variable_get('commerce_pos_search_results_count', 5));\n $query_results = $query->execute();\n\n if (!empty($query_results['results'])) {\n $results = array_keys($query_results['results']);\n }\n }\n }\n return $results;\n}", "title": "" }, { "docid": "0ce8a816056006a8f96430608d62b249", "score": "0.4905622", "text": "function _atrium_apachesolr_search_strongarm() {\n $export = array();\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_cron_limit';\n $strongarm->value = '50';\n\n $export['apachesolr_cron_limit'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_enabled_facets';\n $strongarm->value = array(\n 'apachesolr_search' => array(\n 'uid' => 'uid',\n 'type' => 'type',\n 'im_vid_1' => 'im_vid_1',\n ),\n 'apachesolr_og' => array(\n 'im_og_gid' => 'im_og_gid',\n ),\n );\n\n $export['apachesolr_enabled_facets'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_failure';\n $strongarm->value = 'show_error';\n\n $export['apachesolr_failure'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_mlt_blocks';\n $strongarm->value = array(\n 'mlt-001' => array(\n 'name' => 'More like this',\n 'num_results' => '5',\n 'mlt_fl' => array(\n 'title' => 'title',\n 'taxonomy_names' => 'taxonomy_names',\n ),\n 'mlt_mintf' => '1',\n 'mlt_mindf' => '1',\n 'mlt_minwl' => '3',\n 'mlt_maxwl' => '15',\n 'mlt_maxqt' => '20',\n 'mlt_type_filters' => array(\n '0' => 'blog',\n '1' => 'book',\n '2' => 'event',\n '3' => 'feed_ical',\n '4' => 'feed_ical_item',\n '5' => 'group',\n '6' => 'profile',\n '7' => 'shoutbox',\n '8' => 'casetracker_basic_case',\n '9' => 'casetracker_basic_project',\n ),\n 'mlt_custom_filters' => '',\n ),\n );\n\n $export['apachesolr_mlt_blocks'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_og_groupnode';\n $strongarm->value = '1';\n\n $export['apachesolr_og_groupnode'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_read_only';\n $strongarm->value = '0';\n\n $export['apachesolr_read_only'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_rows';\n $strongarm->value = '10';\n\n $export['apachesolr_rows'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_search_default_previous';\n $strongarm->value = '0';\n\n $export['apachesolr_search_default_previous'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_search_make_default';\n $strongarm->value = '0';\n\n $export['apachesolr_search_make_default'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_search_spellcheck';\n $strongarm->value = 1;\n\n $export['apachesolr_search_spellcheck'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_search_taxonomy_links';\n $strongarm->value = '0';\n\n $export['apachesolr_search_taxonomy_links'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_search_taxonomy_previous';\n $strongarm->value = '0';\n\n $export['apachesolr_search_taxonomy_previous'] = $strongarm;\n $strongarm = new stdClass;\n $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */\n $strongarm->api_version = 1;\n $strongarm->name = 'apachesolr_set_nodeapi_messages';\n $strongarm->value = '1';\n\n $export['apachesolr_set_nodeapi_messages'] = $strongarm;\n return $export;\n}", "title": "" }, { "docid": "393c091f2af60c8509191fe461b4c0c3", "score": "0.48901328", "text": "public static function getKeywordsByRelevance($types = array()) {\n $result = array();\n $db = JFactory::getDbo();\n if (empty($types) || (array_search('publications', $types) !== FALSE \n && array_search('projects', $types) !== FALSE)) {\n $query = \"SELECT kw.keyword as keyword, count(R.id) as relevance FROM \"\n . $db->quoteName('#__jresearch_keyword').\" kw, \"\n . \"(SELECT id_publication as id, keyword FROM \"\n . $db->quoteName('#__jresearch_publication_keyword')\n . \" UNION SELECT id_project as id, keyword FROM \"\n . $db->quoteName('#__jresearch_project_keyword')\n . \") as R WHERE R.keyword = kw.keyword GROUP BY kw.keyword\";\n } else if (array_search('publications', $types) !== FALSE) {\n $query = \"SELECT kw.keyword as keyword, count(pubkw.id_publication) \"\n . \"as relevance FROM \"\n . $db->quoteName('#__jresearch_keyword'). \" \" \n . \"kw, \".$db->quoteName('#__jresearch_publication_keyword').\" \"\n . \"pubkw WHERE pubkw.keyword = kw.keyword GROUP BY kw.keyword\"; \n } else if (array_search('projects', $types) !== FALSE){\n $query = \"SELECT kw.keyword as keyword, count(pjkw.id_project) \"\n . \"as relevance FROM \"\n . $db->quoteName('#__jresearch_keyword'). \" \" \n . \"kw, \".$db->quoteName('#__jresearch_project_keyword').\" \"\n . \"pjkw WHERE pjkw.keyword = kw.keyword GROUP BY kw.keyword\"; \n } else {\n return $result;\n }\n \n $db->setQuery($query);\n $db->execute();\n return $db->loadAssocList();\n }", "title": "" }, { "docid": "28d16b99967cbf94dfe4bdf965bba403", "score": "0.4889812", "text": "function icu_solr_query($q, $fl) {\n // The following block of code builds an HTTP Solr request. As such, it\n // does NOT adhere to user permissions per XACML. It was designed to\n // avoid possible recursion with Islandora's solr queries.\n // Build the collections list query...\n $url = variable_get('islandora_solr_url', 'localhost:8080/solr');\n $request = 'http://' . $url . '/select?q=' . $q . '&fl=' . $fl . '&wt=php&rows=999';\n // Build and execute a Solr query for basic collections.\n //\n // !!! Important !!!\n // This cannot be an IslandoraSolrQueryProcessor( ) instance. Doing that\n // is likely to introduce recursion in the islandora_solr_search hooks!\n //\n // Solr query code from http://wiki.apache.org/solr/SolPHP\n //\n $code = file_get_contents($request);\n if ($code) {\n eval(\"\\$result = \" . $code . \";\");\n if ($result) {\n $found = (isset($result['response']['numFound']) ? $result['response']['numFound'] : FALSE);\n if ($found) {\n $c = $result['response']['docs'];\n return $c;\n }\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "a67a5947be4bfc0fdd0af84c30b31b4b", "score": "0.4888374", "text": "public function mapIds($results)\n {\n return collect($results['hits'])->pluck('objectID')->values();\n }", "title": "" }, { "docid": "28712f747c228d86074ddeb83f0e48d4", "score": "0.48880857", "text": "static function findByIds($ids, $min_state = STATE_VISIBLE, $min_visibility = VISIBILITY_NORMAL) {\n return Documents::find(array(\n 'conditions' => array('id IN (?) AND state >= ? AND visibility >= ?', $ids, $min_state, $min_visibility), \n 'order' => 'name', \n ));\n }", "title": "" }, { "docid": "9916d1eb3763312a2996f7bcc3964d64", "score": "0.48814115", "text": "public function getSolrData($id){\n $slides = $this->getAdapter();\n $select = $slides->select()\n ->from($this->_name,array(\n 'identifier' => 'CONCAT(\"images-\",imageID)',\n 'id' => 'imageID',\n 'title' => 'label', \n 'filename',\n 'keywords',\n 'createdBy',\n 'updated',\n 'created'\n ))\n ->joinLeft('periods',$this->_name . '.period = periods.id',\n array('broadperiod' => 'term'))\n ->joinLeft('finds_images','finds_images.image_id = slides.secuid',\n array())\n ->joinLeft('finds','finds_images.find_id = finds.secuid',\n array('old_findID','findID' => 'finds.id'))\n ->joinLeft('findspots','finds.secuid = findspots.findID',\n array(\n 'woeid',\n 'latitude' => 'declat',\n 'longitude' => 'declong',\n 'coordinates' => 'CONCAT( findspots.declat, \",\", findspots.declong )',\n 'county'\n ))\n ->joinLeft('users','slides.createdBy = users.id',\n array('imagedir','fullname'))\n ->joinLeft('licenseType','slides.ccLicense = licenseType.id',\n array('licenseAcronym' => 'acronym' ,'license' => 'flickrID'))\n ->where('slides.imageID = ?',(int)$id);\n return $slides->fetchAll($select);\n }", "title": "" }, { "docid": "3e2956a41065619ad454f49eaa90be38", "score": "0.48678198", "text": "function get_occurrences() {\n global $DB;\n\n \t// Get all global occurrences\n \t$sql = \"SELECT o.id AS id,\n o.name AS name,\n\t\t\t\t o.local as local,\n o.code_referentiel AS code\n FROM {referentiel_referentiel} o ORDER BY o.local ASC, o.code_referentiel ASC\n\";\n\n \tif (!$occurrences = $DB->get_records_sql($sql, array())) {\n \t$occurrences = array();\n \t}\n\n \treturn $occurrences;\n\n\t}", "title": "" }, { "docid": "f7d3ce6e620d1f65a30a57bbd9b397a9", "score": "0.48672202", "text": "private function getKeywords()\n {\n $this->viewVar['keys'] = array();\n \n $keywords = array();\n \n // get text related keywords\n $this->model->action('misc','getKeywordIds', \n array('result' => & $keywords,\n 'id_text' => (int)$this->current_id_text));\n\n foreach($keywords as $key)\n {\n $tmp = array();\n $tmp['id_key'] = $key; \n \n $keyword = array();\n $this->model->action('keyword','getKeyword', \n array('result' => & $keyword,\n 'id_key' => (int)$key,\n 'fields' => array('title','id_key'))); \n $branch = array();\n // get keywords branches\n $this->model->action('keyword','getBranch', \n array('result' => & $branch,\n 'id_key' => (int)$key,\n 'fields' => array('title','id_key'))); \n\n $tmp['branch'] = '';\n \n foreach($branch as $bkey)\n {\n $tmp['branch'] .= '/'.$bkey['title'];\n }\n \n $tmp['branch'] .= '/<strong>'.$keyword['title'].'</strong>';\n \n $this->viewVar['keys'][] = $tmp;\n }\n sort($this->viewVar['keys']); \n }", "title": "" }, { "docid": "08105c2b5b117e5997ffa6c63c649811", "score": "0.48672065", "text": "public function get_doclist() {\n $q = \"SELECT * FROM documents\";\n if (!$r = $this->_query($q)){\n $this->log_error(__FILE__, __FUNCTION__, __LINE__, $q);\n return false;\n }\n $ret;\n while ($str = $this->_fetch_assoc($r)) {\n if (!$this->doc_get_deletedP($str['name'])){\n $ret[] = $str;\n }\n }\n return $ret;\n }", "title": "" }, { "docid": "e3e77458269e52d384c9273269178fb0", "score": "0.48664007", "text": "function apachesolr_mlt_get_fields() {\r\n $solr = apachesolr_get_solr();\r\n $fields = $solr->getFields();\r\n $rows = array();\r\n foreach ($fields as $field_name => $field) {\r\n if ($field->schema{4} == 'V') {\r\n $rows[$field_name] = _apachesolr_field_name_map($field_name);\r\n }\r\n }\r\n ksort($rows);\r\n return $rows;\r\n}", "title": "" }, { "docid": "0ad3d842ca5a09afc6040e59f3ad071b", "score": "0.48644707", "text": "private function searcher($params) {\n $result = array();\n $ci =& get_instance();\n $ci->load->library('solr');\n\n //construct the search fields\n $permitted_forwarding_params = explode(',',$this->options['valid_solr_params']);\n $forwarded_params = array_intersect_key(array_flip($permitted_forwarding_params), $this->params);\n $fields = array();\n foreach ($forwarded_params AS $param_name => $_) {\n $fields[$param_name] = $this->params[$param_name];\n }\n $fields = array_merge($this->default_params, $fields);\n\n //setting search field constraints\n if (isset($this->params['mode']) && $this->params['mode']=='portal_search') {\n $ci->solr->setFilters($fields);\n } else {\n foreach($fields AS $key => $field) {\n $ci->solr->setOpt($key, $field);\n }\n }\n\n //special fix for facet\n if(isset($this->params['facet_field'])) {\n $facets = explode(',', $this->params['facet_field']);\n foreach($facets as $f) {\n $ci->solr->setFacetOpt('field', $f);\n }\n }\n\n //get results\n $result = $ci->solr->executeSearch(true);\n return $result;\n }", "title": "" }, { "docid": "f72ae0a694fa8b2e4362e7e43fefdcec", "score": "0.4864416", "text": "public function findsAction(){\n if($this->_getParam('constituency',false)){\n $geo = new Pas_Twfy_Geometry();\n $const = urldecode($this->_getParam('constituency'));\n $cons = $geo->get($const);\n $bbox = array(\n $cons->min_lat,\n $cons->min_lon,\n $cons->max_lat,\n $cons->max_lon\n );\n $search = new Pas_Solr_Handler();\n $search->setCore('beowulf');\n $context = $this->_helper->contextSwitch->getCurrentContext();\n $fields = new Pas_Solr_FieldGeneratorFinds($context);\n $search->setFields($fields->getFields());\n $params = $this->_getAllParams();\n $params['bbox'] = implode(',',$bbox);\n $search->setFacets(array(\n 'objectType', 'county', 'broadperiod',\n 'institution', 'workflow'\n ));\n $search->setParams($params);\n $search->execute();\n $this->view->facets = $search->processFacets();\n $this->view->paginator = $search->createPagination();\n $this->view->finds = $search->processResults();\n $this->view->constituency = $const;\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "title": "" }, { "docid": "d0c3b2b3bbb485c6fa69325c7d963e39", "score": "0.48577228", "text": "public function searchCountSharedDoc() {\n try {\n if (!($this->document instanceof Base_Model_ObtorLib_App_Core_Doc_Entity_Document)) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception(\" Document Entity not intialized\");\n } else {\n $objDocument = new Base_Model_ObtorLib_App_Core_Doc_Dao_Document();\n $objDocument->document = $this->document;\n return $objDocument->searchCountSharedDoc();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Doc_Exception($ex);\n }\n }", "title": "" }, { "docid": "f850a4c00bfd4b53b9dc4c1b27a1e0fe", "score": "0.48538876", "text": "public function searchByIds($ids)\n {\n // if(!is_array($ids)){ $ids=array($ids); }\n $products=array();\n foreach ($ids as $key => $value) \n {\n // echo $value;\n if($value!=0){\n $params = [\n 'index' => 'products',\n 'type' => 'product',\n 'id' => $value\n ];\n try{\n $response = $this->client->get($params);\n }catch(\\Exception $e){\n $response=[\n \"_index\"=>\"products\",\n \"_type\"=>\"product\",\n \"_id\"=>(string)$value,\n \"_version\"=>2,\n \"found\"=>false,\n \"_source\"=>null\n ];\n }\n // print_r($response);die;\n $products[] = $response;//['_source'];\n }\n }//foreach\n // print_r($products);die;\n return $products;\n }", "title": "" }, { "docid": "43225071ffedf61a4aeffd3330f044ad", "score": "0.4853628", "text": "public function searchDoc()\n {\n //\n if ($search = \\Request::get('q')) {\n $doc = Document::select('name', 'id As code')->where(function($query) use ($search){\n $query->where('name','LIKE',\"%$search%\");\n })->where('status', '!=', 'old')->paginate(50);\n }else {\n $doc = Document::latest()->paginate(20);\n }\n return $doc;\n }", "title": "" }, { "docid": "dd2063b155170de166aaf7228ff9231d", "score": "0.4845751", "text": "function cosineRanking($query,$corpus,$num_of_docs,$index,$should_stem)\n{\n $doc_locale = [];\n for($i = 0; $i < count($corpus); $i++)\n {\n $doc_locale[$i] = $corpus[$i][1];\n }\n\n $cosine_results = array();\n\t$doc_nums = array();\n $query_terms = explode(' ',$query);\n $pos = -INF;\n\t//Calculate the query vector\n $query_vector = calcTFIDF_query($query,$should_stem);\n\n\t//Find the min document in which atleast one of the query term is present\n while($pos < INF)\n {\n foreach($query_terms as $query_term)\n {\n if($should_stem){\n $query_term = stemTerm($query_term,'en-US');\n }\n $query_term = RemovePunctuation($query_term);\n array_push($doc_nums,nextDoc($index,$query_term,$pos));\n }\n $next_pos = min($doc_nums);\n $doc_nums = array();\n if ($next_pos == INF)\n {\n break 1;\n }\n\t\t//for the min doc found, calculate the TFIDF scores\n $doc_vector = calcTFIDF_doc($index,$next_pos,$num_of_docs,\n $corpus[$next_pos][0],$should_stem,\n $corpus[$next_pos][1]);\n\t\t//Calculate the cosine similarity between doc vector and cosine vector\n $cosine_results[$next_pos] = calcScore($doc_vector,$query_vector,$query,\n $should_stem,$corpus[$next_pos][1]);\n $pos = $next_pos;\n }\n\tarsort($cosine_results);\n print(\"\\ndoc_id\\tscore \\n\");\n foreach ($cosine_results as $key => $value)\n\t{\n \tprint(\"{$key}\\t{$value}\\n\");\n }\n}", "title": "" }, { "docid": "ec6ccd72cbd51fda240e8d7adc43e695", "score": "0.48412073", "text": "public function index() {\n $query = \"SELECT * FROM Products AS p JOIN Categories AS c ON p.CategoryID = c.CategoryId JOIN Suppliers AS s ON p.SupplierID = s.SupplierID\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n $indexDir = APP_PATH. '/' . self::INDEX_DIR;\n is_dir($indexDir) || mkdir($indexDir, 0777, true);\n $index = self::create($indexDir);\n\n foreach ($rows as $row) {\n $doc = new Zend_Search_Lucene_Document();\n $doc->addField(Zend_Search_Lucene_Field::keyword('ProductName', $row['ProductName']));\n $doc->addField(Zend_Search_Lucene_Field::text('Quantity', $row['QuantityPerUnit']));\n $doc->addField(Zend_Search_Lucene_Field::keyword('Category', $row['CategoryName']));\n $doc->addField(Zend_Search_Lucene_Field::unIndexed('Description', $row['Description']));\n $doc->addField(Zend_Search_Lucene_Field::unStored('City', $row['City']));\n $doc->addField(Zend_Search_Lucene_Field::keyword('CompanyName', $row['CompanyName']));\n $doc->addField(Zend_Search_Lucene_Field::binary('Picture', $row['Picture']));\n\n $index->addDocument($doc);\n }\n }", "title": "" }, { "docid": "80cbf5411fb09634ae1bec98190cfd33", "score": "0.48402745", "text": "public function getPrimaryRecords(): array\n {\n $records = [];\n $mongo = new Client(env('MONGO_LINEPIG_CONN'), [], config('emuconfig.mongodb_conn_options'));\n $searchCollection = $mongo->linepig->search;\n $cursor = $searchCollection->find(\n ['search.DetSubject' => 'primary'],\n ['sort' => ['genus' => 1, 'species' => 1]]\n );\n\n foreach ($cursor as $record) {\n $records[] = $record;\n }\n\n return $records;\n }", "title": "" }, { "docid": "6f8de5015c2a492a3f4a12651aaf591a", "score": "0.48299456", "text": "public\n function ddAction()\n {\n// $s->setServer(\"localhost\", 9312);\n// $s->setMatchMode(SPH_MATCH_ANY);\n// $s->setMaxQueryTime(3);\n//\n// $result = $s->query(\"test\");\n\n $sphinx = new \\SphinxClient;\n $sphinx->setServer(\"localhost\", 9312);\n\n $sphinx->SetArrayResult(true);\n $sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);\n $sphinx->SetSelect(\"*\");\n $sphinx->ResetFilters();\n //$sphinx->SetFilter('product_id', array(14001949));\n $query = \" @amazon_item_name 'Universal'\"; //@amazon_item_name 备注(amazon_item_name) 是索引列的字段\n $result = $sphinx->query($query, \"blog\"); //星号为所有索引源\n var_dump($result);\n echo '<pre>';\n print_r($result);\n $count = $result['total']; //查到的结果条数\n $time = $result['time']; //耗时\n $arr = $result['matches']; //结果集\n $id = '';\n for ($i = 0; $i < $count; $i++) {\n $id .= $arr[$i]['id'] . ',';\n }\n $id = substr($id, 0, -1); //结果集的id字符串\n\n\n echo '<pre>';\n print_r($arr);\n echo $id;\n }", "title": "" }, { "docid": "ab13775530637f0bcae12d24927c235a", "score": "0.48193502", "text": "public function collect_bookID($q = \"\") {\n if (empty($q)) {\n return FALSE;\n }\n\n $bookID_bucket = array();\n $count = 1;\n $q = urlencode($q);\n $x = 0;\n while (true) {\n $q = $q . \"&page=$count\";\n\n $option = array(\n 'url' => \"https://www.goodreads.com/search/index.xml\",\n 'key_var_name' => \"key\",\n 'key' => $GOODREADS_KEY,\n 'query_var_name' => \"q\",\n 'query' => $q,\n );\n\n $arr = $this->fetch_data($option);\n $present_start = intval($arr['search']['results-start']);\n $present_end = intval($arr['search']['results-end']);\n $total_results = intval($arr['search']['total-results']);\n $count = $count + 1;\n $final = $present_end - ($present_start - 1);\n\n // echo \"start = $present_start | end = $present_end | final = $total_results <br>\";\n\n for ($index = 0; $index < $final && ($index + $present_start < $total_results); $index++) {\n array_push($bookID_bucket, $arr['search']['results']['work'][$index]['best_book']['id']);\n $x++;\n }\n if ($x > 20) {\n break;\n }\n if ($total_results == ($present_start + $index)) {\n break;\n }\n }\n\n return $bookID_bucket;\n }", "title": "" }, { "docid": "a73e44e45f53e6ded70b6c9ee2ec89ae", "score": "0.48125866", "text": "protected abstract function _start_id_search ($first = 0, $count = 0);", "title": "" }, { "docid": "6a3cd996eb9cc460500d78a8ea67e39d", "score": "0.48103085", "text": "public function getDocTypesAction()\n {\n $modelManager = $this->container->get('models');\n $repository = $modelManager\n ->getRepository(Document::class);\n\n $builder = $repository->createQueryBuilder('d');\n\n $builder->select('d')\n ->addFilter((array) $this->Request()->getParam('filter', []))\n ->addOrderBy((array) $this->Request()->getParam('sort', []))\n ->setFirstResult($this->Request()->getParam('start', 0))\n ->setMaxResults($this->Request()->getParam('limit', 250));\n\n $query = $builder->getQuery();\n $total = $modelManager->getQueryCount($query);\n $data = $query->getArrayResult();\n\n // translate the document names\n /** @var \\Shopware_Components_Translation $translationComponent */\n $translationComponent = $this->get('translation');\n $data = $translationComponent->translateDocuments($data);\n\n $this->View()->assign(['success' => true, 'data' => $data, 'total' => $total]);\n }", "title": "" }, { "docid": "abca134bd5f3f3ad29a345c21bddedf0", "score": "0.47824562", "text": "function search()\r\n {\r\n global $sru_fcs_params;\r\n \r\n $base = new SRUFromMysqlBase();\r\n \r\n $db = $base->db_connect();\r\n if ($db instanceof SRUDiagnostics) {\r\n \\ACDH\\FCSSRU\\diagnostics($db);\r\n return;\r\n }\r\n \r\n // HACK, sql parser? cql.php = GPL -> this GPL too\r\n $sru_fcs_params->setQuery(str_replace(\"\\\"\", \"\", $sru_fcs_params->getQuery()));\r\n $options = array(\"distinct-values\" => false,\r\n \"dbtable\" => \"vicav_bibl_002\",\r\n \"xpath-filters\" => array (\r\n \"-change-f-status-\" => \"released\",\r\n ),\r\n );\r\n $options[\"startRecord\"] = $sru_fcs_params->startRecord;\r\n $options[\"maximumRecords\"] = $sru_fcs_params->maximumRecords;\r\n $profile_query = $base->get_search_term_for_wildcard_search(\"id\", $sru_fcs_params->getQuery());\r\n if (!isset($profile_query)) {\r\n $profile_query = $base->get_search_term_for_wildcard_search(\"serverChoice\", $sru_fcs_params->getQuery(), \"cql\");\r\n }\r\n $profile_query_exact = $base->get_search_term_for_exact_search(\"id\", $sru_fcs_params->getQuery());\r\n if (!isset($profile_query_exact)) {\r\n $profile_query_exact = $base->get_search_term_for_exact_search(\"serverChoice\", $sru_fcs_params->getQuery(), \"cql\");\r\n }\r\n $vicavTaxonomy_query = $base->get_search_term_for_wildcard_search(\"vicavTaxonomy\", $sru_fcs_params->getQuery());\r\n $vicavTaxonomy_query_exact = $base->get_search_term_for_exact_search(\"vicavTaxonomy\", $sru_fcs_params->getQuery());\r\n $author_query = $base->get_search_term_for_wildcard_search(\"author\", $sru_fcs_params->getQuery());\r\n $author_query_exact = $base->get_search_term_for_exact_search(\"author\", $sru_fcs_params->getQuery());\r\n $imprintDate_query_exact = $base->get_search_term_for_exact_search(\"imprintDate\", $sru_fcs_params->getQuery());\r\n \r\n $rfpid_query = $base->get_search_term_for_wildcard_search(\"rfpid\", $sru_fcs_params->getQuery());\r\n $rfpid_query_exact = $base->get_search_term_for_exact_search(\"rfpid\", $sru_fcs_params->getQuery());\r\n if (!isset($rfpid_query_exact)) {\r\n $rfpid_query_exact = $rfpid_query;\r\n }\r\n if (isset($rfpid_query_exact)) {\r\n $query = $db->escape_string($rfpid_query_exact);\r\n try {\r\n $base->populateSearchResult($db, \"SELECT id, entry, sid, 1 FROM vicav_bibl_002 WHERE id=$query\", \"Resource Fragment for pid\");\r\n } catch (ESRUDiagnostics $ex) {\r\n \\ACDH\\FCSSRU\\diagnostics($ex->getSRUDiagnostics());\r\n }\r\n return;\r\n } else if (isset($vicavTaxonomy_query_exact)){\r\n $options[\"query\"] = $db->escape_string($vicavTaxonomy_query_exact); \r\n $options[\"xpath\"] = \"-index-term-vicavTaxonomy-\";\r\n $options[\"exact\"] = true;\r\n } else if (isset($vicavTaxonomy_query)) {\r\n $options[\"query\"] = $db->escape_string($vicavTaxonomy_query); \r\n $options[\"xpath\"] = \"-index-term-vicavTaxonomy-\"; \r\n } else if (isset($author_query_exact)){\r\n $options[\"query\"] = $db->escape_string($author_query_exact); \r\n $options[\"xpath\"] = \"-monogr-author-|-analytic-author-\";\r\n $options[\"exact\"] = true;\r\n } else if (isset($author_query)) {\r\n $options[\"query\"] = $db->escape_string($author_query); \r\n $options[\"xpath\"] = \"-monogr-author-|-analytic-author-\"; \r\n } else if (isset($imprintDate_query_exact)){\r\n $options[\"query\"] = $db->escape_string($imprintDate_query_exact); \r\n $options[\"xpath\"] = \"-imprint-date-\";\r\n $options[\"exact\"] = true;\r\n } else {\r\n if (isset($profile_query_exact)) {\r\n $options[\"query\"] = $db->escape_string($profile_query_exact);\r\n $options[\"exact\"] = true;\r\n } else if (isset($profile_query)) {\r\n $options[\"query\"] = $db->escape_string($profile_query);\r\n } else {\r\n $options[\"query\"] = $db->escape_string($sru_fcs_params->getQuery());\r\n }\r\n $options[\"xpath\"] = \"biblStruct-xml:id\";\r\n }\r\n\r\n\r\n try {\r\n $base->populateSearchResult($db, $options, \"Bibliography for the region of \" . $options[\"query\"]);\r\n } catch (ESRUDiagnostics $ex) {\r\n \\ACDH\\FCSSRU\\diagnostics($ex->getSRUDiagnostics());\r\n }\r\n}", "title": "" }, { "docid": "da08e34a630d65af508f851fe501d17a", "score": "0.47807965", "text": "public function searcher($searchStr = '') {\n\t\tif ($searchStr) {\n\t\t\t$searchItems = array();\n\t\t\t$searchStr = Convert::raw2sql($searchStr);\n\n\t\t\t$searchQuery = new SearchQuery();\n\t\t\t$searchQuery->Query = $searchStr;\n\t\t\t$searchQuery->FromURL = (isset($_SERVER) && isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : 'unknown';\n\t\t\t$searchQuery->write();\n\n\n\t\t\t$searchables = DataObject::get('SearchObject');\n\t\t\tforeach($searchables as $key => $searchable){\n\t\t\t\t$searchItems[] = $this->buildSearch($searchStr, 'Title', explode(',',$searchable->Fields), $searchable->Title, $searchable->Fulltextsearchable);\n\t\t\t}\n\n\t\t\t$this->searchResults = new DataObjectSet();\n\t\t\tforeach($searchItems as $searchResults){\n\t\t\t\t$this->searchResults->merge($searchResults);\n\t\t\t}\n\n\t\t\t$this->searchResults->sort('relevance', 'DESC');\n\t\t\t$this->searchResults->sort('keywordmatch', 'DESC');\n\t\t\t$this->searchResults->sort('titlematch', 'DESC');\n\t\t\t$this->searchResults->sort('searchmatch', 'DESC');\n\t\t\t/**\n\t\t\t * This is future functionality. \n\t\t\t *\n\t\t\tif($this->SiteConfig()->Range > 0){\n\t\t\t \t$start = $_GET['start'];\n\t\t\t\t$length = $this->SiteConfig()->Range; \n\t\t\t \n\t\t\t\t//Fetch the slice\n\t\t\t\t$this->searchResults = $this->searchResults->getRange($start, $length);\n\t\t\t\t//Set the limit\n\t\t\t\t$this->searchResults->setPageLimits($start,$length,$this->searchResults->count());\n\t\t\t\tSession::set('SearchResults', $this->searchResults->getRange($length, $this->searchResults->count());\t\t\t \n\t\t\t\t//Set the length\n\t\t\t\t$this->searchResults->setPageLength($length);\n\t\t\t}\n\t\t\t/**/\n\t\t}\n\t}", "title": "" }, { "docid": "cc374778a21ecc11558f1dfc4e778f68", "score": "0.47714013", "text": "public function add_documents($iterator, $searcharea, $options) {\n $numrecords = 0;\n $numdocs = 0;\n $numdocsignored = 0;\n $lastindexeddoc = 0;\n $firstindexeddoc = 0;\n $partial = false;\n $lastprogress = manager::get_current_time();\n\n foreach ($iterator as $document) {\n // Stop if we have exceeded the time limit (and there are still more items). Always\n // do at least one second's worth of documents otherwise it will never make progress.\n if ($lastindexeddoc !== $firstindexeddoc &&\n !empty($options['stopat']) && manager::get_current_time() >= $options['stopat']) {\n $partial = true;\n break;\n }\n\n if (!$document instanceof \\core_search\\document) {\n continue;\n }\n\n if (isset($options['lastindexedtime']) && $options['lastindexedtime'] == 0) {\n // If we have never indexed this area before, it must be new.\n $document->set_is_new(true);\n }\n\n if ($options['indexfiles']) {\n // Attach files if we are indexing.\n $searcharea->attach_files($document);\n }\n\n if ($this->add_document($document, $options['indexfiles'])) {\n $numdocs++;\n } else {\n $numdocsignored++;\n }\n\n $lastindexeddoc = $document->get('modified');\n if (!$firstindexeddoc) {\n $firstindexeddoc = $lastindexeddoc;\n }\n $numrecords++;\n\n // If indexing the area takes a long time, periodically output progress information.\n if (isset($options['progress'])) {\n $now = manager::get_current_time();\n if ($now - $lastprogress >= manager::DISPLAY_INDEXING_PROGRESS_EVERY) {\n $lastprogress = $now;\n // The first date format is the same used in cron_trace_time_and_memory().\n $options['progress']->output(date('H:i:s', $now) . ': Done to ' . userdate(\n $lastindexeddoc, get_string('strftimedatetimeshort', 'langconfig')), 1);\n }\n }\n }\n\n return array($numrecords, $numdocs, $numdocsignored, $lastindexeddoc, $partial);\n }", "title": "" }, { "docid": "91eab294f8136f92c994530ab2c375c3", "score": "0.47652328", "text": "public function getTerms(){\n if (!$options = $this->_cache->load('abcNumbers')) {\n $select = $this->select()\n ->from($this->_name, array('term', 'term'))\n ->order('id');\n $options = $this->getAdapter()->fetchPairs($select);\n $this->_cache->save($options, 'abcNumbers');\n }\n return $options;\n }", "title": "" }, { "docid": "ef1fdba13d84f5b3e74bf059ec4eee97", "score": "0.47592098", "text": "public static function getAllDocuments() {\n }", "title": "" }, { "docid": "97d64130e1dd2660dc5b67254d4722b5", "score": "0.47579512", "text": "protected function getAll(&$form_state) {\n $pids = array();\n\n // Helper anonymous function... Just get the PID.\n $get_pid = function($result) {\n return $result['PID'];\n };\n\n $qp = $this->islandoraSolrQueryProcessor;\n $old_params = $qp->solrParams;\n $qp->solrParams['fl'] = 'PID';\n $qp->solrStart = 0;\n $qp->solrLimit = 10000;\n\n // Handle the first set separately, so we can get the total number for our\n // loop.\n $qp->executeQuery();\n $solr_results = $qp->islandoraSolrResult;\n $result_count = $solr_results['response']['numFound'];\n $object_results = $solr_results['response']['objects'];\n $pids = array_map($get_pid, $object_results);\n\n for ($i = $qp->solrLimit; $i < $result_count; $i += $qp->solrLimit) {\n $qp->solrStart = $i;\n $qp->executeQuery();\n $solr_results = $qp->islandoraSolrResult;\n $object_results = $solr_results['response']['objects'];\n\n $pids = array_merge(\n $pids, array_map($get_pid, $object_results)\n );\n }\n $qp->solrParams = $old_params;\n\n return $pids;\n }", "title": "" }, { "docid": "60d16b6ec729cb414b51049ecbb24580", "score": "0.47531366", "text": "public function mapIds($results): Collection\n {\n Assert::isInstanceOf($results, Results::class);\n\n return collect($results->hits())->pluck('_id')->values();\n }", "title": "" }, { "docid": "ea7c3b93f0d8318305e76847c76081b8", "score": "0.4752244", "text": "public function indexAction(){\n $form = new SolrForm();\n $form->removeElement('thumbnail');\n $form->q->setLabel('Search people: ');\n $form->q->setAttrib('placeholder','Try Bland for example');\n $this->view->form = $form;\n\n $params = $this->array_cleanup($this->_getAllParams());\n $search = new Pas_Solr_Handler('beopeople');\n $search->setFields(array('*')\n );\n $search->setFacets(array('county','organisation','activity'));\n\n\n if($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())\n && !is_null($this->_getParam('submit'))){\n\n if ($form->isValid($form->getValues())) {\n $params = $this->array_cleanup($form->getValues());\n\n $this->_helper->Redirector->gotoSimple('index','people','database',$params);\n } else {\n $form->populate($form->getValues());\n $params = $form->getValues();\n }\n } else {\n\n $params = $this->_getAllParams();\n $params['sort'] = 'surname';\n $params['direction'] = 'asc';\n $form->populate($this->_getAllParams());\n\n\n }\n\n if(!isset($params['q']) || $params['q'] == ''){\n $params['q'] = '*';\n }\n\n $search->setParams($params);\n $search->execute();\n\n $this->view->paginator = $search->_createPagination();\n $this->view->results = $search->_processResults();\n $this->view->facets = $search->_processFacets();\n\n }", "title": "" }, { "docid": "8f71e105ae802f7836ee31d598436377", "score": "0.47510773", "text": "public function testFindByPk() {\n\t\t$connection = new ASolrConnection();\n\t\t$connection->clientOptions->hostname = SOLR_HOSTNAME;\n\t\t$connection->clientOptions->port = SOLR_PORT;\n\t\t$connection->clientOptions->path = SOLR_PATH;\n\t\tASolrDocument::$solr = $connection;\n\t\t$pkList = array();\n\t\tforeach($this->fixtureData() as $attributes) {\n\t\t\t$doc = ASolrDocument::model()->findByPk($attributes['id']);\n\t\t\t$this->assertTrue(is_object($doc));\n\t\t\t$this->assertTrue($doc instanceof ASolrDocument);\n\t\t\tforeach($attributes as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t\t$pkList[$doc->getPrimaryKey()] = $attributes;\n\t\t}\n\t\t$criteria = new ASolrCriteria();\n\t\t$criteria->limit = 100;\n\t\t$models = ASolrDocument::model()->findAllByPk(array_keys($pkList),$criteria);\n\t\t$this->assertEquals(count($pkList),count($models));\n\t\tforeach($models as $doc) {\n\t\t\tforeach($pkList[$doc->getPrimaryKey()] as $attribute => $value) {\n\t\t\t\t$this->assertEquals($value,$doc->{$attribute});\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a7a42575411b91c9bd358882a60a0f55", "score": "0.47467828", "text": "public function test_solr_search(){\n\n $this->load->helper('solr');\n\n $r = solr::query('hash:789456');\n\n var_dump($r);\n }", "title": "" }, { "docid": "d69c18cad2b6243660f737e0b819c651", "score": "0.47411582", "text": "public function findByReference($model, $id) {\n \n // $documentTable = TableRegistry::get('DocumentReferenceModels');\n\n $results = $this->find()\n ->where(['DocumentReferenceModels.code' => $model,\n 'Documents.document_reference_id' => $id])\n ->contain(['DocumentStates', 'DocumentTypes', 'DocumentReferenceModels', 'DocumentOwnerModels'])\n ->all();\n\n return $results;\n }", "title": "" }, { "docid": "15c7c26ef9d16e6443eebe0cffa70378", "score": "0.47291902", "text": "protected function getSearchResults()\n {\n $searchResults = null;\n\n /** @var Product $repo */\n $repo = Database::getRepo('XLite\\Model\\Product');\n\n $searchResults = $repo->getCloudSearchResults($this->getCloudSearchConditions());\n\n return $searchResults;\n }", "title": "" }, { "docid": "222e259f66e9ded3d1aa4d3574b758f0", "score": "0.4728784", "text": "public function getFindingsTNT(String $searchterms, array $cont_list){\n\n if(self::initRequired()){\n $this->initIndex();\n }\n\n $tnt = new TNTSearch;\n\n $tnt->loadConfig($this->getTNTConfig());\n $tnt->selectIndex(self::$indexname);\n $tnt->fuzziness = true;\n\n $res = $tnt->search($searchterms);\n $foundIDs = $res['ids'];\n $candidateIDs = array_map(function($c){return $c->getId();}, $cont_list);\n\n $return_list = [];\n foreach($foundIDs as $id){\n if(in_array($id, $candidateIDs)){\n $key = array_keys($candidateIDs, $id)[0];\n $return_list[] = $cont_list[$key];\n }\n }\n\n return $return_list;\n\n }", "title": "" }, { "docid": "ab43e3f624c0e796fe48c3f93f450a64", "score": "0.4720273", "text": "public function get_docs($user_id, $per_page, $curr_pagination_page){\n\t\t$sql_query = \"SELECT \" . $this->doc_description_fields . \" FROM documents where owner_user_id = ? \" . $this->limit_results($per_page, $curr_pagination_page);\n\t\t$result_array = $this->db->query($sql_query, $user_id)->result_array();\n\t\tfor ($index = 0; $index < sizeof($result_array) ; $index++){\n\t\t\tif (strlen($result_array[$index]['docname']) > 25){\n\t\t\t\t\t$result_array[$index]['docname'] = substr( $result_array[$index]['docname'], 0, 24).'...';\n\t\t\t}\n\t\t\t$result_array[$index]['material_type'] = $this->material_type_string($result_array[$index]['material_type']);\n\t\t\t$result_array[$index]['tags'] = $this->get_doc_tags($result_array[$index]['doc_id']);\n\t\t}\n\t\treturn $result_array;\n\t}", "title": "" }, { "docid": "94fe2d65bd31c5a06a7cb7e0361db673", "score": "0.47160026", "text": "public function get_records($searchterm, $options, $username)\n\t{\n\t\tif (empty($searchterm))\n\t\t{\n\t\t\tthrow new Exception('Missing Search Term');\n\t\t}\n\t\t\n\t\t\n\n\t\t$collection = $myresources = $filetype = $starrating = $category = $accepted_types = $env = '';\n\t\textract($options);\n\t\t// we can't retrieve all, so lets set a high limit\n\t\t$xSearchParams = array('limit' => 9999, 'username' => $username);\n\n\t\t// XSearch query begins with a search term\n\t\t$query = $searchterm;\n\n\t\t// and is followed by constraints\n\t\t$query .= $this->_build_collection_constraint($collection);\n\t\t$query .= $this->_build_star_rating_constraint($starrating);\n\t\t$query .= $this->_build_filetype_constraint($filetype);\n\t\t$query .= $this->_build_category_constraint($category);\n\t\t$query .= $this->_build_accepted_types_constraint($accepted_types);\n\t\t$query .= $this->_build_env_constraint($env);\n \n\t\tif ($myresources)\n\t\t{\n\t\t if (!$username) {\n\t\t $username \t= self::get_intralibrary_username();\n\t\t }\n\t\t $fn = self::get_intralibrary_fullName();\n\t\t \n\t\t\t$query .= $this->_build_username_constraint($username,$fn);\n\t\t\t$xSearchParams['showUnpublished'] = TRUE;\n\t\t}\n\n\t\t$xsResp = new IntraLibrarySRWResponse('lom');\n\t\t$xsReq \t= new IntraLibraryXSearchRequest($xsResp);\n\t\t//Allow to make searches without keywords\n\t\t\n\t\tif ($searchterm == \"*\") {\n\t\t /*if ($fn) {\n \t\t $qtest = substr($query,2);\n \t\t if (strlen($qtest)>0) {\n \t\t $query = $qtest;\n \t\t }\n \t\t $query = \"dc.contributor=\\\"$fn\\\" \".$query;\n\t\t } else {\n \t\t $qtest = substr($query,5);\n \t\t if (strlen($qtest)>0) {\n \t\t $query = $qtest;\n \t\t }\n\t\t }*/\n\t\t $qtest = substr($query,5);\n\t\t if (strlen($qtest)>0) {\n\t\t $query = $qtest;\n\t\t }\n\t\t}\n\t\t$xSearchParams['query'] = $query;\n\t\t$xsReq->query($xSearchParams);\n\t\treturn $xsResp->getRecords();\n\t}", "title": "" }, { "docid": "c16cad26187370b8cb51db5634ee94a6", "score": "0.4712056", "text": "public function orderSearchResults($data, $search) {\n\t\t$searchTerms = explode(\" \", $search);\n\t\tforeach ($data as $row) {\n\t\t\tif (strcasecmp($search, $row->name) == 0) {\n\t\t\t\t$numExactMatches = 100;\n\t\t\t} else {\n\t\t\t\t$itemKeywords = preg_split(\"/\\s/\", $row->name);\n\t\t\t\t$numExactMatches = 0;\n\t\t\t\tforeach ($itemKeywords as $keyword) {\n\t\t\t\t\tforeach ($searchTerms as $searchWord) {\n\t\t\t\t\t\tif (strcasecmp($keyword, $searchWord) == 0) {\n\t\t\t\t\t\t\t$numExactMatches++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$row->numExactMatches = $numExactMatches;\n\t\t}\n\t\t\n\t\t/*\n\t\t$this->util->mergesort($data, function($a, $b) {\n\t\t\tif ($a->numExactMatches == $b->numExactMatches) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn ($a->numExactMatches > $b->numExactMatches) ? -1 : 1;\n\t\t\t}\n\t\t});\n\t\t*/\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a1cfb75ff74297df9e1a84cdb3247415", "score": "0.47110325", "text": "public function getSolrResult()\n {\n if (null === $this->_solrResult) {\n $this->_solrResult = $this->_solrRequest->doRequest($this->activeFilterAttributeCodes);\n $responses = Mage::registry('integernet_solr_responses');\n if (!$responses) {\n $responses = [];\n }\n $responses[] = $this->_solrResult->getRawResponse();\n\n Mage::unregister('integernet_solr_responses');\n Mage::register('integernet_solr_responses', $responses);\n }\n\n return $this->_solrResult;\n }", "title": "" }, { "docid": "3f0dadf2b5a6910ebe2d250cbda9fa7d", "score": "0.469966", "text": "function getAllDoc() {\n $sql = \"SELECT * FROM docs WHERE userid = $this->id;\";\n $stmt = $this->db->query($sql);\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "8a429dda0dc37477bb0d18f7fddb909f", "score": "0.4689646", "text": "private function findActualRelevance($documentId){\n\t\t\t$actualRelevanceList = explode(\"\\n\",file_get_contents(__DIR__.\"/../data/relevance_judgements_processed.txt\"));\n\n\t\t\tforeach($actualRelevanceList as $entry){\n\t\t\t\tlist($topicId, $number, $id, $relevance) = explode(\" \", $entry);\n\n\t\t\t\tif($id == $documentId){\n\t\t\t\t\treturn intval(substr($relevance, 0,1));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn -1;\n\t\t}", "title": "" }, { "docid": "202b5e1a7e9661297fed92f0d3e10360", "score": "0.46862996", "text": "function get_search_results($query, &$search_set)\n{\n\tglobal $forum_db, $forum_user, $forum_page, $lang_common;\n\n\t$return = ($hook = get_hook('sf_fn_get_search_results_start')) ? eval($hook) : null;\n\tif ($return != null)\n\t\treturn $return;\n\n\t$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);\n\n\t// Make sure we actually have some results\n\t$num_hits = $forum_db->num_rows($result);\n\tif ($num_hits == 0)\n\t\treturn 0;\n\n\t// Work out the settings for pagination\n\t$forum_page['num_pages'] = ceil($num_hits / $forum_page['per_page']);\n\t$forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p'];\n\n\t// Determine the topic or post offset (based on $forum_page['page'])\n\t$forum_page['start_from'] = $forum_page['per_page'] * ($forum_page['page'] - 1);\n\t$forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_page['per_page']), $num_hits);\n\n\t// Fill $search_set with out search hits\n\t$search_set = array();\n\t$row_num = 0;\n\twhile ($row = $forum_db->fetch_assoc($result))\n\t{\n\t\tif ($forum_page['start_from'] <= $row_num && $forum_page['finish_at'] > $row_num)\n\t\t\t$search_set[] = $row;\n\t\t++$row_num;\n\t}\n\n\t$forum_db->free_result($result);\n\n\t$return = ($hook = get_hook('sf_fn_get_search_results_end')) ? eval($hook) : null;\n\tif ($return != null)\n\t\treturn $return;\n\n\treturn $num_hits;\n}", "title": "" }, { "docid": "f89d570cd8f079ca2e92c81aa1c722ef", "score": "0.46839982", "text": "public function getIndices()\n {\n return $this->getObjectsByIdentifier\n (self::SIMPLE_INDEX . '|' . self::INDEX . '|' .\n self::MEDIA_OBJECT_INDEX . '|' . self::TIMECODE_INDEX);\n }", "title": "" }, { "docid": "84ef55d467d9f76a73302dc60609f9bc", "score": "0.468014", "text": "static function all_docs($db=null,$options=null,$ids=null){\n\t\treturn self::__cc( ($ids!=NULL?'POST':'GET') , \"/_all_docs\".self::___b_opt($options) . ($ids!=NULL? \"' -d \\ '\".json_encode(array('keys'=>$ids)).\"'\":\"'\") ,$db);\n\t}", "title": "" }, { "docid": "c67cba6ef90176ea1d7e51b14cbd5565", "score": "0.46727708", "text": "function nextDoc($index,$query_term,$pos)\n{\n $index = array_key_exists($query_term,$index);\n $low = 0;\n $jump = 1;\n $high = $low+$jump;\n if(!$index)\n {\n return INF;\n }\n $term_obj = $index[$query_term];\n if($pos == -INF)\n {\n return array_keys($term_obj->doc_word_freq)[0];\n }\n $len_doc_word_freq = count($index[$query_term]->doc_word_freq);\n if(array_keys($term_obj->doc_word_freq)[$len_doc_word_freq-1] <= $pos)\n {\n return INF;\n }\n else\n {\n while($high < $len_doc_word_freq-1 &&\n array_keys($term_obj->doc_word_freq)[$high] <= $pos)\n {\n $low = $high;\n $jump = 2* $jump;\n $high = $low + $jump;\n }\n\n if ($high > $len_doc_word_freq-1)\n {\n $high = $len_doc_word_freq-1;\n }\n\n return binarySearch(array_keys($term_obj->doc_word_freq),$pos,$low,$high);\n }\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e4e6d52e144585af7fbe0caf4f1cba3", "score": "0.0", "text": "public function delete($id)\n {\n $delete = DB::table('contacts')->where('id',$id)->delete();\n $msg = array();\n $msg['success'] = false;\n if($delete){\n $msg['success'] = true;;\n }\n return response()->json($msg);\n }", "title": "" } ]
[ { "docid": "ef853768d92b1224dd8eb732814ce3fa", "score": "0.7318632", "text": "public function deleteResource(Resource $resource);", "title": "" }, { "docid": "32d3ed9a4be9d6f498e2af6e1cf76b70", "score": "0.6830789", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c3b6a958d3ad1b729bfd6e4353c3feba", "score": "0.6540415", "text": "public function deleteFile(ResourceObjectInterface $resource);", "title": "" }, { "docid": "00aa681a78c0d452ad0b13bfb8d908dd", "score": "0.64851683", "text": "public function removeResource(IResource $resource): void {\n\t\t$this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) {\n\t\t\treturn !$this->isSameResource($r, $resource);\n\t\t});\n\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->delete(Manager::TABLE_RESOURCES)\n\t\t\t->where($query->expr()->eq('collection_id', $query->createNamedParameter($this->id, IQueryBuilder::PARAM_INT)))\n\t\t\t->andWhere($query->expr()->eq('resource_type', $query->createNamedParameter($resource->getType())))\n\t\t\t->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resource->getId())));\n\t\t$query->execute();\n\n\t\tif (empty($this->resources)) {\n\t\t\t$this->removeCollection();\n\t\t} else {\n\t\t\t$this->manager->invalidateAccessCacheForCollection($this);\n\t\t}\n\t}", "title": "" }, { "docid": "e63877a9259e2bac051cf6c3de5eca30", "score": "0.6431514", "text": "public function deleteResource(Resource $resource) {\n\t\t$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n\t\ttry {\n\t\t\t$result = $this->filesystem->delete($pathAndFilename);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.6371304", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "95caa506b86f6d24869dcb0b83d598e5", "score": "0.63126063", "text": "public function unlink(IEntity $source, IEntity $target, string $relation): IStorage;", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.6301321", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "b907271045dec6299e819d6cb076ced8", "score": "0.6288393", "text": "abstract protected function doRemove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "90bf57c42b6c381768022b254ea3b8e9", "score": "0.62784326", "text": "public static function remove ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $object) {\n // If an object with the given id exists, remove it.\n if ($object['id'] == $data['id']) {\n array_splice($list, $i, 1);\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "5eda1f28deed9cc179d6350748fe7164", "score": "0.62480205", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n activity()\n ->performedOn(Auth::user())\n ->causedBy($resource)\n ->withProperties(['remove user' => 'customValue'])\n ->log('Resource Deleted successfully');\n $notification = array(\n 'message' => 'Resource Deleted successfully', \n 'alert-type' => 'success'\n );\n \n return back()->with($notification); \n }", "title": "" }, { "docid": "42a9b004cc56ed1225f545039f158828", "score": "0.6130072", "text": "function delete_resource($ref)\n\t{\n\t\n\tif ($ref<0) {return false;} # Can't delete the template\n\n\t$resource=get_resource_data($ref);\n\tif (!$resource) {return false;} # Resource not found in database\n\t\n\t$current_state=$resource['archive'];\n\t\n\tglobal $resource_deletion_state, $staticsync_allow_syncdir_deletion, $storagedir;\n\tif (isset($resource_deletion_state) && $current_state!=$resource_deletion_state) # Really delete if already in the 'deleted' state.\n\t\t{\n\t\t# $resource_deletion_state is set. Do not delete this resource, instead move it to the specified state.\n\t\tsql_query(\"update resource set archive='\" . $resource_deletion_state . \"' where ref='\" . $ref . \"'\");\n\n # log this so that administrator can tell who requested deletion\n resource_log($ref,'x','');\n\t\t\n\t\t# Remove the resource from any collections\n\t\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\t\t\t\n\t\treturn true;\n\t\t}\n\t\n\t# Get info\n\t\n\t# Is transcoding\n\tif ($resource['is_transcoding']==1) {return false;} # Can't delete when transcoding\n\n\t# Delete files first\n\t$extensions = array();\n\t$extensions[]=$resource['file_extension']?$resource['file_extension']:\"jpg\";\n\t$extensions[]=$resource['preview_extension']?$resource['preview_extension']:\"jpg\";\n\t$extensions[]=$GLOBALS['ffmpeg_preview_extension'];\n\t$extensions[]='icc'; // also remove any extracted icc profiles\n\t$extensions=array_unique($extensions);\n\t\n\tforeach ($extensions as $extension)\n\t\t{\n\t\t$sizes=get_image_sizes($ref,true,$extension);\n\t\tforeach ($sizes as $size)\n\t\t\t{\n\t\t\tif (file_exists($size['path']) && ($staticsync_allow_syncdir_deletion || false !== strpos ($size['path'],$storagedir))) // Only delete if file is in filestore\n\t\t\t\t {unlink($size['path']);}\n\t\t\t}\n\t\t}\n\t\n\t# Delete any alternative files\n\t$alternatives=get_alternative_files($ref);\n\tfor ($n=0;$n<count($alternatives);$n++)\n\t\t{\n\t\tdelete_alternative_file($ref,$alternatives[$n]['ref']);\n\t\t}\n\n\t\n\t// remove metadump file, and attempt to remove directory\n\t$dirpath = dirname(get_resource_path($ref, true, \"\", true));\n\tif (file_exists(\"$dirpath/metadump.xml\")){\n\t\tunlink(\"$dirpath/metadump.xml\");\n\t}\n\t@rmdir($dirpath); // try to delete directory, but if it has stuff in it fail silently for now\n\t\t\t // fixme - should we try to handle if there are other random files still there?\n\t\n\t# Log the deletion of this resource for any collection it was in. \n\t$in_collections=sql_query(\"select * from collection_resource where resource = '$ref'\");\n\tif (count($in_collections)>0){\n\t\tif (!function_exists(\"collection_log\")){include (\"collections_functions.php\");}\n\t\tfor($n=0;$n<count($in_collections);$n++)\n\t\t\t{\n\t\t\tcollection_log($in_collections[$n]['collection'],'d',$in_collections[$n]['resource']);\n\t\t\t}\n\t\t}\n\n\thook(\"beforedeleteresourcefromdb\",\"\",array($ref));\n\n\t# Delete all database entries\n\tsql_query(\"delete from resource where ref='$ref'\");\n\tsql_query(\"delete from resource_data where resource='$ref'\");\n\tsql_query(\"delete from resource_dimensions where resource='$ref'\");\n\tsql_query(\"delete from resource_keyword where resource='$ref'\");\n\tsql_query(\"delete from resource_related where resource='$ref' or related='$ref'\");\n\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\tsql_query(\"delete from resource_custom_access where resource='$ref'\");\n\tsql_query(\"delete from external_access_keys where resource='$ref'\");\n\tsql_query(\"delete from resource_alt_files where resource='$ref'\");\n\t\t\n\thook(\"afterdeleteresource\");\n\t\n\treturn true;\n\t}", "title": "" }, { "docid": "d9b3f9cbdf088b174df39b489f05872c", "score": "0.6087595", "text": "public function delete(UriInterface $uri, \\stdClass $resource)\n {\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n\n if(!property_exists($resource, '_links')) {\n return;\n }\n\n $links = $resource->_links;\n\n if($links) {\n foreach ($links as $link) {\n if(is_object($link) && property_exists($link, 'href')) {\n $uri = Client::getInstance()\n ->getDataStore()\n ->getUriFactory()\n ->createUri($link->href);\n }\n\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n }\n }\n\n }", "title": "" }, { "docid": "9b39cbd70aa1aa97e5e5907676b3271e", "score": "0.60398406", "text": "public function removeResource ($name)\n\t{\n\t\t\n\t\tif (isset ($this->resources[$name]))\n\t\t{\n\t\t\t\n\t\t\tunset ($this->resources[$name]);\n\t\t\t\n\t\t\tif (isset ($this->$name))\n\t\t\t{\n\t\t\t\tunset ($this->$name);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.603003", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "d0b2a4440bb64c6f1cf160d3a82d7633", "score": "0.60045654", "text": "public function destroy($id)\n {\n $student=Student::find($id);\n //delete related file from storage\n $student->delete();\n return redirect()->route('student.index');\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.5944851", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "b4847ad1cd8f89953ef38552f8cdddbe", "score": "0.5935105", "text": "public function remove($identifier)\n {\n $resource = $this->repository->findOneByIdentifier($identifier);\n $this->repository->remove($resource);\n }", "title": "" }, { "docid": "b3d5aa085167568cd1836dd269d2e8dc", "score": "0.59211266", "text": "public function delete(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b1845194ffa32f9bcc26cc1bed8ee573", "score": "0.5896058", "text": "public function destroy()\n {\n $item = Item::find(request('id'));\n if ($item) {\n if ($item->image_url != '' && file_exists(public_path().'/uploads/item/'.$item->image_url)) {\n unlink(public_path().'/uploads/item/'.$item->image_url);\n }\n $item->delete();\n return response()->json(['success'=>'Record is successfully deleted']);\n }\n}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.58634996", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "28f192e8f4063c3aaceba80a5680f10b", "score": "0.5845638", "text": "public function deleteResource(Resource $resource)\n {\n $whitelist = ['id'];\n $reflObj = new \\ReflectionClass($resource);\n\n //null out all fields not in the whitelist\n foreach ($reflObj->getProperties() as $prop) {\n if (!in_array($prop->getName(), $whitelist)) {\n $prop->setAccessible(true);\n $prop->setValue($resource, null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.58285666", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "62415c40499505a9895f5a25b8230002", "score": "0.58192986", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n $storage->delete();\n return redirect()->route('storage.index')->with('success', 'Data Deleted');\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.58119655", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "368230bb080f8f6c51f1832974a498e2", "score": "0.58056664", "text": "public function destroy($id)\n {\n $product = Product::where('id',$id)->first();\n $photo = $product->image;\n if($photo){\n unlink($photo);\n $product->delete();\n }else{\n $product->delete();\n }\n\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5797684", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "c473e5d9c679fa421932f0d830432589", "score": "0.5770938", "text": "abstract public function destroyResource(\n DrydockBlueprint $blueprint,\n DrydockResource $resource);", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "22ecee59028ed62aa46bfb196c94d320", "score": "0.5745101", "text": "function remove_from_set($setID, $resource) {\n\tglobal $wpdb;\n\t$resource_table = $wpdb->prefix . 'savedsets_resources';\n\t\n\t$wpdb->delete( $resource_table, array( 'set_id' => $setID, 'resource_id' => $resource ), array( '%d','%d' ) );\n\t\n}", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.57217026", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "45fc5fca7261f9ee05d7a7cfb701d0c1", "score": "0.5717582", "text": "public function destroy($id)\n {\n $del = File::find($id);\n\n if ($del->user_id == Auth::id()) {\n Storage::delete($del->path);\n $del->delete();\n return redirect('/file');\n } else {\n echo \"Its not your file!\";\n }\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.57099277", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5700126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "a85f5bb361425e120c2b1c92b82b2fe9", "score": "0.56977797", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n Storage::disk('public')->delete(str_replace('/storage/','',$file->path));\n $file->delete();\n return redirect('/admin/media');\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "c553ef667073b35a27db9e6a3bae3be3", "score": "0.56575704", "text": "public function unlink() {\n\t\t$return = unlink($this->fullpath);\n\t\t// destroy object ...testing :)\n\t\tunset($this);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0532947b7106b0e9285319a9eaf76b8e", "score": "0.56488144", "text": "public function destroy($id)\n\t{\n $entry = Fileentry::find($id);\n Storage::disk('local')->delete($entry->filename);\n $entry->delete();\n\n return redirect()->back();\n\t}", "title": "" }, { "docid": "c29cf340a7685b50d4992018f03a1a37", "score": "0.5645965", "text": "public function destroy() {\n return $this->resource->destroy();\n }", "title": "" }, { "docid": "0b78e5e9a8d5d2a166659b0988261da1", "score": "0.5633292", "text": "public function destroy($id)\n {\n //\n //\n $slider = Slider::findOrFail($id);\n// if(Storage::exists($slider->image_path))\n// {\n// Storage::delete($slider->image_path);\n// }\n $slider->delete();\n return redirect()->back()->with('success', 'Slider was deleted successfully!');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "f0bca51252baaca5a816eef1c2c06fc0", "score": "0.56296647", "text": "public function detach()\n {\n $oldResource=$this->resource;\n fclose($this->resource);\n $this->resource=NULL;\n return $oldResource;\n }", "title": "" }, { "docid": "41660f6084f57c1f6d52218d45380858", "score": "0.5612277", "text": "public function destroy($id)\n {\n $destroy = File::find($id);\n Storage::delete('public/img/'.$destroy->src);\n $destroy->delete();\n return redirect('/files');\n }", "title": "" }, { "docid": "b6093338d60ff2644649eac3d576e7d9", "score": "0.5606613", "text": "public function delete($resource, array $options = [])\n {\n return $this->request('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "59de27765b5cb766d8d7c06e25831e55", "score": "0.5604046", "text": "function delete() {\n\n return unlink($this->path);\n\n }", "title": "" }, { "docid": "547eb07f41c94e071fb1daf6da02654d", "score": "0.55980563", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n unlink(public_path() .'/images/'.$product->file->file);\n session(['Delete'=>$product->title]);\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2b68a0dafbed1898fb849c8102af4ac1", "score": "0.55952084", "text": "public function destroy($id){\n $book = Book::withTrashed()->where('id', $id)->firstOrFail(); \n\n if ($book->trashed()) {\n session()->flash('success', 'El libro se a eliminado exitosamente');\n Storage::delete($book->image); \n $book->forceDelete();\n }else{\n session()->flash('success', 'El libro se envio a la papelera exitosamente');\n $book->delete();\n }\n return redirect(route('books.index'));\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.55922675", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "8a2965e7fd915ac119635055a709e09f", "score": "0.5591116", "text": "public function destroy($id, Request $request)\n {\n $imagePath = DB::table('game')->select('image')->where('id', $id)->first();\n\n $filePath = $imagePath->image;\n\n if (file_exists($filePath)) {\n\n unlink($filePath);\n\n DB::table('game')->where('id',$id)->delete();\n\n }else{\n\n DB::table('game')->where('id',$id)->delete();\n }\n\n return redirect()->route('admin.game.index');\n }", "title": "" }, { "docid": "954abc5126ecf3e25d5e32fc21b567ff", "score": "0.55901456", "text": "public function remove( $resourceId )\n {\n unset( $this->resourceList[ $resourceId ] );\n \n $this->database->exec( \"\n DELETE FROM\n `{$this->tbl['library_collection']}`\n WHERE\n collection_type = \" . $this->database->quote( $this->type ) . \"\n AND\n ref_id = \" . $this->database->quote( $this->refId ) . \"\n AND\n resource_id = \" . $this->database->escape( $resourceId ) );\n \n return $this->database->affectedRows();\n }", "title": "" }, { "docid": "f7194357aa4e137cfa50acffda93fc27", "score": "0.55829436", "text": "public static function delete($path){}", "title": "" }, { "docid": "a22fc9d493bea356070527d5c377a089", "score": "0.5578515", "text": "public function remove($name) { return IO_FS::rm($this->full_path_for($name)); }", "title": "" }, { "docid": "8a6c54307038aeccb488677b49209dac", "score": "0.5574026", "text": "public function destroy($id)\n {\n //\n //\n $resource = Resource::find($id);\n $resource->delete();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "fa9a2e384d55e25ff7893069c00561f7", "score": "0.5568524", "text": "public function destroy($id)\n {\n $data = Crud::find($id);\n $image_name = $data->image;\n unlink(public_path('images'.'/'.$image_name));\n $data->delete();\n return redirect('crud')->with('success','record deleted successfully!');\n\n\n }", "title": "" }, { "docid": "9e4e139799275c6ed9f200c63b6d4a6d", "score": "0.55617994", "text": "public function delete($resource)\n {\n // Make DELETE Http request\n $status = $this->call('DELETE', $resource)['Status-Code'];\n if ($status) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2160551c2833f1a763a1634fee961123", "score": "0.5560052", "text": "public function deleteItem($path, $options = null)\n {\n $this->_rackspace->deleteObject($this->_container,$path);\n if (!$this->_rackspace->isSuccessful()) {\n throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg());\n }\n }", "title": "" }, { "docid": "684ee86436e720744df6668b707a5ac0", "score": "0.5557478", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "1bc9bf0c3a8c77c07fcaf9de0c876d86", "score": "0.5555183", "text": "public function destroy($id)\n { \n $record = Post::findOrFail($id); \n\n if($record->thumbnail !== 'default.png'){\n Storage::delete('Post/'.$record->thumbnail); \n } \n \n $done = Post::destroy($id); \n\n return back()->with('success' , 'Record Deleted');\n }", "title": "" }, { "docid": "9e9a9d9363b0ac3e68a1243a8083cd0b", "score": "0.55495435", "text": "public function destroy($id)\n {\n \n $pro=Product::find($id);\n $one=$pro->image_one;\n \n $two=$pro->image_two;\n $three=$pro->image_three;\n $four=$pro->image_four;\n $five=$pro->image_five;\n $six=$pro->image_six;\n $path=\"media/products/\";\n Storage::disk('public')->delete([$path.$one,$path.$two,$path.$three,$path.$four,$path.$five,$path.$six]);\n\n\n\n $pro->delete();\n Toastr()->success('Product Deleted successfully');\n return redirect()->back();\n \n }", "title": "" }, { "docid": "2c6776be63eac31e1729852dfa8745a9", "score": "0.5548924", "text": "public function destroy($id)\n {\n $partner = Partner::findOrFail($id);\n\n if($partner->cover && file_exists(storage_path('app/public/' . $partner->cover))){\n \\Storage::delete('public/'. $partner->cover);\n }\n \n $partner->delete();\n \n return redirect()->route('admin.partner')->with('success', 'Data deleted successfully');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "fb75e67696c980503f7ebd09ae729fe9", "score": "0.5538126", "text": "final public function delete() {}", "title": "" }, { "docid": "aa31cbc566ad4ff78241eb4b0f49fe1e", "score": "0.5536226", "text": "public function destroy($id)\n\t{\n\t\t$this->resource->find($id)->delete();\n\n\t\treturn Redirect::route('backend.resources.index');\n\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "b896244b5af3e4822537d0d1d7ab8fdf", "score": "0.5519644", "text": "public function destroy($id)\n {\n $input = $request->all();\n \t$url = parse_url($input['src']);\n \t$splitPath = explode(\"/\", $url[\"path\"]);\n \t$splitPathLength = count($splitPath);\n \tImageUploads::where('path', 'LIKE', '%' . $splitPath[$splitPathLength-1] . '%')->delete();\n }", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.55148435", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "28797da9ff018d2e75ab89e4bc5cd50d", "score": "0.5511856", "text": "public function destroy($id)\n {\n $user= Auth::user();\n\n $delete = $user->profileimage;\n $user->profileimage=\"\";\n $user->save();\n $image_small=public_path().'/Store_Erp/books/profile/'.$delete ;\n unlink($image_small);\n Session::flash('success',' Profile Image Deleted Succesfully!');\n return redirect()->route('user.profile'); \n \n }", "title": "" }, { "docid": "a92d57f4ccac431a9299e4ad1f0d1618", "score": "0.54956895", "text": "public function destroy($id)\n {\n //\n\n $personaje=Personaje::findOrFail($id);\n\n if(Storage::delete('public/'.$personaje->Foto)){\n \n Personaje::destroy($id);\n }\n\n\n\n\n\n return redirect('personaje')->with('mensaje','Personaje Borrado');\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "df0b2bf2ed8277a4cd77f933418a9cd1", "score": "0.5491558", "text": "public function deleteFile()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\t$path = $this->getFileFullPath();\n\t\t\tif($path)\n\t\t\t{\t\t\t\n\t\t\t\t@unlink($path);\n\t\t\t\t$this->setFile(null);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "7e334374ee948826bf9b09b88924db78", "score": "0.0", "text": "public function edit()\n {\n\n }", "title": "" } ]
[ { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.7798324", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "db43c1b18be99950bb3f9c2cbd415bc6", "score": "0.7793788", "text": "public function edit(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.763195", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "4542545c78c16f483a8652d72eafdb22", "score": "0.73010457", "text": "public function edit(Request $request, Resource $resource)\n {\n return view('admin.library.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "cdb0c72e88e0cd40f702a7e0769d3dbc", "score": "0.7023284", "text": "public function editAction()\n {\n $model_sites = new Dlayer_Model_Admin_Site();\n $model_forms = new Dlayer_Model_Admin_Form();\n\n $form_id = $this->session->formId();\n\n $this->form = new Dlayer_Form_Admin_Form(\n '/form/admin/edit',\n $this->site_id,\n $form_id,\n $model_forms->form($this->site_id, $form_id)\n );\n\n if ($this->getRequest()->isPost()) {\n $this->processEditForm($form_id);\n }\n\n $this->view->form = $this->form;\n $this->view->site = $model_sites->site($this->site_id);\n\n $this->controlBar($this->identity_id, $this->site_id);\n\n $this->_helper->setLayoutProperties($this->nav_bar_items, '/form/index/index', array('css/dlayer.css'),\n array(), 'Dlayer.com - Form Builder: Edit form');\n }", "title": "" }, { "docid": "c86b96c430fde96edc13f0bccf177065", "score": "0.6985408", "text": "public function edit($id)\n\t{\n\t\t$model = SysFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'formmanager/update/'.$id,\n \t'model' => $model,\n \t'data' => [ 'application_id' => $model->application_id, 'step_id' => $model->step_id]\n \t]);\n\n\t\treturn View::make('dynaflow::formmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975008", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975008", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6922458", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "9573646f833f8b11dd153b969f5d7e4f", "score": "0.6914262", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n $this->authorize('update', $record);\n\n return view($this->getResourceEditPath(), $this->filterEditViewData($record, [\n 'record' => $record,\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6910914", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6910914", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.6910914", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "db1e0913d8253a53ad2045f953f50ec9", "score": "0.6907047", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('keltanasTrackingBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('keltanasTrackingBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "51b60bf88d430359fa7d26fcaa184bf2", "score": "0.6902111", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'role.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68968475", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "7f842cbf2ce0ed69cfa4cf6d9407235b", "score": "0.6890411", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CaiWebBundle:Contacto')->find(1);\n $editForm = $this->createEditForm($entity);\n return $this->render('CaiWebBundle:Contacto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n ));\n }", "title": "" }, { "docid": "f8bf1d45abb1e3528851c8a71f1abff7", "score": "0.68693423", "text": "public function showEditEntry()\n {\n $id = $this->request->get('id');\n\n $entry = $this->entries->byId($id);\n\n if (!$entry || $entry['user_id'] != $this->users->getCurrentUser()['id']) {\n // Got no valid ID, let's show the new entry form instead\n return null;\n }\n\n return $this->views->render('partials/entry-form', [\n 'action' => '/entry/update',\n 'title' => 'Edit your entry',\n 'id' => $id,\n 'body' => $entry['entry'],\n ]);\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68558204", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68558204", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "3736499054b89a9776863393fe21594e", "score": "0.68464905", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $project = $this->service->retrieveProjectById($id);\n if (!$project) {\n $this->flash('error')->addMessage('project.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $projectForm = $this->service->getFormForEditing($action);\n $projectForm->populate($project->toArray());\n $this->view->project = $project;\n $this->view->projectForm = $projectForm;\n }\n }", "title": "" }, { "docid": "ef3688e29d18642367c0f31d2daf4e03", "score": "0.68404526", "text": "public function edit()\n {\n return view('commonbackend::edit');\n }", "title": "" }, { "docid": "a643a9d707708f188d2b193d7694df02", "score": "0.6839949", "text": "public function edit()\n {\n return view('orgmanagement::edit');\n }", "title": "" }, { "docid": "13c4203d32c70794e7fa65360126b2a8", "score": "0.6835482", "text": "public function editForm()\n {\n $this->pageTitle = \"Edition d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n //recupération de la liste des diapos\n // $DiapModel = new \\Models\\Diap();\n $this->tplVars = $this->tplVars + [\n 'list' => $this->model->findQuestionById(intval($_GET['id']))\n ];\n\n parent::editForm();\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.6834265", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "adf61d4898780a2aa20a30a370bf081a", "score": "0.68260765", "text": "public function edit()\n {\n return view('backend.student.edit-student');\n }", "title": "" }, { "docid": "3372ef1cca9be765c71b7e1a923b6a90", "score": "0.6819532", "text": "public function editAction()\n {\n $command = $this->determineCommand();\n\n return parent::edit(\n $this->formClass,\n $this->itemDto,\n new GenericItem($this->itemParams),\n $command,\n $this->mapperClass,\n $this->editViewTemplate,\n $this->editSuccessMessage,\n $this->editContentTitle\n );\n }", "title": "" }, { "docid": "09bc92e7496673078d971abc033ed6e3", "score": "0.6817734", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $this->checkAccess('edit');\n $model = $this->model->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'row' => $model,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "c526ad3c763ee29db74bb4c3f3f52b67", "score": "0.68051606", "text": "public function edit($id)\n {\n $crud = crud_entry(\\App\\Employee::findOrFail($id));\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6804495", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6804495", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68023956", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "8dbc4c95d40c6dfa50e357491b0a9faf", "score": "0.6799784", "text": "public function fieldEditAction() {\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n $form->setTitle('Edit Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "3b2bff17656413d9e096fd6442febe9d", "score": "0.67989755", "text": "public function edit($id) {\n $model = new $this->model;\n $field = $model::find($id);\n return view('admin.' . strtolower($this->controller) . '.edit', compact('field'));\n }", "title": "" }, { "docid": "4087a9ccdc917123a199f319773aca51", "score": "0.6792864", "text": "public function edit($id)\n {\n $class = $this->model_class;\n $this->data['object'] = $class::find($id);\n\n return View(\"$his->view_folder.form\" , $this->data);\n }", "title": "" }, { "docid": "6f369193d74b243d60195f45f4014a7d", "score": "0.67845535", "text": "public function edit()\n {\n return view('quanlymua::edit');\n }", "title": "" }, { "docid": "de733d13625d2e27b579a67d4dd0e5cb", "score": "0.67826426", "text": "public function getEdit()\n {\n //\n $id = Input::get('id');\n $model = new $this->model;\n $model = $model->find($id);\n return $this->viewMake('form.create', ['model'=> $model]);\n }", "title": "" }, { "docid": "80357935025ac73c8b779d2b96017dee", "score": "0.67715156", "text": "public function edit($id) {\n $name = $this->name;\n $config = $this->config;\n $model = $this->config->find($id);\n $form = new Form($model);\n $this->config->editForm($form, $model);\n return View::make(static::editViewName(), compact('id', 'name', 'config', 'model', 'form'));\n }", "title": "" }, { "docid": "14492a7ddf825dfc7ae7f6d4686195bb", "score": "0.6763847", "text": "protected function edit()\r\n\t{\r\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\r\n\t\t\r\n\t\t$ilTabs->clearTargets();\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", \"\");\r\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\r\n\t\t\t$ilCtrl->getLinkTarget($this, \"show\"));\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", $this->portfolio->getId());\r\n\t\t\r\n\t\t$this->setPagesTabs();\r\n\t\t$ilTabs->activateTab(\"edit\");\r\n\r\n\t\t$form = $this->initForm(\"edit\");\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6762488", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "1ea4682e5ca05d82dc786fe9356d4f95", "score": "0.67611986", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n\n return view('admin.employee.form', [\n 'agent_info' => $employee->agent_info,\n 'block' => false,\n 'employee' => $employee,\n 'user' => $employee->user,\n ]);\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67578626", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754142", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "2895169fb35860c9a4a9caa42b6a0a87", "score": "0.6742351", "text": "public function edit($id)\n {\n\t\t$d['data'] = Product::find($id);\n\t\t$d['action'] = route('product.update', $id);\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "ff2840a2ada11fccc572361d76303fac", "score": "0.6742286", "text": "function edit()\r\n\t{\r\n\t\tJRequest::setVar( 'view', 'individual' );\r\n\t\tJRequest::setVar( 'layout', 'form' );\r\n\t\tJRequest::setVar( 'hidemainmenu', 1);\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737183", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "550b8c0565e8d9d85d89dd1064a7c513", "score": "0.67270994", "text": "public function edit()\n {\n return view('americano::edit');\n }", "title": "" }, { "docid": "ccaae343a137f9e31b8e70fe6ec59921", "score": "0.6716251", "text": "public function editAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n $book = $this->getBookTable()->getBook($id);\n \n $form = new BookForm();\n $form->bind($book);\n $form->get('submit')->setValue('Edit');\n\n $request = $this->getRequest();\n // Check If Request Is Post Verb\n if ($request->isPost()) {\n\n $form->setInputFilter($book->getInputFilter());\n $form->setData($request->getPost());\n \n if ($form->isValid()) {\n \n $this->getBookTable()->saveBook($book);\n // redirect to list of Books\n return $this->redirect()->toRoute('book');\n }\n }\n\n return new ViewModel(array(\n 'id' => $id,\n 'form' => $form\n ));\n }", "title": "" }, { "docid": "1110a6c85644f6c97ab354fc802c4a0e", "score": "0.6707443", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.supplier-form-update', ['page' => 'supplier'])->with($params);\n\t}", "title": "" }, { "docid": "1cca59891cd9a1a8eab0c4cfa3efec29", "score": "0.6705293", "text": "public function edit()\n {\n $work = Work::find($_GET['id']);\n $data = array('work' => $work);\n $this->render('edit', $data);\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6705008", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "40a0f532b30525e860441d9398256e57", "score": "0.6702173", "text": "public function edit()\n\t{\n\t\t$fb = App::make('formbuilder');\n\t\t$fb->route('user.update');\n\t\t$fb->method('put');\n\t\t$fb->model(Sentry::getUser());\n\t\t$fb->text('email')->label('E-mail address');\n\t\t$fb->password('password')->label('Choose a password');\n\t\t$fb->text('username')->label('Choose a username');\n\t\t$form = $fb->build();\n\n return View::make('user.edit', compact('form'));\n\t}", "title": "" }, { "docid": "e3ff61e18a508ad865596d2d7979c61c", "score": "0.6691107", "text": "public function edit($id)\n {\n $title = 'EDITAR REGISTRO';\n $user = formulario::find($id);\n return view('forms.edit',compact('user','title'));\n }", "title": "" }, { "docid": "6593cfdb18f1cef76f37b77910191c1a", "score": "0.6690218", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "4f71399e4c8f08115a843f3eea8564c0", "score": "0.6684071", "text": "public function edit($id)\n {\n //no web interface form.\n }", "title": "" }, { "docid": "f7c6f8c80580ed4b41cc600395910e73", "score": "0.66827047", "text": "public function edit($id)\n\t{\n\t\treturn view('jobform', ['job' => Job::find($id)]);\n\t}", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.66771847", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "0a9012acf11e6cf51d612505152fb4b1", "score": "0.6676559", "text": "function edit()\n{\n\tif (isset($_GET['id'])) {\n\t$id = $_GET['id'];\n\t}\n\t// If post is submit then \n\tif (isset($_POST['submit'])) {\n\n\t\t$specie = $_POST['name'];\n\t\teditSpecie($specie, $id);\n\t}\n\t$specie = getSpecie($id);\n\trender('specie/edit', array(\"specie\" => $specie));\n}", "title": "" }, { "docid": "559ede1cbea107ac064ad8b6596ece86", "score": "0.6675781", "text": "public function editAction($id)\n {\n $entity = $this->getRepository('Alumni')->find($id);\n $this->forward404UnlessExist($entity);\n\n $editForm = $this->createForm(new AlumniType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.66648984", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "b4bcae16b256bb23707dba844fd207b0", "score": "0.665658", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n \n }", "title": "" }, { "docid": "6af50c7db28916d7c5fb1b181a5a08f3", "score": "0.66524565", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->patient->id], 'method' => 'PUT', 'files' => 'true'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['patient' => $this->patient, 'occupations' => $this->occupations,\n \t\t'genders' => $this->genders, 'doc_types' => $this->doc_types]);\n\t}", "title": "" }, { "docid": "a39d1bedc4c3fd6b0b645b643c26dd0d", "score": "0.6650919", "text": "public function edit($id)\n {\n $data = Employee::where('id', $id)->first();\n\n return view('master.form.employee-form', compact('data'));\n }", "title": "" }, { "docid": "e251c12edf60b44bfb7f0149c27bd6fb", "score": "0.6650576", "text": "public function edit()\n {\n return view('wage::edit');\n }", "title": "" }, { "docid": "75e95fc5ea1762bde4210a296e9c267f", "score": "0.66490394", "text": "public function edit()\n {\n return view('spereport::edit');\n }", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66470724", "text": "public function edit($id) {}", "title": "" }, { "docid": "2c86f1804737a94386a0a9ecc5c6ef5f", "score": "0.6640549", "text": "public function editAction ()\n\t{\n\t $id = $this->params()->fromRoute('id');\n\t \n\t $form = $this->form;\n\t\n\t // Get the record by its id\n\t $rsevent = $this->eventService->find($id);\n\n\t\tif(empty($rsevent)){\n\t $this->flashMessenger()->setNamespace('danger')->addMessage('The record has been not found!');\n\t return $this->redirect()->toRoute('events');\n\t }\n\n\t\t// Bind the data in the form\n\t if (! empty($rsevent)) {\n\t $form->bind($rsevent);\n\t }\n\t \n\t $viewModel = new ViewModel(array (\n\t 'form' => $form,\n\t 'event' => $rsevent,\n\t ));\n\t\n\t $viewModel->setTemplate('events/myevents/form');\n\t return $viewModel;\n\t}", "title": "" }, { "docid": "68951ca772c50059eed3598272a55a04", "score": "0.6639726", "text": "public function edit($id)\n {\n $product = $this->product->find($id);\n \n return view('backend.products.form', compact('product'));\n }", "title": "" }, { "docid": "c315ed6d4c45ae50df17c5c88e6e7d1b", "score": "0.6635691", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ExploticFormationBundle:Programme')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programme entity.');\n }\n\n $editForm = $this->createForm(new ProgrammeType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ExploticFormationBundle:Programme:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "d75ec83a50e710b9d72084a319e7792e", "score": "0.66323483", "text": "public function edit($id)\n {\n $groups = Group::all();\n $resource = Resource::find($id);\n\n return view('resources.edit', compact('resource', 'groups'));\n }", "title": "" }, { "docid": "263a6d0205704b8194e7dfa98591df9b", "score": "0.6631446", "text": "public function edit($id)\n {\n $post = Resident::find($id);\n return view('Resident.update',compact('post'));\n }", "title": "" }, { "docid": "2c16ec446fe0f98e637b9db6f176c314", "score": "0.66309977", "text": "public function edit() {\n\t\treturn view('menunodes::edit');\n\t}", "title": "" }, { "docid": "bfc930933e9f3e9d06498ce4cba6f6d7", "score": "0.66276705", "text": "public function edit($id)\n {\n $model = Penyakit::findOrFail ($id);\n return view('penyakit.form', compact('model'));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275823", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.66275823", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "6c7bf6b61cccd78f9bdd9fe827ba971e", "score": "0.6622879", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FaqBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FaqBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "8bc6a12adfcb55f0d15b83ee616716b8", "score": "0.66182965", "text": "public function edit()\n\n {\n\n return view('petro::edit');\n }", "title": "" }, { "docid": "4ff556dfbe00e2d7a94424804ebd14e3", "score": "0.6618244", "text": "public function editAction(){\n $id = $this->request->get('id');\n\n if($id === null){\n $product = new Product();\n }\n else{\n $product = $this->productService->getProductById($id);\n\n if(empty($product)){\n return $this->redirect($this->generateUrl('product_dashboard'));\n }\n }\n\n $form = $this->createForm(new ProductType(), $product);\n\n if($this->request->isMethod('POST')){\n $form->handleRequest($this->request);\n\n if($form->isValid()){\n\n $product->setAuthor($this->getUser());\n $this->productService->save($product);\n\n return $this->redirect($this->generateUrl('product_view', array(\n 'id' => $product->getId()\n )));\n }\n }\n\n return $this->render('AppBundle:Product:edit.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "fbedcf2a06421ca46ad8913d5241677f", "score": "0.6609848", "text": "public function edit($pid)\n {\n $page = Page::find($pid);\n\n //$resources = $page->resources;\n \n return view('backend.page.edit', [ 'page' => $page ]);\n }", "title": "" }, { "docid": "cbe6404e0b856f507d216614da279133", "score": "0.66035753", "text": "public function edit($id)\n {\n $data = $this->model::findOrFail($id);\n return view($this->masterViews.$this->routeName.'.form', [\n 'data' => $data\n ]);\n }", "title": "" }, { "docid": "f650ecccdc3bc04d40c14326ca38a218", "score": "0.6600333", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('company_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('company_edit'), 'admin/client/company/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "4cbc72aea8193be8560ed0067ce3d4c0", "score": "0.6599912", "text": "protected function edit()\n {\n $this->index();\n\n $this->manager->register('edit', function (BreadcrumbsGenerator $breadcrumbs) {\n $breadcrumbs->parent('index');\n\n $breadcrumbs->push(trans('administrator::module.action.edit', [\n 'resource' => $this->module->singular(),\n 'instance' => $this->presentEloquent(),\n ]), null);\n });\n }", "title": "" }, { "docid": "815fc178547c2d0d001ea48b96ac28de", "score": "0.6596107", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppFrontBundle:Recommandation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Recommandation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppFrontBundle:Recommandation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "25924f3d76afc3161783024ff1fd4760", "score": "0.6593043", "text": "public function edit() {\n\t\tif(!is_numeric($this->intFieldID) || empty($this->intFieldID)) {\n\t\t\t// Shows form interface\n\t\t\t$this->objSmarty->assign('ALERT_MSG','You must choose an item to update!');\n\t\t\t$this->_create();\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// Gets Field Data\n\t\t$this->getFieldData();\n\t\t$this->objSmarty->assign('objField',$this->objField);\n\t\n\t\t// Gets Fields List\n\t\t$this->getFieldList();\n\t\t$this->objSmarty->assign('objData',$this->objData);\n\t\t\n\t\t// Shows interface\n\t\t$this->renderTemplate(true,$this->strModule . '_form.html');\n\t}", "title": "" }, { "docid": "52f52954a41b6894d59ede21ba179876", "score": "0.65918976", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->inventary->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['inventary' => $this->inventary,\n \t\t\t'presentation' => $this->presentation,\n \t\t\t'medicament' => $this->medicament,\n \t\t\t'measure' => $this->measure]);\n\t}", "title": "" }, { "docid": "4d84262d451772dea46e8a483cc70202", "score": "0.65894973", "text": "public function edit(FarmerFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "6560ccaab1f3afa48d06c1b0ef34fde3", "score": "0.6587792", "text": "public function edit (Person $person){\n return view('person/form', ['action'=>'edit', 'data'=>$person]);\n }", "title": "" }, { "docid": "0725b077de449824aa68932fd4c06e1e", "score": "0.65860105", "text": "public function edit($id)\n\t{\n\t\tView::share('action', 'edit');\n\t\t$this->book = Book::with('author')->findOrFail($id);\n\t\t$this->layout->content = View::make('book/edit')->with('book', $this->book);\n\t}", "title": "" }, { "docid": "0a559309f2a48b4e6e1f531aeecd4b3a", "score": "0.65808165", "text": "public function edit($id)\n {\n //\n \n if(Auth::user()->isAdmin()) {\n $product = Product::find($id);\n return view('products.edit_form') -> with('product', $product) -> with('manufacturers', Manufacturer::all());\n } else {\n \n session()->flash('danger', 'You do not have right to edit the product.');\n \n }\n return redirect()->back();\n }", "title": "" }, { "docid": "70e3eeb150905e8b48dd4b8560cfe424", "score": "0.6580291", "text": "public function edit($id)\n\t{\n\t\t$permission = Company::getPermission();\n if(@$permission->modifica) {\n\t\t\t$company = Company::find($id);\n\t\t\tif(!$company instanceof Company) {\n\t\t\t\tApp::abort(404);\t\n\t\t\t}\t\n\n\t return View::make('core.companys.form')->with(['company' => $company]);\n\t\t}else{\n return View::make('core.denied'); \n }\n\t}", "title": "" }, { "docid": "5eeda893f9563e6e4d9ef7aac6ef14dd", "score": "0.6576486", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n\n // show the edit form and pass the product\n return view()->make('product.editProduct')->with('product', $product);\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.65762484", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "adf8a8a4d2598db563e5a217bbdba3cd", "score": "0.65710163", "text": "public\n\tfunction edit() {\n\t\treturn view('roles::edit');\n\t}", "title": "" }, { "docid": "102b804d3fdc24125875b01f5339096a", "score": "0.65709734", "text": "public function edit($id)\n {\n return view('form.edit', Form::findorfail($id));\n }", "title": "" }, { "docid": "a651c6517dc564dd0eb52196153145f4", "score": "0.65683854", "text": "public function edit($id)\n {\n $company = Company::find($id);\n\n return view('admin.company.form', [\n 'company' => $company,\n 'route' => ['admin.company.update', $company->id],\n 'method' => 'PUT',\n ]);\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.65654945", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "68da20be5e82039c2fba4910c44d49f6", "score": "0.65632623", "text": "public function edit($id)\n {\n $student = DB::table('students')->find($id);\n return View('editform', ['student'=>$student ]);\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6560779", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6560779", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "9542e5826079257d8519ea97a2407767", "score": "0.6556334", "text": "public function edit($id)\n\t{\n return View::make('admin.factures.edit');\n\t}", "title": "" }, { "docid": "0411a30556adbbb3e82ba9aeabd2fe3a", "score": "0.65553004", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$employee=Employee::find($id);\n \t\treturn view('admin.employees.edit',compact('employee'));\n\t}", "title": "" } ]