• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP newObject函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中newObject函数的典型用法代码示例。如果您正苦于以下问题:PHP newObject函数的具体用法?PHP newObject怎么用?PHP newObject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了newObject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: avSelectWPrintTree

 function avSelectWPrintTree($name, $module, $class, $cclass, $show, $current, $method = '')
 {
     global $SYS;
     $cdata = newObject("{$class}", $current);
     $dsize = strlen($cdata->{$show}) * 1.5 + 5;
     return "\n\t\t\n\t\t<input type=\"hidden\" size=\"11\" maxlength=\"11\" name=\"{$name}\" id=\"Target{$class}{$name}\" value=\"{$current}\">\n\t\t<input type=\"text\" size=\"{$dsize}\" name=\"_t_{$name}\" id=\"wTarget{$class}{$name}\" value=\"" . $cdata->{$show} . "\" readonly>\n\t\t<span onclick='window.open(\"{$SYS["ROOT"]}/Framework/Extensions/Tree/TreeW.php?module={$module}&class={$class}&show={$show}&current={$current}&name={$name}&cclass={$cclass}&method={$method}\",\"wFrame{$class}{$name}\",\"width=400,height=300,toolbar=0,scrollbar=0\")'\n\t\tstyle=\"cursor:pointer;background-color:white;border:1px solid gray\">&nbsp;+&nbsp;</span>\n\t\t";
 }
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:7,代码来源:lib_tree.php


示例2: run

