当前位置: 首页>>代码示例>>PHP>>正文


PHP G::SendMessage方法代码示例

本文整理汇总了PHP中G::SendMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP G::SendMessage方法的具体用法?PHP G::SendMessage怎么用?PHP G::SendMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在G的用法示例。


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

示例1: DBConnection

 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd., 
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 * 
 */
$frm = $HTTP_POST_VARS['form'];
$frm = G::PrepareFormArray($frm);
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
$appid = $HTTP_SESSION_VARS['CURRENT_APPLICATION'];
$code = strtoupper($frm['APP_CODE']);
$descrip = $frm['APP_DESCRIPTION'];
//crear nueva applicacion
G::LoadClassRBAC("applications");
$obj = new RBAC_Application();
$obj->SetTo($dbc);
print "xx {$res}";
$res = $obj->applicationCodeRepetido($code);
if ($res != 0 && $res != $appid) {
    G::SendMessage(15, "error");
    header("location: appList.php");
    die;
}
print "xx {$res}";
$uid = $obj->editApplication($appid, $code, $descrip);
header("location: appList.html");
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:appEdit2.php

示例2: DBConnection

 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd., 
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 * 
 */
$frm = $_POST['form'];
$pass1 = $frm['PASSWORD'];
$pass2 = $frm['PASSWORD2'];
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
G::LoadClassRBAC('user');
$obj = new RBAC_User();
$obj->SetTo($dbc);
if ($pass1 != $pass2) {
    G::SendMessage(3, 'error');
    header('location: userChangePwd.php');
    die;
}
$obj->SetTo($dbc);
$obj->changePassword($_SESSION['CURRENT_USER'], $pass1);
header('location: userEdit.html');
//header('location: userViewRole.html');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:userChangePwd2.php

示例3: deleteCalendar

 function deleteCalendar($CalendarUid)
 {
     //if exists the row in the database propel will update it, otherwise will insert.
     $tr = CalendarDefinitionPeer::retrieveByPK($CalendarUid);
     if (!(is_object($tr) && get_class($tr) == 'CalendarDefinition')) {
         //
         return false;
     }
     $defaultCalendars[] = '00000000000000000000000000000001';
     if (in_array($tr->getCalendarUid(), $defaultCalendars)) {
         return false;
     }
     $tr->setCalendarStatus('DELETED');
     $tr->setCalendarUpdateDate('now');
     if ($tr->validate()) {
         // we save it, since we get no validation errors, or do whatever else you like.
         $res = $tr->save();
     } else {
         // Something went wrong. We can now get the validationFailures and handle them.
         $msg = '';
         $validationFailuresArray = $tr->getValidationFailures();
         foreach ($validationFailuresArray as $objValidationFailure) {
             $msg .= $objValidationFailure->getMessage() . "<br/>";
         }
         G::SendMessage("ERROR", $msg);
         //return array ( 'codError' => -100, 'rowsAffected' => 0, 'message' => $msg );
     }
     //return array ( 'codError' => 0, 'rowsAffected' => $res, 'message' => '');
     //to do: uniform  coderror structures for all classes
     //if ( $res['codError'] < 0 ) {
     //  G::SendMessageText ( $res['message'] , 'error' );
     //}
 }
开发者ID:nshong,项目名称:processmaker,代码行数:33,代码来源:CalendarDefinition.php

示例4: DBConnection

 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd., 
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 * 
 */
$frm = $_POST['form'];
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
$parent = $_SESSION['CURRENT_PERM_PARENT'];
$appid = $_SESSION['CURRENT_APPLICATION'];
$code = strtoupper($frm['PRM_CODE']);
$descrip = $frm['PRM_DESCRIPTION'];
//crear nuevo permiso
G::LoadClassRBAC("permissions");
$obj = new RBAC_Permission();
$obj->SetTo($dbc);
$res = $obj->permissionCodeRepetido($code);
if ($res != 0) {
    G::SendMessage(16, "error");
    header("location: permList.php");
    die;
}
$uid = $obj->createPermission($parent, $appid, $code, $descrip);
header("location: permList.html");
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:permNew2.php

示例5: DBConnection

 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd., 
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 * 
 */
$frm = $_POST['form'];
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
$roleid = $_SESSION['CURRENT_ROLE_PARENT'];
$appid = $_SESSION['CURRENT_APPLICATION'];
$code = strtoupper($frm['ROL_CODE']);
$descrip = $frm['ROL_DESCRIPTION'];
//crear nuevo rol
G::LoadClassRBAC("roles");
$obj = new RBAC_Role();
$obj->SetTo($dbc);
$res = $obj->roleCodeRepetido($code);
if ($res != 0 && $res != $roleid) {
    G::SendMessage(14, "error");
    header("location: roleList.php");
    die;
}
$uid = $obj->editRole($roleid, $appid, $code, $descrip);
header("location: roleList.html");
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:roleEdit2.php

示例6: DBConnection

    $frm['USR_USE_LDAP'] = '';
}
$email = $frm['USR_EMAIL'];
$phone = $frm['USR_PHONE'];
$cell = $frm['USR_CELLULAR'];
$fax = $frm['USR_FAX'];
$pobox = $frm['USR_POBOX'];
$userID = $frm['USR_USERNAME'];
$status = $frm['USR_STATUS'];
$due = $frm['USR_DUE_DATE'];
$useLdap = $frm['USR_USE_LDAP'];
$uid = $_SESSION['CURRENT_USER'];
$dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
G::LoadClassRBAC('user');
$obj = new RBAC_User();
$obj->SetTo($dbc);
$repId = $obj->UserNameRepetido($uid, $userID);
if ($repId != 0) {
    G::SendMessage(6, 'error');
    header('location: userEdit.php');
    die;
}
$obj->SetTo($dbc);
$obj->SetToRBAC(DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME);
$uid = $obj->editUser($uid, $first, $mid, $names, $email, '', '', '', '', $userID, $status, $due, '', '', '');
$obj->Load($uid);
if ($obj->Fields['USR_USE_LDAP'] != $useLdap) {
    $obj->updateLDAP($uid, $obj->Fields['USR_LDAP_SOURCE'], $obj->Fields['USR_LDAP_DN'], $useLdap);
}
header('location: userEdit.html');
//header('location: userViewRole.html');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:userEdit2.php


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