本文整理汇总了PHP中public_function类的典型用法代码示例。如果您正苦于以下问题:PHP public_function类的具体用法?PHP public_function怎么用?PHP public_function使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了public_function类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getcountmenbydept
function getcountmenbydept($dpid)
{
$public_function = new public_function();
$user_dept_sql = "select user_dept from blog_user where user_dept='{$dpid}'";
$user_dept_result = $public_function->getresult($user_dept_sql);
return $public_function->getnum($user_dept_result);
}
示例2: getmenurightnum
function getmenurightnum($menuid, $usertype)
{
$public_function = new public_function();
$menu_right_sql = "select * from blog_menu_user where menuid='{$menuid}' and usertype='{$usertype}'";
$menu_right_result = $public_function->getresult($menu_right_sql);
return $public_function->getnum($menu_right_result);
}
示例3: getcountmennologin
function getcountmennologin($user_type)
{
$public_function = new public_function();
$user_dept_sql = "select user_type,user_isedlogin from blog_user where user_type='{$user_type}' and user_isedlogin=0";
$user_dept_result = $public_function->getresult($user_dept_sql);
return $public_function->getnum($user_dept_result);
}
示例4: getonepic
function getonepic($userid, $albumid)
{
$public_function = new public_function();
$sql = "select photo_album,photo_path,photo_author from blog_photo where photo_author='{$userid}' and photo_album='{$albumid}' order by RAND() limit 1";
$array = $public_function->getarray($public_function->getresult($sql));
return $array['photo_path'];
}
示例5: getcountmen
function getcountmen($user_type)
{
$public_function = new public_function();
$user_dept_sql = "select user_type from blog_user where user_type='{$user_type}'";
$user_dept_result = $public_function->getresult($user_dept_sql);
return $public_function->getnum($user_dept_result);
}
示例6: getusergroup
function getusergroup($user_type)
{
$public_function = new public_function();
$u_type_sql = "select usertype,usertypename from blog_user_type where usertype='{$user_type}'";
$u_array = $public_function->getarray($public_function->getresult($u_type_sql));
return $u_array['usertypename'];
}
示例7: getparentdept
function getparentdept($pid)
{
$public_function = new public_function();
$sql = "select dept_pid,dept_name from blog_dept where ids='{$pid}'";
$result = $public_function->getresult($sql);
$array = $public_function->getarray($result);
return $array['dept_name'];
}
示例8: getmenuname
function getmenuname($pid)
{
$pmenusql = "select menu_id,menu_name from blog_menu where menu_id='{$pid}'";
$public_function = new public_function();
$pmenuresult = $public_function->getresult($pmenusql);
$pmenuarray = $public_function->getarray($pmenuresult);
$menu_name = $pmenuarray['menu_name'];
return $menu_name;
}
示例9: MenuShow_Moduletype
function MenuShow_Moduletype($moduleid, $isedshow)
{
$public_function = new public_function();
$sql = "update picture_module set module_isedmenu='{$isedshow}' where ids='{$moduleid}'";
$result = $public_function->getresult($sql);
if ($result > 0) {
$info = "相册模块更新成功";
} else {
$info = "由于网络原因,操作失败,请稍后重试...";
}
return $info;
}
示例10: Hidden_Album
function Hidden_Album($albumid, $isedyc)
{
$public_function = new public_function();
$update_album_sql = "update blog_album set album_isedshow='{$isedyc}' where ids='{$albumid}'";
$update_album_result = $public_function->getresult($update_album_sql);
if ($update_album_result > 0) {
$info = "相册更新成功";
} else {
$info = "相册更新失败";
}
return $info;
}
示例11: del
function del($pid)
{
$public_function = new public_function();
$sql = "select * from blog_menu where menu_pid='{$pid}'";
$delsql = "delete from blog_menu where menu_id='{$pid}'";
$result = $public_function->getresult($sql);
$num = $public_function->getnum($result);
for ($i = 0; $i < $num; $i++) {
$array = $public_function->getarray($result);
del($array['menu_id']);
}
$result1 = $public_function->getresult($delsql);
echo "<script>location.href='../add_new_menu.php?'</script>";
}
示例12: setAlbumBG
function setAlbumBG($albumid, $photosid, $iseds)
{
$public_function = new public_function();
$sql = "update blog_photo set photo_isedbg=1 where ids='{$photosid}'";
$result = $public_function->getresult($sql);
if ($result > 0) {
$usql = "update blog_photo set photo_isedbg=0 where ids!='{$photosid}' and photo_album='{$albumid}'";
$uresult = $public_function->getresult($usql);
if ($uresult > 0) {
$info = "±³¾°Í¼Æ¬ÉèÖóɹ¦";
} else {
$info = "±³¾°Í¼Æ¬ÉèÖÃʧ°Ü";
}
} else {
$info = "±³¾°Í¼Æ¬ÉèÖÃʧ°Ü";
}
return $info;
}
示例13: update_iseduse
function update_iseduse($pid, $ise)
{
$public_function = new public_function();
$sql = "select * from blog_menu where menu_pid='{$pid}'";
$updatesql = "update blog_menu set menu_isedshow='{$ise}' where menu_id='{$pid}'";
$result = $public_function->getresult($sql);
$num = $public_function->getnum($result);
for ($i = 0; $i < $num; $i++) {
$array = $public_function->getarray($result);
update_iseduse($array['menu_id'], $ise);
}
$result1 = $public_function->getresult($updatesql);
if ($result1 > 0) {
echo "<script>location.href='../update_menu.php?info=success&menuid=" . $pid . "'</script>";
} else {
echo "<script>location.href='../update_menu.php?info=fail'</script>";
}
}
示例14: public_function
<?php
require_once '../../include/conmysql.php';
require_once '../../include/public_function.php';
$public_function = new public_function();
$blog_type_user = $_SESSION['UID'];
$url = $_GET['url'];
$select_blog_album_right_sql = "select album_right,album_right_name,album_right_desc from blog_album_right";
$select_blog_album_right_result = $public_function->getresult($select_blog_album_right_sql);
$select_blog_album_right_num = $public_function->getnum($select_blog_album_right_result);
$album_right = $_POST['album_right'];
$album_name = $_POST['album_name'];
$album_desc = $_POST['album_desc'];
$album_module = $_POST['album_module'];
/* if($album_desc0=="说说这个相册的故事...(非必填)"){
$album_desc="";
}else{
$album_desc=$album_desc0;
} */
$album_createdate = CURRENT_TIME;
$insert_blog_sql = "insert into blog_album(album_name,album_desc,album_author,album_createdate,album_right,album_module) \nvalue('{$album_name}','{$album_desc}','{$blog_type_user}','{$album_createdate}','{$album_right}','{$album_module}')";
if ($album_name == "" || $album_name == null || $album_name == "相册名称") {
$info1 = "相册名称";
$info2 = "说说这个相册的故事...(非必填)";
} else {
$select_album_name_sql = "select album_name,album_author from blog_album where album_name='{$album_name}' and album_author='{$blog_type_user}'";
if ($public_function->getnum($public_function->getresult($select_album_name_sql)) > 0) {
$info = "该相册已创建";
} else {
$public_function->getresult($insert_blog_sql);
$album = mysql_insert_id();
示例15: public_function
<?php
require_once '../../../include/conmysql.php';
require_once '../../../include/public_function.php';
$public_function = new public_function();
$blog_userid = $_SESSION['UID'];
$update_sql = "update blog_richeng set importent=1";
$update_result = $public_function->getresult($update_sql);
if ($update_result > 0) {
$sql = "delete from blog_richeng_isedimport where ids<>1";
$result = $public_function->getresult($sql);
echo "<script>location.href='../richeng_fl.php'</script>";
} else {
echo "<script>location.href='../richeng_fl.php'</script>";
}