function run()
{
    set_time_limit(0);
    /* Accion */
    $con = newObject("ghost", $this->host);
    $connection = $con->makeConnection();
    if ($connection) {
        // <tipo type="list" option="Ejecución|Espera">Tipo</tipo>
        switch ($this->tipo) {
            case 'Ejecución':
                return $this->_run_command($connection);
                break;
            case 'Espera':
                while (!$this->_waitfor($connection)) {
                    sleep(30);
                }
                break;
            case 'Crear Script':
                return $this->_scripting($connection);
                break;
        }
    } else {
        $this->ERROR = "Error al ejecutar el comando";
        return false;
    }
    return true;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:27,代码来源:gstep.php


示例3: Save

function Save()
{
    //$this->fecha_pub=time();
    $f = newObject("fileh");
    $f->CaptureFile = 'foto';
    $par = new Ente($this->name);
    $par = typecast($this, "Ente");
    return $par->save();
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:9,代码来源:example.php


示例4: listUsersInGroupId

function listUsersInGroupId()
{
    $o = newObject("user");
    $res = $o->select("(grupos&{$this->code}={$this->code})");
    foreach ($res as $k => $v) {
        $r[$v->ID] = $v->apellidos . ",  " . $v->nombre;
    }
    return $r;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:9,代码来源:group.php


示例5: save

function save()
{
    $f = newObject("fileh");
    $f->CaptureFile = 'foto';
    //dataDump($this);
    $par = new Ente($this->name);
    $par = typecast($this, "Ente");
    //dataDump($par);
    return $par->save();
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:10,代码来源:notice.php


示例6: ART_block_biblio

function ART_block_biblio()
{
    global $SYS;
    $c = newObject("categoria");
    $c->searchResults = $c->select("cat_id=0 AND nombre <> 'faqs'", $offset, $sort);
    ob_start();
    listList($c, array(), "Articulus/biblio");
    //plantHTML($SYS,"Articulus/biblio");
    $data = ob_get_contents();
    ob_end_clean();
    return $data;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:12,代码来源:block_articulus.php


示例7: FORUS_block_forus

function FORUS_block_forus()
{
    global $SYS;
    $c = newObject("categoria");
    $c->searchResults = $c->select("nombre='faqs'", $offset, $sort);
    if ($c->nRes > 0) {
        $faq = $c->searchResults[0]->ID;
    }
    if (BILO_isLogged()) {
        $clase = "login";
    } else {
        $clase = "logoff";
    }
    return "<table  border=\"0\"  width=\"127\" cellspacing=\"0\" class=\"block\"><tr><th class=\"{$clase}\">Soporte Linux\n\t</td></tr><tr><td class=\"boton\"><a style=\"text-decoration:none;\" href=\"{$SYS["ROOT"]}/Forus/Lista_Foros/\">Foros</a></td></tr><td class=\"boton\"><a style=\"text-decoration:none;\" href=\"{$SYS["ROOT"]}/Articulus/Lista/cat_id={$faq}/\">Faqs</a></td></tr></table>";
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:15,代码来源:block_forus.php


示例8: PublicMdP

function PublicMdP(&$res, $link = "", $max = 0)
{
    if ($max > 4) {
        return true;
    }
    $p = newObject("departamento", $this->cat_id, $max++);
    if ($p->ID < 2) {
        $res .= " -&#062; <a class=\"minimal\" href=\"{$link}/ID={$this->ID}/\">{$this->nombre}</a>";
        return true;
    } else {
        $p->PublicMdP(&$res, $link, $max);
        $res .= "-&#062;<a class=\"minimal\" href=\"{$link}/ID={$this->ID}/\">{$this->nombre}</a>";
    }
    return true;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:15,代码来源:documento.php


示例9: disminuirVisitas

function disminuirVisitas($source, $event, $formData)
{
    global $GSPAnel;
    $objResponse = new xajaxResponse();
    $task = newObject("example", $formData["ID"]);
    if ($task->ID < 2) {
        $objResponse->script("alert('Selecciona un ejemplo primero')");
    } else {
        $valorvisitas = $task->visita - 1;
        $task->visita = $valorvisitas;
        $task->save();
        $objResponse->script("alert('Visitas: {$task->visita}')");
        $objResponse->script("tableGrid_{$GSPAnel->dGrid->id}.refresh()");
        $objResponse->script("xajax_wForm.requestloadFromId({$task->ID},'{$GSPAnel->aForms[0]->id}','example')");
    }
    return $objResponse;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:17,代码来源:action_xajax.php


示例10: BILO_block_user

function BILO_block_user()
{
    global $SYS;
    ob_start();
    if (BILO_isLogged()) {
        $u = newObject("user", BILO_uid());
        $u->username = BILO_username();
        $u->clase = "login";
        plantHTML($u, "Public/block_ok_login");
    } else {
        $u = newObject("user");
        debug(BILO_username(), "blue");
        $u->clase = "logoff";
        plantHTML($u, "Public/block_no_login");
    }
    $data = ob_get_contents();
    ob_end_clean();
    return $data;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:19,代码来源:block_user.php


示例11: checkSecurity

function checkSecurity($p)
{
    $current_user = $_SESSION["__auth"]["userId"];
    if (BILO_isAdmin()) {
        debug("Sec passed by Group Administrador Is God(TM)", 'red');
        return True;
    }
    if ($p->ID < 2) {
        // We are creating a new file or new folder
        // Check if directory has write access for all
        $dir = newObject("data_object", $p->inode);
        if (strpos($dir->p_other, 'w') !== False) {
            debug("Sec passed by Other:w", 'red');
            return True;
        }
        // Check if directory has write access for group
        if (BILO_checkGroup($dir->gid)) {
            if (strpos($dir->p_group, 'w') !== False) {
                debug("Sec passed by Group:w", 'red');
                return True;
            }
        }
        // Check if directory has write access for user
        if (BILO_uid() == $dir->uid) {
            if (strpos($dir->p_owner, 'w') !== False) {
                debug("Sec passed by Owner:w " . BILO_uid() . "|" . $dir->uid, 'red');
                return True;
            }
        }
    } else {
        // We are modyfing a file or new folder
        // Check if element has write access for all
        // Check if element has write access for user
        if (BILO_uid() == $p->uid) {
            if (strpos($p->p_owner, 'w') !== False) {
                debug("Sec passed by Owner:w " . BILO_uid() . "|" . $p->uid, 'red');
                return True;
            }
        }
    }
    return false;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:42,代码来源:security.php


示例12: save

function save()
{
    global $prefix;
    debug("Info: Calling Extended save");
    if ($this->ID > 1 && $this->md5 != $this->md5calc()) {
        $o = newObject("gtasklog");
        $res = $o->selectA("schedule_id=" . $this->ID . " AND inicio>" . time());
        foreach ($res as $row) {
            $IDS[] = $row["ID"];
        }
        if ($IDS) {
            debug("Purgando programaciones", "green");
            _query("DELETE FROM  {$prefix}_gtasklog WHERE estado='No Iniciada' AND ID IN (" . implode(",", $IDS) . ")");
        }
    }
    $this->md5 = $this->md5calc();
    $par = new Ente($this->name);
    $par = typecast($this, "Ente");
    //dataDump($par);
    return $par->save();
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:21,代码来源:schedule.php


示例13: generateJobsToday

function generateJobsToday()
{
    setlimitRows(150000);
    $d = newObject("gtasklog");
    $d->deletes("estado='No iniciada' AND inicio>" . dateTodayStamp());
    $u = newObject("gtask");
    $ids = $u->allID();
    $d = array();
    $tasks = array(1);
    foreach ($ids as $id) {
        $o = newObject("gtask", $id);
        $cron = new Parser($o->getCronString());
        $RunsToday = $cron->getRuns(time());
        foreach ($RunsToday as $timeStampOfRun) {
            //echo strftime("%d/%m/%Y %H:%M",$cron_ran)." # ".$cron_ran;
            $tl = newObject("gtasklog");
            $tasklog = $tl->getByTaskDate($o, $timeStampOfRun);
            if ($tasklog) {
                $tasks[] = $tasklog->ID;
                //print_r($tasklog);
            } else {
                //
                $tl = newObject("gtasklog");
                $tl->etiqueta = $o->titulo . "@" . strftime("%Y%m%d");
                $tl->tipo = 'Desde Definición';
                $tl->gtask_id = $id;
                $tl->schedule_id = $o->schedule_id;
                $tl->inicio = $timeStampOfRun;
                $tl->estado = 'No iniciada';
                $tl->automatica = $o->automatica;
                $tl->emailconfirmacion = $o->emailconfirmacion;
                $tl->departamento = $o->departamento;
                $tl->diasderetraso = $o->diasderetraso;
                $tasks[] = $tl->save();
            }
        }
    }
    resetlimitRows();
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:39,代码来源:GlobalSche.php


示例14: save

function save()
{
    $obj = newObject($this->campos["entity"]);
    $this->usuario_id = BILO_uid();
    $this->vista = $this->campos['entity'];
    foreach ($this->campos as $key => $value) {
        if (!in_array($key, array_keys($obj->properties))) {
            unset($this->campos[$key]);
        }
    }
    $this->campos_ser = serialize($this->campos);
    setLimitRows(15000);
    $this->searchResults = $this->select("usuario_id={$this->usuario_id} AND vista='{$this->vista}'");
    resetLimitRows();
    if ($this->nRes > 0) {
        $this->ID = $this->searchResults[0]->ID;
    } else {
        $this->ID = 1;
    }
    $par = new Ente($this->name);
    $par = typecast($this, "Ente");
    return $par->save();
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:23,代码来源:i_vista.php


示例15: newObject

<?php

require_once "Memo.php";
require_once "security.php";
$dir = newObject("data_object");
if (!isset($inode)) {
    $inode = 0;
} else {
    $inode = $inode + 0;
}
if (!isset($sort)) {
    $sort = "type DESC";
}
$aux = newObject("data_object", $inode);
$aux2 = newObject("data_object", 0);
$mdptext = "";
$aux->mdp(&$mdptext);
$dir->path = $mdptext;
$dir->current_inode = $inode;
if (checkReadSecurity($aux)) {
    $dir->searchResults = $dir->select("inode={$inode}", $offset, $sort);
    $safe_list = array();
    do {
        $ele = current($dir->searchResults);
        if (checkReadSecurity($ele)) {
            $safe_list[] = $ele;
        }
    } while (next($dir->searchResults));
    $dir->searchResults = $safe_list;
    if (sizeof($safe_list) < 1 || $safe_list[0] == false) {
        unset($dir->searchResults);
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:31,代码来源:list.php


示例16: HTML

<?php

require_once "coreg2.php";
HTML("action_header");
$url = urldecode($params);
$b = newObject("bookmark");
$b->url = $url;
$b->nombre = $name;
$b->user_id = BILO_uid();
if (!$b->save()) {
    echo $b->ERROR;
} else {
    echo "Guardado correctamente [{$name}]";
}
HTML("action_footer");
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:15,代码来源:add.php


示例17: resetPassword

function resetPassword($hash)
{
    global $SYS;
    if ($hash != "") {
        $action = newObject("reset_psw");
        $action->searchResults = $action->select("hash='{$hash}' AND completed='No'", $offset, $sort);
        if ($action->nRes > 0) {
            $temp = $action->searchResults[0];
            $user = newObject("user", $temp->user_id);
            $exp_reg = "[^A-Z0-9]";
            $longitud = 5;
            $pass = substr(eregi_replace($exp_reg, "", md5(rand())) . eregi_replace($exp_reg, "", md5(rand())) . eregi_replace($exp_reg, "", md5(rand())), 0, $longitud);
            $user->password = md5($pass);
            //dataDump($user);
            if ($user->save()) {
                $temp->completed = 'Si';
                $temp->save();
                $link = "Se ha generado una nueva contraseña para su usuario, a continuación le informamos de sus nuevos datos para conectarse:<br><br>\n                        Usuario: {$user->username}<br><br>\n                        Contraseña: {$pass}";
                require_once "Lib/lib_phpmailer.php";
                $mail = new PHPMailer();
                $mail->AddAddress($user->email);
                $mail->IsHTML(true);
                $mail->From = $SYS["admin_email"];
                $mail->FromName = $SYS["admin_realm"];
                $mail->Attached = $mail->AddAttachment($path, $name = "", $encoding = "base64", $type = "application/octet-stream");
                $mail->Subject = $SYS["SITENAME"] . _("::Nueva contraseña de usuario");
                $mail->Body = $link;
                if (!$mail->Send()) {
                    $this->ERROR = $mail->ErrorInfo();
                    return false;
                } else {
                    return true;
                }
            }
        } else {
            $this->ERROR = _("No se encuentra la solicitud");
            return false;
        }
    }
    $this->ERROR = _("Hash invalido");
    return false;
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:42,代码来源:user.php


示例18: plantHTML

<?php

require_once "Articulus.php";
plantHTML($_GET, "menu_cat");
$cat_id = isset($cat_id) ? $cat_id : 1;
setNavVars(array("ID", "cat_id"));
$u = newObject("categoria", $cat_id);
$cat = "Categoria: <b>{$u->nombre}</b><br>";
echo $cat;
$u->searchResults = $u->select("cat_id={$cat_id}", $offset, $sort);
$filas = _affected_rows();
if ($filas > 0) {
    listList($u, array(), "list_cat");
} else {
    echo "No hay subcategorias<br>";
}
$v = newObject("documento");
$v->searchResults = $v->select("cat_id={$cat_id}", $offset, $sort);
$filas = _affected_rows();
if ($filas > 0) {
    listList($v, array(), "list_doc");
} else {
    echo "No hay documentos<br>";
}
if ($u->cat_id > 1) {
    plantHTML($u, "view_cat");
} else {
    plantHTML($u, "menu_todo");
}
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:29,代码来源:public-index2.php


示例19: newObject

<?php

require_once "Biblio.php";
require_once "Lib/lib_tree.php";
$libro = newObject("b_libro", $ID);
//$wRes=new avSelectTree();
/*
$libro->b_categoria_id=$wRes->avSelectPrintTree("b_categoria_id","Biblio","b_categoria","b_cat_padre_id","nombre_cat",$p->b_categoria_padre_id);
*/
//$libro->b_categoria_id=$wRes->avSelectPrintTree("b_categoria_id","Biblio","b_categoria","b_cat_padre_id","nombre_cat",$libro->b_categoria_id);
formAction("action_save_libro.php", "footer", "editForm");
$libro->boton0 = gfxBotonAction("Guardar", "getElementById('editForm').submit()", True);
$c = newObject("b_categoria");
$libro->b_categoria = $libro->get_selected_options("b_categoria");
$d = array("b_categoria" => $c->listAll("nombre_cat"));
plantHTML($libro, "fichalibro", $d);
formClose();
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:17,代码来源:add_libro.php


示例20: plantHTML

<?php

require_once "JasperReports.php";
//require_once("modificacion.php");
plantHTML(array(), 'action_header');
$ID = isset($ID) ? $ID : 1;
if ($ID > 1) {
    $mod = newObject("reportparams", $ID);
} else {
    $mod = newObject("reportparams");
}
$mod->setAll($_POST);
$pos = strpos($mod->body, "<br />");
echo $pos;
$mod->resumen = substr($mod->body, 0, $pos);
if ($mod->save()) {
    echo "Informe '{$titulo}' guardado correctamente";
    frameGo("fbody", 'listadoreportparams.php');
} else {
    echo "Error:  {$mod->error}";
}
HTML('action_footer');
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:22,代码来源:action_save_reportparams.php



注:本文中的newObject函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP newStoryFor函数代码示例发布时间:2022-05-15
下一篇:
PHP newImage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap