コード例 #1
0
 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     global $_SERVER;
     if ($parameters != '') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = intval($query_numrows / $max_rows_per_page);
     // $num_pages now contains int of pages needed unless there is a remainder from division
     if ($query_numrows % $max_rows_per_page) {
         $num_pages++;
     }
     // has remainder so add one page
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = owpDrawForm('pages', basename($_SERVER['PHP_SELF']), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . owpLink(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, owpPullDownMenu($page_name, $pages_array, '', 'onChange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . owpLink(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= owpDrawHiddenField(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SID) {
             $display_links .= owpDrawHiddenField(owpSessionName(), owpSessionID());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
コード例 #2
0
<?php 
if ($is_read_only) {
    if ($account['admin_newsletter'] == '1') {
        echo NEWSLETTER_YES;
    } else {
        echo NEWSLETTER_NO;
    }
} elseif ($processed) {
    if ($newsletter == '1') {
        echo NEWSLETTER_YES;
    } else {
        echo NEWSLETTER_NO;
    }
    echo owpDrawHiddenField('newsletter');
} else {
    echo owpPullDownMenu('newsletter', $newsletter_array, $account['admin_newsletter']) . '&nbsp;' . TEXT_FIELD_REQUIRED;
}
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
<?php 
if (!$new_account) {
    ?>
  <tr>
    <td class="formAreaTitle"><br><?php 
    echo CATEGORY_PASSWORD;
    ?>
コード例 #3
0
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr><?php 
echo owpDrawForm('lng', $owpFilename['define_language'], '', 'get');
?>
            <td class="owp-title"><?php 
echo HEADING_TITLE;
?>
</td>
            <td class="owp-title" align="right"><?php 
echo owpTransLine('1', '10');
?>
</td>
            <td class="owp-title" align="right"><?php 
echo owpPullDownMenu('lngdir', $languages_array, '', 'onChange="this.form.submit();"');
?>
</td>
          </form></tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php 
if ($_GET['lngdir'] && $_GET['filename']) {
    if ($_GET['filename'] == $language . '.php') {
        $file = OWP_LANG_PATH . $_GET['filename'];
    } else {
        $file = OWP_LANG_PATH . $_GET['lngdir'] . '/' . $_GET['filename'];
    }
    if (file_exists($file)) {
コード例 #4
0
function owpCfgPullDownZoneList($zone_id)
{
    return owpPullDownMenu('configuration_value', owpGetCountryZones(OWP_COUNTRY), $zone_id);
}
コード例 #5
0
 case 'new':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_NEW_ZONE . '</b>');
     $contents = array('form' => owpDrawForm('zones', $owpFilename['zones'], 'page=' . $_GET['page'] . '&action=insert'));
     $contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . owpInputField('zone_name'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . owpInputField('zone_code'));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . owpPullDownMenu('zone_country_id', owpGetCountries()));
     $contents[] = array('align' => 'center', 'text' => '<br>' . owpImageSubmit('button_insert.gif', IMAGE_INSERT) . '&nbsp;<a href="' . owpLink($owpFilename['zones'], 'page=' . $_GET['page']) . '">' . owpImageButton('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>');
     $contents = array('form' => owpDrawForm('zones', $owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save'));
     $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . owpInputField('zone_name', $cInfo->zone_name));
     $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . owpInputField('zone_code', $cInfo->zone_code));
     $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . owpPullDownMenu('zone_country_id', owpGetCountries(), $cInfo->countries_id));
     $contents[] = array('align' => 'center', 'text' => '<br>' . owpImageSubmit('button_update.gif', IMAGE_UPDATE) . '&nbsp;<a href="' . owpLink($owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . owpImageButton('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>');
     $contents = array('form' => owpDrawForm('zones', $owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $cInfo->zone_name . '</b>');
     $contents[] = array('align' => 'center', 'text' => '<br>' . owpImageSubmit('button_delete.gif', IMAGE_DELETE) . '&nbsp;<a href="' . owpLink($owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . owpImageButton('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 default:
     if (is_object($cInfo)) {
         $heading[] = array('text' => '<b>' . $cInfo->zone_name . '</b>');
         $contents[] = array('align' => 'center', 'text' => '<a href="' . owpLink($owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '">' . owpImageButton('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . owpLink($owpFilename['zones'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '">' . owpImageButton('button_delete.gif', IMAGE_DELETE) . '</a>');
         $contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
         $contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name);
コード例 #6
0
</td> 
           <td class="owp-title" align="right"></td>
           <td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr><?php 
echo owpDrawForm('search', $owpFilename['languages'], '', 'get');
?>
              <td class="smallText" align="right"><?php 
echo HEADING_TITLE_SEARCH . ' ' . owpInputField('search');
?>
</td>
              </form></tr>
            <tr><?php 
echo owpDrawForm('status', $owpFilename['languages'], '', 'get');
?>
              <td class="smallText" align="right"><?php 
echo HEADING_TITLE_STATUS . ' ' . owpPullDownMenu('status', $lang_select_array, '0', 'onChange="this.form.submit();"');
?>
</td>
            </form></tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr class="dataTableHeadingRow">
               <td class="dataTableHeadingContent"><?php 
echo TABLE_HEADING_LANGUAGE_NAME;
?>
コード例 #7
0
</td>
      </tr>
      <tr><?php 
    echo owpDrawForm('newsletter', $owpFilename['newsletters'], 'page=' . $_GET['page'] . '&action=' . $form_action);
    if ($form_action == 'update') {
        echo owpDrawHiddenField('newsletter_id', $nID);
    }
    ?>
        <td><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_NEWSLETTER_MODULE;
    ?>
</td>
            <td class="main"><?php 
    echo owpPullDownMenu('module', $modules_array, $nInfo->module);
    ?>
</td>
          </tr>
          <tr>
            <td colspan="2"><?php 
    echo owpTransLine('1', '10');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo TEXT_NEWSLETTER_TITLE;
    ?>
</td>
            <td class="main"><?php 
コード例 #8
0
    $user[] = array('id' => '***', 'text' => TEXT_ALL_USER);
    $user[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_USER);
    $sql = "SELECT admin_gender, admin_firstname, admin_lastname, admin_email_address \n            FROM " . $owpDBTable['administrators'] . " \n            ORDER BY admin_lastname";
    $mail_query = $db->Execute($sql);
    while ($user_values = $mail_query->fields) {
        $user[] = array('id' => $user_values['admin_email_address'], 'text' => $user_values['admin_lastname'] . ', ' . $user_values['admin_firstname'] . ' (' . $user_values['admin_email_address'] . ')');
        $mail_query->MoveNext();
    }
    ?>
              <tr>
                <td class="main"><?php 
    echo TEXT_USER;
    ?>
</td>
                <td><?php 
    echo owpPullDownMenu('user_email_address', $user, $_GET['admin']);
    ?>
</td>
              </tr>
              <tr>
                <td colspan="3"><?php 
    echo owpTransLine('1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td class="main"><?php 
    echo TEXT_FROM_NAME;
    ?>
</td>
                <td><?php 
コード例 #9
0
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr><?php 
echo owpDrawForm('goto', $owpFilename['file_manager'], '', 'get');
?>
            <td class="owp-title"><?php 
echo HEADING_TITLE . '<br><span class="smallText">' . $current_path . '</span>';
?>
</td>
            <td class="owp-title" align="right"><?php 
echo owpTransLine('1', '10');
?>
</td>
            <td class="owp-title" align="right"><?php 
echo owpPullDownMenu('goto', $goto_array, $current_path, 'onChange="this.form.submit();"');
?>
</td>
          </form></tr>
        </table></td>
      </tr>
<?php 
if ($directory_writeable && $_GET['action'] == 'new_file' || $_GET['action'] == 'edit') {
    if (strstr($_GET['info'], '..')) {
        owpRedirect(owpLink($owpFilename['file_manager']));
    }
    if (!isset($file_writeable)) {
        $file_writeable = true;
    }
    $file_contents = '';
    if ($_GET['action'] == 'new_file') {
コード例 #10
0
            <td class="main"><?php 
    echo FAX_NUMBER;
    ?>
</td>
            <td class="main"><?php 
    echo owpInputField('admin_fax', $aInfo->admin_fax, 'maxlength="32"');
    ?>
</td>
          </tr>
          <tr>
            <td class="main"><?php 
    echo NEWSLETTER;
    ?>
</td>
            <td class="main"><?php 
    echo owpPullDownMenu('admin_newsletter', $newsletter_array, $aInfo->admin_newsletter);
    ?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
    echo owpTransLine('1', '10');
    ?>
</td>
      </tr>
      <tr>
        <td class="formAreaTitle"><?php 
    echo TEXT_PARTIAL_ACCESS;
    ?>