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


PHP Main::setMessage方法代码示例

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


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

示例1:

if (isset($_POST['emailupdate'])) {
    $oldemail = $_POST['oldemail'];
    $newemail = $_POST['newemail'];
    $inptpass = $_POST['inputpassword'];
    if (isset($oldemail) && !empty($oldemail)) {
        if (isset($newemail) && !empty($newemail)) {
            if (isset($inptpass) && !empty($inptpass)) {
                $myUser->emailUpdate($_SESSION['userid'], $oldemail, $newemail, $inptpass);
            } else {
                Main::setMessage("settings.php", "Please make sure to have repeated the password", "alert-error");
            }
        } else {
            Main::setMessage("settings.php", "Please Input the values on the New Email Field", "alert-error");
        }
    } else {
        Main::setMessage("settings.php", "Please input your old Email!", "alert-error");
    }
}
?>
	<div class="row">
		<div class=".col-lg-12 col-offset-1">
			<h2>Password Update</h2>

			<form class="form-horizontal" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
				<div class="form-group">
					<label class="col-lg-2 control-label" for="inputOldPassword">Old Password</label>

					<div class="col-lg-8">
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:31,代码来源:settings.php

示例2:

require_once 'header.php';
$myUser->notLogedin();
if (isset($_POST['addhost'])) {
    $hostname = $_POST['hostname'];
    $domainorip = $_POST['domainorip'];
    $port = $_POST['port'];
    $ispublic = $_POST['ispublic'];
    $userid = $_SESSION['userid'];
    if (!isset($hostname) && empty($hostname)) {
        Main::setMessage("host.php", "Please make sure to have putted the correct Host Name!", "alert-error");
    }
    if (!isset($domainorip) && empty($domainorip)) {
        Main::setMessage("host.php", "Please make sure to have putted the correct Hostname or IP", "alert-error");
    }
    if (!isset($port) && empty($port)) {
        Main::setMessage("host.php", "Please make sure you have inputted the correct port number!", "alert-error");
    } else {
        $myUser->addHost($userid, $hostname, $domainorip, $port, $ispublic);
    }
}
?>
	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<div class="form-group">
			<label class="col-lg-2 control-label" for="inputHostname">Host Name</label>

			<div class="col-lg-5">
				<input type="text" name="hostname" class="form-control" id="inputHostname" placeholder="Host Name">
			</div>
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:31,代码来源:host.php

示例3: session_destroy

<?php

require_once 'config.php';
session_destroy();
Main::setMessage("index.php", "You have logged out!", "alert-info");
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:5,代码来源:logout.php

示例4: hostDelete

 /**
  * It will delete a specific host
  *
  * @param $userid
  * @param $hostid
  */
 public function hostDelete($userid, $hostid)
 {
     $string = "DELETE FROM hosts WHERE id=" . $hostid . " AND user_id=" . $userid . "";
     $validation = "SELECT user_id FROM hosts WHERE id=" . $hostid . "";
     $result = mysql_query($validation);
     $row = mysql_fetch_row($result);
     if ($row[0] == $userid) {
         if (mysql_query($string)) {
             Main::setMessage("index.php", "The host was successfully deleted from the database!", "alert-success");
         } else {
             Main::setMessage("index.php", mysql_error(), "alert-error");
         }
     } else {
         Main::setMessage("index.php", "There was an error, please retry again!", "alert-error");
     }
 }
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:22,代码来源:Users.php

示例5:

                    if (isset($email) && !empty($email)) {
                        $myUser->userRegister($username, $password, $passrep, $email, $name, $lastname);
                    } else {
                        Main::setMessage("register.php", "The email filed is empty!", "alert-error");
                    }
                } else {
                    Main::setMessage("register.php", "The password field is empty!", "alert-error");
                }
            } else {
                Main::setMessage("register.php", "The username field is empty!", "alert-error");
            }
        } else {
            Main::setMessage("register.php", "The lastname field is empty!", "alert-error");
        }
    } else {
        Main::setMessage("register.php", "The name field is empty!", "alert-error");
    }
}
?>

	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<div class="form-group">
			<label class="col-lg-2 control-label" for="inputName">Name</label>

			<div class="col-lg-5">
				<input type="text" name="name" class="form-control" id="inputName" placeholder="Name">
			</div>
		</div>
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:31,代码来源:register.php

示例6:

<?php

require_once 'header.php';
$myUser->isLogedin();
if (isset($_POST['submit'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];
    if (!$myUser->userLogin($username, $password)) {
        Main::setMessage("login.php", "Please try to login again!", "alert-error");
    } else {
        Main::setMessage("index.php", "Welcome in " . $scriptName, "alert-success");
    }
}
?>
	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<fieldset>
			<div class="form-group">
				<label class="col-lg-2 control-label" for="inputUsername">Username</label>

				<div class="col-lg-5">
					<input type="text" class="form-control" name="username" id="inputUsername" placeholder="Username">
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label" for="inputPassword">Password</label>

				<div class="col-lg-5">
					<input type="password" class="form-control" name="password" id="inputPassword" placeholder="Password">
开发者ID:AhmadShamli,项目名称:HostChecker,代码行数:31,代码来源:login.php


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