Advertisement
Guest User

Untitled

a guest
Feb 26th, 2013
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. define( 'IEM_CRON_JOB', true );
  15. define( 'IEM_NO_CONTROLLER', true );
  16. define( 'IEM_CLI_MODE', true );
  17. error_reporting( 30719 );
  18. ini_set( 'display_errors', 1 );
  19. require_once( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/index.php' );
  20. require_once( IEM_PUBLIC_PATH . '/functions/api/settings.php' );
  21. $settings_api = new Settings_API( );
  22.  
  23. if ($settings_api->NeedDatabaseUpgrade( )) {
  24. exit( );
  25. }
  26.  
  27. unset( $settings_api );
  28.  
  29. if (( !SENDSTUDIO_SAFE_MODE && strpos( SENDSTUDIO_DISABLED_FUNCTIONS, 'set_time_limit' ) === false )) {
  30. set_time_limit( 0 );
  31. }
  32.  
  33.  
  34. if (( !defined( 'SENDSTUDIO_IS_SETUP' ) || !SENDSTUDIO_IS_SETUP )) {
  35. exit( );
  36. }
  37.  
  38. require_once( SENDSTUDIO_FUNCTION_DIRECTORY . '/sendstudio_functions.php' );
  39. $path = IEM_ADDONS_PATH . '/mta/api/mta.php';
  40.  
  41. if (!is_file( $path )) {
  42. return false;
  43. }
  44.  
  45. require_once( $path );
  46. $api = new Mta_API( );
  47. $options = CommandLine::parseArgs( $argv );
  48.  
  49. if (isset( $options['populate'] )) {
  50. $hours = (isset( $options['hours'] ) ? $options['hours'] : 24);
  51. echo 'populating command' . PHP_EOL;
  52. $groups = $api->group_info( );
  53. foreach ($groups as $g => $k) {
  54. echo 'Group: ' . $k['name'] . PHP_EOL;
  55. $mtas = $api->group_mtas( $k['uid'] );
  56. foreach ($mtas as $_k => $_v) {
  57. echo ' MTA uid: ' . $_v['uid'] . PHP_EOL;
  58. echo ' Populating:';
  59. $i = 1009;
  60.  
  61. while ($i < $hours) {
  62. $time = time( ) - 3600 * $i;
  63. $api->mta_add_data( $_v['uid'], rand( 1, 2 ), 'sent', $time );
  64. $api->mta_add_data( $_v['uid'], rand( 1, 3 ), 'blacklist', $time );
  65. $api->mta_add_data( $_v['uid'], 1, 'failed', $time );
  66. $api->mta_add_data( $_v['uid'], 1, 'bounced', $time );
  67. $api->mta_add_data( $_v['uid'], rand( 5, 100 ), 'reputation', $time );
  68. $api->mta_add_data( $_v['uid'], rand( 1, 3 ), 'whitelist', $time );
  69. ++$i;
  70. }
  71.  
  72. echo 'DONE' . PHP_EOL;
  73. }
  74. }
  75. }
  76. .....................................................................
  77. .........................................
  78. ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement