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


PHP getresult函数代码示例

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


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

示例1: checkimg

function checkimg($imgdir, $index = 0)
{
    $dir = opendir($imgdir);
    if ($dir == NULL) {
        return;
    }
    while ($file = readdir($dir)) {
        if ($file != "." and $file != "..") {
            //echo $imgdir."/".$file."<br>";
            $path = $imgdir . "/" . $file;
            if (is_dir($path)) {
                checkimg($path, $index + 1);
            } else {
                $filename = basename($path);
                $ifused = getresultNumrows(getresult("select * from I_article where contents like '%" . $filename . "%'"));
                if ($ifused <= 0) {
                    echo "删除:" . $path . "<br>";
                    unlink($path);
                }
            }
        }
    }
    closedir($dir);
    //呵呵,这个函数只能删除空文件夹,有文件的文件夹会失败
    if ($index != 0) {
        if (rmdir($imgdir)) {
            echo "删除" . $imgdir . "<br>";
        }
    }
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:30,代码来源:admin_clearimg.php

示例2: showColumnstructure

function showColumnstructure($columnid, $classindex = 0)
{
    $query = "select childcolumn from I_column where id={$columnid}";
    $result = getresult($query);
    $count = getresultNumrows($result);
    if ($count > 0) {
        $childColumnId = getresultData($result, 0, "childcolumn");
        //没有子栏目即返回
        //echo $childColumnId."<br>";
        if ($childColumnId == NULL || $childColumnId == 0 || $childColumnId == "") {
            if ($classindex == 0) {
                echo "<tr style=\"height:24px;\">\n";
                echo "<td align='center' colspan='3'>" . gettext_r("haveNot") . gettext_r("column") . "</td>";
                echo "</tr>\n";
            }
            return false;
        }
        $childId = explode("|", $childColumnId);
        foreach ($childId as $id) {
            echo "<tr class='list'>\n";
            $getchildcolumnQuery = "select columnname,childcount from I_column where id={$id}";
            $childColumn = getresult($getchildcolumnQuery);
            $childColumnname = getresultData($childColumn, 0, "columnname");
            $childCount = getresultData($childColumn, 0, "childcount");
            echo "<td> " . $id . "</td>\n";
            echo "<td> " . space($classindex) . $childColumnname . "</td>\n";
            echo "<td align='center'>";
            echo " ";
            //如果为大栏目调整,不出现添子栏目菜单
            if ($columnid != 0) {
                echo "<a href=\"admin_column.php?action=add&columnid=" . $id . "\">" . gettext_r("add") . gettext_r("child") . gettext_r("column") . "</a>";
                echo " | ";
            }
            echo "<a href=\"javascript:jump('admin_column.php','modify'," . $id . ")\">" . gettext_r("update") . gettext_r("column") . gettext_r("attribute") . "</a>";
            echo " | ";
            if ($columnid != 0) {
                echo "<a href=\"admin_article.php?action=add&columnid=" . $id . "\">" . gettext_r("add") . gettext_r("article") . "</a>";
                echo " | ";
            }
            echo "<a href=\"javascript:if(confirm('" . gettext_r("deleteColumnTip") . "'))jump('admin_column.php','delete'," . $id . ")\">" . gettext_r("delete") . "</a>";
            //echo " | ";
            //如果有子栏目则显示管理子栏目
            /*					if($childCount > 0)
            						echo "<a href=\"admin_column.php?columnid=".$id."\">管理子栏目($childCount)</a>\n";
            					else
            						echo "<a href=\"#\">管理子栏目($childCount)</a>\n";*/
            echo "</tr>\n";
            //如果为大栏目调整,则不递归显示子栏目
            if ($columnid != 0) {
                showColumnstructure($id, $classindex + 1);
            }
        }
    } else {
        return false;
    }
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:56,代码来源:admin.column.php

示例3: translatemylabel

function translatemylabel($mylabel)
{
    $result = getresult("select * from I_mylabel where labelname='{$mylabel}'");
    //echo "select * from I_mylabel where labelname='$mylabel'";
    if (getresultNumrows($result) < 1) {
        return $mylabel;
    } else {
        return getresultData($result, 0, "labelcontent");
    }
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:10,代码来源:Iron.label.php

示例4: showpowerlist

function showpowerlist($adminid = 0)
{
    if ($adminid != 0) {
        $tempresult = getresult("select * from I_admin where id={$adminid}");
        $functioncode = getresultData($tempresult, 0, "functioncode");
        $functionarray = translatefunctioncode($functioncode);
        $result = getresult("select * from I_column where parentid=0");
        while ($row = getresultArray($result)) {
            if ($functionarray[$row["id"]] === "1") {
                echo "<tr>\n";
                echo "<td><input checked=\"true\" type=\"checkbox\" name=\"columnid\" value=\"" . $row["id"] . "\" />" . $row["columnname"] . "</td>";
                echo "<td><input checked=\"checked\" type=\"radio\" name=\"" . $row["id"] . "\" value=\"1\" />" . gettext_r("editer") . "<input type=\"radio\" name=\"" . $row["id"] . "\" value=\"2\" />" . gettext_r("column") . gettext_r("manager") . "</td>";
                echo "</tr>";
                echo "<tr class='segmentline'><td colspan='2'></td></tr>";
            } elseif ($functionarray[$row["id"]] === "2") {
                echo "<tr>\n";
                echo "<td><input checked=\"true\" type=\"checkbox\" name=\"columnid\" value=\"" . $row["id"] . "\" />" . $row["columnname"] . "</td>";
                echo "<td><input type=\"radio\" name=\"" . $row["id"] . "\" value=\"1\" />" . gettext_r("editer") . "<input checked=\"checked\" type=\"radio\" name=\"" . $row["id"] . "\" value=\"2\" />" . gettext_r("column") . gettext_r("manager") . "</td>";
                echo "</tr>";
                echo "<tr class='segmentline'><td colspan='2'></td></tr>";
            } else {
                echo "<tr>\n";
                echo "<td><input type=\"checkbox\" name=\"columnid\" value=\"" . $row["id"] . "\" />" . $row["columnname"] . "</td>";
                echo "<td><input type=\"radio\" name=\"" . $row["id"] . "\" value=\"1\" />" . gettext_r("editer") . "<input type=\"radio\" name=\"" . $row["id"] . "\" value=\"2\" />" . gettext_r("column") . gettext_r("manager") . "</td>";
                echo "</tr>";
                echo "<tr class='segmentline'><td colspan='2'></td></tr>";
            }
        }
        if ($functionarray["vote"] === "1") {
            echo " <tr>";
            echo " <td colspan=\"2\"><input type=\"checkbox\" checked=\"true\" name=\"voteadmin\" value=\"1\" />" . gettext_r("vote") . gettext_r("manage") . "</td>";
            echo "  </tr>";
        } else {
            echo " <tr>";
            echo " <td colspan=\"2\"><input type=\"checkbox\" name=\"voteadmin\" value=\"1\" />" . gettext_r("vote") . gettext_r("manage") . "</td>";
            echo "  </tr>";
        }
        return;
    }
    $result = getresult("select * from I_column where parentid=0");
    while ($row = getresultArray($result)) {
        echo "<tr>\n";
        echo "<td><input type=\"checkbox\" name=\"columnid\" value=\"" . $row["id"] . "\" />" . $row["columnnamezh"] . "</td>";
        echo "<td><input type=\"radio\" name=\"" . $row["id"] . "\" value=\"1\" />" . gettext_r("editer") . "<input type=\"radio\" name=\"" . $row["id"] . "\" value=\"2\" />" . gettext_r("column") . gettext_r("manager") . "</td>";
        echo "</tr>";
        echo "<tr class='segmentline'><td colspan='2'></td></tr>";
    }
    echo " <tr>";
    echo " <td colspan=\"2\"><input type=\"checkbox\" name=\"voteadmin\" value=\"1\" />" . gettext_r("vote") . gettext_r("manage") . "</td>";
    echo "  </tr>";
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:51,代码来源:admin.admin.php

示例5: getSource

	public function getSource()
	{	
		$timestamp = time();
		// $oldTime = $timestamp - 300;
		$oldTime = $timestamp;
		$date = date('Y-m-d H:i:s',$oldTime);
		$oldDate = date('Y-m-d H:i:s',$timestamp);
		$workTime = $this->judgeTime(time());
		if ($workTime) {
			// SELECT * FROM `messages` inner join device on messages.device_id = device.id where 1;
			$sql = 'select messages.id,messages.pic,messages.state from messages inner join device on messages.device_id = device.id where device.ver = 3 and messages.update_time < \''.$date.'\' and messages.state = 382';
		}
		else{
			$sql = 'select messages.id,messages.pic,messages.state from messages inner join device on messages.device_id = device.id where device.ver = 3 and messages.update_time < \''.$oldDate.'\' and messages.state = 382';
		}
		
		// var_dump($sql);
		$res = $this->connection->query($sql);		
		// var_dump($res);
		// var_dump($res->num_rows);
		if ($res->num_rows > 0) {
			// echo "\n rows:".$res->num_rows;
			while ($row = $res->fetch_assoc()) {
				$duringTime = time() - $this->startTime;
				if ($duringTime > 60) {
					return;
					}
				$id = $row['id'];
				$state = $this->getState($id);
				if ($state != 382) {
					continue;
				}
				$this->connection->query("update messages set state = 9 where id =$id");
				$img_url = $this->baseUrl.'/'.$row['pic'];
				// 注释
				$translateRes = getresult($img_url);
				// echo "\n"."messages come: ".mb_detect_encoding($translateRes);
				// echo '对的';
				if ($translateRes != 'error') {
					$this->connection->query("set names utf8");
					// echo "update messages set reply = '$translateRes',state = 41 where id = $id";
					$this->connection->query("update messages set reply = '$translateRes',state = 41 where id = $id");

				}
				else{
					$this->connection->query("update messages set state = 42 where id = $id");
				}
			}
		}
		// print_r($res);
	}
开发者ID:bajian,项目名称:js-web-skills,代码行数:51,代码来源:多进程robot.php

示例6: showfield

function showfield($columnid)
{
    $result = getresult("select * from I_field where columnid={$columnid}");
    if (getresultnumrows($result) < 1) {
        echo "<tr>";
        echo "<td colspan='6' height='25' align='center'>" . gettext_r("haveNot") . gettext_r("field") . "</td>";
        echo "<tr>";
        return;
    }
    while ($row = getresultarray($result)) {
        echo "<tr class='list'>";
        echo "<td align='center'>" . $row["id"] . "</td>\n";
        echo "<td align='center'>" . $row["fieldname"] . "</td>";
        echo "<td align='center'>" . $row["info"] . "</td>";
        echo "<td align='center' width='100'>";
        echo "<a href=\"admin_field.php?action=modify&fieldid=" . $row["id"] . "&columnid={$columnid}\">" . gettext_r("update") . "</a>";
        echo " | ";
        echo "<a href=\"javascript:if(confirm('" . gettext_r("ifDelete") . "'))jump('admin_field.php','delete'," . $row["id"] . ")\">" . gettext_r("delete") . "</a>";
        echo "</td>\n";
        echo "</tr>";
    }
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:22,代码来源:admin.field.php

示例7: showtemplatelist

function showtemplatelist($type)
{
    $tempresult = getresult("select count(*) as countoftemplate from I_template where templatetype={$type}");
    $countoftemplate = getresultData($tempresult, 0, "countoftemplate");
    if ($countoftemplate < 1) {
        echo "<tr class='list'>\n";
        echo "<td colspan='4' align='center'>" . gettext_r("haveNot") . gettext_r("template") . "</td>\n";
        echo "</tr>";
        return;
    }
    $query = "select * from I_template where templatetype={$type}";
    $result = getresult($query);
    while ($row = getresultArray($result)) {
        echo "<tr class='list'>\n";
        echo "<td> " . $row["id"] . "</td>";
        echo "<td> " . $row["templatename"] . "</td>";
        echo "<td> " . $row["path"] . "</td>";
        echo "<td align='center'>";
        echo "<a href=\"admin_template.php?type={$type}&action=modify&id=" . $row["id"] . "\">" . gettext_r("update") . "</a> | <a href=\"javascript:if(confirm('" . gettext_r("ifDelete") . "'))jump('admin_template.php','delete'," . $row["id"] . ")\">" . gettext_r("delete") . "</a>";
        echo "</td>";
        echo "</tr>\n";
    }
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:23,代码来源:admin.template.php

示例8: translatecolumnlist

function translatecolumnlist($template)
{
    //匹配自定义文章列表标签正则
    $flag = "/【columnlist】([\\s\\S]*?)【\\/columnlist】/";
    preg_match_all($flag, $template, $matches, PREG_SET_ORDER);
    //替换所有articlelist标签
    $html = $template;
    //echo $template."<br>".$flag;
    //得到需要循环的部分
    $str = $matches[0][1];
    //echo $str ;
    //得到子栏目id数组
    $columnid = $_GET["columnid"];
    $query = "select childcolumn,columnname from I_column where id={$columnid}";
    $result = getresult($query);
    if (getresultNumrows($result) < 1) {
        //没有才此栏目
        return str_replace($str, "No such column!", $html);
        return;
    }
    $columnname = getresultData($result, 0, "columnname");
    $childColumnId = getresultData($result, 0, "childcolumn");
    if ($childColumnId == NULL || $childColumnId == 0 || $childColumnId == "") {
        //没有子栏目
        return str_replace($str, "No child column!", $html);
        return;
    }
    $temphtml = "";
    $childId = explode("|", $childColumnId);
    foreach ($childId as $id) {
        $tempstr = str_replace("【#columnid】", "{$id}", $str);
        $tempstr = str_replace("【#columnname】", getcolumnformationBycolumnid($id, "columnname"), $tempstr);
        $temphtml .= $tempstr;
    }
    $html = str_replace($matches[0][0], $temphtml, $html);
    return $html;
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:37,代码来源:Iron.column.php

示例9: getresult

                    }
                } else {
                    if ($_POST[$row["id"]] != 0) {
                        $functioncode .= "," . $row["id"] . "|" . $_POST[$row["id"]];
                    }
                }
            }
            if ($_POST["voteadmin"] == 1) {
                if ($functioncode == "") {
                    $functioncode = "vote|1";
                } else {
                    $functioncode .= ",vote|1";
                }
            }
            $query = "update I_admin set adminname='{$adminname}',password='{$pwd}',adminrole=1,functioncode='{$functioncode}' where id={$adminid}";
            getresult($query);
            echo "<script type=\"text/javascript\">alert('" . gettext_r("update") . gettext_r("success") . "');window.location='admin_admin.php';</script>";
            die;
            //echo $functioncode;
        }
        ?>
<form id="form1" name="form1" method="post" action="" onsubmit="return admin_form_check()">
<table class="admininfo" cellspacing="0" cellpadding="3" border="1" bordercolor="#FFFFFF" style="border-collapse:collapse">
  <tr>
    <td class="label" width="80" align="right"><?php 
        echo gettext_r("manager") . gettext_r("name");
        ?>
:</td>
    <td><input id="adminname" type="text" value="<?php 
        echo $adminname;
        ?>
开发者ID:hxf829,项目名称:Ironcms,代码行数:31,代码来源:admin_admin.php

示例10: showLogpage

 function showLogpage($currentpage, $pagesize = 10, $logtype = 0)
 {
     $tempresult = getresult("select count(*) as countoflog from I_log where logtype={$logtype}");
     $countoflog = getresultData($tempresult, 0, "countoflog");
     if ($countoflog % $pagesize == 0) {
         $allpage = $countoflog / $pagesize;
     } else {
         $allpage = floor($countoflog / $pagesize) + 1;
     }
     //消除文章数为零时显示下一页链接的bug
     if ($countoflog == 0) {
         $allpage += 1;
     }
     //echo $countofcomment%$pagesize." ".$currentpage;
     echo gettext_r("total") . "<b> " . $allpage . " </b>" . gettext_r("page") . "(" . $pagesize . " " . gettext_r("piece") . gettext_r("article") . gettext_r("per") . gettext_r("page") . ") ";
     if ($currentpage == 1) {
         echo gettext_r("firstPage") . " | " . gettext_r("prePage") . " | ";
     } else {
         echo "<a href='admin_log.php?logtype={$logtype}&currentpage=1'>" . gettext_r("firstPage") . "</a> | <a href='admin_log.php?logtype={$logtype}&currentpage=" . ($currentpage - 1) . "'>" . gettext_r("prePage") . "</a> | ";
     }
     $temppage = 1;
     if ($currentpage - 1 < 5) {
         while ($temppage <= $currentpage) {
             if ($currentpage == $temppage) {
                 echo "<b>" . $temppage . "</b> ";
                 $temppage++;
                 continue;
             }
             echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
             $temppage++;
         }
     } else {
         while ($temppage <= $currentpage) {
             if ($currentpage == $temppage) {
                 echo "<b>" . $temppage . "</b> ";
                 $temppage++;
                 continue;
             }
             if ($temppage == 1) {
                 echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> … ";
                 $temppage++;
                 continue;
             }
             if ($currentpage - $temppage > 3) {
                 $temppage++;
                 continue;
             }
             echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
             $temppage++;
         }
     }
     if ($allpage - $currentpage < 5) {
         while ($temppage <= $allpage) {
             if ($temppage == 1) {
                 echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
                 $temppage++;
                 continue;
             }
             echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
             $temppage++;
         }
     } else {
         while ($temppage <= $allpage) {
             if ($temppage == $allpage) {
                 echo " … <a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
                 $temppage++;
                 continue;
             }
             if ($temppage - $currentpage > 3) {
                 $temppage++;
                 continue;
             }
             echo "<a href='admin_log.php?logtype={$logtype}&currentpage={$temppage}'>" . $temppage . "</a> ";
             $temppage++;
         }
     }
     if ($currentpage == $allpage) {
         echo "| " . gettext_r("nextPage") . " | " . gettext_r("lastPage");
     } else {
         echo "| <a href='admin_log.php?logtype={$logtype}&currentpage=" . ($currentpage + 1) . "'>" . gettext_r("nextPage") . "</a> | <a href='admin_log.php?logtype={$logtype}&currentpage={$allpage}'>" . gettext_r("lastPage") . "</a>";
     }
 }
开发者ID:hxf829,项目名称:Ironcms,代码行数:82,代码来源:admin.log.php

示例11: session_start

session_start();
include_once "conn.php";
$username = $_GET["username"];
$password = md5($_GET["password"]);
if ($username == NULL || $username == "" || $password == NULL || $password == "") {
    if ($_COOKIE["username"] == NULL || $_COOKIE["username"] == "") {
        die("notlogin");
    }
}
try {
    $query = "select * from I_user where username = '" . $username . "' and password = '" . $password . "'";
    //echo $query;
    $result = getresult($query);
    if (getresultNumrows($result) < 1) {
        throw new Exception("登录失败!");
    } else {
        if (getresultData($result, 0, "iflock") === "1") {
            die("locked");
        }
        setcookie("username", getresultData($result, 0, "username"));
        setcookie("userid", getresultData($result, 0, "id"));
        $_SESSION["username"] = getresultData($result, 0, "username");
        $_SESSION["userid"] = getresultData($result, 0, "id");
        getresult("update I_user set logintimes=logintimes+1 where id=" . getresultData($result, 0, "id"));
        //echo "update I_admin set logintimes=logintimes+1,lastip=".$_SERVER["REMOTE_ADDR"].",lasttime=CURRENT_TIMESTAMP where id=$id";
        //echo getlogininfo("adminname");
        echo "logined";
    }
} catch (Exception $e) {
    //die ( "notlogin" );
}
开发者ID:hxf829,项目名称:Ironcms,代码行数:31,代码来源:login.php

示例12: translatefunctioncode

include "../library/admin.comment.php";
$functionarray = translatefunctioncode($_SESSION["functioncode"]);
$columnid = $_GET["columnid"];
$action = $_GET["action"];
$preurl = $_GET["url"];
$currentpage = $_GET["currentpage"] == NULL || $_GET["currentpage"] <= 0 ? 1 : $_GET["currentpage"];
switch ($action) {
    case "delete":
        if (!getresult("delete from I_comment where id=" . $_GET["commentid"])) {
            echo "<script type=\"text/javascript\">alert('" . gettext_r("delete") . gettext_r("fail") . "');window.location=\"{$preurl}\";</script>";
        } else {
            echo "<script type=\"text/javascript\">alert('" . gettext_r("delete") . gettext_r("success") . "');window.location=\"{$preurl}\";</script>";
        }
        break;
    case "pass":
        getresult("update I_comment set ifpass=" . $_GET["ifpass"] . " where id=" . $_GET["commentid"]);
        break;
    default:
        echo "<div id='navigation'>" . gettext_r("quickLink") . ":";
        showchildcolumncomment($columnid);
        //echo "<a href=\"admin_comment.php?columnid=".$columnid."\">添加文章</a>\n";
        echo "";
        echo "</div>";
        echo "<table width='100%' border='0' cellpadding='0' cellspacing='1' class='function'>\n";
        echo "<tr class='header'>\n";
        echo "<td align='center' width='40'>" . gettext_r("checkIn") . "</td>\n";
        echo "<td align='center' width='50'>" . gettext_r("serialNumber") . "</td>\n";
        echo "<td align='center' width='140'>" . gettext_r("article") . "</td>\n";
        echo "<td align='center' width='600'>" . gettext_r("contents") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("author") . "</td>\n";
        echo "<td align='center' width='100'>" . gettext_r("ifPass") . "</td>\n";
开发者ID:hxf829,项目名称:Ironcms,代码行数:31,代码来源:admin_comment.php

示例13: getresult

        if ($_POST["votetype"] == 0) {
            if ($_POST["option"] != NULL && $_POST["option"] != "") {
                getresult("update I_vote set count" . $_POST["option"] . "=count" . $_POST["option"] . "+1 where id={$voteid}");
            }
        } else {
            if ($_POST["option"] != NULL && $_POST["option"] != "") {
                $option = $_POST["option"];
                //echo count($option);
                for ($i = 0; $i < count($option); $i++) {
                    getresult("update I_vote set count" . $option[$i] . "=count" . $option[$i] . "+1 where id={$voteid}");
                }
            }
        }
    }
    //添加投票记录
    if (!getresult("insert into I_iprecord(ip,action,actionid,user) values('" . $userip . "','vote'," . $voteid . ",'" . $_SESSION["username"] . "')")) {
        //echo "insert into I_iprecord(ip,action,actionid,user) values('".$userip."','vote',".$voteid.",'".$_SESSION["userid"]."')";
    }
}
$countOfOption = getresultData($result, 0, "attrcount") + 1;
$countOfAll = 0;
for ($i = 1; $i < $countOfOption; $i++) {
    $countOfAll += getresultData($result, 0, "count" . $i);
}
echo "<tr><td height='46px' style='background:url(images/vote_fg2.png) repeat-y' valign='top' id='vote_title'>" . gettext_r("title") . ":" . getresultData($result, 0, "title") . "</td></tr>";
echo "<tr>";
echo "<td height='19px' style='background:url(images/vote_fg3.png) no-repeat'></td>";
echo "</tr>";
echo "<tr>";
echo "<td style='background:url(images/vote_fg4.png) repeat-y'>";
echo "<table width='820px' border='0' cellspacing='0' cellpadding='0' style='margin-left:70px'>";
开发者ID:hxf829,项目名称:Ironcms,代码行数:31,代码来源:showvoteresult.php

示例14: getlogininfo

</head>
<body style="padding:20px;" bgcolor="#f3f9ff">
<?php 
if ($_POST["submit"] == "提交") {
    include '../conn.php';
    include '../library/basefunction.php';
    $adminid = getlogininfo("adminid");
    $result = getresult("select * from I_admin where id = {$adminid}");
    if (md5($_POST["oldpassword"]) != getresultData($result, 0, "password")) {
        die("<script type='text/javascript'>alert('旧密码错误');history.back(-1);</script>");
    }
    if ($_POST["newpwd"] != $_POST["newpwd1"]) {
        die("<script type='text/javascript'>alert('两次密码输入不一致');history.back(-1);</script>");
    }
    if (getresult("update I_admin set password='" . md5($_POST["newpwd"]) . "' where id={$adminid}")) {
        die("<script type='text/javascript'>alert('密码修改成功\\n请重新登录');parent.location='logout.php';</script>");
    }
}
?>
<div>
<form action="" method="post" onSubmit="return chpasswordcheck();">
  <table cellspacing="0" cellpadding="3" border="1" bordercolor="#FFFFFF" style="border-collapse:collapse">
    <tr>
      <td class="label" width="100px">密码:</td>
      <td><input type="password" name="oldpassword"></td>
      <td valign="center" style="font-size:12px; color:#0000CC; padding-left:10px;">* 请输入您现在正在使用的密码 </td>
    </tr>
    <tr>
      <td class="label">新密码:</td>
      <td><input type="password" name="newpwd"></td>
开发者ID:hxf829,项目名称:Ironcms,代码行数:30,代码来源:changepassword.php

示例15: loadlibrary

include_once 'templatefunction/Iron.article.php';
include_once 'templatefunction/Iron.column.php';
include_once 'templatefunction/Iron.label.php';
loadlibrary("library/third/FirePHPCore/fb.php");
FB::log('Log message');
FB::info('Info message');
FB::warn('Warn message');
FB::error('Error message');
readcache();
$siteconfig = getresult("SELECT * FROM I_siteconfig LIMIT 0 , 1");
//如果没有网站配置项
if (getresultNumrows($siteconfig) < 1) {
    die("<script type='text/javascript'>window.location='error.html'</script>");
}
$templateid = getresultData($siteconfig, 0, "indextemplate");
$templateinfo = getresult("select * from I_template where id={$templateid} limit 0,1");
if (getresultNumrows($templateinfo) < 1) {
    die("<script type='text/javascript'>window.location='error.html'</script>");
}
$templatepath = getresultData($templateinfo, 0, "path");
$templatefile = getroot() . "/templates/" . $templatepath;
//echo $templatefile;
if (!file_exists($templatefile)) {
    die("The template file doesn'n exit!");
}
$template = file_get_contents($templatefile);
//如果模板被删除
if (!$template) {
    die("<script type='text/javascript'>alert('The template doesn't exists!')window.location='error.html'</script>");
}
$template = translatelabel($template);
开发者ID:hxf829,项目名称:Ironcms,代码行数:31,代码来源:index.php


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