flink.fun.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. function flink_pr()
  3. {
  4. $flink_pr = array('0', '1', '2', '3', '3-10');
  5. return $flink_pr;
  6. }
  7. function flink_dayip()
  8. {
  9. $flink_dayip = array('1000以下', '1000以上');
  10. return $flink_dayip;
  11. }
  12. function apply_flink_pr($pr = '')
  13. {
  14. $flink_pr = flink_pr();
  15. foreach ($flink_pr as $k => $value) {
  16. $str .= '<input type="radio" name="pr" value="' . $value . '" style="border:0" class="li"';
  17. $str .= $value == $pr ? 'checked ' : '';
  18. $str .= '>' . $value;
  19. }
  20. return $str;
  21. }
  22. function apply_flink_dayip($dayip = '')
  23. {
  24. $flink_dayip = flink_dayip();
  25. foreach ($flink_dayip as $k => $value) {
  26. $str .= '<input type="radio" name="dayip" value="' . $value . '" style="border:0" class="li"';
  27. $str .= $value == $dayip ? 'checked ' : '';
  28. $str .= '>' . $value;
  29. }
  30. return $str;
  31. }
  32. function webtype_option($typeid = '')
  33. {
  34. $alltype = $GLOBALS['db']->getAll('SELECT * FROM ' . $GLOBALS['db_mymps'] . 'flink_type ORDER BY id Asc');
  35. foreach ($alltype as $row) {
  36. $return .= '<option value=' . $row[id];
  37. $return .= $row[id] == $typeid ? 'selected style=\'background-color:#6EB00C;color:white\'' : '';
  38. $return .= '>' . $row[typename] . '</option>';
  39. }
  40. return $return;
  41. }
  42. ?>