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


PHP tool::securePost方法代码示例

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


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

示例1:

    echo $lang['common_private_job'];
    ?>
</td>
    <td class="list">
      <input type="checkbox" name="privatejob" value="1" <?php 
    echo $privatejob_status;
    ?>
><?php 
    echo $lang['common_private_job_desc'];
    ?>
    </td>
  </tr>
    <tr>
      <td class="list">&nbsp;</td>
      <?php 
    if (tool::securePost('action') == "edit") {
        ?>
        <td class="list"><input type="submit" value="<?php 
        echo $lang['common_save'];
        ?>
"><input type="reset" value="<?php 
        echo $lang['common_reset'];
        ?>
"></td>
      <?php 
    } else {
        ?>
        <td class="list"><input type="submit" value="<?php 
        echo $lang['common_insert'];
        ?>
"><input type="reset" value="<?php 
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:taskdetails.php

示例2:

"></td>
  <?php 
}
?>
  </tr>
</table>

<?php 
#######################################################################
## list existing records
# order
$order = "project";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
if (tool::securePost('desc') == "DESC") {
    $desc = "";
} else {
    $desc = "DESC";
}
$list = $requestInst->getList($order, $desc);
?>

<br><br>
<h2><?php 
echo $lang['requests_available'];
?>
 (<?php 
echo $requestInst->matches;
?>
 <?php 
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:requests.php

示例3:

    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
#######################################################################
## make edit / new form
if (tool::securePost('action') == "edit") {
    ?>
  <h2><?php 
    echo $lang['common_editRecord'];
    ?>
</h2>
  <form method="post">
  <input type="hidden" name="action" value="edit">
  <input type="hidden" name="id" value="<?php 
    echo tool::securePost('id');
    ?>
">
  <table border="0" cellpadding="2" cellspacing="0">
    <tr>
      <td><b><?php 
    echo $lang['right_available'];
    ?>
</b></td>
      <td>&nbsp;</td>
      <td><b><?php 
    echo $lang['right_included'];
    ?>
</b></td>
    </tr>
    <tr>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:rights.php

示例4: elseif

if (!isset($HTTP_SESSION_VARS['loginid'])) {
    // session is not set -> authenticate
    // try to authenticate by IP
    if ($loginInst->authByIp()) {
        $HTTP_SESSION_VARS['loginid'] = $loginInst->authByIp();
    } elseif (tool::securePost('loginname') && $loginInst->authByPassword(tool::securePost('loginname'), tool::securePost('password'))) {
        $HTTP_SESSION_VARS['loginid'] = $loginInst->authByPassword(tool::securePost('loginname'), tool::securePost('password'));
    }
    if (isset($HTTP_SESSION_VARS['loginid']) && $HTTP_SESSION_VARS['loginid'] != "" && !session_is_registered("loginid")) {
        $loginid = $HTTP_SESSION_VARS['loginid'];
        if (!session_register("loginid")) {
            echo "<b>" . $lang['common_unableToSaveLoginInSession'] . "</b><br>";
            // could not save session -> give up
            exit;
        }
    } elseif (!session_is_registered("loginid") && (tool::securePost('loginname') || tool::securePost('password'))) {
        // show error message only, if username/password was submitted
        $toolInst->errorStatus($lang['common_userUnknownOrPasswordWrong']);
    }
}
if (session_is_registered("loginid")) {
    if (!isset($HTTP_SESSION_VARS['loginid']) || $HTTP_SESSION_VARS['loginid'] == "") {
        echo "<b>" . $lang['common_unableToFindloginInSession'] . "</b><br>";
        // could not save session -> give up
        exit;
    }
    $loginInst->activate($HTTP_SESSION_VARS['loginid']);
    $filename = preg_replace(array("/^[\\.]*/", "/\\//"), array("", ""), tool::secureGet('filename'));
    $filecreated = ereg_replace("[^0-9]", "", tool::secureGet('created'));
    $file_size = @filesize($config['attach_url'] . "/{$filecreated}/{$filename}");
    if ($filename && $filecreated && $file_size) {
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:fileget.php

示例5:

?>
">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td><img src="grafx/dummy.gif" width="1" height="300" border="0"></td>
    <td>
      <table border="0" cellpadding="1" cellspacing="2" width="100%">
        <tr>
          <td align="right"><?php 
echo $lang['common_username'];
?>
:&nbsp;</td>
          <td><?php 
$selected = "";
if (tool::securePost('loginname') && tool::securePost('loginname') != "") {
    $selected = tool::securePost('loginname');
}
?>
          <input type="text" name="loginname" value="<?php 
echo $selected;
?>
" size="<?php 
echo $htmlconfig['text_size3'];
?>
"></td>
          </td>
        </tr><tr>
          <td align="right"><?php 
echo $lang['common_password'];
?>
:&nbsp;</td>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:login.php

示例6: task

    <?php 
} else {
    ?>
      <th><nobr>days left</nobr></th>
    <?php 
}
?>
    <th>percentage</th>
    <th>&nbsp;</th>
  </tr>

<?php 
$taskInst = new task();
$order = "finish";
if (tool::securePost('order')) {
    $order = tool::securePost('order');
}
$list = $taskInst->getList($order);
if ($order == "plannedhours") {
    $listByHour = array();
    while ($element = current($list)) {
        $taskInst->activate($element);
        if (!$taskInst->isDone() && $taskInst->statusId != TASK_STATUS_WAITING && $taskInst->plannedHours && $taskInst->plannedHours != "0") {
            $diff = $taskInst->plannedHours * 60 * 60 - $taskInst->getSummary();
            $listByHour[$diff] = $taskInst->id;
        }
        next($list);
    }
    ksort($listByHour);
    while (list($diff, $id) = each($listByHour)) {
        $taskInst->activate($id);
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:index.php

示例7: request

$requestInst = new request(tool::secureGet('requestid'));
$projectInst = new project($requestInst->projectId);
// this request doesn't exists
if (!$requestInst->id) {
    echo "<div>" . $lang['common_request_not_exists'] . "</div>";
    exit;
}
#######################################################################
## show request details
#######################################################################
## perform action
if (tool::securePost('action') == "taskify" && $loginInst->hasAccess("request.assignTo") || tool::securePost('action') == "save" && tool::securePost('taskid')) {
    if (!tool::securePost('taskid')) {
        $taskId = $requestInst->assignTo(tool::securePost('userid'));
    } else {
        $taskId = tool::securePost('taskid');
    }
    if ($taskId) {
        include "taskdetails.php";
        exit;
    }
}
?>

<form method="post" name="form1">
<input type="hidden" name="action" value="taskify">
<input type="hidden" name="requestid" value="<?php 
echo $requestInst->id;
?>
">
开发者ID:pmtool,项目名称:pmtool,代码行数:30,代码来源:requestdetails.php

示例8:

    exit;
}
?>

<h1><?php 
echo $lang['password_change'];
?>
</h1>
<form method="post">

<?php 
if (tool::securePost('action') == "update") {
    if (!DEMO_MODE) {
        $loginInst->changeLanguage(tool::securePost('language'));
        if (tool::securePost('new_password') && tool::securePost('new_password') != "") {
            $loginInst->updatePassword(tool::securePost('old_password'), tool::securePost('new_password'), tool::securePost('new_password_2'));
        }
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
?>
<br />
<br />
<h2><?php 
echo $lang['password_change'];
?>
</h2>
<input type="hidden" name="action" value="update">
<table border="0" cellpadding="2" cellspacing="0">
  <tr>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:password.php

示例9: reportwindow

    //insert the report
    $reportInst->append("  <id>" . $reportId . "</id>");
    // append id
    $reportInst->append("</report>");
    $reportInst->update();
} else {
    // don't forget the closing tag
    $reportInst->append("</report>");
}
if (tool::securePost('action') == "view") {
    $reportId = tool::securePost('viewreport');
}
if ($reportId != "") {
    $template = tool::securePost('templateview');
    if (tool::securePost('action') == "save") {
        $template = tool::securePost('templatecreate');
    }
    ?>

  <script language="javascript">
    <!--
     reportwindow('<?php 
    echo $toolInst->encodeUrl("reportviewer.php?reportid=" . $reportId . "&template=" . $template);
    ?>
');
    //-->
  </script>
<?php 
}
?>
</form>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:reports.php

示例10: next

                    echo "<td align=\"right\" class=\"rmgreen\">" . $percent . " %</td>\n";
                }
            } else {
                echo "<td colspan=\"2\" class=\"" . $taskInst->getStatusStyle() . "\">" . $taskInst->getStatusName() . "</td>\n";
            }
            echo "<td width=\"100%\">&nbsp;</td>\n";
            echo "</tr>\n";
            next($taskList);
            $count = $taskDepth;
            processTask(++$count, $taskInst->childs());
        }
    }
    // now we create a tasklist, containing only the root tasks
    $childs = array();
    $taskInst = new task();
    $taskInst->filterProjectId = tool::securePost('id');
    $taskInst->filterMountId = 0;
    processTask(1, $taskInst->getList());
    ?>
  <tr class="dark">
    <td align="right" colspan="<?php 
    echo $max + 5;
    ?>
"><b>average</b></td>
    <?php 
    $percent = 100;
    if ($rows > 0) {
        $percent = $toolInst->numberRound($sumPercentage / $rows, 2);
    }
    if ($percent > 100) {
        ?>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:index.php


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