if ($row['price_backup'] != NULL && !empty($row['price_backup'])) { $price_backup = $row['price_backup']; $id = $row['id']; $query = "update prices set price='{$price_backup}' where id='{$id}' and prices.sales_stage <> 'Closed Won' AND prices.sales_stage <> 'Closed Lost';"; $db->query($query); $count++; } } print $mod_strings['UPDATE_RESTORE_COUNT'] . ' ' . $count . '<br>'; print $mod_strings['UPDATE_DONE'] . '<br>'; } if (isset($_POST['doAction']) && $_POST['doAction'] == 'verify') { doVerify(isset($_POST['include_closea']) && $_POST['include_closea'] == 'true'); } if (isset($_POST['doAction']) && $_POST['doAction'] == 'fix') { doFix(isset($_POST['include_closeb']) && $_POST['include_closeb'] == 'true'); } else { if (isset($_POST['doAction']) && $_POST['doAction'] == 'dollar') { doUpdateDollarAmounts(isset($_POST['include_closec']) && $_POST['include_closec'] == 'true'); } else { if (isset($_POST['doAction']) && $_POST['doAction'] == 'restore') { doRestoreAmounts(); } else { } } } echo get_form_header($mod_strings['UPDATE'], '', ''); echo <<<EOQ \t\t<form action='index.php' method='post' name='update'> <input type='hidden' name='action' value='UpgradeCurrency'> <input type='hidden' name='module' value='Opportunities'>
foreach ($vv as $k => $v) { $p['data'][$kk][$k] = @preg_replace_callback($regexp, 'rplFirst', $v); } } } $db->update_payment($p['payment_id'], $p); } } function doDel($member_id) { $db->delete_user($member_id); } if ($do = (array) $_POST['do']) { foreach ($do as $member_id => $action) { if ($action == 'fix') { doFix($member_id); } else { doDel($member_id); } } print "Records fixed/deleted by your request. <a href='fix.php'>Check again, should be no records in list</a>"; exit; } $prefix = $db->config['prefix']; $q = $db->query("\nSELECT m.*\nFROM {$prefix}members m LEFT JOIN {$prefix}payments p USING (member_id)\nWHERE\n m.name_f RLIKE '{$badWords}' OR\n m.name_l RLIKE '{$badWords}' OR\n m.email RLIKE '{$badWords}' OR\n m.country RLIKE '{$badWords}' OR\n m.state RLIKE '{$badWords}' OR\n m.street RLIKE '{$badWords}' OR\n m.city RLIKE '{$badWords}' OR\n m.zip RLIKE '{$badWords}' OR\n m.data RLIKE '{$badWords}' OR\n p.data RLIKE '{$badWords}' \n "); if (!mysql_num_rows($q)) { print "<b>No injected rows found, ALL OK. Seems nobody has tried to hack your website, or you have already fixed all records.\n Go to <a href='index.php'>Admin CP</a>.\n`</b>"; exit; } print "\n<html><head><title>Fix aMember records</title></head>\n<body>\n<form method=post action='fix.php'>\n<table border=1 style='border-collapse: collapse'>\n<tr>\n <th>Username</th>\n <th>First Name</th>\n <th>Last Name</th>\n <th>Action</th>\n</tr>\n\n"; while ($r = mysql_fetch_assoc($q)) {